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
This commit is contained in:
parent
b8d9889e80
commit
2f14d5747e
@ -270,8 +270,8 @@ ERROR 42000: Incorrect table name ''
|
||||
drop table t1;
|
||||
drop table if exists t1, t2;
|
||||
Warnings:
|
||||
Note 1051 Unknown table 't1'
|
||||
Note 1051 Unknown table 't2'
|
||||
Note 1051 Unknown table 'test.t1'
|
||||
Note 1051 Unknown table 'test.t2'
|
||||
create table t1 ( a varchar(10) not null primary key ) engine=myisam;
|
||||
create table t2 ( a varchar(10) not null primary key ) engine=merge union=(t1);
|
||||
flush tables;
|
||||
@ -415,7 +415,7 @@ alter table t1 drop key a;
|
||||
drop table t1;
|
||||
CREATE TABLE T12207(a int) ENGINE=MYISAM;
|
||||
ALTER TABLE T12207 DISCARD TABLESPACE;
|
||||
ERROR HY000: Table storage engine for 'T12207' doesn't have this option
|
||||
ERROR HY000: Storage engine MyISAM of the table `test`.`T12207` doesn't have this option
|
||||
DROP TABLE T12207;
|
||||
create table t1 (a text) character set koi8r;
|
||||
insert into t1 values (_koi8r'ÔÅÓÔ');
|
||||
@ -556,7 +556,7 @@ create database mysqltest;
|
||||
create table t1 (c1 int);
|
||||
alter table t1 rename mysqltest.t1;
|
||||
drop table t1;
|
||||
ERROR 42S02: Unknown table 't1'
|
||||
ERROR 42S02: Unknown table 'test.t1'
|
||||
alter table mysqltest.t1 rename t1;
|
||||
drop table t1;
|
||||
create table t1 (c1 int);
|
||||
|
@ -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;
|
||||
/*
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user