summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <sergefp@mysql.com>2005-04-29 02:52:20 +0400
committerunknown <sergefp@mysql.com>2005-04-29 02:52:20 +0400
commitcfd042108a8d4a38422d965b2a1d1fc8f32f7330 (patch)
treec7f8e894f92e54da4d0ca36acda56b8e87d1fb6e /mysql-test
parent5192a1a368bff56e752a79488de8c0659c7160e9 (diff)
parent85ef43b4d09ca3899f379868dfbc414e84fc700b (diff)
downloadmariadb-git-cfd042108a8d4a38422d965b2a1d1fc8f32f7330.tar.gz
Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/psergey/mysql-5.0-bug9821 sql/sql_parse.cc: Auto merged
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/temp_table.result26
-rw-r--r--mysql-test/t/temp_table.test15
2 files changed, 41 insertions, 0 deletions
diff --git a/mysql-test/r/temp_table.result b/mysql-test/r/temp_table.result
index 2dd58f54327..f43fd09982a 100644
--- a/mysql-test/r/temp_table.result
+++ b/mysql-test/r/temp_table.result
@@ -97,3 +97,29 @@ Variable_name Value
Created_tmp_disk_tables 0
Created_tmp_tables 2
drop table t1;
+create temporary table t1 as select 'This is temp. table' A;
+create view t1 as select 'This is view' A;
+select * from t1;
+A
+This is temp. table
+show create table t1;
+Table Create Table
+t1 CREATE TEMPORARY TABLE `t1` (
+ `A` varchar(19) NOT NULL default ''
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+show create view t1;
+View Create View
+t1 CREATE ALGORITHM=UNDEFINED VIEW `test`.`t1` AS select _latin1'This is view' AS `A`
+drop view t1;
+select * from t1;
+A
+This is temp. table
+create view t1 as select 'This is view again' A;
+select * from t1;
+A
+This is temp. table
+drop table t1;
+select * from t1;
+A
+This is view again
+drop view t1;
diff --git a/mysql-test/t/temp_table.test b/mysql-test/t/temp_table.test
index 74276c7668c..eeb33515570 100644
--- a/mysql-test/t/temp_table.test
+++ b/mysql-test/t/temp_table.test
@@ -89,3 +89,18 @@ flush status;
select * from t1 group by d;
show status like "created_tmp%tables";
drop table t1;
+
+# Fix for BUG#8921: Check that temporary table is ingored by view commands.
+create temporary table t1 as select 'This is temp. table' A;
+create view t1 as select 'This is view' A;
+select * from t1;
+show create table t1;
+show create view t1;
+drop view t1;
+select * from t1;
+create view t1 as select 'This is view again' A;
+select * from t1;
+drop table t1;
+select * from t1;
+drop view t1;
+