null+****@clear*****
null+****@clear*****
2011年 6月 18日 (土) 18:00:05 JST
Kouhei Sutou 2011-06-18 09:00:05 +0000 (Sat, 18 Jun 2011)
New Revision: 57bbe48164c71aa1e37f6d076faa7fec2552c69c
Log:
[wrapper][create][test] follow the recent change.
Modified files:
test/sql/r/create_table_wrapper.result
test/sql/t/create_table_wrapper.test
Modified: test/sql/r/create_table_wrapper.result (+46 -85)
===================================================================
--- test/sql/r/create_table_wrapper.result 2011-06-18 08:54:41 +0000 (5cb8d85)
+++ test/sql/r/create_table_wrapper.result 2011-06-18 09:00:05 +0000 (b381433)
@@ -1,148 +1,109 @@
drop table if exists t1, t2, t3;
-create table t1 (c1 int) COMMENT = 'engine "innodb"';
-create table t2 (c1 int) COMMENT = 'engine "innodb"';
-create table t3 (c1 int) COMMENT = 'engine "innodb"';
+create table t1 (c1 int primary key) COMMENT = 'engine "innodb"';
+create table t2 (c1 int primary key) COMMENT = 'engine "innodb"';
+create table t3 (c1 int primary key) COMMENT = 'engine "innodb"';
drop table t1,t2,t3;
-create table t1 (c1 int, c2 int, c3 int) COMMENT = 'engine "innodb"';
-create table t2 (c1 int primary key, c2 int, c3 int) COMMENT = 'engine "innodb"';
-drop table t1,t2;
-create table t1 (c1 bit) COMMENT = 'engine "innodb"';
-desc t1;
-Field Type Null Key Default Extra
-c1 bit(1) YES NULL
-drop table t1;
-create table t1 (c1 tinyint) COMMENT = 'engine "innodb"';
-desc t1;
-Field Type Null Key Default Extra
-c1 tinyint(4) YES NULL
-drop table t1;
-create table t1 (c1 smallint) COMMENT = 'engine "innodb"';
-desc t1;
-Field Type Null Key Default Extra
-c1 smallint(6) YES NULL
-drop table t1;
-create table t1 (c1 mediumint) COMMENT = 'engine "innodb"';
-desc t1;
-Field Type Null Key Default Extra
-c1 mediumint(9) YES NULL
-drop table t1;
-create table t1 (c1 int) COMMENT = 'engine "innodb"';
-desc t1;
-Field Type Null Key Default Extra
-c1 int(11) YES NULL
+create table t1 (c1 int primary key, c2 int, c3 int) COMMENT = 'engine "innodb"';
drop table t1;
-create table t1 (c1 bigint) COMMENT = 'engine "innodb"';
+create table t1 (c1 bit primary key) COMMENT = 'engine "innodb"';
desc t1;
Field Type Null Key Default Extra
-c1 bigint(20) YES NULL
+c1 bit(1) NO PRI NULL
drop table t1;
-create table t1 (c1 double) COMMENT = 'engine "innodb"';
+create table t1 (c1 tinyint primary key) COMMENT = 'engine "innodb"';
desc t1;
Field Type Null Key Default Extra
-c1 double YES NULL
+c1 tinyint(4) NO PRI NULL
drop table t1;
-create table t1 (c1 float) COMMENT = 'engine "innodb"';
+create table t1 (c1 smallint primary key) COMMENT = 'engine "innodb"';
desc t1;
Field Type Null Key Default Extra
-c1 float YES NULL
+c1 smallint(6) NO PRI NULL
drop table t1;
-create table t1 (c1 decimal) COMMENT = 'engine "innodb"';
+create table t1 (c1 mediumint primary key) COMMENT = 'engine "innodb"';
desc t1;
Field Type Null Key Default Extra
-c1 decimal(10,0) YES NULL
+c1 mediumint(9) NO PRI NULL
drop table t1;
-create table t1 (c1 date) COMMENT = 'engine "innodb"';
+create table t1 (c1 int primary key) COMMENT = 'engine "innodb"';
desc t1;
Field Type Null Key Default Extra
-c1 date YES NULL
+c1 int(11) NO PRI NULL
drop table t1;
-create table t1 (c1 time) COMMENT = 'engine "innodb"';
+create table t1 (c1 bigint primary key) COMMENT = 'engine "innodb"';
desc t1;
Field Type Null Key Default Extra
-c1 time YES NULL
+c1 bigint(20) NO PRI NULL
drop table t1;
-create table t1 (c1 timestamp) COMMENT = 'engine "innodb"';
+create table t1 (c1 double primary key) COMMENT = 'engine "innodb"';
desc t1;
Field Type Null Key Default Extra
-c1 timestamp NO CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP
+c1 double NO PRI NULL
drop table t1;
-create table t1 (c1 datetime) COMMENT = 'engine "innodb"';
+create table t1 (c1 float primary key) COMMENT = 'engine "innodb"';
desc t1;
Field Type Null Key Default Extra
-c1 datetime YES NULL
+c1 float NO PRI NULL
drop table t1;
-create table t1 (c1 year) COMMENT = 'engine "innodb"';
+create table t1 (c1 decimal primary key) COMMENT = 'engine "innodb"';
desc t1;
Field Type Null Key Default Extra
-c1 year(4) YES NULL
+c1 decimal(10,0) NO PRI NULL
drop table t1;
-create table t1 (c1 char(10)) COMMENT = 'engine "innodb"';
+create table t1 (c1 date primary key) COMMENT = 'engine "innodb"';
desc t1;
Field Type Null Key Default Extra
-c1 char(10) YES NULL
+c1 date NO PRI NULL
drop table t1;
-create table t1 (c1 varchar(10)) COMMENT = 'engine "innodb"';
+create table t1 (c1 time primary key) COMMENT = 'engine "innodb"';
desc t1;
Field Type Null Key Default Extra
-c1 varchar(10) YES NULL
+c1 time NO PRI NULL
drop table t1;
-create table t1 (c1 binary(10)) COMMENT = 'engine "innodb"';
+create table t1 (c1 timestamp primary key) COMMENT = 'engine "innodb"';
desc t1;
Field Type Null Key Default Extra
-c1 binary(10) YES NULL
+c1 timestamp NO PRI CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP
drop table t1;
-create table t1 (c1 varbinary(10)) COMMENT = 'engine "innodb"';
+create table t1 (c1 datetime primary key) COMMENT = 'engine "innodb"';
desc t1;
Field Type Null Key Default Extra
-c1 varbinary(10) YES NULL
+c1 datetime NO PRI NULL
drop table t1;
-create table t1 (c1 tinyblob) COMMENT = 'engine "innodb"';
+create table t1 (c1 year primary key) COMMENT = 'engine "innodb"';
desc t1;
Field Type Null Key Default Extra
-c1 tinyblob YES NULL
+c1 year(4) NO PRI NULL
drop table t1;
-create table t1 (c1 blob) COMMENT = 'engine "innodb"';
+create table t1 (c1 char(10) primary key) COMMENT = 'engine "innodb"';
desc t1;
Field Type Null Key Default Extra
-c1 blob YES NULL
+c1 char(10) NO PRI NULL
drop table t1;
-create table t1 (c1 mediumblob) COMMENT = 'engine "innodb"';
+create table t1 (c1 varchar(10) primary key) COMMENT = 'engine "innodb"';
desc t1;
Field Type Null Key Default Extra
-c1 mediumblob YES NULL
+c1 varchar(10) NO PRI NULL
drop table t1;
-create table t1 (c1 longblob) COMMENT = 'engine "innodb"';
+create table t1 (c1 binary(10) primary key) COMMENT = 'engine "innodb"';
desc t1;
Field Type Null Key Default Extra
-c1 longblob YES NULL
+c1 binary(10) NO PRI NULL
drop table t1;
-create table t1 (c1 tinytext) COMMENT = 'engine "innodb"';
+create table t1 (c1 varbinary(10) primary key) COMMENT = 'engine "innodb"';
desc t1;
Field Type Null Key Default Extra
-c1 tinytext YES NULL
+c1 varbinary(10) NO PRI NULL
drop table t1;
-create table t1 (c1 text) COMMENT = 'engine "innodb"';
+create table t1 (c1 enum("yes","no") primary key) COMMENT = 'engine "innodb"';
desc t1;
Field Type Null Key Default Extra
-c1 text YES NULL
+c1 enum('yes','no') NO PRI NULL
drop table t1;
-create table t1 (c1 mediumtext) COMMENT = 'engine "innodb"';
+create table t1 (c1 set("A","B","AB","O") primary key) COMMENT = 'engine "innodb"';
desc t1;
Field Type Null Key Default Extra
-c1 mediumtext YES NULL
-drop table t1;
-create table t1 (c1 longtext) COMMENT = 'engine "innodb"';
-desc t1;
-Field Type Null Key Default Extra
-c1 longtext YES NULL
-drop table t1;
-create table t1 (c1 enum("yes","no")) COMMENT = 'engine "innodb"';
-desc t1;
-Field Type Null Key Default Extra
-c1 enum('yes','no') YES NULL
-drop table t1;
-create table t1 (c1 set("A","B","AB","O")) COMMENT = 'engine "innodb"';
-desc t1;
-Field Type Null Key Default Extra
-c1 set('A','B','AB','O') YES NULL
+c1 set('A','B','AB','O') NO PRI NULL
drop table t1;
+create table t1 (c1 int) COMMENT = 'engine "innodb"';
+ERROR 42000: This table type requires a primary key
Modified: test/sql/t/create_table_wrapper.test (+29 -50)
===================================================================
--- test/sql/t/create_table_wrapper.test 2011-06-18 08:54:41 +0000 (09c99fd)
+++ test/sql/t/create_table_wrapper.test 2011-06-18 09:00:05 +0000 (b8e39dd)
@@ -22,98 +22,77 @@ drop table if exists t1, t2, t3;
--enable_warnings
# simple test
-create table t1 (c1 int) COMMENT = 'engine "innodb"';
-create table t2 (c1 int) COMMENT = 'engine "innodb"';
-create table t3 (c1 int) COMMENT = 'engine "innodb"';
+create table t1 (c1 int primary key) COMMENT = 'engine "innodb"';
+create table t2 (c1 int primary key) COMMENT = 'engine "innodb"';
+create table t3 (c1 int primary key) COMMENT = 'engine "innodb"';
drop table t1,t2,t3;
-create table t1 (c1 int, c2 int, c3 int) COMMENT = 'engine "innodb"';
-create table t2 (c1 int primary key, c2 int, c3 int) COMMENT = 'engine "innodb"';
-drop table t1,t2;
+create table t1 (c1 int primary key, c2 int, c3 int) COMMENT = 'engine "innodb"';
+drop table t1;
# data type support
-create table t1 (c1 bit) COMMENT = 'engine "innodb"';
-desc t1;
-drop table t1;
-create table t1 (c1 tinyint) COMMENT = 'engine "innodb"';
-desc t1;
-drop table t1;
-create table t1 (c1 smallint) COMMENT = 'engine "innodb"';
-desc t1;
-drop table t1;
-create table t1 (c1 mediumint) COMMENT = 'engine "innodb"';
-desc t1;
-drop table t1;
-create table t1 (c1 int) COMMENT = 'engine "innodb"';
+create table t1 (c1 bit primary key) COMMENT = 'engine "innodb"';
desc t1;
drop table t1;
-create table t1 (c1 bigint) COMMENT = 'engine "innodb"';
+create table t1 (c1 tinyint primary key) COMMENT = 'engine "innodb"';
desc t1;
drop table t1;
-create table t1 (c1 double) COMMENT = 'engine "innodb"';
+create table t1 (c1 smallint primary key) COMMENT = 'engine "innodb"';
desc t1;
drop table t1;
-create table t1 (c1 float) COMMENT = 'engine "innodb"';
+create table t1 (c1 mediumint primary key) COMMENT = 'engine "innodb"';
desc t1;
drop table t1;
-create table t1 (c1 decimal) COMMENT = 'engine "innodb"';
+create table t1 (c1 int primary key) COMMENT = 'engine "innodb"';
desc t1;
drop table t1;
-create table t1 (c1 date) COMMENT = 'engine "innodb"';
+create table t1 (c1 bigint primary key) COMMENT = 'engine "innodb"';
desc t1;
drop table t1;
-create table t1 (c1 time) COMMENT = 'engine "innodb"';
+create table t1 (c1 double primary key) COMMENT = 'engine "innodb"';
desc t1;
drop table t1;
-create table t1 (c1 timestamp) COMMENT = 'engine "innodb"';
+create table t1 (c1 float primary key) COMMENT = 'engine "innodb"';
desc t1;
drop table t1;
-create table t1 (c1 datetime) COMMENT = 'engine "innodb"';
+create table t1 (c1 decimal primary key) COMMENT = 'engine "innodb"';
desc t1;
drop table t1;
-create table t1 (c1 year) COMMENT = 'engine "innodb"';
+create table t1 (c1 date primary key) COMMENT = 'engine "innodb"';
desc t1;
drop table t1;
-create table t1 (c1 char(10)) COMMENT = 'engine "innodb"';
+create table t1 (c1 time primary key) COMMENT = 'engine "innodb"';
desc t1;
drop table t1;
-create table t1 (c1 varchar(10)) COMMENT = 'engine "innodb"';
+create table t1 (c1 timestamp primary key) COMMENT = 'engine "innodb"';
desc t1;
drop table t1;
-create table t1 (c1 binary(10)) COMMENT = 'engine "innodb"';
+create table t1 (c1 datetime primary key) COMMENT = 'engine "innodb"';
desc t1;
drop table t1;
-create table t1 (c1 varbinary(10)) COMMENT = 'engine "innodb"';
+create table t1 (c1 year primary key) COMMENT = 'engine "innodb"';
desc t1;
drop table t1;
-create table t1 (c1 tinyblob) COMMENT = 'engine "innodb"';
+create table t1 (c1 char(10) primary key) COMMENT = 'engine "innodb"';
desc t1;
drop table t1;
-create table t1 (c1 blob) COMMENT = 'engine "innodb"';
+create table t1 (c1 varchar(10) primary key) COMMENT = 'engine "innodb"';
desc t1;
drop table t1;
-create table t1 (c1 mediumblob) COMMENT = 'engine "innodb"';
+create table t1 (c1 binary(10) primary key) COMMENT = 'engine "innodb"';
desc t1;
drop table t1;
-create table t1 (c1 longblob) COMMENT = 'engine "innodb"';
+create table t1 (c1 varbinary(10) primary key) COMMENT = 'engine "innodb"';
desc t1;
drop table t1;
-create table t1 (c1 tinytext) COMMENT = 'engine "innodb"';
+create table t1 (c1 enum("yes","no") primary key) COMMENT = 'engine "innodb"';
desc t1;
drop table t1;
-create table t1 (c1 text) COMMENT = 'engine "innodb"';
-desc t1;
-drop table t1;
-create table t1 (c1 mediumtext) COMMENT = 'engine "innodb"';
-desc t1;
-drop table t1;
-create table t1 (c1 longtext) COMMENT = 'engine "innodb"';
-desc t1;
-drop table t1;
-create table t1 (c1 enum("yes","no")) COMMENT = 'engine "innodb"';
-desc t1;
-drop table t1;
-create table t1 (c1 set("A","B","AB","O")) COMMENT = 'engine "innodb"';
+create table t1 (c1 set("A","B","AB","O") primary key) COMMENT = 'engine "innodb"';
desc t1;
drop table t1;
+# error test
+--error 1173
+create table t1 (c1 int) COMMENT = 'engine "innodb"';
+
--source suite/groonga/include/groonga_deinit.inc