summaryrefslogtreecommitdiff
path: root/sql/ha_heap.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/ha_heap.cc')
-rw-r--r--sql/ha_heap.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/ha_heap.cc b/sql/ha_heap.cc
index c375614ac95..cc828b6e6b2 100644
--- a/sql/ha_heap.cc
+++ b/sql/ha_heap.cc
@@ -111,6 +111,7 @@ int ha_heap::delete_row(const byte * buf)
int ha_heap::index_read(byte * buf, const byte * key, uint key_len,
enum ha_rkey_function find_flag)
{
+ DBUG_ASSERT(inited==INDEX);
statistic_increment(ha_read_key_count, &LOCK_status);
int error = heap_rkey(file,buf,active_index, key, key_len, find_flag);
table->status = error ? STATUS_NOT_FOUND : 0;
@@ -119,6 +120,7 @@ int ha_heap::index_read(byte * buf, const byte * key, uint key_len,
int ha_heap::index_read_last(byte *buf, const byte *key, uint key_len)
{
+ DBUG_ASSERT(inited==INDEX);
statistic_increment(ha_read_key_count, &LOCK_status);
int error= heap_rkey(file, buf, active_index, key, key_len,
HA_READ_PREFIX_LAST);
@@ -137,6 +139,7 @@ int ha_heap::index_read_idx(byte * buf, uint index, const byte * key,
int ha_heap::index_next(byte * buf)
{
+ DBUG_ASSERT(inited==INDEX);
statistic_increment(ha_read_next_count,&LOCK_status);
int error=heap_rnext(file,buf);
table->status=error ? STATUS_NOT_FOUND: 0;
@@ -145,6 +148,7 @@ int ha_heap::index_next(byte * buf)
int ha_heap::index_prev(byte * buf)
{
+ DBUG_ASSERT(inited==INDEX);
statistic_increment(ha_read_prev_count,&LOCK_status);
int error=heap_rprev(file,buf);
table->status=error ? STATUS_NOT_FOUND: 0;
@@ -153,6 +157,7 @@ int ha_heap::index_prev(byte * buf)
int ha_heap::index_first(byte * buf)
{
+ DBUG_ASSERT(inited==INDEX);
statistic_increment(ha_read_first_count,&LOCK_status);
int error=heap_rfirst(file, buf, active_index);
table->status=error ? STATUS_NOT_FOUND: 0;
@@ -161,6 +166,7 @@ int ha_heap::index_first(byte * buf)
int ha_heap::index_last(byte * buf)
{
+ DBUG_ASSERT(inited==INDEX);
statistic_increment(ha_read_last_count,&LOCK_status);
int error=heap_rlast(file, buf, active_index);
table->status=error ? STATUS_NOT_FOUND: 0;