diff options
author | unknown <gshchepa/uchum@gleb.loc> | 2007-10-25 10:32:52 +0500 |
---|---|---|
committer | unknown <gshchepa/uchum@gleb.loc> | 2007-10-25 10:32:52 +0500 |
commit | 04ff9d4da02d0f9e66e383b13fc456636f92819a (patch) | |
tree | b46ed4cf13b654bc175701628c00738b70f8734b /mysql-test/r/select.result | |
parent | 6a8e10d2ce64e506a5c58ef3b58178105f4b5973 (diff) | |
download | mariadb-git-04ff9d4da02d0f9e66e383b13fc456636f92819a.tar.gz |
Fixed bug #27695: View should not be allowed to have empty or
all space column names.
The parser has been modified to check VIEW column names
with the check_column_name function and to report an error
on empty and all space column names (same as for TABLE
column names).
sql/sql_yacc.yy:
Fixed bug #27695.
The parser has been modified to check VIEW column aliases
with the check_column_name function and to report an error
on empty columns and all space columns (same as for TABLE
column names).
mysql-test/t/select.test:
Updated test case for bug #27695.
mysql-test/r/select.result:
Updated test case for bug #27695.
Diffstat (limited to 'mysql-test/r/select.result')
-rw-r--r-- | mysql-test/r/select.result | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result index ed120a1bbb8..52f2e84bf4e 100644 --- a/mysql-test/r/select.result +++ b/mysql-test/r/select.result @@ -4077,23 +4077,21 @@ x 1 Warnings: Warning 1466 Leading spaces are removed from name ' x' +CREATE VIEW v1 AS SELECT 1 AS ``; +ERROR 42000: Incorrect column name '' CREATE VIEW v1 AS SELECT 1 AS ` `; -Warnings: -Warning 1474 Name ' ' has become '' -SELECT `` FROM v1; - -1 -CREATE VIEW v2 AS SELECT 1 AS ` `; -Warnings: -Warning 1474 Name ' ' has become '' -SELECT `` FROM v2; - -1 -CREATE VIEW v3 AS SELECT 1 AS ` x`; +ERROR 42000: Incorrect column name ' ' +CREATE VIEW v1 AS SELECT 1 AS ` `; +ERROR 42000: Incorrect column name ' ' +CREATE VIEW v1 AS SELECT (SELECT 1 AS ` `); +ERROR 42000: Incorrect column name ' ' +CREATE VIEW v1 AS SELECT 1 AS ` x`; Warnings: Warning 1466 Leading spaces are removed from name ' x' -SELECT `x` FROM v3; +SELECT `x` FROM v1; x 1 -DROP VIEW v1, v2, v3; +ALTER VIEW v1 AS SELECT 1 AS ` `; +ERROR 42000: Incorrect column name ' ' +DROP VIEW v1; End of 5.0 tests |