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
9d8d16cc
Commit
9d8d16cc
authored
Sep 06, 2004
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug #5397: Crash with varchar binary and LIKE
parent
7d0df267
Changes
3
Hide 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 @
9d8d16cc
...
...
@@ -639,3 +639,8 @@ select * from t1 where str='str';
str
str
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 @
9d8d16cc
...
...
@@ -492,3 +492,10 @@ INSERT INTO t1 VALUES ('str2');
select
*
from
t1
where
str
=
'str'
;
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 @
9d8d16cc
...
...
@@ -565,7 +565,7 @@ static int my_wildcmp_mb_bin(CHARSET_INFO *cs,
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
)
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