• Tor Didriksen's avatar
    Bug #59241 invalid memory read in do_div_mod with doubly assigned variables · 7bf23403
    Tor Didriksen authored
    Fix: copy my_decimal by value, to avoid dangling pointers.
    
    
    mysql-test/r/func_math.result:
      New test case.
    mysql-test/t/func_math.test:
      New test case.
    sql/item_cmpfunc.cc:
      No need to call fix_buffer_pointer() anymore.
    sql/item_func.cc:
      Copy my_decimal by value, to avoid dangling pointers.
    sql/my_decimal.h:
      Implement proper copy constructor and assignment operator for my_decimal.
    sql/sql_analyse.cc:
      No need to call fix_buffer_pointer() anymore.
    strings/decimal.c:
      Remove #line directive: it messes up TAGS and it confuses gdb when debugging.
    7bf23403
item_cmpfunc.cc 145 KB