1#
2# Set desired charset_connection and collation_collation
3# before including this file.
4#
5
6# The next query creates a LONGTEXT column
7# using the current character_set_connection
8# and collation_connection.
9
10create table t1 select repeat('a',4000) a;
11delete from t1;
12
13insert into t1 values ('a'), ('a '), ('a\t');
14select collation(a),hex(a) from t1 order by a;
15drop table t1;
16
17
18--echo #
19--echo # MDEV-5453 Assertion `src' fails in my_strnxfrm_unicode on GROUP BY MID(..) WITH ROLLUP
20--echo #
21SELECT @@collation_connection;
22CREATE TABLE t1 (i INT) ENGINE=MyISAM;
23INSERT INTO t1 VALUES (1),(2);
24SELECT * FROM t1 GROUP BY MID(CURRENT_USER,0) WITH ROLLUP;
25SELECT * FROM t1 GROUP BY MID('test',0) WITH ROLLUP;
26DROP TABLE t1;
27
28--echo #
29--echo # MDEV-6170 Incorrect ordering with utf8_bin and utf8mb4_bin collations
30--echo #
31SELECT @@collation_connection;
32CREATE TABLE t1 ENGINE=MEMORY AS SELECT REPEAT('a',5) AS a LIMIT 0;
33INSERT INTO t1 (a) VALUES ("a");
34INSERT INTO t1 (a) VALUES ("b");
35INSERT INTO t1 (a) VALUES ("c");
36INSERT INTO t1 (a) VALUES ("d");
37INSERT INTO t1 (a) VALUES ("e");
38INSERT INTO t1 (a) VALUES ("f");
39INSERT INTO t1 (a) VALUES ("g");
40INSERT INTO t1 (a) VALUES ("h");
41INSERT INTO t1 (a) VALUES ("i");
42INSERT INTO t1 (a) VALUES ("j");
43INSERT INTO t1 (a) VALUES ("k");
44INSERT INTO t1 (a) VALUES ("l");
45INSERT INTO t1 (a) VALUES ("m");
46SELECT * FROM t1 ORDER BY LOWER(a);
47SELECT * FROM t1 ORDER BY LOWER(a) DESC;
48DROP TABLE t1;
49