2
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
5
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
7
create table t1 (a int not null auto_increment,b int, primary key (a)) engine=myisam auto_increment=3;
8
insert into t1 values (NULL,1),(NULL,2),(NULL,3);
20
create table t1 (a int not null auto_increment,b int, primary key (a)) engine=myisam;
21
insert into t1 values (1,1),(NULL,2),(3,3),(NULL,4);
22
delete from t1 where b=4;
23
insert into t1 values (NULL,5),(NULL,6);
39
set @@session.auto_increment_increment=100, @@session.auto_increment_offset=10;
40
show variables like "%auto_inc%";
42
auto_increment_increment 100
43
auto_increment_offset 10
44
create table t1 (a int not null auto_increment, primary key (a)) engine=myisam;
45
insert into t1 values (NULL),(5),(NULL);
46
insert into t1 values (250),(NULL);
54
insert into t1 values (1000);
56
insert into t1 values(NULL),(NULL);
78
create table t1 (a int not null auto_increment, primary key (a)) engine=innodb;
79
insert into t1 values (NULL),(5),(NULL);
80
insert into t1 values (250),(NULL);
88
insert into t1 values (1000);
90
insert into t1 values(NULL),(NULL);
112
set @@session.auto_increment_increment=1, @@session.auto_increment_offset=1;
113
create table t1 (a int not null auto_increment, primary key (a)) engine=myisam;
114
insert into t1 values (NULL),(5),(NULL),(NULL);
115
insert into t1 values (500),(NULL),(502),(NULL),(NULL);
128
insert into t1 values(600),(NULL),(NULL);
129
ERROR 23000: Duplicate entry '600' for key 'PRIMARY'
131
insert ignore into t1 values(600),(NULL),(NULL),(610),(NULL);
161
set @@session.auto_increment_increment=10, @@session.auto_increment_offset=1;
162
create table t1 (a int not null auto_increment, primary key (a)) engine=myisam;
163
insert into t1 values(2),(12),(22),(32),(42);
164
insert into t1 values (NULL),(NULL);
165
insert into t1 values (3),(NULL),(NULL);
186
create table t1 (a tinyint not null auto_increment primary key) engine=myisam;
187
insert into t1 values(103);
188
set auto_increment_increment=11;
189
set auto_increment_offset=4;
190
insert into t1 values(null);
191
insert into t1 values(null);
192
insert into t1 values(null);
193
ERROR 23000: Duplicate entry '125' for key 'PRIMARY'
194
select a, mod(a-@@auto_increment_offset,@@auto_increment_increment) from t1 order by a;
195
a mod(a-@@auto_increment_offset,@@auto_increment_increment)
199
create table t2 (a tinyint unsigned not null auto_increment primary key) engine=myisam;
200
set auto_increment_increment=10;
201
set auto_increment_offset=1;
203
insert into t2 values(null);
205
Warning 1264 Out of range value for column 'a' at row 1
206
select a, mod(a-@@auto_increment_offset,@@auto_increment_increment) from t2 order by a;
207
a mod(a-@@auto_increment_offset,@@auto_increment_increment)
209
create table t3 like t1;
210
set auto_increment_increment=1000;
211
set auto_increment_offset=700;
212
insert into t3 values(null);
214
Warning 1264 Out of range value for column 'a' at row 1
215
select * from t3 order by a;
218
select * from t1 order by a;
223
select * from t2 order by a;
226
select * from t3 order by a;
230
set auto_increment_increment=1;
231
set auto_increment_offset=1;
232
CREATE TABLE t1 (id MEDIUMINT NOT NULL AUTO_INCREMENT PRIMARY KEY) ENGINE=innodb;
233
INSERT INTO t1 VALUES (NULL), (NULL), (NULL);
234
show create table t1;
236
t1 CREATE TABLE `t1` (
237
`id` mediumint(9) NOT NULL AUTO_INCREMENT,
239
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1
240
show create table t1;
242
t1 CREATE TABLE `t1` (
243
`id` mediumint(9) NOT NULL AUTO_INCREMENT,
245
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1
248
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
251
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
253
DROP TABLE IF EXISTS t1;
254
DROP TABLE IF EXISTS t2;
255
CREATE TABLE t1 (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY) ENGINE=innodb;
256
CREATE TABLE t2 (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY) ENGINE=myisam;
258
INSERT INTO t1 VALUES(NULL);
259
INSERT INTO t2 VALUES(NULL);
266
INSERT INTO t1 VALUES();
267
INSERT INTO t2 VALUES();
276
INSERT INTO t1 VALUES(0);
277
INSERT INTO t2 VALUES(0);
288
SET SQL_MODE=NO_AUTO_VALUE_ON_ZERO;
289
INSERT INTO t1 VALUES(0);
290
INSERT INTO t2 VALUES(0);
303
INSERT INTO t1 VALUES(4);
304
INSERT INTO t2 VALUES(4);
306
Comparing tables master:test.t1 and slave:test.t1
307
Comparing tables master:test.t2 and slave:test.t2
310
Comparing tables master:test.t1 and slave:test.t1
311
Comparing tables master:test.t2 and slave:test.t2