1set default_storage_engine='tokudb';
2drop table if exists t;
3set sql_mode=traditional;
4create table t (id tinyint unsigned not null auto_increment, key(id));
5insert into t set id=0xf8;
6show warnings;
7Level	Code	Message
8select * from t;
9id
10248
11select last_insert_id() from t limit 1;
12last_insert_id()
130
14insert into t set id=null;
15show warnings;
16Level	Code	Message
17select * from t;
18id
19248
20249
21select last_insert_id() from t limit 1;
22last_insert_id()
23249
24insert into t set id=null;
25show warnings;
26Level	Code	Message
27select * from t;
28id
29248
30249
31250
32select last_insert_id() from t limit 1;
33last_insert_id()
34250
35insert into t set id=null;
36show warnings;
37Level	Code	Message
38select * from t;
39id
40248
41249
42250
43251
44select last_insert_id() from t limit 1;
45last_insert_id()
46251
47insert into t set id=null;
48show warnings;
49Level	Code	Message
50select * from t;
51id
52248
53249
54250
55251
56252
57select last_insert_id() from t limit 1;
58last_insert_id()
59252
60insert into t set id=null;
61show warnings;
62Level	Code	Message
63select * from t;
64id
65248
66249
67250
68251
69252
70253
71select last_insert_id() from t limit 1;
72last_insert_id()
73253
74insert into t set id=null;
75show warnings;
76Level	Code	Message
77select * from t;
78id
79248
80249
81250
82251
83252
84253
85254
86select last_insert_id() from t limit 1;
87last_insert_id()
88254
89insert into t set id=null;
90show warnings;
91Level	Code	Message
92select * from t;
93id
94248
95249
96250
97251
98252
99253
100254
101255
102select last_insert_id() from t limit 1;
103last_insert_id()
104255
105insert into t set id=null;
106Got one of the listed errors
107select last_insert_id() from t limit 1;
108last_insert_id()
109255
110insert into t set id=null;
111Got one of the listed errors
112select last_insert_id() from t limit 1;
113last_insert_id()
114255
115insert into t set id=null;
116Got one of the listed errors
117select last_insert_id() from t limit 1;
118last_insert_id()
119255
120drop table t;
121create table t (id smallint unsigned not null auto_increment, key(id));
122insert into t set id=0xfff8;
123show warnings;
124Level	Code	Message
125select * from t;
126id
12765528
128select last_insert_id() from t limit 1;
129last_insert_id()
130255
131insert into t set id=null;
132show warnings;
133Level	Code	Message
134select * from t;
135id
13665528
13765529
138select last_insert_id() from t limit 1;
139last_insert_id()
14065529
141insert into t set id=null;
142show warnings;
143Level	Code	Message
144select * from t;
145id
14665528
14765529
14865530
149select last_insert_id() from t limit 1;
150last_insert_id()
15165530
152insert into t set id=null;
153show warnings;
154Level	Code	Message
155select * from t;
156id
15765528
15865529
15965530
16065531
161select last_insert_id() from t limit 1;
162last_insert_id()
16365531
164insert into t set id=null;
165show warnings;
166Level	Code	Message
167select * from t;
168id
16965528
17065529
17165530
17265531
17365532
174select last_insert_id() from t limit 1;
175last_insert_id()
17665532
177insert into t set id=null;
178show warnings;
179Level	Code	Message
180select * from t;
181id
18265528
18365529
18465530
18565531
18665532
18765533
188select last_insert_id() from t limit 1;
189last_insert_id()
19065533
191insert into t set id=null;
192show warnings;
193Level	Code	Message
194select * from t;
195id
19665528
19765529
19865530
19965531
20065532
20165533
20265534
203select last_insert_id() from t limit 1;
204last_insert_id()
20565534
206insert into t set id=null;
207show warnings;
208Level	Code	Message
209select * from t;
210id
21165528
21265529
21365530
21465531
21565532
21665533
21765534
21865535
219select last_insert_id() from t limit 1;
220last_insert_id()
22165535
222insert into t set id=null;
223Got one of the listed errors
224select last_insert_id() from t limit 1;
225last_insert_id()
22665535
227insert into t set id=null;
228Got one of the listed errors
229select last_insert_id() from t limit 1;
230last_insert_id()
23165535
232insert into t set id=null;
233Got one of the listed errors
234select last_insert_id() from t limit 1;
235last_insert_id()
23665535
237drop table t;
238create table t (id int unsigned not null auto_increment, key(id));
239insert into t set id=0xfffffff8;
240show warnings;
241Level	Code	Message
242select * from t;
243id
2444294967288
245select last_insert_id() from t limit 1;
246last_insert_id()
24765535
248insert into t set id=null;
249show warnings;
250Level	Code	Message
251select * from t;
252id
2534294967288
2544294967289
255select last_insert_id() from t limit 1;
256last_insert_id()
2574294967289
258insert into t set id=null;
259show warnings;
260Level	Code	Message
261select * from t;
262id
2634294967288
2644294967289
2654294967290
266select last_insert_id() from t limit 1;
267last_insert_id()
2684294967290
269insert into t set id=null;
270show warnings;
271Level	Code	Message
272select * from t;
273id
2744294967288
2754294967289
2764294967290
2774294967291
278select last_insert_id() from t limit 1;
279last_insert_id()
2804294967291
281insert into t set id=null;
282show warnings;
283Level	Code	Message
284select * from t;
285id
2864294967288
2874294967289
2884294967290
2894294967291
2904294967292
291select last_insert_id() from t limit 1;
292last_insert_id()
2934294967292
294insert into t set id=null;
295show warnings;
296Level	Code	Message
297select * from t;
298id
2994294967288
3004294967289
3014294967290
3024294967291
3034294967292
3044294967293
305select last_insert_id() from t limit 1;
306last_insert_id()
3074294967293
308insert into t set id=null;
309show warnings;
310Level	Code	Message
311select * from t;
312id
3134294967288
3144294967289
3154294967290
3164294967291
3174294967292
3184294967293
3194294967294
320select last_insert_id() from t limit 1;
321last_insert_id()
3224294967294
323insert into t set id=null;
324show warnings;
325Level	Code	Message
326select * from t;
327id
3284294967288
3294294967289
3304294967290
3314294967291
3324294967292
3334294967293
3344294967294
3354294967295
336select last_insert_id() from t limit 1;
337last_insert_id()
3384294967295
339insert into t set id=null;
340Got one of the listed errors
341select last_insert_id() from t limit 1;
342last_insert_id()
3434294967295
344insert into t set id=null;
345Got one of the listed errors
346select last_insert_id() from t limit 1;
347last_insert_id()
3484294967295
349insert into t set id=null;
350Got one of the listed errors
351select last_insert_id() from t limit 1;
352last_insert_id()
3534294967295
354drop table t;
355create table t (id bigint unsigned not null auto_increment, key(id));
356insert into t set id=0xfffffffffffffff8;
357show warnings;
358Level	Code	Message
359select * from t;
360id
36118446744073709551608
362select last_insert_id() from t limit 1;
363last_insert_id()
3644294967295
365insert into t set id=null;
366show warnings;
367Level	Code	Message
368select * from t;
369id
37018446744073709551608
37118446744073709551609
372select last_insert_id() from t limit 1;
373last_insert_id()
37418446744073709551609
375insert into t set id=null;
376show warnings;
377Level	Code	Message
378select * from t;
379id
38018446744073709551608
38118446744073709551609
38218446744073709551610
383select last_insert_id() from t limit 1;
384last_insert_id()
38518446744073709551610
386insert into t set id=null;
387show warnings;
388Level	Code	Message
389select * from t;
390id
39118446744073709551608
39218446744073709551609
39318446744073709551610
39418446744073709551611
395select last_insert_id() from t limit 1;
396last_insert_id()
39718446744073709551611
398insert into t set id=null;
399show warnings;
400Level	Code	Message
401select * from t;
402id
40318446744073709551608
40418446744073709551609
40518446744073709551610
40618446744073709551611
40718446744073709551612
408select last_insert_id() from t limit 1;
409last_insert_id()
41018446744073709551612
411insert into t set id=null;
412show warnings;
413Level	Code	Message
414select * from t;
415id
41618446744073709551608
41718446744073709551609
41818446744073709551610
41918446744073709551611
42018446744073709551612
42118446744073709551613
422select last_insert_id() from t limit 1;
423last_insert_id()
42418446744073709551613
425insert into t set id=null;
426show warnings;
427Level	Code	Message
428select * from t;
429id
43018446744073709551608
43118446744073709551609
43218446744073709551610
43318446744073709551611
43418446744073709551612
43518446744073709551613
43618446744073709551614
437select last_insert_id() from t limit 1;
438last_insert_id()
43918446744073709551614
440insert into t set id=null;
441Got one of the listed errors
442select last_insert_id() from t limit 1;
443last_insert_id()
44418446744073709551614
445insert into t set id=null;
446Got one of the listed errors
447select last_insert_id() from t limit 1;
448last_insert_id()
44918446744073709551614
450insert into t set id=null;
451Got one of the listed errors
452select last_insert_id() from t limit 1;
453last_insert_id()
45418446744073709551614
455drop table t;
456