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
c5004e39
Commit
c5004e39
authored
Dec 17, 2013
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-5445 Server crashes in Item_func_like::fix_fields on LIKE ExtractValue(..)
Fixed.
parent
c1a65228
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
1 deletion
+23
-1
mysql-test/r/func_like.result
mysql-test/r/func_like.result
+12
-0
mysql-test/t/func_like.test
mysql-test/t/func_like.test
+10
-0
sql/item_cmpfunc.cc
sql/item_cmpfunc.cc
+1
-1
No files found.
mysql-test/r/func_like.result
View file @
c5004e39
...
...
@@ -188,3 +188,15 @@ DROP TABLE t1, t2;
SELECT '' LIKE '1' ESCAPE COUNT(1);
ERROR HY000: Incorrect arguments to ESCAPE
End of 5.1 tests
#
# Start of 10.0 tests
#
#
# MDEV-5445 Server crashes in Item_func_like::fix_fields on LIKE ExtractValue(..)
#
SELECT 'a' LIKE REPEAT('',0);
'a' LIKE REPEAT('',0)
0
SELECT 'a' LIKE EXTRACTVALUE('bar','qux');
'a' LIKE EXTRACTVALUE('bar','qux')
0
mysql-test/t/func_like.test
View file @
c5004e39
...
...
@@ -133,3 +133,13 @@ DROP TABLE t1, t2;
SELECT
''
LIKE
'1'
ESCAPE
COUNT
(
1
);
--
echo
End
of
5.1
tests
--
echo
#
--
echo
# Start of 10.0 tests
--
echo
#
--
echo
#
--
echo
# MDEV-5445 Server crashes in Item_func_like::fix_fields on LIKE ExtractValue(..)
--
echo
#
SELECT
'a'
LIKE
REPEAT
(
''
,
0
);
SELECT
'a'
LIKE
EXTRACTVALUE
(
'bar'
,
'qux'
);
sql/item_cmpfunc.cc
View file @
c5004e39
...
...
@@ -5020,7 +5020,7 @@ bool Item_func_like::fix_fields(THD *thd, Item **ref)
turboBM_compute_bad_character_shifts
();
DBUG_PRINT
(
"info"
,(
"done"
));
}
use_sampling
=
(
(
*
first
==
wild_many
||
*
first
==
wild_one
)
&&
len
>
2
);
use_sampling
=
(
len
>
2
&&
(
*
first
==
wild_many
||
*
first
==
wild_one
)
);
}
}
return
FALSE
;
...
...
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