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
03cba628
Commit
03cba628
authored
Nov 24, 2004
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug#6787 LIKE not working properly with _ and utf8 data
parent
232bbfda
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
34 additions
and
13 deletions
+34
-13
mysql-test/r/ctype_uca.result
mysql-test/r/ctype_uca.result
+3
-0
mysql-test/r/ctype_utf8.result
mysql-test/r/ctype_utf8.result
+3
-0
mysql-test/t/ctype_uca.test
mysql-test/t/ctype_uca.test
+5
-0
mysql-test/t/ctype_utf8.test
mysql-test/t/ctype_utf8.test
+6
-0
strings/ctype-uca.c
strings/ctype-uca.c
+3
-1
strings/ctype-utf8.c
strings/ctype-utf8.c
+14
-12
No files found.
mysql-test/r/ctype_uca.result
View file @
03cba628
...
...
@@ -19,6 +19,9 @@ select 'a ' = 'a\t', 'a ' < 'a\t', 'a ' > 'a\t';
select 'a a' > 'a', 'a \t' < 'a';
'a a' > 'a' 'a \t' < 'a'
1 1
select 'c' like '\_' as want0;
want0
0
CREATE TABLE t (
c char(20) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
...
...
mysql-test/r/ctype_utf8.result
View file @
03cba628
...
...
@@ -814,3 +814,6 @@ t2 CREATE TABLE `t2` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t2;
drop table t1;
select 'c' like '\_' as want0;
want0
0
mysql-test/t/ctype_uca.test
View file @
03cba628
...
...
@@ -24,6 +24,11 @@ select 'a ' = 'a\t', 'a ' < 'a\t', 'a ' > 'a\t';
select
'a a'
>
'a'
,
'a \t'
<
'a'
;
#
# Bug #6787 LIKE not working properly with _ and utf8 data
#
select
'c'
like
'\_'
as
want0
;
#
# Bug #5679 utf8_unicode_ci LIKE--trailing % doesn't equal zero characters
#
...
...
mysql-test/t/ctype_utf8.test
View file @
03cba628
...
...
@@ -660,3 +660,9 @@ create table t2 select concat(a,_utf8'') as a, concat(b,_utf8'')as b from t1;
show
create
table
t2
;
drop
table
t2
;
drop
table
t1
;
#
# Bug #6787 LIKE not working properly with _ and utf8 data
#
select
'c'
like
'\_'
as
want0
;
strings/ctype-uca.c
View file @
03cba628
...
...
@@ -7288,6 +7288,7 @@ int my_wildcmp_uca(CHARSET_INFO *cs,
{
while
(
1
)
{
my_bool
escaped
=
0
;
if
((
scan
=
mb_wc
(
cs
,
&
w_wc
,
(
const
uchar
*
)
wildstr
,
(
const
uchar
*
)
wildend
))
<=
0
)
return
1
;
...
...
@@ -7305,6 +7306,7 @@ int my_wildcmp_uca(CHARSET_INFO *cs,
(
const
uchar
*
)
wildend
))
<=
0
)
return
1
;
wildstr
+=
scan
;
escaped
=
1
;
}
if
((
scan
=
mb_wc
(
cs
,
&
s_wc
,
(
const
uchar
*
)
str
,
...
...
@@ -7312,7 +7314,7 @@ int my_wildcmp_uca(CHARSET_INFO *cs,
return
1
;
str
+=
scan
;
if
(
w_wc
==
(
my_wc_t
)
w_one
)
if
(
!
escaped
&&
w_wc
==
(
my_wc_t
)
w_one
)
{
result
=
1
;
/* Found an anchor char */
}
...
...
strings/ctype-utf8.c
View file @
03cba628
...
...
@@ -1545,31 +1545,33 @@ int my_wildcmp_unicode(CHARSET_INFO *cs,
{
while
(
1
)
{
my_bool
escaped
=
0
;
if
((
scan
=
mb_wc
(
cs
,
&
w_wc
,
(
const
uchar
*
)
wildstr
,
(
const
uchar
*
)
wildend
))
<=
0
)
return
1
;
if
(
w_wc
==
(
my_wc_t
)
escape
)
{
wildstr
+=
scan
;
if
((
scan
=
mb_wc
(
cs
,
&
w_wc
,
(
const
uchar
*
)
wildstr
,
(
const
uchar
*
)
wildend
))
<=
0
)
return
1
;
}
if
(
w_wc
==
(
my_wc_t
)
w_many
)
{
result
=
1
;
/* Found an anchor char */
break
;
}
wildstr
+=
scan
;
if
(
w_wc
==
(
my_wc_t
)
escape
)
{
if
((
scan
=
mb_wc
(
cs
,
&
w_wc
,
(
const
uchar
*
)
wildstr
,
(
const
uchar
*
)
wildend
))
<=
0
)
return
1
;
wildstr
+=
scan
;
escaped
=
1
;
}
if
((
scan
=
mb_wc
(
cs
,
&
s_wc
,
(
const
uchar
*
)
str
,
(
const
uchar
*
)
str_end
))
<=
0
)
(
const
uchar
*
)
str_end
))
<=
0
)
return
1
;
str
+=
scan
;
if
(
w_wc
==
(
my_wc_t
)
w_one
)
if
(
!
escaped
&&
w_wc
==
(
my_wc_t
)
w_one
)
{
result
=
1
;
/* Found an anchor char */
}
...
...
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