Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
3dbcc020
Commit
3dbcc020
authored
Jan 24, 2012
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Plain Diff
Merging from mysql-5.1
parents
f8e924b4
e449cf48
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
282 additions
and
0 deletions
+282
-0
include/m_ctype.h
include/m_ctype.h
+4
-0
mysql-test/r/ctype_utf8.result
mysql-test/r/ctype_utf8.result
+24
-0
mysql-test/t/ctype_utf8.test
mysql-test/t/ctype_utf8.test
+8
-0
mysys/charset-def.c
mysys/charset-def.c
+2
-0
strings/ctype-ucs2.c
strings/ctype-ucs2.c
+34
-0
strings/ctype-utf8.c
strings/ctype-utf8.c
+210
-0
No files found.
include/m_ctype.h
View file @
3dbcc020
...
...
@@ -50,6 +50,8 @@ typedef struct unicase_info_st
extern
MY_UNICASE_INFO
*
my_unicase_default
[
256
];
extern
MY_UNICASE_INFO
*
my_unicase_turkish
[
256
];
extern
MY_UNICASE_INFO
*
my_unicase_mysql500
[
256
];
typedef
struct
uni_ctype_st
{
...
...
@@ -311,11 +313,13 @@ extern CHARSET_INFO my_charset_tis620_bin;
extern
CHARSET_INFO
my_charset_ucs2_general_ci
;
extern
CHARSET_INFO
my_charset_ucs2_bin
;
extern
CHARSET_INFO
my_charset_ucs2_unicode_ci
;
extern
CHARSET_INFO
my_charset_ucs2_general_mysql500_ci
;
extern
CHARSET_INFO
my_charset_ujis_japanese_ci
;
extern
CHARSET_INFO
my_charset_ujis_bin
;
extern
CHARSET_INFO
my_charset_utf8_general_ci
;
extern
CHARSET_INFO
my_charset_utf8_unicode_ci
;
extern
CHARSET_INFO
my_charset_utf8_bin
;
extern
CHARSET_INFO
my_charset_utf8_general_mysql500_ci
;
extern
CHARSET_INFO
my_charset_cp1250_czech_ci
;
extern
MYSQL_PLUGIN_IMPORT
CHARSET_INFO
my_charset_filename
;
...
...
mysql-test/r/ctype_utf8.result
View file @
3dbcc020
...
...
@@ -1928,4 +1928,28 @@ D120
SELECT HEX(INSERT(_utf8 0xD18FD18E, 2, 1, 0x20));
HEX(INSERT(_utf8 0xD18FD18E, 2, 1, 0x20))
D120D18E
#
# Bug#11752408 - 43593: DUMP/BACKUP/RESTORE/UPGRADE TOOLS FAILS BECAUSE OF UTF8_GENERAL_CI
#
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_general_mysql500_ci);
INSERT INTO t1 VALUES ('a'),('r'),('s'),(_latin1 0xDF),(_latin1 0xF7),('t'),('z');
SELECT * FROM t1 ORDER BY a;
a
a
r
s
t
z
ß
÷
SELECT a, COUNT(*) FROM t1 GROUP BY a;
a COUNT(*)
a 1
r 1
s 1
t 1
z 1
ß 1
÷ 1
DROP TABLE t1;
End of 5.1 tests
mysql-test/t/ctype_utf8.test
View file @
3dbcc020
...
...
@@ -1484,5 +1484,13 @@ SELECT HEX(LPAD(_utf8 0xD18F, 3, 0x20));
SELECT
HEX
(
INSERT
(
_utf8
0xD18F
,
2
,
1
,
0x20
));
SELECT
HEX
(
INSERT
(
_utf8
0xD18FD18E
,
2
,
1
,
0x20
));
--
echo
#
--
echo
# Bug#11752408 - 43593: DUMP/BACKUP/RESTORE/UPGRADE TOOLS FAILS BECAUSE OF UTF8_GENERAL_CI
--
echo
#
CREATE
TABLE
t1
(
a
VARCHAR
(
10
)
CHARACTER
SET
utf8
COLLATE
utf8_general_mysql500_ci
);
INSERT
INTO
t1
VALUES
(
'a'
),(
'r'
),(
's'
),(
_latin1
0xDF
),(
_latin1
0xF7
),(
't'
),(
'z'
);
SELECT
*
FROM
t1
ORDER
BY
a
;
SELECT
a
,
COUNT
(
*
)
FROM
t1
GROUP
BY
a
;
DROP
TABLE
t1
;
--
echo
End
of
5.1
tests
mysys/charset-def.c
View file @
3dbcc020
...
...
@@ -132,6 +132,7 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused)))
#ifdef HAVE_CHARSET_ucs2
add_compiled_collation
(
&
my_charset_ucs2_general_ci
);
add_compiled_collation
(
&
my_charset_ucs2_bin
);
add_compiled_collation
(
&
my_charset_ucs2_general_mysql500_ci
);
#ifdef HAVE_UCA_COLLATIONS
add_compiled_collation
(
&
my_charset_ucs2_unicode_ci
);
add_compiled_collation
(
&
my_charset_ucs2_icelandic_uca_ci
);
...
...
@@ -163,6 +164,7 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused)))
#ifdef HAVE_CHARSET_utf8
add_compiled_collation
(
&
my_charset_utf8_general_ci
);
add_compiled_collation
(
&
my_charset_utf8_bin
);
add_compiled_collation
(
&
my_charset_utf8_general_mysql500_ci
);
#ifdef HAVE_UTF8_GENERAL_CS
add_compiled_collation
(
&
my_charset_utf8_general_cs
);
#endif
...
...
strings/ctype-ucs2.c
View file @
3dbcc020
...
...
@@ -1732,6 +1732,40 @@ CHARSET_INFO my_charset_ucs2_general_ci=
&
my_collation_ucs2_general_ci_handler
};
CHARSET_INFO
my_charset_ucs2_general_mysql500_ci
=
{
159
,
0
,
0
,
/* number */
MY_CS_COMPILED
|
MY_CS_STRNXFRM
|
MY_CS_UNICODE
,
/* state */
"ucs2"
,
/* cs name */
"ucs2_general_mysql500_ci"
,
/* name */
""
,
/* comment */
NULL
,
/* tailoring */
ctype_ucs2
,
/* ctype */
to_lower_ucs2
,
/* to_lower */
to_upper_ucs2
,
/* to_upper */
to_upper_ucs2
,
/* sort_order */
NULL
,
/* contractions */
NULL
,
/* sort_order_big */
NULL
,
/* tab_to_uni */
NULL
,
/* tab_from_uni */
my_unicase_mysql500
,
/* caseinfo */
NULL
,
/* state_map */
NULL
,
/* ident_map */
1
,
/* strxfrm_multiply */
1
,
/* caseup_multiply */
1
,
/* casedn_multiply */
2
,
/* mbminlen */
2
,
/* mbmaxlen */
0
,
/* min_sort_char */
0xFFFF
,
/* max_sort_char */
' '
,
/* pad char */
0
,
/* escape_with_backslash_is_dangerous */
&
my_charset_ucs2_handler
,
&
my_collation_ucs2_general_ci_handler
};
CHARSET_INFO
my_charset_ucs2_bin
=
{
90
,
0
,
0
,
/* number */
...
...
strings/ctype-utf8.c
View file @
3dbcc020
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment