Navigation Menu

Skip to content

Commit

Permalink
[wrapper][test] add auto increment primary key test.
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Sep 25, 2011
1 parent 338d90e commit 76b573a
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
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;
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

0 comments on commit 76b573a

Please sign in to comment.