diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-04-09 16:18:33 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-04-09 16:18:33 +0200 |
commit | 02c712aa546df8d6e9c285e6adc95309925673e3 (patch) | |
tree | 8d6654dac2666dcd738db1f10dbd919610087795 /mysql-test/suite/archive | |
parent | f6168bb67bb5cab0584809c876c674a92051b5d1 (diff) | |
download | mariadb-git-02c712aa546df8d6e9c285e6adc95309925673e3.tar.gz |
* frm extra2 segment.
* persistent table versions in the extra2
* ha_archive::frm_compare using TABLE_SHARE::tabledef_version
* distinguish between "important" and "optional" extra2 frm values
* write engine-defined attributes (aka "table options") to extra2, not to extra,
but still read from the old location, if they're found there.
Diffstat (limited to 'mysql-test/suite/archive')
-rw-r--r-- | mysql-test/suite/archive/archive.result | 9 | ||||
-rw-r--r-- | mysql-test/suite/archive/archive.test | 2 | ||||
-rw-r--r-- | mysql-test/suite/archive/discover.result | 38 | ||||
-rw-r--r-- | mysql-test/suite/archive/discover.test | 15 | ||||
-rw-r--r-- | mysql-test/suite/archive/partition_archive.result | 4 |
5 files changed, 35 insertions, 33 deletions
diff --git a/mysql-test/suite/archive/archive.result b/mysql-test/suite/archive/archive.result index 287c2991c1d..a170cdfbd8c 100644 --- a/mysql-test/suite/archive/archive.result +++ b/mysql-test/suite/archive/archive.result @@ -12701,12 +12701,12 @@ 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'; DATA_LENGTH AVG_ROW_LENGTH -535 15 +550 15 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'; DATA_LENGTH AVG_ROW_LENGTH -569 284 +584 292 DROP TABLE t1; SET @save_join_buffer_size= @@join_buffer_size; SET @@join_buffer_size= 8192; @@ -12818,10 +12818,11 @@ select * from t1; a b flush tables; select * from t1; -a b -1 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +ERROR HY000: Table 't1' is marked as crashed and should be repaired show warnings; Level Code Message +Warning 127 Got error 127 when reading table `test`.`t1` +Error 1194 Table 't1' is marked as crashed and should be repaired drop table t1; create temporary table t1 (a int) engine=archive; insert t1 values (1),(2),(3); diff --git a/mysql-test/suite/archive/archive.test b/mysql-test/suite/archive/archive.test index 2acf8b9e6b5..1114eb4e89a 100644 --- a/mysql-test/suite/archive/archive.test +++ b/mysql-test/suite/archive/archive.test @@ -1738,7 +1738,7 @@ select * from t1; # open the table to create the frm flush tables; # and close the table again --remove_file $MYSQLD_DATADIR/test/t1.ARZ copy_file std_data/t917689.ARZ $MYSQLD_DATADIR/test/t1.ARZ; -#--error ER_CRASHED_ON_USAGE +--error ER_CRASHED_ON_USAGE select * from t1; show warnings; drop table t1; diff --git a/mysql-test/suite/archive/discover.result b/mysql-test/suite/archive/discover.result index 8cae289733b..7ffaf30d4d2 100644 --- a/mysql-test/suite/archive/discover.result +++ b/mysql-test/suite/archive/discover.result @@ -17,6 +17,8 @@ select * from t1; a 1 2 +t1.ARZ +t1.frm # # show tables # @@ -28,10 +30,9 @@ show tables; Tables_in_test t1 t2 -select * from t1; -a -1 -2 +t1.ARZ +t2.ARZ +t2.frm # # show full tables # @@ -40,29 +41,27 @@ show full tables; Tables_in_test Table_type t1 BASE TABLE t2 BASE TABLE -select * from t1; -a -1 -2 +t1.ARZ +t2.ARZ +t2.frm # # discover on truncate # flush tables; truncate table t1; ERROR HY000: Table storage engine for 't1' doesn't have this option -show tables; -Tables_in_test -t1 -t2 +t1.ARZ +t1.frm +t2.ARZ +t2.frm # # discover on rename # flush tables; rename table t2 to t0; -show tables; -Tables_in_test -t0 -t1 +t0.ARZ +t1.ARZ +t1.frm # # discover on HA_ERR_TABLE_DEF_CHANGED # @@ -77,9 +76,7 @@ t1 CREATE TABLE `t1` ( # flush tables; drop table t1; -show tables; -Tables_in_test -t0 +t0.ARZ # # discover of table non-existance on drop # @@ -89,6 +86,9 @@ flush tables; select * from t1; ERROR 42S02: Table 'test.t1' doesn't exist drop table t0; +show status like 'Handler_discover'; +Variable_name Value +Handler_discover 7 # # Bug#45377: ARCHIVE tables aren't discoverable after OPTIMIZE # diff --git a/mysql-test/suite/archive/discover.test b/mysql-test/suite/archive/discover.test index 7a588d4654d..75668baafbf 100644 --- a/mysql-test/suite/archive/discover.test +++ b/mysql-test/suite/archive/discover.test @@ -13,6 +13,7 @@ remove_file $mysqld_datadir/test/t1.frm; flush tables; insert t1 values (2); select * from t1; +--list_files $mysqld_datadir/test --echo # --echo # show tables @@ -22,24 +23,22 @@ select * from t2; remove_file $mysqld_datadir/test/t1.frm; flush tables; show tables; -select * from t1; +--list_files $mysqld_datadir/test --echo # --echo # show full tables --echo # -remove_file $mysqld_datadir/test/t1.frm; flush tables; show full tables; -select * from t1; +--list_files $mysqld_datadir/test --echo # --echo # discover on truncate --echo # -remove_file $mysqld_datadir/test/t1.frm; flush tables; --error ER_ILLEGAL_HA truncate table t1; -show tables; +--list_files $mysqld_datadir/test --echo # --echo # discover on rename @@ -47,7 +46,7 @@ show tables; remove_file $mysqld_datadir/test/t2.frm; flush tables; rename table t2 to t0; -show tables; +--list_files $mysqld_datadir/test --echo # --echo # discover on HA_ERR_TABLE_DEF_CHANGED @@ -63,7 +62,7 @@ show create table t1; remove_file $mysqld_datadir/test/t1.frm; flush tables; drop table t1; -show tables; +--list_files $mysqld_datadir/test --echo # --echo # discover of table non-existance on drop @@ -74,6 +73,8 @@ flush tables; --error ER_NO_SUCH_TABLE select * from t1; drop table t0; +--list_files $mysqld_datadir/test +show status like 'Handler_discover'; --echo # --echo # Bug#45377: ARCHIVE tables aren't discoverable after OPTIMIZE diff --git a/mysql-test/suite/archive/partition_archive.result b/mysql-test/suite/archive/partition_archive.result index 27ec5edb429..0ba50c38e8d 100644 --- a/mysql-test/suite/archive/partition_archive.result +++ b/mysql-test/suite/archive/partition_archive.result @@ -15,10 +15,10 @@ ENGINE = ARCHIVE; INSERT INTO t1 VALUES(CURRENT_DATE); SELECT DATA_LENGTH, INDEX_LENGTH FROM information_schema.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1'; DATA_LENGTH INDEX_LENGTH -520 0 +535 0 SELECT DATA_LENGTH, INDEX_LENGTH FROM information_schema.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1'; DATA_LENGTH INDEX_LENGTH -520 0 +535 0 DROP TABLE t1; drop database if exists db99; drop table if exists t1; |