List:Internals« Previous MessageNext Message »
From:Sergey Petrunia Date:April 25 2005 2:00am
Subject:bk commit into 5.0 tree (sergefp:1.1879) BUG#8921
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of psergey. When psergey does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.1879 05/04/25 04:00:35 sergefp@stripped +3 -0
  Fix for BUG#8921: Make SHOW CREATE VIEW ignore temporary tables.

  sql/sql_parse.cc
    1.443 05/04/25 04:00:30 sergefp@stripped +4 -0
    Fix for BUG#8921: Make SHOW CREATE VIEW ignore temporary tables.

  mysql-test/t/temp_table.test
    1.9 05/04/25 04:00:30 sergefp@stripped +15 -0
    Testcase for BUG#8921

  mysql-test/r/temp_table.result
    1.13 05/04/25 04:00:30 sergefp@stripped +26 -0
    Testcase for BUG#8921

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	sergefp
# Host:	newbox.mylan
# Root:	/home/psergey/mysql-5.0-bug9821

--- 1.442/sql/sql_parse.cc	2005-04-22 14:53:42 +04:00
+++ 1.443/sql/sql_parse.cc	2005-04-25 04:00:30 +04:00
@@ -3010,6 +3010,10 @@
     goto error;
 #else
     {
+      /* Ignore temporary tables if this is "SHOW CREATE VIEW" */
+      if (lex->only_view)
+        first_table->skip_temporary= 1;
+
       if (check_db_used(thd, all_tables) ||
 	  check_access(thd, SELECT_ACL | EXTRA_ACL, first_table->db,
 		       &first_table->grant.privilege, 0, 0))

--- 1.12/mysql-test/r/temp_table.result	2005-02-23 15:15:15 +03:00
+++ 1.13/mysql-test/r/temp_table.result	2005-04-25 04:00:30 +04:00
@@ -97,3 +97,29 @@
 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;

--- 1.8/mysql-test/t/temp_table.test	2004-11-02 21:13:23 +03:00
+++ 1.9/mysql-test/t/temp_table.test	2005-04-25 04:00:30 +04:00
@@ -89,3 +89,18 @@
 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;
+
Thread
bk commit into 5.0 tree (sergefp:1.1879) BUG#8921Sergey Petrunia25 Apr