List:Commits« Previous MessageNext Message »
From:gluh Date:September 18 2007 10:15am
Subject:bk commit into 5.1 tree (gluh:1.2557) 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-18 15:15:30+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 atribute type is changed to 'escaped string'

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

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

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

  mysql-test/t/information_schema.test@stripped, 2007-09-18 15:15:28+05:00, gluh@stripped +9 -0
    test case

  sql/sql_view.cc@stripped, 2007-09-18 15:15:28+05:00, gluh@stripped +1 -1
    view_body_utf8 atribute 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-18 15:15:28 +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-18 15:15:28 +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-17 14:24:56 +05:00
+++ b/mysql-test/r/information_schema.result	2007-09-18 15:15:28 +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;
@@ -1513,4 +1517,12 @@ SELECT SCHEMA_NAME FROM INFORMATION_SCHE
 WHERE SCHEMA_NAME ='information_schema';
 SCHEMA_NAME
 information_schema
+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-17 14:24:57 +05:00
+++ b/mysql-test/t/information_schema.test	2007-09-18 15:15:28 +05:00
@@ -1168,4 +1168,13 @@ select count(*) from INFORMATION_SCHEMA.
 SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA
 WHERE SCHEMA_NAME ='information_schema';
 
+#
+# 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-13 02:08:41 +05:00
+++ b/sql/sql_view.cc	2007-09-18 15:15:28 +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.2557) BUG#30689gluh18 Sep
  • Re: bk commit into 5.1 tree (gluh:1.2557) BUG#30689Alexander Nozdrin19 Sep