summaryrefslogtreecommitdiff
path: root/storage/oqgraph/ha_oqgraph.cc
diff options
context:
space:
mode:
authorAndrew McDonnell <bugs@andrewmcdonnell.net>2013-09-13 22:42:09 +0930
committerAndrew McDonnell <bugs@andrewmcdonnell.net>2013-09-13 22:42:09 +0930
commit078cf03304eeed26ae5b04a362b10ceb5970d220 (patch)
tree488fcdfcaf592f94b008fc9e0c79553d5bb54da2 /storage/oqgraph/ha_oqgraph.cc
parent323d45826f946afb01eafb8e9851059b5ca4b48b (diff)
downloadmariadb-git-078cf03304eeed26ae5b04a362b10ceb5970d220.tar.gz
Partial for for lp bug 796647 - handle DELETED records in ha_rnd_next of backing table
Diffstat (limited to 'storage/oqgraph/ha_oqgraph.cc')
-rw-r--r--storage/oqgraph/ha_oqgraph.cc11
1 files changed, 2 insertions, 9 deletions
diff --git a/storage/oqgraph/ha_oqgraph.cc b/storage/oqgraph/ha_oqgraph.cc
index 8cd15dec2e8..5251d1600eb 100644
--- a/storage/oqgraph/ha_oqgraph.cc
+++ b/storage/oqgraph/ha_oqgraph.cc
@@ -1050,7 +1050,7 @@ int ha_oqgraph::fill_record(byte *record, const open_query::row &row)
int ha_oqgraph::rnd_init(bool scan)
{
- edges->file->info(HA_STATUS_VARIABLE); // Fix for bug 1195735 - ensure we operate with up to date count!
+ edges->file->info(HA_STATUS_VARIABLE); // Fix for bug 1195735, hang after truncate table - ensure we operate with up to date count
edges->prepare_for_position();
return error_code(graph->random(scan));
}
@@ -1060,14 +1060,7 @@ int ha_oqgraph::rnd_next(byte *buf)
int res;
open_query::row row = {};
- // Problem: bug 1195735 - mysqld hang if we delete * from the underlying table, we get an infinite loop through here
- // fetch_row() --> fetch_row() --> num_edges() --> _table->file->stats->records
- // _table is actually a handle on the backing table we just deleted everything from. so the statistics are out of date.
- // so we really need to force a refresh on the backing store statistics, when starting a new query
- // So we probably need to fix this bug in rnd_init
- // Note, close() never called in between; this would otherwise clean things up
-
- if (!(res= graph->fetch_row(row))) // FIXME - this called after DELETE FROM graph_base; hangs...
+ if (!(res= graph->fetch_row(row)))
res= fill_record(buf, row);
table->status= res ? STATUS_NOT_FOUND: 0;
return error_code(res);