Skip to Content.
Sympa Menu

freetds - Re: killer query

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Brian Bruns" <camber AT ais.org>
  • To: freetds AT franklin.oit.unc.edu
  • Subject: Re: killer query
  • Date: Tue, 25 Jun 2002 10:21:05 -0400


What I'd really prefer is a autoconf macro to check alignment at configure
time. Postgres has one called PGAC_CHECK_ALIGNOF that we can probably
lift. I've just been too busy (lazy) to do the work. ;-)

Brian

> > Thanks, Brian. I lifted that code and it seems to work.
> >
> > Now appearing in src/tds/token.c::tds7_process_result:
> > 705 if (is_numeric_type(curcol->column_type)) {
> > 706 info->row_size +=
> > sizeof(TDS_NUMERIC) + 1;
> > 707 }
> > 708
> > + 709 /* actually this 4 should be a machine
> > dependent #define */
> > + 710 remainder = info->row_size % 4;
> > + 711 if (remainder) info->row_size += (4 - remainder);
> > 712
> > 713 }
> > 714
> > 715 /* all done now allocate a row for
> > tds_process_row to use */
> > 716 info->current_row = tds_alloc_row(info);
>
> Instead of 4 a macro like
>
> #define MACHINE_ALIGN (sizeof(void*) > sizeof(int) ? sizeof(void*) :
> sizeof(int) )
>
> should be enough.
>
> freddy77




Archive powered by MHonArc 2.6.24.

Top of Page