Sun native threads only work on Solaris 2.5 and higher. For 2.4 and earlier versions, you can use MIT-pthreads. See section MIT-pthreads notes. (FreeBSD).
If there are too many processes that try to connect very rapidly to the
mysqld one will get Error in accept : Protocol error in
the mysql log.
If you have the Sun Workshop 4.2 compiler you can configure with:
CC=cc CFLAGS="-Xa -fast -xstrconst -mt" CXX=CC CXXFLAGS="-xsb -noex -fast -mt"
./configure
You may also have to change the row in configure:
#if !defined(__STDC__) || __STDC__ != 1 to #if
!defined(__STDC__) because if you turn on __STDC__ with the
-Xc switch, the Sun compiler can't compile with the Solaris
`pthread.h' header files anymore. This is a Sun bug (Broken
compiler or broken include file).
If the compiled mysqld gives a error like: libc internal
error: _rmutex_unlock: rmutex not held you have tried to compile
MySQL with the Sun compiler without enabling the multi thread switch
-mt. Add -mt to CFLAGS and CXXFLAGS and try again.
If you get the following error when compiling MySQL with gcc:
gcc -O3 -g -O2 -DDBUG_OFF -o thr_alarm ... ./thr_alarm.c: In function `signal_hand': ./thr_alarm.c:556: too many arguments to function `sigwait'
This means that your gcc is not configured for your version of Solaris! The proper thing to do in this case is to get the newest egcs or gcc version and compile this with your current gcc compiler! At least for Solaris 2.5, almost all binary versions of gcc have old, unusable include files that will break all programs that use threads (and possible other programs!)
The tar in Solaris can't handle long file names; You may get the following error (or something similar) when unpacking the MySQL distribution:
x mysql-3.21.21a-beta-sun-solaris2.6-sparc/perl/Mysql-modules/blib/lib/auto/Msql-Mysql-modules, 0 bytes, 0 tape blocks tar: directory checksum error
In this case you have to use gnu tar to unpack the distribution. You can find copy of precompiled gnu tar (gtar) for Solaris at http://www.mysql.com/Downloads/
Go to the first, previous, next, last section, table of contents.