[Koha-bugs] [Bug 7802] A MySQLism is used to get the current date.

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Nov 7 10:08:14 CET 2013


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7802

--- Comment #23 from Jonathan Druart <jonathan.druart at biblibre.com> ---
(In reply to M. de Rooy from comment #22)
> I see the following change:
> 
> -          AND reserves.reservedate <= DATE_ADD(NOW(),INTERVAL ? DAY)
> +          AND reserves.reservedate <= CAST(now() AS date)
> 
> Fixing a so detested mysqlism should at least preserve functionality. These
> changes seem to be made in a hurry, since we are changing functionality here.

No, not the changes, but the rebase yes. Only the last patch introduces this
bad conflict merge. I consider after 3 rebase and 1 year, the rebase is not
safe at all, there is here a good example...

> Here you change a date_add with just a now. The parameter for adding a
> number of days is just ignored. This change was a red traffic light for me
> :) I did not look any further..
> 
> Please correct and add a (more detailed) test plan for this patch.

There is no valid test plan. Check that the CUR_DATE(), CURRENT_DATE() mysql
functions return the same as CAST(NOW() AS DATE) in your mysql cli.
Your can verify, looking at the diff code, the patch is correct. If you want to
test, you can play with reserves and holds queue.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list