diff options
author | svoj@mysql.com/june.mysql.com <> | 2007-11-23 17:51:12 +0400 |
---|---|---|
committer | svoj@mysql.com/june.mysql.com <> | 2007-11-23 17:51:12 +0400 |
commit | 876f49710e7aa9863c3dd84234296d86375b4f1d (patch) | |
tree | 0c286bb63584bb4040541a38cf5d11b305692351 /storage/archive/azio.c | |
parent | ce75b829eef002a35acef8c86a5ceea0c5c23e7f (diff) | |
download | mariadb-git-876f49710e7aa9863c3dd84234296d86375b4f1d.tar.gz |
BUG#31833 - ORDER BY leads to wrong result when ARCHIVE, BLOB and
table cache is full
After reading last record from freshly opened archive table
(e.g. after flush table, or if there is no room in table cache),
the table is reported as crashed.
The problem was that azio wrongly invalidated azio_stream when it
meets EOF.
Diffstat (limited to 'storage/archive/azio.c')
-rw-r--r-- | storage/archive/azio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/storage/archive/azio.c b/storage/archive/azio.c index 2cf0fe114d3..cada6c57918 100644 --- a/storage/archive/azio.c +++ b/storage/archive/azio.c @@ -262,7 +262,7 @@ void check_header(azio_stream *s) if (len) s->inbuf[0] = s->stream.next_in[0]; errno = 0; len = (uInt)my_read(s->file, (uchar *)s->inbuf + len, AZ_BUFSIZE_READ >> len, MYF(0)); - if (len == 0) s->z_err = Z_ERRNO; + if (len == (uInt)-1) s->z_err = Z_ERRNO; s->stream.avail_in += len; s->stream.next_in = s->inbuf; if (s->stream.avail_in < 2) { |