summaryrefslogtreecommitdiff
path: root/mysql-test/t
diff options
context:
space:
mode:
authorunknown <sergefp@mysql.com>2005-09-21 02:20:55 +0400
committerunknown <sergefp@mysql.com>2005-09-21 02:20:55 +0400
commit458a4234e4ce764fdc40de8c46bee2a198151fb7 (patch)
tree228be631b98f515cc5b9de76fce599e486857534 /mysql-test/t
parent1818ff1c22b0a9f8029f8fd2f92f4c3296031445 (diff)
parenta2a8216b2061de4cf0c417362aa9436787cca3cb (diff)
downloadmariadb-git-458a4234e4ce764fdc40de8c46bee2a198151fb7.tar.gz
Merge mysql.com:/home/psergey/bk-trees/mysql-4.1
into mysql.com:/home/psergey/mysql-4.1-csc6030-r3 sql/mysqld.cc: Auto merged
Diffstat (limited to 'mysql-test/t')
-rw-r--r--mysql-test/t/myisam.test47
1 files changed, 47 insertions, 0 deletions
diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test
index 83e9e1ba7d2..dc40ecc2dd4 100644
--- a/mysql-test/t/myisam.test
+++ b/mysql-test/t/myisam.test
@@ -590,4 +590,51 @@ checksum table t1;
checksum table t2;
drop table t1, t2;
+# BUG#12232: New myisam_stats_method variable.
+show variables like 'myisam_stats_method';
+
+create table t1 (a int, key(a));
+insert into t1 values (0),(1),(2),(3),(4);
+insert into t1 select NULL from t1;
+
+# default: NULLs considered inequal
+analyze table t1;
+show index from t1;
+insert into t1 values (11);
+delete from t1 where a=11;
+check table t1;
+show index from t1;
+
+# Set nulls to be equal:
+set myisam_stats_method=nulls_equal;
+show variables like 'myisam_stats_method';
+insert into t1 values (11);
+delete from t1 where a=11;
+
+analyze table t1;
+show index from t1;
+
+insert into t1 values (11);
+delete from t1 where a=11;
+
+check table t1;
+show index from t1;
+
+# Set nulls back to be equal
+set myisam_stats_method=DEFAULT;
+show variables like 'myisam_stats_method';
+insert into t1 values (11);
+delete from t1 where a=11;
+
+analyze table t1;
+show index from t1;
+
+insert into t1 values (11);
+delete from t1 where a=11;
+
+check table t1;
+show index from t1;
+
+drop table t1;
+
# End of 4.1 tests