summaryrefslogtreecommitdiff
path: root/sql/sql_base.cc
diff options
context:
space:
mode:
authorMichael Widenius <monty@mariadb.org>2014-09-08 20:56:56 +0300
committerMichael Widenius <monty@mariadb.org>2014-09-08 20:56:56 +0300
commit9c79227c961d91da4d1cbd0e96a05291874d6b9c (patch)
tree260c789b9b5f8097c6dc242a7ee6964b927598ae /sql/sql_base.cc
parent0835f574891d0afdfe64229d38460128fedfdd38 (diff)
downloadmariadb-git-9c79227c961d91da4d1cbd0e96a05291874d6b9c.tar.gz
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
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r--sql/sql_base.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 342a45247c5..5dd8a5b8abc 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -2925,6 +2925,7 @@ Locked_tables_list::reopen_tables(THD *thd)
size_t reopen_count= 0;
MYSQL_LOCK *lock;
MYSQL_LOCK *merged_lock;
+ DBUG_ENTER("Locked_tables_list::reopen_tables");
for (TABLE_LIST *table_list= m_locked_tables;
table_list; table_list= table_list->next_global)
@@ -2936,7 +2937,7 @@ Locked_tables_list::reopen_tables(THD *thd)
if (open_table(thd, table_list, thd->mem_root, &ot_ctx))
{
unlink_all_closed_tables(thd, 0, reopen_count);
- return TRUE;
+ DBUG_RETURN(TRUE);
}
table_list->table->pos_in_locked_tables= table_list;
/* See also the comment on lock type in init_locked_tables(). */
@@ -2968,11 +2969,11 @@ Locked_tables_list::reopen_tables(THD *thd)
unlink_all_closed_tables(thd, lock, reopen_count);
if (! thd->killed)
my_error(ER_LOCK_DEADLOCK, MYF(0));
- return TRUE;
+ DBUG_RETURN(TRUE);
}
thd->lock= merged_lock;
}
- return FALSE;
+ DBUG_RETURN(FALSE);
}
/**