26 lines
729 B
Plaintext
26 lines
729 B
Plaintext
# FTS aux tables inherit row format and key block size
|
|
# from its parent table.
|
|
|
|
CREATE TABLE articles (
|
|
id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
|
|
title VARCHAR(200),
|
|
body TEXT,
|
|
FULLTEXT (title, body)
|
|
) ENGINE=InnoDB ROW_FORMAT=compressed KEY_BLOCK_SIZE=2;
|
|
|
|
INSERT INTO articles (title, body) VALUES
|
|
('MySQL Tutorial','DBMS stands for MySQL DataBase ...');
|
|
|
|
SELECT title, body FROM articles WHERE
|
|
MATCH(title, body) AGAINST('mysql');
|
|
|
|
--source include/restart_mysqld.inc
|
|
|
|
INSERT INTO articles (title, body) VALUES
|
|
('MySQL Tutorial','DBMS stands for MySQL DataBase ...');
|
|
|
|
SELECT title, body FROM articles WHERE
|
|
MATCH(title, body) AGAINST('mysql');
|
|
|
|
DROP TABLE articles;
|