diff options
author | unknown <jimw@mysql.com> | 2005-07-05 17:05:31 -0700 |
---|---|---|
committer | unknown <jimw@mysql.com> | 2005-07-05 17:05:31 -0700 |
commit | 8546ddd39a291a00c0e451e5d1b56f82f6293f6a (patch) | |
tree | bcfdca314460d87261617c94ea8d0c6c1daee8e3 /mysql-test/t/sql_mode.test | |
parent | 6efca84f2915d54e2e7800acd033db5be18792bd (diff) | |
parent | ed483fcd21349e0ac5daf77658446ae0da37bef8 (diff) | |
download | mariadb-git-8546ddd39a291a00c0e451e5d1b56f82f6293f6a.tar.gz |
Merge mysql.com:/home/jimw/my/mysql-5.0-6903
into mysql.com:/home/jimw/my/mysql-5.0-clean
mysql-test/r/view.result:
Auto merged
sql/sql_show.cc:
Auto merged
mysql-test/r/sql_mode.result:
Merge
mysql-test/t/sql_mode.test:
Merge
Diffstat (limited to 'mysql-test/t/sql_mode.test')
-rw-r--r-- | mysql-test/t/sql_mode.test | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/mysql-test/t/sql_mode.test b/mysql-test/t/sql_mode.test index 26cb0944e3a..f8ab521e665 100644 --- a/mysql-test/t/sql_mode.test +++ b/mysql-test/t/sql_mode.test @@ -189,7 +189,6 @@ SET @@SQL_MODE=''; SELECT 'a\\b', 'a\\\"b', 'a''\\b', 'a''\\\"b'; SELECT "a\\b", "a\\\'b", "a""\\b", "a""\\\'b"; - # # Bug#6877: MySQL should give an error if the requested table type # is not available @@ -208,5 +207,37 @@ create table t1 (a int) engine=isam; show create table t1; drop table t1; +# +# Bug #6903: 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`; + +# +# Bug #6903: ANSI_QUOTES should have effect for SHOW CREATE VIEW (Bug #6903) +# +SET @@SQL_MODE=''; +create table t1 (a int); +create table t2 (a int); +create view v1 as select a from t1; +show create view v1; +SET @@SQL_MODE='ANSI_QUOTES'; +show create view v1; +# Test a view with a subselect, which will get shown incorrectly without +# thd->lex->view_prepare_mode set properly. +create view v2 as select a from t2 where a in (select a from v1); +drop view v2, v1; +drop table t1, t2; SET @@SQL_MODE=@OLD_SQL_MODE; |