diff options
author | unknown <joerg@debian.(none)> | 2007-04-20 12:31:03 +0200 |
---|---|---|
committer | unknown <joerg@debian.(none)> | 2007-04-20 12:31:03 +0200 |
commit | 515c64875b91c93de45cd4e8a2361327383a36c8 (patch) | |
tree | 47d004d52f842265cb7a96ee4b590f89e39585d0 /mysql-test | |
parent | 4eecb58fd65e77091c930f0a039a59e85d2c1b5d (diff) | |
parent | ad14c2475b523c39d06767896ae6d98178fcc579 (diff) | |
download | mariadb-git-515c64875b91c93de45cd4e8a2361327383a36c8.tar.gz |
Merge debian.(none):/M50/mysql-5.0
into debian.(none):/M50/push-5.0
sql/ha_ndbcluster.cc:
Auto merged
sql/sql_delete.cc:
Auto merged
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/truncate.result | 26 | ||||
-rw-r--r-- | mysql-test/t/truncate.test | 31 |
2 files changed, 11 insertions, 46 deletions
diff --git a/mysql-test/r/truncate.result b/mysql-test/r/truncate.result index 6c21db0e2b8..b194f9b7dc6 100644 --- a/mysql-test/r/truncate.result +++ b/mysql-test/r/truncate.result @@ -57,26 +57,6 @@ create table t1 (s1 int); insert into t1 (s1) values (1), (2), (3), (4), (5); create view v1 as select * from t1; truncate table v1; -select count(*) from t1; -count(*) -0 -insert into t1 (s1) values (1), (2), (3), (4), (5); -create view v2 as select * from t1 where s1 > 3; -truncate table v2; -select * from t1; -s1 -1 -2 -3 -select * from v2; -s1 -delete from t1; -create table t2 (s1 int, s2 int); -create view v3 as select a.s1, b.s2 from t1 a join t2 b on a.s1 = b.s1 where a.s1 > 3; -truncate table v3; -ERROR HY000: Can not delete from join view 'test.v3' -create view v4 as select * from t1 limit 1,1; -truncate table v4; -ERROR HY000: The target table v4 of the TRUNCATE is not updatable -drop view v1, v2, v3, v4; -drop table t1, t2; +ERROR 42S02: Table 'test.v1' doesn't exist +drop view v1; +drop table t1; diff --git a/mysql-test/t/truncate.test b/mysql-test/t/truncate.test index c52260124cb..ba5364bd324 100644 --- a/mysql-test/t/truncate.test +++ b/mysql-test/t/truncate.test @@ -54,33 +54,18 @@ drop table t1; # End of 4.1 tests # Test for Bug#5507 "TRUNCATE should work with views" +# +# when it'll be fixed, the error should become 1347 +# (test.v1' is not BASE TABLE) +# create table t1 (s1 int); - insert into t1 (s1) values (1), (2), (3), (4), (5); create view v1 as select * from t1; +--error 1146 truncate table v1; -select count(*) from t1; - -insert into t1 (s1) values (1), (2), (3), (4), (5); -create view v2 as select * from t1 where s1 > 3; -truncate table v2; -select * from t1; -select * from v2; -delete from t1; - -# The following should fail -create table t2 (s1 int, s2 int); -create view v3 as select a.s1, b.s2 from t1 a join t2 b on a.s1 = b.s1 where a.s1 > 3; ---error 1395 -truncate table v3; - -# The following should fail -create view v4 as select * from t1 limit 1,1; ---error 1288 -truncate table v4; - -drop view v1, v2, v3, v4; -drop table t1, t2; +drop view v1; +drop table t1; # End of 5.0 tests + |