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.
This commit is contained in:
parent
dbb39a778d
commit
a2f2f686cb
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
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)
|
|||||||
|
|
||||||
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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user