List:General Discussion« Previous MessageNext Message »
From:Nick Johnson Date:April 8 2000 8:16pm
Subject:Re: libmysql.c should #include errno.h, not sys/errno.h
View as plain text  
Ok, no problem.  I just ran mysqlbug, which defaulted to sending to
mysql@stripped.

I submitted a patch about 2 months ago that restarts the select in
mysql_real_connect upon signal interrupts... do you know if that report
was noticed, or should I resubmit my patch to bugs@?

   Nick

On Fri, 7 Apr 2000, Thimble Smith wrote:

> Thanks for the good bug report.  In the future, please send solid
> reports like this to bugs@stripped, so that they can get
> the fullest developer attention.
> 
> We'll get this fixed in the next release.  (I wonder why we used
> sys/errno.h in the first place?)
> 
> Tim
> 
> 
> On Fri, Apr 07, 2000 at 03:31:06PM -0700, njohnson@stripped wrote:
> >>Description:
> >libmysql.c includes <sys/errno.h> which bypasses a conditional define
> >for extern int errno; if _REENTRANT is defined, errno is defined as a
> >function which makes errno threadsafe.
> >>How-To-Repeat:
> >Include libmysql in any threaded program which may generate an error
> >in another thread while attempting a connection to a mysql server in 
> >another thread.  The mysql connection will fail because errno is not
> >set to EINPROGRESS by the time the call is made to check errno.
> >>Fix:
> >*** client/libmysql.c.orig     Sat Dec 25 16:34:04 1999
> >--- client/libmysql.c  Thu Mar  9 17:59:51 2000
> >***************
> >*** 53,61 ****
> >  #define ERRNO WSAGetLastError()
> >  #define perror(A)
> >  #else
> >! #include <sys/errno.h>
> >  #define ERRNO errno
> >  #define SOCKET_ERROR -1
> >  #define closesocket(A) close(A)
> >  #endif
> >  
> >--- 53,61 ----
> >  #define ERRNO WSAGetLastError()
> >  #define perror(A)
> >  #else
> >! #include <errno.h>
> >  #define ERRNO errno
> >  #define SOCKET_ERROR -1
> >  #define closesocket(A) close(A)
> >  #endif
> >
> >
> >>Submitter-Id:	<submitter ID>
> >>Originator:	Nick R. Johnson
> >>Organization: Cisco Systems
> > 
> >>MySQL support: none [none | licence | email support | extended email support
> ]
> >>Synopsis:	libmysql should #include errno.h instead of sys/errno.h
> >>Severity:	serious 
> >>Priority:	medium 
> >>Category:	mysql
> >>Class:		sw-bug 
> >>Release:	mysql-3.22.32 (Source distribution)
> >
> >>Environment:
> >	
> >System: SunOS  5.7 sun4u sparc SUNW,Ultra-5_10
> >Architecture: sun4
> >
> >Some paths:  
> >GCC: 
> >gcc version 2.95.2 19991024 (release)
> >Compilation info: CC='gcc'  CFLAGS='-pipe -D_REENTRANT'  CXX='g++' 
> CXXFLAGS='-pipe -D_REENTRANT'  LDFLAGS=''
> >Configure command: ./configure  --enable-thead-safe-client --without-server
> --without-docs --without-bench --prefix=/usr/SD/mysql --exec-prefix=/usr/SD/mysql
> --with-pthread --with-debug
> >Perl: This is perl, version 5.004_05 built for sun4-solaris
> >
> >-- 
> >---------------------------------------------------------------------
> >Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
> >posting. To request this thread, e-mail mysql-thread33600@stripped
> >
> >To unsubscribe, send a message to:
> >    <mysql-unsubscribe-tim=mysql.com@stripped>
> >
> 
> -- 
> Tim Smith   < tim@stripped >  :MySQL Development Team:  Boone, NC  USA.
> 
> 

Thread
How to cope without COUNT(DISTINCT <field_name>)Holger Rauch12 Mar
  • Re: How to cope without COUNT(DISTINCT <field_name>)Chris12 Mar
  • Re: libmysql.c should #include errno.h, not sys/errno.hNick Johnson9 Apr