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
e9db7b8e
Commit
e9db7b8e
authored
Dec 15, 2009
by
Mattias Jonsson
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
9c47ea83
5d32ba4e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
10 deletions
+30
-10
mysql-test/r/ctype_ucs.result
mysql-test/r/ctype_ucs.result
+20
-0
mysql-test/t/ctype_ucs.test
mysql-test/t/ctype_ucs.test
+10
-0
strings/ctype-ucs2.c
strings/ctype-ucs2.c
+0
-10
No files found.
mysql-test/r/ctype_ucs.result
View file @
e9db7b8e
...
@@ -116,6 +116,26 @@ select binary 'a a' > 'a', binary 'a \0' > 'a', binary 'a\0' > 'a';
...
@@ -116,6 +116,26 @@ select binary 'a a' > 'a', binary 'a \0' > 'a', binary 'a\0' > 'a';
binary 'a a' > 'a' binary 'a \0' > 'a' binary 'a\0' > 'a'
binary 'a a' > 'a' binary 'a \0' > 'a' binary 'a\0' > 'a'
1 1 1
1 1 1
SET CHARACTER SET koi8r;
SET CHARACTER SET koi8r;
create table t1 (a varchar(2) character set ucs2 collate ucs2_bin, key(a));
insert into t1 values ('A'),('A'),('B'),('C'),('D'),('A\t');
insert into t1 values ('A\0'),('A\0'),('A\0'),('A\0'),('AZ');
select hex(a) from t1 where a like 'A_' order by a;
hex(a)
00410000
00410000
00410000
00410000
00410009
0041005A
select hex(a) from t1 ignore key(a) where a like 'A_' order by a;
hex(a)
00410000
00410000
00410000
00410000
00410009
0041005A
drop table t1;
CREATE TABLE t1 (word VARCHAR(64) CHARACTER SET ucs2, word2 CHAR(64) CHARACTER SET ucs2);
CREATE TABLE t1 (word VARCHAR(64) CHARACTER SET ucs2, word2 CHAR(64) CHARACTER SET ucs2);
INSERT INTO t1 VALUES (_koi8r'',_koi8r''), (X'2004',X'2004');
INSERT INTO t1 VALUES (_koi8r'',_koi8r''), (X'2004',X'2004');
SELECT hex(word) FROM t1 ORDER BY word;
SELECT hex(word) FROM t1 ORDER BY word;
...
...
mysql-test/t/ctype_ucs.test
View file @
e9db7b8e
...
@@ -14,6 +14,16 @@ SET character_set_connection=ucs2;
...
@@ -14,6 +14,16 @@ SET character_set_connection=ucs2;
SET
CHARACTER
SET
koi8r
;
SET
CHARACTER
SET
koi8r
;
#
# BUG#49028, error in LIKE with ucs2
#
create
table
t1
(
a
varchar
(
2
)
character
set
ucs2
collate
ucs2_bin
,
key
(
a
));
insert
into
t1
values
(
'A'
),(
'A'
),(
'B'
),(
'C'
),(
'D'
),(
'A\t'
);
insert
into
t1
values
(
'A\0'
),(
'A\0'
),(
'A\0'
),(
'A\0'
),(
'AZ'
);
select
hex
(
a
)
from
t1
where
a
like
'A_'
order
by
a
;
select
hex
(
a
)
from
t1
ignore
key
(
a
)
where
a
like
'A_'
order
by
a
;
drop
table
t1
;
#
#
# Check that 0x20 is only trimmed when it is
# Check that 0x20 is only trimmed when it is
# a part of real SPACE character, not just a part
# a part of real SPACE character, not just a part
...
...
strings/ctype-ucs2.c
View file @
e9db7b8e
...
@@ -1602,16 +1602,6 @@ fill_max_and_min:
...
@@ -1602,16 +1602,6 @@ fill_max_and_min:
*
min_str
++=
*
max_str
++
=
ptr
[
1
];
*
min_str
++=
*
max_str
++
=
ptr
[
1
];
}
}
/* Temporary fix for handling w_one at end of string (key compression) */
{
char
*
tmp
;
for
(
tmp
=
min_str
;
tmp
-
1
>
min_org
&&
tmp
[
-
1
]
==
'\0'
&&
tmp
[
-
2
]
==
'\0'
;)
{
*--
tmp
=
' '
;
*--
tmp
=
'\0'
;
}
}
*
min_length
=
*
max_length
=
(
size_t
)
(
min_str
-
min_org
);
*
min_length
=
*
max_length
=
(
size_t
)
(
min_str
-
min_org
);
while
(
min_str
+
1
<
min_end
)
while
(
min_str
+
1
<
min_end
)
{
{
...
...
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