OQGRAPH and MariaDB 10.0.7 - Updating data

Hi

I am trying to get OQGRAPH working with MariaDB 10.0.7. Many things have changed since v2, so I have lots of questions not answered by the documentation.

Firstly, having created an OQGRAPH table oq2_graph, and backing table oq2_backing, I cannot seem to UPDATE the data in the oqgraph table.

For example, when changing the weight in the backing table in one of the rows to 10, the change does not reflect on the og2_graph table. The change reflects if I shut down the server and restart, but not immediately. How can I UPDATE data?

MariaDB [test]> SELECT * FROM oq2_backing;
+--------+--------+--------+
| origid | destid | weight |
+--------+--------+--------+
...
| 2 | 6 | 10 |
...
+--------+--------+--------+
6 rows in set (0.00 sec)

MariaDB [test]> SELECT * FROM oq2_graph;
+-------+--------+--------+--------+------+--------+
| latch | origid | destid | weight | seq | linkid |
+-------+--------+--------+--------+------+--------+
...
| NULL | 2 | 6 | 10 | NULL | NULL |
...
+-------+--------+--------+--------+------+--------+
6 rows in set (0.00 sec)

MariaDB [test]> UPDATE oq2_backing SET weight=1 WHERE origid=2 AND destid=6;
Query OK, 1 row affected (0.07 sec)
Rows matched: 1 Changed: 1 Warnings: 0

MariaDB [test]> SELECT * FROM oq2_backing;
+--------+--------+--------+
| origid | destid | weight |
+--------+--------+--------+
...
| 2 | 6 | 1 |
...
+--------+--------+--------+
6 rows in set (0.00 sec)

MariaDB [test]> SELECT * FROM oq2_graph;
+-------+--------+--------+--------+------+--------+
| latch | origid | destid | weight | seq | linkid |
+-------+--------+--------+--------+------+--------+
...
| NULL | 2 | 6 | 10 | NULL | NULL |
...
+-------+--------+--------+--------+------+--------+

oqgraph v3 in MariaDB 10.0

Hi - yes we'll be updating the docs here for v3 as well as the way in which it's packaged with MariaDB 10.0. We were waiting for that to settle as only with 10.0.7 has that been clear.
So that should help you in general terms.

Updating should occur on the backing table, the oqgraph table is merely a read-only view into it. While v3 has a decent test suite, there do appear to be plenty of bugs still - it also appears to depend on the type of storage engine used in the backing table (which in itself is rather curious, but anyway).

I think the problem you spotted was a bug, and it's been fixed. I'm guessing you had the query cache enabled, so the second time you did SELECT * FROM oq2_graph it won't have actually executed, but rather used the result set from the previous time. This because the server did use the query cache for the oqgraph table - that was wrong and has been fixed, using a mechanism whereby a storage engine tells the server to not use the query cache for its tables.

Regards,
Arjen.