Commit 2a45213e authored by unknown's avatar unknown

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()
parent 616b26b1
match(t1.texte,t1.sujet,t1.motsclefs) against('droit')
0
0
0.67003110026735
0
#
# Test for bug from Jean-Cdric 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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment