From fad1d15326651a92895c799829ff66edc37fc20f Mon Sep 17 00:00:00 2001 From: Rucha Deodhar Date: Wed, 15 Dec 2021 13:59:38 +0530 Subject: MDEV-25460: Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())' failed in Diagnostics_area::set_ok_status in my_ok from mysql_sql_stmt_prepare Analysis: Before PREPARE is executed, binlog_format is STATEMENT. This PREPARE had SET STATEMENT which sets binlog_format to ROW. Now after PREPARE is done we reset the binlog_format (back to STATEMENT). But we have temporary table, it doesn't let changing binlog_format=ROW to binlog_format=STATEMENT and gives error which goes unreported. This unreported error eventually causes assertion failure. Fix: Change return type for LEX::restore_set_statement_var() to bool and make it return error state. --- sql/sql_lex.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/sql_lex.h') diff --git a/sql/sql_lex.h b/sql/sql_lex.h index bdf52e8ef7b..5585a95f67f 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -3094,7 +3094,7 @@ public: int print_explain(select_result_sink *output, uint8 explain_flags, bool is_analyze, bool *printed_anything); - void restore_set_statement_var(); + bool restore_set_statement_var(); void init_last_field(Column_definition *field, const char *name, CHARSET_INFO *cs); void set_last_field_type(const Lex_field_type_st &type); -- cgit v1.2.1