InnoDB: Error: row_search_for_mysql() is called without ha_innobase::external_lock() in maria-5.3
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MariaDB |
Invalid
|
Undecided
|
Sergey Petrunia |
Bug Description
The following query causes the following Innodb errors to be printed in the log:
InnoDB: Error: row_search_
110415 13:32:28 [ERROR] trx->active_flag & TRX_ACTIVE_
The query then crashes with bug https:/
IF the innodb error is converted to an assertion, the backtrace is as follows:
#8 0x006b0d98 in __assert_fail () from /lib/libc.so.6
#9 0x086c8f8d in row_search_
#10 0x0866d4eb in ha_innobase:
at handler/
#11 0x0866e008 in ha_innobase:
#12 0x0866e247 in ha_innobase:
#13 0x081b41ae in handler:
#14 0x083cbfa5 in rr_sequential (info=0xb6c3694c) at records.cc:399
#15 0x0832ad47 in join_init_
#16 0x0832923e in sub_select (join=0xb6c31470, join_tab=
#17 0x083298fe in evaluate_
#18 0x08329291 in sub_select (join=0xb6c31470, join_tab=
#19 0x08328b38 in do_select (join=0xb6c31470, fields=0xb6c15eac, table=0x0, procedure=0x0) at sql_select.cc:13945
#20 0x0830ea2b in JOIN::exec (this=0xb6c31470) at sql_select.cc:2486
#21 0x0823f451 in subselect_
#22 0x082399ed in Item_subselect:
#23 0x08239c24 in Item_in_
#24 0x0823b672 in Item_in_
#25 0x081d861a in Item::val_
#26 0x082046f0 in Item_in_
#27 0x08328aff in do_select (join=0xb6c2c5e0, fields=0xb6c3137c, table=0x0, procedure=0x0) at sql_select.cc:13942
#28 0x0830ea2b in JOIN::exec (this=0xb6c2c5e0) at sql_select.cc:2486
#29 0x0830f258 in mysql_select (thd=0xb34e5b0, rref_pointer_
order=0x0, group=0xb6c24078, having=0x0, proc_param=0x0, select_
at sql_select.cc:2707
#30 0x083078a7 in handle_select (thd=0xb34e5b0, lex=0xb34fc50, result=0xb6c24128, setup_tables_
#31 0x082a4cc8 in execute_
#32 0x0829bb3a in mysql_execute_
#33 0x082a726e in mysql_parse (thd=0xb34e5b0,
rawbuf=
#34 0x082997c0 in dispatch_command (command=COM_QUERY, thd=0xb34e5b0, packet=0xb3a4281 "", packet_length=243) at sql_parse.cc:1211
#35 0x08298c6d in do_command (thd=0xb34e5b0) at sql_parse.cc:904
#36 0x08295d20 in handle_
#37 0x00821919 in start_thread () from /lib/libpthread
#38 0x0076acce in clone () from /lib/libc.so.6
explain:
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY alias2 system NULL NULL NULL NULL 1 Using temporary; Using filesort
1 PRIMARY alias1 ALL NULL NULL NULL NULL 1
1 PRIMARY alias3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join)
2 DEPENDENT SUBQUERY SQ4_alias1 ALL NULL NULL NULL NULL 2 Using where
2 DEPENDENT SUBQUERY SQ4_alias3 ALL NULL NULL NULL NULL 1 Using where
test case:
--source include/
CREATE TABLE t1 ( f1 int NOT NULL , f10 int) ;
INSERT IGNORE INTO t1 VALUES (25,0),(29,0);
CREATE TABLE t2 ( f10 int) ENGINE=InnoDB;
CREATE TABLE t3 ( f11 int) ;
INSERT IGNORE INTO t3 VALUES (0);
SELECT alias1.f10 AS field2
FROM t2 AS alias1
JOIN (
t3 AS alias2
JOIN t1 AS alias3
ON alias3.f10
) ON alias3.f1
WHERE alias2.f11 IN (
SELECT SQ4_alias1.f10
FROM t1 AS SQ4_alias1
LEFT JOIN t2 AS SQ4_alias3 ON SQ4_alias3.f10
)
GROUP BY field2 ;
Changed in maria: | |
milestone: | none → 5.3 |
No longer reproducible with the latest 5.3 as of 14-06-2011, however
this bug is possibly related to semijoin+outer join, thus assigning to
SergeyP so he can add the test case where appropriate.