I've installed Sybase ASE 15.0.2 Developer's edition on my Ubuntu 8.4 desktop. (32bit) Unfortunately when I try to use placeholders I get segmentation fault.

#!/usr/bin/perl -l -- use strict; use warnings; use DBI; delete $ENV{LANG}; $ENV{SYBASE}='/opt/sybase'; my $dbh = DBI->connect('DBI:Sybase:server=asus','sa','') or die $DBI:: +errstr; print "Let's go!"; print $dbh->selectrow_array(<<'SQL'); select count(*) from syskeys where type = 1 SQL print "And now placeholders!"; print $dbh->selectrow_array(<<'SQL', undef, 1); select count(*) from syskeys where type = ? SQL print "END.";
ccn@asus:~/tmp$ perl sy.pl Let's go! 19 And now placeholders! ct_send(CS_DESCRIBE_INPUT) returned 0 at /usr/lib/perl5/DBD/Sybase.pm +line 124. Segmentation fault ccn@asus:~/tmp$

If I make trace then I get the following just before segfault:

dbd_preparse parameter :p1 () dbd_preparse scanned 1 distinct placeholders syb_st_prepare: ct_dynamic(CS_PREPARE) for DBD1 ct_send(CS_DESCRIBE_INPUT) returned 0 at /usr/lib/perl5/DBD/Sybase.pm +line 124. syb_st_prepare: ct_dynamic(CS_DESCRIBE_INPUT) for DBD1 syb_st_prepare: ct_results(CS_DESCRIBE_INPUT) for DBD1 - restype 4 +051 Segmentation fault

I've googled and found that the problem is more likely in CT-Library. But I do not know how to fix it.

Version of DBD::Sybase installed from Ubuntu repository is 1.00

Update:
Placeholders begin to work after upgrading DBD::Sybase to v1.09

In fact I can't say what action solved the problem. It can be the version upgrade, but I suspect that the module compilation is the deal.


In reply to How to enable placeholders for Sybase ASE on linux? (SOLVED) by ccn

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.