List:Commits« Previous MessageNext Message »
From:gluh Date:September 28 2007 11:02am
Subject:bk commit into 5.1 tree (gluh:1.2573) BUG#30689
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 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@stripped, 2007-09-28 16:02:43+05:00, gluh@stripped +5 -0
  Bug#30689 Wrong content in I_S.VIEWS.VIEW_DEFINITION if VIEW is based on I_S
  view_body_utf8 attribute type is changed to 'escaped string'

  mysql-test/r/ddl_i18n_koi8r.result@stripped, 2007-09-28 16:02:41+05:00, gluh@stripped +4 -2
    result fix

  mysql-test/r/ddl_i18n_utf8.result@stripped, 2007-09-28 16:02:41+05:00, gluh@stripped +4 -2
    result fix

  mysql-test/r/information_schema.result@stripped, 2007-09-28 16:02:41+05:00, gluh@stripped +16 -4
    result fix

  mysql-test/t/information_schema.test@stripped, 2007-09-28 16:02:41+05:00, gluh@stripped +10 -0
    test case

  sql/sql_view.cc@stripped, 2007-09-28 16:02:41+05:00, gluh@stripped +1 -1
    Bug#30689 Wrong content in I_S.VIEWS.VIEW_DEFINITION if VIEW is based on I_S
    view_body_utf8 attribute type is changed to 'escaped string'

diff -Nrup a/mysql-test/r/ddl_i18n_koi8r.result b/mysql-test/r/ddl_i18n_koi8r.result
--- a/mysql-test/r/ddl_i18n_koi8r.result	2007-07-30 15:03:35 +05:00
+++ b/mysql-test/r/ddl_i18n_koi8r.result	2007-09-28 16:02:41 +05:00
@@ -29,7 +29,8 @@ v2	CREATE ALGORITHM=UNDEFINED DEFINER=`r
 
 SELECT * FROM INFORMATION_SCHEMA.VIEWS WHERE table_name = 'v1'|
 TABLE_CATALOG	TABLE_SCHEMA	TABLE_NAME	VIEW_DEFINITION	CHECK_OPTION	IS_UPDATABLE	DEFINER	SECURITY_TYPE	CHARACTER_SET_CLIENT	COLLATION_CONNECTION
+FROM t1	NONE	YES	root@localhost	DEFINER	koi8r	koi8r_general_ci
 
 SELECT * FROM INFORMATION_SCHEMA.VIEWS WHERE table_name = 'v2'|
 TABLE_CATALOG	TABLE_SCHEMA	TABLE_NAME	VIEW_DEFINITION	CHECK_OPTION	IS_UPDATABLE	DEFINER	SECURITY_TYPE	CHARACTER_SET_CLIENT	COLLATION_CONNECTION
@@ -68,7 +69,8 @@ v2	CREATE ALGORITHM=UNDEFINED DEFINER=`r
 
 SELECT * FROM INFORMATION_SCHEMA.VIEWS WHERE table_name = 'v1'|
 TABLE_CATALOG	TABLE_SCHEMA	TABLE_NAME	VIEW_DEFINITION	CHECK_OPTION	IS_UPDATABLE	DEFINER	SECURITY_TYPE	CHARACTER_SET_CLIENT	COLLATION_CONNECTION
+FROM t1	NONE	YES	root@localhost	DEFINER	koi8r	koi8r_general_ci
 
 SELECT * FROM INFORMATION_SCHEMA.VIEWS WHERE table_name = 'v2'|
 TABLE_CATALOG	TABLE_SCHEMA	TABLE_NAME	VIEW_DEFINITION	CHECK_OPTION	IS_UPDATABLE	DEFINER	SECURITY_TYPE	CHARACTER_SET_CLIENT	COLLATION_CONNECTION
diff -Nrup a/mysql-test/r/ddl_i18n_utf8.result b/mysql-test/r/ddl_i18n_utf8.result
--- a/mysql-test/r/ddl_i18n_utf8.result	2007-07-30 15:03:35 +05:00
+++ b/mysql-test/r/ddl_i18n_utf8.result	2007-09-28 16:02:41 +05:00
@@ -29,7 +29,8 @@ v2	CREATE ALGORITHM=UNDEFINED DEFINER=`r
 
 SELECT * FROM INFORMATION_SCHEMA.VIEWS WHERE table_name = 'v1'|
 TABLE_CATALOG	TABLE_SCHEMA	TABLE_NAME	VIEW_DEFINITION	CHECK_OPTION	IS_UPDATABLE	DEFINER	SECURITY_TYPE	CHARACTER_SET_CLIENT	COLLATION_CONNECTION
-NULL	mysqltest1	v1	SELECT 'тест' AS c1, кол AS c2	NONE	YES	root@localhost	DEFINER	utf8	utf8_general_ci
+NULL	mysqltest1	v1	SELECT 'тест' AS c1, кол AS c2
+FROM t1	NONE	YES	root@localhost	DEFINER	utf8	utf8_general_ci
 
 SELECT * FROM INFORMATION_SCHEMA.VIEWS WHERE table_name = 'v2'|
 TABLE_CATALOG	TABLE_SCHEMA	TABLE_NAME	VIEW_DEFINITION	CHECK_OPTION	IS_UPDATABLE	DEFINER	SECURITY_TYPE	CHARACTER_SET_CLIENT	COLLATION_CONNECTION
@@ -68,7 +69,8 @@ v2	CREATE ALGORITHM=UNDEFINED DEFINER=`r
 
 SELECT * FROM INFORMATION_SCHEMA.VIEWS WHERE table_name = 'v1'|
 TABLE_CATALOG	TABLE_SCHEMA	TABLE_NAME	VIEW_DEFINITION	CHECK_OPTION	IS_UPDATABLE	DEFINER	SECURITY_TYPE	CHARACTER_SET_CLIENT	COLLATION_CONNECTION
-NULL	mysqltest1	v1	SELECT 'тест' AS c1, кол AS c2	NONE	YES	root@localhost	DEFINER	utf8	utf8_general_ci
+NULL	mysqltest1	v1	SELECT 'тест' AS c1, кол AS c2
+FROM t1	NONE	YES	root@localhost	DEFINER	utf8	utf8_general_ci
 
 SELECT * FROM INFORMATION_SCHEMA.VIEWS WHERE table_name = 'v2'|
 TABLE_CATALOG	TABLE_SCHEMA	TABLE_NAME	VIEW_DEFINITION	CHECK_OPTION	IS_UPDATABLE	DEFINER	SECURITY_TYPE	CHARACTER_SET_CLIENT	COLLATION_CONNECTION
diff -Nrup a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result
--- a/mysql-test/r/information_schema.result	2007-09-20 13:56:24 +05:00
+++ b/mysql-test/r/information_schema.result	2007-09-28 16:02:41 +05:00
@@ -387,10 +387,14 @@ Table	Non_unique	Key_name	Seq_in_index	C
 select * from information_schema.views where TABLE_NAME like "v%";
 TABLE_CATALOG	TABLE_SCHEMA	TABLE_NAME	VIEW_DEFINITION	CHECK_OPTION	IS_UPDATABLE	DEFINER	SECURITY_TYPE	CHARACTER_SET_CLIENT	COLLATION_CONNECTION
 NULL	test	v0	select schema_name from information_schema.schemata	NONE	NO	root@localhost	DEFINER	latin1	latin1_swedish_ci
-NULL	test	v1	select table_name from information_schema.tables	NONE	NO	root@localhost	DEFINER	latin1	latin1_swedish_ci
-NULL	test	v2	select column_name from information_schema.columns	NONE	NO	root@localhost	DEFINER	latin1	latin1_swedish_ci
-NULL	test	v3	select CHARACTER_SET_NAME from information_schema.character_sets	NONE	NO	root@localhost	DEFINER	latin1	latin1_swedish_ci
-NULL	test	v4	select COLLATION_NAME from information_schema.collations	NONE	NO	root@localhost	DEFINER	latin1	latin1_swedish_ci
+NULL	test	v1	select table_name from information_schema.tables
+where table_name="v1"	NONE	NO	root@localhost	DEFINER	latin1	latin1_swedish_ci
+NULL	test	v2	select column_name from information_schema.columns
+where table_name="v2"	NONE	NO	root@localhost	DEFINER	latin1	latin1_swedish_ci
+NULL	test	v3	select CHARACTER_SET_NAME from information_schema.character_sets
+where CHARACTER_SET_NAME like "latin1%"	NONE	NO	root@localhost	DEFINER	latin1	latin1_swedish_ci
+NULL	test	v4	select COLLATION_NAME from information_schema.collations
+where COLLATION_NAME like "latin1%"	NONE	NO	root@localhost	DEFINER	latin1	latin1_swedish_ci
 drop view v0, v1, v2, v3, v4;
 create table t1 (a int);
 grant select,update,insert on t1 to mysqltest_1@localhost;
@@ -1540,4 +1544,12 @@ count(*)
 select count(*) from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='' AND TABLE_NAME='nonexisting';
 count(*)
 0
+CREATE VIEW v1
+AS SELECT *
+FROM INFORMATION_SCHEMA.TABLES;
+SELECT VIEW_DEFINITION FROM INFORMATION_SCHEMA.VIEWS where TABLE_NAME = 'v1';
+VIEW_DEFINITION
+SELECT *
+FROM INFORMATION_SCHEMA.TABLES
+DROP VIEW v1;
 End of 5.1 tests.
diff -Nrup a/mysql-test/t/information_schema.test b/mysql-test/t/information_schema.test
--- a/mysql-test/t/information_schema.test	2007-09-20 14:10:03 +05:00
+++ b/mysql-test/t/information_schema.test	2007-09-28 16:02:41 +05:00
@@ -1178,4 +1178,14 @@ select count(*) from INFORMATION_SCHEMA.
 select count(*) from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysql' AND TABLE_NAME='';
 select count(*) from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='' AND TABLE_NAME='';
 select count(*) from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='' AND TABLE_NAME='nonexisting';
+
+#
+# Bug#30689 Wrong content in I_S.VIEWS.VIEW_DEFINITION if VIEW is based on I_S
+#
+CREATE VIEW v1
+AS SELECT *
+FROM INFORMATION_SCHEMA.TABLES;
+SELECT VIEW_DEFINITION FROM INFORMATION_SCHEMA.VIEWS where TABLE_NAME = 'v1';
+DROP VIEW v1;
+
 --echo End of 5.1 tests.
diff -Nrup a/sql/sql_view.cc b/sql/sql_view.cc
--- a/sql/sql_view.cc	2007-09-26 16:20:12 +05:00
+++ b/sql/sql_view.cc	2007-09-28 16:02:41 +05:00
@@ -672,7 +672,7 @@ static File_option view_parameters[]=
   FILE_OPTIONS_STRING},
  {{(char*) STRING_WITH_LEN("view_body_utf8")},
   my_offsetof(TABLE_LIST, view_body_utf8),
-  FILE_OPTIONS_STRING},
+  FILE_OPTIONS_ESTRING},
  {{NullS, 0},			0,
   FILE_OPTIONS_STRING}
 };
Thread
bk commit into 5.1 tree (gluh:1.2573) BUG#30689gluh28 Sep