The problem came in two steps.
revno: 3636
revision-id: sergii@pisem.net-20130317064122-vc1e8ytrrs5jku3g
fixes bug: https://mariadb.atlassian.net/browse/MDEV-4281
branch nick: 5.3
MDEV-4281 Assertion `maybe_null && item->null_value' fails in make_sortkey on CASE with different return types, GROUP_CONCAT, GROUP BY
revno: 3665
revision-id: sergii@pisem.net-20130703074620-23eo2cve9hvm0xi8
fixes bug: https://mariadb.atlassian.net/browse/MDEV-4667
committer: Sergei Golubchik <sergii@pisem.net>
branch nick: 5.3
MDEV-4667 DATE('string') incompability between mysql and mariadb
Until the revision 3636, it worked all right – date("0") returned NULL, h1d was set to date(now()), and comparison returned false:
h0d h1d compare_h0_gt_h1
2011-11-07 2013-07-23 0
Warnings:
Warning 1292 Incorrect datetime value: '0'
Warning 1292 Incorrect datetime value: '0'
select date("0");
date("0")
NULL
Since revno 3636 and until revision 3635, date("0") returned "0000-00-00", and consequently the comparison returned true:
h0d h1d compare_h0_gt_h1
2011-11-07 0000-00-00 1
Warnings:
Warning 1292 Incorrect datetime value: '0'
Warning 1292 Incorrect datetime value: '0'
select date("0");
date("0")
0000-00-00
Starting with revno 3665, date("0") returns NULL again, and h1d is date(now()) again, but comparison result remains true:
h0d h1d compare_h0_gt_h1
2011-11-07 2013-07-23 1
Warnings:
Warning 1292 Incorrect datetime value: '0'
Warning 1292 Incorrect datetime value: '0'
select date("0");
date("0")
NULL
The problem came in two steps.
revno: 3636
revision-id: sergii@pisem.net-20130317064122-vc1e8ytrrs5jku3g
fixes bug: https://mariadb.atlassian.net/browse/MDEV-4281
branch nick: 5.3
MDEV-4281Assertion `maybe_null && item->null_value' fails in make_sortkey on CASE with different return types, GROUP_CONCAT, GROUP BYrevno: 3665
revision-id: sergii@pisem.net-20130703074620-23eo2cve9hvm0xi8
fixes bug: https://mariadb.atlassian.net/browse/MDEV-4667
committer: Sergei Golubchik <sergii@pisem.net>
branch nick: 5.3
MDEV-4667DATE('string') incompability between mysql and mariadbUntil the revision 3636, it worked all right – date("0") returned NULL, h1d was set to date(now()), and comparison returned false:
h0d h1d compare_h0_gt_h1
2011-11-07 2013-07-23 0
Warnings:
Warning 1292 Incorrect datetime value: '0'
Warning 1292 Incorrect datetime value: '0'
select date("0");
date("0")
NULL
Since revno 3636 and until revision 3635, date("0") returned "0000-00-00", and consequently the comparison returned true:
h0d h1d compare_h0_gt_h1
2011-11-07 0000-00-00 1
Warnings:
Warning 1292 Incorrect datetime value: '0'
Warning 1292 Incorrect datetime value: '0'
select date("0");
date("0")
0000-00-00
Starting with revno 3665, date("0") returns NULL again, and h1d is date(now()) again, but comparison result remains true:
h0d h1d compare_h0_gt_h1
2011-11-07 2013-07-23 1
Warnings:
Warning 1292 Incorrect datetime value: '0'
Warning 1292 Incorrect datetime value: '0'
select date("0");
date("0")
NULL