diff options
author | gshchepa/uchum@gleb.loc <> | 2007-09-13 18:41:50 +0500 |
---|---|---|
committer | gshchepa/uchum@gleb.loc <> | 2007-09-13 18:41:50 +0500 |
commit | e4eadcfbddddce94da909f5248f6c68242ec6e3b (patch) | |
tree | c6f821d08c4c17966bbaf93b610ead79d81f18d5 /mysql-test/t/select.test | |
parent | a8c7e450676fa5a9b422d03570704c37f35ce253 (diff) | |
download | mariadb-git-e4eadcfbddddce94da909f5248f6c68242ec6e3b.tar.gz |
Fixed bug #27695.
Declaring an all space column name in the SELECT FROM DUAL or in a view
leads to misleading warning message:
"Leading spaces are removed from name ' '".
The Item::set_name method has been modified to raise warnings like
"Name ' ' has become ''" in case of the truncation of an all
space identifier to an empty string identifier instead of the
"Leading spaces are removed from name ' '" warning message.
Diffstat (limited to 'mysql-test/t/select.test')
-rw-r--r-- | mysql-test/t/select.test | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test index abf55745080..851e8164c44 100644 --- a/mysql-test/t/select.test +++ b/mysql-test/t/select.test @@ -3460,4 +3460,24 @@ 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. +# + +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; + --echo End of 5.0 tests |