summaryrefslogtreecommitdiff
path: root/storage/archive
diff options
context:
space:
mode:
authorunknown <brian@zim.(none)>2007-03-26 17:15:31 -0700
committerunknown <brian@zim.(none)>2007-03-26 17:15:31 -0700
commitba63bc68419432a9f551d5545b0ba7af4080c55b (patch)
tree5419045708f998499852966e6fea9d5cda0e5924 /storage/archive
parent8866750e6c081abb967b2fc251cfcf75fe22f5fd (diff)
downloadmariadb-git-ba63bc68419432a9f551d5545b0ba7af4080c55b.tar.gz
Centralized init logic for starting a scan.
storage/archive/ha_archive.cc: Removed multiple execution logic
Diffstat (limited to 'storage/archive')
-rw-r--r--storage/archive/ha_archive.cc18
1 files changed, 3 insertions, 15 deletions
diff --git a/storage/archive/ha_archive.cc b/storage/archive/ha_archive.cc
index 72647b58f54..d0f751fce32 100644
--- a/storage/archive/ha_archive.cc
+++ b/storage/archive/ha_archive.cc
@@ -923,7 +923,7 @@ int ha_archive::index_read(byte *buf, const byte *key,
int ha_archive::index_read_idx(byte *buf, uint index, const byte *key,
uint key_len, enum ha_rkey_function find_flag)
{
- int rc= 0;
+ int rc;
bool found= 0;
KEY *mkey= &table->s->key_info[index];
current_k_offset= mkey->key_part->offset;
@@ -933,22 +933,10 @@ int ha_archive::index_read_idx(byte *buf, uint index, const byte *key,
DBUG_ENTER("ha_archive::index_read_idx");
- /*
- All of the buffer must be written out or we won't see all of the
- data
- */
- pthread_mutex_lock(&share->mutex);
- azflush(&(share->archive_write), Z_SYNC_FLUSH);
- pthread_mutex_unlock(&share->mutex);
+ rc= rnd_init(TRUE);
- /*
- Set the position of the local read thread to the beginning postion.
- */
- if (read_data_header(&archive))
- {
- rc= HA_ERR_CRASHED_ON_USAGE;
+ if (rc)
goto error;
- }
while (!(get_row(&archive, buf)))
{