• Tor Didriksen's avatar
    Bug #50087 Interval arithmetic for Event_queue_element is not portable. · a0f701ec
    Tor Didriksen authored
    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.
    a0f701ec
event_data_objects.cc 43.4 KB