[MDEV-7050] MySQL#74603 - Assertion `comma_length > 0' failed in mysql_prepare_create_table Created: 2014-11-08  Updated: 2015-12-07  Resolved: 2015-12-07

Status: Closed
Project: MariaDB Server
Component/s: OTHER
Affects Version/s: 5.5, 10.0
Fix Version/s: 5.5.46

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Jan Lindström (Inactive)
Resolution: Fixed Votes: 0
Labels: upstream

Issue Links:
Relates
relates to MDEV-7057 Track most important upstream bugs wh... Closed

 Description   

Initially reported by Ramesh Sivaraman as http://bugs.mysql.com/bug.php?id=74603, refiling to make it searchable in Jira and to preserve the test case.

DROP DATABASE test;CREATE DATABASE test;USE test;
SET character_set_filesystem=filename;
SET @session_start_value=@@character_set_filesystem;
SET @@session.collation_server=@session_start_value;
create table t0(a ENUM('',''));
DROP DATABASE test;CREATE DATABASE test;USE test;
create table t0(a ENUM('',''));

sql/sql_table.cc:3343: int mysql_prepare_create_table(THD*, HA_CREATE_INFO*, Alter_info*, uint*, handler*, KEY**, uint*, int): Assertion `comma_length > 0' failed.
141108 20:06:32 [ERROR] mysqld got signal 6 ;

#6  0x00007fa6e95cb6f1 in *__GI___assert_fail (assertion=0xf35b8b "comma_length > 0", file=<optimized out>, line=3343, function=0xf377c0 "int mysql_prepare_create_table(THD*, HA_CREATE_INFO*, Alter_info*, uint*, handler*, KEY**, uint*, int)") at assert.c:81
#7  0x00000000007233aa in mysql_prepare_create_table (thd=0x7fa6e330b070, create_info=0x7fa6eb54ecb0, alter_info=0x7fa6eb54ec20, db_options=0x7fa6eb54d54c, file=0x7fa6d605b088, key_info_buffer=0x7fa6eb54eaa8, key_count=0x7fa6eb54eaa4, create_table_mode=0) at 10.0/sql/sql_table.cc:3343
#8  0x0000000000727031 in mysql_create_frm_image (thd=0x7fa6e330b070, db=0x7fa6d621d748 "test", table_name=0x7fa6d621d138 "t0", create_info=0x7fa6eb54ecb0, alter_info=0x7fa6eb54ec20, create_table_mode=0, key_info=0x7fa6eb54eaa8, key_count=0x7fa6eb54eaa4, frm=0x7fa6eb54ea90) at 10.0/sql/sql_table.cc:4594
#9  0x0000000000727943 in create_table_impl (thd=0x7fa6e330b070, orig_db=0x7fa6d621d748 "test", orig_table_name=0x7fa6d621d138 "t0", db=0x7fa6d621d748 "test", table_name=0x7fa6d621d138 "t0", path=0x7fa6eb54e880 "./test/t0", create_info=0x7fa6eb54ecb0, alter_info=0x7fa6eb54ec20, create_table_mode=0, is_trans=0x7fa6eb54eb27, key_info=0x7fa6eb54eaa8, key_count=0x7fa6eb54eaa4, frm=0x7fa6eb54ea90) at 10.0/sql/sql_table.cc:4831
#10 0x0000000000727eb5 in mysql_create_table_no_lock (thd=0x7fa6e330b070, db=0x7fa6d621d748 "test", table_name=0x7fa6d621d138 "t0", create_info=0x7fa6eb54ecb0, alter_info=0x7fa6eb54ec20, is_trans=0x7fa6eb54eb27, create_table_mode=0) at 10.0/sql/sql_table.cc:4949
#11 0x00000000007280f4 in mysql_create_table (thd=0x7fa6e330b070, create_table=0x7fa6d621d170, create_info=0x7fa6eb54ecb0, alter_info=0x7fa6eb54ec20) at 10.0/sql/sql_table.cc:5010
#12 0x000000000067c55f in mysql_execute_command (thd=0x7fa6e330b070) at 10.0/sql/sql_parse.cc:3020
#13 0x000000000068586f in mysql_parse (thd=0x7fa6e330b070, rawbuf=0x7fa6d621d088 "create table t0(a ENUM('',''))", length=30, parser_state=0x7fa6eb54f630) at 10.0/sql/sql_parse.cc:6407
#14 0x0000000000678652 in dispatch_command (command=COM_QUERY, thd=0x7fa6e330b070, packet=0x7fa6d83f2071 "create table t0(a ENUM('',''))", packet_length=30) at 10.0/sql/sql_parse.cc:1299
#15 0x00000000006779f7 in do_command (thd=0x7fa6e330b070) at 10.0/sql/sql_parse.cc:996
#16 0x00000000007944aa in do_handle_one_connection (thd_arg=0x7fa6e330b070) at 10.0/sql/sql_connect.cc:1379
#17 0x00000000007941fd in handle_one_connection (arg=0x7fa6e330b070) at 10.0/sql/sql_connect.cc:1293
#18 0x0000000000ccb4a6 in pfs_spawn_thread (arg=0x7fa6e33d9df0) at 10.0/storage/perfschema/pfs.cc:1860
#19 0x00007fa6eb184b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
#20 0x00007fa6e967c20d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112

revision-id: sergii@pisem.net-20141103164737-457hfby1eg82zol9
date: 2014-11-03 17:47:37 +0100
build-date: 2014-11-08 20:10:54 +0400
revno: 4471
branch-nick: 10.0



 Comments   
Comment by Jan Lindström (Inactive) [ 2015-12-02 ]

http://lists.askmonty.org/pipermail/commits/2015-December/008695.html

Comment by Jan Lindström (Inactive) [ 2015-12-07 ]

commit 0df22a539e046a9090a99f10260cf6d80f0c4e26
Author: Jan Lindström <jan.lindstrom@mariadb.com>
Date: Mon Dec 7 09:34:41 2015 +0200

MDEV-7050: MySQL#74603 - Assertion `comma_length > 0' failed in mysql_prepare_create_table

Incorrect array lenght for comma buffer.

commit d85168e40d12de12c119b98ea92c35f3c2fe1f3f
Author: Jan Lindström <jan.lindstrom@mariadb.com>
Date: Mon Dec 7 09:20:31 2015 +0200

Correct length check in my_wc_mb_filename()

Generated at Thu Feb 08 07:16:35 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.