Skip to Content.
Sympa Menu

freetds - Re: Debug stuff (Long)

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Kevin <kevin AT nol.org>
  • To: TDS Development Group <freetds AT franklin.oit.unc.edu>
  • Subject: Re: Debug stuff (Long)
  • Date: Thu, 08 Jul 1999 14:15:42 -0500


Brian Bruns wrote:
> 533 if (colsize==0) {
> (gdb) n
> 536 tds_clr_null(info->current_row, i);
> (gdb) p tds->res_info->num_cols
> $6 = 10
> (gdb) p tds->res_info->columns[0]->column_offset
> $7 = 2
> (gdb) p tds->res_info->null_info_size
> $8 = 2
> (gdb)
>
> This is showing that the first column_offset (index 0) is set to 2, which
> is correct (10 columns needs 2 bytes to stored NULL indicators). Could
> you post a similar debug thread for Solaris?? Maybe we can figure out what
> is going on. BTW there were some header changes with 0.45 so you must
> recompile your applications (I'm assuming you did that though).

Sorry, it's been kinda crazy 'round here and I havn't had a chance to
get back to this 'till now.
First off, I actually did have a problem because I forgot to recompile
against the new headers...but hey, we all make mistakes. :) Then this
problem occurred. Here's the debug thread I get. Line numbers are off
because I went through and commented some stuff

Query: varchar(120), tinyint, int

Result should be:
NEBRASK@ INTERACTIVE, INC.
1
1112123

Result Is:
Same as above

Breakpoint 1, tds_process_row (tds=0x2a5a0) at token.c:538
538 info = tds->res_info;
(gdb) n
539 info->row_count++;
(gdb) n
540 for (i = 0; i < info->num_cols; i++) {
(gdb) n
541 curcol = info->columns[i];
(gdb) n
542 if(curcol->column_type == SYBTEXT) {
(gdb) n
547 colsize = tds_get_byte(tds);
(gdb) n
548 } else {
(gdb) n
553 if (colsize==0) {
(gdb) n
556 tds_clr_null(info->current_row, i);
(gdb) p tds->res_info->num_cols
$1 = 3
(gdb) p tds->res_info->columns[0]->column_offset
$2 = 0
(gdb) p tds->res_info->null_info_size
$3 = 0
(gdb)

And poof...everything works in this case. Now, I do the same on this
query...

Query: varchar(120), char(2), varchar(80), datetime, varchar(50),
varchar(50), char(2) (<- allways null in this case), varchar(120),
varchar(20), char(2), char(9) with a 2 table join

Results should be:
NEBRASK@ INTERACTIVE, INC.
A
Domestic Corp
NULL
3740 S. 81st Street
NULL
NULL
ONLINE DATA INPUT RETREIVAL
LINCOLN
NE
685060000

Results Are:
P@BRASK@ INTERACTIVE, INC.
Rest is same as above

Breakpoint 1, tds_process_row (tds=0x2a660) at token.c:538
538 info = tds->res_info;
(gdb) n
539 info->row_count++;
(gdb) n
540 for (i = 0; i < info->num_cols; i++) {
(gdb) n
541 curcol = info->columns[i];
(gdb) n
542 if(curcol->column_type == SYBTEXT) {
(gdb) n
547 colsize = tds_get_byte(tds);
(gdb) n
548 } else {
(gdb) n
553 if (colsize==0) {
(gdb) n
556 tds_clr_null(info->current_row, i);
(gdb) p tds->res_info->num_cols
$4 = 11
(gdb) p tds->res_info->columns[0]->column_offset
$5 = 0
(gdb) p tds->res_info->null_info_size
$6 = 0
(gdb)


which also appears to be correct...

Any help?


-
Kevin Lyons Programmer for Nebrask@
Online
Phone: 402-471-7870 e-mail:
kevin AT nol.org
-------------------------------------------------------------------------------
"I didn't say it was your fault...I said I was going to blame it on
you."




Archive powered by MHonArc 2.6.24.

Top of Page