#7 0x00007fa6ed15b1d2 in __assert_fail () from /lib64/libc.so.6
#8 0x00000000007fbd04 in Item_direct_view_ref::used_tables (this=0x7fa6e87acd38) at /src/5.5/sql/item.cc:9873
#9 0x00000000007638a3 in get_bound_sj_equalities (sj_nest=0x7fa6e87acec0, remaining_tables=3) at /src/5.5/sql/opt_subselect.cc:3196
#10 0x00000000006917d3 in Loose_scan_opt::init (this=0x7fa6eeba93c0, join=0x7fa6e87c63b0, s=0x7fa6e87c7830, remaining_tables=3) at /src/5.5/sql/opt_subselect.h:133
#11 0x000000000065fe10 in best_access_path (join=0x7fa6e87c63b0, s=0x7fa6e87c7830, remaining_tables=3, idx=0, disable_jbuf=true, record_count=1, pos=0x7fa6e87c7d78, loose_scan_pos=0x7fa6eeba95a0) at /src/5.5/sql/sql_select.cc:5435
#12 0x00000000006637c8 in best_extension_by_limited_search (join=0x7fa6e87c63b0, remaining_tables=3, idx=0, record_count=1, read_time=0, search_depth=62, prune_level=1) at /src/5.5/sql/sql_select.cc:7029
#13 0x0000000000662b73 in greedy_search (join=0x7fa6e87c63b0, remaining_tables=3, search_depth=62, prune_level=1) at /src/5.5/sql/sql_select.cc:6620
#14 0x0000000000662209 in choose_plan (join=0x7fa6e87c63b0, join_tables=3) at /src/5.5/sql/sql_select.cc:6207
#15 0x000000000065bc83 in make_join_statistics (join=0x7fa6e87c63b0, tables_list=..., conds=0x7fa6e87c7280, keyuse_array=0x7fa6e87c66c8) at /src/5.5/sql/sql_select.cc:3800
#16 0x0000000000652be0 in JOIN::optimize (this=0x7fa6e87c63b0) at /src/5.5/sql/sql_select.cc:1229
#18 0x000000000064fed1 in handle_select (thd=0x7fa6eb7c3a20, lex=0x7fa6e87c8880, result=0x7fa6e87aa040, setup_tables_done_option=0) at /src/5.5/sql/sql_select.cc:319
#19 0x0000000000629364 in execute_sqlcom_select (thd=0x7fa6eb7c3a20, all_tables=0x7fa6e87c9dc8) at /src/5.5/sql/sql_parse.cc:4689
#20 0x0000000000622697 in mysql_execute_command (thd=0x7fa6eb7c3a20) at /src/5.5/sql/sql_parse.cc:2234
#21 0x00000000006435be in Prepared_statement::execute (this=0x7fa6e87b3060, expanded_query=0x7fa6eebaad00, open_cursor=false) at /src/5.5/sql/sql_prepare.cc:3930
#22 0x00000000006426fb in Prepared_statement::execute_loop (this=0x7fa6e87b3060, expanded_query=0x7fa6eebaad00, open_cursor=false, packet=0x0, packet_end=0x0) at /src/5.5/sql/sql_prepare.cc:3589
#23 0x0000000000640833 in mysql_sql_stmt_execute (thd=0x7fa6eb7c3a20) at /src/5.5/sql/sql_prepare.cc:2738
#24 0x00000000006226c5 in mysql_execute_command (thd=0x7fa6eb7c3a20) at /src/5.5/sql/sql_parse.cc:2244
#25 0x000000000062be44 in mysql_parse (thd=0x7fa6eb7c3a20, rawbuf=0x7fa6e87c6078 "EXECUTE stmt", length=12, parser_state=0x7fa6eebab650) at /src/5.5/sql/sql_parse.cc:5914
#26 0x000000000061fc36 in dispatch_command (command=COM_QUERY, thd=0x7fa6eb7c3a20, packet=0x7fa6e8d4f361 "EXECUTE stmt", packet_length=12) at /src/5.5/sql/sql_parse.cc:1079
#27 0x000000000061edc9 in do_command (thd=0x7fa6eb7c3a20) at /src/5.5/sql/sql_parse.cc:793
#28 0x000000000072185f in do_handle_one_connection (thd_arg=0x7fa6eb7c3a20) at /src/5.5/sql/sql_connect.cc:1269
#29 0x00000000007215ec in handle_one_connection (arg=0x7fa6eb7c3a20) at /src/5.5/sql/sql_connect.cc:1185
#30 0x0000000000c8b271 in pfs_spawn_thread (arg=0x7fa6eb7f3140) at /src/5.5/storage/perfschema/pfs.cc:1015
#31 0x00007fa6ee8230a4 in start_thread () from /lib64/libpthread.so.0
#32 0x00007fa6ed21204d in clone () from /lib64/libc.so.6
The problem appeared in 5.5 tree with this revision:
commit 54b998173b128bb8362b5dbafbd66c4199776937
Author: Oleksandr Byelkin <sanja@mariadb.com>
Date: Thu Apr 23 20:08:57 2015 +0200
MDEV-7846: Server crashes in Item_subselect::fix_fields or fails with Thread stack overrun
Substitute into transformed subselects original left expression and than register its change in case it was substituted.
MDEV-9619: Assertion `null_ref_table' failed in virtual table_map Item_direct_view_ref::used_tables() const on 2nd execution of PS
Refer left expression indirectly in case it changes from execution to execution.
—
Oleksandr Byelkin
added a comment - revision-id: e0a1e632e4e6084cd989f217943618f4e9ac9179 (mariadb-5.5.54-25-ge0a1e63)
parent(s): 29d78dbb44ee9890b6bc28873344f20fc9157928
committer: Oleksandr Byelkin
timestamp: 2017-02-18 17:47:31 +0100
message:
MDEV-9619 : Assertion `null_ref_table' failed in virtual table_map Item_direct_view_ref::used_tables() const on 2nd execution of PS
Refer left expression indirectly in case it changes from execution to execution.
—
MDEV-9619: Assertion `null_ref_table' failed in virtual table_map Item_direct_view_ref::used_tables() const on 2nd execution of PS
Refer left expression indirectly in case it changes from execution to execution.
—
Oleksandr Byelkin
added a comment - revision-id: ffa50282e2ba147019e77972ae14972d77a0354b (mariadb-5.5.54-30-gffa5028)
parent(s): 5ddfcb05ca98a62b01da1c8b939e5303f900a5cc
committer: Oleksandr Byelkin
timestamp: 2017-02-22 14:17:27 +0100
message:
MDEV-9619 : Assertion `null_ref_table' failed in virtual table_map Item_direct_view_ref::used_tables() const on 2nd execution of PS
Refer left expression indirectly in case it changes from execution to execution.
—
MDEV-9619: Assertion `null_ref_table' failed in virtual table_map Item_direct_view_ref::used_tables() const on 2nd execution of PS
Refer left expression indirectly in case it changes from execution to execution.
—
Oleksandr Byelkin
added a comment - revision-id: 144b1552d2c3dced53d8e111e213117861ff8b95 (mariadb-5.5.54-38-g144b155)
parent(s): ac78927aefa2bd0d869d999839480d69086a9882
committer: Oleksandr Byelkin
timestamp: 2017-02-27 12:37:32 +0100
message:
MDEV-9619 : Assertion `null_ref_table' failed in virtual table_map Item_direct_view_ref::used_tables() const on 2nd execution of PS
Refer left expression indirectly in case it changes from execution to execution.
—
It looks like f1 lost its NULL reference table