null+****@clear*****
null+****@clear*****
2011年 9月 25日 (日) 15:27:02 JST
Kouhei Sutou 2011-09-25 06:27:02 +0000 (Sun, 25 Sep 2011)
New Revision: 76b573ae551c3679bec1c5dd468a4f8f2d5a0066
Log:
[wrapper][test] add auto increment primary key test.
Added files:
test/sql/groonga_wrapper/r/auto_increment_text.result
test/sql/groonga_wrapper/t/auto_increment_text.test
Added: test/sql/groonga_wrapper/r/auto_increment_text.result (+15 -0) 100644
===================================================================
--- /dev/null
+++ test/sql/groonga_wrapper/r/auto_increment_text.result 2011-09-25 06:27:02 +0000 (9d45d2f)
@@ -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;
Added: test/sql/groonga_wrapper/t/auto_increment_text.test (+33 -0) 100644
===================================================================
--- /dev/null
+++ test/sql/groonga_wrapper/t/auto_increment_text.test 2011-09-25 06:27:02 +0000 (5573ae6)
@@ -0,0 +1,33 @@
+# Copyright(C) 2011 Kouhei Sutou <kou****@clear*****>
+#
+# 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