<multi-table> mysqld: sql_update.cc:1358: virtual int multi_update::prepare(List<Item>&, SELECT_LEX_UNIT*): Assertion `table->read_set == &table->def_read_set' failed in maria-5.3-mwl106
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MariaDB |
Fix Released
|
Critical
|
Igor Babaev |
Bug Description
Not repeatable in maria-5.3.
Backtrace:
mysqld: sql_update.cc:1358: virtual int multi_update:
#8 0x006b0d98 in __assert_fail () from /lib/libc.so.6
#9 0x0836768e in multi_update:
#10 0x0831764b in JOIN::prepare (this=0xae6365d8, rref_pointer_
order_init=0x0, group_init=0x0, having_init=0x0, proc_param_
#11 0x0831e408 in mysql_select (thd=0xad56730, rref_pointer_
group=0x0, having=0x0, proc_param=0x0, select_
#12 0x0836727f in mysql_multi_update (thd=0xad56730, table_list=
handle_
#13 0x082ab1d9 in mysql_execute_
#14 0x082b4106 in mysql_parse (thd=0xad56730, rawbuf=0xae5125e0 "UPDATE v2 SET f1 = 2", length=20, found_semicolon
#15 0x082a657b in dispatch_command (command=COM_QUERY, thd=0xad56730, packet=0xadb1231 "UPDATE v2 SET f1 = 2", packet_length=20) at sql_parse.cc:1206
#16 0x082a5a01 in do_command (thd=0xad56730) at sql_parse.cc:904
#17 0x082a2a7c in handle_
#18 0x00821919 in start_thread () from /lib/libpthread
#19 0x0076acce in clone () from /lib/libc.so.6
test case:
CREATE TABLE t1 ( f1 INT );
CREATE TABLE t2 ( f1 INT );
CREATE ALGORITHM=TEMPTABLE VIEW v1 AS SELECT f1 FROM t1;
CREATE VIEW v2 AS SELECT t2.f1 from (t2 JOIN v1);
UPDATE v2 SET f1 = 2;
bzr version-info
revision-id: <email address hidden>
date: 2011-06-09 00:13:00 -0700
build-date: 2011-06-09 10:53:16 +0300
revno: 3029
branch-nick: maria-5.3-mwl106
backtrace from a slightly older Revno: 3028 Revision-Id: <email address hidden>
#4 <signal handler called>
#5 0x081b6829 in st_table:
#6 0x081b5a42 in st_select_
#7 0x081b5c1e in st_select_
#8 0x0846a97c in mysql_derived_merge (thd=0xac24730, lex=0xac25df0, derived=0xae612f50) at sql_derived.cc:390
#9 0x0846ad72 in mysql_derived_
#10 0x0846a6cf in mysql_handle_
#11 0x08314f7c in TABLE_LIST:
#12 0x0846a747 in mysql_handle_
#13 0x083667fe in mysql_multi_
#14 0x082ab0a8 in mysql_execute_
#15 0x082b419d in mysql_parse (thd=0xac24730, rawbuf=0xae612eb0 "UPDATE v2 SET f1 = 2", length=20, found_semicolon
#16 0x082a657b in dispatch_command (command=COM_QUERY, thd=0xac24730, packet=0xac7f231 "UPDATE v2 SET f1 = 2", packet_length=20) at sql_parse.cc:1206
#17 0x082a5a01 in do_command (thd=0xac24730) at sql_parse.cc:904
#18 0x082a2a7c in handle_
#19 0x00821919 in start_thread () from /lib/libpthread
#20 0x0076acce in clone () from /lib/libc.so.6
Related branches
Changed in maria: | |
assignee: | nobody → Igor Babaev (igorb-seattle) |
milestone: | none → 5.3 |
Changed in maria: | |
status: | New → Confirmed |
importance: | Undecided → Critical |
Changed in maria: | |
status: | Confirmed → In Progress |
summary: |
- mysqld: sql_update.cc:1358: virtual int + <multi-table> mysqld: sql_update.cc:1358: virtual int multi_update::prepare(List<Item>&, SELECT_LEX_UNIT*): Assertion `table->read_set == &table->def_read_set' failed in maria-5.3-mwl106 |
Changed in maria: | |
status: | In Progress → Fix Committed |
Changed in maria: | |
status: | Fix Committed → Fix Released |
If I remove the complaining assert and insert some rows into t1, and t2
INSERT INTO t1 VALUES (20), (7);
INSERT INTO t2 VALUES (7), (9), (7);
I get a crash on the server in fix_semijoin_ strategies_ for_picked_ join_order
in the line:
if ((handled_tabs & s->table->map) || pos->sj_strategy == SJ_OPT_NONE).
I also have a crash in the same line for the the multi-delete statement:
DELETE t1 FROM t1,v2;