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)
) COMMENT = 'ENGINE "InnoDB"' DEFAULT CHARSET UTF8MB4;
INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!");
INSERT INTO diaries (title, body) VALUES ("groonga (1)", "starting groonga...");
INSERT INTO diaries (title, body) VALUES ("groonga (2)", "started groonga.");
SELECT * FROM diaries
WHERE MATCH(title) AGAINST("survey") AND
MATCH(body) AGAINST("groonga");
id	title	body
1	survey	will start groonga!
START TRANSACTION;
DELETE FROM diaries WHERE id = 1;
ROLLBACK;
SELECT * FROM diaries;
id	title	body
1	survey	will start groonga!
2	groonga (1)	starting groonga...
3	groonga (2)	started groonga.
SELECT * FROM diaries
WHERE MATCH(title) AGAINST("survey") AND
MATCH(body) AGAINST("groonga");
id	title	body
DELETE FROM diaries WHERE id = 1;
Warnings:
Warning	1026	failed to get record ID for deleting from groonga: key=<\0001>
SELECT * FROM diaries;
id	title	body
2	groonga (1)	starting groonga...
3	groonga (2)	started groonga.
SELECT * FROM diaries
WHERE MATCH(title) AGAINST("survey") AND
MATCH(body) AGAINST("groonga");
id	title	body
DROP TABLE diaries;
