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
79821874
Commit
79821874
authored
Aug 30, 2004
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
space-stripping in _mi_prefix_search: BUG#5284
parent
d8f416a2
Changes
3
Hide 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 @
79821874
...
@@ -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 @
79821874
...
@@ -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 @
79821874
...
@@ -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