This also happens at the same line if you create a table with a non-existent column for ORIGID (and posibly DESTID)
CREATE TABLE `backing` ( `id` int(10) unsigned NOT NULL DEFAULT '0', `parent` int(10) unsigned DEFAULT NULL, `info` varchar(20) DEFAULT NULL, `not_id_type` varchar(20) DEFAULT NULL, PRIMARY KEY (`id`), KEY `name` (`info`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE oqtable ( latch SMALLINT UNSIGNED NULL, origid BIGINT UNSIGNED NULL, destid BIGINT UNSIGNED NULL, weight DOUBLE NULL, seq BIGINT UNSIGNED NULL, linkid BIGINT UNSIGNED NULL, KEY (latch, origid, destid) USING HASH, KEY (latch, destid, origid) USING HASH ) ENGINE=OQGRAPH, DATA_TABLE='backing',ORIGID='bogus',DESTID='id';
describe oqtable;
Note that the stack trace is different (it comes through JOIN) :
Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7ffff7f64700 (LWP 16055)] 0x00007fffd5dc4e33 in ha_oqgraph::open (this=0x2d0b8c8, name=0x2d1b578 "./test/oqtable", mode=2, test_if_locked=18) at /home/andrew/develop/maria/repo/andrew-dev/storage/oqgraph/ha_oqgraph.cc:462 462 if ((*field)->type() != origid->type() || (gdb) ^CQuit (gdb) bt #0 0x00007fffd5dc4e33 in ha_oqgraph::open (this=0x2d0b8c8, name=0x2d1b578 "./test/oqtable", mode=2, test_if_locked=18) at /home/andrew/develop/maria/repo/andrew-dev/storage/oqgraph/ha_oqgraph.cc:462 #1 0x00000000007e4f7e in handler::ha_open (this=0x2d0b8c8, table_arg=0x2d0aed0, name=0x2d1b578 "./test/oqtable", mode=2, test_if_locked=18) at /home/andrew/develop/maria/repo/andrew-dev/sql/handler.cc:2347 #2 0x00000000006e5677 in open_table_from_share (thd=0x2c92590, share=0x2d1b148, alias=0x2cc5aa8 "oqtable", db_stat=39, prgflag=44, ha_open_flags=16, outparam=0x2d0aed0, is_create_table=false) at /home/andrew/develop/maria/repo/andrew-dev/sql/table.cc:2663 #3 0x00000000005b4377 in open_table (thd=0x2c92590, table_list=0x2d07840, mem_root=0x7ffff7f60e20, ot_ctx=0x7ffff7f60e60) at /home/andrew/develop/maria/repo/andrew-dev/sql/sql_base.cc:3207 #4 0x00000000005b68e8 in open_and_process_table (thd=0x2c92590, lex=0x7ffff7f61000, tables=0x2d07840, counter=0x7ffff7f60f8c, flags=1026, prelocking_strategy=0x7ffff7f60f90, has_prelocking_list=false, ot_ctx=0x7ffff7f60e60, new_frm_mem=0x7ffff7f60e20) at /home/andrew/develop/maria/repo/andrew-dev/sql/sql_base.cc:4564 #5 0x00000000005b7b35 in open_tables (thd=0x2c92590, start=0x7ffff7f60f40, counter=0x7ffff7f60f8c, flags=1026, prelocking_strategy=0x7ffff7f60f90) at /home/andrew/develop/maria/repo/andrew-dev/sql/sql_base.cc:5115 #6 0x00000000005b8c33 in open_normal_and_derived_tables (thd=0x2c92590, tables=0x2d07840, flags=1026, dt_phases=34) at /home/andrew/develop/maria/repo/andrew-dev/sql/sql_base.cc:5781 #7 0x0000000000693254 in fill_schema_table_by_open (thd=0x2c92590, is_show_fields_or_keys=true, table=0x2cf7378, schema_table=0x1507740, orig_db_name=0x7ffff7f62580, orig_table_name=0x7ffff7f62570, open_tables_state_backup=0x7ffff7f62460, can_deadlock=false) at /home/andrew/develop/maria/repo/andrew-dev/sql/sql_show.cc:4067 #8 0x0000000000694239 in get_all_tables (thd=0x2c92590, tables=0x2ca2c38, cond=0x0) at /home/andrew/develop/maria/repo/andrew-dev/sql/sql_show.cc:4623 #9 0x00000000006a21a2 in do_fill_table (thd=0x2c92590, table_list=0x2ca2c38, join_table=0x2d07128) at /home/andrew/develop/maria/repo/andrew-dev/sql/sql_show.cc:7928 #10 0x00000000006a25b9 in get_schema_tables_result (join=0x2cc4b98, executed_place=PROCESSED_BY_JOIN_EXEC) at /home/andrew/develop/maria/repo/andrew-dev/sql/sql_show.cc:8035 #11 0x000000000064c05c in JOIN::exec_inner (this=0x2cc4b98) at /home/andrew/develop/maria/repo/andrew-dev/sql/sql_select.cc:2411 #12 0x000000000064b6a7 in JOIN::exec (this=0x2cc4b98) at /home/andrew/develop/maria/repo/andrew-dev/sql/sql_select.cc:2255 #13 0x000000000064ec3e in mysql_select (thd=0x2c92590, rref_pointer_array=0x2c95950, tables=0x2ca2c38, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2684619520, result=0x2cc4b78, unit=0x2c95018, select_lex=0x2c956f0) at /home/andrew/develop/maria/repo/andrew-dev/sql/sql_select.cc:3192 #14 0x000000000064547a in handle_select (thd=0x2c92590, lex=0x2c94f60, result=0x2cc4b78, setup_tables_done_option=0) at /home/andrew/develop/maria/repo/andrew-dev/sql/sql_select.cc:363 #15 0x000000000061d175 in execute_sqlcom_select (thd=0x2c92590, all_tables=0x2ca2c38) at /home/andrew/develop/maria/repo/andrew-dev/sql/sql_parse.cc:5004 #16 0x0000000000615788 in mysql_execute_command (thd=0x2c92590) at /home/andrew/develop/maria/repo/andrew-dev/sql/sql_parse.cc:2472 #17 0x000000000061f9ec in mysql_parse (thd=0x2c92590, rawbuf=0x2ca1b68 "describe oqtable", length=16, parser_state=0x7ffff7f63670) at /home/andrew/develop/maria/repo/andrew-dev/sql/sql_parse.cc:6124 #18 0x00000000006129ba in dispatch_command (command=COM_QUERY, thd=0x2c92590, packet=0x2c97831 "describe oqtable", packet_length=16) at /home/andrew/develop/maria/repo/andrew-dev/sql/sql_parse.cc:1266 #19 0x0000000000611b35 in do_command (thd=0x2c92590) at /home/andrew/develop/maria/repo/andrew-dev/sql/sql_parse.cc:982 #20 0x0000000000721ba9 in do_handle_one_connection (thd_arg=0x2c92590) at /home/andrew/develop/maria/repo/andrew-dev/sql/sql_connect.cc:1267 #21 0x0000000000721651 in handle_one_connection (arg=0x2c92590) at /home/andrew/develop/maria/repo/andrew-dev/sql/sql_connect.cc:1181 #22 0x00007ffff7bc98ca in start_thread (arg=<value optimized out>) at pthread_create.c:300 #23 0x00007ffff706b92d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
This also happens at the same line if you create a table with a non-existent column for ORIGID (and posibly DESTID)
CREATE TABLE `backing` (
`id` int(10) unsigned NOT NULL DEFAULT '0',
`parent` int(10) unsigned DEFAULT NULL,
`info` varchar(20) DEFAULT NULL,
`not_id_type` varchar(20) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `name` (`info`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE oqtable ( latch SMALLINT UNSIGNED NULL, origid BIGINT UNSIGNED NULL, destid BIGINT UNSIGNED NULL, weight DOUBLE NULL, seq BIGINT UNSIGNED NULL, linkid BIGINT UNSIGNED NULL, KEY (latch, origid, destid) USING HASH, KEY (latch, destid, origid) USING HASH ) ENGINE=OQGRAPH, DATA_TABLE= 'backing' ,ORIGID= 'bogus' ,DESTID= 'id';
describe oqtable;
Note that the stack trace is different (it comes through JOIN) :
Program received signal SIGSEGV, Segmentation fault. develop/ maria/repo/ andrew- dev/storage/ oqgraph/ ha_oqgraph. cc:462 develop/ maria/repo/ andrew- dev/storage/ oqgraph/ ha_oqgraph. cc:462 0x2d0aed0, name=0x2d1b578 "./test/oqtable", mode=2, test_if_locked=18) at /home/andrew/ develop/ maria/repo/ andrew- dev/sql/ handler. cc:2347 from_share (thd=0x2c92590, share=0x2d1b148, alias=0x2cc5aa8 "oqtable", db_stat=39, prgflag=44, ha_open_flags=16, outparam=0x2d0aed0, is_create_ table=false) at /home/andrew/ develop/ maria/repo/ andrew- dev/sql/ table.cc: 2663 0x2d07840, mem_root= 0x7ffff7f60e20, ot_ctx= 0x7ffff7f60e60) at /home/andrew/ develop/ maria/repo/ andrew- dev/sql/ sql_base. cc:3207 process_ table (thd=0x2c92590, lex=0x7ffff7f61000, tables=0x2d07840, counter= 0x7ffff7f60f8c, flags=1026, prelocking_ strategy= 0x7ffff7f60f90, has_prelocking_ list=false, ot_ctx= 0x7ffff7f60e60, new_frm_ mem=0x7ffff7f60 e20) at /home/andrew/ develop/ maria/repo/ andrew- dev/sql/ sql_base. cc:4564 60f40, counter= 0x7ffff7f60f8c, flags=1026, prelocking_ strategy= 0x7ffff7f60f90) at /home/andrew/ develop/ maria/repo/ andrew- dev/sql/ sql_base. cc:5115 and_derived_ tables (thd=0x2c92590, tables=0x2d07840, flags=1026, dt_phases=34) at /home/andrew/ develop/ maria/repo/ andrew- dev/sql/ sql_base. cc:5781 table_by_ open (thd=0x2c92590, is_show_ fields_ or_keys= true, table=0x2cf7378, schema_ table=0x1507740 , orig_db_ name=0x7ffff7f6 2580, orig_table_ name=0x7ffff7f6 2570, open_tables_ state_backup= 0x7ffff7f62460, can_deadlock=false) at /home/andrew/ develop/ maria/repo/ andrew- dev/sql/ sql_show. cc:4067 develop/ maria/repo/ andrew- dev/sql/ sql_show. cc:4623 0x2ca2c38, join_table= 0x2d07128) at /home/andrew/ develop/ maria/repo/ andrew- dev/sql/ sql_show. cc:7928 tables_ result (join=0x2cc4b98, executed_ place=PROCESSED _BY_JOIN_ EXEC) at /home/andrew/ develop/ maria/repo/ andrew- dev/sql/ sql_show. cc:8035 develop/ maria/repo/ andrew- dev/sql/ sql_select. cc:2411 develop/ maria/repo/ andrew- dev/sql/ sql_select. cc:2255 array=0x2c95950 , tables=0x2ca2c38, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_ options= 2684619520, result=0x2cc4b78, unit=0x2c95018, select_ lex=0x2c956f0) at /home/andrew/ develop/ maria/repo/ andrew- dev/sql/ sql_select. cc:3192 done_option= 0) at /home/andrew/ develop/ maria/repo/ andrew- dev/sql/ sql_select. cc:363 sqlcom_ select (thd=0x2c92590, all_tables= 0x2ca2c38) at /home/andrew/ develop/ maria/repo/ andrew- dev/sql/ sql_parse. cc:5004 command (thd=0x2c92590) at /home/andrew/ develop/ maria/repo/ andrew- dev/sql/ sql_parse. cc:2472 state=0x7ffff7f 63670) at /home/andrew/ develop/ maria/repo/ andrew- dev/sql/ sql_parse. cc:6124 develop/ maria/repo/ andrew- dev/sql/ sql_parse. cc:1266 develop/ maria/repo/ andrew- dev/sql/ sql_parse. cc:982 one_connection (thd_arg=0x2c92590) at /home/andrew/ develop/ maria/repo/ andrew- dev/sql/ sql_connect. cc:1267 one_connection (arg=0x2c92590) at /home/andrew/ develop/ maria/repo/ andrew- dev/sql/ sql_connect. cc:1181 create. c:300 unix/sysv/ linux/x86_ 64/clone. S:112
[Switching to Thread 0x7ffff7f64700 (LWP 16055)]
0x00007fffd5dc4e33 in ha_oqgraph::open (this=0x2d0b8c8, name=0x2d1b578 "./test/oqtable", mode=2, test_if_locked=18) at /home/andrew/
462 if ((*field)->type() != origid->type() ||
(gdb) ^CQuit
(gdb) bt
#0 0x00007fffd5dc4e33 in ha_oqgraph::open (this=0x2d0b8c8, name=0x2d1b578 "./test/oqtable", mode=2, test_if_locked=18) at /home/andrew/
#1 0x00000000007e4f7e in handler::ha_open (this=0x2d0b8c8, table_arg=
#2 0x00000000006e5677 in open_table_
#3 0x00000000005b4377 in open_table (thd=0x2c92590, table_list=
#4 0x00000000005b68e8 in open_and_
#5 0x00000000005b7b35 in open_tables (thd=0x2c92590, start=0x7ffff7f
#6 0x00000000005b8c33 in open_normal_
#7 0x0000000000693254 in fill_schema_
#8 0x0000000000694239 in get_all_tables (thd=0x2c92590, tables=0x2ca2c38, cond=0x0) at /home/andrew/
#9 0x00000000006a21a2 in do_fill_table (thd=0x2c92590, table_list=
#10 0x00000000006a25b9 in get_schema_
#11 0x000000000064c05c in JOIN::exec_inner (this=0x2cc4b98) at /home/andrew/
#12 0x000000000064b6a7 in JOIN::exec (this=0x2cc4b98) at /home/andrew/
#13 0x000000000064ec3e in mysql_select (thd=0x2c92590, rref_pointer_
#14 0x000000000064547a in handle_select (thd=0x2c92590, lex=0x2c94f60, result=0x2cc4b78, setup_tables_
#15 0x000000000061d175 in execute_
#16 0x0000000000615788 in mysql_execute_
#17 0x000000000061f9ec in mysql_parse (thd=0x2c92590, rawbuf=0x2ca1b68 "describe oqtable", length=16, parser_
#18 0x00000000006129ba in dispatch_command (command=COM_QUERY, thd=0x2c92590, packet=0x2c97831 "describe oqtable", packet_length=16) at /home/andrew/
#19 0x0000000000611b35 in do_command (thd=0x2c92590) at /home/andrew/
#20 0x0000000000721ba9 in do_handle_
#21 0x0000000000721651 in handle_
#22 0x00007ffff7bc98ca in start_thread (arg=<value optimized out>) at pthread_
#23 0x00007ffff706b92d in clone () at ../sysdeps/