List:Commits« Previous MessageNext Message »
From:Jon Olav Hauglid Date:December 10 2009 12:15pm
Subject:bzr commit into mysql-5.6-next-mr branch (jon.hauglid:3024)
View as plain text  
#At file:///export/home/z/mysql-next-4284-bp2/ based on revid:jon.hauglid@stripped

 3024 Jon Olav Hauglid	2009-12-10
      Backport of revno: 2617.68.45
      
      Bug #47635 assert in start_waiting_global_read_lock during CREATE VIEW
      
      The problem was that CREATE VIEW would trigger an assert if
      a temporary table with the same name already existed.
      
      This bug was fixed by the patch for Bug#47335. CREATE/ALTER VIEW
      will now ignore temporary tables. See Bug#47335 for more information.
      
      Test case added to view.test.

    modified:
      mysql-test/r/view.result
      mysql-test/t/view.test
=== modified file 'mysql-test/r/view.result'
--- a/mysql-test/r/view.result	2009-12-10 12:02:37 +0000
+++ b/mysql-test/r/view.result	2009-12-10 12:15:20 +0000
@@ -3976,3 +3976,18 @@ SELECT * FROM v1;
 f1
 2
 DROP VIEW v1;
+#
+# Bug #47635 assert in start_waiting_global_read_lock 
+#            during CREATE VIEW
+#
+DROP TABLE IF EXISTS t1, t2;
+DROP VIEW IF EXISTS t2;
+CREATE TABLE t1 (f1 integer);
+CREATE TEMPORARY TABLE IF NOT EXISTS t1 (f1 integer);
+CREATE TEMPORARY TABLE t2 (f1 integer);
+DROP TABLE t1;
+FLUSH TABLES WITH READ LOCK;
+CREATE VIEW t2 AS SELECT * FROM t1;
+ERROR HY000: Can't execute the query because you have a conflicting read lock
+UNLOCK TABLES;
+DROP TABLE t1, t2;

=== modified file 'mysql-test/t/view.test'
--- a/mysql-test/t/view.test	2009-12-10 12:02:37 +0000
+++ b/mysql-test/t/view.test	2009-12-10 12:15:20 +0000
@@ -1,3 +1,4 @@
+
 --disable_warnings
 drop table if exists t1,t2,t3,t4,t9,`t1a``b`,v1,v2,v3,v4,v5,v6;
 drop view if exists t1,t2,`t1a``b`,v1,v2,v3,v4,v5,v6;
@@ -3927,3 +3928,25 @@ ALTER VIEW v1 AS SELECT 2 AS f1;
 DROP TABLE v1;
 SELECT * FROM v1;
 DROP VIEW v1;
+
+
+--echo #
+--echo # Bug #47635 assert in start_waiting_global_read_lock 
+--echo #            during CREATE VIEW
+--echo #
+
+--disable_warnings
+DROP TABLE IF EXISTS t1, t2;
+DROP VIEW IF EXISTS t2;
+--enable_warnings
+
+CREATE TABLE t1 (f1 integer);
+CREATE TEMPORARY TABLE IF NOT EXISTS t1 (f1 integer);
+CREATE TEMPORARY TABLE t2 (f1 integer);
+DROP TABLE t1;
+FLUSH TABLES WITH READ LOCK;
+--error ER_CANT_UPDATE_WITH_READLOCK
+CREATE VIEW t2 AS SELECT * FROM t1;
+
+UNLOCK TABLES;
+DROP TABLE t1, t2;


Attachment: [text/bzr-bundle] bzr/jon.hauglid@sun.com-20091210121520-r8frcrrhks821r7t.bundle
Thread
bzr commit into mysql-5.6-next-mr branch (jon.hauglid:3024) Jon Olav Hauglid10 Dec