mirror of
https://github.com/MariaDB/server.git
synced 2026-05-14 10:57:54 +02:00
Centralized init logic for starting a scan.
storage/archive/ha_archive.cc: Removed multiple execution logic
This commit is contained in:
parent
8866750e6c
commit
ba63bc6841
1 changed files with 3 additions and 15 deletions
|
|
@ -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)))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue