diff options
author | unknown <ramil/ram@mysql.com/myoffice.izhnet.ru> | 2006-12-06 16:32:12 +0400 |
---|---|---|
committer | unknown <ramil/ram@mysql.com/myoffice.izhnet.ru> | 2006-12-06 16:32:12 +0400 |
commit | 0ce02f6d98b5eb94797a935e06fa89f37a241b52 (patch) | |
tree | 62042f84389ad435847995118b308b36d661ab43 /mysql-test/r/select.result | |
parent | 4d2665f01e50623d7ccc2535267c26759dcc4d0d (diff) | |
download | mariadb-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/r/select.result')
-rw-r--r-- | mysql-test/r/select.result | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result index f09143fcaa6..6dc971a953c 100644 --- a/mysql-test/r/select.result +++ b/mysql-test/r/select.result @@ -2819,3 +2819,20 @@ select min(key1) from t1 where key1 >= 0.3762 and rand() + 0.5 >= 0.5; min(key1) 0.37619999051094 DROP TABLE t1,t2; +create table t1(a bigint unsigned, b bigint); +insert into t1 values (0xfffffffffffffffff, 0xfffffffffffffffff), +(0x10000000000000000, 0x10000000000000000), +(0x8fffffffffffffff, 0x8fffffffffffffff); +Warnings: +Warning 1264 Data truncated; out of range for column 'a' at row 1 +Warning 1264 Data truncated; out of range for column 'b' at row 1 +Warning 1264 Data truncated; out of range for column 'a' at row 2 +Warning 1264 Data truncated; out of range for column 'b' at row 2 +Warning 1264 Data truncated; out of range for column 'b' at row 3 +select hex(a), hex(b) from t1; +hex(a) hex(b) +FFFFFFFFFFFFFFFF 7FFFFFFFFFFFFFFF +FFFFFFFFFFFFFFFF 7FFFFFFFFFFFFFFF +8FFFFFFFFFFFFFFF 7FFFFFFFFFFFFFFF +drop table t1; +End of 4.1 tests |