mirror of
https://github.com/MariaDB/server.git
synced 2026-05-14 19:07:15 +02:00
add -fPIC for groonga-normalizer-mysql
This commit is contained in:
parent
a0fdb258a4
commit
d18beccc1d
49 changed files with 7 additions and 1468 deletions
|
|
@ -1,23 +0,0 @@
|
|||
DROP TABLE IF EXISTS diaries;
|
||||
SET NAMES UTF8;
|
||||
CREATE TABLE diaries(
|
||||
title TEXT,
|
||||
FULLTEXT KEY (title)
|
||||
) DEFAULT CHARSET=utf8;
|
||||
INSERT INTO diaries VALUES("Start groonga");
|
||||
INSERT INTO diaries VALUES("Start mroonga");
|
||||
INSERT INTO diaries VALUES("Start groonga and Ruby");
|
||||
SELECT * FROM diaries;
|
||||
title
|
||||
Start groonga
|
||||
Start mroonga
|
||||
Start groonga and Ruby
|
||||
SELECT *, MATCH(title) AGAINST("groonga" IN BOOLEAN MODE) AS score
|
||||
FROM diaries
|
||||
WHERE MATCH(title) AGAINST("groonga mroonga" IN BOOLEAN MODE)
|
||||
ORDER BY MATCH(title) AGAINST("groonga" IN BOOLEAN MODE);
|
||||
title score
|
||||
Start mroonga 0
|
||||
Start groonga 1
|
||||
Start groonga and Ruby 1
|
||||
DROP TABLE diaries;
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
DROP TABLE IF EXISTS diaries;
|
||||
SET NAMES UTF8;
|
||||
CREATE TABLE diaries(
|
||||
title TEXT,
|
||||
body TEXT,
|
||||
FULLTEXT KEY (title),
|
||||
FULLTEXT KEY (body)
|
||||
) DEFAULT CHARSET=utf8;
|
||||
INSERT INTO diaries VALUES("Start groonga", "I read groonga's tutorial.");
|
||||
INSERT INTO diaries VALUES("Start mroonga", "I read mroonga's tutorial.");
|
||||
INSERT INTO diaries VALUES("Start groonga and Ruby", "I installed rroonga.");
|
||||
SELECT * FROM diaries;
|
||||
title body
|
||||
Start groonga I read groonga's tutorial.
|
||||
Start mroonga I read mroonga's tutorial.
|
||||
Start groonga and Ruby I installed rroonga.
|
||||
SELECT *, MATCH(body) AGAINST("groonga" IN BOOLEAN MODE) AS score
|
||||
FROM diaries
|
||||
WHERE MATCH(title) AGAINST("groonga" IN BOOLEAN MODE)
|
||||
ORDER BY MATCH(body) AGAINST("groonga" IN BOOLEAN MODE);
|
||||
title body score
|
||||
Start groonga and Ruby I installed rroonga. 0
|
||||
Start groonga I read groonga's tutorial. 1
|
||||
DROP TABLE diaries;
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
DROP TABLE IF EXISTS diaries;
|
||||
SET NAMES UTF8;
|
||||
CREATE TABLE diaries(
|
||||
title TEXT,
|
||||
FULLTEXT KEY (title)
|
||||
) DEFAULT CHARSET=utf8;
|
||||
INSERT INTO diaries VALUES("Start groonga");
|
||||
INSERT INTO diaries VALUES("Start mroonga");
|
||||
INSERT INTO diaries VALUES("Start groonga and Ruby");
|
||||
SELECT * FROM diaries;
|
||||
title
|
||||
Start groonga
|
||||
Start mroonga
|
||||
Start groonga and Ruby
|
||||
SELECT *, MATCH(title) AGAINST("groonga" IN BOOLEAN MODE) AS score
|
||||
FROM diaries
|
||||
ORDER BY MATCH(title) AGAINST("groonga" IN BOOLEAN MODE);
|
||||
title score
|
||||
Start mroonga 0
|
||||
Start groonga 1
|
||||
Start groonga and Ruby 1
|
||||
DROP TABLE diaries;
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
DROP TABLE IF EXISTS diaries;
|
||||
SET NAMES UTF8;
|
||||
CREATE TABLE diaries(
|
||||
title TEXT,
|
||||
FULLTEXT KEY (title)
|
||||
) DEFAULT CHARSET=utf8;
|
||||
INSERT INTO diaries VALUES("Start groonga");
|
||||
INSERT INTO diaries VALUES("Start mroonga");
|
||||
INSERT INTO diaries VALUES("Start groonga and Ruby");
|
||||
SELECT * FROM diaries;
|
||||
title
|
||||
Start groonga
|
||||
Start mroonga
|
||||
Start groonga and Ruby
|
||||
SELECT *, MATCH(title) AGAINST("groonga" IN BOOLEAN MODE) AS score
|
||||
FROM diaries
|
||||
WHERE MATCH(title) AGAINST("groonga" IN BOOLEAN MODE)
|
||||
ORDER BY MATCH(title) AGAINST("groonga" IN BOOLEAN MODE);
|
||||
title score
|
||||
Start groonga 1
|
||||
Start groonga and Ruby 1
|
||||
DROP TABLE diaries;
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
DROP TABLE IF EXISTS ids;
|
||||
SET NAMES UTF8;
|
||||
CREATE TABLE ids (
|
||||
id INT(10) UNSIGNED PRIMARY KEY AUTO_INCREMENT
|
||||
) ENGINE=Mroonga DEFAULT CHARSET=utf8;
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
SELECT * FROM ids WHERE ids.id > 1 ORDER BY ids.id ASC LIMIT 3;
|
||||
id
|
||||
2
|
||||
3
|
||||
4
|
||||
DROP TABLE ids;
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
DROP TABLE IF EXISTS ids;
|
||||
SET NAMES UTF8;
|
||||
CREATE TABLE ids (
|
||||
id INT(10) UNSIGNED PRIMARY KEY AUTO_INCREMENT
|
||||
) ENGINE=Mroonga DEFAULT CHARSET=utf8;
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
SELECT * FROM ids WHERE ids.id > 3 ORDER BY ids.id DESC LIMIT 3;
|
||||
id
|
||||
5
|
||||
4
|
||||
DROP TABLE ids;
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
DROP TABLE IF EXISTS ids;
|
||||
SET NAMES UTF8;
|
||||
CREATE TABLE ids (
|
||||
id INT(10) UNSIGNED PRIMARY KEY AUTO_INCREMENT
|
||||
) ENGINE=Mroonga DEFAULT CHARSET=utf8;
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
SELECT * FROM ids WHERE ids.id >= 2 ORDER BY ids.id ASC LIMIT 3;
|
||||
id
|
||||
2
|
||||
3
|
||||
4
|
||||
DROP TABLE ids;
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
DROP TABLE IF EXISTS ids;
|
||||
SET NAMES UTF8;
|
||||
CREATE TABLE ids (
|
||||
id INT(10) UNSIGNED PRIMARY KEY AUTO_INCREMENT
|
||||
) ENGINE=Mroonga DEFAULT CHARSET=utf8;
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
SELECT * FROM ids WHERE ids.id >= 3 ORDER BY ids.id DESC LIMIT 3;
|
||||
id
|
||||
5
|
||||
4
|
||||
3
|
||||
DROP TABLE ids;
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
DROP TABLE IF EXISTS ids;
|
||||
SET NAMES UTF8;
|
||||
CREATE TABLE ids (
|
||||
id INT(10) UNSIGNED PRIMARY KEY AUTO_INCREMENT
|
||||
) ENGINE=Mroonga DEFAULT CHARSET=utf8;
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
SELECT * FROM ids WHERE ids.id < 4 ORDER BY ids.id ASC LIMIT 3;
|
||||
id
|
||||
1
|
||||
2
|
||||
3
|
||||
DROP TABLE ids;
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
DROP TABLE IF EXISTS ids;
|
||||
SET NAMES UTF8;
|
||||
CREATE TABLE ids (
|
||||
id INT(10) UNSIGNED PRIMARY KEY AUTO_INCREMENT
|
||||
) ENGINE=Mroonga DEFAULT CHARSET=utf8;
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
SELECT * FROM ids WHERE ids.id < 4 ORDER BY ids.id DESC LIMIT 3;
|
||||
id
|
||||
3
|
||||
2
|
||||
1
|
||||
DROP TABLE ids;
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
DROP TABLE IF EXISTS ids;
|
||||
SET NAMES UTF8;
|
||||
CREATE TABLE ids (
|
||||
id INT(10) UNSIGNED PRIMARY KEY AUTO_INCREMENT
|
||||
) ENGINE=Mroonga DEFAULT CHARSET=utf8;
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
SELECT * FROM ids WHERE ids.id <= 4 ORDER BY ids.id ASC LIMIT 3;
|
||||
id
|
||||
1
|
||||
2
|
||||
3
|
||||
DROP TABLE ids;
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
DROP TABLE IF EXISTS ids;
|
||||
SET NAMES UTF8;
|
||||
CREATE TABLE ids (
|
||||
id INT(10) UNSIGNED PRIMARY KEY AUTO_INCREMENT
|
||||
) ENGINE=Mroonga DEFAULT CHARSET=utf8;
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
SELECT * FROM ids WHERE ids.id <= 4 ORDER BY ids.id DESC LIMIT 3;
|
||||
id
|
||||
4
|
||||
3
|
||||
2
|
||||
DROP TABLE ids;
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
select PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_TYPE
|
||||
from information_schema.plugins where plugin_name = "Mroonga";
|
||||
PLUGIN_NAME PLUGIN_VERSION PLUGIN_TYPE
|
||||
Mroonga 5.0 STORAGE ENGINE
|
||||
|
|
@ -1,106 +0,0 @@
|
|||
drop table if exists t1, t2, t3;
|
||||
flush status;
|
||||
create table t1 (c1 int primary key, c2 int, c3 text, key idx1(c2), fulltext index ft(c3));
|
||||
insert into t1 values(1,10,"aa ii uu ee oo");
|
||||
insert into t1 values(2,20,"ka ki ku ke ko");
|
||||
insert into t1 values(3,30,"sa si su se so");
|
||||
insert into t1 values(4,40,"ta ti tu te to");
|
||||
insert into t1 values(5,50,"aa ii uu ee oo");
|
||||
show status like 'mroonga_count_skip';
|
||||
Variable_name Value
|
||||
Mroonga_count_skip 0
|
||||
select * from t1;
|
||||
c1 c2 c3
|
||||
1 10 aa ii uu ee oo
|
||||
2 20 ka ki ku ke ko
|
||||
3 30 sa si su se so
|
||||
4 40 ta ti tu te to
|
||||
5 50 aa ii uu ee oo
|
||||
show status like 'mroonga_count_skip';
|
||||
Variable_name Value
|
||||
Mroonga_count_skip 0
|
||||
select count(*) from t1;
|
||||
count(*)
|
||||
5
|
||||
show status like 'mroonga_count_skip';
|
||||
Variable_name Value
|
||||
Mroonga_count_skip 0
|
||||
select * from t1 force index(primary) where c1 between 2 and 4;
|
||||
c1 c2 c3
|
||||
2 20 ka ki ku ke ko
|
||||
3 30 sa si su se so
|
||||
4 40 ta ti tu te to
|
||||
show status like 'mroonga_count_skip';
|
||||
Variable_name Value
|
||||
Mroonga_count_skip 0
|
||||
select count(*) from t1 force index(primary) where c1 between 2 and 4;
|
||||
count(*)
|
||||
3
|
||||
show status like 'mroonga_count_skip';
|
||||
Variable_name Value
|
||||
Mroonga_count_skip 1
|
||||
select c1 from t1 force index(primary) where c1 < 3;
|
||||
c1
|
||||
1
|
||||
2
|
||||
show status like 'mroonga_count_skip';
|
||||
Variable_name Value
|
||||
Mroonga_count_skip 1
|
||||
select count(c1) from t1 force index(primary) where c1 < 3;
|
||||
count(c1)
|
||||
2
|
||||
show status like 'mroonga_count_skip';
|
||||
Variable_name Value
|
||||
Mroonga_count_skip 1
|
||||
select 1 from t1 force index(primary) where c1 > 3;
|
||||
1
|
||||
1
|
||||
1
|
||||
show status like 'mroonga_count_skip';
|
||||
Variable_name Value
|
||||
Mroonga_count_skip 1
|
||||
select count(1) from t1 force index(primary) where c1 > 3;
|
||||
count(1)
|
||||
2
|
||||
show status like 'mroonga_count_skip';
|
||||
Variable_name Value
|
||||
Mroonga_count_skip 2
|
||||
select * from t1 where match(c3) against("su");
|
||||
c1 c2 c3
|
||||
3 30 sa si su se so
|
||||
show status like 'mroonga_count_skip';
|
||||
Variable_name Value
|
||||
Mroonga_count_skip 2
|
||||
select count(*) from t1 where match(c3) against("su");
|
||||
count(*)
|
||||
1
|
||||
show status like 'mroonga_count_skip';
|
||||
Variable_name Value
|
||||
Mroonga_count_skip 3
|
||||
select * from t1 where match(c3) against("+su" in boolean mode);
|
||||
c1 c2 c3
|
||||
3 30 sa si su se so
|
||||
show status like 'mroonga_count_skip';
|
||||
Variable_name Value
|
||||
Mroonga_count_skip 3
|
||||
select count(*) from t1 where match(c3) against("+su" in boolean mode);
|
||||
count(*)
|
||||
1
|
||||
show status like 'mroonga_count_skip';
|
||||
Variable_name Value
|
||||
Mroonga_count_skip 4
|
||||
select * from t1 force index(idx1) where c2 between 20 and 40;
|
||||
c1 c2 c3
|
||||
2 20 ka ki ku ke ko
|
||||
3 30 sa si su se so
|
||||
4 40 ta ti tu te to
|
||||
show status like 'mroonga_count_skip';
|
||||
Variable_name Value
|
||||
Mroonga_count_skip 4
|
||||
select count(*) from t1 force index(idx1) where c2 between 20 and 40;
|
||||
count(*)
|
||||
3
|
||||
show status like 'mroonga_count_skip';
|
||||
Variable_name Value
|
||||
Mroonga_count_skip 5
|
||||
drop table t1;
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
DROP TABLE IF EXISTS diaries;
|
||||
FLUSH STATUS;
|
||||
CREATE TABLE diaries (
|
||||
title TEXT,
|
||||
FULLTEXT INDEX ft(title)
|
||||
);
|
||||
INSERT INTO diaries VALUES("Hello mroonga!");
|
||||
INSERT INTO diaries VALUES("It's funny.");
|
||||
INSERT INTO diaries VALUES("Happy birthday!");
|
||||
SHOW STATUS LIKE 'mroonga_count_skip';
|
||||
Variable_name Value
|
||||
Mroonga_count_skip 0
|
||||
SELECT COUNT(*) FROM diaries WHERE MATCH(title) AGAINST("mroonga" IN BOOLEAN MODE);
|
||||
COUNT(*)
|
||||
1
|
||||
SHOW STATUS LIKE 'mroonga_count_skip';
|
||||
Variable_name Value
|
||||
Mroonga_count_skip 1
|
||||
DROP TABLE diaries;
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
DROP TABLE IF EXISTS diaries;
|
||||
FLUSH STATUS;
|
||||
CREATE TABLE diaries (
|
||||
title TEXT,
|
||||
FULLTEXT INDEX ft(title)
|
||||
);
|
||||
INSERT INTO diaries VALUES("Hello mroonga!");
|
||||
INSERT INTO diaries VALUES("It's funny.");
|
||||
INSERT INTO diaries VALUES("Happy birthday!");
|
||||
SHOW STATUS LIKE 'mroonga_count_skip';
|
||||
Variable_name Value
|
||||
Mroonga_count_skip 0
|
||||
SELECT COUNT(*) FROM diaries WHERE MATCH(title) AGAINST("mroonga" IN BOOLEAN MODE);
|
||||
COUNT(*)
|
||||
1
|
||||
SHOW STATUS LIKE 'mroonga_count_skip';
|
||||
Variable_name Value
|
||||
Mroonga_count_skip 1
|
||||
DROP TABLE diaries;
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
DROP TABLE IF EXISTS diaries;
|
||||
FLUSH STATUS;
|
||||
SET NAMES UTF8;
|
||||
CREATE TABLE diaries (
|
||||
id INT UNSIGNED NOT NULL,
|
||||
title VARCHAR(255),
|
||||
content TEXT,
|
||||
FULLTEXT INDEX(content)
|
||||
) DEFAULT CHARSET UTF8;
|
||||
SHOW CREATE TABLE diaries;
|
||||
Table Create Table
|
||||
diaries CREATE TABLE `diaries` (
|
||||
`id` int(10) unsigned NOT NULL,
|
||||
`title` varchar(255) DEFAULT NULL,
|
||||
`content` text,
|
||||
FULLTEXT KEY `content` (`content`)
|
||||
) ENGINE=Mroonga DEFAULT CHARSET=utf8
|
||||
INSERT INTO diaries VALUES(1, "Hello", "今日からはじめました。");
|
||||
INSERT INTO diaries VALUES(2, "天気", "明日の富士山の天気について");
|
||||
INSERT INTO diaries VALUES(3, "富士山", "今日も天気がよくてきれいに見える。");
|
||||
INSERT INTO diaries VALUES(4, "帰り道", "今日は天気がよくてよかった。");
|
||||
INSERT INTO diaries VALUES(5, "はれ", "天気がよいのは今日までみたい。");
|
||||
SET mroonga_enable_optimization=FALSE;
|
||||
SELECT COUNT(*) FROM diaries
|
||||
WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE);
|
||||
COUNT(*)
|
||||
4
|
||||
SHOW STATUS LIKE 'mroonga_count_skip';
|
||||
Variable_name Value
|
||||
Mroonga_count_skip 0
|
||||
SET mroonga_enable_optimization=TRUE;
|
||||
DROP TABLE diaries;
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
DROP TABLE IF EXISTS diaries, users;
|
||||
CREATE TABLE diaries (
|
||||
id INT PRIMARY KEY AUTO_INCREMENT,
|
||||
user_id INT NOT NULL,
|
||||
title VARCHAR(45) NOT NULL,
|
||||
KEY (user_id),
|
||||
FULLTEXT INDEX title_index (title)
|
||||
) DEFAULT CHARSET=UTF8;
|
||||
CREATE TABLE users (
|
||||
id INT PRIMARY KEY AUTO_INCREMENT,
|
||||
name VARCHAR(45) NOT NULL,
|
||||
INDEX (name)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
|
||||
INSERT INTO users (id, name) VALUES (1, "Alice"), (2, "Bob");
|
||||
INSERT INTO diaries (user_id, title) VALUES (1, "survey");
|
||||
INSERT INTO diaries (user_id, title) VALUES (2, "groonga (1)");
|
||||
INSERT INTO diaries (user_id, title) VALUES (2, "groonga (2)");
|
||||
CREATE VIEW articles AS
|
||||
SELECT diaries.user_id AS user_id,
|
||||
diaries.title AS title,
|
||||
users.name AS name
|
||||
FROM diaries, users
|
||||
WHERE diaries.user_id = users.id;
|
||||
SELECT COUNT(*) FROM articles WHERE name = 'Bob';
|
||||
COUNT(*)
|
||||
2
|
||||
DROP VIEW articles;
|
||||
DROP TABLE diaries, users;
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
show variables like 'mroonga_version';
|
||||
Variable_name Value
|
||||
mroonga_version 5.00
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
# Copyright(C) 2012 Kouhei Sutou
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
--source ../../include/mroonga/have_mroonga.inc
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS diaries;
|
||||
--enable_warnings
|
||||
|
||||
SET NAMES UTF8;
|
||||
CREATE TABLE diaries(
|
||||
title TEXT,
|
||||
FULLTEXT KEY (title)
|
||||
) DEFAULT CHARSET=utf8;
|
||||
|
||||
INSERT INTO diaries VALUES("Start groonga");
|
||||
INSERT INTO diaries VALUES("Start mroonga");
|
||||
INSERT INTO diaries VALUES("Start groonga and Ruby");
|
||||
|
||||
SELECT * FROM diaries;
|
||||
|
||||
SELECT *, MATCH(title) AGAINST("groonga" IN BOOLEAN MODE) AS score
|
||||
FROM diaries
|
||||
WHERE MATCH(title) AGAINST("groonga mroonga" IN BOOLEAN MODE)
|
||||
ORDER BY MATCH(title) AGAINST("groonga" IN BOOLEAN MODE);
|
||||
|
||||
DROP TABLE diaries;
|
||||
|
||||
--source ../../include/mroonga/have_mroonga_deinit.inc
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
# Copyright(C) 2012 Kouhei Sutou
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
--source ../../include/mroonga/have_mroonga.inc
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS diaries;
|
||||
--enable_warnings
|
||||
|
||||
SET NAMES UTF8;
|
||||
CREATE TABLE diaries(
|
||||
title TEXT,
|
||||
body TEXT,
|
||||
FULLTEXT KEY (title),
|
||||
FULLTEXT KEY (body)
|
||||
) DEFAULT CHARSET=utf8;
|
||||
|
||||
INSERT INTO diaries VALUES("Start groonga", "I read groonga's tutorial.");
|
||||
INSERT INTO diaries VALUES("Start mroonga", "I read mroonga's tutorial.");
|
||||
INSERT INTO diaries VALUES("Start groonga and Ruby", "I installed rroonga.");
|
||||
|
||||
SELECT * FROM diaries;
|
||||
|
||||
SELECT *, MATCH(body) AGAINST("groonga" IN BOOLEAN MODE) AS score
|
||||
FROM diaries
|
||||
WHERE MATCH(title) AGAINST("groonga" IN BOOLEAN MODE)
|
||||
ORDER BY MATCH(body) AGAINST("groonga" IN BOOLEAN MODE);
|
||||
|
||||
DROP TABLE diaries;
|
||||
|
||||
--source ../../include/mroonga/have_mroonga_deinit.inc
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
# Copyright(C) 2012 Kouhei Sutou
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
--source ../../include/mroonga/have_mroonga.inc
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS diaries;
|
||||
--enable_warnings
|
||||
|
||||
SET NAMES UTF8;
|
||||
CREATE TABLE diaries(
|
||||
title TEXT,
|
||||
FULLTEXT KEY (title)
|
||||
) DEFAULT CHARSET=utf8;
|
||||
|
||||
INSERT INTO diaries VALUES("Start groonga");
|
||||
INSERT INTO diaries VALUES("Start mroonga");
|
||||
INSERT INTO diaries VALUES("Start groonga and Ruby");
|
||||
|
||||
SELECT * FROM diaries;
|
||||
|
||||
SELECT *, MATCH(title) AGAINST("groonga" IN BOOLEAN MODE) AS score
|
||||
FROM diaries
|
||||
ORDER BY MATCH(title) AGAINST("groonga" IN BOOLEAN MODE);
|
||||
|
||||
DROP TABLE diaries;
|
||||
|
||||
--source ../../include/mroonga/have_mroonga_deinit.inc
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
# Copyright(C) 2012 Kouhei Sutou
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
--source ../../include/mroonga/have_mroonga.inc
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS diaries;
|
||||
--enable_warnings
|
||||
|
||||
SET NAMES UTF8;
|
||||
CREATE TABLE diaries(
|
||||
title TEXT,
|
||||
FULLTEXT KEY (title)
|
||||
) DEFAULT CHARSET=utf8;
|
||||
|
||||
INSERT INTO diaries VALUES("Start groonga");
|
||||
INSERT INTO diaries VALUES("Start mroonga");
|
||||
INSERT INTO diaries VALUES("Start groonga and Ruby");
|
||||
|
||||
SELECT * FROM diaries;
|
||||
|
||||
SELECT *, MATCH(title) AGAINST("groonga" IN BOOLEAN MODE) AS score
|
||||
FROM diaries
|
||||
WHERE MATCH(title) AGAINST("groonga" IN BOOLEAN MODE)
|
||||
ORDER BY MATCH(title) AGAINST("groonga" IN BOOLEAN MODE);
|
||||
|
||||
DROP TABLE diaries;
|
||||
|
||||
--source ../../include/mroonga/have_mroonga_deinit.inc
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
# Copyright(C) 2012 Kouhei Sutou <kou@clear-code.com>
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
--source ../../include/mroonga/have_mroonga.inc
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS ids;
|
||||
--enable_warnings
|
||||
|
||||
SET NAMES UTF8;
|
||||
|
||||
CREATE TABLE ids (
|
||||
id INT(10) UNSIGNED PRIMARY KEY AUTO_INCREMENT
|
||||
) ENGINE=Mroonga DEFAULT CHARSET=utf8;
|
||||
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
|
||||
SELECT * FROM ids WHERE ids.id > 1 ORDER BY ids.id ASC LIMIT 3;
|
||||
|
||||
DROP TABLE ids;
|
||||
|
||||
--source ../../include/mroonga/have_mroonga_deinit.inc
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
# Copyright(C) 2012 Kouhei Sutou <kou@clear-code.com>
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
--source ../../include/mroonga/have_mroonga.inc
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS ids;
|
||||
--enable_warnings
|
||||
|
||||
SET NAMES UTF8;
|
||||
|
||||
CREATE TABLE ids (
|
||||
id INT(10) UNSIGNED PRIMARY KEY AUTO_INCREMENT
|
||||
) ENGINE=Mroonga DEFAULT CHARSET=utf8;
|
||||
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
|
||||
SELECT * FROM ids WHERE ids.id > 3 ORDER BY ids.id DESC LIMIT 3;
|
||||
|
||||
DROP TABLE ids;
|
||||
|
||||
--source ../../include/mroonga/have_mroonga_deinit.inc
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
# Copyright(C) 2012 Kouhei Sutou <kou@clear-code.com>
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
--source ../../include/mroonga/have_mroonga.inc
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS ids;
|
||||
--enable_warnings
|
||||
|
||||
SET NAMES UTF8;
|
||||
|
||||
CREATE TABLE ids (
|
||||
id INT(10) UNSIGNED PRIMARY KEY AUTO_INCREMENT
|
||||
) ENGINE=Mroonga DEFAULT CHARSET=utf8;
|
||||
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
|
||||
SELECT * FROM ids WHERE ids.id >= 2 ORDER BY ids.id ASC LIMIT 3;
|
||||
|
||||
DROP TABLE ids;
|
||||
|
||||
--source ../../include/mroonga/have_mroonga_deinit.inc
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
# Copyright(C) 2012 Kouhei Sutou <kou@clear-code.com>
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
--source ../../include/mroonga/have_mroonga.inc
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS ids;
|
||||
--enable_warnings
|
||||
|
||||
SET NAMES UTF8;
|
||||
|
||||
CREATE TABLE ids (
|
||||
id INT(10) UNSIGNED PRIMARY KEY AUTO_INCREMENT
|
||||
) ENGINE=Mroonga DEFAULT CHARSET=utf8;
|
||||
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
|
||||
SELECT * FROM ids WHERE ids.id >= 3 ORDER BY ids.id DESC LIMIT 3;
|
||||
|
||||
DROP TABLE ids;
|
||||
|
||||
--source ../../include/mroonga/have_mroonga_deinit.inc
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
# Copyright(C) 2012 Kouhei Sutou <kou@clear-code.com>
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
--source ../../include/mroonga/have_mroonga.inc
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS ids;
|
||||
--enable_warnings
|
||||
|
||||
SET NAMES UTF8;
|
||||
|
||||
CREATE TABLE ids (
|
||||
id INT(10) UNSIGNED PRIMARY KEY AUTO_INCREMENT
|
||||
) ENGINE=Mroonga DEFAULT CHARSET=utf8;
|
||||
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
|
||||
SELECT * FROM ids WHERE ids.id < 4 ORDER BY ids.id ASC LIMIT 3;
|
||||
|
||||
DROP TABLE ids;
|
||||
|
||||
--source ../../include/mroonga/have_mroonga_deinit.inc
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
# Copyright(C) 2012 Kouhei Sutou <kou@clear-code.com>
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
--source ../../include/mroonga/have_mroonga.inc
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS ids;
|
||||
--enable_warnings
|
||||
|
||||
SET NAMES UTF8;
|
||||
|
||||
CREATE TABLE ids (
|
||||
id INT(10) UNSIGNED PRIMARY KEY AUTO_INCREMENT
|
||||
) ENGINE=Mroonga DEFAULT CHARSET=utf8;
|
||||
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
|
||||
SELECT * FROM ids WHERE ids.id < 4 ORDER BY ids.id DESC LIMIT 3;
|
||||
|
||||
DROP TABLE ids;
|
||||
|
||||
--source ../../include/mroonga/have_mroonga_deinit.inc
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
# Copyright(C) 2012 Kouhei Sutou <kou@clear-code.com>
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
--source ../../include/mroonga/have_mroonga.inc
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS ids;
|
||||
--enable_warnings
|
||||
|
||||
SET NAMES UTF8;
|
||||
|
||||
CREATE TABLE ids (
|
||||
id INT(10) UNSIGNED PRIMARY KEY AUTO_INCREMENT
|
||||
) ENGINE=Mroonga DEFAULT CHARSET=utf8;
|
||||
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
|
||||
SELECT * FROM ids WHERE ids.id <= 4 ORDER BY ids.id ASC LIMIT 3;
|
||||
|
||||
DROP TABLE ids;
|
||||
|
||||
--source ../../include/mroonga/have_mroonga_deinit.inc
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
# Copyright(C) 2012 Kouhei Sutou <kou@clear-code.com>
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
--source ../../include/mroonga/have_mroonga.inc
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS ids;
|
||||
--enable_warnings
|
||||
|
||||
SET NAMES UTF8;
|
||||
|
||||
CREATE TABLE ids (
|
||||
id INT(10) UNSIGNED PRIMARY KEY AUTO_INCREMENT
|
||||
) ENGINE=Mroonga DEFAULT CHARSET=utf8;
|
||||
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
INSERT INTO ids VALUES();
|
||||
|
||||
SELECT * FROM ids WHERE ids.id <= 4 ORDER BY ids.id DESC LIMIT 3;
|
||||
|
||||
DROP TABLE ids;
|
||||
|
||||
--source ../../include/mroonga/have_mroonga_deinit.inc
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
# Copyright(C) 2010 Kentoku SHIBA
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
--source ../../include/mroonga/have_mroonga.inc
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t1, t2, t3;
|
||||
--enable_warnings
|
||||
|
||||
flush status;
|
||||
create table t1 (c1 int primary key, c2 int, c3 text, key idx1(c2), fulltext index ft(c3));
|
||||
insert into t1 values(1,10,"aa ii uu ee oo");
|
||||
insert into t1 values(2,20,"ka ki ku ke ko");
|
||||
insert into t1 values(3,30,"sa si su se so");
|
||||
insert into t1 values(4,40,"ta ti tu te to");
|
||||
insert into t1 values(5,50,"aa ii uu ee oo");
|
||||
show status like 'mroonga_count_skip';
|
||||
select * from t1;
|
||||
show status like 'mroonga_count_skip';
|
||||
select count(*) from t1;
|
||||
show status like 'mroonga_count_skip';
|
||||
select * from t1 force index(primary) where c1 between 2 and 4;
|
||||
show status like 'mroonga_count_skip';
|
||||
select count(*) from t1 force index(primary) where c1 between 2 and 4;
|
||||
show status like 'mroonga_count_skip';
|
||||
select c1 from t1 force index(primary) where c1 < 3;
|
||||
show status like 'mroonga_count_skip';
|
||||
select count(c1) from t1 force index(primary) where c1 < 3;
|
||||
show status like 'mroonga_count_skip';
|
||||
select 1 from t1 force index(primary) where c1 > 3;
|
||||
show status like 'mroonga_count_skip';
|
||||
select count(1) from t1 force index(primary) where c1 > 3;
|
||||
show status like 'mroonga_count_skip';
|
||||
select * from t1 where match(c3) against("su");
|
||||
show status like 'mroonga_count_skip';
|
||||
select count(*) from t1 where match(c3) against("su");
|
||||
show status like 'mroonga_count_skip';
|
||||
select * from t1 where match(c3) against("+su" in boolean mode);
|
||||
show status like 'mroonga_count_skip';
|
||||
select count(*) from t1 where match(c3) against("+su" in boolean mode);
|
||||
show status like 'mroonga_count_skip';
|
||||
select * from t1 force index(idx1) where c2 between 20 and 40;
|
||||
show status like 'mroonga_count_skip';
|
||||
select count(*) from t1 force index(idx1) where c2 between 20 and 40;
|
||||
show status like 'mroonga_count_skip';
|
||||
drop table t1;
|
||||
|
||||
--source ../../include/mroonga/have_mroonga_deinit.inc
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
# Copyright(C) 2012 Kentoku SHIBA
|
||||
# Copyright(C) 2012 Kouhei Sutou <kou@clear-code.com>
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
--source ../../include/mroonga/have_mroonga.inc
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS diaries;
|
||||
--enable_warnings
|
||||
|
||||
FLUSH STATUS;
|
||||
CREATE TABLE diaries (
|
||||
title TEXT,
|
||||
FULLTEXT INDEX ft(title)
|
||||
);
|
||||
|
||||
INSERT INTO diaries VALUES("Hello mroonga!");
|
||||
INSERT INTO diaries VALUES("It's funny.");
|
||||
|
||||
CONNECT (thread2, localhost, root, ,);
|
||||
CONNECTION thread2;
|
||||
INSERT INTO diaries VALUES("Happy birthday!");
|
||||
DISCONNECT thread2;
|
||||
CONNECTION default;
|
||||
|
||||
SHOW STATUS LIKE 'mroonga_count_skip';
|
||||
SELECT COUNT(*) FROM diaries WHERE MATCH(title) AGAINST("mroonga" IN BOOLEAN MODE);
|
||||
SHOW STATUS LIKE 'mroonga_count_skip';
|
||||
|
||||
DROP TABLE diaries;
|
||||
|
||||
--source ../../include/mroonga/have_mroonga_deinit.inc
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
# Copyright(C) 2012 Kentoku SHIBA
|
||||
# Copyright(C) 2012 Kouhei Sutou <kou@clear-code.com>
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
--source ../../include/mroonga/have_mroonga.inc
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS diaries;
|
||||
--enable_warnings
|
||||
|
||||
FLUSH STATUS;
|
||||
CREATE TABLE diaries (
|
||||
title TEXT,
|
||||
FULLTEXT INDEX ft(title)
|
||||
);
|
||||
|
||||
INSERT INTO diaries VALUES("Hello mroonga!");
|
||||
INSERT INTO diaries VALUES("It's funny.");
|
||||
INSERT INTO diaries VALUES("Happy birthday!");
|
||||
|
||||
SHOW STATUS LIKE 'mroonga_count_skip';
|
||||
SELECT COUNT(*) FROM diaries WHERE MATCH(title) AGAINST("mroonga" IN BOOLEAN MODE);
|
||||
SHOW STATUS LIKE 'mroonga_count_skip';
|
||||
|
||||
DROP TABLE diaries;
|
||||
|
||||
--source ../../include/mroonga/have_mroonga_deinit.inc
|
||||
|
|
@ -1,51 +0,0 @@
|
|||
# Copyright(C) 2012 Kouhei Sutou <kou@clear-code.com>
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
--source ../../include/mroonga/have_mroonga.inc
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS diaries;
|
||||
--enable_warnings
|
||||
|
||||
FLUSH STATUS;
|
||||
|
||||
SET NAMES UTF8;
|
||||
CREATE TABLE diaries (
|
||||
id INT UNSIGNED NOT NULL,
|
||||
title VARCHAR(255),
|
||||
content TEXT,
|
||||
FULLTEXT INDEX(content)
|
||||
) DEFAULT CHARSET UTF8;
|
||||
SHOW CREATE TABLE diaries;
|
||||
|
||||
INSERT INTO diaries VALUES(1, "Hello", "今日からはじめました。");
|
||||
INSERT INTO diaries VALUES(2, "天気", "明日の富士山の天気について");
|
||||
INSERT INTO diaries VALUES(3, "富士山", "今日も天気がよくてきれいに見える。");
|
||||
INSERT INTO diaries VALUES(4, "帰り道", "今日は天気がよくてよかった。");
|
||||
INSERT INTO diaries VALUES(5, "はれ", "天気がよいのは今日までみたい。");
|
||||
|
||||
SET mroonga_enable_optimization=FALSE;
|
||||
|
||||
SELECT COUNT(*) FROM diaries
|
||||
WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE);
|
||||
|
||||
SHOW STATUS LIKE 'mroonga_count_skip';
|
||||
|
||||
SET mroonga_enable_optimization=TRUE;
|
||||
|
||||
DROP TABLE diaries;
|
||||
|
||||
--source ../../include/mroonga/have_mroonga_deinit.inc
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
# Copyright(C) 2012 Kouhei Sutou <kou@clear-code.com>
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
--source include/have_innodb.inc
|
||||
--source ../../include/mroonga/have_mroonga.inc
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS diaries, users;
|
||||
--enable_warnings
|
||||
|
||||
CREATE TABLE diaries (
|
||||
id INT PRIMARY KEY AUTO_INCREMENT,
|
||||
user_id INT NOT NULL,
|
||||
title VARCHAR(45) NOT NULL,
|
||||
KEY (user_id),
|
||||
FULLTEXT INDEX title_index (title)
|
||||
) DEFAULT CHARSET=UTF8;
|
||||
|
||||
CREATE TABLE users (
|
||||
id INT PRIMARY KEY AUTO_INCREMENT,
|
||||
name VARCHAR(45) NOT NULL,
|
||||
INDEX (name)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
|
||||
|
||||
INSERT INTO users (id, name) VALUES (1, "Alice"), (2, "Bob");
|
||||
INSERT INTO diaries (user_id, title) VALUES (1, "survey");
|
||||
INSERT INTO diaries (user_id, title) VALUES (2, "groonga (1)");
|
||||
INSERT INTO diaries (user_id, title) VALUES (2, "groonga (2)");
|
||||
|
||||
CREATE VIEW articles AS
|
||||
SELECT diaries.user_id AS user_id,
|
||||
diaries.title AS title,
|
||||
users.name AS name
|
||||
FROM diaries, users
|
||||
WHERE diaries.user_id = users.id;
|
||||
|
||||
|
||||
SELECT COUNT(*) FROM articles WHERE name = 'Bob';
|
||||
|
||||
DROP VIEW articles;
|
||||
DROP TABLE diaries, users;
|
||||
|
||||
--source ../../include/mroonga/have_mroonga_deinit.inc
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
DROP TABLE IF EXISTS ids;
|
||||
DROP FUNCTION IF EXISTS last_insert_grn_id;
|
||||
CREATE TABLE ids (
|
||||
id int AUTO_INCREMENT PRIMARY KEY
|
||||
) COMMENT='ENGINE "InnoDB"';
|
||||
SELECT last_insert_grn_id();
|
||||
last_insert_grn_id()
|
||||
0
|
||||
INSERT INTO ids VALUES();
|
||||
SELECT last_insert_grn_id();
|
||||
last_insert_grn_id()
|
||||
0
|
||||
SELECT * FROM ids;
|
||||
id
|
||||
1
|
||||
DROP TABLE ids;
|
||||
DROP FUNCTION last_insert_grn_id;
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
DROP TABLE IF EXISTS diaries;
|
||||
SHOW VARIABLES LIKE 'performance_schema';
|
||||
Variable_name Value
|
||||
performance_schema ON
|
||||
CREATE TABLE diaries (
|
||||
id INT PRIMARY KEY AUTO_INCREMENT,
|
||||
content VARCHAR(255),
|
||||
FULLTEXT INDEX (content)
|
||||
) DEFAULT CHARSET UTF8 COMMENT = 'ENGINE "InnoDB"';
|
||||
SHOW CREATE TABLE diaries;
|
||||
Table Create Table
|
||||
diaries CREATE TABLE `diaries` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`content` varchar(255) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
FULLTEXT KEY `content` (`content`)
|
||||
) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"'
|
||||
INSERT INTO diaries (content) VALUES ("Tommorow will be shiny day!");
|
||||
SHOW TABLES FROM performance_schema;
|
||||
Tables_in_performance_schema
|
||||
cond_instances
|
||||
events_waits_current
|
||||
events_waits_history
|
||||
events_waits_history_long
|
||||
events_waits_summary_by_instance
|
||||
events_waits_summary_by_thread_by_event_name
|
||||
events_waits_summary_global_by_event_name
|
||||
file_instances
|
||||
file_summary_by_event_name
|
||||
file_summary_by_instance
|
||||
mutex_instances
|
||||
performance_timers
|
||||
rwlock_instances
|
||||
setup_consumers
|
||||
setup_instruments
|
||||
setup_timers
|
||||
threads
|
||||
DROP TABLE diaries;
|
||||
|
|
@ -1,73 +0,0 @@
|
|||
DROP TABLE IF EXISTS diaries;
|
||||
SHOW VARIABLES LIKE 'performance_schema';
|
||||
Variable_name Value
|
||||
performance_schema ON
|
||||
CREATE TABLE diaries (
|
||||
id INT PRIMARY KEY AUTO_INCREMENT,
|
||||
content VARCHAR(255),
|
||||
FULLTEXT INDEX (content)
|
||||
) DEFAULT CHARSET UTF8 COMMENT = 'ENGINE "InnoDB"';
|
||||
SHOW CREATE TABLE diaries;
|
||||
Table Create Table
|
||||
diaries CREATE TABLE `diaries` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`content` varchar(255) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
FULLTEXT KEY `content` (`content`)
|
||||
) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"'
|
||||
INSERT INTO diaries (content) VALUES ("Tommorow will be shiny day!");
|
||||
SHOW TABLES FROM performance_schema;
|
||||
Tables_in_performance_schema
|
||||
accounts
|
||||
cond_instances
|
||||
events_stages_current
|
||||
events_stages_history
|
||||
events_stages_history_long
|
||||
events_stages_summary_by_account_by_event_name
|
||||
events_stages_summary_by_host_by_event_name
|
||||
events_stages_summary_by_thread_by_event_name
|
||||
events_stages_summary_by_user_by_event_name
|
||||
events_stages_summary_global_by_event_name
|
||||
events_statements_current
|
||||
events_statements_history
|
||||
events_statements_history_long
|
||||
events_statements_summary_by_account_by_event_name
|
||||
events_statements_summary_by_digest
|
||||
events_statements_summary_by_host_by_event_name
|
||||
events_statements_summary_by_thread_by_event_name
|
||||
events_statements_summary_by_user_by_event_name
|
||||
events_statements_summary_global_by_event_name
|
||||
events_waits_current
|
||||
events_waits_history
|
||||
events_waits_history_long
|
||||
events_waits_summary_by_account_by_event_name
|
||||
events_waits_summary_by_host_by_event_name
|
||||
events_waits_summary_by_instance
|
||||
events_waits_summary_by_thread_by_event_name
|
||||
events_waits_summary_by_user_by_event_name
|
||||
events_waits_summary_global_by_event_name
|
||||
file_instances
|
||||
file_summary_by_event_name
|
||||
file_summary_by_instance
|
||||
host_cache
|
||||
hosts
|
||||
mutex_instances
|
||||
objects_summary_global_by_type
|
||||
performance_timers
|
||||
rwlock_instances
|
||||
session_account_connect_attrs
|
||||
session_connect_attrs
|
||||
setup_actors
|
||||
setup_consumers
|
||||
setup_instruments
|
||||
setup_objects
|
||||
setup_timers
|
||||
socket_instances
|
||||
socket_summary_by_event_name
|
||||
socket_summary_by_instance
|
||||
table_io_waits_summary_by_index_usage
|
||||
table_io_waits_summary_by_table
|
||||
table_lock_waits_summary_by_table
|
||||
threads
|
||||
users
|
||||
DROP TABLE diaries;
|
||||
|
|
@ -1,52 +0,0 @@
|
|||
# Copyright(C) 2012 Kouhei Sutou <kou@clear-code.com>
|
||||
# Copyright(C) 2013 Kentoku SHIBA
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
--source include/have_innodb.inc
|
||||
--source include/not_embedded.inc
|
||||
--source ../../include/mroonga/have_mroonga.inc
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS ids;
|
||||
DROP FUNCTION IF EXISTS last_insert_grn_id;
|
||||
--enable_warnings
|
||||
|
||||
--disable_query_log
|
||||
if ($VERSION_COMPILE_OS_WIN)
|
||||
{
|
||||
CREATE FUNCTION last_insert_grn_id RETURNS integer SONAME 'ha_mroonga.dll';
|
||||
}
|
||||
if (!$VERSION_COMPILE_OS_WIN)
|
||||
{
|
||||
CREATE FUNCTION last_insert_grn_id RETURNS integer SONAME 'ha_mroonga.so';
|
||||
}
|
||||
--enable_query_log
|
||||
|
||||
CREATE TABLE ids (
|
||||
id int AUTO_INCREMENT PRIMARY KEY
|
||||
) COMMENT='ENGINE "InnoDB"';
|
||||
|
||||
SELECT last_insert_grn_id();
|
||||
|
||||
INSERT INTO ids VALUES();
|
||||
SELECT last_insert_grn_id();
|
||||
SELECT * FROM ids;
|
||||
|
||||
DROP TABLE ids;
|
||||
|
||||
DROP FUNCTION last_insert_grn_id;
|
||||
|
||||
--source ../../include/mroonga/have_mroonga_deinit.inc
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
# Copyright(C) 2012 Kouhei Sutou <kou@clear-code.com>
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
--source ../../include/mroonga/have_version_55.inc
|
||||
--source include/have_innodb.inc
|
||||
--source include/not_embedded.inc
|
||||
--source ../../include/mroonga/have_mroonga.inc
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS diaries;
|
||||
--enable_warnings
|
||||
|
||||
SHOW VARIABLES LIKE 'performance_schema';
|
||||
|
||||
CREATE TABLE diaries (
|
||||
id INT PRIMARY KEY AUTO_INCREMENT,
|
||||
content VARCHAR(255),
|
||||
FULLTEXT INDEX (content)
|
||||
) DEFAULT CHARSET UTF8 COMMENT = 'ENGINE "InnoDB"';
|
||||
SHOW CREATE TABLE diaries;
|
||||
|
||||
INSERT INTO diaries (content) VALUES ("Tommorow will be shiny day!");
|
||||
|
||||
SHOW TABLES FROM performance_schema;
|
||||
|
||||
DROP TABLE diaries;
|
||||
|
||||
--source ../../include/mroonga/have_mroonga_deinit.inc
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
# Copyright(C) 2012 Kouhei Sutou <kou@clear-code.com>
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
--source ../../include/mroonga/have_version_56_or_later.inc
|
||||
--source include/have_innodb.inc
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
--source ../../include/mroonga/have_mroonga.inc
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS diaries;
|
||||
--enable_warnings
|
||||
|
||||
SHOW VARIABLES LIKE 'performance_schema';
|
||||
|
||||
CREATE TABLE diaries (
|
||||
id INT PRIMARY KEY AUTO_INCREMENT,
|
||||
content VARCHAR(255),
|
||||
FULLTEXT INDEX (content)
|
||||
) DEFAULT CHARSET UTF8 COMMENT = 'ENGINE "InnoDB"';
|
||||
SHOW CREATE TABLE diaries;
|
||||
|
||||
INSERT INTO diaries (content) VALUES ("Tommorow will be shiny day!");
|
||||
|
||||
SHOW TABLES FROM performance_schema;
|
||||
|
||||
DROP TABLE diaries;
|
||||
|
||||
--source ../../include/mroonga/have_mroonga_deinit.inc
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
rmdir /S /Q build-vc2010-msi-32
|
||||
mkdir build-vc2010-msi-32
|
||||
cd build-vc2010-msi-32
|
||||
cmake ..\source -G "Visual Studio 10" > config.log
|
||||
cmake --build . --config RelWithDebInfo > build.log
|
||||
cmake --build . --config RelWithDebInfo --target msi > msi.log
|
||||
move *.msi ..\
|
||||
cd ..
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
rmdir /S /Q build-vc2010-msi-64
|
||||
mkdir build-vc2010-msi-64
|
||||
cd build-vc2010-msi-64
|
||||
cmake ..\source -G "Visual Studio 10 Win64" > config.log
|
||||
cmake --build . --config RelWithDebInfo > build.log
|
||||
cmake --build . --config RelWithDebInfo --target msi > msi.log
|
||||
move *.msi ..\
|
||||
cd ..
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
rmdir /S /Q build-vc2010-zip-32
|
||||
mkdir build-vc2010-zip-32
|
||||
cd build-vc2010-zip-32
|
||||
cmake ..\source -G "Visual Studio 10" -DMRN_GROONGA_EMBED=OFF -DMRN_GROONGA_NORMALIZER_MYSQL_EMBED=OFF > config.log
|
||||
cmake --build . --config RelWithDebInfo > build.log
|
||||
cmake --build . --config RelWithDebInfo --target package > zip.log
|
||||
move *.zip ..\
|
||||
cd ..
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
rmdir /S /Q build-vc2010-zip-64
|
||||
mkdir build-vc2010-zip-64
|
||||
cd build-vc2010-zip-64
|
||||
cmake ..\source -G "Visual Studio 10 Win64" -DMRN_GROONGA_EMBED=OFF -DMRN_GROONGA_NORMALIZER_MYSQL_EMBED=OFF > config.log
|
||||
cmake --build . --config RelWithDebInfo > build.log
|
||||
cmake --build . --config RelWithDebInfo --target package > zip.log
|
||||
move *.zip ..\
|
||||
cd ..
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
build-vc2010-zip-32.bat
|
||||
build-vc2010-zip-64.bat
|
||||
build-vc2010-msi-32.bat
|
||||
build-vc2010-msi-64.bat
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
MYSQL_STORAGE_ENGINE(mroonga,,[mroonga],
|
||||
[[CJK-ready fulltext search, column store]],
|
||||
[max,max-no-ndb])
|
||||
MYSQL_PLUGIN_DIRECTORY(mroonga, [storage/mroonga])
|
||||
MYSQL_PLUGIN_STATIC(mroonga, [libmroonga.a])
|
||||
MYSQL_PLUGIN_DYNAMIC(mroonga, [ha_mroonga.la])
|
||||
|
|
@ -54,6 +54,13 @@ else()
|
|||
_pkgconfig_invoke(groonga GROONGA PLUGINS_DIR "" --variable=pluginsdir)
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_C_COMPILE_OPTIONS_PIC)
|
||||
# For old CMake
|
||||
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGCXX)
|
||||
check_build_flag("-fPIC")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include_directories(
|
||||
${CMAKE_BINARY_DIR}
|
||||
${GROONGA_INCLUDE_DIRS})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue