Skip Menu |

This queue is for tickets about the DBD-Sybase CPAN distribution.

Report information
The Basics
Id: 107144
Status: new
Priority: 0/
Queue: DBD-Sybase

People
Owner: Nobody in particular
Requestors: sebastien.pardo [...] orange.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: overflow on numeric with DBD Sybase 1.15
Date: Thu, 17 Sep 2015 13:35:20 +0000
To: "'bug-DBD-Sybase [...] rt.cpan.org'" <bug-DBD-Sybase [...] rt.cpan.org>
From: <sebastien.pardo [...] orange.com>
Hello, After upgrading to DBD Sybase 1.15, we got the following error when trying to fetch a numeric column containing a value >= 1e+36 : DBD::Sybase::st fetch failed: OpenClient message: LAYER = (1) ORIGIN = (4) SEVERITY = (1) NUMBER = (79) Server XNMS_ADMPP, database Message String: ct_fetch(): user api layer: internal common library error: The bind of result set item 2 resulted in an overflow. We checked syb_describe() outputs and noticed the following change: DBD 1.09 syb_describe[1].maxlength = 80 syb_describe[1].sybtype = 16 DBD 1.15 syb_describe[1].maxlength = 36 syb_describe[1].sybtype = 16 We looked at get_cwidth (dbdimp.c) and saw that there was a special handling of CS_NUMERIC_TYPE and C_DECIMAL_TYPE in 1.09 that disappeared in 1.15: case CS_NUMERIC_TYPE: case CS_DECIMAL_TYPE: len = (CS_MAX_PREC + 2); break; As a matter of fact, Sybase openclient seems to provide an hard coded length (=35) for numeric fields: Always specify a column length of 35 when describing Sybase numeric and decimal columns (http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.help.mainframeconnect_12.6.oscprcob/html/oscprcob/X42365.htm) We then tried to restore the above piece of code on top of 1.15, and the issue disappeared. Thanks & BRgds Sebastien PARDO Show quoted text
_________________________________________________________________________________________________________________________ Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration, Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci. This message and its attachments may contain confidential or privileged information that may be protected by law; they should not be distributed, used or copied without authorisation. If you have received this email in error, please notify the sender and delete this message and its attachments. As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified. Thank you.