[Dbix-class] Fwd: Sybase identity column value not being retrieved during create()

Phillip Moore w.phillip.moore at gmail.com
Wed Jan 9 20:03:02 GMT 2013


Quite the opposite -- that patch makes the test suite fail:

t/746sybase.t .................................... 1/?
ct_result(ct_dynamic(CS_PREPARE)) returned -205 at
/usr/efs/lib/perl5/DBD/Sybase.pm line\
 138.
DBIx::Class::ResultSet::create(): DBI Exception: DBD::Sybase::db
prepare_cached failed: Server message number=102 severity=15 state=181
line=1 \
server=RPCORE procedure=DBD3 text=Incorrect syntax near ';'.
  [for Statement "INSERT INTO artist ( name) VALUES ( ? );
SELECT MAX(artistid) FROM artist"] at t/746sybase.t line 91
DBIx::Class::Carp::__ANON__(): A DBIx::Class::Storage::TxnScopeGuard
went out of scope without explicit commit or error. Rolling back. at
/home\
/efstest/dev/cpan/DBIx-Class/blib/lib/DBIx/Class/Storage/TxnScopeGuard.pm
line 132
# Tests were run but no plan was declared and done_testing() was not seen.
t/746sybase.t .................................... Dubious, test
returned 255 (wstat 65280, 0xff00)

On Wed, Jan 9, 2013 at 2:27 PM, Peter Rabbitson <rabbit+dbic at rabbit.us> wrote:
> On Wed, Jan 09, 2013 at 01:50:09PM -0500, Phillip Moore wrote:
>> OK, I have verified that master passes the entire test suite with and
>> without defining DBICTEST_SYBASE_(DSN|USER|PASS).   The only
>> difference is that I get a couple of warnings:
>
> This is a problem. It means that our test somehow bypasses one of the
> codepaths. I will have to read more in depth a bit later to see why
> is this happening.
>
> In the meantime - let me know if this solves your problem:
>
> diff --git a/lib/DBIx/Class/Storage/DBI/Sybase/ASE.pm b/lib/DBIx/Class/Storage/DBI/Sybase/ASE.pm
> index 346dcd9..a41807e 100644
> --- a/lib/DBIx/Class/Storage/DBI/Sybase/ASE.pm
> +++ b/lib/DBIx/Class/Storage/DBI/Sybase/ASE.pm
> @@ -277,7 +277,7 @@ sub _prep_for_execute {
>    my ($sql, $bind) = $self->next::method (@_);
>
>    if (my $identity_col = $self->_perform_autoinc_retrieval) {
> -    $sql .= "\n" . $self->_fetch_identity_sql($ident, $identity_col)
> +    $sql .= ";\n" . $self->_fetch_identity_sql($ident, $identity_col)
>    }
>
>    return ($sql, $bind);
>
> _______________________________________________
> List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
> IRC: irc.perl.org#dbix-class
> SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
> Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk



More information about the DBIx-Class mailing list