Hello all (Sorry this is a little muddled, I need to go to bed!)
Using the code from basic.test I can get results with SELECT * FROM graph2 WHERE latch = 'breadth_first' AND origid = 1 AND weight = 1; that match SELECT * FROM graph WHERE latch = 2 AND origid = 1 AND weight = 1; (Here, graph2 is the same as graph but with a varchar latch) (BTW Arjen, I completely get your point about not maintaining backwards compatibility for int latch but I am finding it extremely useful to compare results when testing and also understand stuff in the debugger. So I would like to leave the #ifdef code there as scaffolding until everything works and then remove it) However: SELECT * FROM graph2 WHERE latch = '2' AND origid = 1 AND weight I can see from the debug that the '2' is being parsed correctly to breadth_first and then index_read_idx() executing graph->search() with exact same arguments. However the query returns no results, despite graph->fetch_row() apparently working at. I can see fill_record() is only called once (not four times as when called when latch is a named string - notably, the 'breadth_first' result has fill_record() called by multi_range_read_next, which I dont see happening with latch='2') I suspect this is somehow key related: I populate the row with the string 'breadth_first' but mysql is looking for a '2' on the first row returned? What I haven't worked out yet is how to get the original latch string from the query to put into the result in fill_record(), which might fix the above. It may be necessary to hack some additional state into the graph object to pass this key string through. Also, I can crash mysqld with an assertion by simply putting a bogus value in for latch, but the stacktrace is not in our code, which leaves me in a bit of a bind. Finally, if I go SELECT * FROM graph2 WHERE latch = 2 AND origid = 1 AND weight = 1; it never enters records_in_range() at all, even from a restart / cache reset so it seems to be not auto casting to a string in this case. I suspect I may be missing something with the keys still somewhere... anyway, enjoy (as previously noted, I wont have much time over next week) BTW, I am using NetBeans as a glorified text editor with code completion, and able to attach gdb to mysqld for graphical debugging, I can post instructions later if you are interested -- 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@lists.launchpad.net Unsubscribe : https://launchpad.net/~oqgraph-dev More help : https://help.launchpad.net/ListHelp