[MDEV-16043] Assertion `thd->Item_change_list::is_empty()' failed in mysql_parse upon SELECT from a view reading from a versioned table Created: 2018-04-27  Updated: 2018-12-21  Resolved: 2018-05-12

Status: Closed
Project: MariaDB Server
Component/s: Prepared Statements, Versioned Tables, Views
Affects Version/s: 10.3
Fix Version/s: 10.3.7

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Aleksey Midenkov
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Duplicate
is duplicated by MDEV-16042 Server crash or ASAN use-after-poison... Closed
is duplicated by MDEV-16078 Server crashes in Item::delete_self o... Closed
Relates
relates to MDEV-16042 Server crash or ASAN use-after-poison... Closed

 Description   

Note: See also MDEV-16042, the test case is very similar, probably the issues are related..

CREATE OR REPLACE TABLE t1 (a INT) WITH SYSTEM VERSIONING;
CREATE OR REPLACE VIEW v1 AS SELECT * FROM t1;
PREPARE stmt FROM "SELECT * FROM t1 WHERE EXP( '20010609211642053929' )";
--error ER_DATA_OUT_OF_RANGE
EXECUTE stmt;
SELECT a FROM v1;
 
# Cleanup
DROP VIEW v1;
DROP TABLE t1;

10.3 99fa7c6c2f9c

mysqld: /data/src/10.3/sql/sql_parse.cc:8025: void mysql_parse(THD*, char*, uint, Parser_state*, bool, bool): Assertion `thd->Item_change_list::is_empty()' failed.
180427 13:13:36 [ERROR] mysqld got signal 6 ;
 
#7  0x00007fe4e4ce0ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#8  0x0000559672c7f8f3 in mysql_parse (thd=0x7fe4c4000b00, rawbuf=0x7fe4c4124f78 "SELECT a FROM v1", length=16, parser_state=0x7fe4dae715d0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:8025
#9  0x0000559672c6cee9 in dispatch_command (command=COM_QUERY, thd=0x7fe4c4000b00, packet=0x7fe4c4090431 "", packet_length=16, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1846
#10 0x0000559672c6b928 in do_command (thd=0x7fe4c4000b00) at /data/src/10.3/sql/sql_parse.cc:1391
#11 0x0000559672dce88d in do_handle_one_connection (connect=0x559675783ea0) at /data/src/10.3/sql/sql_connect.cc:1402
#12 0x0000559672dce61a in handle_one_connection (arg=0x559675783ea0) at /data/src/10.3/sql/sql_connect.cc:1308
#13 0x0000559673252f27 in pfs_spawn_thread (arg=0x5596758257b0) at /data/src/10.3/storage/perfschema/pfs.cc:1862
#14 0x00007fe4e69b7494 in start_thread (arg=0x7fe4dae72700) at pthread_create.c:333
#15 0x00007fe4e4d9d93f in clone () from /lib/x86_64-linux-gnu/libc.so.6



 Comments   
Comment by Aleksey Midenkov [ 2018-04-28 ]

Analysis

Comment by Aleksey Midenkov [ 2018-05-04 ]

The crash is caused by commit 9477a2a9ba17c0db362e2bb39d5048e369096f39 (return without restore_active_arena()). See details.

Generated at Thu Feb 08 08:25:56 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.