diff options
author | Ramil Kalimullin <ramil@mysql.com> | 2008-08-26 18:48:50 +0500 |
---|---|---|
committer | Ramil Kalimullin <ramil@mysql.com> | 2008-08-26 18:48:50 +0500 |
commit | b21997851493d2da85a34e8de669f55ae60a12f5 (patch) | |
tree | 394f2027a5da1365dc8bcf00213ccf58b8d61289 /mysql-test/t/myisam.test | |
parent | 3b1adb501e426682c0c7bdca455694d0d4c39342 (diff) | |
download | mariadb-git-b21997851493d2da85a34e8de669f55ae60a12f5.tar.gz |
Fix for bug #37310: 'on update CURRENT_TIMESTAMP' option crashes the table
Problem: data consistency check (maximum record length) for a correct
MyISAM table with CHECKSUM=1 and ROW_FORMAT=DYNAMIC option
may fail due to wrong inner MyISAM parameter. In result we may
have the table marked as 'corrupted'.
Fix: properly set MyISAM maximum record length parameter.
myisam/mi_create.c:
Fix for bug #37310: 'on update CURRENT_TIMESTAMP' option crashes the table
Use HA_OPTION_PACK_RECORD instead of HA_PACK_RECORD (typo?)
calculating packed record length.
Diffstat (limited to 'mysql-test/t/myisam.test')
-rw-r--r-- | mysql-test/t/myisam.test | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test index 90d4fc01afb..254b0378aa8 100644 --- a/mysql-test/t/myisam.test +++ b/mysql-test/t/myisam.test @@ -1210,4 +1210,19 @@ SELECT * FROM t1; DROP TABLE t1, t2; + +# +# Bug#37310: 'on update CURRENT_TIMESTAMP' option crashes the table +# +CREATE TABLE t1 (a INT) ENGINE=MyISAM CHECKSUM=1 ROW_FORMAT=DYNAMIC; +INSERT INTO t1 VALUES (0); +UPDATE t1 SET a=1; +SELECT a FROM t1; +CHECK TABLE t1; +INSERT INTO t1 VALUES (0), (5), (4), (2); +UPDATE t1 SET a=2; +SELECT a FROM t1; +CHECK TABLE t1; +DROP TABLE t1; + --echo End of 5.0 tests |