~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/auto_increment.result

  • Committer: Stewart Smith
  • Date: 2010-08-05 16:41:55 UTC
  • mfrom: (1638.9.13)
  • mto: (1720.1.1 drizzle)
  • mto: This revision was merged to the branch mainline in revision 1721.
  • Revision ID: stewart@flamingspork.com-20100805164155-7olu6iv6rwoxfsne
Merged store-foreign-key-in-table-proto into show-create-table-using-table-message.

Show diffs side-by-side

added added

removed removed

Lines of Context:
169
169
201     4
170
170
203     6
171
171
300     7
172
 
205     8
 
172
301     8
173
173
400     9
174
174
0       10
175
175
401     11
185
185
201     4
186
186
203     6
187
187
300     7
188
 
205     8
 
188
301     8
189
189
400     9
190
190
401     11
191
191
0       12
202
202
201     4
203
203
203     6
204
204
300     7
205
 
205     8
 
205
301     8
206
206
400     9
207
207
401     11
208
208
403     13
222
222
create table t1 (a bigint);
223
223
insert into t1 values (1), (2), (3), (0), (0);
224
224
alter table t1 modify a bigint not null auto_increment primary key;
225
 
ERROR 23000: ALTER TABLE causes auto_increment resequencing, resulting in duplicate entry '0' for key 'PRIMARY'
 
225
ERROR 23000: Duplicate entry '0' for key 'PRIMARY'
226
226
select * from t1;
227
227
a
228
228
1
277
277
KEY (t1_name),
278
278
PRIMARY KEY (t1_id)
279
279
) AUTO_INCREMENT = 1000;
280
 
Warnings:
281
 
Warning 1071    Specified key was too long; max key length is 767 bytes
282
280
INSERT INTO t1 (t1_name) VALUES('MySQL');
283
281
INSERT INTO t1 (t1_name) VALUES('MySQL');
284
282
INSERT INTO t1 (t1_name) VALUES('MySQL');
293
291
  `t1_name` varchar(255) DEFAULT NULL,
294
292
  `t1_id` int NOT NULL AUTO_INCREMENT,
295
293
  PRIMARY KEY (`t1_id`),
296
 
  KEY `t1_name` (`t1_name`(191))
297
 
) ENGINE=InnoDB
 
294
  KEY `t1_name` (`t1_name`)
 
295
) ENGINE=InnoDB COLLATE = utf8_general_ci AUTO_INCREMENT=1000
298
296
DROP TABLE `t1`;
299
297
create table t1(a int not null auto_increment primary key);
300
298
create table t2(a int not null auto_increment primary key, t1a int);