• Tor Didriksen's avatar
    Backport from next-mr-bugfixing of tor.didriksen@sun.com-20100106140051-3j2iuag63eltsr2e · 5539f5cc
    Tor Didriksen authored
    Bug #50087 Interval arithmetic for Event_queue_element is not portable.
    
    Subtraction of two unsigned months yielded a (very large) positive value.
    Conversion of this to a signed value was not necessarily well defined.
                  
    Solution: do the subtraction on signed values.
    
    
    
    mysql-test/r/events_scheduling.result:
      Add test case.
    mysql-test/t/events_scheduling.test:
      Add test case.
    sql/event_data_objects.cc:
      Convert month to signed before doing the subtraction.
    5539f5cc
event_data_objects.cc 43.3 KB