[freetds] RE: output parameters and "unknown marker"

Thompson, Bill D (London) bill_d_thompson at ml.com
Fri Jan 7 10:25:30 EST 2005


James,

hate to make more work for you, but...

could you apply this patch of freddy's to RC7 ?

Also could you also apply to RC7 the following to src/dblib/dblib.c ?
This is a patch for the issue Chris Cole has raised on the ML this
morning.
He has coded and tested it out himself.

in src/dblib/dblib.c

line 1747 or thereabouts in function dbconvert()

    if (srctype == desttype) {
        ret = -2;  /* to make sure we always set it */
        tdsdump_log(TDS_DBG_INFO1, "dbconvert() srctype == desttype\n");
        switch (desttype) {

        case SYBBINARY:
+       case SYBVARBINARY:
        case SYBIMAGE:
            if (srclen > destlen && destlen >= 0) {
                _dblib_client_msg(NULL, SYBECOFL, EXCONVERSION,
"Data-conversion resulted in overflow.");
                ret = -1;
            } else {

line 1885 or thereabouts in function dbconvert()

        break;
    }

    switch (desttype) {
    case SYBBINARY:
+   case SYBVARBINARY:
    case SYBIMAGE:
        if (len > destlen && destlen >= 0) {
            _dblib_client_msg(NULL, SYBECOFL, EXCONVERSION,
"Data-conversion resulted in overflow.");
            ret = -1;
        } else {

line 6175 or thereabouts in function copy_data_to_host_var()

        tdsdump_log(TDS_DBG_INFO1, "copy_data_to_host_var() srctype ==
desttype\n");
        switch (desttype) {

        case SYBBINARY:
+       case SYBVARBINARY:
        case SYBIMAGE:
            if (srclen > destlen && destlen >= 0) {
                _dblib_client_msg(dbproc, SYBECOFL, EXCONVERSION,
"Data-conversion resulted in overflow.");
            } else {

and finally line 6325 or thereabouts in function copy_data_to_host_var()

    }

    switch (desttype) {
    case SYBBINARY:
+   case SYBVARBINARY:
    case SYBIMAGE:
        if (len > destlen && destlen >= 0) {
            _dblib_client_msg(dbproc, SYBECOFL, EXCONVERSION,
"Data-conversion resulted in overflow.");
        } else {

Thanks a lot

Bill


-----Original Message-----
From: freetds-bounces at lists.ibiblio.org
[mailto:freetds-bounces at lists.ibiblio.org] On Behalf Of ZIGLIO,
Frediano, VF-IT
Sent: 07 January 2005 13:35
To: FreeTDS Development Group
Subject: RE: [freetds] RE: output parameters and "unknown marker"


> 
> well spotted Freddy,
> 
> shall I code the patch (including using tds_get_null_type) ?
> 
> Bill
> 

Here you are. It pass all refressions too.

freddy77 
--------------------------------------------------------
 
If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. Click here for important additional terms relating to this e-mail.     http://www.ml.com/email_terms/ 
--------------------------------------------------------
 


More information about the FreeTDS mailing list