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
0750b2df
Commit
0750b2df
authored
Aug 13, 2015
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-8613 Full table scan for WHERE indexed_varchar_column <=> 'bad-character'
parent
60985e53
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
1 deletion
+22
-1
mysql-test/r/range.result
mysql-test/r/range.result
+12
-0
mysql-test/t/range.test
mysql-test/t/range.test
+9
-0
sql/opt_range.cc
sql/opt_range.cc
+1
-1
No files found.
mysql-test/r/range.result
View file @
0750b2df
...
...
@@ -2263,5 +2263,17 @@ a b
70 NULL
DROP TABLE t1;
#
# MDEV-8613 Full table scan for WHERE indexed_varchar_column <=> 'bad-character'
#
SET NAMES utf8;
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf8, KEY(a)) ENGINE=MyISAM;
INSERT INTO t1 VALUES ('a'),('b'),('c'),('d'),('e');
EXPLAIN SELECT * FROM t1 WHERE a<=>'😎';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
Warnings:
Warning 1366 Incorrect string value: '\xF0\x9F\x98\x8E' for column 'a' at row 1
DROP TABLE t1;
#
# End of 10.1 tests
#
mysql-test/t/range.test
View file @
0750b2df
...
...
@@ -1795,6 +1795,15 @@ SELECT * FROM t1 WHERE 10<>a;
DROP
TABLE
t1
;
--
echo
#
--
echo
# MDEV-8613 Full table scan for WHERE indexed_varchar_column <=> 'bad-character'
--
echo
#
SET
NAMES
utf8
;
CREATE
TABLE
t1
(
a
VARCHAR
(
10
)
CHARACTER
SET
utf8
,
KEY
(
a
))
ENGINE
=
MyISAM
;
INSERT
INTO
t1
VALUES
(
'a'
),(
'b'
),(
'c'
),(
'd'
),(
'e'
);
EXPLAIN
SELECT
*
FROM
t1
WHERE
a
<=>
'😎'
;
DROP
TABLE
t1
;
--
echo
#
--
echo
# End of 10.1 tests
--
echo
#
sql/opt_range.cc
View file @
0750b2df
...
...
@@ -7845,7 +7845,7 @@ Item_bool_func::get_mm_leaf(RANGE_OPT_PARAM *param,
err
=
value
->
save_in_field_no_warnings
(
field
,
1
);
if
(
err
==
2
&&
field
->
cmp_type
()
==
STRING_RESULT
)
{
if
(
type
==
EQ_FUNC
)
if
(
type
==
EQ_FUNC
||
type
==
EQUAL_FUNC
)
{
tree
=
new
(
alloc
)
SEL_ARG
(
field
,
0
,
0
);
tree
->
type
=
SEL_ARG
::
IMPOSSIBLE
;
...
...
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