diff options
author | Monty <monty@mariadb.org> | 2021-02-20 14:46:19 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2021-02-22 22:42:38 +0100 |
commit | 640f42311a72fa82bf7117c2791fc47ceb420361 (patch) | |
tree | 6135b491b2a6d6325f1f3d55c3f13779c80b90fb /mysql-test/main/information_schema.result | |
parent | 0ab1e3914c78e4a82a8e4502b58b20e5598727ab (diff) | |
download | mariadb-git-640f42311a72fa82bf7117c2791fc47ceb420361.tar.gz |
MDEV-24929 Server crash in thr_multi_unlock or in get_schema_tables_result
This was caused by two different bugs:
1) Information_schema tables where not locked by lock_tables, but
get_lock_data() was not filtering these out. This caused a crash when
mysql_unlock_some_tables() tried to unlock tables early, including
not locked information schema tables.
Fixed by not locking SYSTEM_TMP_TABLES
2) In some cases the optimizer will notice that we do not need to read
the information_schema tables at all. In this case
join_tab->read_record is not set, which caused a crash in
get_schema_tables_result()
Fixed by ignoring const tables in get_schema_tables_result()
Diffstat (limited to 'mysql-test/main/information_schema.result')
-rw-r--r-- | mysql-test/main/information_schema.result | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/mysql-test/main/information_schema.result b/mysql-test/main/information_schema.result index 93ff6e170f6..c65a10cbd4b 100644 --- a/mysql-test/main/information_schema.result +++ b/mysql-test/main/information_schema.result @@ -2303,5 +2303,18 @@ group by f; f drop table t1; # +# MDEV-24929 Server crash in thr_multi_unlock or in +# get_schema_tables_result upon select from I_S with joins +# +CREATE TABLE t1 (a TIMESTAMP, KEY (a)); +INSERT INTO t1 VALUES ('2012-12-12'),('2021-11-11'); +SELECT count(*) FROM t1 AS t1a LEFT JOIN (t1 AS t1b JOIN INFORMATION_SCHEMA.ROUTINES) ON (t1b.a IS NULL); +count(*) +2 +SELECT count(*) FROM t1 AS t1a LEFT JOIN (t1 AS t1b JOIN INFORMATION_SCHEMA.PROFILING) ON (t1b.a IS NULL); +count(*) +2 +DROP TABLE t1; +# # End of 10.3 tests # |