[MDEV-24868] Server crashes in optimize_schema_tables_memory_usage after select from information_schema.innodb_sys_columns Created: 2021-02-15  Updated: 2021-03-09  Resolved: 2021-03-09

Status: Closed
Project: MariaDB Server
Component/s: Information Schema
Affects Version/s: 10.3, 10.4, 10.5
Fix Version/s: 10.3.29, 10.4.19, 10.5.10

Type: Bug Priority: Critical
Reporter: Alice Sherepa Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: regression


 Description   

--source include/have_innodb.inc
create table t1 ( name varchar(64) character set utf8, len int);
insert into t1 values ('a',8),('b',9);
 
select * from t1 where (name, len) in 
 ( select  name, len from information_schema.innodb_sys_columns having len = 8);

Reproducible on 10.3-10.5, debug/nondebug builds, does not matter what storage engine table t1 uses. No crash on 10.2

10.3 da88e1ec12b0ba39552bf543

Version: '10.3.28-MariaDB-debug-log' 
210215 14:27:45 [ERROR] mysqld got signal 11 ;
 
Server version: 10.3.28-MariaDB-debug-log
 
sql/sql_show.cc:8667(optimize_schema_tables_memory_usage(List<TABLE_LIST>&))[0x56440c3f5cc2]
sql/sql_select.cc:1627(JOIN::optimize_inner())[0x56440c2ad608]
sql/sql_select.cc:1501(JOIN::optimize())[0x56440c2ac41f]
sql/sql_select.cc:4309(mysql_select(THD*, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*))[0x56440c2c958f]
sql/sql_select.cc:370(handle_select(THD*, LEX*, select_result*, unsigned long))[0x56440c2a0270]
sql/sql_parse.cc:6316(execute_sqlcom_select(THD*, TABLE_LIST*))[0x56440c20c6b0]
sql/sql_parse.cc:3847(mysql_execute_command(THD*))[0x56440c1fa1f0]
sql/sql_parse.cc:7840(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x56440c2167a7]
sql/sql_parse.cc:1855(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x56440c1ece7c]
sql/sql_parse.cc:1398(do_command(THD*))[0x56440c1e95b7]
sql/sql_connect.cc:1403(do_handle_one_connection(CONNECT*))[0x56440c5da3d0]
sql/sql_connect.cc:1309(handle_one_connection)[0x56440c5d9c88]
perfschema/pfs.cc:1871(pfs_spawn_thread)[0x56440dd3fc8f]
nptl/pthread_create.c:487(start_thread)[0x7f4265453fa3]
x86_64/clone.S:97(clone)[0x7f4264dd74cf]
 
Query (0x62b000000290): select * from t1 where (name, len) in ( select  name, len from information_schema.innodb_sys_columns having len = 8)



 Comments   
Comment by Nayuta Yanagisawa (Inactive) [ 2021-02-24 ]

Since the following code was committed, the tests started failing https://github.com/MariaDB/server/commit/4e503aec7feaeb2297035f565ca92c98d4557577

Comment by Nayuta Yanagisawa (Inactive) [ 2021-03-06 ]

serg I created a pull request that fixes the bug. Cloud you take a look at it? https://github.com/MariaDB/server/pull/1768

Generated at Thu Feb 08 09:33:18 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.