diff options
-rw-r--r-- | mysql-test/r/archive.result | 30 | ||||
-rw-r--r-- | mysql-test/t/archive.test | 24 |
2 files changed, 29 insertions, 25 deletions
diff --git a/mysql-test/r/archive.result b/mysql-test/r/archive.result index c05f7a60e99..793e50cf653 100644 --- a/mysql-test/r/archive.result +++ b/mysql-test/r/archive.result @@ -184,6 +184,22 @@ fld1 fld3 250503 heaving 250504 population 250505 bomb +create table t3 engine=archive select * from t2; +select * from t3 where fld3='bonfire'; +auto fld1 companynr fld3 fld4 fld5 fld6 +1191 068504 00 bonfire corresponds positively +select count(*) from t3; +count(*) +1199 +rename table t3 to t4; +Warnings: +Error 7 Error on rename of './test/t3.ARN' to './test/t4.ARN' (Errcode: 2) +select * from t4 where fld3='bonfire'; +auto fld1 companynr fld3 fld4 fld5 fld6 +1191 068504 00 bonfire corresponds positively +select count(*) from t4; +count(*) +1199 INSERT INTO t2 VALUES (1,000001,00,'Omaha','teethe','neat',''); INSERT INTO t2 VALUES (2,011401,37,'breaking','dreaded','Steinberg','W'); INSERT INTO t2 VALUES (3,011402,37,'Romans','scholastics','jarring',''); @@ -5020,18 +5036,4 @@ auto fld1 companynr fld3 fld4 fld5 fld6 3 011402 37 Romans scholastics jarring 4 011403 37 intercepted audiology tinily INSERT DELAYED INTO t2 VALUES (4,011403,37,'intercepted','audiology','tinily',''); -create table t3 engine=archive select * from t2; -select * from t3 where fld3='bonfire'; -auto fld1 companynr fld3 fld4 fld5 fld6 -1191 068504 00 bonfire corresponds positively -select count(*) from t3; -count(*) -1203 -rename table t3 to t4; -select * from t4 where fld3='bonfire'; -auto fld1 companynr fld3 fld4 fld5 fld6 -1191 068504 00 bonfire corresponds positively -select count(*) from t4; -count(*) -1203 drop table t1, t2, t4; diff --git a/mysql-test/t/archive.test b/mysql-test/t/archive.test index 9d027e65c49..9d25524da5f 100644 --- a/mysql-test/t/archive.test +++ b/mysql-test/t/archive.test @@ -1289,6 +1289,18 @@ select fld3 from t2 where (fld3 like "C%" and fld3 = "Chantilly"); select fld1,fld3 from t2 where fld1 like "25050%"; select fld1,fld3 from t2 where fld1 like "25050_"; + +# +# Test rename of table +# +create table t3 engine=archive select * from t2; +select * from t3 where fld3='bonfire'; +select count(*) from t3; +rename table t3 to t4; +select * from t4 where fld3='bonfire'; +select count(*) from t4; + + # # Test for insert after select # @@ -1308,19 +1320,9 @@ INSERT INTO t2 VALUES (1,000001,00,'Omaha','teethe','neat','') , (2,011401,37,'b SELECT * FROM t2; # Just test syntax, we will never know if the out put is right or wrong +# Must be the last test INSERT DELAYED INTO t2 VALUES (4,011403,37,'intercepted','audiology','tinily',''); # # Cleanup, test is over # - -# -# Test rename of table -# -create table t3 engine=archive select * from t2; -select * from t3 where fld3='bonfire'; -select count(*) from t3; -rename table t3 to t4; -select * from t4 where fld3='bonfire'; -select count(*) from t4; - drop table t1, t2, t4; |