• evgen@moonbone.local's avatar
    Fixed bug#15950: NOW() optimized away in VIEWs · 8364a646
    evgen@moonbone.local authored
    This bug is a side-effect of bug fix #16377. NOW() is optimized in
    BETWEEN to integer constants to speed up query execution. When view is being
    created it saves already modified query and thus becomes wrong.
    
    The agg_cmp_type() function now substitutes constant result DATE/TIME functions 
    for their results only if the current query isn't CREATE VIEW or SHOW CREATE
    VIEW.
    8364a646
view.test 70 KB