mirror of
https://github.com/MariaDB/server.git
synced 2026-05-10 17:14:30 +02:00
Bug #48863 mysql test: enable and disable case insensitive compare mode
Implemented --lowercase_result which lower cases next result
This commit is contained in:
parent
4d8b228c8d
commit
5b66dab00f
3 changed files with 85 additions and 2 deletions
|
|
@ -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
|
||||
# ----------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue