[MDEV-2320] LP:731089 - Crash in Field_time_hires::pack_length on CREATE TABLE TIME(3) Created: 2011-03-08  Updated: 2015-02-02  Resolved: 2012-10-04

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Critical
Reporter: Philip Stoev (Inactive) Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: Launchpad

Attachments: XML File LPexportBug731089.xml    

 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



 Comments   
Comment by Philip Stoev (Inactive) [ 2011-03-08 ]

Re: Crash in Field_time_hires::pack_length on CREATE TABLE TIME(3)
Same applies to TIMESTAMP

Comment by Sergei Golubchik [ 2011-03-08 ]

Re: Crash in Field_time_hires::pack_length on CREATE TABLE TIME(3)
cannot repeat.
and, of course, it is present in the test suite.

Did you try it with a clean build?

Comment by Philip Stoev (Inactive) [ 2011-03-08 ]

Re: Crash in Field_time_hires::pack_length on CREATE TABLE TIME(3)
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

Comment by Philip Stoev (Inactive) [ 2011-03-08 ]

Re: Crash in Field_time_hires::pack_length on CREATE TABLE TIME(3)
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.

Comment by Philip Stoev (Inactive) [ 2011-03-08 ]

Re: Crash in Field_time_hires::pack_length on CREATE TABLE TIME(3)
Failures are clearly visible in buildbot:

http://buildbot.askmonty.org/buildbot/builders/debian5-i386-fulltest/builds/1109/steps/test_1/logs/stdio

Comment by Rasmus Johansson (Inactive) [ 2011-10-28 ]

Launchpad bug id: 731089

Generated at Thu Feb 08 06:41:03 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.