diff options
author | Sergey Glukhov <Sergey.Glukhov@sun.com> | 2010-05-27 19:54:43 +0400 |
---|---|---|
committer | Sergey Glukhov <Sergey.Glukhov@sun.com> | 2010-05-27 19:54:43 +0400 |
commit | 8fa381fda36f3386a7116ff57dc93329891611df (patch) | |
tree | 67f100ff11a894ec02cb8e358916d62be4ab81d0 /mysql-test | |
parent | bac571e136a0bfe448576128870fb888587f86d1 (diff) | |
download | mariadb-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')
-rw-r--r-- | mysql-test/r/mdl_sync.result | 14 | ||||
-rw-r--r-- | mysql-test/t/mdl_sync.test | 20 |
2 files changed, 34 insertions, 0 deletions
diff --git a/mysql-test/r/mdl_sync.result b/mysql-test/r/mdl_sync.result index 984f0df3d0e..8f236521f99 100644 --- a/mysql-test/r/mdl_sync.result +++ b/mysql-test/r/mdl_sync.result @@ -2381,3 +2381,17 @@ commit; # Reap ALTER TABLE. set debug_sync= 'RESET'; drop table t1; +# +# Bug#52856 concurrent show columns or show full columns causes a crash!!! +# +CREATE TABLE t1(a CHAR(255)); +SET DEBUG_SYNC= "get_schema_column SIGNAL waiting WAIT_FOR completed"; +SHOW FULL COLUMNS FROM t1; +SET DEBUG_SYNC= "now WAIT_FOR waiting"; +SHOW FULL COLUMNS FROM t1; +Field Type Collation Null Key Default Extra Privileges Comment +a char(255) latin1_swedish_ci YES NULL select,insert,update,references +SET DEBUG_SYNC= "now SIGNAL completed"; +Field Type Collation Null Key Default Extra Privileges Comment +a char(255) latin1_swedish_ci YES NULL select,insert,update,references +DROP TABLE t1; 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. |