Commit c5733e57 authored by Alexander Barkov's avatar Alexander Barkov

- Moving ctype_utf8_th.test to ctype_thai.inc and including it

  from ctype_uca.test. This is to reuse ctype_thai.inc for other Unicode
  character sets later
- Removing separate ctype_uca.result
parent dd7f3073
--disable_warnings --echo #
DROP TABLE IF EXISTS t1; --echo # Start of ctype_thai.inc
--enable_warnings --echo #
# #
# Test Unicode Thai collations based on libthai testcases # Test Unicode Thai collations based on libthai testcases
# #
SET NAMES utf8;
CREATE TABLE t1 (a VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_bin); CREATE TABLE t1 (a VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_bin);
INSERT INTO t1 VALUES ('-กระแย่ง'); INSERT INTO t1 VALUES ('-กระแย่ง');
...@@ -111,10 +109,15 @@ INSERT INTO t1 VALUES ('๑๐ ลิตร {10 litre}'); ...@@ -111,10 +109,15 @@ INSERT INTO t1 VALUES ('๑๐ ลิตร {10 litre}');
# To avoid problems with unpredictable order or 'AA' and 'aa' # To avoid problems with unpredictable order or 'AA' and 'aa'
ALTER TABLE t1 ORDER BY a; ALTER TABLE t1 ORDER BY a;
ALTER TABLE t1 SET @stmt= CONCAT('ALTER TABLE t1 MODIFY a VARCHAR(30)',
MODIFY a VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_thai_520_w2, ' CHARACTER SET ', @@character_set_connection,
ADD id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, ' COLLATE ', @@collation_connection,
ADD KEY a_id (a, id); ' , ADD id INT NOT NULL AUTO_INCREMENT PRIMARY KEY'
' , ADD KEY a_id (a, id)');
PREPARE stmt FROM @stmt;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SHOW CREATE TABLE t1;
--echo # --echo #
--echo # Ascending sort, using filesort --echo # Ascending sort, using filesort
...@@ -142,3 +145,7 @@ EXPLAIN SELECT a FROM t1 ORDER BY a DESC, id DESC; ...@@ -142,3 +145,7 @@ EXPLAIN SELECT a FROM t1 ORDER BY a DESC, id DESC;
SELECT a FROM t1 ORDER BY a DESC, id DESC; SELECT a FROM t1 ORDER BY a DESC, id DESC;
DROP TABLE t1; DROP TABLE t1;
--echo #
--echo # End of ctype_thai.inc
--echo #
This diff is collapsed.
This diff is collapsed.
...@@ -646,6 +646,7 @@ DROP TABLE t1; ...@@ -646,6 +646,7 @@ DROP TABLE t1;
SET NAMES utf8 COLLATE utf8_thai_520_w2; SET NAMES utf8 COLLATE utf8_thai_520_w2;
--source include/ctype_uca_w2.inc --source include/ctype_uca_w2.inc
--source include/ctype_thai.inc
--echo # --echo #
--echo # End of MariaDB-10.1 tests --echo # End of MariaDB-10.1 tests
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment