summaryrefslogtreecommitdiff
path: root/sql/ha_heap.h
diff options
context:
space:
mode:
authorunknown <ingo@mysql.com>2005-06-24 17:47:09 +0200
committerunknown <ingo@mysql.com>2005-06-24 17:47:09 +0200
commita7e66efc2cc37b8ca32868ac8c8e3e3c05675e48 (patch)
treecdb8c2576769d4678d13b4b2a6b8cc5d2eafd5f5 /sql/ha_heap.h
parent5aa793f72bfdf5e5903ad4999691fdb72f507de3 (diff)
downloadmariadb-git-a7e66efc2cc37b8ca32868ac8c8e3e3c05675e48.tar.gz
Bug#10178 - failure to find a row in heap table by concurrent UPDATEs
Moved the key statistics update to info(). The table is not locked in open(). This made wrong stats possible. No test case for the test suite. This happens only with heavy concurrency. A test script is added to the bug report. mysql-test/r/heap_hash.result: Bug#10178 - failure to find a row in heap table by concurrent UPDATEs Updated test results to reflect the new statistics behaviour. mysql-test/t/heap_hash.test: Bug#10178 - failure to find a row in heap table by concurrent UPDATEs Added a FLUSH TABLES to avoid statistics differences between normal and ps-protocol tests. sql/ha_heap.cc: Bug#10178 - failure to find a row in heap table by concurrent UPDATEs Moved the key statistics update to info(). The table is not locked in open(). This made wrong stats possible. sql/ha_heap.h: Bug#10178 - failure to find a row in heap table by concurrent UPDATEs Added an element to track the validity of the key statistics.
Diffstat (limited to 'sql/ha_heap.h')
-rw-r--r--sql/ha_heap.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/ha_heap.h b/sql/ha_heap.h
index 33de0156074..cbe2474492d 100644
--- a/sql/ha_heap.h
+++ b/sql/ha_heap.h
@@ -29,8 +29,10 @@ class ha_heap: public handler
key_map btree_keys;
/* number of records changed since last statistics update */
uint records_changed;
+ bool key_stats_ok;
public:
- ha_heap(TABLE *table): handler(table), file(0), records_changed(0) {}
+ ha_heap(TABLE *table): handler(table), file(0), records_changed(0),
+ key_stats_ok(0) {}
~ha_heap() {}
const char *table_type() const { return "HEAP"; }
const char *index_type(uint inx)