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
5a3ce237
Commit
5a3ce237
authored
Dec 28, 2005
by
evgen@moonbone.local
Browse files
Options
Browse Files
Download
Plain Diff
Merge moonbone.local:/work/14583-bug-5.0-mysql
into moonbone.local:/work/14583-bug-5.1-new-mysql
parents
a3f44515
45abf0da
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
3 deletions
+54
-3
mysql-test/r/ctype_ucs.result
mysql-test/r/ctype_ucs.result
+7
-0
mysql-test/t/ctype_ucs.test
mysql-test/t/ctype_ucs.test
+8
-0
strings/ctype-ucs2.c
strings/ctype-ucs2.c
+39
-3
No files found.
mysql-test/r/ctype_ucs.result
View file @
5a3ce237
...
...
@@ -685,6 +685,13 @@ hex(a)
005B
803D
drop table t1;
create table t1(f1 varchar(5) CHARACTER SET ucs2 COLLATE ucs2_bin NOT NULL) engine=InnoDB;
insert into t1 values('a');
create index t1f1 on t1(f1);
select f1 from t1 where f1 like 'a%';
f1
a
drop table t1;
CREATE TABLE t1 (a varchar(64) character set ucs2, b decimal(10,3));
INSERT INTO t1 VALUES ("1.1", 0), ("2.1", 0);
update t1 set b=a;
...
...
mysql-test/t/ctype_ucs.test
View file @
5a3ce237
...
...
@@ -421,6 +421,14 @@ insert into t1 values (0x005b);
select
hex
(
a
)
from
t1
;
drop
table
t1
;
#
# Bug #14583 Bug on query using a LIKE on indexed field with ucs2_bin collation
#
create
table
t1
(
f1
varchar
(
5
)
CHARACTER
SET
ucs2
COLLATE
ucs2_bin
NOT
NULL
)
engine
=
InnoDB
;
insert
into
t1
values
(
'a'
);
create
index
t1f1
on
t1
(
f1
);
select
f1
from
t1
where
f1
like
'a%'
;
drop
table
t1
;
# End of 4.1 tests
#
...
...
strings/ctype-ucs2.c
View file @
5a3ce237
...
...
@@ -1373,14 +1373,50 @@ int my_strnncoll_ucs2_bin(CHARSET_INFO *cs,
return
(
int
)
(
t_is_prefix
?
t
-
te
:
((
se
-
s
)
-
(
te
-
t
)));
}
static
int
my_strnncollsp_ucs2_bin
(
CHARSET_INFO
*
cs
,
static
int
my_strnncollsp_ucs2_bin
(
CHARSET_INFO
*
cs
__attribute__
((
unused
))
,
const
uchar
*
s
,
uint
slen
,
const
uchar
*
t
,
uint
tlen
,
my_bool
diff_if_only_endspace_difference
__attribute__
((
unused
)))
{
/* TODO: Needs to be fixed to handle end space! */
return
my_strnncoll_ucs2_bin
(
cs
,
s
,
slen
,
t
,
tlen
,
0
);
const
uchar
*
se
,
*
te
;
uint
minlen
;
/* extra safety to make sure the lengths are even numbers */
slen
=
(
slen
>>
1
)
<<
1
;
tlen
=
(
tlen
>>
1
)
<<
1
;
se
=
s
+
slen
;
te
=
t
+
tlen
;
for
(
minlen
=
min
(
slen
,
tlen
);
minlen
;
minlen
-=
2
)
{
int
s_wc
=
s
[
0
]
*
256
+
s
[
1
];
int
t_wc
=
t
[
0
]
*
256
+
t
[
1
];
if
(
s_wc
!=
t_wc
)
return
s_wc
>
t_wc
?
1
:
-
1
;
s
+=
2
;
t
+=
2
;
}
if
(
slen
!=
tlen
)
{
int
swap
=
1
;
if
(
slen
<
tlen
)
{
s
=
t
;
se
=
te
;
swap
=
-
1
;
}
for
(
;
s
<
se
;
s
+=
2
)
{
if
(
s
[
0
]
||
s
[
1
]
!=
' '
)
return
(
s
[
0
]
==
0
&&
s
[
1
]
<
' '
)
?
-
swap
:
swap
;
}
}
return
0
;
}
...
...
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