bk commit into 5.0 tree (jimw:1.1797)  
Author Message
jimw





PostPosted: 2005-3-5 2:52:46 Top

mysql, bk commit into 5.0 tree (jimw:1.1797) Below is the list of changes that have just been committed into a local
5.0 repository of jimw. When jimw 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://www.mysql.com/doc/I/n/Installing_source_tree.html

ChangeSet
1.1797 05/03/04 10:55:14 email***@***.com +3 -0
Merge

mysql-test/t/sql_mode.test
1.10 05/03/04 10:55:13 email***@***.com +0 -0
SCCS merged

mysql-test/r/sql_mode.result
1.19 05/03/04 10:55:13 email***@***.com +0 -0
SCCS merged

sql/sql_show.cc
1.222 05/03/04 10:41:44 email***@***.com +0 -0
Auto merged

# 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: jimw
# Host: rama.(none)
# Root: /home/jimw/my/mysql-5.0-6903/RESYNC

--- 1.221/sql/sql_show.cc 2005-03-03 08:20:09 -08:00
+++ 1.222/sql/sql_show.cc 2005-03-04 10:41:44 -08:00
@@ -1048,7 +1048,13 @@
buff->append('.');
append_identifier(thd, buff, table->view_name.str, table->view_name.length);
buff->append(" AS ", 4);
- buff->append(table->query.str, table->query.length);
+
+ /*
+ We can't just use table->query, because our SQL_MODE may trigger
+ a different syntax, like when ANSI_QUOTES is defined.
+ */
+ table->view->unit.print(buff);
+
if (table->with_check != VIEW_CHECK_NONE)
{
if (table->with_check == VIEW_CHECK_LOCAL)

--- 1.18/mysql-test/r/sql_mode.result 2005-02-03 16:11:38 -08:00
+++ 1.19/mysql-test/r/sql_mode.result 2005-03-04 10:55:13 -08:00
@@ -386,6 +386,41 @@
20 \\\\% \\\\%
20 \\\\% \\\\_
DROP TABLE t1;
+SET @@SQL_MODE='';
+create function `foo` () returns int return 5;
+show create function `foo`;
+Function sql_mode Create Function
+foo CREATE FUNCTION `test`.`foo`() RETURNS int
+return 5
+SET @@SQL_MODE='ANSI_QUOTES';
+show create function `foo`;
+Function sql_mode Create Function
+foo CREATE FUNCTION `test`.`foo`() RETURNS int
+return 5
+drop function `foo`;
+create function `foo` () returns int return 5;
+show create function `foo`;
+Function sql_mode Create Function
+foo ANSI_QUOTES CREATE FUNCTION "test"."foo"() RETURNS int
+return 5
+SET @@SQL_MODE='';
+show create function `foo`;
+Function sql_mode Create Function
+foo ANSI_QUOTES CREATE FUNCTION "test"."foo"() RETURNS int
+return 5
+drop function `foo`;
+SET @@SQL_MODE='';
+create table t1 (i int);
+create view v1 as select * from t1;
+show create view v1;
+View Create View
+v1 CREATE ALGORITHM=UNDEFINED VIEW `test`.`v1` AS select `test`.`t1`.`i` AS `i` from `test`.`t1`
+SET @@SQL_MODE='ANSI_QUOTES';
+show create view v1;
+View Create View
+v1 CREATE ALGORITHM=UNDEFINED VIEW "test"."v1" AS select "test"."t1"."i" AS "i" from "test"."t1"
+drop view v1;
+drop table t1;
SET @@SQL_MODE='NO_BACKSLASH_ESCAPES';
SELECT 'a\\b', 'a\\\"b', 'a''\\b', 'a''\\\"b';
a\\b a\\\"b a'\\b a'\\\"b

--- 1.9/mysql-test/t/sql_mode.test 2005-02-03 15:41:36 -08:00
+++ 1.10/mysql-test/t/sql_mode.test 2005-03-04 10:55:13 -08:00
@@ -174,6 +174,31 @@

DROP TABLE t1;

+# ANSI_QUOTES does not come into play with SHOW CREATE FUNCTION or PROCEDURE
+# because it displays the SQL_MODE used to create the routine.
+SET @@SQL_MODE='';
+create function `foo` () returns int return 5;
+show create function `foo`;
+SET @@SQL_MODE='ANSI_QUOTES';
+show create function `foo`;
+drop function `foo`;
+
+create function `foo` () returns int return 5;
+show create function `foo`;
+SET @@SQL_MODE='';
+show create function `foo`;
+drop function `foo`;
+
+# ANSI_QUOTES should have effect for SHOW CREATE VIEW (Bug #6903)
+SET @@SQL_MODE='';
+create table t1 (i int);
+create view v1 as select * from t1;
+show create view v1;
+SET @@SQL_MODE='ANSI_QUOTES';
+show create view v1;
+drop view v1;
+drop table t1;
+
# Bug #6368: Make sure backslashes mixed with doubled quotes are handled
# correctly in NO_BACKSLASH_ESCAPES mode
SET @@SQL_MODE='NO_BACKSLASH_ESCAPES';
@@ -185,3 +210,4 @@
SELECT "a\\b", "a\\\'b", "a""\\b", "a""\\\'b";

SET @@SQL_MODE=@OLD_SQL_MODE;
+

--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe: http://lists.mysql.com/internals?unsub=email***@***.com