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

Phillip Moore w.phillip.moore at gmail.com
Wed Jan 9 18:50:09 GMT 2013


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:

t/746sybase.t .................................... 11/?
DBIx::Class::ResultSet::populate(): Sybase bulk API operation failed
due to character s\
et incompatibility, reverting to regular array inserts. Try unsetting
the LANG environment variable at t/746sybase.t line 216
t/746sybase.t .................................... 72/?
DBIx::Class::ResultSet::populate(): Sybase bulk API operation failed
due to character s\
et incompatibility, reverting to regular array inserts. Try unsetting
the LANG environment variable at t/746sybase.t line 282
t/746sybase.t .................................... ok

I managed to create a little mini-distro out of the code that
reproduces the problem, attached.   When the test suite runs (it uses
the same DBICTEST_SYBASE_* env vars) I get:

efstest at rpefst01$ make test
PERL_DL_NONLAZY=3D1 /usr/efs-2012-12-14/bin/perl
"-MExtUtils::Command::MM" "-e" "test_harness(0, 'inc', 'blib/lib',
'blib/arch')" t/*.t
t/create.t .. 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=3D102 severity=3D15 state=3D181
line=3D1 \
server=3DRPCORE procedure=3DDBD2 text=3DIncorrect syntax near '('.
 Server message number=3D102 severity=3D15 state=3D181 line=3D2 server=3DRP=
CORE
procedure=3DDBD2 text=3DIncorrect syntax near 'FROM'.
  [for Statement "INSERT INTO "ffrule" ( "description", "name",
"regex") VALUES ( ?, ?, ? )
SELECT MAX("id") FROM "ffrule""] at t/create.t line 57
DBIx::Class::Carp::__ANON__(): A DBIx::Class::Storage::TxnScopeGuard
went out of scope without explicit commit or error. Rolling back. at
/usr/\
efs/lib/perl5/DBIx/Class/Storage/TxnScopeGuard.pm line 132
t/create.t .. Dubious, test returned 255 (wstat 65280, 0xff00)
No subtests run

Test Summary Report
-------------------
t/create.t (Wstat: 65280 Tests: 0 Failed: 0)
  Non-zero exit status: 255
  Parse errors: No plan found in TAP output
Files=3D1, Tests=3D0,  4 wallclock secs ( 0.01 usr  0.01 sys +  0.13 cusr
0.03 csys =3D  0.18 CPU)
Result: FAIL
Failed 1/1 test programs. 0/0 subtests failed.
make: *** [test_dynamic] Error 255

Again, the failing SQL (shown when DBIC_TRACE is set) is:

INSERT INTO "ffrule" ( "description", "name", "regex") VALUES ( ?, ?, ? )
SELECT MAX("id") FROM "ffrule": 'Core files', 'cores', '^core$'

I am more than willing to try any additional debugging code, or gather
any further diagnostics necessary.  I am fairly adept with the perl
debugger, too, so if you give me some pointers on where to look (I
have NO clue how any of the code than generates the SQL works, or even
where to find it), I will investige this on my side.

We have a HUGE project that is blocking on this, so this is the top of
my personal problem list right now.

Any and all help greatly appreciated...

On Wed, Jan 9, 2013 at 12:54 PM, Peter Rabbitson <rabbit+dbic at rabbit.us> wr=
ote:
> On Wed, Jan 09, 2013 at 10:27:52AM -0500, Phillip Moore wrote:
>> NOTE: I attempted to send the forwarded message below for the
>> holidays, but it got bounced.   I've re-joined the mailing list, so
>> I'm hoping this one gets through this time....
>
>
> Yep it did. For future reference you can always see if the message
> made it to the archives [1].
>
> As far as the bug in question - can you please checkout the current
> master [2] and run the test suite against your RDBMS by setting
> DBICTEST_SYBASE_DSN, DBICTEST_SYBASE_USER and DBICTEST_SYBASE_PASS
> to sensible values.
>
> Whichever tests fail - re-run them with prove -lv and send us the
> full output.
>
> Cheers
>
> _______________________________________________
> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DBICSybaseTest-0.1.tar.gz
Type: application/x-gzip
Size: 18970 bytes
Desc: not available
Url : http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20130109/ae=
5b2bd8/DBICSybaseTest-0.1.tar-0001.bin


More information about the DBIx-Class mailing list