diff options
author | unknown <cmiller@zippy.cornsilk.net> | 2008-04-09 12:27:30 -0400 |
---|---|---|
committer | unknown <cmiller@zippy.cornsilk.net> | 2008-04-09 12:27:30 -0400 |
commit | 2bc7179d2d0019fd2b4666de0990faf3f19b9582 (patch) | |
tree | cc737f27b6e9b0186e0c967c48f6c8c4d57ee754 /sql/unireg.h | |
parent | a9e658408fd40ed9485654539b334b92272361c0 (diff) | |
download | mariadb-git-2bc7179d2d0019fd2b4666de0990faf3f19b9582.tar.gz |
Follow-up to B-g#15776, test failures on 64-bit linux.
Make maximum blob size to be 2**32-1, regardless of word size.
Fix failure of timestamp with size of 2**31-1. The method of
rounding up to the nearest even number would overflow.
mysql-test/r/type_blob.result:
2**32-1 is not a special case for timestamp.
Test 2**32-1 and 2**64 as the reliable test points for both 32-
and 64-bit machines. I'd like to test 2**32, but that would make
tests that vary between architectures.
I'd like to generalize the tests by pulling the max blob size from
the server, and then "eval"ing N-1, N, and N+1 instead of all these
literal numbers, but I have not found a way to get UINT_MAX.
mysql-test/t/type_blob.test:
2**32-1 is not a special case for timestamp.
Test 2**32-1 and 2**64 as the reliable test points for both 32-
and 64-bit machines. I'd like to test 2**32, but that would make
tests that vary between architectures.
I'd like to generalize the tests by pulling the max blob size from
the server, and then "eval"ing N-1, N, and N+1 instead of all these
literal numbers, but I have not found a way to get UINT_MAX.
sql/field.cc:
Fix a bug where the round-to-even code for TIMESTAMP fields
failed where the size would overflow the size to zero and then
fail.
Also, since we silently truncate the size of TIMESTAMP fields, set
the maximum size we report is allowable to be the largest parsable
number.
sql/unireg.h:
Make BLOB size the maximum that the packed value in
field_blob::get_length() allows.
Diffstat (limited to 'sql/unireg.h')
-rw-r--r-- | sql/unireg.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/unireg.h b/sql/unireg.h index 0ab2a40048b..24e57b4e584 100644 --- a/sql/unireg.h +++ b/sql/unireg.h @@ -60,7 +60,7 @@ #define MAX_MBWIDTH 3 /* Max multibyte sequence */ #define MAX_FIELD_CHARLENGTH 255 #define MAX_FIELD_VARCHARLENGTH 65535 -#define MAX_FIELD_BLOBLENGTH UINT_MAX +#define MAX_FIELD_BLOBLENGTH UINT_MAX32 /* cf field_blob::get_length() */ #define CONVERT_IF_BIGGER_TO_BLOB 512 /* Used for CREATE ... SELECT */ /* Max column width +1 */ |