Navigation Menu

Skip to content

Commit

Permalink
Merge branch 'master' of github.com:mroonga/mroonga
Browse files Browse the repository at this point in the history
  • Loading branch information
Kentoku committed Sep 25, 2011
2 parents f1a5038 + 76b573a commit 3e4cca2
Show file tree
Hide file tree
Showing 6 changed files with 180 additions and 0 deletions.
29 changes: 29 additions & 0 deletions test/sql/groonga_storage/r/fulltext_tokenizer.result
@@ -0,0 +1,29 @@
drop table if exists diaries;
create table diaries (
id int primary key auto_increment,
body text,
fulltext index body_index (body)
comment 'parser "TokenBigramSplitSymbolAlphaDigit"'
) default charset utf8;
show create table diaries;
Table Create Table
diaries CREATE TABLE `diaries` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`body` text,
PRIMARY KEY (`id`),
FULLTEXT KEY `body_index` (`body`) COMMENT 'parser "TokenBigramSplitSymbolAlphaDigit"'
) ENGINE=groonga DEFAULT CHARSET=utf8
insert into diaries (body) values ("will start groonga!");
insert into diaries (body) values ("starting groonga...");
insert into diaries (body) values ("started groonga.");
select * from diaries;
id body
1 will start groonga!
2 starting groonga...
3 started groonga.
select * from diaries where match(body) against("start");
id body
1 will start groonga!
2 starting groonga...
3 started groonga.
drop table diaries;
37 changes: 37 additions & 0 deletions test/sql/groonga_storage/t/fulltext_tokenizer.test
@@ -0,0 +1,37 @@
# Copyright(C) 2011 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 suite/groonga_include/groonga_init.inc

--disable_warnings
drop table if exists diaries;
--enable_warnings

create table diaries (
id int primary key auto_increment,
body text,
fulltext index body_index (body)
comment 'parser "TokenBigramSplitSymbolAlphaDigit"'
) default charset utf8;
show create table diaries;
insert into diaries (body) values ("will start groonga!");
insert into diaries (body) values ("starting groonga...");
insert into diaries (body) values ("started groonga.");
select * from diaries;
select * from diaries where match(body) against("start");
drop table diaries;

--source suite/groonga_include/groonga_deinit.inc
15 changes: 15 additions & 0 deletions test/sql/groonga_wrapper/r/auto_increment_text.result
@@ -0,0 +1,15 @@
drop table if exists diaries;
create table diaries (
id int primary key auto_increment,
body text
) comment = 'engine "innodb"';
insert into diaries (body) values ("started groonga (long text)");
select * from diaries;
id body
1 started groonga (long text)
insert into diaries (body) values ("sleeping... (short text)");
select * from diaries;
id body
1 started groonga (long text)
2 sleeping... (short text)
drop table diaries;
29 changes: 29 additions & 0 deletions test/sql/groonga_wrapper/r/fulltext_tokenizer.result
@@ -0,0 +1,29 @@
drop table if exists diaries;
create table diaries (
id int primary key auto_increment,
body text,
fulltext index body_index (body)
comment 'parser "TokenBigramSplitSymbolAlphaDigit"'
) comment = 'engine "innodb"' default charset utf8;
show create table diaries;
Table Create Table
diaries CREATE TABLE `diaries` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`body` text,
PRIMARY KEY (`id`),
FULLTEXT KEY `body_index` (`body`) COMMENT 'parser "TokenBigramSplitSymbolAlphaDigit"'
) ENGINE=groonga COMMENT = 'engine "innodb"' DEFAULT CHARSET=utf8
insert into diaries (body) values ("will start groonga!");
insert into diaries (body) values ("starting groonga...");
insert into diaries (body) values ("started groonga.");
select * from diaries;
id body
1 will start groonga!
2 starting groonga...
3 started groonga.
select * from diaries where match(body) against("start");
id body
1 will start groonga!
2 starting groonga...
3 started groonga.
drop table diaries;
33 changes: 33 additions & 0 deletions test/sql/groonga_wrapper/t/auto_increment_text.test
@@ -0,0 +1,33 @@
# Copyright(C) 2011 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 suite/groonga_include/groonga_init.inc

--disable_warnings
drop table if exists diaries;
--enable_warnings

create table diaries (
id int primary key auto_increment,
body text
) comment = 'engine "innodb"';
insert into diaries (body) values ("started groonga (long text)");
select * from diaries;
insert into diaries (body) values ("sleeping... (short text)");
select * from diaries;
drop table diaries;

--source suite/groonga_include/groonga_deinit.inc
37 changes: 37 additions & 0 deletions test/sql/groonga_wrapper/t/fulltext_tokenizer.test
@@ -0,0 +1,37 @@
# Copyright(C) 2011 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 suite/groonga_include/groonga_init.inc

--disable_warnings
drop table if exists diaries;
--enable_warnings

create table diaries (
id int primary key auto_increment,
body text,
fulltext index body_index (body)
comment 'parser "TokenBigramSplitSymbolAlphaDigit"'
) comment = 'engine "innodb"' default charset utf8;
show create table diaries;
insert into diaries (body) values ("will start groonga!");
insert into diaries (body) values ("starting groonga...");
insert into diaries (body) values ("started groonga.");
select * from diaries;
select * from diaries where match(body) against("start");
drop table diaries;

--source suite/groonga_include/groonga_deinit.inc

0 comments on commit 3e4cca2

Please sign in to comment.