-
unknown authored
It was a forgotten ltime->neg=0 (neg was the only forgotten variable). I scanned field.cc for other places where we would forget to set neg, found none. A test for the bug. mysql-test/r/date_formats.result: result update mysql-test/t/date_formats.test: a test for BUG#1960 "date_format() returns spurious '-' for valid dates" sql/field.cc: When preparing ltime from the 3-byte date, don't forget to set ltime->neg to 0 (otherwise it remains unitialized). Dates are not allowed to be negative (only times can be, when they mean a time interval), so it's ok to always set neg to 0.
e8b6da43