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`)))
|
Attachments
Issue Links
- is duplicated by
-
MDEV-16681 [draft] Assertion `inited==NONE || (inited==RND && scan)' failed
-
- Closed
-
- relates to
-
MDEV-17676 Assertion `inited==NONE || (inited==RND && scan)' failed in handler::ha_rnd_init
-
- Closed
-
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:
--source include/have_innodb.inc
) ENGINE=InnoDB;
EXPLAIN:
EXPLAIN EXTENDED
SELECT * FROM t1 AS t1_1, t1 AS t1_2, t2
WHERE f5 = t1_2.f2 AND ( t1_1.f1 = 103 AND t1_1.f2 = 'o' OR t1_1.pk < f4 );
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 2 100.00 Using where
1 SIMPLE t1_2 ref f2 f2 2 test.t2.f5 1 100.00
1 SIMPLE t1_1 ALL PRIMARY,f1,f2 NULL NULL NULL 19 100.00 Range checked for each record (index map: 0x7)
Warnings:
Note 1003 select `test`.`t1_1`.`pk` AS `pk`,`test`.`t1_1`.`f1` AS `f1`,`test`.`t1_1`.`f2` AS `f2`,`test`.`t1_1`.`f3` AS `f3`,`test`.`t1_2`.`pk` AS `pk`,`test`.`t1_2`.`f1` AS `f1`,`test`.`t1_2`.`f2` AS `f2`,`test`.`t1_2`.`f3` AS `f3`,`test`.`t2`.`f4` AS `f4`,`test`.`t2`.`f5` AS `f5` from `test`.`t1` `t1_1` join `test`.`t1` `t1_2` join `test`.`t2` where ((`test`.`t1_2`.`f2` = `test`.`t2`.`f5`) and (((`test`.`t1_1`.`f1` = 103) and (`test`.`t1_1`.`f2` = 'o')) or (`test`.`t1_1`.`pk` < `test`.`t2`.`f4`)))
#6 0x00007f3f7cace6f1 in *__GI___assert_fail (assertion=0xf177c0 "inited==NONE || (inited==RND && scan)", file=<optimized out>, line=2620, function=0xf1abf0 "int handler::ha_rnd_init(bool)") at assert.c:81
#7 0x0000000000610f44 in handler::ha_rnd_init (this=0x7f3f69fce088, scan=false) at 10.0/sql/handler.h:2620
#8 0x000000000086b16d in handler::ha_rnd_init_with_error (this=0x7f3f69fce088, scan=false) at 10.0/sql/handler.cc:2720
#9 0x0000000000975312 in QUICK_ROR_INTERSECT_SELECT::init_ror_merged_scan (this=0x7f3f69c5a200, reuse_handler=true, alloc=0x7f3f69c5a260) at 10.0/sql/opt_range.cc:2220
#10 0x00000000009753d9 in QUICK_ROR_INTERSECT_SELECT::reset (this=0x7f3f69c5a200) at 10.0/sql/opt_range.cc:2241
#11 0x00000000006d9add in join_init_read_record (tab=0x7f3f69df18d8) at 10.0/sql/sql_select.cc:18490
#12 0x00000000006d98ea in join_init_quick_read_record (tab=0x7f3f69df18d8) at 10.0/sql/sql_select.cc:18452
#13 0x00000000006d7b17 in sub_select (join=0x7f3f69f55720, join_tab=0x7f3f69df18d8, end_of_records=false) at 10.0/sql/sql_select.cc:17604
#14 0x00000000006d8280 in evaluate_join_record (join=0x7f3f69f55720, join_tab=0x7f3f69df15b0, error=0) at 10.0/sql/sql_select.cc:17829
#15 0x00000000006d7b79 in sub_select (join=0x7f3f69f55720, join_tab=0x7f3f69df15b0, end_of_records=false) at 10.0/sql/sql_select.cc:17607
#16 0x00000000006d8280 in evaluate_join_record (join=0x7f3f69f55720, join_tab=0x7f3f69df1288, error=0) at 10.0/sql/sql_select.cc:17829
#17 0x00000000006d7d0b in sub_select (join=0x7f3f69f55720, join_tab=0x7f3f69df1288, end_of_records=false) at 10.0/sql/sql_select.cc:17646
#18 0x00000000006d73de in do_select (join=0x7f3f69f55720, fields=0x7f3f7121f580, table=0x0, procedure=0x0) at 10.0/sql/sql_select.cc:17269
#19 0x00000000006b4d18 in JOIN::exec_inner (this=0x7f3f69f55720) at 10.0/sql/sql_select.cc:3079
#20 0x00000000006b222a in JOIN::exec (this=0x7f3f69f55720) at 10.0/sql/sql_select.cc:2369
#21 0x00000000006b55ad in mysql_select (thd=0x7f3f7121b070, rref_pointer_array=0x7f3f7121f6e0, tables=0x7f3f69da2340, wild_num=1, fields=..., conds=0x7f3f69f55528, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f3f69f55700, unit=0x7f3f7121ed80, select_lex=0x7f3f7121f468) at 10.0/sql/sql_select.cc:3307
#22 0x00000000006abb8f in handle_select (thd=0x7f3f7121b070, lex=0x7f3f7121ecb8, result=0x7f3f69f55700, setup_tables_done_option=0) at 10.0/sql/sql_select.cc:372
#23 0x000000000068087b in execute_sqlcom_select (thd=0x7f3f7121b070, all_tables=0x7f3f69da2340) at 10.0/sql/sql_parse.cc:5266
#24 0x0000000000678bd7 in mysql_execute_command (thd=0x7f3f7121b070) at 10.0/sql/sql_parse.cc:2552
#25 0x0000000000683005 in mysql_parse (thd=0x7f3f7121b070, rawbuf=0x7f3f69da2088 "SELECT * FROM t1 AS t1_1, t1 AS t1_2, t2\nWHERE f5 = t1_2.f2 AND ( t1_1.f1 = 103 AND t1_1.f2 = 'o' OR t1_1.pk < f4 )", length=115, parser_state=0x7f3f7ea4e610) at 10.0/sql/sql_parse.cc:6412
#26 0x0000000000675e78 in dispatch_command (command=COM_QUERY, thd=0x7f3f7121b070, packet=0x7f3f76655071 "", packet_length=115) at 10.0/sql/sql_parse.cc:1307
#27 0x000000000067521d in do_command (thd=0x7f3f7121b070) at 10.0/sql/sql_parse.cc:1004
#28 0x0000000000791512 in do_handle_one_connection (thd_arg=0x7f3f7121b070) at 10.0/sql/sql_connect.cc:1379
#29 0x0000000000791265 in handle_one_connection (arg=0x7f3f7121b070) at 10.0/sql/sql_connect.cc:1293
#30 0x0000000000cc4112 in pfs_spawn_thread (arg=0x7f3f7664d0f0) at 10.0/storage/perfschema/pfs.cc:1860
#31 0x00007f3f7e687b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
#32 0x00007f3f7cb7f20d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
Stack trace from:
revision-id: jplindst@mariadb.org-20140825103533-p9jodvh91r9tueo1
revno: 4362
branch-nick: 10.0