DROP TABLE IF EXISTS diaries;
CREATE TABLE diaries (
id INT PRIMARY KEY AUTO_INCREMENT,
title TEXT,
body TEXT,
FULLTEXT INDEX title_index (title),
FULLTEXT INDEX body_index (body)
) ENGINE MyISAM DEFAULT CHARSET UTF8MB4;
SELECT table_name, engine, table_comment
FROM information_schema.tables
WHERE table_name = 'diaries';
table_name	engine	table_comment
diaries	MyISAM	
INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!");
INSERT INTO diaries (title, body) VALUES ("groonga (1)", "starting groonga...");
SELECT * FROM diaries
WHERE MATCH(title) AGAINST("survey" IN BOOLEAN MODE) AND
MATCH(body) AGAINST("groonga" IN BOOLEAN MODE);
id	title	body
1	survey	will start groonga!
ALTER TABLE diaries ENGINE = mroonga COMMENT = 'ENGINE "InnoDB"';
SELECT table_name, engine, table_comment
FROM information_schema.tables
WHERE table_name = 'diaries';
table_name	engine	table_comment
diaries	Mroonga	ENGINE "InnoDB"
SELECT * FROM diaries
WHERE MATCH(title) AGAINST("survey" IN BOOLEAN MODE) AND
MATCH(body) AGAINST("groonga" IN BOOLEAN MODE);
id	title	body
1	survey	will start groonga!
INSERT INTO diaries (title, body) VALUES ("groonga (2)", "started groonga.");
SELECT * FROM diaries
WHERE MATCH(title) AGAINST("groonga" IN BOOLEAN MODE) AND
MATCH(body) AGAINST("groonga" IN BOOLEAN MODE);
id	title	body
2	groonga (1)	starting groonga...
3	groonga (2)	started groonga.
DROP TABLE diaries;
