mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +01:00
Fixed main.create-big failure
After MDEV-17772 table existence check is performed much earlier, so create_table_select_before_check_if_exists debug sync point is not reachable when table exists. Moved debug sync point to appropriate place.
This commit is contained in:
parent
8049160936
commit
0fcb141fbd
4 changed files with 13 additions and 14 deletions
|
@ -237,11 +237,11 @@ select @a;
|
|||
@a
|
||||
0
|
||||
drop table t1;
|
||||
set debug_sync='create_table_select_before_check_if_exists SIGNAL parked WAIT_FOR go';
|
||||
create table if not exists t1 select 1 as i;;
|
||||
set debug_sync='create_table_before_check_if_exists SIGNAL parked WAIT_FOR go';
|
||||
create table if not exists t1 select 1 as i;
|
||||
connection addconroot1;
|
||||
set debug_sync='now WAIT_FOR parked';
|
||||
drop table t1;;
|
||||
drop table t1;
|
||||
connection addconroot2;
|
||||
set debug_sync='now SIGNAL go';
|
||||
connection default;
|
||||
|
@ -249,11 +249,11 @@ connection addconroot1;
|
|||
connection default;
|
||||
create table t1 (i int);
|
||||
set @a:=0;
|
||||
set debug_sync='create_table_select_before_check_if_exists SIGNAL parked WAIT_FOR go';
|
||||
create table if not exists t1 select 1 as i;;
|
||||
set debug_sync='create_table_before_check_if_exists SIGNAL parked WAIT_FOR go';
|
||||
create table if not exists t1 select 1 as i;
|
||||
connection addconroot1;
|
||||
set debug_sync='now WAIT_FOR parked';
|
||||
create trigger t1_bi before insert on t1 for each row set @a:=1;;
|
||||
create trigger t1_bi before insert on t1 for each row set @a:=1;
|
||||
connection addconroot2;
|
||||
set debug_sync='now SIGNAL go';
|
||||
connection default;
|
||||
|
|
|
@ -395,11 +395,11 @@ select @a;
|
|||
drop table t1;
|
||||
|
||||
# Concurrent DROP TABLE
|
||||
set debug_sync='create_table_select_before_check_if_exists SIGNAL parked WAIT_FOR go';
|
||||
--send create table if not exists t1 select 1 as i;
|
||||
set debug_sync='create_table_before_check_if_exists SIGNAL parked WAIT_FOR go';
|
||||
--send create table if not exists t1 select 1 as i
|
||||
connection addconroot1;
|
||||
set debug_sync='now WAIT_FOR parked';
|
||||
--send drop table t1;
|
||||
--send drop table t1
|
||||
connection addconroot2;
|
||||
# Wait until the above DROP TABLE is blocked due to CREATE TABLE
|
||||
let $wait_condition=
|
||||
|
@ -417,11 +417,11 @@ connection default;
|
|||
# Concurrent CREATE TRIGGER
|
||||
create table t1 (i int);
|
||||
set @a:=0;
|
||||
set debug_sync='create_table_select_before_check_if_exists SIGNAL parked WAIT_FOR go';
|
||||
--send create table if not exists t1 select 1 as i;
|
||||
set debug_sync='create_table_before_check_if_exists SIGNAL parked WAIT_FOR go';
|
||||
--send create table if not exists t1 select 1 as i
|
||||
connection addconroot1;
|
||||
set debug_sync='now WAIT_FOR parked';
|
||||
--send create trigger t1_bi before insert on t1 for each row set @a:=1;
|
||||
--send create trigger t1_bi before insert on t1 for each row set @a:=1
|
||||
connection addconroot2;
|
||||
# Wait until the above DROP TABLE is blocked due to CREATE TABLE
|
||||
let $wait_condition=
|
||||
|
|
|
@ -3893,6 +3893,7 @@ static bool upgrade_lock_if_not_exists(THD *thd,
|
|||
if (thd->lex->sql_command == SQLCOM_CREATE_TABLE ||
|
||||
thd->lex->sql_command == SQLCOM_CREATE_SEQUENCE)
|
||||
{
|
||||
DEBUG_SYNC(thd,"create_table_before_check_if_exists");
|
||||
if (!create_info.or_replace() &&
|
||||
ha_table_exists(thd, &create_table->db, &create_table->table_name))
|
||||
{
|
||||
|
|
|
@ -4420,8 +4420,6 @@ select_create::prepare(List<Item> &_values, SELECT_LEX_UNIT *u)
|
|||
thd->binlog_start_trans_and_stmt();
|
||||
}
|
||||
|
||||
DEBUG_SYNC(thd,"create_table_select_before_check_if_exists");
|
||||
|
||||
if (!(table= create_table_from_items(thd, &values, &extra_lock, hook_ptr)))
|
||||
/* abort() deletes table */
|
||||
DBUG_RETURN(-1);
|
||||
|
|
Loading…
Add table
Reference in a new issue