Thanks for patch Daniel. Couldn't get it to play, so I edited vmysql.c
manually, but it I broke. heh.

Although I got the blighter....

write(3, "L\0\0\0\3select pw_name, pw_passwd, pw_uid, pw_gid, pw_gecos,
pw_dir, pw_shell from ", 80) = 80
read(3, "9\0\0\1", 4)                   = 4
read(3, "\377(\4You have an error in your SQL syntax near \'\' at line 1",
57) = 57

Thats all I could get. (With an increased strace buffer) It still doesn't
look like the full statement.

Any ideas?

--
Regards,

Kieran Barnes
Signum 1226 Ltd
Visit our website at http://www.1226.net
Phone: 01772 622889 || Fax: 01772 622558


> -----Original Message-----
> From: Daniel Biddle [mailto:[EMAIL PROTECTED]]
> Sent: 25 June 2001 19:23
> To: [EMAIL PROTECTED]
> Subject: RE: vsql_getpw: failed select (updated)
> 
> 
> On Mon, 25 Jun 2001, Kieran Barnes wrote:
> 
> > Disclaimer: I am not a C programmer. I am guessing and 
> attempting to be
> > intelligent!
> 
> And succeeding. :-)
> 
> > Here follows an output of an strace on vuserinfo
> > Some interesting things are as follows.
> > 
> > 102  open("/var/db/mysql/mysql/charsets/Index", 
> O_RDONLY|O_LARGEFILE) = -1
> > ENOENT (No such file or directory)
> > I dont know if this error is just my installation of mysql 
> or something
> > else.
> > The file vuserinfo is looking for is in
> > /usr/local/mysql/share/mysql/charsets/
> 
> Try strace on some other programs that use mysql, and see if 
> they look in
> the same place.
> 
> > I don't think this the main problem though
> 
> I agree.
> 
> >    109  write(3, "L\0\0\0\3select pw_name, pw_passwd, "..., 80) = 80
> >    110  read(3, "9\0\0\1", 4)                   = 4
> >    111  read(3, "\377(\4You have an error in your SQL"..., 57) = 57
> > This looks like vuserinfo has connected to mysql but issued 
> a broken select
> > statement and will return "vsql_getpw: failed select"
> 
> Yep, seems likely. I notice the server returned an error message which
> vmysql ignored. The attached untested patch should cause that 
> message to
> be displayed (to stderr).
> 
> > Line 111 looks like the mysqld returning the error. Does 
> any one know how I
> > can get the full error returned, or the full select statement?
> 
> Use the -s (string size) option, e.g. -s 100. (You can also use the -o
> option to output to a file, to avoid the trace being mixed with the
> traced program's output.)
> 
> -- 
> Daniel Biddle <[EMAIL PROTECTED]>
> 
> 
> 

Reply via email to