Skip Menu |

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

Report information
The Basics
Id: 71339
Status: open
Priority: 0/
Queue: DBD-Sybase

People
Owner: mpeppler [...] peppler.org
Requestors: jjoly.ext [...] orange.com
Cc:
AdminCc:

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



CC: "rt-cpan-admin [...] bestpractical.com" <rt-cpan-admin [...] bestpractical.com>
Subject: Report of new bug with UNIVARCHAR long string (over than 128 caracters)
Date: Thu, 29 Sep 2011 18:46:58 +0200
To: "bug-DBD-Sybase [...] rt.cpan.org" <bug-DBD-Sybase [...] rt.cpan.org>
From: <jjoly.ext [...] orange.com>
Hello, I am currently a developper in Orange France, and I found a bug in the DBD::Sybase. The module was describe as the sample of Sybase, but I also had an issue using their samples with a very big string (more than 25 caracters UNIVARCHAR). I solve this issue by changing the reservation of buffer used to fetch the data comming from the database. It was previously the same a specified in the datafmt: eg UNIVARCHAR(255) => size = 255. Or UNIVARCHAR is UTF-16. and the maximum string could now goes to 510 octet's long. I have modify the sample of Sybase, and validate it with them. They include these new modification in the Sybase 15.7 delivered yesterday. I have applied the same modification on the module DBD::Sybase. Please read the joind tarball. It's included the "utf8.t", "dbdimp.c" and "Sybase.h". All importants modifications are in "dbdimp.c" in red: 82a83,92 Show quoted text
> #if defined(CS_VERSION_155) > #if !defined BLK_VERSION_155 > #define BLK_VERSION_155 BLK_VERSION_150 > #endif > #endif > #if defined(CS_VERSION_157) > #if !defined BLK_VERSION_157 > #define BLK_VERSION_157 BLK_VERSION_155 > #endif > #endif
625c635 < len = column->maxlength; --- Show quoted text
> len = column->maxlength;
630a641,644 Show quoted text
> #if defined(CS_UNICHAR_TYPE) > case CS_UNICHAR_TYPE: > case CS_UNITEXT_TYPE: > #endif
3698a3713,3716 Show quoted text
> /* For these types send data "as is" */ > ptr = imp_sth->coldata[i].ptr; > imp_sth->coldata[i].valuelen = slen; > break;
3701d3718 < #endif 3704c3721 < imp_sth->coldata[i].valuelen = slen; --- Show quoted text
> imp_sth->coldata[i].valuelen = slen * 2;
3705a3723 Show quoted text
> #endif
If you have some questions, I will be pleased to answer Regards [cid:453350916@29092011-14EF] Julien JOLY Pour ORANGE FT/OLNC/DPS/MSE/IDE/SSO Téléphone: +33 (0)1 57 36 10 71 Adresse: 21, rue Jasmin 75016 Paris Email: jjoly.ext@orange.com <mailto:jjoly.ext@orange.com> Show quoted text
________________________________ P Cette obscure clarté qui tombe des étoiles, Enfin, avec le flux nous fit voir trente voiles, L'onde s'enfle dessous et, d'un commun effort, Les Mores et la mer montent jusques au port. Corneille Le Cid (1636)
________________________________ ******************************************************************************** IMPORTANT.Les informations contenues dans ce message electronique y compris les fichiers attaches sont strictement confidentielles et peuvent etre protegees par la loi. Ce message electronique est destine exclusivement au(x) destinataire(s) mentionne(s) ci-dessus. Si vous avez recu ce message par erreur ou s il ne vous est pas destine, veuillez immediatement le signaler a l expediteur et effacer ce message et tous les fichiers eventuellement attaches. Toute lecture, exploitation ou transmission des informations contenues dans ce message est interdite. Tout message electronique est susceptible d alteration. A ce titre, le Groupe France Telecom decline toute responsabilite notamment s il a ete altere, deforme ou falsifie. De meme, il appartient au destinataire de s assurer de l absence de tout virus. IMPORTANT.This e-mail message and any attachments are strictly confidential and may be protected by law. This message is intended only for the named recipient(s) above. If you have received this message in error, or are not the named recipient(s), please immediately notify the sender and delete this e-mail message. Any unauthorized view, usage or disclosure ofthis message is prohibited. Since e-mail messages may not be reliable, France Telecom Group shall not be liable for any message if modified, changed or falsified. Additionally the recipient should ensure they are actually virus free. ********************************************************************************
Download logo_altran_tem.jpg
image/jpeg 23.6k
logo_altran_tem.jpg
Download Bug report.tar.gz
application/x-gzip 38.5k

Message body not shown because it is not plain text.

Should be fixed in 1.14, uploaded to CPAN a few minutes ago.
Subject: RE: [rt.cpan.org #71339] Resolved: Report of new bug with UNIVARCHAR long string (over than 128 caracters)
Date: Mon, 3 Oct 2011 12:05:46 +0200
To: "bug-DBD-Sybase [...] rt.cpan.org" <bug-DBD-Sybase [...] rt.cpan.org>
From: <jjoly.ext [...] orange.com>
Hello, I am sorry, but i have test the modification and it does not work. The librarie Sybase generate and error 132 again. I have seen that the modification regarding the CS_UNICHAR_TYPE were partially comment (eg line 641 to 644). Bug it is the most important lines. I their are commented, the error appears.I have made a test with your code, it does not work. I made it again, with the line 641 to 644 uncomment, and it is work. Regards Julien JOLY Pour ORANGE FT/OLNC/DPS/MSE/IDE/SSO Téléphone: +33 (0)1 57 36 10 71 Adresse: 21, rue Jasmin 75016 Paris Email: jjoly.ext@orange.com Show quoted text
________________________________ P Cette obscure clarté qui tombe des étoiles, Enfin, avec le flux nous fit voir trente voiles, L'onde s'enfle dessous et, d'un commun effort, Les Mores et la mer montent jusques au port. Corneille Le Cid (1636) -----Message d'origine----- De : Michael Peppler via RT [mailto:bug-DBD-Sybase@rt.cpan.org] Envoyé : dimanche 2 octobre 2011 17:08 À : JOLY Julien Ext OLNC/DPS Objet : [rt.cpan.org #71339] Resolved: Report of new bug with UNIVARCHAR long string (over than 128 caracters) <URL: https://rt.cpan.org/Ticket/Display.html?id=71339 > According to our records, your request has been resolved. If you have any further questions or concerns, please respond to this message. ******************************************************************************** IMPORTANT.Les informations contenues dans ce message electronique y compris les fichiers attaches sont strictement confidentielles et peuvent etre protegees par la loi. Ce message electronique est destine exclusivement au(x) destinataire(s) mentionne(s) ci-dessus. Si vous avez recu ce message par erreur ou s il ne vous est pas destine, veuillez immediatement le signaler a l expediteur et effacer ce message et tous les fichiers eventuellement attaches. Toute lecture, exploitation ou transmission des informations contenues dans ce message est interdite. Tout message electronique est susceptible d alteration. A ce titre, le Groupe France Telecom decline toute responsabilite notamment s il a ete altere, deforme ou falsifie. De meme, il appartient au destinataire de s assurer de l absence de tout virus. IMPORTANT.This e-mail message and any attachments are strictly confidential and may be protected by law. This message is intended only for the named recipient(s) above. If you have received this message in error, or are not the named recipient(s), please immediately notify the sender and delete this e-mail message. Any unauthorized view, usage or disclosure ofthis message is prohibited. Since e-mail messages may not be reliable, France Telecom Group shall not be liable for any message if modified, changed or falsified. Additionally the recipient should ensure they are actually virus free. ********************************************************************************
On Mon Oct 03 06:06:04 2011, jjoly.ext@orange.com wrote: Show quoted text
> > Hello, > > I am sorry, but i have test the modification and it does not work. > The librarie Sybase generate and error 132 again. > I have seen that the modification regarding the CS_UNICHAR_TYPE were > partially comment (eg line 641 to 644). Bug it is the most > important lines. I their are commented, the error appears.I have > made a test with your code, it does not work. I made it again, with > the line 641 to 644 uncomment, and it is work.
Which platform (OS) are you on, which versions of OpenClient, and which version of ASE please? I tested my version with OpenClient 15.7 and 15.5, against 15.5 and 15.7 servers, and at least the utf8.t test script worked fine. If possible could you send me the actual error message you get, as well as version info, etc? Thanks. Michael PS - you can send this directly to me, and in French if you prefer (j'habite en Suisse...)
Subject: RE: [rt.cpan.org #71339] Report of new bug with UNIVARCHAR long string (over than 128 caracters)
Date: Tue, 4 Oct 2011 09:11:11 +0200
To: "bug-DBD-Sybase [...] rt.cpan.org" <bug-DBD-Sybase [...] rt.cpan.org>
From: <jjoly.ext [...] orange.com>
Sorry I made a test through OCS 12.5.4, 15.5.1 and 15.7.0 with ASE 12.5.1. The instance of the server is with charset "utf8". But i used UNIVARCHAR type. My error message is this one: DBD::Sybase::st fetchrow_array failed: OpenClient message: LAYER = (1) ORIGIN = (4) SEVERITY = (1) NUMBER = (132) Server ss2_nopfa236, database Message String: ct_fetch(): user api layer: internal common library error: The bind of result set item 17 resulted in truncation. I saw that you comment my test in "utf8.t". That explain my remark. I the sentence in the UNIVARCHAR field is shorter rathen than the size of the field, this issue does not appear. You have to specified a very long sentence. I used a Hindy string (recopy of 3 hindy caracters) to form a 255 UNIVARCHAR sentence (to fullfill the field). I fetch it through PERL and the issue appear. As I saw now, i have write an issue in the test: $dbh->do("create table #utf8test (uv univarchar(255), ut unitext)"); my $ascii = 'Some text'; my $utf8 = "पट्टपट्टपट्टपट्टपट्टपट्टपट्टपट्टपट्टपट्टपट्टपट्टपट्टपट्टपट्टपट्टपट्टपट्टपट्टपट्टपट्टपट्टपट्टपट्टपट्टपट्टपट्टपट्टपट्टपट्टपट्टपट्टपट्टपट्टपट्टपट्टपट्टपट्टपट्टपट्टपट्टपट्टपट"; Sorry about that last point Regards Julien JOLY Pour ORANGE FT/OLNC/DPS/MSE/IDE/SSO Téléphone: +33 (0)1 57 36 10 71 Adresse: 21, rue Jasmin 75016 Paris Email: jjoly.ext@orange.com Show quoted text
________________________________ P Cette obscure clarté qui tombe des étoiles, Enfin, avec le flux nous fit voir trente voiles, L'onde s'enfle dessous et, d'un commun effort, Les Mores et la mer montent jusques au port. Corneille Le Cid (1636) -----Message d'origine----- De : Michael Peppler via RT [mailto:bug-DBD-Sybase@rt.cpan.org] Envoyé : lundi 3 octobre 2011 19:34 À : JOLY Julien Ext OLNC/DPS Objet : [rt.cpan.org #71339] Report of new bug with UNIVARCHAR long string (over than 128 caracters) <URL: https://rt.cpan.org/Ticket/Display.html?id=71339 > On Mon Oct 03 06:06:04 2011, jjoly.ext@orange.com wrote:
> > Hello, > > I am sorry, but i have test the modification and it does not work. > The librarie Sybase generate and error 132 again. > I have seen that the modification regarding the CS_UNICHAR_TYPE were > partially comment (eg line 641 to 644). Bug it is the most > important lines. I their are commented, the error appears.I have > made a test with your code, it does not work. I made it again, with > the line 641 to 644 uncomment, and it is work.
Which platform (OS) are you on, which versions of OpenClient, and which version of ASE please? I tested my version with OpenClient 15.7 and 15.5, against 15.5 and 15.7 servers, and at least the utf8.t test script worked fine. If possible could you send me the actual error message you get, as well as version info, etc? Thanks. Michael PS - you can send this directly to me, and in French if you prefer (j'habite en Suisse...) ******************************************************************************** IMPORTANT.Les informations contenues dans ce message electronique y compris les fichiers attaches sont strictement confidentielles et peuvent etre protegees par la loi. Ce message electronique est destine exclusivement au(x) destinataire(s) mentionne(s) ci-dessus. Si vous avez recu ce message par erreur ou s il ne vous est pas destine, veuillez immediatement le signaler a l expediteur et effacer ce message et tous les fichiers eventuellement attaches. Toute lecture, exploitation ou transmission des informations contenues dans ce message est interdite. Tout message electronique est susceptible d alteration. A ce titre, le Groupe France Telecom decline toute responsabilite notamment s il a ete altere, deforme ou falsifie. De meme, il appartient au destinataire de s assurer de l absence de tout virus. IMPORTANT.This e-mail message and any attachments are strictly confidential and may be protected by law. This message is intended only for the named recipient(s) above. If you have received this message in error, or are not the named recipient(s), please immediately notify the sender and delete this e-mail message. Any unauthorized view, usage or disclosure ofthis message is prohibited. Since e-mail messages may not be reliable, France Telecom Group shall not be liable for any message if modified, changed or falsified. Additionally the recipient should ensure they are actually virus free. ********************************************************************************