mirror of
https://github.com/MariaDB/server.git
synced 2026-05-04 14:15:33 +02:00
space-stripping in _mi_prefix_search: BUG#5284
This commit is contained in:
parent
d8f416a26c
commit
7982187476
3 changed files with 30 additions and 3 deletions
|
|
@ -451,9 +451,8 @@ int _mi_prefix_search(MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *page,
|
|||
/* We have to compare k and vseg as if they where space extended */
|
||||
for (end=vseg + (len-cmplen) ;
|
||||
vseg < end && *vseg == (uchar) ' ';
|
||||
vseg++) ;
|
||||
if (vseg == end)
|
||||
goto cmp_rest; /* should never happen */
|
||||
vseg++, matched++) ;
|
||||
DBUG_ASSERT(vseg < end);
|
||||
|
||||
if (*vseg > (uchar) ' ')
|
||||
{
|
||||
|
|
|
|||
|
|
@ -428,6 +428,22 @@ select * from t1 where a='807780' and b='477' and c='165';
|
|||
a b c
|
||||
807780 477 165
|
||||
drop table t1;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
Warnings:
|
||||
Note 1051 Unknown table 't1'
|
||||
CREATE TABLE t1 (a varchar(150) NOT NULL, KEY (a));
|
||||
INSERT t1 VALUES ("can \tcan");
|
||||
INSERT t1 VALUES ("can can");
|
||||
INSERT t1 VALUES ("can");
|
||||
SELECT * FROM t1;
|
||||
a
|
||||
can can
|
||||
can
|
||||
can can
|
||||
CHECK TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
DROP TABLE t1;
|
||||
create table t1 (a blob);
|
||||
insert into t1 values('a '),('a');
|
||||
select concat(a,'.') from t1 where a='a';
|
||||
|
|
|
|||
|
|
@ -422,6 +422,18 @@ insert into t1 values('807780', '472', '162');
|
|||
select * from t1 where a='807780' and b='477' and c='165';
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# space-stripping in _mi_prefix_search: BUG#5284
|
||||
#
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (a varchar(150) NOT NULL, KEY (a));
|
||||
INSERT t1 VALUES ("can \tcan");
|
||||
INSERT t1 VALUES ("can can");
|
||||
INSERT t1 VALUES ("can");
|
||||
SELECT * FROM t1;
|
||||
CHECK TABLE t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# Verify blob handling
|
||||
#
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue