Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:
Description
Not repeatable with maria-5.2. Explain also crashes. Setting semijoin=off,materialization=off does not prevent the function from being called. In addition, there are no subqueries in this query and yet SJM is called.
Backtrace:
#4 <signal handler called>
#5 0x083306ad in embedding_sjm (item=0xae623058) at sql_select.cc:10970
#6 0x08330842 in eliminate_item_equal (cond=0x0, upper_levels=0x0, item_equal=0xae6235b8) at sql_select.cc:11062
#7 0x08330ef7 in substitute_for_best_equal_field (cond=0xae6235b8, cond_equal=0x0, table_join_idx=0xae623b98) at sql_select.cc:11263
#8 0x08318a17 in JOIN::optimize (this=0xae6245d8) at sql_select.cc:1196
#9 0x0831e0cb in mysql_select (thd=0x9ca1680, rref_pointer_array=0x9ca3198, tables=0xae6127f8, wild_num=1, fields=..., conds=0xae613820, og_num=0,
order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147764736, result=0xae622958, unit=0x9ca2d9c, select_lex=0x9ca3078)
at sql_select.cc:2871
#10 0x0831601b in handle_select (thd=0x9ca1680, lex=0x9ca2d40, result=0xae622958, setup_tables_done_option=0) at sql_select.cc:283
#11 0x082b174b in execute_sqlcom_select (thd=0x9ca1680, all_tables=0xae6127f8) at sql_parse.cc:5082
#12 0x082a854f in mysql_execute_command (thd=0x9ca1680) at sql_parse.cc:2227
#13 0x082b3d87 in mysql_parse (thd=0x9ca1680,
rawbuf=0xae612618 "SELECT * FROM v1 LEFT JOIN t2 ON t2.f11 = v1.f10 WHERE v1.f3 = 1 OR v1.f10 = 'a' AND v1.f10 IS NULL", length=99,
found_semicolon=0xae7ff228) at sql_parse.cc:6083
#14 0x082a61eb in dispatch_command (command=COM_QUERY, thd=0x9ca1680,
packet=0x9cfc1c9 "SELECT * FROM v1 LEFT JOIN t2 ON t2.f11 = v1.f10 WHERE v1.f3 = 1 OR v1.f10 = 'a' AND v1.f10 IS NULL", packet_length=99)
at sql_parse.cc:1206
#15 0x082a5671 in do_command (thd=0x9ca1680) at sql_parse.cc:904
#16 0x082a26ec in handle_one_connection (arg=0x9ca1680) at sql_connect.cc:1177
#17 0x00821919 in start_thread () from /lib/libpthread.so.0
#18 0x0076acce in clone () from /lib/libc.so.6
test case:
CREATE TABLE t1 ( f3 int, f10 varchar(32)) ;
INSERT INTO t1 VALUES (NULL,'j'),(8,'c');
CREATE VIEW v1 AS SELECT * FROM t1;
CREATE TABLE t2 (f11 varchar(32)) ;
INSERT INTO t2 VALUES ('j'),('c');
SELECT * FROM v1 LEFT JOIN t2 ON t2.f11 = v1.f10 WHERE v1.f3 = 1 OR v1.f10 = 'a' AND v1.f10 IS NULL;
bzr version-info:
revision-id: <email address hidden>
date: 2011-06-15 21:48:38 -0700
build-date: 2011-06-17 13:21:12 +0300
revno: 3049
branch-nick: maria-5.3
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
Re: Crash in embedding_sjm with view in maria-5.3
The bug is reproducible with revno: 3048, i.e. without the code from mwl#106.
Most probably it is reproducible with earliest builds as well.