Description:
When we start mysql server with --character-set-server=utf16le option, LOAD DATA INFILE statement crashing server.
GDB
#0 0x00007f9b79136771 in pthread_kill () from /lib64/libpthread.so.0
#1 0x0000000000a945ea in my_write_core (sig=6) at /sda/mysql-server-5.6/mysys/stacktrace.c:422
#2 0x0000000000726d14 in handle_fatal_signal (sig=6) at /sda/mysql-server-5.6/sql/signal_handler.cc:230
#3 <signal handler called>
#4 0x00007f9b77f425d7 in raise () from /lib64/libc.so.6
#5 0x00007f9b77f43cc8 in abort () from /lib64/libc.so.6
#6 0x00007f9b77f3b546 in __assert_fail_base () from /lib64/libc.so.6
#7 0x00007f9b77f3b5f2 in __assert_fail () from /lib64/libc.so.6
#8 0x0000000000e42fd2 in my_mbcharlen_utf16 (cs=0x1710c40 <my_charset_utf16le_general_ci>, c=254) at /sda/mysql-server-5.6/strings/ctype-ucs2.c:1421
#9 0x000000000099d38c in READ_INFO::read_field (this=0x7f9b796ec080) at /sda/mysql-server-5.6/sql/sql_load.cc:1609
#10 0x000000000099b707 in read_sep_field (thd=0x7f9b687dc000, info=..., table_list=0x7f9b5a81f168, fields_vars=..., set_fields=..., set_values=..., read_info=..., enclosed=..., skip_lines=0, ignore_check_option_errors=false) at /sda/mysql-server-5.6/sql/sql_load.cc:988
#11 0x000000000099a1f1 in mysql_load (thd=0x7f9b687dc000, ex=0x7f9b5a81f0e0, table_list=0x7f9b5a81f168, fields_vars=..., set_fields=..., set_values=..., handle_duplicates=DUP_ERROR, ignore=false, read_file_from_client=false) at /sda/mysql-server-5.6/sql/sql_load.cc:519
#12 0x00000000007d5c16 in mysql_execute_command (thd=0x7f9b687dc000) at /sda/mysql-server-5.6/sql/sql_parse.cc:3709
#13 0x00000000007dcbc1 in mysql_parse (thd=0x7f9b687dc000, rawbuf=0x7f9b5a81f010 "LOAD DATA INFILE \"t1.MYI\" into TABLE t1", length=39, parser_state=0x7f9b796ed6a0) at /sda/mysql-server-5.6/sql/sql_parse.cc:6386
#14 0x00000000007cfdb0 in dispatch_command (command=COM_QUERY, thd=0x7f9b687dc000, packet=0x7f9b61f58001 "LOAD DATA INFILE \"t1.MYI\" into TABLE t1", packet_length=39) at /sda/mysql-server-5.6/sql/sql_parse.cc:1340
#15 0x00000000007cee03 in do_command (thd=0x7f9b687dc000) at /sda/mysql-server-5.6/sql/sql_parse.cc:1037
#16 0x0000000000796805 in do_handle_one_connection (thd_arg=0x7f9b687dc000) at /sda/mysql-server-5.6/sql/sql_connect.cc:982
#17 0x00000000007962ee in handle_one_connection (arg=0x7f9b687dc000) at /sda/mysql-server-5.6/sql/sql_connect.cc:898
#18 0x0000000000df83d5 in pfs_spawn_thread (arg=0x7f9b763f2600) at /sda/mysql-server-5.6/storage/perfschema/pfs.cc:1860
#19 0x00007f9b79131df5 in start_thread () from /lib64/libpthread.so.0
#20 0x00007f9b780031ad in clone () from /lib64/libc.so.6
How to repeat:
DROP DATABASE test;CREATE DATABASE test;USE test;
CREATE TABLE t1(pk int(1),cdk date,cdnk date,ctnk time,cvck CHAR (1),cvcnk varchar(1),KEY cvck (cvck)) ENGINE=MyISAM;
LOAD DATA INFILE "t1.MYI" into TABLE t1;
The attached tarball gives the testcase as an exact match of our system,
including some handy utilities
$ vi {epoch}_mybase # Update base path in this file (the only change
required!). For non-binary distribution please update SOURCE_DIR
location also.
$ ./{epoch}_init # Initializes the data dir
$ ./{epoch}_start # Starts mysqld
$ ./{epoch}_cl # To check mysqld is up
$ ./{epoch}_run # Run the testcase with pquery binary(produces
output)
$ vi /dev/shm/{epoch}/error.log.out # Verify the error log
$ ./{epoch}_gdb # Brings you to a gdb prompt attached to correct
mysqld
& generated core
$ ./{epoch}_parse_core # Create {epoch}_STD.gdb and {epoch}_FULL.gdb;
standard and full var gdb stack traces
etc.
Description: When we start mysql server with --character-set-server=utf16le option, LOAD DATA INFILE statement crashing server. GDB #0 0x00007f9b79136771 in pthread_kill () from /lib64/libpthread.so.0 #1 0x0000000000a945ea in my_write_core (sig=6) at /sda/mysql-server-5.6/mysys/stacktrace.c:422 #2 0x0000000000726d14 in handle_fatal_signal (sig=6) at /sda/mysql-server-5.6/sql/signal_handler.cc:230 #3 <signal handler called> #4 0x00007f9b77f425d7 in raise () from /lib64/libc.so.6 #5 0x00007f9b77f43cc8 in abort () from /lib64/libc.so.6 #6 0x00007f9b77f3b546 in __assert_fail_base () from /lib64/libc.so.6 #7 0x00007f9b77f3b5f2 in __assert_fail () from /lib64/libc.so.6 #8 0x0000000000e42fd2 in my_mbcharlen_utf16 (cs=0x1710c40 <my_charset_utf16le_general_ci>, c=254) at /sda/mysql-server-5.6/strings/ctype-ucs2.c:1421 #9 0x000000000099d38c in READ_INFO::read_field (this=0x7f9b796ec080) at /sda/mysql-server-5.6/sql/sql_load.cc:1609 #10 0x000000000099b707 in read_sep_field (thd=0x7f9b687dc000, info=..., table_list=0x7f9b5a81f168, fields_vars=..., set_fields=..., set_values=..., read_info=..., enclosed=..., skip_lines=0, ignore_check_option_errors=false) at /sda/mysql-server-5.6/sql/sql_load.cc:988 #11 0x000000000099a1f1 in mysql_load (thd=0x7f9b687dc000, ex=0x7f9b5a81f0e0, table_list=0x7f9b5a81f168, fields_vars=..., set_fields=..., set_values=..., handle_duplicates=DUP_ERROR, ignore=false, read_file_from_client=false) at /sda/mysql-server-5.6/sql/sql_load.cc:519 #12 0x00000000007d5c16 in mysql_execute_command (thd=0x7f9b687dc000) at /sda/mysql-server-5.6/sql/sql_parse.cc:3709 #13 0x00000000007dcbc1 in mysql_parse (thd=0x7f9b687dc000, rawbuf=0x7f9b5a81f010 "LOAD DATA INFILE \"t1.MYI\" into TABLE t1", length=39, parser_state=0x7f9b796ed6a0) at /sda/mysql-server-5.6/sql/sql_parse.cc:6386 #14 0x00000000007cfdb0 in dispatch_command (command=COM_QUERY, thd=0x7f9b687dc000, packet=0x7f9b61f58001 "LOAD DATA INFILE \"t1.MYI\" into TABLE t1", packet_length=39) at /sda/mysql-server-5.6/sql/sql_parse.cc:1340 #15 0x00000000007cee03 in do_command (thd=0x7f9b687dc000) at /sda/mysql-server-5.6/sql/sql_parse.cc:1037 #16 0x0000000000796805 in do_handle_one_connection (thd_arg=0x7f9b687dc000) at /sda/mysql-server-5.6/sql/sql_connect.cc:982 #17 0x00000000007962ee in handle_one_connection (arg=0x7f9b687dc000) at /sda/mysql-server-5.6/sql/sql_connect.cc:898 #18 0x0000000000df83d5 in pfs_spawn_thread (arg=0x7f9b763f2600) at /sda/mysql-server-5.6/storage/perfschema/pfs.cc:1860 #19 0x00007f9b79131df5 in start_thread () from /lib64/libpthread.so.0 #20 0x00007f9b780031ad in clone () from /lib64/libc.so.6 How to repeat: DROP DATABASE test;CREATE DATABASE test;USE test; CREATE TABLE t1(pk int(1),cdk date,cdnk date,ctnk time,cvck CHAR (1),cvcnk varchar(1),KEY cvck (cvck)) ENGINE=MyISAM; LOAD DATA INFILE "t1.MYI" into TABLE t1; The attached tarball gives the testcase as an exact match of our system, including some handy utilities $ vi {epoch}_mybase # Update base path in this file (the only change required!). For non-binary distribution please update SOURCE_DIR location also. $ ./{epoch}_init # Initializes the data dir $ ./{epoch}_start # Starts mysqld $ ./{epoch}_cl # To check mysqld is up $ ./{epoch}_run # Run the testcase with pquery binary(produces output) $ vi /dev/shm/{epoch}/error.log.out # Verify the error log $ ./{epoch}_gdb # Brings you to a gdb prompt attached to correct mysqld & generated core $ ./{epoch}_parse_core # Create {epoch}_STD.gdb and {epoch}_FULL.gdb; standard and full var gdb stack traces etc.