~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/auto_increment.test

  • Committer: Mark Atwood
  • Date: 2008-10-16 11:33:16 UTC
  • mto: (520.1.13 drizzle)
  • mto: This revision was merged to the branch mainline in revision 530.
  • Revision ID: mark@fallenpegasus.com-20081016113316-ff6jdt31ck90sjdh
an implemention of the errmsg plugin

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
drop table t1;
25
25
 
26
26
create table t1 (
27
 
  skey tinyint unsigned NOT NULL auto_increment PRIMARY KEY,
 
27
  skey int NOT NULL auto_increment PRIMARY KEY,
28
28
  sval char(20)
29
29
);
30
30
insert into t1 values (NULL, "hello");
96
96
#
97
97
# last_insert_id() madness
98
98
#
99
 
create table t1 (i tinyint unsigned not null auto_increment primary key);
 
99
create table t1 (i int not null auto_increment primary key);
100
100
insert into t1 set i = 254;
101
101
insert into t1 set i = null;
102
102
select last_insert_id();
109
109
select last_insert_id();
110
110
drop table t1;
111
111
 
112
 
create table t1 (i tinyint unsigned not null auto_increment, key (i));
 
112
create table t1 (i int not null auto_increment, key (i));
113
113
insert into t1 set i = 254;
114
114
insert into t1 set i = null;
115
115
select last_insert_id();
117
117
select last_insert_id();
118
118
drop table t1;
119
119
 
120
 
create table t1 (i tinyint unsigned not null auto_increment primary key, b int, unique (b));
 
120
create table t1 (i int not null auto_increment primary key, b int, unique (b));
121
121
insert into t1 values (NULL, 10);
122
122
select last_insert_id();
123
123
insert into t1 values (NULL, 15);
225
225
 
226
226
CREATE TABLE `t1` (
227
227
    t1_name VARCHAR(255) DEFAULT NULL,
228
 
    t1_id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
 
228
    t1_id INT(10) NOT NULL AUTO_INCREMENT,
229
229
    KEY (t1_name),
230
230
    PRIMARY KEY (t1_id)
231
231
) AUTO_INCREMENT = 1000;