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
425c5ecd
Commit
425c5ecd
authored
15 years ago
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug#34374 mysql generates incorrect warning
backport to next-mr
parent
c761cdc7
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
6 deletions
+23
-6
mysql-test/r/fulltext.result
mysql-test/r/fulltext.result
+8
-0
mysql-test/t/fulltext.test
mysql-test/t/fulltext.test
+9
-0
sql/sql_select.cc
sql/sql_select.cc
+6
-6
No files found.
mysql-test/r/fulltext.result
View file @
425c5ecd
...
@@ -494,6 +494,14 @@ SELECT a FROM t1 WHERE MATCH a AGAINST ('+city* of*' IN BOOLEAN MODE);
...
@@ -494,6 +494,14 @@ SELECT a FROM t1 WHERE MATCH a AGAINST ('+city* of*' IN BOOLEAN MODE);
a
a
City Of God
City Of God
DROP TABLE t1;
DROP TABLE t1;
create table t1(a text,b date,fulltext index(a))engine=myisam;
insert into t1 set a='water',b='2008-08-04';
select 1 from t1 where match(a) against ('water' in boolean mode) and b>='2008-08-01';
1
1
drop table t1;
show warnings;
Level Code Message
CREATE TABLE t1 (a VARCHAR(255), b INT, FULLTEXT(a), KEY(b));
CREATE TABLE t1 (a VARCHAR(255), b INT, FULLTEXT(a), KEY(b));
INSERT INTO t1 VALUES('test', 1),('test', 1),('test', 1),('test', 1),
INSERT INTO t1 VALUES('test', 1),('test', 1),('test', 1),('test', 1),
('test', 1),('test', 2),('test', 3),('test', 4);
('test', 1),('test', 2),('test', 3),('test', 4);
...
...
This diff is collapsed.
Click to expand it.
mysql-test/t/fulltext.test
View file @
425c5ecd
...
@@ -419,6 +419,15 @@ DROP TABLE t1;
...
@@ -419,6 +419,15 @@ DROP TABLE t1;
# End of 4.1 tests
# End of 4.1 tests
#
# bug#34374 - mysql generates incorrect warning
#
create
table
t1
(
a
text
,
b
date
,
fulltext
index
(
a
))
engine
=
myisam
;
insert
into
t1
set
a
=
'water'
,
b
=
'2008-08-04'
;
select
1
from
t1
where
match
(
a
)
against
(
'water'
in
boolean
mode
)
and
b
>=
'2008-08-01'
;
drop
table
t1
;
show
warnings
;
#
#
# BUG#38842 - Fix for 25951 seems incorrect
# BUG#38842 - Fix for 25951 seems incorrect
#
#
...
...
This diff is collapsed.
Click to expand it.
sql/sql_select.cc
View file @
425c5ecd
...
@@ -3613,16 +3613,16 @@ add_ft_keys(DYNAMIC_ARRAY *keyuse_array,
...
@@ -3613,16 +3613,16 @@ add_ft_keys(DYNAMIC_ARRAY *keyuse_array,
Item_func
*
arg0
=
(
Item_func
*
)(
func
->
arguments
()[
0
]),
Item_func
*
arg0
=
(
Item_func
*
)(
func
->
arguments
()[
0
]),
*
arg1
=
(
Item_func
*
)(
func
->
arguments
()[
1
]);
*
arg1
=
(
Item_func
*
)(
func
->
arguments
()[
1
]);
if
(
arg1
->
const_item
()
&&
if
(
arg1
->
const_item
()
&&
((
functype
==
Item_func
::
GE_FUNC
&&
arg1
->
val_real
()
>
0
)
||
(
functype
==
Item_func
::
GT_FUNC
&&
arg1
->
val_real
()
>=
0
))
&&
arg0
->
type
()
==
Item
::
FUNC_ITEM
&&
arg0
->
type
()
==
Item
::
FUNC_ITEM
&&
arg0
->
functype
()
==
Item_func
::
FT_FUNC
)
arg0
->
functype
()
==
Item_func
::
FT_FUNC
&&
((
functype
==
Item_func
::
GE_FUNC
&&
arg1
->
val_real
()
>
0
)
||
(
functype
==
Item_func
::
GT_FUNC
&&
arg1
->
val_real
()
>=
0
)))
cond_func
=
(
Item_func_match
*
)
arg0
;
cond_func
=
(
Item_func_match
*
)
arg0
;
else
if
(
arg0
->
const_item
()
&&
else
if
(
arg0
->
const_item
()
&&
((
functype
==
Item_func
::
LE_FUNC
&&
arg0
->
val_real
()
>
0
)
||
(
functype
==
Item_func
::
LT_FUNC
&&
arg0
->
val_real
()
>=
0
))
&&
arg1
->
type
()
==
Item
::
FUNC_ITEM
&&
arg1
->
type
()
==
Item
::
FUNC_ITEM
&&
arg1
->
functype
()
==
Item_func
::
FT_FUNC
)
arg1
->
functype
()
==
Item_func
::
FT_FUNC
&&
((
functype
==
Item_func
::
LE_FUNC
&&
arg0
->
val_real
()
>
0
)
||
(
functype
==
Item_func
::
LT_FUNC
&&
arg0
->
val_real
()
>=
0
)))
cond_func
=
(
Item_func_match
*
)
arg1
;
cond_func
=
(
Item_func_match
*
)
arg1
;
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
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