diff options
-rw-r--r-- | include/mysql/psi/mysql_thread.h | 4 | ||||
-rw-r--r-- | mysql-test/r/create-big.result | 4 | ||||
-rw-r--r-- | mysql-test/t/create-big.test | 13 |
3 files changed, 17 insertions, 4 deletions
diff --git a/include/mysql/psi/mysql_thread.h b/include/mysql/psi/mysql_thread.h index a0682aae4c6..08dfeac37f1 100644 --- a/include/mysql/psi/mysql_thread.h +++ b/include/mysql/psi/mysql_thread.h @@ -518,7 +518,7 @@ typedef struct st_mysql_cond mysql_cond_t; @c mysql_cond_timedwait is a drop-in replacement for @c pthread_cond_timedwait. */ -#if defined(HAVE_PSI_INTERFACE) || defined(SAFE_MUTEX) +#ifdef HAVE_PSI_COND_INTERFACE #define mysql_cond_timedwait(C, M, W) \ inline_mysql_cond_timedwait(C, M, W, __FILE__, __LINE__) #else @@ -1171,7 +1171,7 @@ static inline int inline_mysql_cond_timedwait( mysql_cond_t *that, mysql_mutex_t *mutex, const struct timespec *abstime -#if defined(HAVE_PSI_INTERFACE) || defined(SAFE_MUTEX) +#ifdef HAVE_PSI_COND_INTERFACE , const char *src_file, uint src_line #endif ) diff --git a/mysql-test/r/create-big.result b/mysql-test/r/create-big.result index c47aecd7174..5aa44c2941d 100644 --- a/mysql-test/r/create-big.result +++ b/mysql-test/r/create-big.result @@ -161,7 +161,9 @@ 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;; -create trigger t1_bi before insert on t1 for each row set @a:=1; +set debug_sync='now WAIT_FOR parked'; +create trigger t1_bi before insert on t1 for each row set @a:=1;; +set debug_sync='now SIGNAL go'; Warnings: Note 1050 Table 't1' already exists select @a; diff --git a/mysql-test/t/create-big.test b/mysql-test/t/create-big.test index 8d916f8da82..7f20a8b42af 100644 --- a/mysql-test/t/create-big.test +++ b/mysql-test/t/create-big.test @@ -420,9 +420,20 @@ 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; connection addconroot1; -create trigger t1_bi before insert on t1 for each row set @a:=1; +set debug_sync='now WAIT_FOR parked'; +--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= + select count(*) = 1 from information_schema.processlist + where state = "Waiting for table metadata lock" and + info like "create trigger%"; +--source include/wait_condition.inc +set debug_sync='now SIGNAL go'; connection default; --reap +connection addconroot1; +--reap connection default; select @a; select * from t1; |