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/include/min_null_cond.inc | |
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 '')
-rw-r--r-- | mysql-test/include/min_null_cond.inc | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/mysql-test/include/min_null_cond.inc b/mysql-test/include/min_null_cond.inc new file mode 100644 index 00000000..c958fc70 --- /dev/null +++ b/mysql-test/include/min_null_cond.inc @@ -0,0 +1,51 @@ +--replace_column 1 x 2 x 3 x 4 x 5 x 6 x 7 x 8 x 9 x +EXPLAIN +SELECT MIN( a ) FROM t1 WHERE a = NULL; +SELECT MIN( a ) FROM t1 WHERE a = NULL; + +--replace_column 1 x 2 x 3 x 4 x 5 x 6 x 7 x 8 x 9 x +EXPLAIN +SELECT MIN( a ) FROM t1 WHERE a <> NULL; +SELECT MIN( a ) FROM t1 WHERE a <> NULL; + +--replace_column 1 x 2 x 3 x 4 x 5 x 6 x 7 x 8 x 9 x +EXPLAIN +SELECT MIN( a ) FROM t1 WHERE a > NULL; +SELECT MIN( a ) FROM t1 WHERE a > NULL; + +--replace_column 1 x 2 x 3 x 4 x 5 x 6 x 7 x 8 x 9 x +EXPLAIN +SELECT MIN( a ) FROM t1 WHERE a < NULL; +SELECT MIN( a ) FROM t1 WHERE a < NULL; + +if (!$skip_null_safe_test) +{ +--replace_column 1 x 2 x 3 x 4 x 5 x 6 x 7 x 8 x 9 x +EXPLAIN +SELECT MIN( a ) FROM t1 WHERE a <=> NULL; +SELECT MIN( a ) FROM t1 WHERE a <=> NULL; +} +--replace_column 1 x 2 x 3 x 4 x 5 x 6 x 7 x 8 x 9 x +EXPLAIN +SELECT MIN( a ) FROM t1 WHERE a BETWEEN NULL AND 10; +SELECT MIN( a ) FROM t1 WHERE a BETWEEN NULL AND 10; + +--replace_column 1 x 2 x 3 x 4 x 5 x 6 x 7 x 8 x 9 x +EXPLAIN +SELECT MIN( a ) FROM t1 WHERE a BETWEEN NULL AND NULL; +SELECT MIN( a ) FROM t1 WHERE a BETWEEN NULL AND NULL; + +--replace_column 1 x 2 x 3 x 4 x 5 x 6 x 7 x 8 x 9 x +EXPLAIN +SELECT MIN( a ) FROM t1 WHERE a BETWEEN 10 AND NULL; +SELECT MIN( a ) FROM t1 WHERE a BETWEEN 10 AND NULL; + +--replace_column 1 x 2 x 3 x 4 x 5 x 6 x 7 x 8 x 9 x +EXPLAIN +SELECT MIN( a ) FROM t1 WHERE a = (SELECT a FROM t1 WHERE a < 0); +SELECT MIN( a ) FROM t1 WHERE a = (SELECT a FROM t1 WHERE a < 0); + +--replace_column 1 x 2 x 3 x 4 x 5 x 6 x 7 x 8 x 9 x +EXPLAIN +SELECT MIN( a ) FROM t1 WHERE a IS NULL; +SELECT MIN( a ) FROM t1 WHERE a IS NULL; |