Skip to Content.
Sympa Menu

freetds - Re: dg/ux challenges

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Brian Bruns <camber AT umcc.ais.org>
  • To: TDS Development Group <freetds AT franklin.oit.unc.edu>
  • Subject: Re: dg/ux challenges
  • Date: Wed, 22 Sep 1999 21:35:54 -0400 (EDT)



Ok, looks like we have to do this the hard way. There is a line in token.c
in the tds_process_result_tokens() function that looks like this:

/* get_incoming(tds->s); */

You'll need to uncomment this line. Recompile and run sqsh. Don't change
the database as this function will then execute and we don't want that.
When you run your query (the sys_users thing), it'll go out to lunch but
it should generate a file called 'client.out' With that I should be able
to debug it enough to see what is going on.

Oh, and you may need to link sqsh with the debug.c that is in the
freetds/samples directory as it has the get_incoming() function. So, you
would want to do something like:

cd samples
gcc -g -c -o debug.o debug.c

and then add /usr/src/freetds/samples/debug.o to the SYBASE_LIBS line in
sqsh's Makefile (where /usr/src/freetds is wherever freetds' source is on
your computer). Then relink sqsh.

I warned you this was the hard way!

BTW, I tested this against SQL 7.0 (no service pack) from Linux on Intel
and everything is fine. Smells like a change in SP1 to me.

Brian


On Wed, 22 Sep 1999, Jeff Driscoll wrote:

> > Anyway, do something like this:
> >
> > gdb sqsh
> > (gdb) run -Usa -Pmysapass -Smyserver -b
> > 1> select * from sys_users
> > 2> go
> > (now hit ctrl-c once it freezes)
> > (gdb) where
> >
> > I need the stack trace printed when you type where. Probably we will see
> > tds_process_msg() in there somewhere. If that's the case I'll post a debug
> > version of token.c to try and see what is going wrong.
> >
> > Oh by the way, I'd to ifdef that #include <paths.h> thing into the code,
> > do you know what define I can check for to see if its on DGUX?
> >
> >
> > Cheers,
> >
> > Brian
>
> Ok, I found what appears to be an old version of gdb but it appears to
> work.
>
>
> dgtest# gdb sqsh
> GDB is free software and you are welcome to distribute copies of it
> under certain conditions; type "show copying" to see the conditions.
> There is absolutely no warranty for GDB; type "show warranty" for details.
> GDB 4.12 (i386-dg-dgux), Copyright 1994 Free Software Foundation, Inc...
> (no debugging symbols found)...
> (gdb) run -Upopeye -Psailorman -Smssql7 -b
> Starting program: /usr/local/bin/sqsh -Upopeye -Psailorman -Smssql7 -b
> (no debugging symbols found)...(no debugging symbols found)...
> (no debugging symbols found)...(no debugging symbols found)...
> Unknown property 7
> 1> select * from sys_users
> 2> go
> Msg 208, Level 16, State 1
> Server 'VSTNCDB', Line 1
> Invalid object name 'sys_users'.
> <------- <CTRL> C entered.
> no debugging symbols found)...
> Program received signal SIGINT, Interrupt.
> 0x80029cb4 in read ()
> (gdb) where
> #0 0x80029cb4 in read ()
> #1 0x800934dc in tds_read_packet ()
> #2 0x80093135 in tds_get_byte ()
> #3 0x800909c2 in tds_process_result_tokens ()
> #4 0x8008e5ec in ct_results ()
> #5 0x80645ed in dsp_horiz ()
> #6 0x80628e1 in dsp_cmd ()
> #7 0x805aee3 in cmd_go ()
> #8 0x8050e9a in jobset_run ()
> #9 0x805cc16 in cmd_input ()
> #10 0x8057934 in cmd_loop ()
> #11 0x8050e9a in jobset_run ()
> #12 0x806bd74 in main ()
> #13 0x8049fa9 in _start ()
> (gdb)
>
> Also to clarify the MS SQL Server is version 7 with service pack 1 loaded.
> ---
> Jeff
>
>
> ---
> You are currently subscribed to freetds as: camber AT ais.org
> To unsubscribe, forward this message to $subst('Email.Unsub')
>
>





Archive powered by MHonArc 2.6.24.

Top of Page