Crash in Field_time_hires::pack_length on CREATE TABLE TIME(3)

Bug #731089 reported by Philip Stoev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MariaDB
Fix Released
Critical
Sergei Golubchik

Bug Description

CREATE TABLE with fields of type TIME(3) or TIME(6) causes the following crash:

#4 <signal handler called>
#5 0x08234df5 in Field_time_hires::pack_length (this=0xb690a398) at field.cc:5495
#6 0x082414de in Field::pack_length_in_rec (this=0xb690a398) at field.h:175
#7 0x085503dc in table2myisam (table_arg=0xb6ae9318, keydef_out=0xb6ae9284, recinfo_out=0xb6ae9280, records_out=0xb6ae9288) at ha_myisam.cc:275
#8 0x08554ff3 in ha_myisam::create (this=0xb690a270, name=0xb6aea0fb "./test/table1_int_autoinc", table_arg=0xb6ae9318, ha_create_info=0xb6aea50c)
    at ha_myisam.cc:1931
#9 0x0838ec3e in handler::ha_create (this=0xb690a270, name=0xb6aea0fb "./test/table1_int_autoinc", form=0xb6ae9318, info=0xb6aea50c) at handler.cc:3403
#10 0x0838f32a in ha_create_table (thd=0xa080090, path=0xb6aea0fb "./test/table1_int_autoinc", db=0xb692bc48 "test",
    table_name=0xb692ba08 "table1_int_autoinc", create_info=0xb6aea50c, update_create_info=false) at handler.cc:3610
#11 0x08347b9a in rea_create_table (thd=0xa080090, path=0xb6aea0fb "./test/table1_int_autoinc", db=0xb692bc48 "test",
    table_name=0xb692ba08 "table1_int_autoinc", create_info=0xb6aea50c, create_fields=..., keys=0, key_info=0xb692be80, file=0xb692bd68) at unireg.cc:421
#12 0x083b1f6f in mysql_create_table_no_lock (thd=0xa080090, db=0xb692bc48 "test", table_name=0xb692ba08 "table1_int_autoinc", create_info=0xb6aea50c,
    alter_info=0xb6aea9d4, internal_tmp_table=false, select_field_count=0) at sql_table.cc:3969
#13 0x083b23be in mysql_create_table (thd=0xa080090, db=0xb692bc48 "test", table_name=0xb692ba08 "table1_int_autoinc", create_info=0xb6aea50c,
    alter_info=0xb6aea9d4, internal_tmp_table=false, select_field_count=0) at sql_table.cc:4066
#14 0x08272b17 in mysql_execute_command (thd=0xa080090) at sql_parse.cc:2791
#15 0x0827c948 in mysql_parse (thd=0xa080090, rawbuf=0xb692b930 "CREATE TABLE `table1_int_autoinc` (\n`col_time_3` time(3)\n)", length=58,
    found_semicolon=0xb6aeb210) at sql_parse.cc:6054
#16 0x0826f2a0 in dispatch_command (command=COM_QUERY, thd=0xa080090, packet=0xa0c5539 "CREATE TABLE `table1_int_autoinc` (\n`col_time_3` time(3)\n)",
    packet_length=58) at sql_parse.cc:1249
#17 0x0826e4d0 in do_command (thd=0xa080090) at sql_parse.cc:889
#18 0x0826c815 in handle_one_connection (arg=0xa080090) at sql_connect.cc:1136
#19 0x00821919 in start_thread () from /lib/libpthread.so.0
#20 0x0076acce in clone () from /lib/libc.so.6

test case:

CREATE TABLE t1 ( f1 time(3) );

Shouldn't such a CREATE TABLE been present in the MTR test suite?

bzr version-info:

[philips@eve mysql-test]$ bzr version-info
revision-id: <email address hidden>
date: 2011-03-07 23:19:26 +0100
build-date: 2011-03-08 08:44:05 +0200
revno: 3540
branch-nick: mysql-5.1-micro

Related branches

Revision history for this message
Philip Stoev (pstoev-askmonty) wrote :

Same applies to TIMESTAMP

Changed in maria:
milestone: none → 5.3
assignee: nobody → Sergei (sergii)
Revision history for this message
Sergei Golubchik (sergii) wrote :

cannot repeat.
and, of course, it is present in the test suite.

Did you try it with a clean build?

Changed in maria:
status: New → Incomplete
Revision history for this message
Philip Stoev (pstoev-askmonty) wrote :

Here is how I can still reproduce it:

 bzr branch lp:~maria-captains/maria/5.1-micro mysql-5.1-micro-pristine

 ./BUILD/compile-pentium-debug-max-no-ndb

execute "CREATE TABLE t1 ( f1 time(3) );" as an MTR test case

Changed in maria:
status: Incomplete → Opinion
status: Opinion → Confirmed
Revision history for this message
Philip Stoev (pstoev-askmonty) wrote :

Repatable on

[philips@eve randgen-temporal]$ uname -a (32 bit)
Linux eve 2.6.33.3-85.fc13.i686.PAE #1 SMP Thu May 6 18:27:11 UTC 2010 i686 i686 i386 GNU/Linux

not repeatable on:

[philips@fedora13 mysql-test]$ uname -a (64 bit)
Linux fedora13 2.6.34.7-63.fc13.x86_64 #1 SMP Fri Dec 3 12:38:46 UTC 2010 x86_64 x86_64 x86_64 GNU/Linux

Access to the machine is available if needed.

Revision history for this message
Philip Stoev (pstoev-askmonty) wrote :
Changed in maria:
status: Confirmed → Fix Committed
importance: Undecided → Critical
Changed in maria:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.