MDEV-32890 LeakSanitizer errors in mem_heap_create_block_func upon query from...

MDEV-32890  LeakSanitizer errors in mem_heap_create_block_func upon query from I_S.INNODB_SYS_TABLES with LIMIT ROWS EXAMINED

- innodb_sys_tables query fails to free the object which contains
sys_tables information in case of error.
parent 81aba2c2
......@@ -153,6 +153,7 @@ set @@use_stat_tables = @save_use_stat_tables;
#
# MDEV-28613 LeakSanitizer caused by I_S query using LIMIT ROWS EXAMINED
#
CREATE TABLE t1(f1 VARCHAR(255), FULLTEXT(f1))ENGINE=InnoDB;
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_INDEXES LIMIT ROWS EXAMINED 5;
Warnings:
Level Warning
......@@ -172,3 +173,4 @@ SELECT SPACE FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES LIMIT ROWS EXAMINED
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_VIRTUAL LIMIT ROWS EXAMINED 5;
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN LIMIT ROWS EXAMINED 5;
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN_COLS LIMIT ROWS EXAMINED 5;
DROP TABLE t1;
......@@ -85,6 +85,7 @@ set @@use_stat_tables = @save_use_stat_tables;
--echo #
--echo # MDEV-28613 LeakSanitizer caused by I_S query using LIMIT ROWS EXAMINED
--echo #
CREATE TABLE t1(f1 VARCHAR(255), FULLTEXT(f1))ENGINE=InnoDB;
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_INDEXES LIMIT ROWS EXAMINED 5;
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES LIMIT ROWS EXAMINED 5;
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS LIMIT ROWS EXAMINED 5;
......@@ -94,3 +95,4 @@ SELECT SPACE FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES LIMIT ROWS EXAMINED
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_VIRTUAL LIMIT ROWS EXAMINED 5;
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN LIMIT ROWS EXAMINED 5;
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN_COLS LIMIT ROWS EXAMINED 5;
DROP TABLE t1;
......@@ -5070,6 +5070,9 @@ i_s_sys_tables_fill_table(
thd, table_rec, tables->table);
if (err) {
err = i_s_sys_error_handling(err, thd);
if (table_rec) {
dict_mem_table_free(table_rec);
}
goto func_exit;
}
} else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment