Bug #25555 Falcon: crash if create index on nullable utf8 column
Submitted: 11 Jan 2007 20:12 Modified: 25 Jan 2007 15:40
Reporter: Peter Gulutzan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Falcon storage engine Severity:S3 (Non-critical)
Version:5.2.1-falcon-alpha-debug OS:Linux (SUSE 10.0 / 64-bit)
Assigned to: Kevin Lewis CPU Architecture:Any

[11 Jan 2007 20:12] Peter Gulutzan
Description:
I create a table with a nullable utf8 column.
I insert two rows.
I try to create an index.
Crash.

How to repeat:
mysql> create database d5;
Query OK, 1 row affected (0.00 sec)

mysql> use d5
Database changed
mysql> create table tg (s1 char(5) character set utf8) engine=falcon;
Query OK, 0 rows affected (0.21 sec)

mysql> insert into tg values ('a'),(null);
Query OK, 2 rows affected (0.00 sec)
Records: 2  Duplicates: 0  Warnings: 0

mysql> create index ig on tg (s1);
ERROR 2013 (HY000): Lost connection to MySQL server during query
[11 Jan 2007 22:58] Hakan Küçükyılmaz
We are hitting the same assertion as in BUG#25474 here.

(gdb) bt
#0  0xffffe410 in __kernel_vsyscall ()
#1  0x40182541 in raise () from /lib/tls/libc.so.6
#2  0x0844f846 in Error::debugBreak () at Error.cpp:93
#3  0x0844f8a3 in Error::error (string=0x875aa78 "assertion failed at line %d in file %s\n") at Error.cpp:70
#4  0x0844f933 in Error::assertionFailed (fileName=0x875c28a "IndexRootPage.cpp", line=983) at Error.cpp:77
#5  0x08462da7 in IndexRootPage::indexMerge (dbb=0x402f9b3c, indexId=29, logRecord=0x42b632a4, transId=0)
    at IndexRootPage.cpp:983
#6  0x084b4646 in SRLUpdateIndex::execute (this=0x42b632a4) at SRLUpdateIndex.cpp:155
#7  0x084b46c3 in SRLUpdateIndex::commit (this=0x42b632a4) at SRLUpdateIndex.cpp:135
#8  0x0849e01f in SerialLogTransaction::commit (this=0x40322540) at SerialLogTransaction.cpp:62
#9  0x0849e310 in SerialLogTransaction::doAction (this=0x40322540) at SerialLogTransaction.cpp:119
#10 0x08498616 in SerialLog::gopherThread (this=0x41594614) at SerialLog.cpp:156
#11 0x08498736 in SerialLog::gopherThread (arg=0x41594614) at SerialLog.cpp:121
#12 0x0841d3f1 in Thread::thread (this=0x40300ad8) at Thread.cpp:162
#13 0x0841d8b1 in Thread::thread (parameter=0x40300ad8) at Thread.cpp:139
#14 0x40284297 in start_thread () from /lib/tls/libpthread.so.0
#15 0x4021937e in clone () from /lib/tls/libc.so.6
#16 0x42b63bb0 in ?? ()
(gdb) f 4
#4  0x0844f933 in Error::assertionFailed (fileName=0x875c28a "IndexRootPage.cpp", line=983) at Error.cpp:77
77              error ("assertion failed at line %d in file %s\n", line, fileName);
(gdb) f 5
#5  0x08462da7 in IndexRootPage::indexMerge (dbb=0x402f9b3c, indexId=29, logRecord=0x42b632a4, transId=0)
    at IndexRootPage.cpp:983
983                                     ASSERT(false);
(gdb) l
978
979                             // If the key is out of order, somebody screwed up.  Punt out of here
980
981                             if (key.compare(&priorKey) > 0)
982                                     //break;
983                                     ASSERT(false);
984
985                             // Find the next insertion point, compute the next key, etc.
986
987                             bucketEnd = (Btn*) ((char*) page + page->length);

Regards, Hakan
[12 Jan 2007 20:30] Kevin Lewis
I cannot reproduce this on Windows.
[23 Jan 2007 1:31] Hakan Küçükyılmaz
Tried with latest change set 1.2418, 2007-01-20 on Linux 32-bit. Still hitting the same assertion:

Program received signal SIGILL, Illegal instruction.
[Switching to Thread 1119239088 (LWP 13463)]
0xffffe410 in __kernel_vsyscall ()
(gdb) bt
#0  0xffffe410 in __kernel_vsyscall ()
#1  0x40182541 in raise () from /lib/tls/libc.so.6
#2  0x08450952 in Error::debugBreak () at Error.cpp:93
#3  0x084509af in Error::error (string=0x875c3f8 "assertion failed at line %d in file %s\n")
    at Error.cpp:70
#4  0x08450a3f in Error::assertionFailed (fileName=0x875dc06 "IndexRootPage.cpp", line=1013)
    at Error.cpp:77
#5  0x084642b7 in IndexRootPage::indexMerge (dbb=0x402f9b24, indexId=29, logRecord=0x42b632a4,
    transId=0) at IndexRootPage.cpp:1013
#6  0x084b5d96 in SRLUpdateIndex::execute (this=0x42b632a4) at SRLUpdateIndex.cpp:155
#7  0x084b5e13 in SRLUpdateIndex::commit (this=0x42b632a4) at SRLUpdateIndex.cpp:135
#8  0x0849f657 in SerialLogTransaction::commit (this=0x4031d8a0) at SerialLogTransaction.cpp:70
#9  0x0849f948 in SerialLogTransaction::doAction (this=0x4031d8a0) at SerialLogTransaction.cpp:127
#10 0x08499be6 in SerialLog::gopherThread (this=0x41594614) at SerialLog.cpp:156
#11 0x08499d06 in SerialLog::gopherThread (arg=0x41594614) at SerialLog.cpp:121
#12 0x0841df81 in Thread::thread (this=0x40300b08) at Thread.cpp:162
#13 0x0841e441 in Thread::thread (parameter=0x40300b08) at Thread.cpp:139
#14 0x40284297 in start_thread () from /lib/tls/libpthread.so.0
#15 0x4021937e in clone () from /lib/tls/libc.so.6
#16 0x42b63bb0 in ?? ()

Regards, Hakan
[25 Jan 2007 15:40] Hakan Küçükyılmaz
falcon_bug_25555 passes now:

=======================================================
Starting Tests in the 'main' suite

TEST                           RESULT         TIME (ms)
-------------------------------------------------------

falcon_bug_25555               [ pass ]            858
-------------------------------------------------------
Stopping All Servers
All 1 tests were successful.
The servers were restarted 1 times
Spent 0.858 seconds actually executing testcases

Regards, Hakan