summaryrefslogtreecommitdiff
path: root/mysql-test/t/select.test
diff options
context:
space:
mode:
authorunknown <gshchepa/uchum@gleb.loc>2007-10-25 10:32:52 +0500
committerunknown <gshchepa/uchum@gleb.loc>2007-10-25 10:32:52 +0500
commit04ff9d4da02d0f9e66e383b13fc456636f92819a (patch)
treeb46ed4cf13b654bc175701628c00738b70f8734b /mysql-test/t/select.test
parent6a8e10d2ce64e506a5c58ef3b58178105f4b5973 (diff)
downloadmariadb-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/t/select.test')
-rw-r--r--mysql-test/t/select.test23
1 files changed, 15 insertions, 8 deletions
diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test
index 5c30a17e08e..a6ed3c854b4 100644
--- a/mysql-test/t/select.test
+++ b/mysql-test/t/select.test
@@ -3466,22 +3466,29 @@ DROP TABLE t1;
#
--disable_ps_protocol
-
SELECT 1 AS ` `;
SELECT 1 AS ` `;
SELECT 1 AS ` x`;
+--enable_ps_protocol
+
+--error 1166
+CREATE VIEW v1 AS SELECT 1 AS ``;
+--error 1166
CREATE VIEW v1 AS SELECT 1 AS ` `;
-SELECT `` FROM v1;
-CREATE VIEW v2 AS SELECT 1 AS ` `;
-SELECT `` FROM v2;
+--error 1166
+CREATE VIEW v1 AS SELECT 1 AS ` `;
-CREATE VIEW v3 AS SELECT 1 AS ` x`;
-SELECT `x` FROM v3;
+--error 1166
+CREATE VIEW v1 AS SELECT (SELECT 1 AS ` `);
-DROP VIEW v1, v2, v3;
+CREATE VIEW v1 AS SELECT 1 AS ` x`;
+SELECT `x` FROM v1;
---enable_ps_protocol
+--error 1166
+ALTER VIEW v1 AS SELECT 1 AS ` `;
+
+DROP VIEW v1;
--echo End of 5.0 tests