diff options
author | Nisha Gopalakrishnan <nisha.gopalakrishnan@oracle.com> | 2014-06-25 16:33:04 +0530 |
---|---|---|
committer | Nisha Gopalakrishnan <nisha.gopalakrishnan@oracle.com> | 2014-06-25 16:33:04 +0530 |
commit | d63645c890550cc190416e2c90585c1c6903b529 (patch) | |
tree | 55ad36d837d47f4e164941591c1c1e8afe4feaad /mysql-test/t | |
parent | 410b1dd86d18b87f95d690b2aa2c4fec6b62166d (diff) | |
download | mariadb-git-d63645c890550cc190416e2c90585c1c6903b529.tar.gz |
BUG#18405221: SHOW CREATE VIEW OUTPUT INCORRECT
Fix:
---
The issue reported is same as the BUG#14117018.
Hence backporting the patch from mysql-trunk
to mysql-5.5 and mysql-5.6
Diffstat (limited to 'mysql-test/t')
-rw-r--r-- | mysql-test/t/view.test | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test index 603b3e5cdb9..959153ee851 100644 --- a/mysql-test/t/view.test +++ b/mysql-test/t/view.test @@ -4147,6 +4147,43 @@ DROP DATABASE IF EXISTS nodb; --error ER_BAD_DB_ERROR CREATE VIEW nodb.a AS SELECT 1; + +--echo # +--echo # BUG#14117018 - MYSQL SERVER CREATES INVALID VIEW DEFINITION +--echo # BUG#18405221 - SHOW CREATE VIEW OUTPUT INCORRECT +--echo # + +CREATE VIEW v1 AS (SELECT '' FROM DUAL); +CREATE VIEW v2 AS (SELECT 'BUG#14117018' AS col1 FROM DUAL) UNION ALL + (SELECT '' FROM DUAL); +CREATE VIEW v3 AS (SELECT 'BUG#14117018' AS col1 FROM DUAL) UNION ALL + (SELECT '' FROM DUAL) UNION ALL + (SELECT '' FROM DUAL); +CREATE VIEW v4 AS (SELECT 'BUG#14117018' AS col1 FROM DUAL) UNION ALL + (SELECT '' AS col2 FROM DUAL) UNION ALL + (SELECT '' FROM DUAL); + +--echo # Name for the column in select1 is set properly with or +--echo # without this fix. +SHOW CREATE VIEW v1; + +--echo # Name for the column in select2 is set with this fix. +--echo # Without this fix, name would not have set for the +--echo # columns in select2. +SHOW CREATE VIEW v2; + +--echo # Name for the field item in select2 & select3 is set with this fix. +--echo # Without this fix, name would not have set for the +--echo # columns in select2 & select3. +SHOW CREATE VIEW v3; + +--echo # Name for the field item in select3 is set with this fix. +--echo # Without this fix, name would not have set for the +--echo # columns in select3. +SHOW CREATE VIEW v4; + +DROP VIEW v1, v2, v3, v4; + # Check that all connections opened by test cases in this file are really # gone so execution of other tests won't be affected by their presence. --source include/wait_until_count_sessions.inc |