summaryrefslogtreecommitdiff
path: root/mysql-test/t/select.test
diff options
context:
space:
mode:
authorgshchepa/uchum@gleb.loc <>2007-10-25 10:32:52 +0500
committergshchepa/uchum@gleb.loc <>2007-10-25 10:32:52 +0500
commite36846deca5f07003a17fd12ba98284d19eb52d8 (patch)
treeb46ed4cf13b654bc175701628c00738b70f8734b /mysql-test/t/select.test
parent7ca65155ad07834d136190a4d55a512e86df1fd5 (diff)
downloadmariadb-git-e36846deca5f07003a17fd12ba98284d19eb52d8.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).
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