summaryrefslogtreecommitdiff
path: root/mysql-test/t/cast.test
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2005-09-21 17:28:25 +0300
committerunknown <monty@mysql.com>2005-09-21 17:28:25 +0300
commit1d16fa5d866c3875bb8fab818115b15c3cda93f5 (patch)
treedc5185f716f92c9a656e6f55c4d26be78d04c891 /mysql-test/t/cast.test
parent2a5505c7f6e0e41dfe0d85c2d9dd2f5e6eebf222 (diff)
downloadmariadb-git-1d16fa5d866c3875bb8fab818115b15c3cda93f5.tar.gz
Ensure that hex strings are used as integers in cast(... signed/unsigned)
This fixes the new report for bug #7036 mysql-test/t/cast.test: Added test for cast(hex-value to signed/unsigned) sql/item.h: Ensure that hex strings are used as integers in cast(... signed/unsigned)
Diffstat (limited to 'mysql-test/t/cast.test')
-rw-r--r--mysql-test/t/cast.test4
1 files changed, 4 insertions, 0 deletions
diff --git a/mysql-test/t/cast.test b/mysql-test/t/cast.test
index 394971f9648..bb01e8cea83 100644
--- a/mysql-test/t/cast.test
+++ b/mysql-test/t/cast.test
@@ -20,6 +20,10 @@ select CONVERT(DATE "2004-01-22 21:45:33",CHAR);
select CONVERT(DATE "2004-01-22 21:45:33",CHAR(4));
select CONVERT(DATE "2004-01-22 21:45:33",BINARY(4));
select CAST(DATE "2004-01-22 21:45:33" AS BINARY(4));
+select CAST(0xb3 as signed);
+select CAST(0x8fffffffffffffff as signed);
+select CAST(0xffffffffffffffff as unsigned);
+select CAST(0xfffffffffffffffe as signed);
# out-of-range cases
select cast('18446744073709551616' as unsigned);