Commit bee9933a authored by unknown's avatar unknown

Small bug fixes


support-files/mysql.server-sys5.sh:
  Change mode to -rw-rw-r--
Docs/manual.texi:
  Added information about BeOS, Access 2000, AIX and user links
client/mysql.cc:
  Fixed SOURCE to work on windows
client/mysqldump.c:
  Strip of white space
configure.in:
  Fix for AIX
include/dbug.h:
  Assert handling
include/my_pthread.h:
  Ia64 needs more thread stack than other processors
include/my_sys.h:
  More comments
myisam/mi_key.c:
  Fixed wrong key length checks
mysql.proj:
  update
mysys/charset.c:
  Cleanup
mysys/mf_keycache.c:
  Moved SEC_LINK to file that used it
mysys/my_static.h:
  Moved SEC_LINK to file that used it
scripts/Makefile.am:
  Fix for debian
scripts/mysql_install_db.sh:
  Cleanup
sql/gen_lex_hash.cc:
  Better values
sql/ha_berkeley.cc:
  Fix of reading of unique key
sql/handler.cc:
  Fix memory allocation bug
sql/mysqld.cc:
  Fix for Ia64
sql/share/charsets/latin1.conf:
  Fixed sortorder back to scandinavian.
sql/sql_yacc.yy:
  FULL shouldn't be a keyword
support-files/Makefile.am:
  Fix for debian
support-files/mysql.server.sh:
  Cleanups
parent aaca0e3c
...@@ -228,6 +228,7 @@ System-specific issues ...@@ -228,6 +228,7 @@ System-specific issues
* HP-UX 10.20:: HP-UX 10.20 notes * HP-UX 10.20:: HP-UX 10.20 notes
* HP-UX 11.x:: HP-UX 11.x notes * HP-UX 11.x:: HP-UX 11.x notes
* MacOSX:: MacOSX notes * MacOSX:: MacOSX notes
* BEOS::
Linux notes (all Linux versions) Linux notes (all Linux versions)
...@@ -766,7 +767,7 @@ MySQL change history ...@@ -766,7 +767,7 @@ MySQL change history
Changes in release 3.23.x (Recommended; beta) Changes in release 3.23.x (Recommended; beta)
* News-3.23.24:: * News-3.23.24:: Changes in release 3.23.24
* News-3.23.23:: Changes in release 3.23.23 * News-3.23.23:: Changes in release 3.23.23
* News-3.23.22:: Changes in release 3.23.22 * News-3.23.22:: Changes in release 3.23.22
* News-3.23.21:: Changes in release 3.23.21 * News-3.23.21:: Changes in release 3.23.21
...@@ -5611,6 +5612,7 @@ distribution. ...@@ -5611,6 +5612,7 @@ distribution.
* HP-UX 10.20:: HP-UX 10.20 notes * HP-UX 10.20:: HP-UX 10.20 notes
* HP-UX 11.x:: HP-UX 11.x notes * HP-UX 11.x:: HP-UX 11.x notes
* MacOSX:: MacOSX notes * MacOSX:: MacOSX notes
* BEOS::
@end menu @end menu
@node Solaris, Solaris 2.7, Source install system issues, Source install system issues @node Solaris, Solaris 2.7, Source install system issues, Source install system issues
...@@ -6874,11 +6876,25 @@ Automatic detection of @code{xlC} is missing from Autoconf, so a ...@@ -6874,11 +6876,25 @@ Automatic detection of @code{xlC} is missing from Autoconf, so a
@strong{MySQL}: (The example uses the IBM compiler) @strong{MySQL}: (The example uses the IBM compiler)
@example @example
shell> CC="xlc_r" CFLAGS="-ma -O3 -qstrict" \ export CC="xlc_r -ma -O3 -qstrict -qoptimize=3 -qmaxmem=8192 "
CXX="xlC_r" CXXFLAGS="-ma -O3 -qstrict" \ export CXX="xlC_r -ma -O3 -qstrict -qoptimize=3 -qmaxmem=8192"
./configure export CFLAGS="-I /usr/local/include"
export LDLFAGS="-L /usr/local/lib"
export CPPFLAGS=$CFLAGS
export CXXFLAGS=$CFLAGS
./configure --prefix=/usr/local \
--localstatedir=/var/mysql \
--sysconfdir=/etc/mysql \
--sbindir='/usr/local/bin' \
--libexecdir='/usr/local/bin' \
--enable-thread-safe-client \
--enable-large-files
@end example @end example
The above is the options used to compile the @strong{MySQL} distribution that
can be found at @uref{http://www-frec.bull.com/, www-frec.bull.com}.
If you change the @code{-O3} to @code{-O2} in the above configure line, If you change the @code{-O3} to @code{-O2} in the above configure line,
you must also remove the @code{-qstrict} option (this is a limitation in you must also remove the @code{-qstrict} option (this is a limitation in
the IBM C compiler). the IBM C compiler).
...@@ -6886,16 +6902,26 @@ the IBM C compiler). ...@@ -6886,16 +6902,26 @@ the IBM C compiler).
If you are using @code{gcc} or @code{egcs} to compile @strong{MySQL}, you If you are using @code{gcc} or @code{egcs} to compile @strong{MySQL}, you
@strong{MUST} use the @code{-fno-exceptions} flag, as the exception @strong{MUST} use the @code{-fno-exceptions} flag, as the exception
handling in @code{gcc}/@code{egcs} is not thread-safe! (This is tested with handling in @code{gcc}/@code{egcs} is not thread-safe! (This is tested with
@code{egcs} 1.1.) We recommend the following @code{configure} line with @code{egcs} 1.1.). There is also some known problems with IBM's assembler
@code{egcs} and @code{gcc} on AIX: which may cause it to generate bad code when used with gcc.
We recommend the following @code{configure} line with @code{egcs} and
@code{gcc 2.95} on AIX:
@example @example
shell> CC=gcc \ shell> CC="gcc -pipe -mcpu=power2 -Wa,-many" \
CXX=gcc \ CXX="gcc -pipe -mcpu=power2 -Wa,-many" \
CXXFLAGS="-felide-constructors -fno-exceptions -fno-rtti" \" \ CXXFLAGS="-felide-constructors -fno-exceptions -fno-rtti" \
./configure --prefix=/usr/local/mysql --with-debug --with-low-memory ./configure --prefix=/usr/local/mysql --with-debug --with-low-memory
@end example @end example
The @code{-Wa,-many} is necessary for the compile to be successful. IBM is
aware of this problem but is in to hurry to fix because of the
workaround available. We don't know if the @code{-fno-exceptions} is required
with @code{gcc 2.95}, but as @strong{MySQL} doesn't use exceptions and the
above option generates faster code we recommend that one should always use
this option with @code{egcs / gcc}.
If you have problems with signals (@strong{MySQL} dies unexpectedly If you have problems with signals (@strong{MySQL} dies unexpectedly
under high load) you may have found an OS bug with threads and under high load) you may have found an OS bug with threads and
signals. In this case you can tell @strong{MySQL} not to use signals by signals. In this case you can tell @strong{MySQL} not to use signals by
...@@ -7038,7 +7064,7 @@ The optimization flags used by @strong{MySQL} (-O3) are not recognized ...@@ -7038,7 +7064,7 @@ The optimization flags used by @strong{MySQL} (-O3) are not recognized
by HP's compilers. I did not change the flags. by HP's compilers. I did not change the flags.
@end itemize @end itemize
@node MacOSX, , HP-UX 11.x, Source install system issues @node MacOSX, BEOS, HP-UX 11.x, Source install system issues
@subsection MacOS X notes @subsection MacOS X notes
You can get @strong{MySQL} to work on MacOS X by following the links to You can get @strong{MySQL} to work on MacOS X by following the links to
...@@ -7057,6 +7083,20 @@ alias mysql '/usr/local/mysql/bin/mysql' ...@@ -7057,6 +7083,20 @@ alias mysql '/usr/local/mysql/bin/mysql'
alias mysqladmin '/usr/local/mysql/libexec/mysqladmin' alias mysqladmin '/usr/local/mysql/libexec/mysqladmin'
@end example @end example
@node BEOS, , MacOSX, Source install system issues
@subsection BeOS notes
We are really interested in getting @strong{MySQL} to work on BeOS, but
unfortunately we don't have any person that knows BeOS or have
time to do a port.
We are interested to find someone to do a port and we will help them
with any techincal questions they may have while doing the port.
We have previously talked with some BeOS developers that have said that
@strong{MySQL} is '80% ported to BeOS', but we haven't heard from these
in a while.
@node Windows, OS/2, Source install system issues, Installing @node Windows, OS/2, Source install system issues, Installing
@section Windows notes @section Windows notes
...@@ -25922,6 +25962,18 @@ whole databases. @xref{Backup}. ...@@ -25922,6 +25962,18 @@ whole databases. @xref{Backup}.
mysqldump --opt database > backup-file.sql mysqldump --opt database > backup-file.sql
@end example @end example
You can read this back into @strong{MySQL} with:
@example
mysql database < backup-file.sql
@end example
or
@example
mysql -e "source /patch-to-backup/backup-file.sql" database
@end example
However, it's also very useful to populate another @strong{MySQL} server with However, it's also very useful to populate another @strong{MySQL} server with
information from a database: information from a database:
...@@ -28115,9 +28167,10 @@ program. ...@@ -28115,9 +28167,10 @@ program.
@node Which ODBC OS, ODBC administrator, ODBC, ODBC @node Which ODBC OS, ODBC administrator, ODBC, ODBC
@section Operating systems supported by MyODBC @section Operating systems supported by MyODBC
@strong{MyODBC} is a 32-bit ODBC (2.50) level 0 driver for connecting @strong{MyODBC} is a 32-bit ODBC (2.50) level 0 (with level 1 and level
an ODBC-aware application to @strong{MySQL}. @strong{MyODBC} works on 2 features) driver for connecting an ODBC-aware application to
Windows95, Windows98, NT and on most Unix platforms. @strong{MySQL}. @strong{MyODBC} works on Windows95, Windows98, NT and
on most Unix platforms.
Normally you only need to install @strong{MyODBC} on Windows machines. Normally you only need to install @strong{MyODBC} on Windows machines.
You only need @strong{MyODBC} for Unix if you have a program like You only need @strong{MyODBC} for Unix if you have a program like
...@@ -28327,6 +28380,16 @@ In some cases, Access may generate illegal SQL queries that ...@@ -28327,6 +28380,16 @@ In some cases, Access may generate illegal SQL queries that
@code{"Query|SQLSpecific|Pass-Through"} from the Access menu. @code{"Query|SQLSpecific|Pass-Through"} from the Access menu.
@end itemize @end itemize
@item ADO
When you access @strong{MyODBC} through ADO, @strong{MyODBC} doesn't
return a result for @code{SQLRowCount} for a query. We have tried to
track this down and according to ODBC logs, @strong{MyODBC} returns the
correct answer but the ADO client only gets -1 back from the ODBC
manager. Because of this we can only assume this is a bug in ADO.
The only known workaround is to use a @code{SELECT COUNT(*)} statement
for a similar query to get the correct row count.
@item Borland Builder 4 @item Borland Builder 4
When you start a query you can use the property @code{Active} or use the When you start a query you can use the property @code{Active} or use the
method @code{Open}. Note that @code{Active} will start by automatically issue method @code{Open}. Note that @code{Active} will start by automatically issue
...@@ -34424,8 +34487,7 @@ more than one way to compute} ...@@ -34424,8 +34487,7 @@ more than one way to compute}
@item @uref{http://www.yaboo.dk/, Yaboo - Yet Another BOOkmarker} @item @uref{http://www.yaboo.dk/, Yaboo - Yet Another BOOkmarker}
@c Didn't answer 2000-07-11 item @uref{http://www.yahoosuck.com, Yahoosuck}
@c @item @uref{http://www.yahoosuck.com, Yahoosuck}
@item @uref{http://www.ozsearch.com.au, OzSearch Internet Guide} @item @uref{http://www.ozsearch.com.au, OzSearch Internet Guide}
...@@ -34438,6 +34500,8 @@ more than one way to compute} ...@@ -34438,6 +34500,8 @@ more than one way to compute}
@itemize @bullet @itemize @bullet
@item @uref{http:www.spylog.ru/, SpyLOG ; A very popular web counter site}
@item @uref{http://www.tucows.com/, TuCows Network; Free Software archive} @item @uref{http://www.tucows.com/, TuCows Network; Free Software archive}
@item @uref{http://www.jobvertise.com,Jobvertise: Post and search for jobs} @item @uref{http://www.jobvertise.com,Jobvertise: Post and search for jobs}
...@@ -34967,11 +35031,18 @@ only on Linux. ...@@ -34967,11 +35031,18 @@ only on Linux.
You can always find the latest version You can always find the latest version
@uref{http://www.trash.net/~ffischer/admin/index.html, here}. @uref{http://www.trash.net/~ffischer/admin/index.html, here}.
@item @uref{http://www.mysql.com/Downloads/Win32/MySQL-Maker091.zip,MySQL-Maker 091}.
Shareware @strong{MySQL} client for windows. It's WYSIWYG tool which allows
you to create, change and delete databases and tables.
You can change field - structure and add, change and delete data in
these tables directly without ODBC-driver.
@uref{http://www.presult.de, MySQL Maker homepage (look under support/downloads)}
@item @uref{http://www.mysql.com/Downloads/Contrib/mysqlwinadmn.zip, mysqlwinadmn.zip} @item @uref{http://www.mysql.com/Downloads/Contrib/mysqlwinadmn.zip, mysqlwinadmn.zip}
Windows GUI (binary only) to administrate a database, by David B. Mansel, Windows GUI (binary only) to administrate a database, by David B. Mansel,
@email{david@@zhadum.org}. @email{david@@zhadum.org}.
@item @uref{http://www.mysql.com/Downloads/Contrib/netadmin.zip, netadmin.zip} @item @uref{http://www.mysql.com/Downloads/Win32/netadmin.zip, netadmin.zip}
An administrator tool for @strong{MySQL} on Windows 95/98 and Windows NT An administrator tool for @strong{MySQL} on Windows 95/98 and Windows NT
4.0. Only tested with @strong{MySQL} 3.23.5 - 3.23.7. Written using the 4.0. Only tested with @strong{MySQL} 3.23.5 - 3.23.7. Written using the
Tmysql components. Tmysql components.
...@@ -34982,6 +35053,9 @@ have still some bugs. you can test the program with all features. Please ...@@ -34982,6 +35053,9 @@ have still some bugs. you can test the program with all features. Please
send bugs and hints to Marco Suess @email{ms@@it-netservice.de}. Original send bugs and hints to Marco Suess @email{ms@@it-netservice.de}. Original
URL @url{http://www.it-netservice.de/pages/software/index.html}. URL @url{http://www.it-netservice.de/pages/software/index.html}.
@item @uref{http://www.mysql.com/Downloads/Win32/netadmin2.zip, netadmin2.zip}
New version of netadmin; See above for details.
@item @uref{http://www.mysql.com/Downloads/Win32/ARTADMIN203.EXE,Atronic's @strong{MySQL} client for Windows 2.0.3.0}. @item @uref{http://www.mysql.com/Downloads/Win32/ARTADMIN203.EXE,Atronic's @strong{MySQL} client for Windows 2.0.3.0}.
Home page for this can be found at: @uref{http://www.artronic.hr}. Home page for this can be found at: @uref{http://www.artronic.hr}.
@item @uref{http://www.mysql.com/Downloads/Win32/W9xstop.zip,Utility from Artronic to stop MySQL on win9x} @item @uref{http://www.mysql.com/Downloads/Win32/W9xstop.zip,Utility from Artronic to stop MySQL on win9x}
...@@ -35184,11 +35258,17 @@ This module authenticates users via @code{pam}, using @strong{MySQL}. ...@@ -35184,11 +35258,17 @@ This module authenticates users via @code{pam}, using @strong{MySQL}.
Netscape Web Server API (NSAPI) functions to authenticate (BASIC) users Netscape Web Server API (NSAPI) functions to authenticate (BASIC) users
against @strong{MySQL} tables. By Yuan John Jiang. against @strong{MySQL} tables. By Yuan John Jiang.
@item @uref{http://www.mysql.com/Downloads/Contrib/qmail-1.03-mysql-0.6.5.patch.gz, @item @uref{http://www.mysql.com/Downloads/Contrib/qmail-1.03-mysql-0.6.6.patch.gz,qmail-1.03-mysql-0.6.6.patch.gz}
qmail-1.03-mysql-0.6.5.patch.gz}
Patch for qmail to authenticate users from a @strong{MySQL} table. Patch for qmail to authenticate users from a @strong{MySQL} table.
By @email{takeshi@@SoftAgency.co.jp}
@item @uref{http://www.mysql.com/Downloads/Contrib/proftpd-1.2.0rc2-fix-mysql.patch, proftpd-1.2.0rc2-fix-mysql.patch}
Patch for proftpd1.2.0rc2. By @email{takeshi@@SoftAgency.co.jp}
@item @uref{http://www.mysql.com/Downloads/Contrib/pwcheck_mysql-0.1.tar.gz,pwcheck_mysql-0.1.tar.gz} @item @uref{http://www.mysql.com/Downloads/Contrib/pwcheck_mysql-0.1.tar.gz,pwcheck_mysql-0.1.tar.gz}
An authentication module for the Cyrus IMAP server. By Aaron Newsome. An authentication module for the Cyrus IMAP server. By Aaron Newsome.
@end itemize @end itemize
@appendixsec Converters @appendixsec Converters
...@@ -35260,16 +35340,19 @@ Raw port of a SQL mode for XEmacs. Supports completion. Original by ...@@ -35260,16 +35340,19 @@ Raw port of a SQL mode for XEmacs. Supports completion. Original by
Peter D. Pezaris @email{pez@@atlantic2.sbi.com} and partial Peter D. Pezaris @email{pez@@atlantic2.sbi.com} and partial
@strong{MySQL} port by David Axmark. @strong{MySQL} port by David Axmark.
@item @uref{http://www.mysql.com/Downloads/Win32/MyAccess97_Ver_1_01.zip, MyAccess97 1.01} @item @uref{http://www.mysql.com/Downloads/Win32/myaccess97_1_1.zip, MyAccess97 1.1}
MyAccess is an AddIn for Access 97 and handles a lot of maintanance work @item @uref{http://www.mysql.com/Downloads/Win32/myaccess2000_1_1.zip, MyAccess2000 1.1}
for @strong{MySQL} databases.
@item @uref{http://www.mysql.com/Downloads/Win32/MyAccess2000_Ver_1_01.zip, MyAccess2000 1.01} MyAccess is an AddIn for MS Access 97/2000 which allows you to manage MySQL databases from within Access. Main functions are:
MyAccess is an AddIn for Access 2000 and handles a lot of maintanance work @itemize @bullet
for @strong{MySQL} databases. @item Create/Modify Tables
@item Execute Queries against MySQL
@item Extract "Create Table-Scripts' from MySQL
@item Import/Export tables from Access to MySQL and vice versa
@item Log Changes
@end itemize
@uref{http://www.mysql.com/Downloads/Win32/MyAccess-1.01.readme, Written by Hubertus Hiden. @uref{http://myaccess.fsn.net, MyAccess homepage}.
MyAccess-readme}. By Hubertus Hiden.
@item @uref{http://www.mysql.com/Downloads/Contrib/radius-0.3.tar.gz, radius-0.3.tar.gz} @item @uref{http://www.mysql.com/Downloads/Contrib/radius-0.3.tar.gz, radius-0.3.tar.gz}
Patches for @code{radiusd} to make it support @strong{MySQL}. By Wim Bonis, Patches for @code{radiusd} to make it support @strong{MySQL}. By Wim Bonis,
...@@ -35729,12 +35812,24 @@ though, so 3.23 is not released as a stable version yet. ...@@ -35729,12 +35812,24 @@ though, so 3.23 is not released as a stable version yet.
To make it possibly to reliable dump and restore tables with To make it possibly to reliable dump and restore tables with
@code{TIMESTAMP(X)} columns, @code{MySQL} now reports columns with X @code{TIMESTAMP(X)} columns, @code{MySQL} now reports columns with X
other than 14 or 8 to be strings. other than 14 or 8 to be strings.
@item
Changed sort order for latin1 as it was before 3.23.22. Any table with
@code{CHAR} columns that may have characters > ASCII 128 created or
modified with 3.23.22 must be repaired!
@item
Fixed small memory leak introduced from 3.23.22 when creating a
temporary table.
@item
Fixed problem with BDB tables and reading on unique (not primary) key.
@end itemize @end itemize
@node News-3.23.23, News-3.23.22, News-3.23.24, News-3.23.x @node News-3.23.23, News-3.23.22, News-3.23.24, News-3.23.x
@appendixsubsec Changes in release 3.23.23 @appendixsubsec Changes in release 3.23.23
@itemize @bullet @itemize @bullet
@item @item
Changed sort order for 'German'; All tables created with 'German' sortorder
must be repaired with @code{REPAIR TABLE} or myisamchk before use!
@item
Added option @code{--core-file} to @code{mysqld} to get a core file on Added option @code{--core-file} to @code{mysqld} to get a core file on
Linux if mysqld dies on the SIGSEGV signal. Linux if mysqld dies on the SIGSEGV signal.
@item @item
...@@ -35828,6 +35923,9 @@ Fixed fatal bug in @code{LOAD TABLE FROM MASTER} that did not lock the table dur ...@@ -35828,6 +35923,9 @@ Fixed fatal bug in @code{LOAD TABLE FROM MASTER} that did not lock the table dur
More variables in @code{SHOW SLAVE STATUS} and @code{SHOW MASTER STATUS} More variables in @code{SHOW SLAVE STATUS} and @code{SHOW MASTER STATUS}
@item @item
@code{SLAVE STOP} now will not return until the slave thread actually exits @code{SLAVE STOP} now will not return until the slave thread actually exits
@item
Full text search via the @code{MATCH} function and @code{FULLTEXT} index type.
(For MyISAM files). This made @code{FULLTEXT} is reserved word.
@end itemize @end itemize
@node News-3.23.22, News-3.23.21, News-3.23.23, News-3.23.x @node News-3.23.22, News-3.23.21, News-3.23.23, News-3.23.x
...@@ -300,7 +300,7 @@ int main(int argc,char *argv[]) ...@@ -300,7 +300,7 @@ int main(int argc,char *argv[])
} }
} }
#endif #endif
sprintf(buff, "Type 'help;' or '\\h' for help.\n"); sprintf(buff, "Type 'help;' or '\\h' for help. Type '\\c' to clear the buffer\n");
put_info(buff,INFO_INFO); put_info(buff,INFO_INFO);
status.exit_status=read_lines(1); // read lines and execute them status.exit_status=read_lines(1); // read lines and execute them
mysql_end(0); mysql_end(0);
...@@ -1680,8 +1680,9 @@ static int com_source(String *buffer, char *line) ...@@ -1680,8 +1680,9 @@ static int com_source(String *buffer, char *line)
while (end > source_name && (isspace(end[-1]) || iscntrl(end[-1]))) while (end > source_name && (isspace(end[-1]) || iscntrl(end[-1])))
end--; end--;
end[0]=0; end[0]=0;
unpack_filename(source_name,source_name);
/* open file name */ /* open file name */
if (!(sql_file = my_fopen(source_name, O_RDONLY,MYF(0)))) if (!(sql_file = my_fopen(source_name, O_RDONLY | O_BINARY,MYF(0))))
{ {
char buff[FN_REFLEN+60]; char buff[FN_REFLEN+60];
sprintf(buff,"Failed to open file '%s', error: %d", source_name,errno); sprintf(buff,"Failed to open file '%s', error: %d", source_name,errno);
......
...@@ -4,7 +4,7 @@ dnl Process this file with autoconf to produce a configure script. ...@@ -4,7 +4,7 @@ dnl Process this file with autoconf to produce a configure script.
AC_INIT(sql/mysqld.cc) AC_INIT(sql/mysqld.cc)
AC_CANONICAL_SYSTEM AC_CANONICAL_SYSTEM
# The Docs Makefile.am parses this line! # The Docs Makefile.am parses this line!
AM_INIT_AUTOMAKE(mysql, 3.23.23-beta) AM_INIT_AUTOMAKE(mysql, 3.23.24-beta)
AM_CONFIG_HEADER(config.h) AM_CONFIG_HEADER(config.h)
PROTOCOL_VERSION=10 PROTOCOL_VERSION=10
...@@ -685,8 +685,8 @@ case $SYSTEM_TYPE in ...@@ -685,8 +685,8 @@ case $SYSTEM_TYPE in
;; ;;
*aix4.3*) *aix4.3*)
echo "Adding defines for AIX" echo "Adding defines for AIX"
CFLAGS="$CFLAGS -DUNDEF_HAVE_INITGROUPS" CFLAGS="$CFLAGS -Wa,-many -DUNDEF_HAVE_INITGROUPS"
CXXFLAGS="$CXXFLAGS -DUNDEF_HAVE_INITGROUPS" CXXFLAGS="$CXXFLAGS -Wa,-many -DUNDEF_HAVE_INITGROUPS"
;; ;;
esac esac
...@@ -789,6 +789,7 @@ then ...@@ -789,6 +789,7 @@ then
# #
elif test "$with_named_thread" = "no" elif test "$with_named_thread" = "no"
then then
AC_MSG_RESULT("no")
AC_MSG_CHECKING("SCO UnixWare 7.1 native threads") AC_MSG_CHECKING("SCO UnixWare 7.1 native threads")
if expr "$SYSTEM_TYPE" : ".*sco.*" > /dev/null if expr "$SYSTEM_TYPE" : ".*sco.*" > /dev/null
then then
...@@ -807,6 +808,7 @@ then ...@@ -807,6 +808,7 @@ then
else else
AC_DEFINE(HAVE_UNIXWARE7_POSIX) AC_DEFINE(HAVE_UNIXWARE7_POSIX)
fi fi
AC_MSG_RESULT("yes")
# We must have cc # We must have cc
AC_MSG_CHECKING("for gcc") AC_MSG_CHECKING("for gcc")
if expr "$CC" : ".*gcc.*" if expr "$CC" : ".*gcc.*"
...@@ -817,7 +819,6 @@ then ...@@ -817,7 +819,6 @@ then
CC="$CC -Kthread -DUNIXWARE_7"; CC="$CC -Kthread -DUNIXWARE_7";
CXX="$CXX -Kthread -DUNIXWARE_7"; CXX="$CXX -Kthread -DUNIXWARE_7";
fi fi
AC_MSG_RESULT("yes")
else else
{ echo "configure: error: Can't find thread libs on SCO UnixWare7. See the Installation chapter in the Reference Manual." 1>&2; exit 1; }; { echo "configure: error: Can't find thread libs on SCO UnixWare7. See the Installation chapter in the Reference Manual." 1>&2; exit 1; };
fi fi
......
...@@ -66,6 +66,7 @@ extern void _db_unlock_file(); ...@@ -66,6 +66,7 @@ extern void _db_unlock_file();
#define DEBUGGER_ON _no_db_=0 #define DEBUGGER_ON _no_db_=0
#define DBUG_LOCK_FILE { _db_lock_file(); } #define DBUG_LOCK_FILE { _db_lock_file(); }
#define DBUG_UNLOCK_FILE { _db_unlock_file(); } #define DBUG_UNLOCK_FILE { _db_unlock_file(); }
#define DBUG_ASSERT(A) A
#else /* No debugger */ #else /* No debugger */
#define DBUG_ENTER(a1) #define DBUG_ENTER(a1)
...@@ -85,6 +86,7 @@ extern void _db_unlock_file(); ...@@ -85,6 +86,7 @@ extern void _db_unlock_file();
#define DEBUGGER_ON #define DEBUGGER_ON
#define DBUG_LOCK_FILE #define DBUG_LOCK_FILE
#define DBUG_UNLOCK_FILE #define DBUG_UNLOCK_FILE
#define DBUG_ASSERT(A) {}
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
} }
......
...@@ -490,6 +490,11 @@ extern int pthread_dummy(int); ...@@ -490,6 +490,11 @@ extern int pthread_dummy(int);
/* All thread specific variables are in the following struct */ /* All thread specific variables are in the following struct */
#define THREAD_NAME_SIZE 10 #define THREAD_NAME_SIZE 10
#if defined(__ia64__)
#define DEFAULT_THREAD_STACK (128*1024)
#else
#define DEFAULT_THREAD_STACK (64*1024)
#endif
struct st_my_thread_var struct st_my_thread_var
{ {
......
...@@ -313,9 +313,13 @@ typedef int (*qsort2_cmp)(const void *, const void *, const void *); ...@@ -313,9 +313,13 @@ typedef int (*qsort2_cmp)(const void *, const void *, const void *);
((info)->rc_pos - (info)->rc_request_pos)) ((info)->rc_pos - (info)->rc_request_pos))
typedef struct st_changeable_var { typedef struct st_changeable_var {
const char *name; const char *name; /* Name of variable */
long *varptr; long *varptr; /* Pointer to variable */
long def_value,min_value,max_value,sub_size,block_size; long def_value, /* Default value */
min_value, /* Min allowed value */
max_value, /* Max allowed value */
sub_size, /* Subtract this from given value */
block_size; /* Value should be a mult. of this */
} CHANGEABLE_VAR; } CHANGEABLE_VAR;
...@@ -527,6 +531,7 @@ extern void my_free_lock(byte *ptr,myf flags); ...@@ -527,6 +531,7 @@ extern void my_free_lock(byte *ptr,myf flags);
#define my_malloc_lock(A,B) my_malloc((A),(B)) #define my_malloc_lock(A,B) my_malloc((A),(B))
#define my_free_lock(A,B) my_free((A),(B)) #define my_free_lock(A,B) my_free((A),(B))
#endif #endif
#define alloc_root_inited(A) ((A)->min_malloc != 0)
void init_alloc_root(MEM_ROOT *mem_root,uint block_size); void init_alloc_root(MEM_ROOT *mem_root,uint block_size);
gptr alloc_root(MEM_ROOT *mem_root,unsigned int Size); gptr alloc_root(MEM_ROOT *mem_root,unsigned int Size);
void free_root(MEM_ROOT *root); void free_root(MEM_ROOT *root);
......
...@@ -283,7 +283,7 @@ static int _mi_put_key_in_record(register MI_INFO *info, uint keynr, ...@@ -283,7 +283,7 @@ static int _mi_put_key_in_record(register MI_INFO *info, uint keynr,
uint length; uint length;
get_key_length(length,key); get_key_length(length,key);
#ifdef CHECK_KEYS #ifdef CHECK_KEYS
if (length >= keyseg->length || key+length > key_end) if (length > keyseg->length || key+length > key_end)
goto err; goto err;
#endif #endif
memcpy(record+keyseg->start,(byte*) key, length); memcpy(record+keyseg->start,(byte*) key, length);
...@@ -294,7 +294,7 @@ static int _mi_put_key_in_record(register MI_INFO *info, uint keynr, ...@@ -294,7 +294,7 @@ static int _mi_put_key_in_record(register MI_INFO *info, uint keynr,
uint length; uint length;
get_key_length(length,key); get_key_length(length,key);
#ifdef CHECK_KEYS #ifdef CHECK_KEYS
if (length >= keyseg->length || key+length > key_end) if (length > keyseg->length || key+length > key_end)
goto err; goto err;
#endif #endif
memcpy(record+keyseg->start+keyseg->bit_start, memcpy(record+keyseg->start+keyseg->bit_start,
......
No preview for this file type
...@@ -380,7 +380,7 @@ CHARSET_INFO *get_charset(uint cs_number, myf flags) ...@@ -380,7 +380,7 @@ CHARSET_INFO *get_charset(uint cs_number, myf flags)
(void) init_available_charsets(MYF(0)); /* If it isn't initialized */ (void) init_available_charsets(MYF(0)); /* If it isn't initialized */
cs=get_internal_charset(cs_number); cs=get_internal_charset(cs_number);
if (!cs && flags & MY_WME) if (!cs && (flags & MY_WME))
{ {
char index_file[FN_REFLEN], cs_string[23]; char index_file[FN_REFLEN], cs_string[23];
strmov(get_charsets_dir(index_file), "Index"); strmov(get_charsets_dir(index_file), "Index");
......
...@@ -42,6 +42,17 @@ ...@@ -42,6 +42,17 @@
#define CHANGED_BLOCKS_MASK (CHANGED_BLOCKS_HASH-1) #define CHANGED_BLOCKS_MASK (CHANGED_BLOCKS_HASH-1)
#define FLUSH_CACHE 2000 /* Sort this many blocks at once */ #define FLUSH_CACHE 2000 /* Sort this many blocks at once */
typedef struct sec_link {
struct sec_link *next_hash,**prev_hash;/* Blocks linked acc. to hash-value */
struct sec_link *next_used,*prev_used;
struct sec_link *next_changed,**prev_changed;
File file;
my_off_t diskpos;
byte *buffer;
my_bool changed;
} SEC_LINK;
static uint find_next_bigger_power(uint value); static uint find_next_bigger_power(uint value);
static SEC_LINK *find_key_block(int file,my_off_t filepos,int *error); static SEC_LINK *find_key_block(int file,my_off_t filepos,int *error);
...@@ -287,7 +298,6 @@ byte *key_cache_read(File file, my_off_t filepos, byte *buff, uint length, ...@@ -287,7 +298,6 @@ byte *key_cache_read(File file, my_off_t filepos, byte *buff, uint length,
} while ((length-= read_length)); } while ((length-= read_length));
pthread_mutex_unlock(&THR_LOCK_keycache); pthread_mutex_unlock(&THR_LOCK_keycache);
return(start); return(start);
pthread_mutex_unlock(&THR_LOCK_keycache);
} }
_my_cache_r_requests++; _my_cache_r_requests++;
_my_cache_read++; _my_cache_read++;
...@@ -457,6 +467,7 @@ static SEC_LINK *find_key_block(int file, my_off_t filepos, int *error) ...@@ -457,6 +467,7 @@ static SEC_LINK *find_key_block(int file, my_off_t filepos, int *error)
static void free_block(SEC_LINK *used) static void free_block(SEC_LINK *used)
{ {
used->file= -1; used->file= -1;
used->changed=0;
if (used != _my_used_first) /* Relink used-chain */ if (used != _my_used_first) /* Relink used-chain */
{ {
if (used == _my_used_last) if (used == _my_used_last)
...@@ -568,7 +579,6 @@ int flush_key_blocks(File file, enum flush_type type) ...@@ -568,7 +579,6 @@ int flush_key_blocks(File file, enum flush_type type)
if (type != FLUSH_KEEP && type != FLUSH_FORCE_WRITE) if (type != FLUSH_KEEP && type != FLUSH_FORCE_WRITE)
{ {
/* This will not destroy position or data */ /* This will not destroy position or data */
used->changed=0;
_my_blocks_changed--; _my_blocks_changed--;
free_block(used); free_block(used);
} }
......
...@@ -33,16 +33,6 @@ struct st_remember { ...@@ -33,16 +33,6 @@ struct st_remember {
sig_handler (*func)(int number); sig_handler (*func)(int number);
}; };
typedef struct sec_link {
struct sec_link *next_hash,**prev_hash;/* Blocks linked acc. to hash-value */
struct sec_link *next_used,*prev_used;
struct sec_link *next_changed,**prev_changed;
File file;
my_off_t diskpos;
byte *buffer;
my_bool changed;
} SEC_LINK;
struct irem { struct irem {
struct remember *_pNext; /* Linked list of structures */ struct remember *_pNext; /* Linked list of structures */
struct remember *_pPrev; /* Other link */ struct remember *_pPrev; /* Other link */
......
...@@ -71,6 +71,7 @@ SUFFIXES = .sh ...@@ -71,6 +71,7 @@ SUFFIXES = .sh
@RM@ -f $@ $@-t @RM@ -f $@ $@-t
@SED@ \ @SED@ \
-e 's!@''bindir''@!$(bindir)!g' \ -e 's!@''bindir''@!$(bindir)!g' \
-e 's!@''sbindir''@!$(sbindir)!g' \
-e 's!@''scriptdir''@!$(bindir)!g' \ -e 's!@''scriptdir''@!$(bindir)!g' \
-e 's!@''prefix''@!$(prefix)!g' \ -e 's!@''prefix''@!$(prefix)!g' \
-e 's!@''datadir''@!$(datadir)!g' \ -e 's!@''datadir''@!$(datadir)!g' \
......
...@@ -11,56 +11,82 @@ ...@@ -11,56 +11,82 @@
ldata=@localstatedir@ ldata=@localstatedir@
execdir=@libexecdir@ execdir=@libexecdir@
bindir=@bindir@ bindir=@bindir@
sbindir=@sbindir@
force=0 force=0
IN_RPM=0 IN_RPM=0
defaults= defaults=
# Are we doing an rpm install? while [ "x$1" != x ]
if test "$1" = "-IN-RPM"; then IN_RPM=1; shift; fi do
if test "$1" = "--force"; then force=1; shift; fi case "$1" in
-*) eqvalue="`echo $1 |sed 's/[-_a-zA-Z0-9]*=//'`"
# Get mysqld/safe_mysqld options from /etc/my.cnf or ~/.my.cnf case "$1" in
case "$1" in -IN-RPM) IN_RPM=1
--no-defaults) defaults="$1"; conf=/nonexistent; shift ;; ;;
--defaults-file=*) defaults="$1"; conf=`echo "$1"|sed 's;^--defaults-file=;;'`; shift ;; --force) force=1
*) ;;
if test -w / --no-defaults=*) CONFIG_FILES=/nonexistent
then ;;
conf=/etc/my.cnf --defaults-file=*) CONFIG_FILES="$eqvalue"
else ;;
conf=$HOME/.my.cnf --basedir=*) SETVARS="$SETVARS basedir=\"$eqvalue\"; bindir=\"$eqvalue/bon\"; execdir=\"$eqvalue/libexec\"; sbindir=\"$eqvalue/sbin\"; "
fi
;; ;;
esac --ldata=*|--datadir=*) SETVARS="$SETVARS ldata=\"$eqvalue\";"
;;
--user=*) SETVARS="$SETVARS user=\"$eqvalue\";"
;;
esac
;;
esac
shift
done
if test -f "$conf" GetCNF () {
then
if grep "^datadir" $conf >/dev/null
then
ldata=`grep "^datadir" $conf | sed 's;^[^=]*=[ \t]*;;' | sed 's;[ \t]$;;'`
fi
if grep "^execdir" $conf >/dev/null
then
execdir=`grep "^execdir" $conf | sed 's;^[^=]*=[ \t]*;;' | sed 's;[ \t]$;;'`
fi
if grep "^bindir" $conf >/dev/null
then
bindir=`grep "^bindir" $conf | sed 's;^[^=]*=[ \t]*;;' | sed 's;[ \t]$;;'`
fi
if grep "^user" $conf >/dev/null
then
user=`grep "^user" $conf | sed 's;^[^=]*=[ \t]*;;' | sed 's;[ \t]$;;'`
fi
fi
for arg VARIABLES="basedir bindir datadir sbindir user pid-file log port socket"
# set it not already set
CONFIG_FILES=${CONFIG_FILES:-"/etc/my.cnf ./my.cnf $HOME/.my.cnf"}
for c in $CONFIG_FILES
do do
case "$arg" in if [ -f $c ]
--basedir=*) basedir=`echo "$arg"|sed 's;^--basedir=;;'`; bindir="$basedir/bin"; execdir="$basedir/libexec" ;; then
--datadir=*) ldata=`echo "$arg"|sed 's;^--datadir=;;'` ;; #echo "Processing $c..."
--user=*) user=`echo "$arg"|sed 's;^--user=;;'` ;; for v in $VARIABLES
do
# This method assumes last of duplicate $variable entries will be the
# value set ([mysqld])
# This could easily be rewritten to gather [xxxxx]-specific entries,
# but for now it looks like only the mysqld ones are needed for
# server startup scripts
eval `sed -n -e '/^$/d' -e '/^#/d' -e 's,[ ],,g' -e '/=/p' $c |\
awk -F= -v v=$v '{if ($1 == v) printf ("thevar=\"%s\"\n", $2)}'`
# it would be easier if the my.cnf and variable values were
# all matched, but since they aren't we need to map them here.
case $v in
pid-file) v=pid_file ;;
log) v=log_file ;;
datadir) v=ldata ;;
esac esac
# As long as $thevar isn't blank, use it to set or override current
# value
[ "$thevar" != "" ] && eval $v=$thevar
done
#else
# echo "No $c config file."
fi
done done
}
# run function to get config values
GetCNF
# Override/set with command-line values
eval $SETVARS
mdata=$ldata/mysql mdata=$ldata/mysql
......
...@@ -472,7 +472,7 @@ int main(int argc,char **argv) ...@@ -472,7 +472,7 @@ int main(int argc,char **argv)
int error; int error;
MY_INIT(argv[0]); MY_INIT(argv[0]);
start_value=7223692L; best_t1=2365832L; best_t2=1560117L; best_type=0; /* mode=4519 add=5 func_type: 0 */ start_value=2610463L; best_t1=8358376L; best_t2=860646L; best_type=2; /* mode=4111 add=8 func_type: 0 */
if (get_options(argc,(char **) argv)) if (get_options(argc,(char **) argv))
exit(1); exit(1);
......
...@@ -972,7 +972,7 @@ int ha_berkeley::index_read_idx(byte * buf, uint keynr, const byte * key, ...@@ -972,7 +972,7 @@ int ha_berkeley::index_read_idx(byte * buf, uint keynr, const byte * key,
statistic_increment(ha_read_key_count,&LOCK_status); statistic_increment(ha_read_key_count,&LOCK_status);
DBUG_ENTER("index_read_idx"); DBUG_ENTER("index_read_idx");
current_row.flags=DB_DBT_REALLOC; current_row.flags=DB_DBT_REALLOC;
DBUG_RETURN(read_row(file->get(file, transaction, DBUG_RETURN(read_row(file->get(key_file[keynr], transaction,
pack_key(&last_key, keynr, key_buff, key, pack_key(&last_key, keynr, key_buff, key,
key_len), key_len),
&current_row,0), &current_row,0),
......
...@@ -317,8 +317,11 @@ int handler::ha_open(const char *name, int mode, int test_if_locked) ...@@ -317,8 +317,11 @@ int handler::ha_open(const char *name, int mode, int test_if_locked)
} }
if (!error) if (!error)
{ {
if (!(ref=(byte*) alloc_root(&table->mem_root, if (!alloc_root_inited(&table->mem_root)) // If temporary table
ALIGN_SIZE(ref_length)*2))) ref=sql_alloc(ALIGN_SIZE(ref_length)*2);
else
ref=(byte*) alloc_root(&table->mem_root, ALIGN_SIZE(ref_length)*2);
if (!ref)
{ {
close(); close();
error=HA_ERR_OUT_OF_MEM; error=HA_ERR_OUT_OF_MEM;
......
...@@ -2302,7 +2302,8 @@ CHANGEABLE_VAR changeable_vars[] = { ...@@ -2302,7 +2302,8 @@ CHANGEABLE_VAR changeable_vars[] = {
{ "thread_cache_size", (long*) &thread_cache_size, 0,1,16384,0,1}, { "thread_cache_size", (long*) &thread_cache_size, 0,1,16384,0,1},
{ "tmp_table_size", (long*) &tmp_table_size,1024*1024L,1024,~0L, { "tmp_table_size", (long*) &tmp_table_size,1024*1024L,1024,~0L,
MALLOC_OVERHEAD,1}, MALLOC_OVERHEAD,1},
{ "thread_stack", (long*) &thread_stack,1024*64,1024*32,~0L,0,1024}, { "thread_stack", (long*) &thread_stack,DEFAULT_THREAD_STACK,1024*32,
~0L,0,1024},
{ "wait_timeout", (long*) &net_wait_timeout,NET_WAIT_TIMEOUT,1,~0L,0,1}, { "wait_timeout", (long*) &net_wait_timeout,NET_WAIT_TIMEOUT,1,~0L,0,1},
{ NullS,(long*) 0,0,0,0,0,0,} }; { NullS,(long*) 0,0,0,0,0,0,} };
......
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F 90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F
A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF
B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF
41 41 41 41 41 41 C6 43 45 45 45 45 49 49 49 49 41 41 41 41 5C 5B 5C 43 45 45 45 45 49 49 49 49
D0 4E 4F 4F 4F 4F 4F D7 4F 55 55 55 55 59 DE 53 44 4E 4F 4F 4F 4F 5D D7 D8 55 55 55 59 59 DE DF
41 41 41 41 41 41 C6 43 45 45 45 45 49 49 49 49 41 41 41 41 5C 5B 5C 43 45 45 45 45 49 49 49 49
D0 4E 4F 4F 4F 4F 4F F7 4F 55 55 55 55 59 DE 59 44 4E 4F 4F 4F 4F 5D F7 D8 55 55 55 59 59 DE FF
...@@ -2368,6 +2368,7 @@ keyword: ...@@ -2368,6 +2368,7 @@ keyword:
| ESCAPE_SYM {} | ESCAPE_SYM {}
| EXTENDED_SYM {} | EXTENDED_SYM {}
| FAST_SYM {} | FAST_SYM {}
| FULL {}
| FILE_SYM {} | FILE_SYM {}
| FIRST_SYM {} | FIRST_SYM {}
| FIXED_SYM {} | FIXED_SYM {}
......
...@@ -53,6 +53,7 @@ SUFFIXES = .sh ...@@ -53,6 +53,7 @@ SUFFIXES = .sh
@RM@ -f $@ $@-t @RM@ -f $@ $@-t
@SED@ \ @SED@ \
-e 's!@''bindir''@!$(bindir)!g' \ -e 's!@''bindir''@!$(bindir)!g' \
-e 's!@''sbindir''@!$(sbindir)!g' \
-e 's!@''scriptdir''@!$(bindir)!g' \ -e 's!@''scriptdir''@!$(bindir)!g' \
-e 's!@''prefix''@!$(prefix)!g' \ -e 's!@''prefix''@!$(prefix)!g' \
-e 's!@''datadir''@!$(datadir)!g' \ -e 's!@''datadir''@!$(datadir)!g' \
......
#!/bin/sh
# search & check GNU patch
PATCH="gpatch"
$PATCH --version || PATCH="patch"
$PATCH --version || exit
if /usr/bin/test ! -e PKG/stamp-pre ; then
grep VERSION configure | head -1 | sed 's/VERSION=//' > ./PKG/version
touch PKG/stamp-pre
fi
if /usr/bin/test ! -e PKG/stamp-patch ; then
${PATCH} -p0 < ./PKG/patch
touch PKG/stamp-patch
fi
if /usr/bin/test ! -e PKG/stamp-compile ; then
sh ./PKG/compile.sh ujis
touch PKG/stamp-compile
sh ./PKG/doc.sh ujis
fi
cd PKG
sh mkpkg.sh ujis
#!/bin/sh
# GNU ncurses
# search & check GNU make
GMAKE="gmake"
$GMAKE --version || GMAKE="make"
$GMAKE --version || exit
MAKE=$GMAKE
export MAKE
CC=gcc
CFLAGS="-O6 -fomit-frame-pointer"
CXX=gcc
CXXFLAGS="-O6 -fomit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti"
# LDFLAGS="-static"
LD=gcc
export CC
export CXX
export LD
export CFLAGS
export CXXFLAGS
# export LDFLAGS
# Solaris don't have libpthread.a.
if [ "x$1" = "x" ]; then
echo " please set character set"
exit
fi
CHAR="$1"
case "$1" in
[uU]*)
CHAR=ujis
;;
[sS]*)
CHAR=sjis
;;
esac
#---------------
P=`pwd`
if [ -f Makefile ] ; then
${GMAKE} distclean
fi
for i in bin sbin include man share/doc/mysql mysql-data
do
/usr/bin/mkdir -p PKG/tmp-${CHAR}/usr/local/${i}
done
/usr/bin/mkdir -p PKG/tmp-${CHAR}/etc/init.d
#----------------------------
./configure \
--prefix=/usr/local \
--libexecdir=/usr/local/sbin \
--sbindir=/usr/local/sbin \
--localstatedir=/usr/local/mysql-data \
--with-charset=${CHAR} \
--with-extra-charsets=all \
--with-raid \
--without-docs \
--without-bench \
--without-perl \
--with-gcc \
--with-mysqld-ldflags="-static" \
--with-client-ldflags="-static" \
--with-named-curses-libs=/usr/local/lib/libncurses.a \
--with-mysqld-user=mysql
# --with-berkeley-db-includes=/usr/local/include/db3 \
# --with-berkeley-db-libs=/usr/local/lib/libdb3.a \
# --with-low-memory
${GMAKE}
${GMAKE} install DESTDIR=${P}/PKG/tmp-${CHAR}
v=`grep '^SHARED_LIB_VERSION' configure.in | sed 's@SHARED_LIB_VERSION@@' | sed -e 's@=@@' -e 's@:@ @g' | awk '{print $1}'`
km="libmysqlclient.so.$v"
export km
(cd ${P}/PKG/tmp-${CHAR}/usr/local/lib/mysql/ ; \
for i in libmysqlclient* ; do \
if /usr/bin/test ! -L $i ; then \
mv $i ../ ; ln -sf ../$i ; \
fi ; \
done ; \
k=`ls libmysqlclient.so.*.*.*` ; \
cd .. ; \
if /usr/bin/test ! -z libmysqlclient.so ; then \
ln -sf $k libmysqlclient.so ;
fi ; \
if /usr/bin/test ! -z $km ; then \
ln -sf $k $km ;
fi ; \
)
#
(cd ${P}/PKG/tmp-${CHAR}/usr/local/bin ; strip * )
(cd ${P}/PKG/tmp-${CHAR}/usr/local/sbin ; strip * )
#!/bin/sh
CHAR="$1"
case "$1" in
[uU]*)
CHAR=ujis
;;
[sS]*)
CHAR=sjis
;;
esac
cp -r Docs/* PKG/tmp-${CHAR}/usr/local/share/doc/mysql/
cp INSTALL-SOURCE* COPYING* MIRRORS README* PKG/tmp-${CHAR}/usr/local/share/doc/mysql/
cd PKG/tmp-${CHAR}/usr/local/share/doc/mysql/
gzip *.txt *.texi *.info *.pdf
#!/bin/sh
if [ "x$1" = "x" ]; then
echo " please set charset"
exit
fi
CHAR="$1"
case "$1" in
[uU]*)
CHAR=ujis ; CH=uj
;;
[sS]*)
CHAR=sjis ; CH=sj
;;
esac
#-------------------
DIR=`pwd`
VERSION=`cat version`
T=`uname -p`
sed -e "s/@CHAR1@/${CH}/" \
-e "s/@CHAR2@/${CHAR}/" \
-e "s/@VERSION@/${VERSION}/" \
-e "s/@TYPE@/${T}/" \
pkginfo.ini > pkginfo.${CHAR}
sed -e "s,@DIR@,${DIR},g" \
-e "s,@PKGINFO@,${DIR}/pkginfo.${CHAR}," \
prototype.ini > prototype.${CHAR}
INIT="tmp-${CHAR}/etc/init.d/mysql"
cp ../support-files/mysql.server $INIT
chmod 755 $INIT
(cd tmp-${CHAR}; \
chown root etc usr ; \
chgrp sys etc usr ;\
chmod 755 usr etc; \
chgrp sys etc/init.d ; \
chmod 755 etc/init.d ; \
find . -print|pkgproto >> ../prototype.${CHAR})
pkgmk -o -f prototype.${CHAR} -r ${DIR}/tmp-${CHAR}
--- scripts/safe_mysqld.sh.orig Sat Sep 2 17:28:26 2000
+++ scripts/safe_mysqld.sh Sat Sep 2 17:31:19 2000
@@ -89,10 +89,10 @@
NOHUP_NICENESS=`nohup nice`
-if test $? -ne 0 || test x"$NOHUP_NICENESS" = x0 || test ! nice --1 echo foo > /dev/null 2>&1; then
+if test $? -ne 0 || test x"$NOHUP_NICENESS" = x0 || test ! nice -1 echo foo > /dev/null 2>&1; then
NOHUP_NICENESS="nohup"
else
- NOHUP_NICENESS="nice --$NOHUP_NICENESS nohup"
+ NOHUP_NICENESS="nice -$NOHUP_NICENESS nohup"
fi
export MYSQL_UNIX_PORT
@@ -163,7 +163,8 @@
# The only thing is ps x => redhat 5 gives warnings when using ps -x.
# kill -9 is used or the process won't react on the kill.
numofproces=`ps xa | grep -v "grep" | grep -c $ledir/mysqld`
- echo -e "\nNumber of processes running now: $numofproces" | tee -a $err_log
+ echo | tee -a $err_log
+ echo "Number of processes running now: $numofproces" | tee -a $err_log
I=1
while test "$I" -le "$numofproces"
do
@@ -185,4 +186,6 @@
echo "`date +'%y%m%d %H:%M:%S mysqld restarted'`" | tee -a $err_log
done
-echo -e "`date +'%y%m%d %H:%M:%S mysqld ended\n'`" | tee -a $err_log
+echo | tee -a $err_log
+echo "`date +'%y%m%d %H:%M:%S mysqld ended'`" | tee -a $err_log
+echo | tee -a $err_log
--- support-files/mysql.server.sh.orig Sat Sep 2 17:35:56 2000
+++ support-files/mysql.server.sh Sat Sep 2 17:36:35 2000
@@ -23,6 +23,9 @@
mysql_daemon_user=@MYSQLD_USER@
export PATH
+## your options...
+OPT=""
+
mode=$1
if test -w / # determine if we should look at the root config file
@@ -82,8 +85,9 @@
then
# Give extra arguments to mysqld with the my.cnf file. This script may
# be overwritten at next upgrade.
- $bindir/safe_mysqld \
- --user=$mysql_daemon_user --datadir=$datadir --pid-file=$pid_file --log=$log_file &
+ $bindir/safe_mysqld $OPT \
+ --user=$mysql_daemon_user --datadir=$datadir --pid-file=$pid_file &
+# --log=$log_file &
else
echo "Can't execute $bindir/safe_mysqld"
fi
--- configure.orig Sat Sep 2 17:54:03 2000
+++ configure Sat Sep 2 17:54:18 2000
@@ -202,7 +202,7 @@
--with-charset=CHARSET use CHARSET by default (one of: big5 cp1251 cp1257
croat czech danish dec8 dos estonia euc_kr gb2312 gbk
german1 greek hebrew hp8 hungarian koi8_ru koi8_ukr
- latin1 latin2 swe7 usa7 win1250 win1251 win1251ukr
+ latin1 latin2 swe7 usa7 win1250 win1251ukr
ujis sjis tis620; default is latin1)"
ac_help="$ac_help
--with-extra-charsets=cs1,cs2
@@ -8843,7 +8843,7 @@
# Choose a character set
-CHARSETS_AVAILABLE="big5 cp1251 cp1257 croat czech danish dec8 dos estonia euc_kr gb2312 gbk german1 greek hebrew hp8 hungarian koi8_ru koi8_ukr latin1 latin2 swe7 usa7 win1250 win1251 win1251ukr ujis sjis tis620"
+CHARSETS_AVAILABLE="big5 cp1251 cp1257 croat czech danish dec8 dos estonia euc_kr gb2312 gbk german1 greek hebrew hp8 hungarian koi8_ru koi8_ukr latin1 latin2 swe7 usa7 win1250 win1251ukr ujis sjis tis620"
DEFAULT_CHARSET=latin1
# Check whether --with-charset or --without-charset was given.
--- configure.in.orig Sat Sep 2 17:53:57 2000
+++ configure.in Sat Sep 2 17:54:36 2000
@@ -1517,14 +1517,14 @@
dnl or other special handling, you must also create
dnl strings/ctype-$charset_name.c
-CHARSETS_AVAILABLE="big5 cp1251 cp1257 croat czech danish dec8 dos estonia euc_kr gb2312 gbk german1 greek hebrew hp8 hungarian koi8_ru koi8_ukr latin1 latin2 swe7 usa7 win1250 win1251 win1251ukr ujis sjis tis620"
+CHARSETS_AVAILABLE="big5 cp1251 cp1257 croat czech danish dec8 dos estonia euc_kr gb2312 gbk german1 greek hebrew hp8 hungarian koi8_ru koi8_ukr latin1 latin2 swe7 usa7 win1250 win1251ukr ujis sjis tis620"
DEFAULT_CHARSET=latin1
AC_ARG_WITH(charset,
[ --with-charset=CHARSET use CHARSET by default (one of: big5 cp1251 cp1257
croat czech danish dec8 dos estonia euc_kr gb2312 gbk
german1 greek hebrew hp8 hungarian koi8_ru koi8_ukr
- latin1 latin2 swe7 usa7 win1250 win1251 win1251ukr
+ latin1 latin2 swe7 usa7 win1250 win1251ukr
ujis sjis tis620; default is latin1)],
[default_charset="$withval"],
[default_charset="$DEFAULT_CHARSET"])
PKG=MySQL
NAME=MySQL
ARCH=@TYPE@
VERSION=@VERSION@
CATEGORY=utility
VENDOR=TcX DataKonsult AB, Detron HB and MySQL AB
BASEDIR=/
CLASSES=none
#!/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb:/usr/ccs/bin
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib
export PATH
export LD_LIBRARY_PATH
D0="/usr/local/mysql-data"
D="${D0}/mysql"
DOFIX=0
if /usr/bin/test ! -f ${D}/tables_priv.frm -a -d ${D} ; then
DOFIX=1
fi
if [ ! -d ${D} ]; then
DOFIX=2
/usr/local/bin/mysql_install_db
fi
chown -R mysql $D0
chgrp -R mysql $D0
if /usr/bin/test $DOFIX -eq 1 ; then
/etc/init.d/mysql start
/usr/local/bin/mysql_fix_privilege_tables
else
/etc/init.d/mysql start || true
fi
#!/bin/sh
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb:/usr/ccs/bin
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib
export PATH
export LD_LIBRARY_PATH
if /usr/bin/test -x /etc/init.d/mysql ; then
/etc/init.d/mysql stop || true
fi
#----- user check
P=`grep mysql /etc/passwd`
G=`grep mysql /etc/group`
if /usr/bin/test "x$G" = "x" ; then
/usr/sbin/groupadd mysql
fi
if /usr/bin/test "x$P" = "x" ; then
/usr/sbin/useradd -g mysql -d /usr/local/mysql-data -s /bin/false mysql
fi
#!/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb:/usr/ccs/bin
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib
export PATH
export LD_LIBRARY_PATH
pid=`/usr/bin/ps -e | /usr/bin/grep mysqld | /usr/bin/sed -e 's/^ *//' -e 's/ .*//'`
[ "$pid" != "" ] && /usr/local/bin/mysqladmin shutdown
#---
#/usr/ucb/echo -n "Remove DATA Directory (All data expire) [Y/N]? "
#read I
I=No
case "$I" in
Y*|y*)
/usr/ucb/echo -n "Removing MySQL DATA ALL..."
rm -rf /usr/local/mysql-data
echo "done."
;;
*)
echo "not purge DATA directory"
;;
esac;
i pkginfo=@PKGINFO@
i postinstall=@DIR@/postinstall
i preinstall=@DIR@/preinstall
i preremove=@DIR@/preremove
mysql for DEBIAN
----------------------
Comments regarding the Package
* about patch files
if you want to make new patch,
write patch file and put it into debian/patches/.
debian/rules do patch debian/patches/* automatically.
* about server packages
I use Debian alternative system, to switch next 3 type MySQL server.
mysql-server :
this is static linked MySQL server(/usr/sbin/mysqld-static) and share/mysql/ files.
mysql-server-shared:
this is dynamic linked MySQL server only. (/usr/sbin/mysqld-shared)
mysql-server-debug:
--with-debug flag. mysqld only. (/usr/sbin/mysqld-debug)
* about charset
I build MySQL server --with-extra-charsets=all
* about location
server programs ...... /usr/sbin/
share files .......... /usr/share/mysql/
client programs ...... /usr/bin/
MySQL data directory . /var/mysql/data/
benchmark directory .. /var/mysql/sql-bench/
socket file ......... /tmp/mysql.sock
include files ........ /usr/include/mysql/
libraries ........... /usr/lib/ , /usr/lib/mysql/
put libmysqlclient* into /usr/lib/ ,
others, put /usr/lib/mysql/ .
takeshi@SoftAgency.co.jp
mysql (3.23.23-1potato.2) unstable; urgency=low
* move patch into debian/patches/
if you want to make new patch,
write patch file and put it into debian/patches/.
debian/rules do patch debian/patches/* automatically.
* change debian/rules , debian/move
-- takeshi <takeshi@softagency.co.jp> Tue, 5 Sep 2000 05:07:35 +0900
mysql (3.23.23-1potato) unstable; urgency=low
* new
-- takeshi <takeshi@softagency.co.jp> Sat, 2 Sep 2000 05:07:35 +0900
mysql (3.23.22-1potato) unstable; urgency=low
* new
-- takeshi <takeshi@softagency.co.jp> Tue, 1 Aug 2000 05:07:35 +0900
mysql (3.23.21-1potato.2) unstable; urgency=low
* MYI patch
* /usr/lib/mysql/libmysqlclient.a -> /usr/lib/
* libmysqlclient patch
* fix mysql-dev conflicts libmysqlclient6
-- takeshi <takeshi@softagency.co.jp> Sun, 30 Jul 2000 05:07:35 +0900
mysql (3.23.21-1potato.1) unstable; urgency=low
* MYI patch
* /usr/lib/mysql/libmysqlclient.a -> /usr/lib/
-- takeshi <takeshi@softagency.co.jp> Tue, 25 Jul 2000 05:07:35 +0900
mysql (3.23.21-1potato) unstable; urgency=low
* new
-- takeshi <takeshi@softagency.co.jp> Thr, 6 Jul 2000 05:07:35 +0900
mysql (3.23.20-1potato) unstable; urgency=low
* new
-- takeshi <takeshi@softagency.co.jp> Thr, 29 Jun 2000 05:07:35 +0900
mysql (3.23.19-1potato) unstable; urgency=low
* new
-- takeshi <takeshi@softagency.co.jp> Thr, 29 Jun 2000 05:07:35 +0900
mysql (3.23.18-1) unstable; urgency=low
* new
-- takeshi <takeshi@softagency.co.jp> Tue, 13 May 2000 05:07:35 +0900
mysql (3.23.17-1) unstable; urgency=low
* new
-- takeshi <takeshi@softagency.co.jp> Wed, 31 May 2000 05:07:35 +0900
mysql (3.23.16-1) unstable; urgency=low
* new
* branch static mysqld & shared mysqld
* no need ujis,sjis branch. 3.23 support dynamic charset
* add conf file /etc/my.cnf
-- takeshi <takeshi@softagency.co.jp> Wed, 31 May 2000 05:07:35 +0900
mysql (3.22.32-2) unstable; urgency=low
* fix mysqldump
* fix sjis
-- takeshi <takeshi@softagency.co.jp> Thr, 6 Apr 2000 05:07:35 +0900
mysql (3.22.32-1) unstable; urgency=low
* new
-- takeshi <takeshi@softagency.co.jp> Tue, 15 Feb 2000 05:07:35 +0900
mysql (3.22.30-2) unstable; urgency=low
* fix perl path
* with system readline
-- takeshi <takeshi@softagency.co.jp> Tue, 8 Feb 2000 05:07:35 +0900
mysql (3.22.30-1) unstable; urgency=low
* new
* OOP! debian remove libreadlineg2-dev!
--without-readline => --with-readline
-- takeshi <takeshi@softagency.co.jp> Fri, 14 Jan 2000 05:07:35 +0900
mysql (3.22.29-1) unstable; urgency=low
* new
-- takeshi <takeshi@softagency.co.jp> Mon, 3 Jan 2000 05:07:35 +0900
mysql (3.22.29-0bo) unstable; urgency=low
* new
-- takeshi <takeshi@softagency.co.jp> Mon, 3 Jan 2000 05:07:35 +0900
mysql (3.22.27-0bo.2) unstable; urgency=low
* with linuxthread-0.71
-- takeshi <takeshi@softagency.co.jp> Thr, 9 Dec 1999 05:07:35 +0900
mysql (3.22.27-0bo.1) unstable; urgency=low
* fix: mysqlaccess incorrect path
-- takeshi <takeshi@softagency.co.jp> Sat, 13 Nov 1999 05:07:35 +0900
mysql (3.22.27-0bo) unstable; urgency=low
* sql/sql_parse.cc patch
-- takeshi <takeshi@softagency.co.jp> Wed, 13 Oct 1999 05:07:35 +0900
mysql (3.22.26a-0bo.1) unstable; urgency=low
* BLOB SELECT DISTINCT patch
* all static linked
* fix: @sbindir@ was not changed
* mysql_find_rows -> /usr/bin/
-- takeshi <takeshi@softagency.co.jp> Mon, 20 Sep 1999 05:07:35 +0900
mysql (3.22.26a-0bo) unstable; urgency=low
* new upstream
* fix incorrect path: init.d/mysql (= mysql.server.sh), msql2mysql, mysql_install_db
* change daemon user -> mysql
-- takeshi <takeshi@softagency.co.jp> Mon, 13 Sep 1999 05:07:35 +0900
mysql (3.22.25-0bo) unstable; urgency=low
* new
* change : libmysql6 -> libmysqlclient6
-- takeshi <takeshi@softagency.co.jp> Tue, 3 Aug 1999 05:07:35 +0900
mysql (3.22.24-0bo) unstable; urgency=low
* new
-- takeshi <takeshi@softagency.co.jp> Mon, 25 Jul 1999 05:07:35 +0900
mysql (3.22.23b-0bo.1) unstable; urgency=low
* new
* gcc patch + sql_load patch
-- takeshi <takeshi@softagency.co.jp> Thr, 24 Jun 1999 05:07:35 +0900
mysql (3.22.23b-0bo) unstable; urgency=low
* new
* gcc patch
-- takeshi <takeshi@softagency.co.jp> Tue, 15 Jun 1999 05:07:35 +0900
mysql (3.22.22-0bo) unstable; urgency=low
* new
-- takeshi <takeshi@softagency.co.jp> Mon, 3 May 1999 05:07:35 +0900
mysql (3.22.21-0bo.1) unstable; urgency=low
* re-compile
-- takeshi <takeshi@softagency.co.jp> Fri, 30 Apr 1999 05:07:35 +0900
mysql (3.22.21-0bo) unstable; urgency=low
* New up stream
-- takeshi <takeshi@softagency.co.jp> Tue, 6 Apr 1999 05:07:35 +0900
mysql (3.22.20a-0bo) unstable; urgency=low
* New up stream
-- takeshi <takeshi@softagency.co.jp> Fri, 19 Mar 1999 05:07:35 +0900
mysql (3.22.19a-0bo) unstable; urgency=low
* New up stream
-- takeshi <takeshi@softagency.co.jp> Wed, 3 Mar 1999 05:07:35 +0900
mysql (3.22.18-0bo) unstable; urgency=low
* New up stream
-- takeshi <takeshi@softagency.co.jp> Sun, 28 Feb 1999 05:07:35 +0900
mysql (3.22.16a-gamma-0bo.1) unstable; urgency=low
* fix libmysqlclient5 -> libmysqlclient6
-- takeshi <takeshi@softagency.co.jp> Thr, 11 Feb 1999 05:07:35 +0900
mysql (3.22.16a-gamma-0bo) unstable; urgency=low
* new upstream
-- takeshi <takeshi@softagency.co.jp> Sun, 7 Feb 1999 05:07:35 +0900
mysql (3.22.15-gamma-0bo) unstable; urgency=low
* new upstream
-- takeshi <takeshi@softagency.co.jp> Fri, 29 Jan 1999 05:07:35 +0900
mysql (3.22.14b-gamma-0bo) unstable; urgency=low
* new upstream
* apply mb problem patch
-- takeshi <takeshi@softagency.co.jp> Tue, 26 Jan 1999 05:07:35 +0900
mysql (3.22.14-gamma-0bo.1) unstable; urgency=low
* egcs -all-static
-- takeshi <takeshi@softagency.co.jp> Sun, 3 Jan 1999 05:07:35 +0900
mysql (3.22.14-gamma-0bo) unstable; urgency=low
* New upstream
-- takeshi <takeshi@softagency.co.jp> Sun, 3 Jan 1999 05:07:35 +0900
mysql (3.22.13-beta-0bo) unstable; urgency=low
* New upstream
-- takeshi <takeshi@softagency.co.jp> Fri, 11 Nov 1998 00:29:14 +0900
mysql (3.22.12-beta-0bo) unstable; urgency=low
* New upstream
-- takeshi <takeshi@softagency.co.jp> Fri, 11 Nov 1998 00:29:14 +0900
mysql (3.22.11-beta-0bo) unstable; urgency=low
* New upstream
* !!! CHANGE PACKAGE NAME !!!
libmysql5 <- only libmysqlclinet.so.5
mysql-client <- client commands
mysql-server <- server
mysql-dev <- .h & .a
mysql-doc <- Docs
mysql-bench <- benchmark suite.
-- takeshi <takeshi@softagency.co.jp> Wed, 25 Nov 1998 15:03:45 +0900
mysql (3.22.10-beta-0bo.2) unstable; urgency=low
* fix debian/rules , debian/*.dirs
* gcc-2.7.2.3, g++-2.7.2.1 compiled
* remove /usr/bin/mysql-sub/
* rename /usr/bin/mysql-sub/replace -> /usr/bin/mysql_replace
* mv mysql-base:/usr/bin/mysql-sub/{perror,resolveip} -> mysql-server:/usr/bin/
perror -> mysql_perror
resolveip-> mysql_resolveip
* mv add_*, make_binary_distribution -> /usr/share/mysql/
* add japanese errmsg (/usr/share/mysql/japanese)
-- takeshi <takeshi@softagency.co.jp> Fri, 13 Nov 1998 15:03:45 +0900
mysql (3.22.10-beta-0bo.1) unstable; urgency=low
* fix debian/rules
* egcs compiled
* link libstdc++2.8.a (mysqld), so, you don't need libstdc++2.8 for running mysqld.
(not client programs.)
-- takeshi <takeshi@softagency.co.jp> Wed, 11 Nov 1998 15:03:45 +0900
mysql (3.22.10-beta-0bo) unstable; urgency=low
* New upstream
* egcs compiled
* fix: mysql-base-{char}/usr/bin/comp_err -> mysql-server-{char}/usr/sbin/comp_err
-- takeshi <takeshi@softagency.co.jp> Thr, 5 Nov 1998 15:03:45 +0900
mysql (3.22.9-beta-0bo.1) unstable; urgency=low
* new patch to sql_string.cc ('%' bug)
-- takeshi <takeshi@softagency.co.jp> Tue, 27 Oct 1998 15:03:45 +0900
mysql (3.22.9-beta-0bo) unstable; urgency=low
* fix cflags
* fix diff files
* fix & change categorize of client or server
mysql-server:
/usr/sbin/mysql_install_db
safe_mysqld mysqld
isamchk isamlog
mysql-base:
/usr/bin/
comp_err msql2mysql mysql mysql_zap
mysqlaccess mysqladmin mysqlbug
mysqldump mysqlimport mysqlshow
/usr/bin/mysql-sub/
add_file_priv add_func_table
add_long_password make_binary_distribution
perror replace resolveip
* patch to sql_string.cc ('%' bug)
-- takeshi <takeshi@softagency.co.jp> Wed, 7 Oct 1998 15:03:45 +0900
mysql (3.22.8-beta-0bo) unstable; urgency=low
* New up stream
-- takeshi <takeshi@softagency.co.jp> Wed, 7 Oct 1998 15:03:45 +0900
mysql (3.22.7b-0bo.1) unstable; urgency=low
* left join patch
-- takeshi <takeshi@softagency.co.jp> Thr, 24 Sep 1998 15:03:45 +0900
mysql (3.22.7b-0bo) unstable; urgency=low
* New upstream version (bo)
* mb patch
* *.a -> /usr/lib/mysql/
* add_file_priv add_func_table make_binary_distribution
add_long_password perror replace resolveip
-> /usr/bin/mysql-sub/
* mysqld, safe_mysqld, mysql_install_db -> mysql-server /usr/sbin/
* add '-lm -lz -ldl' when building libmysqlclient.so.4.0.0
-- takeshi <takeshi@softagency.co.jp> Sat, 15 Aug 1998 15:03:45 +0900
mysql (3.22.4a-0bo) unstable; urgency=low
* New upstream version (bo)
* use system libreadline
-- takeshi <takeshi@softagency.co.jp> Sat, 15 Aug 1998 15:03:45 +0900
mysql (3.21.33-0bo) unstable; urgency=low
* New upstream version
-- takeshi <takeshi@softagency.co.jp> Wed, 22 Jul 1998 12:51:45 +0900
mysql (3.21.30-1) unstable; urgency=low
* New upstream version
* fix conffile setting
-- takeshi <takeshi@softagency.co.jp> Tue, 12 May 1998 20:24:45 +0900
mysql (3.21.29.gamma-2) unstable; urgency=low
* charset=ujis,sjis packages
* branch mysql-base-* (lib*.so)
* /usr/local/mysql/lib/mysql/lib* -> /usr/lib/
* /usr/local/mysql/include -> /usr/include
* /usr/local/mysql/info -> /usr/info
* /usr/local/mysql/man -> /usr/man
* /usr/local/mysql/share -> /usr/share
* /usr/local/mysql/bin -> /usr/bin
* /usr/local/mysql/libexec -> /usr/sbin
* /usr/local/mysql/var -> /var/mysql/data
* /usr/local/mysql/sql-bench -> /var/mysql/sql-bench
-- takeshi <takeshi@softagency.co.jp> Fri, 8 May 1998 00:04:45 +0900
mysql (3.21.29.gamma-1) unstable; urgency=low
* Initial Release.
-- takeshi <takeshi@softagency.co.jp> Sat, 2 May 1998 03:42:24 +0900
Local variables:
mode: debian-changelog
add-log-mailing-address: "takeshi@softagency.co.jp"
End:
Source: mysql
Section: devel
Priority: extra
Maintainer: takeshi <takeshi@softagency.co.jp>
Standards-Version: 2.1.2.2
Package: mysql
Architecture: all
Description: mysql
Missing
Package: mysql-doc
Architecture: all
Description: mysql Documentation (html)
MySQL Doc.
Package: libmysqlclient9
Architecture: any
Provides: libmysqlclient9
Description: libmysqlclient.so.9
libmysqlclient.so.9
Package: mysql-client
Architecture: any
Depends: ${shlibs:Depends}
Section: devel
Priority: extra
Conflicts: mysql-client-ujis, mysql-client-sjis
Replaces: mysql-base (<< 3.22.11), mysql-base-ujis (<< 3.22.11), mysql-base-sjis (<< 3.22.11), mysql-client-ujis, mysql-client-sjis
Provides: mysql-client
Description: mysql clients.
MySQL clients programs.
Package: mysql-server
Architecture: any
Depends: ${shlibs:Depends}
Conflicts: mysql-server-sjis, mysql-server-ujis, mysql-server (<< 3.23.0)
Replaces: mysql-server-sjis, mysql-base (<< 3.22.11), mysql-base-ujis (<< 3.22.11), mysql-base-sjis (<< 3.22.11), mysql-server-sjis, mysql-server-ujis, mysql-server (<< 3.23.0)
Provides: mysql-server
Description: MySQL server (static linked)
MySQL server. static linked.
Package: mysql-server-shared
Architecture: any
Depends: ${shlibs:Depends}
Conflicts: mysql-server-sjis, mysql-server-ujis, mysql-server (<< 3.23.0)
Replaces: mysql-server-sjis, mysql-base (<< 3.22.11), mysql-base-ujis (<< 3.22.11), mysql-base-sjis (<< 3.22.11), mysql-server-sjis, mysql-server-ujis, mysql-server (<< 3.23.0)
Description: MySQL server (dynamic linked)
MySQL server. dynamic linked.
Package: mysql-server-debug
Architecture: any
Depends: ${shlibs:Depends}
Conflicts: mysql-server-sjis, mysql-server-ujis, mysql-server (<< 3.23.0)
Replaces: mysql-server-sjis, mysql-base (<< 3.22.11), mysql-base-ujis (<< 3.22.11), mysql-base-sjis (<< 3.22.11), mysql-server-sjis, mysql-server-ujis, mysql-server (<< 3.23.0)
Description: MySQL server debug
MySQL server. debug
Package: mysql-dev
Architecture: any
Depends: ${shlibs:Depends}
Conflicts: mysql-dev-sjis, mysql-dev-ujis
Replaces: mysql-dev-sjis, mysql-dev-ujis, libmysqlclient6-ujis, libmysqlclient6-sjis
Provides: mysql-dev
Description: MySQL develop suite
MySQL develop.
Package: mysql-bench
Architecture: all
Description: mysql benchmark suite.
MySQL sql-bench files.
This package was debianized by takeshi@softagency.co.jp on
Sat, 2 May 1998 03:42:24 +0900.
It was downloaded from
http://www.mysql.com/
Copyright:
GPL
Docs/Makefile
strings/Makefile
dbug/Makefile
mysys/Makefile
extra/Makefile
regex/Makefile
isam/Makefile
heap/Makefile
merge/Makefile
sql/Makefile
sql/share/Makefile
support-files/binary-configure
support-files/my-example.cnf
support-files/mysql-log-rotate
scripts/add_func_table
scripts/mysql_setpermisson
scripts/mysqlbug
scripts/mysqlhotcopy
client/my_static.h
client/mysys_priv.h
include/my_config.h
sql/lex_hash.h
sql-bench/Makefile
scripts/mysql_config
libmysql_r/Makefile
#!/bin/sh
STAMPFILE="debian/stamp-move"
if [ -e $STAMPFILE ]; then
exit
fi
#----------
CLIENT1="msql2mysql mysql mysql_convert_table_format mysql_find_rows mysql_fix_privilege_tables mysql_setpermission mysql_zap mysqlaccess mysqladmin mysqlbug mysqldump mysqlhotcopy mysqlimport mysqlshow"
# CLIENT2="add_file_priv add_func_table add_long_password make_binary_distribution"
P=`pwd`
#----------
for CHAR in build
do
#-----
cp -Rpd debian/${CHAR}/usr debian/mysql-server/
cp -Rpd debian/${CHAR}-shared/usr/lib/mysql/libmysqlclient.so.* debian/libmysqlclient9/usr/lib/
#----- mysql-server-shared ---
cp -Rpd debian/${CHAR}-shared/usr/sbin/mysqld debian/mysql-server-shared/usr/sbin/mysqld-shared
#----- mysql-server-debug ---
cp -Rpd debian/${CHAR}-debug/usr/sbin/mysqld debian/mysql-server-debug/usr/sbin/mysqld-debug
#----- mysql-server ---
mv debian/mysql-server/usr/sbin/mysqld debian/mysql-server/usr/sbin/mysqld-static
#----- mysql-client ----
cd ${P}/debian/mysql-server/usr/bin/ && mv $CLIENT1 ../../../mysql-client/usr/bin/
cd ${P}
mv -f debian/mysql-server/usr/{man,info} debian/mysql-client/usr/share/
mv debian/mysql-server/usr/share/mysql/my-example.cnf debian/mysql-client/usr/share/mysql/
mv -f debian/mysql-server/usr/bin/replace debian/mysql-client/usr/bin/mysql_replace
#----- mysql-server ---
mv debian/mysql-server/usr/bin/* debian/mysql-server/usr/sbin/
mv debian/mysql-server/usr/sbin/my_print_defaults debian/mysql-server/usr/bin/
mv debian/mysql-server/usr/sbin/comp_err debian/mysql-server/usr/bin/
mv debian/mysql-server/usr/sbin/perror debian/mysql-server/usr/bin/mysql_perror
mv debian/mysql-server/usr/sbin/resolveip debian/mysql-server/usr/bin/mysql_resolveip
#----- mysql-dev ----
cp -Rpd debian/${CHAR}-shared/usr/lib/mysql/libmysqlclient.so debian/mysql-dev/usr/lib/
mv debian/mysql-server/usr/include debian/mysql-dev/usr/
mv debian/mysql-server/usr/lib/mysql debian/mysql-dev/usr/lib/
mv debian/mysql-dev/usr/lib/mysql/libmysqlclient.a debian/mysql-dev/usr/lib/
(cd debian/mysql-dev/usr/lib/mysql ; ln -sf "../libmysqlclient.a" )
#-----
cp debian/README.debian debian/copyright debian/changelog \
debian/mysql-client/usr/share/doc/mysql/
done
####################
### doc
cp -r COPYING* MIRRORS README* Docs/* debian/mysql-doc/usr/share/doc/mysql/
#### sql-bench
mv debian/mysql-server/usr/sql-bench \
debian/mysql-bench/var/mysql/
touch $STAMPFILE
# Example mysql config file.
# You can copy this to one of:
# /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is @localstatedir@) or
# ~/.my.cnf to set user-specific options.
#
# One can use all long options that the program supports.
# Run the program with --help to get a list of available options
# This will be passed to all mysql clients
[client]
#password = my_password
#port = 3306
#socket = /tmp/mysql.sock
# Here is entries for some specific programs
# The following values assume you have at least 32M ram
# The MySQL server
[mysqld]
default-character-set = ujis
#port = 3306
#socket = /tmp/mysql.sock
#skip-locking
#set-variable = key_buffer=16M
#set-variable = max_allowed_packet=1M
#set-variable = thread_stack=128K
## Start logging
#log
[mysqldump]
default-character-set = ujis
#quick
#set-variable = max_allowed_packet=16M
[mysql]
default-character-set = ujis
#no-auto-rehash
[isamchk]
#set-variable = key_buffer=16M
usr/bin
usr/share/mysql
usr/share/doc/mysql
#!/bin/sh
update-alternatives --install /usr/sbin/mysqld mysqld /usr/sbin/mysqld-debug 20
#!/bin/sh
update-alternatives --auto mysqld
#!/bin/sh
update-alternatives --install /usr/sbin/mysqld mysqld /usr/sbin/mysqld-shared 15
#!/bin/sh
update-alternatives --auto mysqld
#!/bin/sh
update-rc.d mysql defaults 50 >/dev/null
#--------
update-alternatives --install /usr/sbin/mysqld mysqld /usr/sbin/mysqld-static 10
#--------
DOFIX=0
if [ ! -e /var/mysql/data/mysql/tables_priv.frm -a -d /var/mysql/data/mysql ]; then
DOFIX=1
fi
#--------
i=`grep '^mysql:' /etc/group`
if [ "x${i}" == "x" ]; then
groupadd mysql || true
fi
i=`grep '^mysql:' /etc/passwd`
if [ "x${i}" == "x" ]; then
useradd -g mysql -d /var/mysql/data -s /noexists mysql || true
fi
#--------
if [ ! -d /var/mysql/data/mysql ]; then
install -d /var/mysql/data || true
/usr/sbin/mysql_install_db || true
chown -R mysql.mysql /var/mysql
fi
#--------
/etc/init.d/mysql start || true
if [ $DOFIX -eq 1 ]; then
echo "***************************************"
echo " Now, fix tables for MySQL 3.22.11...."
echo " if you set root passwd, please in..."
echo -n " ? MySQL root passwd ? : "
read pass dumy
/usr/sbin/mysql_fix_privilege_tables $pass
fi
#!/bin/sh
update-alternatives --auto mysqld
if [ "$1" = "purge" ]
then
update-rc.d mysql remove >/dev/null
echo -n " Shall I also remove all of the databases (y/N)?"; read ans
if [ "$ans" = "y" -o "$ans" = "Y" ]; then
rm -rf /var/mysql
fi
fi
#!/bin/sh
/etc/init.d/mysql stop || true
--- mysql-3.23.23.orig/sql/Makefile.in
+++ mysql-3.23.23/sql/Makefile.in
@@ -366,7 +366,7 @@
mysqlbinlog: $(mysqlbinlog_OBJECTS) $(mysqlbinlog_DEPENDENCIES)
@rm -f mysqlbinlog
- $(CXXLINK) $(mysqlbinlog_LDFLAGS) $(mysqlbinlog_OBJECTS) $(mysqlbinlog_LDADD) $(LIBS)
+ $(CXXLINK) $(mysqld_LDFLAGS) $(mysqlbinlog_OBJECTS) $(mysqld_LDADD) $(LIBS)
mysqld: $(mysqld_OBJECTS) $(mysqld_DEPENDENCIES)
@rm -f mysqld
--- mysql-3.23.23.orig/scripts/Makefile.in
+++ mysql-3.23.23/scripts/Makefile.in
@@ -337,6 +337,7 @@
@RM@ -f $@ $@-t
@SED@ \
-e 's!@''bindir''@!$(bindir)!g' \
+ -e 's!@''sbindir''@!$(sbindir)!g' \
-e 's!@''scriptdir''@!$(bindir)!g' \
-e 's!@''prefix''@!$(prefix)!g' \
-e 's!@''datadir''@!$(datadir)!g' \
--- mysql-3.23.23.orig/support-files/Makefile.in
+++ mysql-3.23.23/support-files/Makefile.in
@@ -308,6 +308,7 @@
@RM@ -f $@ $@-t
@SED@ \
-e 's!@''bindir''@!$(bindir)!g' \
+ -e 's!@''sbindir''@!$(sbindir)!g' \
-e 's!@''scriptdir''@!$(bindir)!g' \
-e 's!@''prefix''@!$(prefix)!g' \
-e 's!@''datadir''@!$(datadir)!g' \
--- mysql-3.23.23.orig/scripts/msql2mysql.sh
+++ mysql-3.23.23/scripts/msql2mysql.sh
@@ -13,4 +13,4 @@
# described in the License. Among other things, the License requires that
# the copyright notice and this notice be preserved on all copies.
-@bindir@/replace msqlConnect mysql_connect msqlListDBs mysql_list_dbs msqlNumRows mysql_num_rows msqlFetchRow mysql_fetch_row msqlFetchField mysql_fetch_field msqlFreeResult mysql_free_result msqlListFields mysql_list_fields msqlListTables mysql_list_tables msqlErrMsg 'mysql_error(mysql)' msqlStoreResult mysql_store_result msqlQuery mysql_query msqlField mysql_field msqlSelect mysql_select msqlSelectDB mysql_select_db msqlNumFields mysql_num_fields msqlClose mysql_close msqlDataSeek mysql_data_seek m_field MYSQL_FIELD m_result MYSQL_RES m_row MYSQL_ROW msql mysql mSQL mySQL MSQL MYSQL msqlCreateDB mysql_create_db msqlDropDB mysql_drop_db msqlFieldSeek mysql_field_seek -- $*
+@bindir@/mysql_replace msqlConnect mysql_connect msqlListDBs mysql_list_dbs msqlNumRows mysql_num_rows msqlFetchRow mysql_fetch_row msqlFetchField mysql_fetch_field msqlFreeResult mysql_free_result msqlListFields mysql_list_fields msqlListTables mysql_list_tables msqlErrMsg 'mysql_error(mysql)' msqlStoreResult mysql_store_result msqlQuery mysql_query msqlField mysql_field msqlSelect mysql_select msqlSelectDB mysql_select_db msqlNumFields mysql_num_fields msqlClose mysql_close msqlDataSeek mysql_data_seek m_field MYSQL_FIELD m_result MYSQL_RES m_row MYSQL_ROW msql mysql mSQL mySQL MSQL MYSQL msqlCreateDB mysql_create_db msqlDropDB mysql_drop_db msqlFieldSeek mysql_field_seek -- $*
--- mysql-3.23.23.orig/scripts/mysql_install_db.sh
+++ mysql-3.23.23/scripts/mysql_install_db.sh
@@ -11,6 +11,7 @@
ldata=@localstatedir@
execdir=@libexecdir@
bindir=@bindir@
+sbindir=@sbindir@
force=0
IN_RPM=0
defaults=
@@ -47,6 +48,10 @@
then
bindir=`grep "^bindir" $conf | sed 's;^[^=]*=[ \t]*;;' | sed 's;[ \t]$;;'`
fi
+ if grep "^sbindir" $conf >/dev/null
+ then
+ sbindir=`grep "^sbindir" $conf | sed '.*=[ \t]*//`
+ fi
if grep "^user" $conf >/dev/null
then
user=`grep "^user" $conf | sed 's;^[^=]*=[ \t]*;;' | sed 's;[ \t]$;;'`
@@ -56,7 +61,7 @@
for arg
do
case "$arg" in
- --basedir=*) basedir=`echo "$arg"|sed 's;^--basedir=;;'`; bindir="$basedir/bin"; execdir="$basedir/libexec" ;;
+ --basedir=*) basedir=`echo "$arg"|sed 's;^--basedir=;;'`; bindir="$basedir/bin"; sbindir="$basedir/sbin"; execdir="$basedir/libexec" ;;
--datadir=*) ldata=`echo "$arg"|sed 's;^--datadir=;;'` ;;
--user=*) user=`echo "$arg"|sed 's;^--user=;;'` ;;
esac
@@ -82,10 +87,10 @@
# Check if hostname is valid
if test "$IN_RPM" -eq 0 -a $force -eq 0
then
- resolved=`$bindir/resolveip $hostname 2>&1`
+ resolved=`$bindir/mysql_resolveip $hostname 2>&1`
if [ $? -ne 0 ]
then
- resolved=`$bindir/resolveip localhost 2>&1`
+ resolved=`$bindir/mysql_resolveip localhost 2>&1`
if [ $? -eq 0 ]
then
echo "Sorry, the host '$hostname' could not be looked up."
@@ -300,7 +305,7 @@
if test -z "$IN_RPM"
then
echo "You can start the MySQL demon with:"
- echo "cd @prefix@ ; $bindir/safe_mysqld &"
+ echo "cd @prefix@ ; $sbindir/safe_mysqld &"
echo
echo "You can test the MySQL demon with the benchmarks in the 'sql-bench' directory:"
echo "cd sql-bench ; run-all-tests"
--- mysql-3.23.23.orig/support-files/mysql.server.sh Tue Sep 5 19:13:35 2000
+++ mysql-3.23.23/support-files/mysql.server.sh Tue Sep 5 19:19:40 2000
@@ -16,6 +16,7 @@
PATH=/sbin:/usr/sbin:/bin:/usr/bin
basedir=@prefix@
bindir=@bindir@
+sbindir=@sbindir@
datadir=@localstatedir@
pid_file=@localstatedir@/mysqld.pid
log_file=@localstatedir@/mysqld.log
@@ -64,6 +65,10 @@
then
bindir=`grep "^bindir" $conf | cut -f 2 -d= | tr -d ' '`
fi
+ if grep "^sbindir" $conf >/dev/null
+ then
+ sbindir=`grep "^sbindir" $conf | cut -f 2 -d= | tr -d ' '`
+ fi
if grep "^log[ \t]*=" $conf >/dev/null
then
log_file=`grep "log[ \t]*=" $conf | cut -f 2 -d= | tr -d ' '`
@@ -78,14 +83,15 @@
'start')
# Start daemon
- if test -x $bindir/safe_mysqld
+ if test -x $sbindir/safe_mysqld
then
# Give extra arguments to mysqld with the my.cnf file. This script may
# be overwritten at next upgrade.
- $bindir/safe_mysqld \
- --user=$mysql_daemon_user --datadir=$datadir --pid-file=$pid_file --log=$log_file &
+ $sbindir/safe_mysqld \
+ --user=$mysql_daemon_user --datadir=$datadir --pid-file=$pid_file &
+# --log=$log_file &
else
- echo "Can't execute $bindir/safe_mysqld"
+ echo "Can't execute $sbindir/safe_mysqld"
fi
;;
--- mysql-3.23.23.orig/configure
+++ mysql-3.23.23/configure
@@ -202,7 +202,7 @@
--with-charset=CHARSET use CHARSET by default (one of: big5 cp1251 cp1257
croat czech danish dec8 dos estonia euc_kr gb2312 gbk
german1 greek hebrew hp8 hungarian koi8_ru koi8_ukr
- latin1 latin2 swe7 usa7 win1250 win1251 win1251ukr
+ latin1 latin2 swe7 usa7 win1250 win1251ukr
ujis sjis tis620; default is latin1)"
ac_help="$ac_help
--with-extra-charsets=cs1,cs2
@@ -8843,7 +8843,7 @@
# Choose a character set
-CHARSETS_AVAILABLE="big5 cp1251 cp1257 croat czech danish dec8 dos estonia euc_kr gb2312 gbk german1 greek hebrew hp8 hungarian koi8_ru koi8_ukr latin1 latin2 swe7 usa7 win1250 win1251 win1251ukr ujis sjis tis620"
+CHARSETS_AVAILABLE="big5 cp1251 cp1257 croat czech danish dec8 dos estonia euc_kr gb2312 gbk german1 greek hebrew hp8 hungarian koi8_ru koi8_ukr latin1 latin2 swe7 usa7 win1250 win1251ukr ujis sjis tis620"
DEFAULT_CHARSET=latin1
# Check whether --with-charset or --without-charset was given.
--- mysql-3.23.23.orig/configure.in
+++ mysql-3.23.23/configure.in
@@ -1517,14 +1517,14 @@
dnl or other special handling, you must also create
dnl strings/ctype-$charset_name.c
-CHARSETS_AVAILABLE="big5 cp1251 cp1257 croat czech danish dec8 dos estonia euc_kr gb2312 gbk german1 greek hebrew hp8 hungarian koi8_ru koi8_ukr latin1 latin2 swe7 usa7 win1250 win1251 win1251ukr ujis sjis tis620"
+CHARSETS_AVAILABLE="big5 cp1251 cp1257 croat czech danish dec8 dos estonia euc_kr gb2312 gbk german1 greek hebrew hp8 hungarian koi8_ru koi8_ukr latin1 latin2 swe7 usa7 win1250 win1251ukr ujis sjis tis620"
DEFAULT_CHARSET=latin1
AC_ARG_WITH(charset,
[ --with-charset=CHARSET use CHARSET by default (one of: big5 cp1251 cp1257
croat czech danish dec8 dos estonia euc_kr gb2312 gbk
german1 greek hebrew hp8 hungarian koi8_ru koi8_ukr
- latin1 latin2 swe7 usa7 win1250 win1251 win1251ukr
+ latin1 latin2 swe7 usa7 win1250 win1251ukr
ujis sjis tis620; default is latin1)],
[default_charset="$withval"],
[default_charset="$DEFAULT_CHARSET"])
#!/usr/bin/make -f
# Made with the aid of debmake, by Christoph Lameter,
# based on the sample debian/rules file for GNU hello by Ian Jackson.
package=mysql
CHARSET=ujis
TEMPINST=build
#CFLAGS="-O6 -mpentium -mstack-align-double -fomit-frame-pointer" CXX=gcc CXXFLAGS="-O6 -mpentium -mstack-align-double -fomit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --enable-assembler --with-mysqld-ldflags=-all-static
CC=gcc
CFLAGS=-O6 -fomit-frame-pointer
CXX=gcc
CXXFLAGS=-O6 -fomit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti
# CXXFLAGS=-O6 -fomit-frame-pointer -felide-constructors -fno-rtti
SYSNAME=
COMMONCONF= --prefix=/usr --libexecdir=/usr/sbin \
--localstatedir=/var/mysql/data \
--enable-shared \
--without-perl --without-readline \
--without-docs --without-bench \
--with-mysqld-user=mysql \
--with-extra-charsets=all
SERVERCONF=$(COMMONCONF) --enable-assembler \
--with-raid
# --with-berkeley-db-includes=/usr/include/db3 \
# --with-berkeley-db-libs=/usr/lib/libdb3.a
STATICCONF=--with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static
CLIENTCONF=$(COMMONCONF) --without-server
##################################################
patches debian/stamp-patches:
-test -e debian/stamp-patches || \
for i in `find debian/patches -type f -print` ; do \
patch -p1 < $$i ; \
done
touch debian/stamp-patches
##################################################
premkdir debian/stamp-premkdir:
$(checkdir)
-rm -rf debian/tmp debian/$(TEMPINST)*
dh_installdirs
-install -d debian/$(TEMPINST)/usr/{bin,sbin,share,man,include,info}
-install -d debian/$(TEMPINST)-shared/usr/{bin,sbin,share,man,include,info}
-install -d debian/$(TEMPINST)-debug/usr/{bin,sbin,share,man,include,info}
touch debian/stamp-premkdir
##################################################
config debian/stamp-config: debian/stamp-premkdir debian/stamp-patches
CC=$(CC) CFLAGS="$(CFLAGS)" CXX=$(CXX) CXXFLAGS="$(CXXFLAGS)" \
LDFLAGS="-static" \
./configure $(SERVERCONF) $(STATICCONF) \
--with-charset=$(CHARSET) \
--with-bench \
$(SYSNAME)
# sed 's/-fno-implicit-templates//g' sql/Makefile > .m
# mv .m sql/Makefile
touch debian/stamp-config
##################################################
build: debian/stamp-config
make LDFLAGS="-static"
make install DESTDIR=`pwd`/debian/$(TEMPINST)
cp include/m_ctype.h `pwd`/debian/$(TEMPINST)/usr/include/mysql/
touch build
##################################################
build-shared debian/stamp-build-shared: debian/stamp-patches
-make distclean
CC=$(CC) CFLAGS="$(CFLAGS)" CXX=$(CXX) CXXFLAGS="$(CXXFLAGS)" \
./configure $(SERVERCONF) \
--with-charset=$(CHARSET) \
$(SYSNAME)
# ./configure $(CLIENTCONF)
make
make install DESTDIR=`pwd`/debian/$(TEMPINST)-shared
touch debian/stamp-build-shared
##################################################
build-debug debian/stamp-build-debug: debian/stamp-patches
-make distclean
CC=$(CC) CFLAGS="$(CFLAGS)" CXX=$(CXX) CXXFLAGS="$(CXXFLAGS)" \
./configure $(SERVERCONF) \
--with-charset=$(CHARSET) \
--with-debug \
$(SYSNAME)
# ./configure $(CLIENTCONF)
make
make install DESTDIR=`pwd`/debian/$(TEMPINST)-debug
touch debian/stamp-build-debug
##################################################
clean:
$(checkdir)
-make distclean
-test -e debian/stamp-patches && \
for i in `find debian/patches -type f -print` ; do \
patch -R -p1 < $$i ; \
done
-rm -rf build debian/stamp-* debian/$(TEMPINST)*
-dh_clean
-rm -f `find . -name "*~"`
-rm -rf debian/tmp debian/files* core
-rm -f debian/*substvars
-rm -f `cat debian/gomi`
##################################################
binary-indep: checkroot build
$(checkdir)
# There are no architecture-independent files to be uploaded
# generated by this package. If there were any they would be
# made here.
binary-arch: checkroot build debian/stamp-build-shared debian/stamp-build-debug
sh debian/move
### init, post*
dh_installdeb
cp debian/shlibs debian/libmysqlclient9/DEBIAN/
cp debian/my.cnf debian/mysql-server/etc/
cp support-files/mysql.server debian/mysql-server/etc/init.d/mysql ; chmod +x debian/mysql-server/etc/init.d/mysql
### dpkg-xxx
dh_compress
dh_fixperms
dh_strip
dh_shlibdeps
dh_gencontrol
dpkg --build debian/libmysqlclient9 ..
dpkg --build debian/mysql-client ..
dpkg --build debian/mysql-server ..
dpkg --build debian/mysql-server-shared ..
dpkg --build debian/mysql-server-debug ..
dpkg --build debian/mysql-dev ..
dpkg --build debian/mysql-bench ..
dpkg --build debian/mysql-doc ..
define checkdir
test -f debian/rules
endef
# Below here is fairly generic really
binary: binary-indep binary-arch
##################################################
checkroot:
$(checkdir)
test root = "`whoami`"
##################################################
.PHONY: binary binary-arch binary-indep clean checkroot
libmysqlclient 9 libmysqlclient9
File mode changed from 100755 to 100644
...@@ -13,63 +13,61 @@ ...@@ -13,63 +13,61 @@
# chkconfig: 2345 90 90 # chkconfig: 2345 90 90
# description: A very fast and reliable SQL database engine. # description: A very fast and reliable SQL database engine.
# The following variables are only set for letting mysql.server find things
# if you want to affect other MySQL variables, you should make your changes
# in the /etc/my.cnf or other configuration files
PATH=/sbin:/usr/sbin:/bin:/usr/bin PATH=/sbin:/usr/sbin:/bin:/usr/bin
basedir=@prefix@ basedir=@prefix@
bindir=@bindir@ bindir=@bindir@
sbindir=@sbindir@
datadir=@localstatedir@ datadir=@localstatedir@
pid_file=@localstatedir@/mysqld.pid pid_file=@localstatedir@/mysqld.pid
log_file=@localstatedir@/mysqld.log
# Run mysqld as this user.
mysql_daemon_user=@MYSQLD_USER@
export PATH export PATH
mode=$1 mode=$1
if test -w / # determine if we should look at the root config file GetCNF () {
then # or user config file
conf=/etc/my.cnf
else
conf=$HOME/.my.cnf # Using the users config file
fi
# The following code tries to get the variables safe_mysqld needs from the VARIABLES="basedir bindir sbindir datadir pid-file"
# config file. This isn't perfect as this ignores groups, but it should CONFIG_FILES="/etc/my.cnf $basedir/my.cnf $HOME/.my.cnf"
# work as the options doesn't conflict with anything else.
if test -f "$conf" # Extract those fields we need from config file. for c in $CONFIG_FILES
then do
if grep "^datadir" $conf >/dev/null if [ -f $c ]
then
datadir=`grep "^datadir" $conf | cut -f 2 -d= | tr -d ' '`
fi
if grep "^user" $conf >/dev/null
then
mysql_daemon_user=`grep "^user" $conf | cut -f 2 -d= | tr -d ' ' | head -1`
fi
if grep "^pid-file" $conf >/dev/null
then
pid_file=`grep "^pid-file" $conf | cut -f 2 -d= | tr -d ' '`
else
if test -d "$datadir"
then then
pid_file=$datadir/`hostname`.pid #echo "Processing $c..."
fi for v in $VARIABLES
fi do
if grep "^basedir" $conf >/dev/null # This method assumes last of duplicate $variable entries will be the
then # value set ([mysqld])
basedir=`grep "^basedir" $conf | cut -f 2 -d= | tr -d ' '` # This could easily be rewritten to gather [xxxxx]-specific entries,
bindir=$basedir/bin # but for now it looks like only the mysqld ones are needed for
fi # server startup scripts
if grep "^bindir" $conf >/dev/null eval `sed -n -e '/^$/d' -e '/^#/d' -e 's,[ ],,g' -e '/=/p' $c |\
then awk -F= -v v=$v '{if ($1 == v) printf ("thevar=\"%s\"\n", $2)}'`
bindir=`grep "^bindir" $conf | cut -f 2 -d= | tr -d ' '`
fi # it would be easier if the my.cnf and variable values were
if grep "^log[ \t]*=" $conf >/dev/null # all matched, but since they aren't we need to map them here.
then case $v in
log_file=`grep "log[ \t]*=" $conf | cut -f 2 -d= | tr -d ' '` pid-file) v=pid_file ;;
log) v=log_file ;;
esac
# As long as $thevar isn't blank, use it to set or override current
# value
[ "$thevar" != "" ] && eval $v=$thevar
done
#else
# echo "No $c config file."
fi fi
fi done
}
# run function to get config values
GetCNF
# Safeguard (relative paths, core dumps..) # Safeguard (relative paths, core dumps..)
cd $basedir cd $basedir
...@@ -83,7 +81,7 @@ case "$mode" in ...@@ -83,7 +81,7 @@ case "$mode" in
# Give extra arguments to mysqld with the my.cnf file. This script may # Give extra arguments to mysqld with the my.cnf file. This script may
# be overwritten at next upgrade. # be overwritten at next upgrade.
$bindir/safe_mysqld \ $bindir/safe_mysqld \
--user=$mysql_daemon_user --datadir=$datadir --pid-file=$pid_file --log=$log_file & --datadir=$datadir --pid-file=$pid_file &
else else
echo "Can't execute $bindir/safe_mysqld" echo "Can't execute $bindir/safe_mysqld"
fi fi
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment