List:Internals« Previous MessageNext Message »
From:gluh Date:September 1 2005 10:22am
Subject:bk commit into 5.0 tree (gluh:1.1932) BUG#12905
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of gluh. When gluh 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.1932 05/09/01 13:22:51 gluh@stripped +3 -0
  Fix for bug#12905 show fields from view behaving erratically with current database
    use saved view db name in case of view

  sql/sql_show.cc
    1.273 05/09/01 13:21:42 gluh@stripped +5 -2
    Fix for bug#12905 show fields from view behaving erratically with current database
      use saved view db name in case of view

  mysql-test/t/information_schema.test
    1.55 05/09/01 13:21:42 gluh@stripped +13 -1
    Fix for bug#12905 show fields from view behaving erratically with current database
      test case

  mysql-test/r/information_schema.result
    1.79 05/09/01 13:21:42 gluh@stripped +11 -0
    Fix for bug#12905 show fields from view behaving erratically with current database
      test case

# 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:	gluh
# Host:	eagle.intranet.mysql.r18.ru
# Root:	/home/gluh/MySQL/Bugs/5.0.12905

--- 1.272/sql/sql_show.cc	Fri Aug 26 12:56:16 2005
+++ 1.273/sql/sql_show.cc	Thu Sep  1 13:21:42 2005
@@ -1990,8 +1990,11 @@
       return only these and not the result code of ::process_table()
     */
     error= test(schema_table->process_table(thd, show_table_list,
-                                    table, res, show_table_list->db,
-                                    show_table_list->alias));
+                                            table, res, 
+                                            show_table_list->view ?
+                                            show_table_list->view_db.str :
+                                            show_table_list->db,
+                                            show_table_list->alias));
     close_thread_tables(thd);
     show_table_list->table= 0;
     goto err;

--- 1.78/mysql-test/r/information_schema.result	Sat Aug 27 15:29:29 2005
+++ 1.79/mysql-test/r/information_schema.result	Thu Sep  1 13:21:42 2005
@@ -979,3 +979,14 @@
 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		
+DROP TABLE t1,t2;
+create table t1(f1 int);
+create view v1 (c) as select f1 from t1;
+select database();
+database()
+NULL
+show fields from test.v1;
+Field	Type	Null	Key	Default	Extra
+c	int(11)	YES		NULL	
+drop view v1;
+drop table t1;

--- 1.54/mysql-test/t/information_schema.test	Thu Aug 25 14:03:13 2005
+++ 1.55/mysql-test/t/information_schema.test	Thu Sep  1 13:21:42 2005
@@ -665,4 +665,16 @@
   WHERE name IN ( SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES
                     WHERE TABLE_SCHEMA='test' AND TABLE_TYPE='BASE TABLE');
 
-DROP TABLE t1,t2
+DROP TABLE t1,t2;
+
+#
+# Bug #12905 show fields from view behaving erratically with current database
+#
+create table t1(f1 int);
+create view v1 (c) as select f1 from t1;
+connect (con5,localhost,root,,*NO-ONE*);
+select database();
+show fields from test.v1;
+connection default;
+drop view v1;
+drop table t1;
Thread
bk commit into 5.0 tree (gluh:1.1932) BUG#12905gluh1 Sep