File: odbc.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 (71 lines) | stat: -rw-r--r-- 1,927 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
drop table if exists t1;
set @@session.sql_auto_is_null=1;
select {fn length("hello")}, { date "1997-10-20" };
{fn length("hello")}	1997-10-20
5	1997-10-20
create table t1 (a int not null auto_increment,b int not null,primary key (a,b));
insert into t1 SET A=NULL,B=1;
insert into t1 SET a=null,b=2;
select * from t1 where a is null and b=2;
a	b
select * from t1 where a is null;
a	b
2	2
analyze table t1;
Table	Op	Msg_type	Msg_text
test.t1	analyze	status	OK
explain select * from t1 where b is null;
id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	filtered	Extra
1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Impossible WHERE
Warnings:
Note	1003	/* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where false
drop table t1;
CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY);
INSERT INTO t1 VALUES (NULL);
SELECT a, last_insert_id() FROM t1 WHERE a IS NULL;
a	last_insert_id()
1	1
SELECT a, last_insert_id() FROM t1 WHERE a IS NULL;
a	last_insert_id()
1	1
SELECT a, last_insert_id() FROM t1;
a	last_insert_id()
1	1
DROP TABLE t1;
#
# Bug#29171668: ODBC SUBSTITUTION FOR LAST_INSERT_ID() TRIGGERS
#               A NON-DETERMINISTIC TRANSFORMATION
#
CREATE TABLE t1(a BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY);
CREATE TABLE t2(b INT);
INSERT INTO t2 VALUES (2),(3),(4);
INSERT INTO t1 VALUES ();
SELECT * FROM t2 LEFT JOIN t1 ON a=b WHERE a IS NULL;
b	a
2	NULL
3	NULL
4	NULL
INSERT INTO t1 VALUES ();
SELECT * FROM t2 LEFT JOIN t1 ON a=b WHERE a IS NULL;
b	a
3	NULL
4	NULL
INSERT INTO t1 VALUES ();
SELECT * FROM t1 HAVING a IS NULL;
a
SELECT a, a IS NULL FROM t1 WHERE a IS NULL;
a	a IS NULL
3	0
SELECT * FROM t1 WHERE a IS NULL;
a
3
SELECT * FROM t1 WHERE a IS NULL;
a
3
INSERT INTO t1 VALUES (9223372036854775807);
INSERT INTO t1 VALUES ();
SELECT * FROM t1 WHERE a IS NULL;
a
9223372036854775808
DROP TABLE t1, t2;
set @@session.sql_auto_is_null=default;