Bug #28053 Falcon crash on multi table update
Submitted: 23 Apr 2007 22:59
Reporter: Hakan Küçükyılmaz Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Falcon storage engine Severity:S3 (Non-critical)
Version:6.0.0-alpha OS:Any
Assigned to: CPU Architecture:Any

[23 Apr 2007 22:59] Hakan Küçükyılmaz
Description:
create table t1 (a int not null, b int, primary key (a));
create table t2 (a int not null, b int, primary key (a));
insert into t1 values (10, 20);
insert into t2 values (10, 20);
update t1, t2 set t1.b = 150, t2.b = t1.b where t2.a = t1.a and t1.a = 10;

How to repeat:
create table t1 (a int not null, b int, primary key (a));
create table t2 (a int not null, b int, primary key (a));
insert into t1 values (10, 20);
insert into t2 values (10, 20);
update t1, t2 set t1.b = 150, t2.b = t1.b where t2.a = t1.a and t1.a = 10;

Program received signal SIGSEGV, Segmentation fault.
0x087185ae in Record::getEncoding (this=0x0, index=0) at Record.cpp:653
653 switch (encoding)
(gdb) where
0 0x087185ae in Record::getEncoding (this=0x0, index=0) at Record.cpp:653
1 0x086bdd56 in StorageTable::getEncoding (this=0x9494e40, fieldIndex=0)
    at StorageTable.cpp:274
0000002 0x086b41b9 in NfsStorageTable::encodeRecord (this=0x9486b08,
    buf=0x9486c28 "&65533;n", updateFlag=true) at ha_falcon.cpp:1288
0000003 0x086b2280 in NfsStorageTable::update_row (this=0x9486b08,
    oldData=0x9486c38 "&65533;n", newData=0x9486c28 "&65533;n") at ha_falcon.cpp:546
0000004 0x0835c4c9 in handler::ha_update_row (this=0x9486b08,
    old_data=0x9486c38 "&65533;n", new_data=0x9486c28 "&65533;n") at handler.cc:3359
0000005 0x083010bf in multi_update::send_data (this=0x9431f10,
    not_used_values=@0x42291760) at sql_update.cc:1416
0000006 0x082e4b7f in end_send (join=0x9431f70, join_tab=0x9498928,
    end_of_records=false) at sql_select.cc:10574
0000007 0x082e2b7a in do_select (join=0x9431f70, fields=0x42291760, table=0x0,
    procedure=0x0) at sql_select.cc:9507
0000008 0x082d1c29 in JOIN::exec (this=0x9431f70) at sql_select.cc:1760
0000009 0x082d2115 in mysql_select (thd=0x93fff98, rref_pointer_array=0x9400390,
    tables=0x9431470, wild_num=0, fields=@0x42291760, conds=0x9431e50,
    og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0,
    select_options=1342177408, result=0x9431f10, unit=0x940003c,
    select_lex=0x940026c) at sql_select.cc:1922
0000010 0x082ffaf6 in mysql_multi_update (thd=0x93fff98, table_list=0x9431470,
    fields=0x94002f4, values=0x94004c8, conds=0x9431e50, options=0,
    handle_duplicates=DUP_ERROR, ignore=false, unit=0x940003c,
    select_lex=0x940026c) at sql_update.cc:1025
0000011 0x0828f5fd in mysql_execute_command (thd=0x93fff98) at sql_parse.cc:3319
0000012 0x08296072 in mysql_parse (thd=0x93fff98,
    inBuf=0x94313c0 "update t1, t2 set t1.b = 150, t2.b = t1.b where t2.a = t1.a
 and t1.a = 10", length=73) at sql_parse.cc:5947
0000013 0x0828bbfd in dispatch_command (command=COM_QUERY, thd=0x93fff98,
    packet=0x9429361 "update t1, t2 set t1.b = 150, t2.b = t1.b where t2.a = t1.
a and t1.a = 10", packet_length=74) at sql_parse.cc:1764
0000014 0x0828b46c in do_command (thd=0x93fff98) at sql_parse.cc:1550
0000015 0x0828a5ea in handle_one_connection (arg=0x93fff98) at sql_parse.cc:1190
0000016 0x40253aa7 in start_thread () from /lib/tls/libpthread.so.0
17 0x401e9c2e in clone () from /lib/tls/libc.so.6
(gdb)
[23 Apr 2007 22:59] Hakan Küçükyılmaz
Test case is falcon_bug_28053.test.