inception icon indicating copy to clipboard operation
inception copied to clipboard

SQL语法错误,导致inception core dump

Open johnliu2008 opened this issue 7 years ago • 2 comments

我用Inception执行了alter table t1 comment ='xxx'; 其生成的回滚语句是alter table t1; 然后我用回滚语句alter table t1;去审核,能够审核通过。但是执行时,就导致Inception core dump。 这里分2种情况,如果表小于inception_osc_min_table_size,则不会core dump;否则会100% core dump。 Server version: Inception2.1.50 1

以下是gdb输出 #0 __strlen_sse2 () at ../sysdeps/x86_64/strlen.S:32 #1 0x000000394ec81166 in __strdup (s=0x0) at strdup.c:42 #2 0x00000000006daaef in mysql_execute_alter_table_osc (thd=0x28f4c40, mysql=0x28f8060, statement=0x7f23ac007410 "ALTER TABLE t1", sql_cache_node=0x7f23ac014960) at /app/inception_source_code/inception/sql/sql_parse.cc:10466 #3 0x00000000006db7e3 in mysql_execute_statement (thd=0x28f4c40, mysql=0x28f8060, statement=0x7f23ac007410 "ALTER TABLE t1", sql_cache_node=0x7f23ac014960) at /app/inception_source_code/inception/sql/sql_parse.cc:10676 #4 0x00000000006dbe8c in mysql_remote_execute_command (thd=0x28f4c40, mysql=0x28f8060, sql_cache_node=0x7f23ac014960) at /app/inception_source_code/inception/sql/sql_parse.cc:10799 #5 0x00000000006dc211 in mysql_execute_all_statement (thd=0x28f4c40) at /app/inception_source_code/inception/sql/sql_parse.cc:10867 #6 0x00000000006dc6f5 in mysql_execute_commit (thd=0x28f4c40) at /app/inception_source_code/inception/sql/sql_parse.cc:10997 #7 0x00000000006ddfaa in mysql_show_print_and_execute_simple (thd=0x28f4c40) at /app/inception_source_code/inception/sql/sql_parse.cc:11522 #8 0x00000000006de40c in mysql_process_command (thd=0x28f4c40, parser_state=0x7f23b2e4cbd0) at /app/inception_source_code/inception/sql/sql_parse.cc:11627 #9 0x00000000006de53d in mysql_parse (thd=0x28f4c40, length=22, parser_state=0x7f23b2e4cbd0) at /app/inception_source_code/inception/sql/sql_parse.cc:11664 #10 0x00000000006be8dd in dispatch_command (command=COM_QUERY, thd=0x28f4c40, packet=0x28f91d1 "/--user=root;--password=123;--host=192.168.1.42;--enable-execute;--port=3306; --enable-ignore-warnings;--disable-remote-backup;/", ' ' <repeats 20 times>, "inception_magic_start;", ' ' <repeats 20 times>, "use"..., packet_length=281) at /app/inception_source_code/inception/sql/sql_parse.cc:1077 #11 0x00000000006bc29b in do_command (thd=0x28f4c40) at /app/inception_source_code/inception/sql/sql_parse.cc:489 #12 0x0000000000694c19 in do_handle_one_connection (thd_arg=0x28f4c40) at /app/inception_source_code/inception/sql/sql_connect.cc:926 #13 0x00000000006949ba in handle_one_connection (arg=0x28f4c40) at /app/inception_source_code/inception/sql/sql_connect.cc:842 #14 0x000000394f0079d1 in start_thread (arg=0x7f23b2e4d700) at pthread_create.c:301 #15 0x000000394ece8b6d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

johnliu2008 avatar Jul 27 '17 03:07 johnliu2008

感觉,能不能弹性控制inception_osc_min_table_size参数大小,使得改注释这种不走pt工具就行,因为该注释这种ddl只涉及字典表,应该很快就能完成,不需要pt-osc来做。

dikang123 avatar Jul 27 '17 07:07 dikang123

贴代码的时候建议使用代码块,代码块的上下方都使用三个 ` 符号 把代码块包起来,你这样贴代码,github误以为你引用了一些issue

LeoQuote avatar Aug 04 '17 08:08 LeoQuote