diff options
author | Sergey Vojtovich <svoj@sun.com> | 2009-09-09 14:42:12 +0500 |
---|---|---|
committer | Sergey Vojtovich <svoj@sun.com> | 2009-09-09 14:42:12 +0500 |
commit | 04ed3c9d94de3f426c97c7f193dbcfdd73886206 (patch) | |
tree | ac719e951fcf905b13c6d1713ab90eca17efd08b /mysql-test/t/archive.test | |
parent | fe3b6356ca924b2d1313417bcf5a302f0ba70869 (diff) | |
download | mariadb-git-04ed3c9d94de3f426c97c7f193dbcfdd73886206.tar.gz |
BUG#29203 - archive tables have weird values in show table status
Archive engine returns wrong values for average record length
and max data length.
With this fix they're calculated as following:
- max data length is 2 ^ 63 where large files are supported
and INT_MAX32 where this is not supported;
- average record length is data length / records in data file.
mysql-test/r/archive.result:
A test case for BUG#29203.
mysql-test/t/archive.test:
A test case for BUG#29203.
storage/archive/ha_archive.cc:
Better estimation for average row length and maximal data
file length.
Diffstat (limited to 'mysql-test/t/archive.test')
-rw-r--r-- | mysql-test/t/archive.test | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mysql-test/t/archive.test b/mysql-test/t/archive.test index 7139d95ab49..afb8e413b2c 100644 --- a/mysql-test/t/archive.test +++ b/mysql-test/t/archive.test @@ -1599,3 +1599,14 @@ INSERT INTO t1 VALUES (NULL, NULL),(NULL, NULL); FLUSH TABLE t1; SELECT * FROM t1 ORDER BY a; DROP TABLE t1; + +# +# BUG#29203 - archive tables have weird values in show table status +# +CREATE TABLE t1(a INT, b BLOB) ENGINE=archive; +SELECT DATA_LENGTH, AVG_ROW_LENGTH FROM + INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='t1' AND TABLE_SCHEMA='test'; +INSERT INTO t1 VALUES(1, 'sampleblob1'),(2, 'sampleblob2'); +SELECT DATA_LENGTH, AVG_ROW_LENGTH FROM + INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='t1' AND TABLE_SCHEMA='test'; +DROP TABLE t1; |