summaryrefslogtreecommitdiff
path: root/mysql-test/t/group_min_max.test
diff options
context:
space:
mode:
authorAlexey Kopytov <Alexey.Kopytov@Sun.com>2010-03-20 23:23:42 +0300
committerAlexey Kopytov <Alexey.Kopytov@Sun.com>2010-03-20 23:23:42 +0300
commit5d407d0c1aa8a7cb5f18a5a26cb517f8b4eb84fa (patch)
tree772f4ae43ad7ce905f024b77bebdd1897d813391 /mysql-test/t/group_min_max.test
parentdaf7f211cd9662ece946544a8dff2b880edfdf82 (diff)
parentad6e00e3b2b9bf26805c90cbd7655c6d2b20cab4 (diff)
downloadmariadb-git-5d407d0c1aa8a7cb5f18a5a26cb517f8b4eb84fa.tar.gz
Manual merge of mysql-5.1-bugteam to mysql-trunk-merge.
Conflicts: Text conflict in mysql-test/r/partition_innodb.result Text conflict in sql/field.h Text conflict in sql/item.h Text conflict in sql/item_cmpfunc.h Text conflict in sql/item_sum.h Text conflict in sql/log_event_old.cc Text conflict in sql/protocol.cc Text conflict in sql/sql_select.cc Text conflict in sql/sql_yacc.yy
Diffstat (limited to 'mysql-test/t/group_min_max.test')
-rw-r--r--mysql-test/t/group_min_max.test31
1 files changed, 31 insertions, 0 deletions
diff --git a/mysql-test/t/group_min_max.test b/mysql-test/t/group_min_max.test
index 81274b04bcd..5701e975569 100644
--- a/mysql-test/t/group_min_max.test
+++ b/mysql-test/t/group_min_max.test
@@ -1054,6 +1054,37 @@ SELECT 1 AS c, b FROM t1 WHERE b IN (1,2) GROUP BY c, b;
SELECT a FROM t1 WHERE b=1;
DROP TABLE t1;
+--echo #
+--echo # Bug#47762: Incorrect result from MIN() when WHERE tests NOT NULL column
+--echo # for NULL
+--echo #
+
+--echo ## Test for NULLs allowed
+CREATE TABLE t1 ( a INT, KEY (a) );
+INSERT INTO t1 VALUES (1), (2), (3);
+--source include/min_null_cond.inc
+INSERT INTO t1 VALUES (NULL), (NULL);
+--source include/min_null_cond.inc
+DROP TABLE t1;
+
+--echo ## Test for NOT NULLs
+CREATE TABLE t1 ( a INT NOT NULL PRIMARY KEY);
+INSERT INTO t1 VALUES (1), (2), (3);
+--echo #
+--echo # NULL-safe operator test disabled for non-NULL indexed columns.
+--echo #
+--echo # See bugs
+--echo #
+--echo # - Bug#52173: Reading NULL value from non-NULL index gives
+--echo # wrong result in embedded server
+--echo #
+--echo # - Bug#52174: Sometimes wrong plan when reading a MAX value from
+--echo # non-NULL index
+--echo #
+--let $skip_null_safe_test= 1
+--source include/min_null_cond.inc
+DROP TABLE t1;
+
--echo End of 5.1 tests