summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mysql-test/r/ctype_latin1.result3
-rw-r--r--mysql-test/t/ctype_latin1.test17
-rw-r--r--strings/ctype-latin1.c4
3 files changed, 22 insertions, 2 deletions
diff --git a/mysql-test/r/ctype_latin1.result b/mysql-test/r/ctype_latin1.result
index 95fca1575ef..b47853a0ccc 100644
--- a/mysql-test/r/ctype_latin1.result
+++ b/mysql-test/r/ctype_latin1.result
@@ -296,6 +296,9 @@ FD C3BD FD 1
FE C3BE FE 1
FF C3BF FF 1
DROP TABLE t1;
+SELECT 1 as ƒ, 2 as Š, 3 as Œ, 4 as Ž, 5 as š, 6 as œ, 7 as ž, 8 as Ÿ;
+ƒ Š Œ Ž š œ ž Ÿ
+1 2 3 4 5 6 7 8
select 'a' regexp 'A' collate latin1_general_ci;
'a' regexp 'A' collate latin1_general_ci
1
diff --git a/mysql-test/t/ctype_latin1.test b/mysql-test/t/ctype_latin1.test
index 1b83373da29..f2886088ba8 100644
--- a/mysql-test/t/ctype_latin1.test
+++ b/mysql-test/t/ctype_latin1.test
@@ -55,6 +55,23 @@ SELECT
DROP TABLE t1;
#
+# Bug#13145: A table named "C-cedilla" can't be dropped.
+# Accept extended cp1252 letters as valid identifiers.
+# This test partially checks that "ctype" array is correct
+# for cp1252 extended characters 0x80-0x9F.
+#
+# 0x83 0x0192 #LATIN SMALL LETTER F WITH HOOK
+# 0x8A 0x0160 #LATIN CAPITAL LETTER S WITH CARON
+# 0x8C 0x0152 #LATIN CAPITAL LIGATURE OE
+# 0x8E 0x017D #LATIN CAPITAL LETTER Z WITH CARON
+# 0x9A 0x0161 #LATIN SMALL LETTER S WITH CARON
+# 0x9C 0x0153 #LATIN SMALL LIGATURE OE
+# 0x9E 0x017E #LATIN SMALL LETTER Z WITH CARON
+# 0x9F 0x0178 #LATIN CAPITAL LETTER Y WITH DIAERESIS
+#
+SELECT 1 as ƒ, 2 as Š, 3 as Œ, 4 as Ž, 5 as š, 6 as œ, 7 as ž, 8 as Ÿ;
+
+#
# Bug #6737: REGEXP gives wrong result with case sensitive collation
#
select 'a' regexp 'A' collate latin1_general_ci;
diff --git a/strings/ctype-latin1.c b/strings/ctype-latin1.c
index b6e3e300c34..e5deba885e7 100644
--- a/strings/ctype-latin1.c
+++ b/strings/ctype-latin1.c
@@ -28,8 +28,8 @@ static uchar ctype_latin1[] = {
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16,
16,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 32,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 16, 0, 16, 2, 16, 16, 16, 16, 16, 16, 1, 16, 1, 0, 1, 0,
+ 0, 16, 16, 16, 16, 16, 16, 16, 16, 16, 2, 16, 2, 0, 2, 1,
72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,