Assertion in mysqld when opening OQGRAPH table (Debug build)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OQGRAPH |
Fix Committed
|
Undecided
|
Andrew McDonnell |
Bug Description
Appears to be caused by off-by-one error in length of string in ha_oqgraph::open(); specifically, the length of the string share->str.path is set to one less than the actual and allocated string .
Triggered by setting the DATA_TABLE attribute to a table which doesnt exist, if the table exists this doesnt occur:
CREATE TABLE example (
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=
INSERT INTO example (origid,destid) SELECT parent,id FROM some_table WHERE parent IS NOT NULL;
Program received signal SIGABRT, Aborted.
[Switching to Thread 0x7ffff7f64700 (LWP 29879)]
0x00007ffff6fce1b5 in *__GI_raise (sig=<value optimized out>) at ../nptl/
64 ../nptl/
in ../nptl/
Current language: auto
The current source language is "auto; currently c".
(gdb) bt
#0 0x00007ffff6fce1b5 in *__GI_raise (sig=<value optimized out>) at ../nptl/
#1 0x00007ffff6fd0fc0 in *__GI_abort () at abort.c:92
#2 0x00007ffff6fc7301 in *__GI___assert_fail (assertion=0xe4c3f8 "length <= share->
#3 0x00000000006def1b in open_table_def (thd=0x2c12170, share=0x2c27578, db_flags=0) at /home/andrew/
#4 0x00007fffd9ea2982 in ha_oqgraph::open (this=0x2c27168, name=0x1f9d548 "./test/tol_tree", mode=2, test_if_locked=18) at /home/andrew/
#5 0x00000000007e4f06 in handler::ha_open (this=0x2c27168, table_arg=
#6 0x00000000006e55fd in open_table_
#7 0x00000000005b4377 in open_table (thd=0x2c12170, table_list=
#8 0x00000000005b68e8 in open_and_
#9 0x00000000005b7b35 in open_tables (thd=0x2c12170, start=0x7ffff7f
#10 0x00000000005b89f2 in open_and_
#11 0x00000000005ac2bb in open_and_
#12 0x000000000061cf1f in execute_
#13 0x0000000000615788 in mysql_execute_
#14 0x000000000061f9ec in mysql_parse (thd=0x2c12170, rawbuf=0x2c21748 "select * from tol_tree limit 10", length=31, parser_
#15 0x00000000006129ba in dispatch_command (command=COM_QUERY, thd=0x2c12170, packet=0x2c17411 "select * from tol_tree limit 10", packet_length=31) at /home/andrew/
#16 0x0000000000611b35 in do_command (thd=0x2c12170) at /home/andrew/
#17 0x0000000000721b31 in do_handle_
#18 0x00000000007215d9 in handle_
#19 0x00007ffff7bc98ca in start_thread (arg=<value optimized out>) at pthread_
#20 0x00007ffff706b92d in clone () at ../sysdeps/
#21 0x0000000000000000 in ?? ()