1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Merge branch '10.9' into 10.10

This commit is contained in:
Oleksandr Byelkin
2023-08-05 16:14:46 +02:00
867 changed files with 12543 additions and 6345 deletions

View File

@@ -41,7 +41,9 @@ INSERT INTO diaries VALUES(6, 2011, 12, 2, "初雪", "今日の天気は雪!")
SELECT SQL_CALC_FOUND_ROWS * FROM diaries WHERE MATCH(content) AGAINST("今日 天気" IN BOOLEAN MODE) ORDER BY day LIMIT 0,5;
--disable_ps2_protocol
SELECT FOUND_ROWS();
--enable_ps2_protocol
DROP TABLE diaries;

View File

@@ -43,7 +43,9 @@ CONNECTION default;
enable_query_log;
SHOW STATUS LIKE 'mroonga_count_skip';
--disable_ps2_protocol
SELECT COUNT(*) FROM diaries WHERE MATCH(title) AGAINST("mroonga" IN BOOLEAN MODE);
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_count_skip';
DROP TABLE diaries;

View File

@@ -32,7 +32,9 @@ INSERT INTO diaries VALUES("It's funny.");
INSERT INTO diaries VALUES("Happy birthday!");
SHOW STATUS LIKE 'mroonga_count_skip';
--disable_ps2_protocol
SELECT COUNT(*) FROM diaries WHERE MATCH(title) AGAINST("mroonga" IN BOOLEAN MODE);
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_count_skip';
DROP TABLE diaries;

View File

@@ -38,8 +38,10 @@ INSERT INTO diaries VALUES(5, "はれ", "天気がよいのは今日までみた
SET mroonga_enable_optimization=FALSE;
--disable_ps2_protocol
SELECT COUNT(*) FROM diaries
WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE);
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_count_skip';

View File

@@ -35,7 +35,9 @@ INSERT INTO users (id, age) VALUES (2, 29);
INSERT INTO users (id, age) VALUES (2, 29);
INSERT INTO users (id, age) VALUES (3, 29);
--disable_ps2_protocol
SELECT COUNT(*) FROM users WHERE id = 2 AND age = 29;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_count_skip';

View File

@@ -34,7 +34,9 @@ INSERT INTO users (age) VALUES (30);
INSERT INTO users (age) VALUES (31);
INSERT INTO users (age) VALUES (32),(33),(34),(35),(36),(37);
--disable_ps2_protocol
SELECT COUNT(*) FROM users WHERE age BETWEEN 28 AND 30;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_count_skip';

View File

@@ -33,7 +33,9 @@ INSERT INTO users (age) VALUES (29);
INSERT INTO users (age) VALUES (29);
INSERT INTO users (age) VALUES (29);
--disable_ps2_protocol
SELECT COUNT(*) FROM users WHERE age = 29;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_count_skip';

View File

@@ -33,8 +33,10 @@ INSERT INTO memos (content) VALUES ('Mroonga is good.');
INSERT INTO memos (content) VALUES ('Mroonga is very good.');
INSERT INTO memos (content) VALUES ('Mroonga uses Groonga.');
--disable_ps2_protocol
SELECT COUNT(*) FROM memos
WHERE MATCH(content) AGAINST('+Groonga' IN BOOLEAN MODE);
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_count_skip';

View File

@@ -33,8 +33,10 @@ INSERT INTO memos (content) VALUES ('Mroonga is good.');
INSERT INTO memos (content) VALUES ('Mroonga is very good.');
INSERT INTO memos (content) VALUES ('Mroonga uses Groonga.');
--disable_ps2_protocol
SELECT COUNT(*) FROM memos
WHERE MATCH(content) AGAINST('Groonga');
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_count_skip';

View File

@@ -34,7 +34,9 @@ INSERT INTO users (age) VALUES (30);
INSERT INTO users (age) VALUES (31);
INSERT INTO users (age) VALUES (1),(2),(3),(4),(5),(6);
--disable_ps2_protocol
SELECT COUNT(*) FROM users WHERE age > 29;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_count_skip';

View File

@@ -34,7 +34,9 @@ INSERT INTO users (age) VALUES (30);
INSERT INTO users (age) VALUES (31);
INSERT INTO users (age) VALUES (1),(2),(3),(4),(5),(6);
--disable_ps2_protocol
SELECT COUNT(*) FROM users WHERE age >= 29;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_count_skip';

View File

@@ -34,7 +34,9 @@ INSERT INTO users (age) VALUES (30);
INSERT INTO users (age) VALUES (31);
INSERT INTO users (age) VALUES (32),(33),(34),(35),(36),(37);
--disable_ps2_protocol
SELECT COUNT(*) FROM users WHERE age < 29;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_count_skip';

View File

@@ -34,7 +34,9 @@ INSERT INTO users (age) VALUES (30);
INSERT INTO users (age) VALUES (31);
INSERT INTO users (age) VALUES (32),(33),(34),(35),(36),(37);
--disable_ps2_protocol
SELECT COUNT(*) FROM users WHERE age <= 29;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_count_skip';

View File

@@ -33,7 +33,9 @@ INSERT INTO users (age) VALUES (29);
INSERT INTO users (age) VALUES (29);
INSERT INTO users (age) VALUES (29);
--disable_ps2_protocol
SELECT COUNT(*) FROM users WHERE age <> 29;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_count_skip';

View File

@@ -32,7 +32,9 @@ INSERT INTO users (id, age) VALUES (1, 29);
INSERT INTO users (id, age) VALUES (2, 29);
INSERT INTO users (id, age) VALUES (3, 29);
--disable_ps2_protocol
SELECT COUNT(*) FROM users WHERE id = 3 AND age = 29;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_count_skip';

View File

@@ -33,7 +33,9 @@ INSERT INTO users (id) VALUES (4);
INSERT INTO users (id) VALUES (5);
INSERT INTO users (id) VALUES (32),(33),(34),(35),(36),(37);
--disable_ps2_protocol
SELECT COUNT(*) FROM users WHERE id BETWEEN 2 AND 4;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_count_skip';

View File

@@ -32,7 +32,9 @@ INSERT INTO users (id) VALUES (3);
INSERT INTO users (id) VALUES (4);
INSERT INTO users (id) VALUES (5);
--disable_ps2_protocol
SELECT COUNT(*) FROM users WHERE id = 3;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_count_skip';

View File

@@ -33,7 +33,10 @@ INSERT INTO users (id) VALUES (4);
INSERT INTO users (id) VALUES (5);
INSERT INTO users (id) VALUES (-1),(-2),(-3),(-4);
--disable_ps2_protocol
SELECT COUNT(*) FROM users WHERE id > 3;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_count_skip';
DROP TABLE users;

View File

@@ -33,7 +33,9 @@ INSERT INTO users (id) VALUES (4);
INSERT INTO users (id) VALUES (5);
INSERT INTO users (id) VALUES (-1),(-2),(-3),(-4);
--disable_ps2_protocol
SELECT COUNT(*) FROM users WHERE id >= 3;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_count_skip';

View File

@@ -32,7 +32,9 @@ INSERT INTO users (id) VALUES (3);
INSERT INTO users (id) VALUES (4);
INSERT INTO users (id) VALUES (5);
--disable_ps2_protocol
SELECT COUNT(*) FROM users WHERE id < 3;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_count_skip';

View File

@@ -32,7 +32,9 @@ INSERT INTO users (id) VALUES (3);
INSERT INTO users (id) VALUES (4);
INSERT INTO users (id) VALUES (5);
--disable_ps2_protocol
SELECT COUNT(*) FROM users WHERE id <= 3;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_count_skip';

View File

@@ -32,7 +32,9 @@ INSERT INTO users (id) VALUES (3);
INSERT INTO users (id) VALUES (4);
INSERT INTO users (id) VALUES (5);
--disable_ps2_protocol
SELECT COUNT(*) FROM users WHERE id <> 3;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_count_skip';

View File

@@ -45,10 +45,12 @@ INSERT INTO diaries VALUES(7, 2011, 12, 2, "初雪", "今日の天気は雪!")
SET mroonga_enable_optimization=FALSE;
--disable_ps2_protocol
SELECT * FROM diaries
WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE) AND
month = 11
ORDER BY day LIMIT 1,2;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_fast_order_limit';

View File

@@ -44,11 +44,13 @@ INSERT INTO memos VALUES(8, "title 1-a", "content b-1");
INSERT INTO memos VALUES(9, "title 2-b", "content b-2");
INSERT INTO memos VALUES(7, "title 2-c", "content b-3");
--disable_ps2_protocol
SELECT * FROM memos
WHERE MATCH(title) AGAINST("+1" IN BOOLEAN MODE) AND
MATCH(content) AGAINST("+a" IN BOOLEAN MODE)
ORDER BY id
LIMIT 1,3;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_fast_order_limit';

View File

@@ -43,9 +43,11 @@ INSERT INTO diaries VALUES(5, 2011, 11, 13, "はれ", "天気がよいのは今
INSERT INTO diaries VALUES(6, 2011, 12, 1, "久しぶり", "天気が悪いからずっと留守番。");
INSERT INTO diaries VALUES(7, 2011, 12, 2, "初雪", "今日の天気は雪!");
--disable_ps2_protocol
SELECT * FROM diaries
WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE)
ORDER BY day;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_fast_order_limit';

View File

@@ -34,10 +34,12 @@ INSERT INTO memos VALUES(2, "
INSERT INTO memos VALUES(3, "<22><><EFBFBD><EFBFBD><EFBFBD>̓T<CD83>{<7B>e<EFBFBD><65><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>B");
INSERT INTO memos VALUES(1, "<22><><EFBFBD><EFBFBD><EFBFBD>͓V<CD93>C<EFBFBD><43><EFBFBD><EFBFBD>Ă悩<C482><E682A9><EFBFBD><EFBFBD><EFBFBD>B");
--disable_ps2_protocol
SELECT * FROM memos
WHERE MATCH(<28><><EFBFBD>e) AGAINST("<22><><EFBFBD><EFBFBD>" IN BOOLEAN MODE)
ORDER BY <20><><EFBFBD>ʎq
LIMIT 1;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_fast_order_limit';

View File

@@ -37,10 +37,12 @@ INSERT INTO diaries VALUES(3, "2011-11-11 12:23:32", "I will do something today!
INSERT INTO diaries VALUES(4, "2011-11-11 12:23:33", "I don't want to anything today...");
INSERT INTO diaries VALUES(5, "2011-11-11 12:23:34", "I'm sleepy today.");
--disable_ps2_protocol
SELECT * FROM diaries
WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND
date BETWEEN "2011-11-11 12:23:31" AND "2011-11-11 12:23:33"
ORDER BY id LIMIT 1,2;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_fast_order_limit';

View File

@@ -37,10 +37,12 @@ INSERT INTO diaries VALUES(3, "2011-11-11 12:23:32", "I will do something today!
INSERT INTO diaries VALUES(4, "2011-11-11 12:23:33", "I don't want to anything today...");
INSERT INTO diaries VALUES(5, "2011-11-11 12:23:34", "I'm sleepy today.");
--disable_ps2_protocol
SELECT * FROM diaries
WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND
date BETWEEN "2011-11-11 12:23:31" AND "2011-11-11 12:23:43"
ORDER BY id LIMIT 1,2;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_fast_order_limit';

View File

@@ -37,10 +37,12 @@ INSERT INTO diaries VALUES(3, "2011-11-11 12:23:34", "I will do something today!
INSERT INTO diaries VALUES(4, "2011-11-11 12:23:34", "I don't want to anything today...");
INSERT INTO diaries VALUES(5, "2011-11-11 12:23:34", "I'm sleepy today.");
--disable_ps2_protocol
SELECT * FROM diaries
WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND
date = "2011-11-11 12:23:34"
ORDER BY id LIMIT 1,2;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_fast_order_limit';

View File

@@ -37,10 +37,12 @@ INSERT INTO diaries VALUES(3, "2011-11-11 12:23:32", "I will do something today!
INSERT INTO diaries VALUES(4, "2011-11-11 12:23:33", "I don't want to anything today...");
INSERT INTO diaries VALUES(5, "2011-11-11 12:23:34", "I'm sleepy today.");
--disable_ps2_protocol
SELECT * FROM diaries
WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND
date > "2011-11-11 12:23:31"
ORDER BY id LIMIT 1,2;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_fast_order_limit';

View File

@@ -37,10 +37,12 @@ INSERT INTO diaries VALUES(3, "2011-11-11 12:23:32", "I will do something today!
INSERT INTO diaries VALUES(4, "2011-11-11 12:23:33", "I don't want to anything today...");
INSERT INTO diaries VALUES(5, "2011-11-11 12:23:34", "I'm sleepy today.");
--disable_ps2_protocol
SELECT * FROM diaries
WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND
date >= "2011-11-11 12:23:31"
ORDER BY id LIMIT 1,2;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_fast_order_limit';

View File

@@ -37,10 +37,12 @@ INSERT INTO diaries VALUES(3, "2011-11-11 12:23:32", "I will do something today!
INSERT INTO diaries VALUES(4, "2011-11-11 12:23:33", "I don't want to anything today...");
INSERT INTO diaries VALUES(5, "2011-11-11 12:23:34", "I'm sleepy today.");
--disable_ps2_protocol
SELECT * FROM diaries
WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND
date < "2011-11-11 12:23:33"
ORDER BY id LIMIT 1,2;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_fast_order_limit';

View File

@@ -37,10 +37,12 @@ INSERT INTO diaries VALUES(3, "2011-11-11 12:23:32", "I will do something today!
INSERT INTO diaries VALUES(4, "2011-11-11 12:23:33", "I don't want to anything today...");
INSERT INTO diaries VALUES(5, "2011-11-11 12:23:34", "I'm sleepy today.");
--disable_ps2_protocol
SELECT * FROM diaries
WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND
date <= "2011-11-11 12:23:33"
ORDER BY id LIMIT 1,2;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_fast_order_limit';

View File

@@ -33,10 +33,12 @@ CREATE TABLE ids (
INSERT INTO ids VALUES (1, 'first');
--disable_ps2_protocol
SELECT * FROM ids
WHERE MATCH(text) AGAINST('+first' IN BOOLEAN MODE)
ORDER BY id, id
LIMIT 1;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_fast_order_limit';

View File

@@ -37,10 +37,12 @@ INSERT INTO memos VALUES(2, 'Mroonga', 'Mroonga is great!');
INSERT INTO memos VALUES(3, 'Mroonga', 'Mroonga is a MySQL storage engine.');
INSERT INTO memos VALUES(4, 'Mroonga', 'Mroonga is based on Groonga.');
--disable_ps2_protocol
SELECT * FROM memos
WHERE MATCH(content) AGAINST("+Groonga" IN BOOLEAN MODE) AND
tag = 'Mroonga'
ORDER BY id LIMIT 1;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_fast_order_limit';

View File

@@ -37,10 +37,12 @@ INSERT INTO memos VALUES(2, 'Mroonga', 'Mroonga is great!');
INSERT INTO memos VALUES(3, 'Mroonga', 'Mroonga is a MySQL storage engine.');
INSERT INTO memos VALUES(4, 'Mroonga', 'Mroonga is based on Groonga.');
--disable_ps2_protocol
SELECT * FROM memos
WHERE MATCH(content) AGAINST("+Groonga" IN BOOLEAN MODE) AND
tag = 2
ORDER BY id LIMIT 1;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_fast_order_limit';

View File

@@ -41,7 +41,9 @@ INSERT INTO diaries VALUES(4, 2011, 11, 11, "帰り道", "今日は天気がよ
INSERT INTO diaries VALUES(5, 2011, 12, 1, "久しぶり", "天気が悪いからずっと留守番。");
INSERT INTO diaries VALUES(6, 2011, 12, 2, "初雪", "今日の天気は雪!");
--disable_ps2_protocol
SELECT * FROM diaries WHERE MATCH(content) AGAINST("今日 天気" IN BOOLEAN MODE) ORDER BY day LIMIT 0,5;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_fast_order_limit';

View File

@@ -36,10 +36,12 @@ INSERT INTO memos VALUES(3, "I will do something today!");
INSERT INTO memos VALUES(4, "I don't want to anything today...");
INSERT INTO memos VALUES(5, "I'm sleepy today.");
--disable_ps2_protocol
SELECT * FROM memos
WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND
id BETWEEN 2 AND 4
ORDER BY id LIMIT 1,2;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_fast_order_limit';

View File

@@ -36,10 +36,12 @@ INSERT INTO memos VALUES(3, "I will do something today!");
INSERT INTO memos VALUES(4, "I don't want to anything today...");
INSERT INTO memos VALUES(5, "I'm sleepy today.");
--disable_ps2_protocol
SELECT * FROM memos
WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND
id BETWEEN 2 AND 6
ORDER BY id LIMIT 1,2;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_fast_order_limit';

View File

@@ -43,10 +43,12 @@ INSERT INTO diaries VALUES(5, 2011, 11, 13, "はれ", "天気がよいのは今
INSERT INTO diaries VALUES(6, 2011, 12, 1, "久しぶり", "天気が悪いからずっと留守番。");
INSERT INTO diaries VALUES(7, 2011, 12, 2, "初雪", "今日の天気は雪!");
--disable_ps2_protocol
SELECT * FROM diaries
WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE) AND
month = 11
ORDER BY day LIMIT 1,2;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_fast_order_limit';

View File

@@ -43,10 +43,12 @@ INSERT INTO diaries VALUES(5, 2011, 11, 13, "はれ", "天気がよいのは今
INSERT INTO diaries VALUES(6, 2011, 12, 1, "久しぶり", "天気が悪いからずっと留守番。");
INSERT INTO diaries VALUES(7, 2011, 12, 2, "初雪", "今日の天気は雪!");
--disable_ps2_protocol
SELECT * FROM diaries
WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE) AND
day > 10
ORDER BY day LIMIT 1,2;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_fast_order_limit';

View File

@@ -43,10 +43,12 @@ INSERT INTO diaries VALUES(5, 2011, 11, 13, "はれ", "天気がよいのは今
INSERT INTO diaries VALUES(6, 2011, 12, 1, "久しぶり", "天気が悪いからずっと留守番。");
INSERT INTO diaries VALUES(7, 2011, 12, 2, "初雪", "今日の天気は雪!");
--disable_ps2_protocol
SELECT * FROM diaries
WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE) AND
day >= 10
ORDER BY day LIMIT 1,2;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_fast_order_limit';

View File

@@ -43,10 +43,12 @@ INSERT INTO diaries VALUES(5, 2011, 11, 13, "はれ", "天気がよいのは今
INSERT INTO diaries VALUES(6, 2011, 12, 1, "久しぶり", "天気が悪いからずっと留守番。");
INSERT INTO diaries VALUES(7, 2011, 12, 2, "初雪", "今日の天気は雪!");
--disable_ps2_Protocol
SELECT * FROM diaries
WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE) AND
day < 12
ORDER BY day LIMIT 1,2;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_fast_order_limit';

View File

@@ -43,10 +43,12 @@ INSERT INTO diaries VALUES(5, 2011, 11, 13, "はれ", "天気がよいのは今
INSERT INTO diaries VALUES(6, 2011, 12, 1, "久しぶり", "天気が悪いからずっと留守番。");
INSERT INTO diaries VALUES(7, 2011, 12, 2, "初雪", "今日の天気は雪!");
--disable_ps2_protocol
SELECT * FROM diaries
WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE) AND
day <= 12
ORDER BY day LIMIT 1,2;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_fast_order_limit';

View File

@@ -41,7 +41,9 @@ INSERT INTO diaries VALUES(4, 2011, 11, 11, "帰り道", "今日は天気がよ
INSERT INTO diaries VALUES(5, 2011, 12, 1, "久しぶり", "天気が悪いからずっと留守番。");
INSERT INTO diaries VALUES(6, 2011, 12, 2, "初雪", "今日の天気は雪!");
--disable_ps2_protocol
SELECT * FROM diaries WHERE MATCH(content) AGAINST("今日 天気" IN BOOLEAN MODE) ORDER BY day LIMIT 0,5;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_fast_order_limit';

View File

@@ -30,7 +30,9 @@ insert into t1 values(5,50,"aa ii uu ii oo",null);
show status like 'mroonga_fast_order_limit';
--disable_ps2_protocol
select *, match(c3) against("ii") from t1 order by c1 desc limit 2;
--enable_ps2_protocol
show status like 'mroonga_fast_order_limit';

View File

@@ -43,9 +43,11 @@ INSERT INTO diaries VALUES(5, 2011, 11, 13, "はれ", "天気がよいのは今
INSERT INTO diaries VALUES(6, 2011, 12, 1, "久しぶり", "天気が悪いからずっと留守番。");
INSERT INTO diaries VALUES(7, 2011, 12, 2, "初雪", "今日の天気は雪!");
--disable_ps2_protocol
SELECT * FROM diaries
WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE)
ORDER BY day ASC LIMIT 1;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_fast_order_limit';

View File

@@ -43,9 +43,11 @@ INSERT INTO diaries VALUES(5, 2011, 11, 13, "はれ", "天気がよいのは今
INSERT INTO diaries VALUES(6, 2011, 12, 1, "久しぶり", "天気が悪いからずっと留守番。");
INSERT INTO diaries VALUES(7, 2011, 12, 2, "初雪", "今日の天気は雪!");
--disable_ps2_protocol
SELECT * FROM diaries
WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE)
ORDER BY day DESC LIMIT 1;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_fast_order_limit';

View File

@@ -44,10 +44,12 @@ INSERT INTO diaries VALUES(NULL, 5, 2011, 11, 13, "はれ", "天気がよいの
INSERT INTO diaries VALUES(NULL, 6, 2011, 12, 1, "久しぶり", "天気が悪いからずっと留守番。");
INSERT INTO diaries VALUES(NULL, 7, 2011, 12, 2, "初雪", "今日の天気は雪!");
--disable_ps2_protocol
SELECT * FROM diaries
WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE)
ORDER BY _id
LIMIT 1;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_fast_order_limit';

View File

@@ -43,10 +43,12 @@ INSERT INTO diaries VALUES(5, 2011, 11, 13, "はれ", "天気がよいのは今
INSERT INTO diaries VALUES(6, 2011, 12, 1, "久しぶり", "天気が悪いからずっと留守番。");
INSERT INTO diaries VALUES(7, 2011, 12, 2, "初雪", "今日の天気は雪!");
--disable_ps2_protocol
SELECT * FROM diaries
WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE)
ORDER BY MATCH(content) AGAINST("今日" IN BOOLEAN MODE)
LIMIT 1;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_fast_order_limit';

View File

@@ -43,11 +43,13 @@ INSERT INTO diaries VALUES(5, 2011, 11, 13, "はれ", "天気がよいのは今
INSERT INTO diaries VALUES(6, 2011, 12, 1, "久しぶり", "天気が悪いからずっと留守番。");
INSERT INTO diaries VALUES(7, 2011, 12, 2, "初雪", "今日の天気は雪!");
--disable_ps2_protocol
SELECT *, MATCH(content) AGAINST("今日" IN BOOLEAN MODE)
FROM diaries
WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE)
ORDER BY MATCH(content) AGAINST("今日" IN BOOLEAN MODE)
LIMIT 1;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_fast_order_limit';

View File

@@ -37,10 +37,12 @@ INSERT INTO memos VALUES(3, "1:23:32", "I will do something today!");
INSERT INTO memos VALUES(4, "1:23:33", "I don't want to anything today...");
INSERT INTO memos VALUES(5, "1:23:34", "I'm sleepy today.");
--disable_ps2_protocol
SELECT * FROM memos
WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND
writing_time BETWEEN "1:23:31" AND "1:23:33"
ORDER BY id LIMIT 1,2;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_fast_order_limit';

View File

@@ -37,10 +37,12 @@ INSERT INTO memos VALUES(3, "1:23:32", "I will do something today!");
INSERT INTO memos VALUES(4, "1:23:33", "I don't want to anything today...");
INSERT INTO memos VALUES(5, "1:23:34", "I'm sleepy today.");
--disable_ps2_protocol
SELECT * FROM memos
WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND
writing_time BETWEEN "1:23:31" AND "1:23:43"
ORDER BY id LIMIT 1,2;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_fast_order_limit';

View File

@@ -37,10 +37,12 @@ INSERT INTO memos VALUES(3, "1:23:34", "I will do something today!");
INSERT INTO memos VALUES(4, "1:23:34", "I don't want to anything today...");
INSERT INTO memos VALUES(5, "1:23:34", "I'm sleepy today.");
--disable_ps2_protocol
SELECT * FROM memos
WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND
writing_time = "1:23:34"
ORDER BY id LIMIT 1,2;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_fast_order_limit';

View File

@@ -37,10 +37,12 @@ INSERT INTO memos VALUES(3, "1:23:32", "I will do something today!");
INSERT INTO memos VALUES(4, "1:23:33", "I don't want to anything today...");
INSERT INTO memos VALUES(5, "1:23:34", "I'm sleepy today.");
--disable_ps2_protocol
SELECT * FROM memos
WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND
writing_time > "1:23:31"
ORDER BY id LIMIT 1,2;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_fast_order_limit';

View File

@@ -37,10 +37,12 @@ INSERT INTO memos VALUES(3, "1:23:32", "I will do something today!");
INSERT INTO memos VALUES(4, "1:23:33", "I don't want to anything today...");
INSERT INTO memos VALUES(5, "1:23:34", "I'm sleepy today.");
--disable_ps2_protocol
SELECT * FROM memos
WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND
writing_time >= "1:23:31"
ORDER BY id LIMIT 1,2;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_fast_order_limit';

View File

@@ -37,10 +37,12 @@ INSERT INTO memos VALUES(3, "1:23:32", "I will do something today!");
INSERT INTO memos VALUES(4, "1:23:33", "I don't want to anything today...");
INSERT INTO memos VALUES(5, "1:23:34", "I'm sleepy today.");
--disable_ps2_protocol
SELECT * FROM memos
WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND
writing_time < "1:23:33"
ORDER BY id LIMIT 1,2;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_fast_order_limit';

View File

@@ -37,10 +37,12 @@ INSERT INTO memos VALUES(3, "1:23:32", "I will do something today!");
INSERT INTO memos VALUES(4, "1:23:33", "I don't want to anything today...");
INSERT INTO memos VALUES(5, "1:23:34", "I'm sleepy today.");
--disable_ps2_protocol
SELECT * FROM memos
WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND
writing_time <= "1:23:33"
ORDER BY id LIMIT 1,2;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_fast_order_limit';

View File

@@ -44,10 +44,12 @@ INSERT INTO diaries VALUES(5, 2011, 11, 13, "はれ", "天気がよいのは今
INSERT INTO diaries VALUES(6, 2011, 12, 1, "久しぶり", "天気が悪いからずっと留守番。");
INSERT INTO diaries VALUES(7, 2011, 12, 2, "初雪", "今日の天気は雪!");
--disable_ps2_protocol
SELECT * FROM diaries
WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE) AND
title = "hello"
ORDER BY day LIMIT 1;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_fast_order_limit';

View File

@@ -43,10 +43,12 @@ INSERT INTO diaries VALUES(5, 2011, 11, 13, "はれ", "天気がよいのは今
INSERT INTO diaries VALUES(6, 2011, 12, 1, "久しぶり", "天気が悪いからずっと留守番。");
INSERT INTO diaries VALUES(7, 2011, 12, 2, "初雪", "今日の天気は雪!");
--disable_ps2_protocol
SELECT * FROM diaries
WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE) AND
title = "hello"
ORDER BY day LIMIT 1;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_fast_order_limit';

View File

@@ -41,10 +41,12 @@ INSERT INTO mroonga_releases (release_title, release_year)
INSERT INTO mroonga_releases (release_title, release_year)
VALUES ("Mroonga 4.0 will be released", "2014");
--disable_ps2_protocol
SELECT * FROM mroonga_releases
WHERE release_year BETWEEN "11" AND "2013" AND
MATCH(release_title) AGAINST("Mroonga" IN BOOLEAN MODE)
ORDER BY id DESC LIMIT 1,2;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_fast_order_limit';

View File

@@ -41,10 +41,12 @@ INSERT INTO mroonga_releases (release_title, release_year)
INSERT INTO mroonga_releases (release_title, release_year)
VALUES ("Mroonga 4.0 will be released", "2014");
--disable_ps2_protocol
SELECT * FROM mroonga_releases
WHERE release_year BETWEEN "11" AND "2015" AND
MATCH(release_title) AGAINST("Mroonga" IN BOOLEAN MODE)
ORDER BY id DESC LIMIT 1,2;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_fast_order_limit';

View File

@@ -43,10 +43,12 @@ INSERT INTO mroonga_releases (release_title, release_year)
INSERT INTO mroonga_releases (release_title, release_year)
VALUES ("Mroonga 4.0 will be released", "2014");
--disable_ps2_protocol
SELECT * FROM mroonga_releases
WHERE release_year = "11" AND
MATCH(release_title) AGAINST("Mroonga" IN BOOLEAN MODE)
ORDER BY id DESC LIMIT 1,2;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_fast_order_limit';

View File

@@ -41,10 +41,12 @@ INSERT INTO mroonga_releases (release_title, release_year)
INSERT INTO mroonga_releases (release_title, release_year)
VALUES ("Mroonga 4.0 will be released", "2014");
--disable_ps2_protocol
SELECT * FROM mroonga_releases
WHERE release_year > "11" AND
MATCH(release_title) AGAINST("Mroonga" IN BOOLEAN MODE)
ORDER BY id ASC LIMIT 2;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_fast_order_limit';

View File

@@ -41,10 +41,12 @@ INSERT INTO mroonga_releases (release_title, release_year)
INSERT INTO mroonga_releases (release_title, release_year)
VALUES ("Mroonga 4.0 will be released", "2014");
--disable_ps2_protocol
SELECT * FROM mroonga_releases
WHERE release_year >= "11" AND
MATCH(release_title) AGAINST("Mroonga" IN BOOLEAN MODE)
ORDER BY id ASC LIMIT 2;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_fast_order_limit';

View File

@@ -41,10 +41,12 @@ INSERT INTO mroonga_releases (release_title, release_year)
INSERT INTO mroonga_releases (release_title, release_year)
VALUES ("Mroonga 4.0 will be released", "2014");
--disable_ps2_protocol
SELECT * FROM mroonga_releases
WHERE release_year < "13" AND
MATCH(release_title) AGAINST("Mroonga" IN BOOLEAN MODE)
ORDER BY id DESC LIMIT 1,2;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_fast_order_limit';

View File

@@ -41,10 +41,12 @@ INSERT INTO mroonga_releases (release_title, release_year)
INSERT INTO mroonga_releases (release_title, release_year)
VALUES ("Mroonga 4.0 will be released", "2014");
--disable_ps2_protocol
SELECT * FROM mroonga_releases
WHERE release_year <= "13" AND
MATCH(release_title) AGAINST("Mroonga" IN BOOLEAN MODE)
ORDER BY id DESC LIMIT 1,2;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_fast_order_limit';

View File

@@ -29,7 +29,9 @@ CREATE TABLE diaries (
SELECT mroonga_command('truncate mroonga_operations');
INSERT INTO diaries VALUES("Unlogged: Research for Mroonga");
--disable_ps2_protocol
SELECT mroonga_command('load --table mroonga_operations --values "[{}]"');
--enable_ps2_protocol
SELECT mroonga_command('select mroonga_operations --output_columns _id');
SET GLOBAL mroonga_enable_operations_recording = false;
@@ -37,7 +39,9 @@ FLUSH TABLES;
SELECT mroonga_command('truncate mroonga_operations');
INSERT INTO diaries VALUES("Logged: Research for Mroonga");
--disable_ps2_protocol
SELECT mroonga_command('load --table mroonga_operations --values "[{}]"');
--enable_ps2_protocol
SELECT mroonga_command('select mroonga_operations --output_columns _id');
DROP TABLE diaries;

View File

@@ -36,6 +36,7 @@ insert into t1 values(3,30,"ii si ii se ii");
insert into t1 values(4,40,"ta ti tu te to");
insert into t1 values(5,50,"aa ii uu ii oo");
--disable_ps2_protocol
select c3, match(c3) against("ii") from t1
where match(c3) against("ii") order by match(c3) against("ii") desc;
show status like 'mroonga_fast_order_limit';
@@ -54,6 +55,7 @@ show status like 'mroonga_fast_order_limit';
select count(*) from t1 where match(c3) against("ii") limit 1;
show status like 'mroonga_fast_order_limit';
--enable_ps2_protocol
drop table t1;

View File

@@ -37,11 +37,13 @@ INSERT INTO memos VALUES(5, "Mroonga is great");
SHOW STATUS LIKE 'mroonga_fast_order_limit';
--disable_ps2_protocol
SELECT id, content
FROM memos
WHERE MATCH(content) AGAINST("+Mroonga" IN BOOLEAN MODE)
ORDER BY id
LIMIT 2;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_fast_order_limit';

View File

@@ -37,7 +37,9 @@ insert into t1 values(5,50,"aa ii uu ii oo");
show status like 'mroonga_fast_order_limit';
--disable_ps2_protocol
select *, match(c3) against("ii") from t1 order by c1 desc limit 1;
--enable_ps2_protocol
show status like 'mroonga_fast_order_limit';

View File

@@ -37,11 +37,13 @@ INSERT INTO memos VALUES(5, "Groonga is fast");
SHOW STATUS LIKE 'mroonga_fast_order_limit';
--disable_ps2_protocol
SELECT id, content
FROM memos
WHERE MATCH(content) AGAINST("+Mroonga" IN BOOLEAN MODE)
ORDER BY id DESC
LIMIT 2;
--enable_ps2_protocol
SHOW STATUS LIKE 'mroonga_fast_order_limit';