Bug #48863 mysql test: enable and disable case insensitive compare mode

Implemented --lowercase_result which lower cases next result
This commit is contained in:
Bjorn Munch 2010-01-06 09:42:21 +01:00
commit 5b66dab00f
3 changed files with 85 additions and 2 deletions

View file

@ -2059,6 +2059,44 @@ INSERT INTO t1 SELECT f1 - 512 FROM t1;
SELECT * FROM t1;
--enable_result_log
DROP TABLE t1;
# ----------------------------------------------------------------------------
# test for lowercase_result
# ----------------------------------------------------------------------------
# 1. Basic test
--lowercase_result
SELECT "500g BLÅBÆRSYLTETØY" AS "WILL BE lower cased";
# 2. test that it does not apply to next statement
SELECT "UPPER" AS "WILL NOT BE lower cased";
# 3. test that it does not affect non-SQL or the following statement
--lowercase_result
--echo UP
SELECT 0 as "UP AGAIN";
# 4. test that it works with eval and variables
let $lower_stmt=SELECT "ABCdef" AS "uvwXYZ";
--lowercase_result
eval $lower_stmt;
# 5. test that it works in combination with sort
sorted_result;
lowercase_result;
SELECT "Xyz" AS Name UNION SELECT "Abc" as Name ORDER BY Name DESC;
# 6. Test combination with replace, and that lower casing is done first
--lowercase_result
--replace_result old new
SELECT 1 as "SOME OLD TEXT";
# 7. Test missing lower casing of "unknown" characters
--character_set utf8
--lowercase_result
SELECT 0 as "WILL NOT lower case ÄËÐ";
--character_set latin1
# ----------------------------------------------------------------------------
# Some coverage tests
# ----------------------------------------------------------------------------