Commit 089b88e0 authored by unknown's avatar unknown

added test case for fulltext join bug

parent 1f93d6be
DROP TABLE IF EXISTS stories;
CREATE TABLE stories (
sid char(16) NOT NULL,
tid smallint UNSIGNED NOT NULL,
uid mediumint UNSIGNED NOT NULL,
title varchar(100) DEFAULT '' NOT NULL,
dept varchar(100),
time datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
hits mediumint UNSIGNED DEFAULT '0' NOT NULL,
section varchar(30) DEFAULT '' NOT NULL,
displaystatus tinyint DEFAULT '0' NOT NULL,
commentstatus tinyint,
discussion mediumint UNSIGNED,
submitter mediumint UNSIGNED NOT NULL,
flags set("delete_me","data_dirty") DEFAULT '' NOT NULL,
PRIMARY KEY (sid),
FOREIGN KEY (uid) REFERENCES users(uid),
FOREIGN KEY (tid) REFERENCES tid(topic),
FOREIGN KEY (section) REFERENCES sections(section),
KEY time (time),
KEY searchform (displaystatus,time)
) TYPE = myisam;
DROP TABLE IF EXISTS story_text;
CREATE TABLE story_text (
sid char(16) NOT NULL,
introtext text,
bodytext text,
relatedtext text,
FOREIGN KEY (sid) REFERENCES stories(sid),
PRIMARY KEY (sid)
) TYPE = myisam;
ALTER TABLE stories add fulltext (title);
ALTER TABLE story_text add fulltext (introtext,bodytext);
SELECT stories.sid,title, TRUNCATE((MATCH (title,introtext,bodytext)
AGAINST('install')), 1) as score FROM stories,story_text WHERE
stories.sid = story_text.sid AND MATCH (title,introtext,bodytext)
AGAINST ('install');
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