List:Internals« Previous MessageNext Message »
From:ahristov Date:August 12 2005 3:49pm
Subject:bk commit into 5.0 tree (andrey:1.1983) BUG#12533
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of andrey. When andrey 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.1983 05/08/12 15:49:48 andrey@whirlpool. +3 -0
  add test case for bug #12533 (crash on DESCRIBE <view> after renaming base column)

  sql/sql_show.cc
    1.264 05/08/12 15:49:42 andrey@whirlpool. +3 -0
    even in case of error close the thd tables.

  mysql-test/t/view.test
    1.97 05/08/12 15:49:42 andrey@whirlpool. +15 -0
    add test case for bug #12533

  mysql-test/r/view.result
    1.103 05/08/12 15:48:15 andrey@whirlpool. +10 -0
    results for test of bug 12533

# 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:	andrey
# Host:	whirlpool.
# Root:	/work/mysql-5.0-setopt

--- 1.263/sql/sql_show.cc	2005-08-09 09:37:44 +02:00
+++ 1.264/sql/sql_show.cc	2005-08-12 15:49:42 +02:00
@@ -1982,7 +1982,10 @@
     if (schema_table->process_table(thd, show_table_list,
                                     table, res, show_table_list->db,
                                     show_table_list->alias))
+    {
+      close_thread_tables(thd);
       goto err;
+    }
     close_thread_tables(thd);
     show_table_list->table= 0;
     error= 0;

--- 1.102/mysql-test/r/view.result	2005-08-12 10:19:21 +02:00
+++ 1.103/mysql-test/r/view.result	2005-08-12 15:48:15 +02:00
@@ -2092,3 +2092,13 @@
 a
 DROP VIEW v1;
 DROP TABLE t1,t2,t3,t4,t5;
+DROP TABLE IF EXISTS t1;
+DROP VIEW  IF EXISTS v1;
+CREATE TABLE t1 (f4 CHAR(5));
+CREATE VIEW v1 AS SELECT * FROM t1;
+DESCRIBE v1;
+Field	Type	Null	Key	Default	Extra
+f4	char(5)	YES		NULL	
+ALTER TABLE t1 CHANGE COLUMN f4 f4x CHAR(5);
+DESCRIBE v1;
+ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s)

--- 1.96/mysql-test/t/view.test	2005-08-12 10:18:48 +02:00
+++ 1.97/mysql-test/t/view.test	2005-08-12 15:49:42 +02:00
@@ -1937,3 +1937,18 @@
 DROP TABLE t1,t2,t3,t4,t5;
 
 
+#
+# BUG #12533 (crash on DESCRIBE <view> after renaming base table column)
+#
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+DROP VIEW  IF EXISTS v1;
+--enable_warnings
+
+CREATE TABLE t1 (f4 CHAR(5));
+CREATE VIEW v1 AS SELECT * FROM t1;
+DESCRIBE v1;
+
+ALTER TABLE t1 CHANGE COLUMN f4 f4x CHAR(5);
+--error 1356
+DESCRIBE v1;
Thread
bk commit into 5.0 tree (andrey:1.1983) BUG#12533ahristov12 Aug