Skip to content

Commit c5733e5

Browse files
author
Alexander Barkov
committed
- 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
1 parent dd7f307 commit c5733e5

File tree

4 files changed

+554
-530
lines changed

4 files changed

+554
-530
lines changed

mysql-test/t/ctype_utf8_th.test renamed to mysql-test/include/ctype_thai.inc

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
--disable_warnings
2-
DROP TABLE IF EXISTS t1;
3-
--enable_warnings
1+
--echo #
2+
--echo # Start of ctype_thai.inc
3+
--echo #
44

55
#
66
# Test Unicode Thai collations based on libthai testcases
77
#
88

9-
SET NAMES utf8;
10-
119
CREATE TABLE t1 (a VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_bin);
1210

1311
INSERT INTO t1 VALUES ('-กระแย่ง');
@@ -111,10 +109,15 @@ INSERT INTO t1 VALUES ('๑๐ ลิตร {10 litre}');
111109
# To avoid problems with unpredictable order or 'AA' and 'aa'
112110
ALTER TABLE t1 ORDER BY a;
113111

114-
ALTER TABLE t1
115-
MODIFY a VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_thai_520_w2,
116-
ADD id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
117-
ADD KEY a_id (a, id);
112+
SET @stmt= CONCAT('ALTER TABLE t1 MODIFY a VARCHAR(30)',
113+
' CHARACTER SET ', @@character_set_connection,
114+
' COLLATE ', @@collation_connection,
115+
' , ADD id INT NOT NULL AUTO_INCREMENT PRIMARY KEY'
116+
' , ADD KEY a_id (a, id)');
117+
PREPARE stmt FROM @stmt;
118+
EXECUTE stmt;
119+
DEALLOCATE PREPARE stmt;
120+
SHOW CREATE TABLE t1;
118121

119122
--echo #
120123
--echo # Ascending sort, using filesort
@@ -142,3 +145,7 @@ EXPLAIN SELECT a FROM t1 ORDER BY a DESC, id DESC;
142145
SELECT a FROM t1 ORDER BY a DESC, id DESC;
143146

144147
DROP TABLE t1;
148+
149+
--echo #
150+
--echo # End of ctype_thai.inc
151+
--echo #

0 commit comments

Comments
 (0)