diff options
author | Andrew McDonnell <bugs@andrewmcdonnell.net> | 2014-11-05 20:11:32 +1030 |
---|---|---|
committer | Andrew McDonnell <bugs@andrewmcdonnell.net> | 2015-02-28 22:37:06 +1030 |
commit | c65f3238360767e1f88fb79a3af1f8fc77ae7d71 (patch) | |
tree | ce909c262bd8d269c664062426525b2d4244c8e6 /storage/oqgraph | |
parent | e32dafe77870ae8d4da2aae2321f3e03fa1d1f98 (diff) | |
download | mariadb-git-c65f3238360767e1f88fb79a3af1f8fc77ae7d71.tar.gz |
Fixed more cases for MDEV-6282
Diffstat (limited to 'storage/oqgraph')
-rw-r--r-- | storage/oqgraph/ha_oqgraph.cc | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/storage/oqgraph/ha_oqgraph.cc b/storage/oqgraph/ha_oqgraph.cc index 7ff9e6a41d4..72fc477ddcd 100644 --- a/storage/oqgraph/ha_oqgraph.cc +++ b/storage/oqgraph/ha_oqgraph.cc @@ -780,6 +780,10 @@ int ha_oqgraph::index_read(byte * buf, const byte * key, uint key_len, enum ha_r int ha_oqgraph::index_next_same(byte *buf, const byte *key, uint key_len) { + if (graph->get_thd() != current_thd) { + DBUG_PRINT( "oq-debug", ("index_next_same g->table->in_use: 0x%lx <-- current_thd 0x%lx", (long) graph->get_thd(), (long) current_thd)); + graph->set_thd(current_thd); + } int res; open_query::row row; DBUG_ASSERT(inited==INDEX); @@ -843,7 +847,7 @@ int ha_oqgraph::index_read_idx(byte * buf, uint index, const byte * key, uint key_len, enum ha_rkey_function find_flag) { if (graph->get_thd() != current_thd) { - DBUG_PRINT( "oq-debug", ("g->table->in_use: 0x%lx <-- current_thd 0x%lx", (long) graph->get_thd(), (long) current_thd)); + DBUG_PRINT( "oq-debug", ("index_read_idx g->table->in_use: 0x%lx <-- current_thd 0x%lx", (long) graph->get_thd(), (long) current_thd)); graph->set_thd(current_thd); } @@ -1040,6 +1044,10 @@ int ha_oqgraph::rnd_init(bool scan) int ha_oqgraph::rnd_next(byte *buf) { + if (graph->get_thd() != current_thd) { + DBUG_PRINT( "oq-debug", ("rnd_next g->table->in_use: 0x%lx <-- current_thd 0x%lx", (long) graph->get_thd(), (long) current_thd)); + graph->set_thd(current_thd); + } int res; open_query::row row = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; @@ -1051,6 +1059,10 @@ int ha_oqgraph::rnd_next(byte *buf) int ha_oqgraph::rnd_pos(byte * buf, byte *pos) { + if (graph->get_thd() != current_thd) { + DBUG_PRINT( "oq-debug", ("rnd_pos g->table->in_use: 0x%lx <-- current_thd 0x%lx", (long) graph->get_thd(), (long) current_thd)); + graph->set_thd(current_thd); + } int res; open_query::row row; if (!(res= graph->fetch_row(row, pos))) |