summaryrefslogtreecommitdiff
path: root/mysql-test/t/select.test
diff options
context:
space:
mode:
authorunknown <ramil/ram@mysql.com/myoffice.izhnet.ru>2006-12-06 16:32:12 +0400
committerunknown <ramil/ram@mysql.com/myoffice.izhnet.ru>2006-12-06 16:32:12 +0400
commit0ce02f6d98b5eb94797a935e06fa89f37a241b52 (patch)
tree62042f84389ad435847995118b308b36d661ab43 /mysql-test/t/select.test
parent4d2665f01e50623d7ccc2535267c26759dcc4d0d (diff)
downloadmariadb-git-0ce02f6d98b5eb94797a935e06fa89f37a241b52.tar.gz
Fix for bug #22533: Traditional: Too-long bit value not rejected.
Problem: storing >=8 byte hexadecimal values we don't check data. Fix: check if the data fits the {u}longlong range. mysql-test/r/select.result: Fix for bug #22533: Traditional: Too-long bit value not rejected. - test result. mysql-test/t/range.test: Fix for bug #22533: Traditional: Too-long bit value not rejected. - adjusted. mysql-test/t/select.test: Fix for bug #22533: Traditional: Too-long bit value not rejected. - test case. sql/item.cc: Fix for bug #22533: Traditional: Too-long bit value not rejected. - limit storing value to {U}LONGLONG_MAX in numeric context.
Diffstat (limited to 'mysql-test/t/select.test')
-rw-r--r--mysql-test/t/select.test13
1 files changed, 12 insertions, 1 deletions
diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test
index 3f9fb59d26f..0dc179e9b4b 100644
--- a/mysql-test/t/select.test
+++ b/mysql-test/t/select.test
@@ -2342,4 +2342,15 @@ select min(key1) from t1 where key1 >= 0.3762 and rand() + 0.5 >= 0.5;
DROP TABLE t1,t2;
--enable_ps_protocol
-# End of 4.1 tests
+#
+# Bug #22533: storing large hex strings
+#
+
+create table t1(a bigint unsigned, b bigint);
+insert into t1 values (0xfffffffffffffffff, 0xfffffffffffffffff),
+ (0x10000000000000000, 0x10000000000000000),
+ (0x8fffffffffffffff, 0x8fffffffffffffff);
+select hex(a), hex(b) from t1;
+drop table t1;
+
+--echo End of 4.1 tests