mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fixed two bugs with CREATE OR REPLACE and LOCK TABLES:
MDEV-6560 Assertion `! is_set() ' failed in Diagnostics_area::set_ok_status on killing CREATE OR REPLACE MDEV-6525 Assertion `table->pos_in_locked _tables == __null || table->pos_in_locked_tables->table = table' failed in mark_used_tables_as_free_for_reuse, locking problems and binlogging problems on CREATE OR REPLACE under lock. mysql-test/r/create_or_replace.result: Added test for MDEV-6560 mysql-test/t/create_or_replace.test: Added test for MDEV-6560 mysql-test/valgrind.supp: Added suppression for OpenSuse 12.3 sql/sql_base.cc: More DBUG sql/sql_class.cc: Changed that thd_sqlcom_can_generate_row_events() does not report that CREATE OR REPLACE is generating row events. This is safe as this function is only used by InnoDB/XtraDB to check if a query is generating row events as part of another transaction. As CREATE is always run as it's own transaction, this isn't a problem. This fixed MDEV-6525. sql/sql_table.cc: Remember if reopen_tables() generates an error (which can only happen in case of KILL). This fixed MDEV-6560
This commit is contained in:
@ -4453,9 +4453,18 @@ extern "C" bool thd_binlog_filter_ok(const MYSQL_THD thd)
|
||||
return binlog_filter->db_ok(thd->db);
|
||||
}
|
||||
|
||||
/*
|
||||
This is similar to sqlcom_can_generate_row_events, with the expection
|
||||
that we only return 1 if we are going to generate row events in a
|
||||
transaction.
|
||||
CREATE OR REPLACE is always safe to do as this will run in it's own
|
||||
transaction.
|
||||
*/
|
||||
|
||||
extern "C" bool thd_sqlcom_can_generate_row_events(const MYSQL_THD thd)
|
||||
{
|
||||
return sqlcom_can_generate_row_events(thd);
|
||||
return (sqlcom_can_generate_row_events(thd) && thd->lex->sql_command !=
|
||||
SQLCOM_CREATE_TABLE);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user