List:Internals« Previous MessageNext Message »
From:igor Date:August 23 2005 2:32am
Subject:bk commit into 5.0 tree (igor:1.1903) BUG#12636
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of igor. When igor 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.1903 05/08/22 17:32:02 igor@stripped +3 -0
  sql_show.cc:
    Database name was set incorrectly for any show command
    that used sunqueries in its where condition.
  information_schema.test, information_schema.result:
    Added a test case for bug #12636.

  sql/sql_show.cc
    1.271 05/08/22 17:29:20 igor@stripped +1 -1
    Database name was set incorrectly for any show command
    that used sunqueries in its where condition.

  mysql-test/t/information_schema.test
    1.52 05/08/22 17:25:45 igor@stripped +15 -0
    Added a test case for bug #12636.

  mysql-test/r/information_schema.result
    1.74 05/08/22 17:25:09 igor@stripped +8 -0
    Added a test case for bug #12636.

# 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:	igor
# Host:	rurik.mysql.com
# Root:	/home/igor/dev/mysql-5.0-0

--- 1.270/sql/sql_show.cc	Fri Aug 19 11:38:41 2005
+++ 1.271/sql/sql_show.cc	Mon Aug 22 17:29:20 2005
@@ -1705,7 +1705,7 @@
   case SQLCOM_SHOW_TABLES:
   case SQLCOM_SHOW_TABLE_STATUS:
   case SQLCOM_SHOW_TRIGGERS:
-    index_field_values->db_value= lex->current_select->db;
+    index_field_values->db_value= lex->select_lex.db;
     index_field_values->table_value= wild;
     break;
   default:

--- 1.73/mysql-test/r/information_schema.result	Fri Aug 19 11:40:36 2005
+++ 1.74/mysql-test/r/information_schema.result	Mon Aug 22 17:25:09 2005
@@ -967,3 +967,11 @@
 b	NULL
 use test;
 drop table t1;
+CREATE TABLE t1 (a int);
+CREATE TABLE t2 (b int);
+SHOW TABLE STATUS FROM test
+WHERE name IN ( SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES
+WHERE TABLE_SCHEMA='test' AND TABLE_TYPE='BASE TABLE');
+Name	Engine	Version	Row_format	Rows	Avg_row_length	Data_length	Max_data_length	Index_length	Data_free	Auto_increment	Create_time	Update_time	Check_time	Collation	Checksum	Create_options	Comment
+t1	MyISAM	10	Fixed	0	0	0	#	1024	0	NULL	#	#	NULL	latin1_swedish_ci	NULL		
+t2	MyISAM	10	Fixed	0	0	0	#	1024	0	NULL	#	#	NULL	latin1_swedish_ci	NULL		

--- 1.51/mysql-test/t/information_schema.test	Tue Aug 16 12:07:16 2005
+++ 1.52/mysql-test/t/information_schema.test	Mon Aug 22 17:25:45 2005
@@ -650,3 +650,18 @@
   where table_schema='test' and table_name='t1';
 use test;
 drop table t1;
+
+#
+# Bug #12636: SHOW TABLE STATUS with where condition containing a subquery
+#             over information schema
+#
+
+CREATE TABLE t1 (a int);
+CREATE TABLE t2 (b int);
+
+--replace_column 8 # 12 # 13 #
+SHOW TABLE STATUS FROM test
+  WHERE name IN ( SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES
+                    WHERE TABLE_SCHEMA='test' AND TABLE_TYPE='BASE TABLE');
+
+DROP TABLE t1,t2
Thread
bk commit into 5.0 tree (igor:1.1903) BUG#12636igor23 Aug