Commit a2f2f686 authored by Marko Mäkelä's avatar Marko Mäkelä

Work around the crash in MDEV-17814

Internal transactions may not have trx->mysql_thd.
But at the same time, trx->duplicates should only hold if
REPLACE or INSERT...ON DUPLICATE KEY UPDATE was executed from SQL.

The flag feels misplaced. A more appropriate place for it would
be row_prebuilt_t or similar.
parent dbb39a77
/* /*
Copyright (c) 2000, 2015, Oracle and/or its affiliates. Copyright (c) 2000, 2015, Oracle and/or its affiliates.
Copyright (c) 2008, 2017, MariaDB Corporation. Copyright (c) 2008, 2018, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
...@@ -4525,7 +4525,8 @@ extern "C" int thd_rpl_is_parallel(const MYSQL_THD thd) ...@@ -4525,7 +4525,8 @@ extern "C" int thd_rpl_is_parallel(const MYSQL_THD thd)
extern "C" int thd_rpl_stmt_based(const MYSQL_THD thd) extern "C" int thd_rpl_stmt_based(const MYSQL_THD thd)
{ {
return !thd->is_current_stmt_binlog_format_row() && return thd &&
!thd->is_current_stmt_binlog_format_row() &&
!thd->is_current_stmt_binlog_disabled(); !thd->is_current_stmt_binlog_disabled();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment