Details
Description
mysqld: 10.0/sql/handler.h:2620: int handler::ha_rnd_init(bool): Assertion `inited==NONE || (inited==RND && scan)' failed.
#6 0x00007f05b1003621 in *__GI___assert_fail (assertion=0xf150a0 "inited==NONE || (inited==RND && scan)", file=<optimized out>, line=2620, function=0xf18450 "int handler::ha_rnd_init(bool)") at assert.c:81 #7 0x00000000006108fa in handler::ha_rnd_init (this=0x7f059ddc9088, scan=false) at 10.0/sql/handler.h:2620 #8 0x000000000086abcd in handler::ha_rnd_init_with_error (this=0x7f059ddc9088, scan=false) at 10.0/sql/handler.cc:2708 #9 0x0000000000974b72 in QUICK_ROR_INTERSECT_SELECT::init_ror_merged_scan (this=0x7f059dc433c0, reuse_handler=true, alloc=0x7f059dc43420) at 10.0/sql/opt_range.cc:2184 #10 0x0000000000974c39 in QUICK_ROR_INTERSECT_SELECT::reset (this=0x7f059dc433c0) at 10.0/sql/opt_range.cc:2205 #11 0x00000000006d92e6 in join_init_read_record (tab=0x7f059de796d8) at 10.0/sql/sql_select.cc:18475 #12 0x00000000006d90f3 in join_init_quick_read_record (tab=0x7f059de796d8) at 10.0/sql/sql_select.cc:18437 #13 0x00000000006d7320 in sub_select (join=0x7f059dd5b7c8, join_tab=0x7f059de796d8, end_of_records=false) at 10.0/sql/sql_select.cc:17589 #14 0x00000000007cbd76 in JOIN_CACHE::generate_full_extensions (this=0x7f059de7c590, rec_ptr=0x7f059dee1086 "\372\a") at 10.0/sql/sql_join_cache.cc:2403 #15 0x00000000007cbab4 in JOIN_CACHE::join_matching_records (this=0x7f059de7c590, skip_last=false) at 10.0/sql/sql_join_cache.cc:2295 #16 0x00000000007cb511 in JOIN_CACHE::join_records (this=0x7f059de7c590, skip_last=false) at 10.0/sql/sql_join_cache.cc:2092 #17 0x00000000006d6f3f in sub_select_cache (join=0x7f059dd5b7c8, join_tab=0x7f059de793b0, end_of_records=true) at 10.0/sql/sql_select.cc:17376 #18 0x00000000006d714c in sub_select (join=0x7f059dd5b7c8, join_tab=0x7f059de79088, end_of_records=true) at 10.0/sql/sql_select.cc:17546 #19 0x00000000006d6c34 in do_select (join=0x7f059dd5b7c8, fields=0x7f05aaf63588, table=0x0, procedure=0x0) at 10.0/sql/sql_select.cc:17257 #20 0x00000000006b456e in JOIN::exec_inner (this=0x7f059dd5b7c8) at 10.0/sql/sql_select.cc:3076 #21 0x00000000006b1a80 in JOIN::exec (this=0x7f059dd5b7c8) at 10.0/sql/sql_select.cc:2366 #22 0x00000000006b4dff in mysql_select (thd=0x7f05aaf5f070, rref_pointer_array=0x7f05aaf636e8, tables=0x7f059dc51360, wild_num=1, fields=..., conds=0x7f059dd5b5f0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f059dd5b7a8, unit=0x7f05aaf62d88, select_lex=0x7f05aaf63470) at 10.0/sql/sql_select.cc:3303 #23 0x00000000006ab3ef in handle_select (thd=0x7f05aaf5f070, lex=0x7f05aaf62cc0, result=0x7f059dd5b7a8, setup_tables_done_option=0) at 10.0/sql/sql_select.cc:372 #24 0x00000000006801a5 in execute_sqlcom_select (thd=0x7f05aaf5f070, all_tables=0x7f059dc51360) at 10.0/sql/sql_parse.cc:5263 #25 0x000000000067859c in mysql_execute_command (thd=0x7f05aaf5f070) at 10.0/sql/sql_parse.cc:2554 #26 0x000000000068292f in mysql_parse (thd=0x7f05aaf5f070, rawbuf=0x7f059dc51088 "SELECT * FROM t1 AS t1_1, t1 AS t1_2, t1 AS t1_3\nWHERE t1_3.a = t1_2.a AND ( t1_1.c = t1_2.c AND t1_1.a = 219 OR t1_1.a < t1_3.b )", length=130, parser_state=0x7f05b2f81610) at 10.0/sql/sql_parse.cc:6409 #27 0x000000000067583d in dispatch_command (command=COM_QUERY, thd=0x7f05aaf5f070, packet=0x7f05a53fa071 "", packet_length=130) at 10.0/sql/sql_parse.cc:1309 #28 0x0000000000674be2 in do_command (thd=0x7f05aaf5f070) at 10.0/sql/sql_parse.cc:1006 #29 0x0000000000790ab5 in do_handle_one_connection (thd_arg=0x7f05aaf5f070) at 10.0/sql/sql_connect.cc:1379 #30 0x0000000000790808 in handle_one_connection (arg=0x7f05aaf5f070) at 10.0/sql/sql_connect.cc:1293 #31 0x0000000000cc22f6 in pfs_spawn_thread (arg=0x7f05a5287df0) at 10.0/storage/perfschema/pfs.cc:1860 #32 0x00007f05b2bbab50 in start_thread (arg=<optimized out>) at pthread_create.c:304 #33 0x00007f05b10b2a7d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
Stack trace from:
revision-id: knielsen@knielsen-hq.org-20140711100647-nf3rdaf5ep26pgty revno: 4290 branch-nick: 10.0
The failure appeared in 10.0 tree from the following revision:
revno: 4154 revision-id: psergey@askmonty.org-20140418100754-v5b5sdqbavbcznh7 parent: igor@askmonty.org-20140417195353-y3y0mc2prcz1ylhz committer: Sergey Petrunya <psergey@askmonty.org> branch nick: 10.0-cp timestamp: Fri 2014-04-18 14:07:54 +0400 message: MDEV-5963: InnoDB: Assertion failure in file row0sel.cc line 2503 ... - Backport the fix for MySQL Bug#13947868 - Add our testcase (they don't publish theirs)
EXPLAIN:
EXPLAIN EXTENDED SELECT * FROM t1 AS t1_1, t1 AS t1_2, t1 AS t1_3 WHERE t1_3.a = t1_2.a AND ( t1_1.c = t1_2.c AND t1_1.a = 219 OR t1_1.a < t1_3.b ); id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE t1_2 ALL a,c NULL NULL NULL 7 100.00 1 SIMPLE t1_3 ALL a NULL NULL NULL 7 85.71 Using where; Using join buffer (flat, BNL join) 1 SIMPLE t1_1 ALL a,c NULL NULL NULL 7 100.00 Range checked for each record (index map: 0x3) Warnings: Note 1003 select `test`.`t1_1`.`a` AS `a`,`test`.`t1_1`.`b` AS `b`,`test`.`t1_1`.`c` AS `c`,`test`.`t1_2`.`a` AS `a`,`test`.`t1_2`.`b` AS `b`,`test`.`t1_2`.`c` AS `c`,`test`.`t1_3`.`a` AS `a`,`test`.`t1_3`.`b` AS `b`,`test`.`t1_3`.`c` AS `c` from `test`.`t1` `t1_1` join `test`.`t1` `t1_2` join `test`.`t1` `t1_3` where ((`test`.`t1_3`.`a` = `test`.`t1_2`.`a`) and (((`test`.`t1_1`.`c` = `test`.`t1_2`.`c`) and (`test`.`t1_1`.`a` = 219)) or (`test`.`t1_1`.`a` < `test`.`t1_3`.`b`)))
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
I've just noticed I missed the actual test case in the bug description. I don't have the original one, so here is a new one:
EXPLAIN:
Stack trace from: