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
a50621e8
Commit
a50621e8
authored
Jul 08, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/usr/local/bk/mysql-5.0
into mysql.com:/home/pem/work/mysql-5.0
parents
accdff51
6eedec68
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
2 deletions
+34
-2
heap/hp_hash.c
heap/hp_hash.c
+2
-2
mysql-test/r/ctype_utf8.result
mysql-test/r/ctype_utf8.result
+19
-0
mysql-test/t/ctype_utf8.test
mysql-test/t/ctype_utf8.test
+13
-0
No files found.
heap/hp_hash.c
View file @
a50621e8
...
...
@@ -552,9 +552,9 @@ int hp_rec_key_cmp(HP_KEYDEF *keydef, const byte *rec1, const byte *rec2,
if
(
cs
->
mbmaxlen
>
1
)
{
uint
char_length
=
seg
->
length
/
cs
->
mbmaxlen
;
char_length1
=
my_charpos
(
cs
,
pos1
,
pos1
+
char_length1
,
char_length
);
char_length1
=
my_charpos
(
cs
,
pos1
,
pos1
+
char_length1
,
char_length
1
);
set_if_smaller
(
char_length1
,
seg
->
length
);
char_length2
=
my_charpos
(
cs
,
pos2
,
pos2
+
char_length2
,
char_length
);
char_length2
=
my_charpos
(
cs
,
pos2
,
pos2
+
char_length2
,
char_length
2
);
set_if_smaller
(
char_length2
,
seg
->
length
);
}
...
...
mysql-test/r/ctype_utf8.result
View file @
a50621e8
...
...
@@ -950,3 +950,22 @@ hex(a)
5B
E880BD
drop table t1;
CREATE TABLE t1(id varchar(20) NOT NULL) DEFAULT CHARSET=utf8;
INSERT INTO t1 VALUES ('xxx'), ('aa'), ('yyy'), ('aa');
SELECT id FROM t1;
id
xxx
aa
yyy
aa
SELECT DISTINCT id FROM t1;
id
xxx
aa
yyy
SELECT DISTINCT id FROM t1 ORDER BY id;
id
aa
xxx
yyy
DROP TABLE t1;
mysql-test/t/ctype_utf8.test
View file @
a50621e8
...
...
@@ -800,3 +800,16 @@ insert into t1 values (_utf8 0xe880bd);
insert
into
t1
values
(
_utf8
0x5b
);
select
hex
(
a
)
from
t1
;
drop
table
t1
;
#
# Test for bug #11484: wrong results for a DISTINCT varchar column in uft8.
#
CREATE
TABLE
t1
(
id
varchar
(
20
)
NOT
NULL
)
DEFAULT
CHARSET
=
utf8
;
INSERT
INTO
t1
VALUES
(
'xxx'
),
(
'aa'
),
(
'yyy'
),
(
'aa'
);
SELECT
id
FROM
t1
;
SELECT
DISTINCT
id
FROM
t1
;
SELECT
DISTINCT
id
FROM
t1
ORDER
BY
id
;
DROP
TABLE
t1
;
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