Skip to Content.
Sympa Menu

freetds - Re: convert_int4 on Solaris(Sparc)

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Gregg Jensen <greggj AT savvis.net>
  • To: TDS Development Group <freetds AT franklin.oit.unc.edu>
  • Subject: Re: convert_int4 on Solaris(Sparc)
  • Date: Mon, 01 Feb 1999 10:29:29 -0600


Brian Bruns wrote:

> Sorry to follow myself up, but I just had a brief look at the code at I
> think the following should work (in token.c)
>
> curcol->column_offset = info->row_size;
> info->row_size += curcol->column_size + 1;
> + /* actually this 4 should be a machine dependent #define */
> + remainder = info->row_size % 4;
> + if (remainder) info->row_size += (4 - remainder);
>
> This change needs to be made in tds_process_col_info() (for 4.2), and
> tds_process_result() (for 5.0) and the function that handles compute
> results (name is slipping my mind, maybe tds_process_compute_result() or
> something close?)
>
> Let me know how it works,

Well, initial tests are positive! I have tested with a modified dbtest (that
failed before) and with sqsh-1.4. So far most queries have worked. I do
have one problem that persists with sqsh-1.4. I run a query (sp_help)
and it spits out the right results, but then I turn around and make simple
select and no output. I run another similar query and the output for the
previous query spits out.

The changes I have made (diffed against what is in CVS):
Index: token.c
===================================================================
RCS file: /Repository/freetds/src/tds/token.c,v
retrieving revision 1.17
diff -r1.17 token.c
301a302
> int remainder;
321a323,327
> if(IS_TDS42(tds)) {
> /* actually this 4 should be a machine dependent
> #define */
> remainder = info->row_size % 4;
> if (remainder) info->row_size += (4 - remainder);
> }
344a351
> int remainder;
370a378,380
> /* actually this 4 should be a machine dependent #define */
> remainder = info->row_size % 4;
> if (remainder) info->row_size += (4 - remainder);
384a395
> int remainder;
425a437,441
> }
> if(IS_TDS50(tds)){
> /* actually this 4 should be a machine dependent
> #define */
> remainder = info->row_size % 4;
> if (remainder) info->row_size += (4 - remainder);


Brian, is this what you meant by changes going in different functions for
different TDS versions? I changed tds_process_col_info specific for 4.2
and tds_process_result specific for 5.0. tds_process_compute_result is
changed for all.

Gregg





Archive powered by MHonArc 2.6.24.

Top of Page