mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
sql_select.cc check for cond==NULL in add_ft_keys()
fulltext_left_join.result BitKeeper file /usr/home/serg/Abk/mysql/mysql-test/r/fulltext_left_join.result fulltext_left_join.test BitKeeper file /usr/home/serg/Abk/mysql/mysql-test/t/fulltext_left_join.test mysql-test/t/fulltext_left_join.test: edited sql/sql_select.cc: check for cond==NULL in add_ft_keys()
This commit is contained in:
parent
784f9e5975
commit
ff59a22d04
3 changed files with 33 additions and 0 deletions
5
mysql-test/r/fulltext_left_join.result
Normal file
5
mysql-test/r/fulltext_left_join.result
Normal file
|
@ -0,0 +1,5 @@
|
|||
match(t1.texte,t1.sujet,t1.motsclefs) against('droit')
|
||||
0
|
||||
0
|
||||
0.67003110026735
|
||||
0
|
25
mysql-test/t/fulltext_left_join.test
Normal file
25
mysql-test/t/fulltext_left_join.test
Normal file
|
@ -0,0 +1,25 @@
|
|||
#
|
||||
# Test for bug from Jean-Cédric COSTA <jean-cedric.costa@ensmp.fr>
|
||||
#
|
||||
|
||||
CREATE TABLE t1 (
|
||||
id VARCHAR(255) NOT NULL PRIMARY KEY,
|
||||
sujet VARCHAR(255),
|
||||
motsclefs TEXT,
|
||||
texte MEDIUMTEXT,
|
||||
FULLTEXT(sujet, motsclefs, texte)
|
||||
);
|
||||
INSERT INTO t1 VALUES('123','toto','essai','test');
|
||||
INSERT INTO t1 VALUES('456','droit','penal','lawyer');
|
||||
INSERT INTO t1 VALUES('789','aaaaa','bbbbb','cccccc');
|
||||
CREATE TABLE t2 (
|
||||
id VARCHAR(255) NOT NULL,
|
||||
author VARCHAR(255) NOT NULL
|
||||
);
|
||||
INSERT INTO t2 VALUES('123', 'moi');
|
||||
INSERT INTO t2 VALUES('123', 'lui');
|
||||
INSERT INTO t2 VALUES('456', 'lui');
|
||||
|
||||
select match(t1.texte,t1.sujet,t1.motsclefs) against('droit')
|
||||
from t1 left join t2 on t2.id=t1.id;
|
||||
|
|
@ -1329,6 +1329,9 @@ add_ft_keys(DYNAMIC_ARRAY *keyuse_array,
|
|||
{
|
||||
Item_func_match *cond_func=NULL;
|
||||
|
||||
if (!cond)
|
||||
return;
|
||||
|
||||
if (cond->type() == Item::FUNC_ITEM)
|
||||
{
|
||||
Item_func *func=(Item_func *)cond,
|
||||
|
|
Loading…
Reference in a new issue