Commit 13ef4d1d authored by serg@serg.mysql.com's avatar serg@serg.mysql.com
Browse files

Merge work:/home/bk/mysql into serg.mysql.com:/usr/home/serg/Abk/mysql

parents c4aafedf 389a7c02
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
sasha@mysql.sashanet.com
monty@donna.mysql.fi
serg@serg.mysql.com
+4 −0
Original line number Diff line number Diff line
@@ -21,3 +21,7 @@ t2 CREATE TABLE `t2` (
  FULLTEXT KEY `tix` (`inhalt`)
) TYPE=MyISAM
ticket	inhalt
ticket	inhalt
3	foobar
ticket	inhalt
3	foobar
+9 −1
Original line number Diff line number Diff line
@@ -42,7 +42,10 @@ ticket2.id = ttxt.ticket
WHERE t1.id = ticket2.ticket and match(ttxt.inhalt) against ('foobar');

INSERT INTO t1 VALUES (3,3);
select t1.id FROM t2 as ttxt,t1 INNER JOIN t1 as ticket2 ON ticket2.id = ttxt.ticket WHERE t1.id = ticket2.ticket and match(ttxt.inhalt) against ('foobar');
select t1.id FROM t2 as ttxt,t1
INNER JOIN t1 as ticket2 ON ticket2.id = ttxt.ticket
WHERE t1.id = ticket2.ticket and
      match(ttxt.inhalt) against ('foobar');

# Check that we get 'fulltext' index in SHOW CREATE

@@ -53,4 +56,9 @@ show create table t2;

select * from t2 where MATCH inhalt AGAINST (NULL);

# MATCH in HAVING (pretty useless, but still it should work)

select * from t2 where  MATCH inhalt AGAINST ('foobar');
select * from t2 having MATCH inhalt AGAINST ('foobar');

drop table t1,t2;
+1 −1
Original line number Diff line number Diff line
@@ -298,8 +298,8 @@ class Item_result_field :public Item /* Item with result field */

class Item_ref :public Item_ident
{
  Item **ref;
public:
  Item **ref;
  Item_ref(char *db_par,char *table_name_par,char *field_name_par)
    :Item_ident(db_par,table_name_par,field_name_par),ref(0) {}
  Item_ref(Item **item, char *table_name_par,char *field_name_par)
+6 −3
Original line number Diff line number Diff line
@@ -1961,12 +1961,15 @@ bool Item_func_match::fix_fields(THD *thd,struct st_table_list *tlist)

  while ((item=li++))
  {
    if (item->type() != Item::FIELD_ITEM || item->fix_fields(thd,tlist) ||
	!item->used_tables())
    if (item->fix_fields(thd,tlist))
      return 1;
    if (item->type() == Item::REF_ITEM)
      li.replace(item= *((Item_ref *)item)->ref);
    if (item->type() != Item::FIELD_ITEM || !item->used_tables())
      return 1;
    used_tables_cache|=item->used_tables();
  }
  /* check that all columns comes from the same table */
  /* check that all columns come from the same table */
  if (count_bits(used_tables_cache) != 1)
    return 1;
  const_item_cache=0;
Loading