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
994d648d
Commit
994d648d
authored
Aug 30, 2004
by
serg@serg.mylan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
space-stripping in _mi_prefix_search: BUG#5284
parent
b60713c0
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
3 deletions
+30
-3
myisam/mi_search.c
myisam/mi_search.c
+2
-3
mysql-test/r/myisam.result
mysql-test/r/myisam.result
+16
-0
mysql-test/t/myisam.test
mysql-test/t/myisam.test
+12
-0
No files found.
myisam/mi_search.c
View file @
994d648d
...
@@ -451,9 +451,8 @@ int _mi_prefix_search(MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *page,
...
@@ -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 */
/* We have to compare k and vseg as if they where space extended */
for
(
end
=
vseg
+
(
len
-
cmplen
)
;
for
(
end
=
vseg
+
(
len
-
cmplen
)
;
vseg
<
end
&&
*
vseg
==
(
uchar
)
' '
;
vseg
<
end
&&
*
vseg
==
(
uchar
)
' '
;
vseg
++
)
;
vseg
++
,
matched
++
)
;
if
(
vseg
==
end
)
DBUG_ASSERT
(
vseg
<
end
);
goto
cmp_rest
;
/* should never happen */
if
(
*
vseg
>
(
uchar
)
' '
)
if
(
*
vseg
>
(
uchar
)
' '
)
{
{
...
...
mysql-test/r/myisam.result
View file @
994d648d
...
@@ -428,6 +428,22 @@ select * from t1 where a='807780' and b='477' and c='165';
...
@@ -428,6 +428,22 @@ select * from t1 where a='807780' and b='477' and c='165';
a b c
a b c
807780 477 165
807780 477 165
drop table t1;
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);
create table t1 (a blob);
insert into t1 values('a '),('a');
insert into t1 values('a '),('a');
select concat(a,'.') from t1 where a='a';
select concat(a,'.') from t1 where a='a';
...
...
mysql-test/t/myisam.test
View file @
994d648d
...
@@ -422,6 +422,18 @@ insert into t1 values('807780', '472', '162');
...
@@ -422,6 +422,18 @@ insert into t1 values('807780', '472', '162');
select
*
from
t1
where
a
=
'807780'
and
b
=
'477'
and
c
=
'165'
;
select
*
from
t1
where
a
=
'807780'
and
b
=
'477'
and
c
=
'165'
;
drop
table
t1
;
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
\t
can"
);
INSERT
t1
VALUES
(
"can can"
);
INSERT
t1
VALUES
(
"can"
);
SELECT
*
FROM
t1
;
CHECK
TABLE
t1
;
DROP
TABLE
t1
;
#
#
# Verify blob handling
# Verify blob handling
#
#
...
...
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