summaryrefslogtreecommitdiff
path: root/mysql-test/t/select.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/select.test')
-rw-r--r--mysql-test/t/select.test24
1 files changed, 24 insertions, 0 deletions
diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test
index abf55745080..5c30a17e08e 100644
--- a/mysql-test/t/select.test
+++ b/mysql-test/t/select.test
@@ -3460,4 +3460,28 @@ SHOW WARNINGS;
DROP TABLE t1;
+#
+# Bug #27695: Misleading warning when declaring all space column names and
+# truncation of one-space column names to zero length names.
+#
+
+--disable_ps_protocol
+
+SELECT 1 AS ` `;
+SELECT 1 AS ` `;
+SELECT 1 AS ` x`;
+
+CREATE VIEW v1 AS SELECT 1 AS ` `;
+SELECT `` FROM v1;
+
+CREATE VIEW v2 AS SELECT 1 AS ` `;
+SELECT `` FROM v2;
+
+CREATE VIEW v3 AS SELECT 1 AS ` x`;
+SELECT `x` FROM v3;
+
+DROP VIEW v1, v2, v3;
+
+--enable_ps_protocol
+
--echo End of 5.0 tests