Skip to Content.
Sympa Menu

freetds - RE: [freetds] version 0.61, rc5

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: ZIGLIO Frediano <Frediano.Ziglio AT vodafoneomnitel.it>
  • To: "'FreeTDS Development Group'" <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] version 0.61, rc5
  • Date: Thu, 27 Feb 2003 12:20:04 +0100

Hi Bill!
Nice to ear you.

>
> However, I've found one small bug, which manifests itself
> when more than 1
> compute column is specified in a compute clause, e.g.
>
> select col1 , col2, col3 from table
> order by col3
> compute sum(col1), sum(col2) by col3
>
> In this case we get a segmentation fault.
>
> This is down to a change in version 1.40 of mem.c ( some much
> needed memory
> allocation enhancements / checks )
>
> here's my patch to fix the problem.
>
> static TDSCOMPUTEINFO *
> tds_alloc_compute_result(int num_cols, int by_cols)
> {
> int col;
> TDSCOMPUTEINFO *info;
> int null_sz;
>
> TEST_MALLOC(info, TDSCOMPUTEINFO);
> memset(info,'\0',sizeof(TDSCOMPUTEINFO));
>
> TEST_MALLOCN(info->columns, TDSCOLINFO*, num_cols);
> - memset(info,'\0',sizeof(TDSCOLINFO*) * num_cols);
> + memset(info->columns,'\0',sizeof(TDSCOLINFO*) * num_cols);
>

Arghh.... applied. Obviously a bug.


> tdsdump_log(TDS_DBG_INFO1, "%L alloc_compute_result. point 1\n");
> info->num_cols = num_cols;
> for (col = 0; col < num_cols; col++) {
> TEST_MALLOC(info->columns[col], TDSCOLINFO);
> memset(info->columns[col],'\0',sizeof(TDSCOLINFO));
> }
>
> Hope this doesn't scupper plans for a timely release of 0.61....
>
> Bill
>

I don't think this will cause release problems...
Can you provide a test (just to add to 0.62 version) ?

bye
freddy77

=================================
"STRICTLY PERSONAL AND CONFIDENTIAL

This message may contain confidential and proprietary material for the sole
use of the intended recipient. Any review or distribution by others is
strictly prohibited. If you are not the intended recipient please contact
the sender and delete all copies.
The contents of this message that do not relate to the official business of
our company shall be understood as neither given nor endorsed by it."

=================================




Archive powered by MHonArc 2.6.24.

Top of Page