Hello Sasha,

Thanks for your reply.

> At this point, I have two theories:
> 
> a) There is something wrong with your gethostbyname_r function
> b) MySQL has a sublte buffer overrun ( probably only a couple of bytes),
> that 
> in your case happen to corrupt some critical structures in
> __gethostbyname_r.
> 

I sent the same report to the bugs list, since I didn't know whether
anyone would spot it in the general list :-)

Monty Widenius responded to it in the bugs list and pointed out that
OSF1 requires the user to do some initialisation before calling
gethostbyname_r. The man page says that the hostent_data structure must
be filled with zero bytes before the function is first called.

So it looks like a "gotcha" put there by the good folks at Compaq to
snare the unwary :-)

Monty notes that gethostbyname is thread-safe under OSF1 (the man page
says that it returns a pointer to thread-specific data) and he suggests
that I remove the "#define HAVE_GETHOSTBYNAME_R" directive from config.h
after running configure. I'll try that and report back via the bugs
list.

Best wishes

David Harper

Wellcome Trust Sanger Institute,  Hinxton,  Cambridge CB10 1SA,  England
Tel: 01223 834244 Fax: 494919         http://www.sanger.ac.uk/Users/adh/

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to