summaryrefslogtreecommitdiff
path: root/mysql-test/t/archive.test
diff options
context:
space:
mode:
authorunknown <svoj@mysql.com/june.mysql.com>2007-06-27 13:19:34 +0500
committerunknown <svoj@mysql.com/june.mysql.com>2007-06-27 13:19:34 +0500
commita38b1ae7c9e7b237acb4daf63edc4d2406478e57 (patch)
tree3f6294dd0ebd3d602d6fb65f8657f5ef1e47f272 /mysql-test/t/archive.test
parentb3b8d5165d76de270532120dd8ce2a216308c0bd (diff)
downloadmariadb-git-a38b1ae7c9e7b237acb4daf63edc4d2406478e57.tar.gz
BUG#29207 - archive table reported as corrupt by check table (P1)
CHECK TABLE against ARCHIVE table may falsely report table corruption, or cause server crash. Fixed by using proper buffer for CHECK TABLE. Affects both 5.0 and 5.1. mysql-test/r/archive.result: A test case for BUG#28916. mysql-test/t/archive.test: A test case for BUG#28916. sql/ha_archive.cc: We call Field::get_length() from get_row(). Field::get_length() assumes that the row was read into table->record[0] buffer, which is not the case when we check a table. As a result we get wrongly initialized blob length. Use table->record[0] as record buffer for check table instead.
Diffstat (limited to 'mysql-test/t/archive.test')
-rw-r--r--mysql-test/t/archive.test9
1 files changed, 9 insertions, 0 deletions
diff --git a/mysql-test/t/archive.test b/mysql-test/t/archive.test
index 0ffbfab3d4f..61033fca3f7 100644
--- a/mysql-test/t/archive.test
+++ b/mysql-test/t/archive.test
@@ -1374,3 +1374,12 @@ insert into t1 values (1);
repair table t1 use_frm;
select * from t1;
drop table t1;
+
+#
+# BUG#29207 - archive table reported as corrupt by check table
+#
+create table t1(a longblob) engine=archive;
+insert into t1 set a='';
+insert into t1 set a='a';
+check table t1 extended;
+drop table t1;