File: type_ranges.result

package info (click to toggle)
mysql-8.0 8.0.43-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,273,924 kB
  • sloc: cpp: 4,684,605; ansic: 412,450; pascal: 108,398; java: 83,641; perl: 30,221; cs: 27,067; sql: 26,594; sh: 24,181; python: 21,816; yacc: 17,169; php: 11,522; xml: 7,388; javascript: 7,076; makefile: 2,194; lex: 1,075; awk: 670; asm: 520; objc: 183; ruby: 97; lisp: 86
file content (378 lines) | stat: -rw-r--r-- 22,925 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
drop table if exists t1,t2,t3;
SET SQL_WARNINGS=1;
SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
auto int(5) unsigned NOT NULL auto_increment,
string char(10) default "hello",
tiny tinyint(4) DEFAULT '0' NOT NULL ,
short smallint(6) DEFAULT '1' NOT NULL ,
medium mediumint(8) DEFAULT '0' NOT NULL,
long_int int(11) DEFAULT '0' NOT NULL,
longlong bigint(13) DEFAULT '0' NOT NULL,
real_float float(13,1) DEFAULT 0.0 NOT NULL,
real_double double(16,4),
utiny tinyint(3) unsigned DEFAULT '0' NOT NULL,
ushort smallint(5) unsigned zerofill DEFAULT '00000' NOT NULL,
umedium mediumint(8) unsigned DEFAULT '0' NOT NULL,
ulong int(11) unsigned DEFAULT '0' NOT NULL,
ulonglong bigint(13) unsigned DEFAULT '0' NOT NULL,
time_stamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
date_field date,	
time_field time,	
date_time datetime,
blob_col blob,
tinyblob_col tinyblob,
mediumblob_col mediumblob  not null default '',
longblob_col longblob  not null default '',
options enum('one','two','tree') not null ,
flags set('one','two','tree') not null default '',
PRIMARY KEY (auto),
KEY (utiny),
KEY (tiny),
KEY (short),
KEY any_name (medium),
KEY (longlong),
KEY (real_float),
KEY (ushort),
KEY (umedium),
KEY (ulong),
KEY (ulonglong,ulong),
KEY (options,flags)
);
Warnings:
Warning	1681	Integer display width is deprecated and will be removed in a future release.
Warning	1681	Integer display width is deprecated and will be removed in a future release.
Warning	1681	Integer display width is deprecated and will be removed in a future release.
Warning	1681	Integer display width is deprecated and will be removed in a future release.
Warning	1681	Integer display width is deprecated and will be removed in a future release.
Warning	1681	Integer display width is deprecated and will be removed in a future release.
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warning	1681	Integer display width is deprecated and will be removed in a future release.
Warning	1681	The ZEROFILL attribute is deprecated and will be removed in a future release. Use the LPAD function to zero-pad numbers, or store the formatted numbers in a CHAR column.
Warning	1681	Integer display width is deprecated and will be removed in a future release.
Warning	1681	Integer display width is deprecated and will be removed in a future release.
Warning	1681	Integer display width is deprecated and will be removed in a future release.
Warning	1681	Integer display width is deprecated and will be removed in a future release.
Warning	1101	BLOB, TEXT, GEOMETRY or JSON column 'mediumblob_col' can't have a default value
Warning	1101	BLOB, TEXT, GEOMETRY or JSON column 'longblob_col' can't have a default value
show full fields from t1;
Field	Type	Collation	Null	Key	Default	Extra	Privileges	Comment
auto	int unsigned	NULL	NO	PRI	NULL	auto_increment	select,insert,update,references	
string	char(10)	utf8mb4_0900_ai_ci	YES		hello		select,insert,update,references	
tiny	tinyint	NULL	NO	MUL	0		select,insert,update,references	
short	smallint	NULL	NO	MUL	1		select,insert,update,references	
medium	mediumint	NULL	NO	MUL	0		select,insert,update,references	
long_int	int	NULL	NO		0		select,insert,update,references	
longlong	bigint	NULL	NO	MUL	0		select,insert,update,references	
real_float	float(13,1)	NULL	NO	MUL	0.0		select,insert,update,references	
real_double	double(16,4)	NULL	YES		NULL		select,insert,update,references	
utiny	tinyint unsigned	NULL	NO	MUL	0		select,insert,update,references	
ushort	smallint(5) unsigned zerofill	NULL	NO	MUL	00000		select,insert,update,references	
umedium	mediumint unsigned	NULL	NO	MUL	0		select,insert,update,references	
ulong	int unsigned	NULL	NO	MUL	0		select,insert,update,references	
ulonglong	bigint unsigned	NULL	NO	MUL	0		select,insert,update,references	
time_stamp	timestamp	NULL	NO		CURRENT_TIMESTAMP	DEFAULT_GENERATED on update CURRENT_TIMESTAMP	select,insert,update,references	
date_field	date	NULL	YES		NULL		select,insert,update,references	
time_field	time	NULL	YES		NULL		select,insert,update,references	
date_time	datetime	NULL	YES		NULL		select,insert,update,references	
blob_col	blob	NULL	YES		NULL		select,insert,update,references	
tinyblob_col	tinyblob	NULL	YES		NULL		select,insert,update,references	
mediumblob_col	mediumblob	NULL	NO		NULL		select,insert,update,references	
longblob_col	longblob	NULL	NO		NULL		select,insert,update,references	
options	enum('one','two','tree')	utf8mb4_0900_ai_ci	NO	MUL	NULL		select,insert,update,references	
flags	set('one','two','tree')	utf8mb4_0900_ai_ci	NO				select,insert,update,references	
analyze table t1;
Table	Op	Msg_type	Msg_text
test.t1	analyze	status	OK
show keys from t1;
Table	Non_unique	Key_name	Seq_in_index	Column_name	Collation	Cardinality	Sub_part	Packed	Null	Index_type	Comment	Index_comment	Visible	Expression
t1	0	PRIMARY	1	auto	A	0	NULL	NULL		BTREE			YES	NULL
t1	1	utiny	1	utiny	A	0	NULL	NULL		BTREE			YES	NULL
t1	1	tiny	1	tiny	A	0	NULL	NULL		BTREE			YES	NULL
t1	1	short	1	short	A	0	NULL	NULL		BTREE			YES	NULL
t1	1	any_name	1	medium	A	0	NULL	NULL		BTREE			YES	NULL
t1	1	longlong	1	longlong	A	0	NULL	NULL		BTREE			YES	NULL
t1	1	real_float	1	real_float	A	0	NULL	NULL		BTREE			YES	NULL
t1	1	ushort	1	ushort	A	0	NULL	NULL		BTREE			YES	NULL
t1	1	umedium	1	umedium	A	0	NULL	NULL		BTREE			YES	NULL
t1	1	ulong	1	ulong	A	0	NULL	NULL		BTREE			YES	NULL
t1	1	ulonglong	1	ulonglong	A	0	NULL	NULL		BTREE			YES	NULL
t1	1	ulonglong	2	ulong	A	0	NULL	NULL		BTREE			YES	NULL
t1	1	options	1	options	A	0	NULL	NULL		BTREE			YES	NULL
t1	1	options	2	flags	A	0	NULL	NULL		BTREE			YES	NULL
CREATE UNIQUE INDEX test on t1 ( auto ) ;
CREATE INDEX test2 on t1 ( ulonglong,ulong) ;
Warnings:
Warning	1831	Duplicate index 'test2' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release.
CREATE INDEX test3 on t1 ( medium ) ;
Warnings:
Warning	1831	Duplicate index 'test3' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release.
DROP INDEX test ON t1;
insert into t1 values (10, 1,1,1,1,1,1,1,1,1,1,1,1,1,CURRENT_TIMESTAMP,0,0,0,1,1,1,1,'one','one');
insert into t1 values (NULL,2,2,2,2,2,2,2,2,2,2,2,2,2,CURRENT_TIMESTAMP,NULL,NULL,NULL,NULL,NULL,2,2,'two','two,one');
insert into t1 values (0,1/3,3,3,3,3,3,3,3,3,3,3,3,3,CURRENT_TIMESTAMP,'19970303','10:10:10','19970303101010','','','','3',3,3);
Warnings:
Warning	1265	Data truncated for column 'string' at row 1
insert into t1 values (0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,CURRENT_TIMESTAMP,19970807,080706,19970403090807,-1,-1,-1,'-1',-1,-1);
Warnings:
Warning	1264	Out of range value for column 'utiny' at row 1
Warning	1264	Out of range value for column 'ushort' at row 1
Warning	1264	Out of range value for column 'umedium' at row 1
Warning	1264	Out of range value for column 'ulong' at row 1
Warning	1264	Out of range value for column 'ulonglong' at row 1
Warning	1265	Data truncated for column 'options' at row 1
Warning	1265	Data truncated for column 'flags' at row 1
insert into t1 values (0,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,CURRENT_TIMESTAMP,0,0,0,-4294967295,-4294967295,-4294967295,'-4294967295',0,"one,two,tree");
Warnings:
Warning	1265	Data truncated for column 'string' at row 1
Warning	1264	Out of range value for column 'tiny' at row 1
Warning	1264	Out of range value for column 'short' at row 1
Warning	1264	Out of range value for column 'medium' at row 1
Warning	1264	Out of range value for column 'long_int' at row 1
Warning	1264	Out of range value for column 'utiny' at row 1
Warning	1264	Out of range value for column 'ushort' at row 1
Warning	1264	Out of range value for column 'umedium' at row 1
Warning	1264	Out of range value for column 'ulong' at row 1
Warning	1264	Out of range value for column 'ulonglong' at row 1
Warning	1265	Data truncated for column 'options' at row 1
insert into t1 values (0,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,CURRENT_TIMESTAMP,0,0,0,4294967295,4294967295,4294967295,'4294967295',0,0);
Warnings:
Warning	1264	Out of range value for column 'tiny' at row 1
Warning	1264	Out of range value for column 'short' at row 1
Warning	1264	Out of range value for column 'medium' at row 1
Warning	1264	Out of range value for column 'long_int' at row 1
Warning	1264	Out of range value for column 'utiny' at row 1
Warning	1264	Out of range value for column 'ushort' at row 1
Warning	1264	Out of range value for column 'umedium' at row 1
Warning	1265	Data truncated for column 'options' at row 1
insert into t1 (tiny) values (1);
select auto,string,tiny,short,medium,long_int,longlong,real_float,real_double,utiny,ushort,umedium,ulong,ulonglong,mod(floor(time_stamp/1000000),1000000)-mod(curdate(),1000000),date_field,time_field,date_time,blob_col,tinyblob_col,mediumblob_col,longblob_col from t1;
auto	string	tiny	short	medium	long_int	longlong	real_float	real_double	utiny	ushort	umedium	ulong	ulonglong	mod(floor(time_stamp/1000000),1000000)-mod(curdate(),1000000)	date_field	time_field	date_time	blob_col	tinyblob_col	mediumblob_col	longblob_col
10	1	1	1	1	1	1	1.0	1.0000	1	00001	1	1	1	0	0000-00-00	00:00:00	0000-00-00 00:00:00	1	1	1	1
11	2	2	2	2	2	2	2.0	2.0000	2	00002	2	2	2	0	NULL	NULL	NULL	NULL	NULL	2	2
12	0.33333333	3	3	3	3	3	3.0	3.0000	3	00003	3	3	3	0	1997-03-03	10:10:10	1997-03-03 10:10:10				3
13	-1	-1	-1	-1	-1	-1	-1.0	-1.0000	0	00000	0	0	0	0	1997-08-07	08:07:06	1997-04-03 09:08:07	-1	-1	-1	-1
14	-429496729	-128	-32768	-8388608	-2147483648	-4294967295	-4294967296.0	-4294967295.0000	0	00000	0	0	0	0	0000-00-00	00:00:00	0000-00-00 00:00:00	-4294967295	-4294967295	-4294967295	-4294967295
15	4294967295	127	32767	8388607	2147483647	4294967295	4294967296.0	4294967295.0000	255	65535	16777215	4294967295	4294967295	0	0000-00-00	00:00:00	0000-00-00 00:00:00	4294967295	4294967295	4294967295	4294967295
16	hello	1	1	0	0	0	0.0	NULL	0	00000	0	0	0	0	NULL	NULL	NULL	NULL	NULL		
ALTER TABLE t1
add new_field char(10) default "new" not null,
change blob_col new_blob_col varchar(20),
change date_field date_field char(10),
alter column string set default "newdefault",
alter short drop default,
DROP INDEX utiny,
DROP INDEX ushort,
DROP PRIMARY KEY,
DROP KEY any_name,
ADD INDEX (auto);
LOCK TABLES t1 WRITE;
ALTER TABLE t1 
RENAME as t2,
DROP longblob_col;
UNLOCK TABLES;
ALTER TABLE t2 rename as t3;
LOCK TABLES t3 WRITE ;
ALTER TABLE t3 rename as t1;
UNLOCK TABLES;
select auto,new_field,new_blob_col,date_field from t1 ;
auto	new_field	new_blob_col	date_field
10	new	1	0000-00-00
11	new	NULL	NULL
12	new		1997-03-03
13	new	-1	1997-08-07
14	new	-4294967295	0000-00-00
15	new	4294967295	0000-00-00
16	new	NULL	NULL
CREATE TABLE t2 (
auto int(5) unsigned NOT NULL auto_increment,
string char(20),
mediumblob_col mediumblob not null,
new_field char(2),
PRIMARY KEY (auto)
);
Warnings:
Warning	1681	Integer display width is deprecated and will be removed in a future release.
INSERT INTO t2 (string,mediumblob_col,new_field) SELECT string,mediumblob_col,new_field from t1 where auto > 10;
Warnings:
Warning	1265	Data truncated for column 'new_field' at row 1
Warning	1265	Data truncated for column 'new_field' at row 2
Warning	1265	Data truncated for column 'new_field' at row 3
Warning	1265	Data truncated for column 'new_field' at row 4
Warning	1265	Data truncated for column 'new_field' at row 5
Warning	1265	Data truncated for column 'new_field' at row 6
select * from t2;
auto	string	mediumblob_col	new_field
1	2	2	ne
2	0.33333333		ne
3	-1	-1	ne
4	-429496729	-4294967295	ne
5	4294967295	4294967295	ne
6	hello		ne
select distinct flags from t1;
flags

one
one,two
one,two,tree
select flags from t1 where find_in_set("two",flags)>0;
flags
one,two
one,two
one,two,tree
one,two,tree
select flags from t1 where find_in_set("unknown",flags)>0;
flags
select options,flags from t1 where options="ONE" and flags="ONE";
options	flags
one	one
select options,flags from t1 where options="one" and flags="one";
options	flags
one	one
drop table t2;
create table t2 select * from t1;
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warning	1681	The ZEROFILL attribute is deprecated and will be removed in a future release. Use the LPAD function to zero-pad numbers, or store the formatted numbers in a CHAR column.
update t2 set string="changed" where auto=16;
show full columns from t1;
Field	Type	Collation	Null	Key	Default	Extra	Privileges	Comment
auto	int unsigned	NULL	NO	MUL	NULL	auto_increment	select,insert,update,references	
string	char(10)	utf8mb4_0900_ai_ci	YES		newdefault		select,insert,update,references	
tiny	tinyint	NULL	NO	MUL	0		select,insert,update,references	
short	smallint	NULL	NO	MUL	NULL		select,insert,update,references	
medium	mediumint	NULL	NO	MUL	0		select,insert,update,references	
long_int	int	NULL	NO		0		select,insert,update,references	
longlong	bigint	NULL	NO	MUL	0		select,insert,update,references	
real_float	float(13,1)	NULL	NO	MUL	0.0		select,insert,update,references	
real_double	double(16,4)	NULL	YES		NULL		select,insert,update,references	
utiny	tinyint unsigned	NULL	NO		0		select,insert,update,references	
ushort	smallint(5) unsigned zerofill	NULL	NO		00000		select,insert,update,references	
umedium	mediumint unsigned	NULL	NO	MUL	0		select,insert,update,references	
ulong	int unsigned	NULL	NO	MUL	0		select,insert,update,references	
ulonglong	bigint unsigned	NULL	NO	MUL	0		select,insert,update,references	
time_stamp	timestamp	NULL	NO		CURRENT_TIMESTAMP	DEFAULT_GENERATED on update CURRENT_TIMESTAMP	select,insert,update,references	
date_field	char(10)	utf8mb4_0900_ai_ci	YES		NULL		select,insert,update,references	
time_field	time	NULL	YES		NULL		select,insert,update,references	
date_time	datetime	NULL	YES		NULL		select,insert,update,references	
new_blob_col	varchar(20)	utf8mb4_0900_ai_ci	YES		NULL		select,insert,update,references	
tinyblob_col	tinyblob	NULL	YES		NULL		select,insert,update,references	
mediumblob_col	mediumblob	NULL	NO		NULL		select,insert,update,references	
options	enum('one','two','tree')	utf8mb4_0900_ai_ci	NO	MUL	NULL		select,insert,update,references	
flags	set('one','two','tree')	utf8mb4_0900_ai_ci	NO				select,insert,update,references	
new_field	char(10)	utf8mb4_0900_ai_ci	NO		new		select,insert,update,references	
show full columns from t2;
Field	Type	Collation	Null	Key	Default	Extra	Privileges	Comment
auto	int unsigned	NULL	NO		0		select,insert,update,references	
string	char(10)	utf8mb4_0900_ai_ci	YES		newdefault		select,insert,update,references	
tiny	tinyint	NULL	NO		0		select,insert,update,references	
short	smallint	NULL	NO		NULL		select,insert,update,references	
medium	mediumint	NULL	NO		0		select,insert,update,references	
long_int	int	NULL	NO		0		select,insert,update,references	
longlong	bigint	NULL	NO		0		select,insert,update,references	
real_float	float(13,1)	NULL	NO		0.0		select,insert,update,references	
real_double	double(16,4)	NULL	YES		NULL		select,insert,update,references	
utiny	tinyint unsigned	NULL	NO		0		select,insert,update,references	
ushort	smallint(5) unsigned zerofill	NULL	NO		00000		select,insert,update,references	
umedium	mediumint unsigned	NULL	NO		0		select,insert,update,references	
ulong	int unsigned	NULL	NO		0		select,insert,update,references	
ulonglong	bigint unsigned	NULL	NO		0		select,insert,update,references	
time_stamp	timestamp	NULL	NO		CURRENT_TIMESTAMP	DEFAULT_GENERATED on update CURRENT_TIMESTAMP	select,insert,update,references	
date_field	char(10)	utf8mb4_0900_ai_ci	YES		NULL		select,insert,update,references	
time_field	time	NULL	YES		NULL		select,insert,update,references	
date_time	datetime	NULL	YES		NULL		select,insert,update,references	
new_blob_col	varchar(20)	utf8mb4_0900_ai_ci	YES		NULL		select,insert,update,references	
tinyblob_col	tinyblob	NULL	YES		NULL		select,insert,update,references	
mediumblob_col	mediumblob	NULL	NO		NULL		select,insert,update,references	
options	enum('one','two','tree')	utf8mb4_0900_ai_ci	NO		NULL		select,insert,update,references	
flags	set('one','two','tree')	utf8mb4_0900_ai_ci	NO				select,insert,update,references	
new_field	char(10)	utf8mb4_0900_ai_ci	NO		new		select,insert,update,references	
select t1.auto,t2.auto from t1,t2 where t1.auto=t2.auto and ((t1.string<>t2.string and (t1.string is not null or t2.string is not null)) or (t1.tiny<>t2.tiny and (t1.tiny is not null or t2.tiny is not null)) or (t1.short<>t2.short and (t1.short is not null or t2.short is not null)) or (t1.medium<>t2.medium and (t1.medium is not null or t2.medium is not null)) or (t1.long_int<>t2.long_int and (t1.long_int is not null or t2.long_int is not null)) or (t1.longlong<>t2.longlong and (t1.longlong is not null or t2.longlong is not null)) or (t1.real_float<>t2.real_float and (t1.real_float is not null or t2.real_float is not null)) or (t1.real_double<>t2.real_double and (t1.real_double is not null or t2.real_double is not null)) or (t1.utiny<>t2.utiny and (t1.utiny is not null or t2.utiny is not null)) or (t1.ushort<>t2.ushort and (t1.ushort is not null or t2.ushort is not null)) or (t1.umedium<>t2.umedium and (t1.umedium is not null or t2.umedium is not null)) or (t1.ulong<>t2.ulong and (t1.ulong is not null or t2.ulong is not null)) or (t1.ulonglong<>t2.ulonglong and (t1.ulonglong is not null or t2.ulonglong is not null)) or (t1.time_stamp<>t2.time_stamp and (t1.time_stamp is not null or t2.time_stamp is not null)) or (t1.date_field<>t2.date_field and (t1.date_field is not null or t2.date_field is not null)) or (t1.time_field<>t2.time_field and (t1.time_field is not null or t2.time_field is not null)) or (t1.date_time<>t2.date_time and (t1.date_time is not null or t2.date_time is not null)) or (t1.new_blob_col<>t2.new_blob_col and (t1.new_blob_col is not null or t2.new_blob_col is not null)) or (t1.tinyblob_col<>t2.tinyblob_col and (t1.tinyblob_col is not null or t2.tinyblob_col is not null)) or (t1.mediumblob_col<>t2.mediumblob_col and (t1.mediumblob_col is not null or t2.mediumblob_col is not null)) or (t1.options<>t2.options and (t1.options is not null or t2.options is not null)) or (t1.flags<>t2.flags and (t1.flags is not null or t2.flags is not null)) or (t1.new_field<>t2.new_field and (t1.new_field is not null or t2.new_field is not null)));
auto	auto
16	16
select t1.auto,t2.auto from t1,t2 where t1.auto=t2.auto and not (t1.string<=>t2.string and t1.tiny<=>t2.tiny and t1.short<=>t2.short and t1.medium<=>t2.medium and t1.long_int<=>t2.long_int and t1.longlong<=>t2.longlong and t1.real_float<=>t2.real_float and t1.real_double<=>t2.real_double and t1.utiny<=>t2.utiny and t1.ushort<=>t2.ushort and t1.umedium<=>t2.umedium and t1.ulong<=>t2.ulong and t1.ulonglong<=>t2.ulonglong and t1.time_stamp<=>t2.time_stamp and t1.date_field<=>t2.date_field and t1.time_field<=>t2.time_field and t1.date_time<=>t2.date_time and t1.new_blob_col<=>t2.new_blob_col and t1.tinyblob_col<=>t2.tinyblob_col and t1.mediumblob_col<=>t2.mediumblob_col and t1.options<=>t2.options and t1.flags<=>t2.flags and t1.new_field<=>t2.new_field);
auto	auto
16	16
drop table t2;
create table t2 (primary key (auto)) select auto+1 as auto,1 as t1, 'a' as t2, repeat('a',256) as t3, binary repeat('b',256) as t4, repeat('a',4096) as t5, binary repeat('b',4096) as t6, '' as t7, binary '' as t8 from t1;
Warnings:
Warning	1287	'BINARY expr' is deprecated and will be removed in a future release. Please use CAST instead
Warning	1287	'BINARY expr' is deprecated and will be removed in a future release. Please use CAST instead
Warning	1287	'BINARY expr' is deprecated and will be removed in a future release. Please use CAST instead
show full columns from t2;
Field	Type	Collation	Null	Key	Default	Extra	Privileges	Comment
auto	int unsigned	NULL	NO	PRI	NULL		select,insert,update,references	
t1	int	NULL	NO		0		select,insert,update,references	
t2	varchar(1)	utf8mb4_0900_ai_ci	NO				select,insert,update,references	
t3	varchar(256)	utf8mb4_0900_ai_ci	NO				select,insert,update,references	
t4	blob	NULL	NO		NULL		select,insert,update,references	
t5	text	utf8mb4_0900_ai_ci	NO		NULL		select,insert,update,references	
t6	blob	NULL	NO		NULL		select,insert,update,references	
t7	char(0)	utf8mb4_0900_ai_ci	NO				select,insert,update,references	
t8	binary(0)	NULL	NO				select,insert,update,references	
select t1,t2,length(t3),length(t4),length(t5),length(t6),t7,t8 from t2;
t1	t2	length(t3)	length(t4)	length(t5)	length(t6)	t7	t8
1	a	256	256	4096	4096		
1	a	256	256	4096	4096		
1	a	256	256	4096	4096		
1	a	256	256	4096	4096		
1	a	256	256	4096	4096		
1	a	256	256	4096	4096		
1	a	256	256	4096	4096		
drop table t1,t2;
create table t1 (c int);
insert into t1 values(1),(2);
create table t2 select * from t1;
create table t3 select * from t1, t2;
ERROR 42S21: Duplicate column name 'c'
create table t3 select t1.c AS c1, t2.c AS c2,1 as "const" from t1, t2;
show full columns from t3;
Field	Type	Collation	Null	Key	Default	Extra	Privileges	Comment
c1	int	NULL	YES		NULL		select,insert,update,references	
c2	int	NULL	YES		NULL		select,insert,update,references	
const	int	NULL	NO		0		select,insert,update,references	
drop table t1,t2,t3;
create table t1 ( myfield INT NOT NULL, UNIQUE INDEX (myfield), unique (myfield), index(myfield));
Warnings:
Warning	1831	Duplicate index 'myfield_2' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release.
drop table t1;
create table t1 ( id integer unsigned not null primary key );
create table t2 ( id integer unsigned not null primary key );
insert into t1 values (1), (2);
insert into t2 values (1);
select  t1.id as id_A,  t2.id as id_B from t1 left join t2 using ( id );
id_A	id_B
1	1
2	NULL
select  t1.id as id_A,  t2.id as id_B from t1 left join t2 on (t1.id = t2.id);
id_A	id_B
1	1
2	NULL
create table t3 (id_A integer unsigned not null, id_B integer unsigned null  );
insert into t3 select t1.id as id_A,  t2.id as id_B from t1 left join t2 using ( id );
select * from t3;
id_A	id_B
1	1
2	NULL
truncate table t3;
insert into t3 select t1.id as id_A,  t2.id as id_B from t1 left join t2 on (t1.id = t2.id);
select * from t3;
id_A	id_B
1	1
2	NULL
drop table t3;
create table t3 select t1.id as id_A,  t2.id as id_B from t1 left join t2 using ( id );
select * from t3;
id_A	id_B
1	1
2	NULL
drop table t3;
create table t3 select t1.id as id_A,  t2.id as id_B from t1 left join t2 on (t1.id = t2.id);
select * from t3;
id_A	id_B
1	1
2	NULL
drop table t1,t2,t3;
SET sql_mode = default;