• unknown's avatar
    Fixed bug #32034: On 64bit platforms assigning values of · 69762c05
    unknown authored
    storage engine system variables was not validated and
    unexpected value was assigned.
    
    The check_func_enum function used subtraction from the uint
    value with the probably negative result. That result of
    type uint was compared with 0 after casting to signed long
    type. On architectures where long type is longer than int
    type the result of comparison was unexpected.
    
    
    storage/example/ha_example.cc:
      Fixed bug #32034.
      Sample system variable example_enum_var has been added to the
      EXAMPLE storage to test ENUM variables.
    sql/sql_plugin.cc:
      Fixed bug #32034.
      The check_func_enum function used subtraction from the uint
      value with the probably negative result. That result of
      type uint was compared with 0 after casting to signed long
      type. On architectures where long type is longer than int
      type the result of comparison was unexpected.
      
      uint value has been casted to long type before subtraction.
    mysql-test/t/plugin.test:
      Added test case for bug #32034.
    mysql-test/r/plugin.result:
      Added test case for bug #32034.
    69762c05
ha_example.cc 25.5 KB