diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:00:34 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:00:34 +0000 |
commit | 3f619478f796eddbba6e39502fe941b285dd97b1 (patch) | |
tree | e2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/main/odbc.result | |
parent | Initial commit. (diff) | |
download | mariadb-3f619478f796eddbba6e39502fe941b285dd97b1.tar.xz mariadb-3f619478f796eddbba6e39502fe941b285dd97b1.zip |
Adding upstream version 1:10.11.6.upstream/1%10.11.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/main/odbc.result')
-rw-r--r-- | mysql-test/main/odbc.result | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/mysql-test/main/odbc.result b/mysql-test/main/odbc.result new file mode 100644 index 00000000..3dbac12c --- /dev/null +++ b/mysql-test/main/odbc.result @@ -0,0 +1,29 @@ +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 +explain select * from t1 where b is null; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +drop table t1; +CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY); +INSERT INTO t1 VALUES (NULL); +SELECT sql_no_cache a, last_insert_id() FROM t1 WHERE a IS NULL; +a last_insert_id() +1 1 +SELECT sql_no_cache a, last_insert_id() FROM t1 WHERE a IS NULL; +a last_insert_id() +SELECT sql_no_cache a, last_insert_id() FROM t1; +a last_insert_id() +1 1 +DROP TABLE t1; +set @@session.sql_auto_is_null=default; |