Commit d84eb977 authored by David Taylor's avatar David Taylor Committed by Frédéric Buclin

Bug 559539: [Oracle] whine.pl sets run_next incorrectly due to CURRENT_DATE

r/a=LpSolit
parent efa1199a
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment