summaryrefslogtreecommitdiff
path: root/mysql-test/t/func_op.test
diff options
context:
space:
mode:
authorunknown <ramil@mysql.com>2005-11-06 12:35:49 +0400
committerunknown <ramil@mysql.com>2005-11-06 12:35:49 +0400
commitd1a8ccc12767d31b4353311f71edb14b8a4240d1 (patch)
tree53d260c825548593c1fdd773653a936d61fe83e8 /mysql-test/t/func_op.test
parentfb4c949f57b281a232ea581e26b8c48be6c1d873 (diff)
downloadmariadb-git-d1a8ccc12767d31b4353311f71edb14b8a4240d1.tar.gz
Fix for bug #13044: BIT_COUNT with NULL values.
sql/item_func.cc: Fix for bug #13044: BIT_COUNT with NULL values. Always set null_value.
Diffstat (limited to 'mysql-test/t/func_op.test')
-rw-r--r--mysql-test/t/func_op.test12
1 files changed, 12 insertions, 0 deletions
diff --git a/mysql-test/t/func_op.test b/mysql-test/t/func_op.test
index a312d6ac8c0..ab96caaff82 100644
--- a/mysql-test/t/func_op.test
+++ b/mysql-test/t/func_op.test
@@ -14,3 +14,15 @@ select 1 | -1, 1 ^ -1, 1 & -1;
select 0 | -1, 0 ^ -1, 0 & -1;
select -1 >> 0, -1 << 0;
select -1 >> 1, -1 << 1;
+
+#
+# Bug 13044: wrong bit_count() results
+#
+
+drop table if exists t1,t2;
+create table t1(a int);
+create table t2(a int, b int);
+insert into t1 values (1), (2), (3);
+insert into t2 values (1, 7), (3, 7);
+select t1.a, t2.a, t2.b, bit_count(t2.b) from t1 left join t2 on t1.a=t2.a;
+drop table t1, t2;