summaryrefslogtreecommitdiff
path: root/mysql-test/Makefile.am
diff options
context:
space:
mode:
authorSergey Glukhov <sergey.glukhov@oracle.com>2011-04-27 11:35:57 +0400
committerSergey Glukhov <sergey.glukhov@oracle.com>2011-04-27 11:35:57 +0400
commita60c39a2ffc7ec0c0b4ae8bbadf733773ec7557f (patch)
tree1f6c0c4052de0909882757e03e5dd205be533878 /mysql-test/Makefile.am
parentc575254f9d97d8cf4e5aa2bbe3d5264613360b88 (diff)
downloadmariadb-git-a60c39a2ffc7ec0c0b4ae8bbadf733773ec7557f.tar.gz
Bug#11889186 60503: CRASH IN MAKE_DATE_TIME WITH DATE_FORMAT / STR_TO_DATE COMBINATION
calc_daynr() function returns negative result if malformed date with zero year and month is used. Attempt to calculate week day on negative value leads to crash. The fix is return NULL for 'W', 'a', 'w' specifiers if zero year and month is used. Additional fix for calc_daynr(): --added assertion that result can not be negative --return 0 if zero year and month is used mysql-test/r/func_time.result: test case mysql-test/t/func_time.test: test case sql-common/my_time.c: --added assertion that result can not be negative --return 0 if zero year and month is used sql/item_timefunc.cc: eturn NULL for 'W', 'a', 'w' specifiers if zero year and month is used.
Diffstat (limited to 'mysql-test/Makefile.am')
0 files changed, 0 insertions, 0 deletions