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
2eb6b134
Commit
2eb6b134
authored
Sep 12, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/usr/home/ram/work/5.0.b12917
parents
8f37abbf
2bcdbdab
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
4 deletions
+29
-4
heap/hp_hash.c
heap/hp_hash.c
+6
-4
mysql-test/r/ctype_utf8.result
mysql-test/r/ctype_utf8.result
+12
-0
mysql-test/t/ctype_utf8.test
mysql-test/t/ctype_utf8.test
+11
-0
No files found.
heap/hp_hash.c
View file @
2eb6b134
...
@@ -551,11 +551,13 @@ int hp_rec_key_cmp(HP_KEYDEF *keydef, const byte *rec1, const byte *rec2,
...
@@ -551,11 +551,13 @@ int hp_rec_key_cmp(HP_KEYDEF *keydef, const byte *rec1, const byte *rec2,
}
}
if
(
cs
->
mbmaxlen
>
1
)
if
(
cs
->
mbmaxlen
>
1
)
{
{
uint
safe_length1
=
char_length1
;
uint
safe_length2
=
char_length2
;
uint
char_length
=
seg
->
length
/
cs
->
mbmaxlen
;
uint
char_length
=
seg
->
length
/
cs
->
mbmaxlen
;
char_length1
=
my_charpos
(
cs
,
pos1
,
pos1
+
char_length1
,
char_length
1
);
char_length1
=
my_charpos
(
cs
,
pos1
,
pos1
+
char_length1
,
char_length
);
set_if_smaller
(
char_length1
,
s
eg
->
length
);
set_if_smaller
(
char_length1
,
s
afe_length1
);
char_length2
=
my_charpos
(
cs
,
pos2
,
pos2
+
char_length2
,
char_length
2
);
char_length2
=
my_charpos
(
cs
,
pos2
,
pos2
+
char_length2
,
char_length
);
set_if_smaller
(
char_length2
,
s
eg
->
length
);
set_if_smaller
(
char_length2
,
s
afe_length2
);
}
}
if
(
cs
->
coll
->
strnncollsp
(
seg
->
charset
,
if
(
cs
->
coll
->
strnncollsp
(
seg
->
charset
,
...
...
mysql-test/r/ctype_utf8.result
View file @
2eb6b134
...
@@ -1027,3 +1027,15 @@ aa
...
@@ -1027,3 +1027,15 @@ aa
xxx
xxx
yyy
yyy
DROP TABLE t1;
DROP TABLE t1;
set names utf8;
create table t1 (a char(1)) default character set utf8;
create table t2 (a char(1)) default character set utf8;
insert into t1 values('a'),('a'),(0xE38182),(0xE38182);
insert into t1 values('i'),('i'),(0xE38184),(0xE38184);
select * from t1 union distinct select * from t2;
a
a
あ
i
い
drop table t1,t2;
mysql-test/t/ctype_utf8.test
View file @
2eb6b134
...
@@ -863,3 +863,14 @@ SELECT DISTINCT id FROM t1;
...
@@ -863,3 +863,14 @@ SELECT DISTINCT id FROM t1;
SELECT
DISTINCT
id
FROM
t1
ORDER
BY
id
;
SELECT
DISTINCT
id
FROM
t1
ORDER
BY
id
;
DROP
TABLE
t1
;
DROP
TABLE
t1
;
#
# Bug#12891: UNION doesn't return DISTINCT result for multi-byte characters
#
set
names
utf8
;
create
table
t1
(
a
char
(
1
))
default
character
set
utf8
;
create
table
t2
(
a
char
(
1
))
default
character
set
utf8
;
insert
into
t1
values
(
'a'
),(
'a'
),(
0xE38182
),(
0xE38182
);
insert
into
t1
values
(
'i'
),(
'i'
),(
0xE38184
),(
0xE38184
);
select
*
from
t1
union
distinct
select
*
from
t2
;
drop
table
t1
,
t2
;
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