summaryrefslogtreecommitdiff
path: root/mysql-test/t/synchronization.test
diff options
context:
space:
mode:
authorunknown <vva@eagle.mysql.r18.ru>2004-04-06 19:17:13 +0500
committerunknown <vva@eagle.mysql.r18.ru>2004-04-06 19:17:13 +0500
commit315f5d27c4579220ce56f56d29ff299ad715ec11 (patch)
tree0c2e038a7a7c2f71fdb4697519e881a06bdf1e11 /mysql-test/t/synchronization.test
parente7a85e367f5518cbe3a4bc70d37a6a66418ea68f (diff)
downloadmariadb-git-315f5d27c4579220ce56f56d29ff299ad715ec11.tar.gz
fixed the tests mysql-test/t/synchronization.test
for Bug #2385 CREATE TABLE LIKE lacks locking on source and destination table BitKeeper/deleted/.del-synchronization-master.opt~265be23ead00949: Delete: mysql-test/t/synchronization-master.opt BitKeeper/deleted/.del-have_debug.require~d981522532c711b2: Delete: mysql-test/r/have_debug.require BitKeeper/deleted/.del-have_debug.inc~f4dc5160b9912226: Delete: mysql-test/include/have_debug.inc mysql-test/r/synchronization.result: fixed the test for Bug #2385 CREATE TABLE LIKE lacks locking on source and destination table mysql-test/t/synchronization.test: fixed the test for Bug #2385 CREATE TABLE LIKE lacks locking on source and destination table sql/sql_table.cc: deleted test sleep from mysql_create_like_table
Diffstat (limited to 'mysql-test/t/synchronization.test')
-rw-r--r--mysql-test/t/synchronization.test64
1 files changed, 26 insertions, 38 deletions
diff --git a/mysql-test/t/synchronization.test b/mysql-test/t/synchronization.test
index bbea4c44dad..7bdeaa8a740 100644
--- a/mysql-test/t/synchronization.test
+++ b/mysql-test/t/synchronization.test
@@ -1,45 +1,33 @@
--- source include/have_debug.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,,);
+connect (con1,localhost,root,,);
+connect (con2,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; \ No newline at end of file
+CREATE TABLE t1 (x1 int);
+let $1= 10;
+while ($1)
+{
+ connection con1;
+ send ALTER TABLE t1 CHANGE x1 x2 int;
+ connection con2;
+ CREATE TABLE t2 LIKE t1;
+ replace_result x1 xx x2 xx;
+ SHOW CREATE TABLE t2;
+ DROP TABLE t2;
+ connection con1;
+ reap;
+ send ALTER TABLE t1 CHANGE x2 x1 int;
+ connection con2;
+ CREATE TABLE t2 LIKE t1;
+ replace_result x1 xx x2 xx;
+ SHOW CREATE TABLE t2;
+ DROP TABLE t2;
+ connection con1;
+ reap;
+ dec $1;
+}
+DROP TABLE t1;