summaryrefslogtreecommitdiff
path: root/mysql-test/t/bigint.test
diff options
context:
space:
mode:
authorunknown <sergefp@mysql.com>2005-02-28 23:50:06 +0300
committerunknown <sergefp@mysql.com>2005-02-28 23:50:06 +0300
commit1b3ffb1bcbe182f38741107da8133dfae9471fba (patch)
tree0e0c19f761f6a45105d322f77a07c942cd865319 /mysql-test/t/bigint.test
parent79cdcc7bb323d3da3bf1948f8932aaab88d513f4 (diff)
downloadmariadb-git-1b3ffb1bcbe182f38741107da8133dfae9471fba.tar.gz
Fix for BUG#8562: In Item_int_with_ref::new_item() create Item_int or Item_uint
depending on ref->unsigned_flag. Item_int_with_ref can refer to both signed and unsigned integers. mysql-test/r/bigint.result: Test case for BUG#8562 mysql-test/t/bigint.test: Test case for BUG#8562
Diffstat (limited to 'mysql-test/t/bigint.test')
-rw-r--r--mysql-test/t/bigint.test33
1 files changed, 33 insertions, 0 deletions
diff --git a/mysql-test/t/bigint.test b/mysql-test/t/bigint.test
index c509a4113f4..a26b78254e7 100644
--- a/mysql-test/t/bigint.test
+++ b/mysql-test/t/bigint.test
@@ -71,3 +71,36 @@ drop table t1;
# atof() behaviour is different of different systems. to be fixed in 4.1
SELECT '0x8000000000000001'+0;
+# Test for BUG#8562: joins over BIGINT UNSIGNED value + constant propagation
+create table t1 (
+ value64 bigint unsigned not null,
+ value32 integer not null,
+ primary key(value64, value32)
+);
+
+create table t2 (
+ value64 bigint unsigned not null,
+ value32 integer not null,
+ primary key(value64, value32)
+);
+
+insert into t1 values(17156792991891826145, 1);
+insert into t1 values( 9223372036854775807, 2);
+insert into t2 values(17156792991891826145, 3);
+insert into t2 values( 9223372036854775807, 4);
+
+select * from t1;
+select * from t2;
+
+select * from t1, t2 where t1.value64=17156792991891826145 and
+t2.value64=17156792991891826145;
+select * from t1, t2 where t1.value64=17156792991891826145 and
+t2.value64=t1.value64;
+
+select * from t1, t2 where t1.value64= 9223372036854775807 and
+t2.value64=9223372036854775807;
+select * from t1, t2 where t1.value64= 9223372036854775807 and
+t2.value64=t1.value64;
+
+drop table t1, t2;
+