• unknown's avatar
    Follow-up to B-g#15776, test failures on 64-bit linux. · 2bc7179d
    unknown authored
    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.
    2bc7179d
field.cc 250 KB