diff options
author | David Taylor <davidt@yadt.co.uk> | 2012-08-26 03:19:57 +0200 |
---|---|---|
committer | Frédéric Buclin <LpSolit@gmail.com> | 2012-08-26 03:19:57 +0200 |
commit | d84eb9775323c4a3ba52a1f8fe0147cd6d2c32a0 (patch) | |
tree | a1ef713d452acdff23b81ff02178bc8c55e4a22a | |
parent | efa1199a1131ced709bf4ec1f38386104b14e0fa (diff) | |
download | bugzilla-d84eb9775323c4a3ba52a1f8fe0147cd6d2c32a0.tar.gz bugzilla-d84eb9775323c4a3ba52a1f8fe0147cd6d2c32a0.tar.xz |
Bug 559539: [Oracle] whine.pl sets run_next incorrectly due to CURRENT_DATE
r/a=LpSolit
-rw-r--r-- | Bugzilla/DB/Oracle.pm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Bugzilla/DB/Oracle.pm b/Bugzilla/DB/Oracle.pm index 3022e3b34..d7ff08676 100644 --- a/Bugzilla/DB/Oracle.pm +++ b/Bugzilla/DB/Oracle.pm @@ -294,6 +294,9 @@ sub adjust_statement { my $is_select = ($part =~ m/^\s*SELECT\b/io); my $has_from = ($part =~ m/\bFROM\b/io) if $is_select; + # Oracle includes the time in CURRENT_DATE. + $part =~ s/\bCURRENT_DATE\b/TRUNC(CURRENT_DATE)/io; + # Oracle use SUBSTR instead of SUBSTRING $part =~ s/\bSUBSTRING\b/SUBSTR/io; @@ -322,6 +325,9 @@ sub adjust_statement { $has_from = ($nonstring =~ m/\bFROM\b/io) if ($is_select and !$has_from); + # Oracle includes the time in CURRENT_DATE. + $nonstring =~ s/\bCURRENT_DATE\b/TRUNC(CURRENT_DATE)/io; + # Oracle use SUBSTR instead of SUBSTRING $nonstring =~ s/\bSUBSTRING\b/SUBSTR/io; |