Skip to content

Commit

Permalink
Fix Oracle buffer allocation issue.
Browse files Browse the repository at this point in the history
Hopefully, at least. Closes #316.
  • Loading branch information
theory committed Sep 24, 2018
1 parent 9ac2f8f commit e0d4ccb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions Changes
Expand Up @@ -30,6 +30,9 @@ Revision history for Perl extension App::Sqitch
violation. Thanks to Eric Bréchemier for the suggestion (#344).
- Moved the project to its own GitHub organization:
https://github.com/sqitchers.
- Fixed likely cause of Oracle buffer allocation bug when selecting
timestamp strings. Thanks to @johannwilfling for the bug report and to
@nmaqsudov for the analysis and solution (#316).

0.9997 2018-03-15T21:13:52Z
- Fixed the Firebird engine to properly detect multiple instances of a
Expand Down
2 changes: 1 addition & 1 deletion lib/App/Sqitch/Engine/oracle.pm
Expand Up @@ -136,7 +136,7 @@ sub _log_conflicts_param {
}

sub _ts2char_format {
q{CAST(to_char(%1$s AT TIME ZONE 'UTC', '"year":YYYY:"month":MM:"day":DD') || to_char(%1$s AT TIME ZONE 'UTC', ':"hour":HH24:"minute":MI:"second":SS:"time_zone":"UTC"') AS VARCHAR2(92 char))}
q{CAST(to_char(%1$s AT TIME ZONE 'UTC', '"year":YYYY:"month":MM:"day":DD') AS VARCHAR2(100 byte)) || CAST(to_char(%1$s AT TIME ZONE 'UTC', ':"hour":HH24:"minute":MI:"second":SS:"time_zone":"UTC"') AS VARCHAR2(168 byte))}
}

sub _ts_default { 'current_timestamp' }
Expand Down
2 changes: 1 addition & 1 deletion t/oracle.t
Expand Up @@ -428,7 +428,7 @@ $mock_ora->unmock_all;
# Test DateTime formatting stuff.
ok my $ts2char = $CLASS->can('_ts2char_format'), "$CLASS->can('_ts2char_format')";
is sprintf($ts2char->(), 'foo'),
q{CAST(to_char(foo AT TIME ZONE 'UTC', '"year":YYYY:"month":MM:"day":DD') || to_char(foo AT TIME ZONE 'UTC', ':"hour":HH24:"minute":MI:"second":SS:"time_zone":"UTC"') AS VARCHAR2(92 char))},
q{CAST(to_char(foo AT TIME ZONE 'UTC', '"year":YYYY:"month":MM:"day":DD') AS VARCHAR2(100 byte)) || CAST(to_char(foo AT TIME ZONE 'UTC', ':"hour":HH24:"minute":MI:"second":SS:"time_zone":"UTC"') AS VARCHAR2(168 byte))},
'_ts2char_format should work';

ok my $dtfunc = $CLASS->can('_dt'), "$CLASS->can('_dt')";
Expand Down

0 comments on commit e0d4ccb

Please sign in to comment.