From 8fa381fda36f3386a7116ff57dc93329891611df Mon Sep 17 00:00:00 2001 From: Sergey Glukhov Date: Thu, 27 May 2010 19:54:43 +0400 Subject: 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. --- mysql-test/t/mdl_sync.test | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'mysql-test/t/mdl_sync.test') 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. -- cgit v1.2.1 From 07f07ffed1cb8a62dbfe7a8a694becd3e4688ea5 Mon Sep 17 00:00:00 2001 From: Sergey Glukhov Date: Mon, 31 May 2010 12:38:45 +0400 Subject: test case fix --- mysql-test/t/mdl_sync.test | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mysql-test/t/mdl_sync.test') diff --git a/mysql-test/t/mdl_sync.test b/mysql-test/t/mdl_sync.test index dff29d2f6b6..0b4b9af5bc6 100644 --- a/mysql-test/t/mdl_sync.test +++ b/mysql-test/t/mdl_sync.test @@ -3479,9 +3479,10 @@ SET DEBUG_SYNC= "get_schema_column SIGNAL waiting WAIT_FOR completed"; connection default; SET DEBUG_SYNC= "now WAIT_FOR waiting"; +--replace_column 8 # SHOW FULL COLUMNS FROM t1; SET DEBUG_SYNC= "now SIGNAL completed"; - +--replace_column 8 # connection con1; --reap connection default; -- cgit v1.2.1