mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge vvagin@bk-internal.mysql.com:/home/bk/mysql-4.1
into eagle.mysql.r18.ru:/home/vva/work/BUG_2385/mysql-4.1
This commit is contained in:
4
mysql-test/include/have_debug.inc
Normal file
4
mysql-test/include/have_debug.inc
Normal file
@ -0,0 +1,4 @@
|
||||
-- require r/have_debug.require
|
||||
disable_query_log;
|
||||
select instr(version(),convert('debug' using utf8))!=0;
|
||||
enable_query_log;
|
2
mysql-test/r/have_debug.require
Normal file
2
mysql-test/r/have_debug.require
Normal file
@ -0,0 +1,2 @@
|
||||
instr(version(),convert('debug' using utf8))!=0;
|
||||
1
|
1
mysql-test/t/synchronization-master.opt
Normal file
1
mysql-test/t/synchronization-master.opt
Normal file
@ -0,0 +1 @@
|
||||
--exit-info=2048
|
45
mysql-test/t/synchronization.test
Normal file
45
mysql-test/t/synchronization.test
Normal file
@ -0,0 +1,45 @@
|
||||
-- source include/have_crypt.inc
|
||||
|
||||
#
|
||||
# Test for Bug #2385 CREATE TABLE LIKE lacks locking on source and destination table
|
||||
#
|
||||
|
||||
connect (con_to_sleep,localhost,lock_controller,,);
|
||||
connect (con_to_harm_sleeper,localhost,root,,);
|
||||
|
||||
# locking of source:
|
||||
connection con_to_sleep;
|
||||
CREATE TABLE t1 (a int);
|
||||
send CREATE TABLE t2 LIKE t1;
|
||||
|
||||
connection con_to_harm_sleeper;
|
||||
sleep 1;
|
||||
ALTER TABLE t1 add key(a);
|
||||
|
||||
connection con_to_sleep;
|
||||
sleep 4;
|
||||
SHOW CREATE TABLE t2;
|
||||
drop table t1, t2;
|
||||
|
||||
# locking of destination:
|
||||
connection con_to_sleep;
|
||||
CREATE TABLE t1 (a int);
|
||||
send CREATE TABLE t2 LIKE t1;
|
||||
|
||||
connection con_to_harm_sleeper;
|
||||
sleep 1;
|
||||
CREATE TABLE t2 (b int);
|
||||
disable_query_log;
|
||||
select "-----------" as "let's take a look at result of create .. like : ";
|
||||
enable_query_log;
|
||||
|
||||
connection con_to_sleep;
|
||||
sleep 1;
|
||||
--error 1
|
||||
reap;
|
||||
disable_query_log;
|
||||
select "" as "-----------";
|
||||
enable_query_log;
|
||||
SHOW CREATE TABLE t2;
|
||||
|
||||
drop table t1, t2;
|
Reference in New Issue
Block a user