diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-07-11 14:08:51 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-07-11 14:08:51 +0200 |
commit | 2f14d5747e90b9308890f07badf970080cd6e376 (patch) | |
tree | 1770f7f1294e597e70e13f93cf871770a6a07040 /sql | |
parent | b8d9889e801e83be229bdd1b0a7dfe00eb93efa2 (diff) | |
download | mariadb-git-2f14d5747e90b9308890f07badf970080cd6e376.tar.gz |
fix alter_table.test: remove old assert as it was removed from 5.6,
add extra_func code from 5.5, that was lost in a merge
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sql_parse.cc | 1 | ||||
-rw-r--r-- | sql/sql_table.cc | 7 |
2 files changed, 5 insertions, 3 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index d1b149065b2..75876dbf7e5 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -5875,7 +5875,6 @@ void THD::reset_for_next_command(bool calculate_userstat) DBUG_ENTER("mysql_reset_thd_for_next_command"); DBUG_ASSERT(!thd->spcont); /* not for substatements of routines */ DBUG_ASSERT(! thd->in_sub_stmt); - DBUG_ASSERT(thd->transaction.on); thd->free_list= 0; thd->select_number= 1; /* diff --git a/sql/sql_table.cc b/sql/sql_table.cc index d58a76903a2..4d39fded1b6 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -7278,11 +7278,14 @@ simple_rename_or_index_change(THD *thd, TABLE_LIST *table_list, TABLE *table= table_list->table; MDL_ticket *mdl_ticket= table->mdl_ticket; int error= 0; + enum ha_extra_function extra_func= thd->locked_tables_mode + ? HA_EXTRA_NOT_USED + : HA_EXTRA_FORCE_REOPEN; DBUG_ENTER("simple_rename_or_index_change"); if (keys_onoff != Alter_info::LEAVE_AS_IS) { - if (wait_while_table_is_used(thd, table, HA_EXTRA_FORCE_REOPEN)) + if (wait_while_table_is_used(thd, table, extra_func)) DBUG_RETURN(true); // It's now safe to take the table level lock. @@ -7325,7 +7328,7 @@ simple_rename_or_index_change(THD *thd, TABLE_LIST *table_list, simple rename did nothing and therefore we can safely return without additional clean-up. */ - if (wait_while_table_is_used(thd, table, HA_EXTRA_FORCE_REOPEN)) + if (wait_while_table_is_used(thd, table, extra_func)) DBUG_RETURN(true); close_all_tables_for_name(thd, table->s, HA_EXTRA_PREPARE_FOR_RENAME, NULL); |