oqgraph-dev team mailing list archive
-
oqgraph-dev team
-
Mailing list archive
-
Message #00024
Re: Trying the examples - mysqld segfault inserting into tol_tree caused by a NULL pointer in ha_oqgraph::open
Hi Antony
> Oqgraphv3 probably should validate that required create table options are present. ;)
I think it'll be good to have the old CREATE TABLE as a negative testcase, as it should chuck an error.
Andrew, when you look at the create table code, do you reckon you can add checks for the new extra options?
> I'll send a worked example when I get home
thanks
Cheers,
Arjen.
> On Feb 19, 2013 4:24 AM, "Andrew McDonnell" < bugs@xxxxxxxxxxxxxxxxxxx
> > wrote:
>
>
> Hi Arjen,
>
> I finally managed to get mariadb running and the ha_oqgraph.so plugin
> loaded.
> I had to turn off --skip-grant-tables, and then reset the db root
> password.
> Anyway.
>
> Given the passage of time I needed some direction as to what to do
> next.
> Before emailing you for advice I thought I would at least familiarise
> myself
> with the examples.
>
> So I did `bzr branch lp:oqgraph` to try the tree of life examples as
> described
> in your example blog.
>
> The instructions omit how to create the actual graph table, so I
> guessed:
>
> CREATE TABLE tol_tree (
> 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;
>
> this worked :-)
>
> However,
>
> INSERT INTO tol_tree (origid,destid)
> SELECT parent,id FROM tol WHERE parent IS NOT NULL;
>
> this failed ... (stack trace attachment)
>
> I note the stack trace is full of mangled C++ identifiers ...
>
> I then ran mysqld from gdb. The fault repeated the same, but gdb let
> me see
> the identifiers. (attach #2) and of course, catch the fault and
> examine variables.
>
> It turns out that options->tablename in ha_oqgraph::open (-->
> table_name in
> table.cc) is NULL. And strlen barfs because table.cc isn't checking
> for a NULL.
>
> I am unfamiliar with the code as yet, so I don't know why this is
> NULL.
>
>
> As an aside, I am used to working with code that is defensively laced
> with
> assertions for NULL pointers, so this is a little different to me...
>
>
> Note: I am building cleanly on Debian Squeeze with boost 1.42
>
> --Andrew
>
>
>
> --
>
>
> https://launchpad.net/~andymc73
> http://blog.oldcomputerjunk.net
> Twitter: @andymc73
> GPG: http://www.andrewmcdonnell.net/gpg.html
>
>
>
> --
> Mailing list: https://launchpad.net/~oqgraph-dev
> Post to : oqgraph-dev@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~oqgraph-dev
> More help : https://help.launchpad.net/ListHelp
>
>
> --
> Mailing list: https://launchpad.net/~oqgraph-dev
> Post to : oqgraph-dev@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~oqgraph-dev
> More help : https://help.launchpad.net/ListHelp
--
Arjen Lentz, Exec.Director @ Open Query (http://openquery.com)
Australian peace of mind for your MySQL/MariaDB infrastructure.
Follow us at http://openquery.com/blog/ & http://twitter.com/openquery
References