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

r/a=LpSolit


git-svn-id: svn://10.0.0.236/trunk@264159 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mkanat%bugzilla.org
2012-08-26 01:30:56 +00:00
parent 6117329c60
commit a4fa0a4309
2 changed files with 7 additions and 1 deletions

View File

@@ -1 +1 @@
8356
8357

View File

@@ -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;