mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
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:
@ -1,6 +1,6 @@
|
||||
/*
|
||||
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
|
||||
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)
|
||||
{
|
||||
return !thd->is_current_stmt_binlog_format_row() &&
|
||||
return thd &&
|
||||
!thd->is_current_stmt_binlog_format_row() &&
|
||||
!thd->is_current_stmt_binlog_disabled();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user