summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2001-09-11 01:40:52 +0300
committerunknown <monty@hundin.mysql.fi>2001-09-11 01:40:52 +0300
commit34925f8d823c700c939f0622b6af85001458a226 (patch)
tree6a962f88c6b25e60b6f09ab8b8c7eb0cbb47bc22 /mysql-test
parent354882c8ce232770b2f3604cbcd5142aad6b002c (diff)
downloadmariadb-git-34925f8d823c700c939f0622b6af85001458a226.tar.gz
Fixes for German sorting order.
Docs/manual.texi: Update for German sorting configure.in: Don't make the German sort order default myisam/mi_delete_all.c: Truncate files on DELETE FROM table_name to not get warnings when checking files myisam/mi_search.c: Fix for multi-byte character sets. sql/item_cmpfunc.cc: Use current character set when using STRCMP() strings/ctype-latin1_de.c: F
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/ctype_latin1_de.result168
-rw-r--r--mysql-test/t/ctype_latin1_de-master.opt1
-rw-r--r--mysql-test/t/ctype_latin1_de.test36
3 files changed, 205 insertions, 0 deletions
diff --git a/mysql-test/r/ctype_latin1_de.result b/mysql-test/r/ctype_latin1_de.result
new file mode 100644
index 00000000000..71bed79891a
--- /dev/null
+++ b/mysql-test/r/ctype_latin1_de.result
@@ -0,0 +1,168 @@
+a b
+a 35
+ac 2
+ad 4
+ä 1
+ae 3
+ää 31
+aeae 33
+ääa 32
+aeb 6
+Äc 5
+eä 28
+o 37
+oc 15
+od 18
+ö 14
+oe 17
+Öa 16
+oeb 20
+Öc 19
+öo 30
+q 34
+s 21
+ss 22
+ß 23
+ssa 25
+ßa 27
+ßb 24
+ssc 26
+u 36
+uc 8
+ud 10
+ue 9
+Ü 11
+ueb 12
+üc 7
+uf 13
+uü 29
+é 38
+É 39
+a b
+a 35
+ac 2
+ad 4
+ä 1
+ae 3
+ää 31
+aeae 33
+ääa 32
+aeb 6
+Äc 5
+eä 28
+o 37
+oc 15
+od 18
+ö 14
+oe 17
+Öa 16
+oeb 20
+Öc 19
+öo 30
+q 34
+s 21
+ss 22
+ß 23
+ssa 25
+ßa 27
+ßb 24
+ssc 26
+u 36
+uc 8
+ud 10
+ue 9
+Ü 11
+ueb 12
+üc 7
+uf 13
+uü 29
+é 38
+É 39
+a
+uü
+uf
+üc
+ueb
+ue
+ud
+uc
+u
+ssc
+ßb
+ßa
+ssa
+ss
+s
+q
+öo
+Öc
+oeb
+Öa
+oe
+od
+oc
+o
+eä
+Äc
+aeb
+ääa
+aeae
+ää
+ae
+ad
+ac
+a
+Table Op Msg_type Msg_text
+test.t1 check status OK
+a b
+Öa 16
+Öc 19
+öo 30
+a b
+é 38
+É 39
+a b
+a 35
+ac 2
+ad 4
+ae 3
+aeae 33
+ääa 32
+aeb 6
+Öa 16
+ssa 25
+ßa 27
+a b
+u 36
+uc 8
+ud 10
+ue 9
+ueb 12
+uf 13
+uü 29
+a b
+ss 22
+ssa 25
+ssc 26
+strcmp('ä','ae') strcmp('ae','ä') strcmp('aeq','äq') strcmp('äq','aeq')
+0 0 0 0
+strcmp('ss','ß') strcmp('ß','ss') strcmp('ßs','sss') strcmp('ßq','ssq')
+0 0 0 0
+strcmp('ä','af') strcmp('a','ä') strcmp('ää','aeq') strcmp('ää','aeaeq')
+-1 -1 -1 -1
+strcmp('ss','ßa') strcmp('ß','ssa') strcmp('sßa','sssb') strcmp('s','ß')
+-1 -1 -1 -1
+strcmp('ö','oö') strcmp('Ü','uü') strcmp('ö','oeb')
+-1 -1 -1
+strcmp('af','ä') strcmp('ä','a') strcmp('aeq','ää') strcmp('aeaeq','ää')
+1 1 1 1
+strcmp('ßa','ss') strcmp('ssa','ß') strcmp('sssb','sßa') strcmp('ß','s')
+1 1 1 1
+strcmp('u','öa') strcmp('u','ö')
+1 1
diff --git a/mysql-test/t/ctype_latin1_de-master.opt b/mysql-test/t/ctype_latin1_de-master.opt
new file mode 100644
index 00000000000..98accd58c46
--- /dev/null
+++ b/mysql-test/t/ctype_latin1_de-master.opt
@@ -0,0 +1 @@
+--default-character-set=latin1_de
diff --git a/mysql-test/t/ctype_latin1_de.test b/mysql-test/t/ctype_latin1_de.test
new file mode 100644
index 00000000000..1df700340da
--- /dev/null
+++ b/mysql-test/t/ctype_latin1_de.test
@@ -0,0 +1,36 @@
+#
+# Test latin_de character set
+#
+drop table if exists t1;
+create table t1 (a char (20) not null, b int not null auto_increment, index (a,b),index(b));
+insert into t1 (a) values ('ä'),('ac'),('ae'),('ad'),('Äc'),('aeb');
+insert into t1 (a) values ('üc'),('uc'),('ue'),('ud'),('Ü'),('ueb'),('uf');
+insert into t1 (a) values ('ö'),('oc'),('Öa'),('oe'),('od'),('Öc'),('oeb');
+insert into t1 (a) values ('s'),('ss'),('ß'),('ßb'),('ssa'),('ssc'),('ßa');
+insert into t1 (a) values ('eä'),('uü'),('öo'),('ää'),('ääa'),('aeae');
+insert into t1 (a) values ('q'),('a'),('u'),('o'),('é'),('É');
+select a,b from t1 order by a,b;
+select a,b from t1 order by upper(a),b;
+select a from t1 order by a desc;
+check table t1;
+select * from t1 where a like "ö%";
+select * from t1 where a like "%É%";
+select * from t1 where a like "%Á%";
+select * from t1 where a like "%U%";
+select * from t1 where a like "%ss%";
+drop table t1;
+
+# The following should all be true
+select strcmp('ä','ae'),strcmp('ae','ä'),strcmp('aeq','äq'),strcmp('äq','aeq');
+select strcmp('ss','ß'),strcmp('ß','ss'),strcmp('ßs','sss'),strcmp('ßq','ssq');
+
+# The following should all return -1
+select strcmp('ä','af'),strcmp('a','ä'),strcmp('ää','aeq'),strcmp('ää','aeaeq');
+select strcmp('ss','ßa'),strcmp('ß','ssa'),strcmp('sßa','sssb'),strcmp('s','ß');
+select strcmp('ö','oö'),strcmp('Ü','uü'),strcmp('ö','oeb');
+
+# The following should all return 1
+select strcmp('af','ä'),strcmp('ä','a'),strcmp('aeq','ää'),strcmp('aeaeq','ää');
+select strcmp('ßa','ss'),strcmp('ssa','ß'),strcmp('sssb','sßa'),strcmp('ß','s');
+select strcmp('u','öa'),strcmp('u','ö');
+