summaryrefslogtreecommitdiff
path: root/storage/archive
diff options
context:
space:
mode:
authorunknown <gshchepa/uchum@gleb.loc>2007-10-28 01:27:47 +0500
committerunknown <gshchepa/uchum@gleb.loc>2007-10-28 01:27:47 +0500
commit639e35d031c7f21919de03445b025b7822bf242e (patch)
treeca057938d520a85e77ce381658efed1f51a7ada5 /storage/archive
parente2bd6c6b124098f55066ba64be05f8219fdaedc0 (diff)
parentb9ecbb7e5c764158b81597b4197a926732c31004 (diff)
downloadmariadb-git-639e35d031c7f21919de03445b025b7822bf242e.tar.gz
Merge gleb.loc:/home/uchum/work/bk/PA/5.1-opt-31036-v
into gleb.loc:/home/uchum/work/bk/5.1-opt mysql-test/r/archive.result: Auto merged mysql-test/t/archive.test: Auto merged storage/archive/azio.c: Auto merged
Diffstat (limited to 'storage/archive')
-rw-r--r--storage/archive/azio.c10
-rw-r--r--storage/archive/ha_archive.cc4
2 files changed, 7 insertions, 7 deletions
diff --git a/storage/archive/azio.c b/storage/archive/azio.c
index c04749444cb..2cf0fe114d3 100644
--- a/storage/archive/azio.c
+++ b/storage/archive/azio.c
@@ -681,8 +681,8 @@ my_off_t azseek (s, offset, whence)
/* There was a zmemzero here if inbuf was null -Brian */
while (offset > 0)
{
- uInt size = AZ_BUFSIZE_WRITE;
- if (offset < AZ_BUFSIZE_WRITE) size = (uInt)offset;
+ uInt size = AZ_BUFSIZE_READ;
+ if (offset < AZ_BUFSIZE_READ) size = (uInt)offset;
size = azwrite(s, s->inbuf, size);
if (size == 0) return -1L;
@@ -725,11 +725,11 @@ my_off_t azseek (s, offset, whence)
}
while (offset > 0) {
int error;
- unsigned int size = AZ_BUFSIZE_READ;
- if (offset < AZ_BUFSIZE_READ) size = (int)offset;
+ unsigned int size = AZ_BUFSIZE_WRITE;
+ if (offset < AZ_BUFSIZE_WRITE) size = (int)offset;
size = azread(s, s->outbuf, size, &error);
- if (error <= 0) return -1L;
+ if (error < 0) return -1L;
offset -= size;
}
return s->out;
diff --git a/storage/archive/ha_archive.cc b/storage/archive/ha_archive.cc
index 6696eac2fbb..3015ae78761 100644
--- a/storage/archive/ha_archive.cc
+++ b/storage/archive/ha_archive.cc
@@ -1241,8 +1241,8 @@ int ha_archive::rnd_pos(uchar * buf, uchar *pos)
DBUG_ENTER("ha_archive::rnd_pos");
ha_statistic_increment(&SSV::ha_read_rnd_next_count);
current_position= (my_off_t)my_get_ptr(pos, ref_length);
- (void)azseek(&archive, current_position, SEEK_SET);
-
+ if (azseek(&archive, current_position, SEEK_SET) < 0)
+ DBUG_RETURN(HA_ERR_CRASHED_ON_USAGE);
DBUG_RETURN(get_row(&archive, buf));
}