summaryrefslogtreecommitdiff
path: root/mysql-test/t/archive.test
diff options
context:
space:
mode:
authorSergey Vojtovich <sergey.vojtovich@oracle.com>2011-03-03 11:43:07 +0300
committerSergey Vojtovich <sergey.vojtovich@oracle.com>2011-03-03 11:43:07 +0300
commit54755c78cfd78ca081f20af2edbace8cd03891b0 (patch)
treed1bc49f81f91661484eb3eab630342ccfb08fcf9 /mysql-test/t/archive.test
parent27166fc64f54ef82f1800988ffff431868377645 (diff)
downloadmariadb-git-54755c78cfd78ca081f20af2edbace8cd03891b0.tar.gz
BUG#11764339 - valgrind errors, random data when returning
ordered data from archive tables Archive was using wrong memory address to check if field is NULL (after filesort, when reading record again). mysql-test/r/archive.result: A test case for BUG#11764339. mysql-test/t/archive.test: A test case for BUG#11764339. storage/archive/ha_archive.cc: Null bytes are restored to "record" buffer, which may or may not be equal to record buffer for field. Check null bits in "record" buffer, instead of Field::null_ptr.
Diffstat (limited to 'mysql-test/t/archive.test')
-rw-r--r--mysql-test/t/archive.test15
1 files changed, 15 insertions, 0 deletions
diff --git a/mysql-test/t/archive.test b/mysql-test/t/archive.test
index 7084f5f540e..98ba5e03ede 100644
--- a/mysql-test/t/archive.test
+++ b/mysql-test/t/archive.test
@@ -1678,3 +1678,18 @@ SELECT * FROM t1;
REPAIR TABLE t1 EXTENDED;
SELECT * FROM t1;
DROP TABLE t1;
+
+--echo #
+--echo # BUG#57162 - valgrind errors, random data when returning
+--echo # ordered data from archive tables
+--echo #
+SET sort_buffer_size=32804;
+CREATE TABLE t1(a INT, b CHAR(255), c CHAR(255), d CHAR(255),
+ e CHAR(255), f INT) ENGINE=ARCHIVE DEFAULT CHARSET utf8;
+INSERT INTO t1 VALUES(-1,'b','c','d','e',1);
+INSERT INTO t1 SELECT * FROM t1;
+INSERT INTO t1 SELECT * FROM t1;
+INSERT INTO t1 SELECT t1.* FROM t1,t1 t2,t1 t3,t1 t4,t1 t5,t1 t6;
+SELECT * FROM t1 ORDER BY f LIMIT 1;
+DROP TABLE t1;
+SET sort_buffer_size=DEFAULT;