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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
caa1d802
Commit
caa1d802
authored
Oct 11, 2006
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1-rpl
into mysql.com:/usr/home/bar/mysql-4.1-rpl.b22052
parents
aa788dce
de70be9d
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
7 deletions
+50
-7
myisam/mi_key.c
myisam/mi_key.c
+8
-7
myisam/mi_open.c
myisam/mi_open.c
+2
-0
mysql-test/r/ctype_ucs.result
mysql-test/r/ctype_ucs.result
+22
-0
mysql-test/t/ctype_ucs.test
mysql-test/t/ctype_ucs.test
+18
-0
No files found.
myisam/mi_key.c
View file @
caa1d802
...
@@ -42,7 +42,7 @@ static int _mi_put_key_in_record(MI_INFO *info,uint keynr,byte *record);
...
@@ -42,7 +42,7 @@ static int _mi_put_key_in_record(MI_INFO *info,uint keynr,byte *record);
uint
_mi_make_key
(
register
MI_INFO
*
info
,
uint
keynr
,
uchar
*
key
,
uint
_mi_make_key
(
register
MI_INFO
*
info
,
uint
keynr
,
uchar
*
key
,
const
byte
*
record
,
my_off_t
filepos
)
const
byte
*
record
,
my_off_t
filepos
)
{
{
byte
*
pos
,
*
end
;
byte
*
pos
;
uchar
*
start
;
uchar
*
start
;
reg1
HA_KEYSEG
*
keyseg
;
reg1
HA_KEYSEG
*
keyseg
;
my_bool
is_ft
=
info
->
s
->
keyinfo
[
keynr
].
flag
&
HA_FULLTEXT
;
my_bool
is_ft
=
info
->
s
->
keyinfo
[
keynr
].
flag
&
HA_FULLTEXT
;
...
@@ -84,18 +84,17 @@ uint _mi_make_key(register MI_INFO *info, uint keynr, uchar *key,
...
@@ -84,18 +84,17 @@ uint _mi_make_key(register MI_INFO *info, uint keynr, uchar *key,
pos
=
(
byte
*
)
record
+
keyseg
->
start
;
pos
=
(
byte
*
)
record
+
keyseg
->
start
;
if
(
keyseg
->
flag
&
HA_SPACE_PACK
)
if
(
keyseg
->
flag
&
HA_SPACE_PACK
)
{
{
end
=
pos
+
length
;
if
(
type
!=
HA_KEYTYPE_NUM
)
if
(
type
!=
HA_KEYTYPE_NUM
)
{
{
while
(
end
>
pos
&&
end
[
-
1
]
==
' '
)
length
=
cs
->
cset
->
lengthsp
(
cs
,
pos
,
length
);
end
--
;
}
}
else
else
{
{
byte
*
end
=
pos
+
length
;
while
(
pos
<
end
&&
pos
[
0
]
==
' '
)
while
(
pos
<
end
&&
pos
[
0
]
==
' '
)
pos
++
;
pos
++
;
}
length
=
(
uint
)
(
end
-
pos
);
length
=
(
uint
)
(
end
-
pos
);
}
FIX_LENGTH
(
cs
,
pos
,
length
,
char_length
);
FIX_LENGTH
(
cs
,
pos
,
length
,
char_length
);
store_key_length_inc
(
key
,
char_length
);
store_key_length_inc
(
key
,
char_length
);
memcpy
((
byte
*
)
key
,(
byte
*
)
pos
,(
size_t
)
char_length
);
memcpy
((
byte
*
)
key
,(
byte
*
)
pos
,(
size_t
)
char_length
);
...
@@ -359,7 +358,9 @@ static int _mi_put_key_in_record(register MI_INFO *info, uint keynr,
...
@@ -359,7 +358,9 @@ static int _mi_put_key_in_record(register MI_INFO *info, uint keynr,
if
(
keyseg
->
type
!=
(
int
)
HA_KEYTYPE_NUM
)
if
(
keyseg
->
type
!=
(
int
)
HA_KEYTYPE_NUM
)
{
{
memcpy
(
pos
,
key
,(
size_t
)
length
);
memcpy
(
pos
,
key
,(
size_t
)
length
);
bfill
(
pos
+
length
,
keyseg
->
length
-
length
,
' '
);
keyseg
->
charset
->
cset
->
fill
(
keyseg
->
charset
,
pos
+
length
,
keyseg
->
length
-
length
,
' '
);
}
}
else
else
{
{
...
...
myisam/mi_open.c
View file @
caa1d802
...
@@ -323,6 +323,8 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags)
...
@@ -323,6 +323,8 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags)
goto
err
;
goto
err
;
}
}
}
}
else
if
(
pos
->
type
==
HA_KEYTYPE_BINARY
)
pos
->
charset
=
&
my_charset_bin
;
}
}
if
(
share
->
keyinfo
[
i
].
flag
&
HA_SPATIAL
)
if
(
share
->
keyinfo
[
i
].
flag
&
HA_SPATIAL
)
{
{
...
...
mysql-test/r/ctype_ucs.result
View file @
caa1d802
...
@@ -715,6 +715,28 @@ lily
...
@@ -715,6 +715,28 @@ lily
river
river
drop table t1;
drop table t1;
deallocate prepare stmt;
deallocate prepare stmt;
create table t1 (
a char(10) unicode not null,
index a (a)
) engine=myisam;
insert into t1 values (repeat(0x201f, 10));
insert into t1 values (repeat(0x2020, 10));
insert into t1 values (repeat(0x2021, 10));
explain select hex(a) from t1 order by a;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL a 20 NULL 3 Using index
select hex(a) from t1 order by a;
hex(a)
201F201F201F201F201F201F201F201F201F201F
2020202020202020202020202020202020202020
2021202120212021202120212021202120212021
alter table t1 drop index a;
select hex(a) from t1 order by a;
hex(a)
201F201F201F201F201F201F201F201F201F201F
2020202020202020202020202020202020202020
2021202120212021202120212021202120212021
drop table t1;
CREATE TABLE t1 (id int, s char(5) CHARACTER SET ucs2 COLLATE ucs2_unicode_ci);
CREATE TABLE t1 (id int, s char(5) CHARACTER SET ucs2 COLLATE ucs2_unicode_ci);
INSERT INTO t1 VALUES (1, 'ZZZZZ'), (1, 'ZZZ'), (2, 'ZZZ'), (2, 'ZZZZZ');
INSERT INTO t1 VALUES (1, 'ZZZZZ'), (1, 'ZZZ'), (2, 'ZZZ'), (2, 'ZZZZZ');
SELECT id, MIN(s) FROM t1 GROUP BY id;
SELECT id, MIN(s) FROM t1 GROUP BY id;
...
...
mysql-test/t/ctype_ucs.test
View file @
caa1d802
...
@@ -452,6 +452,24 @@ select utext from t1 where utext like '%%';
...
@@ -452,6 +452,24 @@ select utext from t1 where utext like '%%';
drop
table
t1
;
drop
table
t1
;
deallocate
prepare
stmt
;
deallocate
prepare
stmt
;
#
# Bug#22052 Trailing spaces are not removed from UNICODE fields in an index
#
create
table
t1
(
a
char
(
10
)
unicode
not
null
,
index
a
(
a
)
)
engine
=
myisam
;
insert
into
t1
values
(
repeat
(
0x201f
,
10
));
insert
into
t1
values
(
repeat
(
0x2020
,
10
));
insert
into
t1
values
(
repeat
(
0x2021
,
10
));
# make sure "index read" is used
explain
select
hex
(
a
)
from
t1
order
by
a
;
select
hex
(
a
)
from
t1
order
by
a
;
alter
table
t1
drop
index
a
;
select
hex
(
a
)
from
t1
order
by
a
;
drop
table
t1
;
#
#
# Bug #20076: server crashes for a query with GROUP BY if MIN/MAX aggregation
# Bug #20076: server crashes for a query with GROUP BY if MIN/MAX aggregation
# over a 'ucs2' field uses a temporary table
# over a 'ucs2' field uses a temporary table
...
...
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