[Dbix-class] Strange statistically significant failure for DBIC with Sybase

Phillip Moore w.phillip.moore at gmail.com
Tue Feb 4 17:19:48 GMT 2014


OK, that must have gone right over my head, 'cause I did read it, but I
don't see why that means I should expect there to be no trace output.

How do you trace the SQL that is generated when the create() method is
called then?  Obviously, I'm just turning on tracing on the connection
associated with my $dbh, but if that secondary connection isn't exposed to
me somehow, are you saying my only recourse is to trace the ENTIRE
application execution, and then wade through the mountain of data?

I'll give that a try...   Finding the SQL of interest will be a little
tedious, though, but hey, I've got all day....

Oh, BTW, I tried switching to using NoBindVars, and was immediately
reminded of why that failed for me last year:

DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::Sybase::st
execute failed: Server message number=257 severity=16 state=1 line=1 \
server=NYTIBV6T228 text=Implicit conversion from datatype 'VARCHAR' to
'NUMERIC' is not allowed.  Use the CONVERT function to run this query.
 Server message number=257 severity=16 state=1 line=1 server=NYTIBV6T228
text=Implicit conversion from datatype 'VARCHAR' to 'NUMERIC' is not a\
llowed.  Use the CONVERT function to run this query.
  [for Statement "INSERT INTO [ENGN_afsvolume] ( [name], [target],
[toplevel], [type]) VALUES ( 'canon.root', '9', '1', 'cn' )
SELECT @@IDENTITY"] at ./util/vms_bootstrap_database line 253

That '9', and '1' are both foreign keys which are numerics, and the
dataserver doesn't like them to be quoted.


On Tue, Feb 4, 2014 at 12:09 PM, Peter Rabbitson <rabbit+dbic at rabbit.us>wrote:

> On Tue, Feb 04, 2014 at 11:28:46AM -0500, Phillip Moore wrote:
> >
> > What am I doing wrong here?   Clearly, tracing is being turned on, but
> then
> > total radio silence from the create method.
>
> You didn't read the linked paragraph carefully. Linking you to the
> source so that the highlight is apparent:
>
> https://metacpan.org/source/RIBASUSHI/DBIx-Class-0.08270/lib/DBIx/Class/Storage/DBI/Sybase/ASE.pm#L1017
>
> This codepath is not employed if you are already in a transaction:
>
> https://metacpan.org/source/RIBASUSHI/DBIx-Class-0.08270/lib/DBIx/Class/Storage/DBI/Sybase/ASE.pm#L405
>
> Hope this helps
> 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 --------------
An HTML attachment was scrubbed...
URL: <http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20140204/71ba793a/attachment-0001.htm>


More information about the DBIx-Class mailing list