diff options
author | Alexey Botchkov <holyfoot@askmonty.org> | 2022-07-16 16:54:03 +0400 |
---|---|---|
committer | Alexey Botchkov <holyfoot@askmonty.org> | 2022-07-17 01:10:43 +0400 |
commit | 8911823f65a6557ce66ea5f8aecd55b115a85606 (patch) | |
tree | eeeeee73708c22dbf584ca1444be46321a670fa1 /mysql-test | |
parent | 65cc89ed9eb9367a7e068286ddc9a896c478c012 (diff) | |
download | mariadb-git-8911823f65a6557ce66ea5f8aecd55b115a85606.tar.gz |
MDEV-26546 SIGSEGV's in spider_db_connect on SHOW TABLE and spider_db… …_mbase::connect (and SIGSEGV's in check_vcol_forward_refs and inline_mysql_mutex_lock)
Not the SPIDER issue - happens to INSERT DELAYED.
the field::make_new_field does't copy the LONG_UNIQUE_HASH_FIELD
flag to the new field. Though the Delayed_insert::get_local_table
copies the field->vcol_info for this field. Ad a result
the parse_vcol_defs doesn't create the expression for that column
so the field->vcol_info->expr is NULL. Which leads to crash.
Backported fix for this from 10.5 - the flagg added in the
Delayed_insert::get_local_table.
Another problem with the USING HASH key is thst the
parse_vcol_defs modifies the table->keys content. Then the same
parse_vcol_defs is called on the table copy that has keys already
modified. Backported fix for that from 10.5 - key copying added
tot the Delayed_insert::get_local_table.
Finally - the created copy has to clear the expr_arena as
this table is not in the thd->open_tables list so won't be
cleared automatically.
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/main/delayed.result | 9 | ||||
-rw-r--r-- | mysql-test/main/delayed.test | 12 |
2 files changed, 21 insertions, 0 deletions
diff --git a/mysql-test/main/delayed.result b/mysql-test/main/delayed.result index ec36e3af46d..fe284dfcdad 100644 --- a/mysql-test/main/delayed.result +++ b/mysql-test/main/delayed.result @@ -510,3 +510,12 @@ a b 2 2 3 3 drop table t1; +# +# MDEV-26546 SIGSEGV's in spider_db_connect on SHOW TABLE and +# spider_db_mbase::connect (and SIGSEGV's in check_vcol_forward_refs +# and inline_mysql_mutex_lock) +# +CREATE TABLE t1 (c0 INT,UNIQUE (c0) USING HASH) ENGINE=MYISAM; +INSERT DELAYED INTO t1 VALUES (0); +INSERT DELAYED INTO t1 VALUES (0); +DROP TABLE t1; diff --git a/mysql-test/main/delayed.test b/mysql-test/main/delayed.test index 573985fec1f..428a3d4c4b0 100644 --- a/mysql-test/main/delayed.test +++ b/mysql-test/main/delayed.test @@ -642,3 +642,15 @@ insert delayed into t1 values (3,3); flush tables t1; select * from t1; drop table t1; + +--echo # +--echo # MDEV-26546 SIGSEGV's in spider_db_connect on SHOW TABLE and +--echo # spider_db_mbase::connect (and SIGSEGV's in check_vcol_forward_refs +--echo # and inline_mysql_mutex_lock) +--echo # + +CREATE TABLE t1 (c0 INT,UNIQUE (c0) USING HASH) ENGINE=MYISAM; +INSERT DELAYED INTO t1 VALUES (0); +INSERT DELAYED INTO t1 VALUES (0); +DROP TABLE t1; + |