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
3da2a241
Commit
3da2a241
authored
Sep 06, 2004
by
bar@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug #5397: Crash with varchar binary and LIKE
parent
ab9843e2
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
1 deletion
+13
-1
mysql-test/r/ctype_utf8.result
mysql-test/r/ctype_utf8.result
+5
-0
mysql-test/t/ctype_utf8.test
mysql-test/t/ctype_utf8.test
+7
-0
strings/ctype-mb.c
strings/ctype-mb.c
+1
-1
No files found.
mysql-test/r/ctype_utf8.result
View file @
3da2a241
...
@@ -639,3 +639,8 @@ select * from t1 where str='str';
...
@@ -639,3 +639,8 @@ select * from t1 where str='str';
str
str
str
str
drop table t1;
drop table t1;
CREATE TABLE t1 (a varchar(32) BINARY) CHARACTER SET utf8;
INSERT INTO t1 VALUES ('test');
SELECT a FROM t1 WHERE a LIKE '%te';
a
DROP TABLE t1;
mysql-test/t/ctype_utf8.test
View file @
3da2a241
...
@@ -492,3 +492,10 @@ INSERT INTO t1 VALUES ('str2');
...
@@ -492,3 +492,10 @@ INSERT INTO t1 VALUES ('str2');
select
*
from
t1
where
str
=
'str'
;
select
*
from
t1
where
str
=
'str'
;
drop
table
t1
;
drop
table
t1
;
#
# Bug #5397: Crash with varchar binary and LIKE
#
CREATE
TABLE
t1
(
a
varchar
(
32
)
BINARY
)
CHARACTER
SET
utf8
;
INSERT
INTO
t1
VALUES
(
'test'
);
SELECT
a
FROM
t1
WHERE
a
LIKE
'%te'
;
DROP
TABLE
t1
;
strings/ctype-mb.c
View file @
3da2a241
...
@@ -565,7 +565,7 @@ static int my_wildcmp_mb_bin(CHARSET_INFO *cs,
...
@@ -565,7 +565,7 @@ static int my_wildcmp_mb_bin(CHARSET_INFO *cs,
if
(
str
++
==
str_end
)
return
(
-
1
);
if
(
str
++
==
str_end
)
return
(
-
1
);
}
}
{
{
int
tmp
=
my_wildcmp_mb
(
cs
,
str
,
str_end
,
wildstr
,
wildend
,
escape
,
w_one
,
w_many
);
int
tmp
=
my_wildcmp_mb
_bin
(
cs
,
str
,
str_end
,
wildstr
,
wildend
,
escape
,
w_one
,
w_many
);
if
(
tmp
<=
0
)
if
(
tmp
<=
0
)
return
(
tmp
);
return
(
tmp
);
}
}
...
...
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