[MDEV-3407] LP:751439 - Assertion `!table->file || table->file->inited == handler::NONE' failed with subquery Created: 2011-04-05  Updated: 2015-02-02  Resolved: 2012-10-04

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Philip Stoev (Inactive) Assignee: Sergei Petrunia
Resolution: Fixed Votes: 0
Labels: Launchpad

Attachments: XML File LPexportBug751439.xml    

 Description   

Repeatable in maria-5.3 and maria-5.3-mwl89 . Not repeatable in maria-5.2 .

backtrace:

mysqld: sql_base.cc:1388: bool close_thread_table(THD*, TABLE**): Assertion `!table->file || table->file->inited == handler::NONE' failed.

#8 0x006b0d98 in __assert_fail () from /lib/libc.so.6
#9 0x082e9a29 in close_thread_table (thd=0xa3c9c08, table_ptr=0xa3c9c54) at sql_base.cc:1388
#10 0x082e94e9 in close_open_tables (thd=0xa3c9c08) at sql_base.cc:1204
#11 0x082e988a in close_thread_tables (thd=0xa3c9c08) at sql_base.cc:1362
#12 0x0829b937 in dispatch_command (command=COM_QUERY, thd=0xa3c9c08, packet=0xa4247d1 "", packet_length=189) at sql_parse.cc:1598
#13 0x08299dbd in do_command (thd=0xa3c9c08) at sql_parse.cc:904
#14 0x08296e70 in handle_one_connection (arg=0xa3c9c08) at sql_connect.cc:1154
#15 0x00821919 in start_thread () from /lib/libpthread.so.0
#16 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 alias3 ALL NULL NULL NULL NULL 2 Using where
1 PRIMARY alias1 ALL NULL NULL NULL NULL 2 Using where
2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where

test case:

CREATE TABLE t1 ( f10 int, f11 int) ;
INSERT IGNORE INTO t1 VALUES (0,0),(0,0);

CREATE TABLE t2 ( f11 int);
INSERT IGNORE INTO t2 VALUES (0),(0);

CREATE TABLE t3 ( f11 int) ;
INSERT IGNORE INTO t3 VALUES (0);

SELECT alias1.f11 AS field2
FROM ( t3 AS alias2 JOIN t1 AS alias3 ON alias3.f10 = 1)
LEFT JOIN ( t2 AS alias1 ) ON alias3.f11 = 1
WHERE alias2.f11 IN ( SELECT f11 FROM t2 )
GROUP BY field2 ;



 Comments   
Comment by Philip Stoev (Inactive) [ 2011-05-03 ]

Re: Assertion `!table->file || table->file->inited == handler::NONE' failed with subquery
Not repeatable with semijoin=off. Igor says it is a LEFT JOIN + SEMIJOIN bug.

Comment by Sergei Petrunia [ 2011-06-15 ]

Re: Assertion `!table->file || table->file->inited == handler::NONE' failed with subquery
Not repeatable with current 5.3-main. (note that this bug was reported before MWL#90 has been pushed into 5.3-main). Added testcase.

Comment by Rasmus Johansson (Inactive) [ 2011-12-13 ]

Launchpad bug id: 751439

Generated at Thu Feb 08 06:48:24 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.