summaryrefslogtreecommitdiff
path: root/mysql-test/t/mdl_sync.test
diff options
context:
space:
mode:
authorSergey Glukhov <Sergey.Glukhov@sun.com>2010-05-27 19:54:43 +0400
committerSergey Glukhov <Sergey.Glukhov@sun.com>2010-05-27 19:54:43 +0400
commit8fa381fda36f3386a7116ff57dc93329891611df (patch)
tree67f100ff11a894ec02cb8e358916d62be4ab81d0 /mysql-test/t/mdl_sync.test
parentbac571e136a0bfe448576128870fb888587f86d1 (diff)
downloadmariadb-git-8fa381fda36f3386a7116ff57dc93329891611df.tar.gz
Bug#52856 concurrent show columns or show full columns causes a crash!!!1
We should avoid any SHARE fields assignments as this is shared structure and assignments may affect other therads. To avoid this copy of SHARE struct is created and stored into TABLE struct which is used in get_schema_coulumns_record later. mysql-test/r/mdl_sync.result: test case mysql-test/t/mdl_sync.test: test case sql/sql_show.cc: We should avoid any SHARE fields assignments as this is shared structure and assignments may affect other therads. To avoid this copy of SHARE struct is created and stored into TABLE struct which is used in get_schema_coulumns_record later.
Diffstat (limited to 'mysql-test/t/mdl_sync.test')
-rw-r--r--mysql-test/t/mdl_sync.test20
1 files changed, 20 insertions, 0 deletions
diff --git a/mysql-test/t/mdl_sync.test b/mysql-test/t/mdl_sync.test
index ef434e33cfa..dff29d2f6b6 100644
--- a/mysql-test/t/mdl_sync.test
+++ b/mysql-test/t/mdl_sync.test
@@ -3468,6 +3468,26 @@ connection default;
set debug_sync= 'RESET';
drop table t1;
+--echo #
+--echo # Bug#52856 concurrent show columns or show full columns causes a crash!!!
+--echo #
+CREATE TABLE t1(a CHAR(255));
+
+connect(con1, localhost, root);
+SET DEBUG_SYNC= "get_schema_column SIGNAL waiting WAIT_FOR completed";
+--send SHOW FULL COLUMNS FROM t1
+
+connection default;
+SET DEBUG_SYNC= "now WAIT_FOR waiting";
+SHOW FULL COLUMNS FROM t1;
+SET DEBUG_SYNC= "now SIGNAL completed";
+
+connection con1;
+--reap
+connection default;
+DROP TABLE t1;
+disconnect con1;
+
# Check that all connections opened by test cases in this file are really
# gone so execution of other tests won't be affected by their presence.