File: type_uint.result

package info (click to toggle)
mariadb-10.0 10.0.25-0%2Bdeb8u1
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 466,160 kB
  • ctags: 182,424
  • sloc: cpp: 1,376,579; ansic: 826,548; perl: 59,653; sh: 36,635; pascal: 32,260; yacc: 14,915; xml: 5,210; sql: 4,660; cs: 4,647; makefile: 4,555; ruby: 4,465; python: 2,282; lex: 1,427; asm: 295; awk: 54; php: 22; sed: 16
file content (53 lines) | stat: -rw-r--r-- 1,260 bytes parent folder | download | duplicates (2)
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
drop table if exists t1;
SET SQL_WARNINGS=1;
create table t1 (this int unsigned);
insert into t1 values (1);
insert into t1 values (-1);
Warnings:
Warning	1264	Out of range value for column 'this' at row 1
insert into t1 values ('5000000000');
Warnings:
Warning	1264	Out of range value for column 'this' at row 1
select * from t1;
this
1
0
4294967295
drop table t1;
#
# Start of 10.0 tests
#
#
# MDEV-6950 Bad results with joins comparing DATE and INT/ENUM/VARCHAR columns
#
CREATE TABLE t1 (a DATE PRIMARY KEY);
INSERT INTO t1 VALUES ('1999-01-01');
CREATE TABLE t2 (a INT UNSIGNED);
INSERT INTO t2 VALUES (19990101);
INSERT INTO t2 VALUES (990101);
SELECT t1.* FROM t1,t2 WHERE t1.a=t2.a;
a
1999-01-01
1999-01-01
SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.a=t2.a;
a
1999-01-01
1999-01-01
ALTER TABLE t2 ADD PRIMARY KEY(a);
SELECT t1.* FROM t1,t2 WHERE t1.a=t2.a;
a
1999-01-01
1999-01-01
SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.a=t2.a;
a
1999-01-01
1999-01-01
# t2 should NOT be eliminated
EXPLAIN SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.a=t2.a;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	system	NULL	NULL	NULL	NULL	1	
1	SIMPLE	t2	index	PRIMARY	PRIMARY	4	NULL	2	Using where; Using index
DROP TABLE t1,t2;
#
# End of 10.0 tests
#