Bug #9217 Test "ctype_ujis" causes an InnoDB assertion failure
Submitted: 16 Mar 2005 10:03 Modified: 16 Mar 2005 21:49
Reporter: Lenz Grimmer Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:5.0.3-pre OS:Linux (Linux/PPC)
Assigned to: Heikki Tuuri CPU Architecture:Any

[16 Mar 2005 10:03] Lenz Grimmer
Description:
Last ChangeSet in this tree:

ChangeSet@1.1820, 2005-03-16 09:23:38+01:00, kent@mysql.com
  mysql-test-run.sh:
    Check that there is a disabled.def before using it
  disabled.def:
    Reenable ndb tests accidently disabled

Complied on Linux/PPC (Debian 3.1) using BUILD/compile-ppc-debug

The "ctype_ujis" test causes the server to crash:

TEST                            RESULT
-------------------------------------------------------
ctype_ujis                     [ fail ]

Errors are (from /home/lenz/my/mysql-5.0-build/mysql-test/var/log/mysqltest-time) :
/home/lenz/my/mysql-5.0-build/client/.libs/mysqltest: At line 102: query 'SELECT t1.* FROM t1 WHEREb='aaabbbcccddd' ORDER BY a' failed: 2013: Lost connection to MySQL server during query
(the last lines may be the most important ones)

From var/log/master.err:

050316 12:58:49InnoDB: Assertion failure in thread 147466 in file row0sel.c line 2081
InnoDB: Failing assertion: dict_col_get_type(field->col)->mtype == dfield_get_type(dfield)->mtype

Run in GBD:

050316 13:02:16InnoDB: Assertion failure in thread 147466 in file row0sel.c line 2081
InnoDB: Failing assertion: dict_col_get_type(field->col)->mtype == dfield_get_type(dfield)->mtype
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/mysql/en/Forcing_recovery.html
InnoDB: about forcing recovery.

Program received signal SIGSEGV, Segmentation fault.
0x102d9730 in row_sel_convert_mysql_key_to_innobase (tuple=0x300bc468, 
    buf=0x10cab646 '¥' <repeats 200 times>..., buf_len=236, index=0x300bce68, 
    key_ptr=0x31c9a0ae "", key_len=32, trx=0x300b8068) at row0sel.c:2080
2080                    ut_a(dict_col_get_type(field->col)->mtype

(gdb) where
#0  0x102d9730 in row_sel_convert_mysql_key_to_innobase (tuple=0x300bc468, 
    buf=0x10cab646 '¥' <repeats 200 times>..., buf_len=236, index=0x300bce68, 
    key_ptr=0x31c9a0ae "", key_len=32, trx=0x300b8068) at row0sel.c:2080
#1  0x1023ef60 in ha_innobase::records_in_range (this=0x10caae30, 
    keynr=281718204, min_key=0x31c99cd0, max_key=0x31c99ce0)
    at ha_innodb.cc:4672
#2  0x1021e06c in check_quick_keys (param=0x31c99e50, idx=0, 
    key_tree=0x10cabda0, min_key=0x31c9a090 "\003", min_key_flag=0, 
    max_key=0x31c9a78e "\036", max_key_flag=0) at opt_range.cc:5188
#3  0x1021d70c in check_quick_select (param=0x31c99e50, idx=0, tree=0x10cabda0)
    at opt_range.cc:5004
#4  0x10218958 in get_key_scans_params (param=0x31c99e50, tree=0x10cabc20, 
    index_read_must_be_used=false, read_time=3.7000000000000002)
    at opt_range.cc:3138
#5  0x10216294 in SQL_SELECT::test_quick_select (this=0x10cae610, 
    thd=0x10c8be68, keys_to_use={map = 2}, prev_tables=281718248, limit=2, 
    force_quick_range=32) at opt_range.cc:1784
#6  0x101badd4 in get_quick_record_count (thd=0x10c8be68, select=0x10cae610, 
    table=0x10c891d0, keys=0x10cae420, limit=4294967295) at sql_select.cc:2094
#7  0x101bb9b0 in make_join_statistics (join=0x10cad338, tables=0x1, 
    conds=0x10cae250, keyuse_array=0x10cae030) at sql_select.cc:2404
#8  0x101b76a0 in JOIN::optimize (this=0x10cad338) at sql_select.cc:636
#9  0x101bab24 in mysql_select (thd=0x10c8be68, rref_pointer_array=0x10c8c1a4, 
    tables=0x10cacf40, wild_num=1, fields=@0x10c8c10c, conds=0x10cad1a8, 
    og_num=1, order=0x10cad2f0, group=0x0, having=0x0, proc_param=0x0, 
    select_options=2156153344, result=0x10cad328, unit=0x10c8bec0, 
    select_lex=0x10c8c0a0) at sql_select.cc:2036
#10 0x101b6924 in handle_select (thd=0x10c8be68, lex=0x10c8beb0, 
    result=0x10cad328, setup_tables_done_option=0) at sql_select.cc:227
#11 0x101882dc in mysql_execute_command (thd=0x10c8be68) at sql_parse.cc:2381
#12 0x1018e578 in mysql_parse (thd=0x10c8be68, inBuf=0x10c8beb0 "\020AÂx", 
    length=0) at sql_parse.cc:5138
#13 0x10186a68 in dispatch_command (command=COM_QUERY, thd=0x10c8be68, 
    packet=0x10c83e21 "SELECT t1.* FROM t1 WHERE b='aaabbbcccddd' ORDER BY a", 
    packet_length=54) at sql_parse.cc:1646
#14 0x10186508 in do_command (thd=0x10c8be68) at sql_parse.cc:1452
#15 0x10185834 in handle_one_connection (arg=0x1) at sql_parse.cc:1109
#16 0x0ff0ce40 in pthread_start_thread () from /lib/libpthread.so.0
#17 0x0ff0ceb8 in pthread_start_thread_event () from /lib/libpthread.so.0
#18 0x0fd6f3b4 in clone () from /lib/libc.so.6
#19 0x0fd6f3b4 in clone () from /lib/libc.so.6

How to repeat:
See above - let me know if you need further info!
[16 Mar 2005 21:48] Heikki Tuuri
Lenz,

we fixed 3 bugs today in true VARCHARs, and the Linux/x86 tests pass, though lock_multi sometimes hangs.

Please test again.

Regards,

Heikki
[16 Mar 2005 21:49] Heikki Tuuri
Hi!

Looking at the assertion failure, this was probably fixed today.

Regards,

Heikki