diff options
-rw-r--r-- | BitKeeper/etc/logging_ok | 1 | ||||
-rw-r--r-- | Docs/manual.texi | 33 | ||||
-rw-r--r-- | Makefile.am | 3 | ||||
-rw-r--r-- | configure.in | 24 | ||||
-rw-r--r-- | include/global.h | 2 | ||||
-rw-r--r-- | libmysql/Makefile.am | 79 | ||||
-rw-r--r-- | libmysql/Makefile.shared | 89 | ||||
-rw-r--r-- | libmysql_r/Makefile.am | 39 | ||||
-rw-r--r-- | support-files/mysql.spec.sh | 6 |
9 files changed, 178 insertions, 98 deletions
diff --git a/BitKeeper/etc/logging_ok b/BitKeeper/etc/logging_ok index f7a7714c987..dfae0a1239f 100644 --- a/BitKeeper/etc/logging_ok +++ b/BitKeeper/etc/logging_ok @@ -14,3 +14,4 @@ tim@localhost.polyesthetic.msg tim@work.mysql.com tonu@work.mysql.com monty@donna.mysql.com +jcole@tetra.spaceapes.com diff --git a/Docs/manual.texi b/Docs/manual.texi index c25b25b38be..c54645ab5c2 100644 --- a/Docs/manual.texi +++ b/Docs/manual.texi @@ -1840,7 +1840,7 @@ Beginners @strong{MySQL} Tutorial on how to install and set up @item @uref{http://www.devshed.com/Server_Side/MySQL/, A lot of @strong{MySQL} tutorials} -@item @uref{http://mysql.hitstar.com/, MySQL manual in Chinise}. +@item @uref{http://mysql.hitstar.com/, MySQL manual in Chinese}. @item @uref{http://www.linuxplanet.com/linuxplanet/tutorials/1046/1/, Setting Up a @strong{MySQL}-Based Website} @@ -5752,8 +5752,9 @@ If you are using gcc and have problems with loading @code{UDF} functions into @code{MySQL}, try adding @code{-lgcc} to the link line for the @code{UDF} function. -For an automatic start of MySQL you can copy @file{support-files/mysql.server} -to @file{/etc/init.d} and link from there to @code{/etc/rc3.d/S99mysql.server}. +If you would like @strong{MySQL} to start automatically, you can copy +@file{support-files/mysql.server} to @file{/etc/init.d} and create a +symbolic link to it named @code{/etc/rc3.d/S99mysql.server}. @node Solaris 2.7, Solaris x86, Solaris, Source install system issues @subsection Solaris 2.7 / 2.8 notes @@ -8994,7 +8995,7 @@ and @file{.frm} files to which the table corresponds. In SQL statements, you can access tables from different databases with the @code{db_name.tbl_name} syntax. Some SQL servers provide the same functionality but call this @code{User space}. -@strong{MySQL} dosen't support tablespaces like in: +@strong{MySQL} doesn't support tablespaces like in: @code{create table ralph.my_table...IN my_tablespace}. @item @@ -16870,7 +16871,7 @@ are automatically redirected to the new table without any failed updates. CHECK TABLE tbl_name[,tbl_name...] [TYPE = [QUICK | FAST | EXTEND | CHANGED]] @end example -@code{CHECK TABLE} only works on @code{MyISAM} tables and is the same things +@code{CHECK TABLE} only works on @code{MyISAM} tables and is the same thing as running @code{myisamchk -m table_name} on the table. Check the table(s) for errors and updates the key statistics for the table. @@ -16884,18 +16885,18 @@ The command returns a table with the following columns: @end multitable Note that you can get many rows of information for each checked -table. The last one row will be of @code{Msg_type status} and should +table. The last row will be of @code{Msg_type status} and should normally be @code{OK}. If you don't get @code{OK}, or @code{Not checked} you should normally run a repair of the table. @xref{Table maintenance}. @code{Not checked} means that the table the given @code{TYPE} told @code{MySQL} that there wasn't any need to check the table. -The different check types stands for the following: +The different check types stand for the following: @multitable @columnfractions .20 .80 @item @code{QUICK} @tab Don't scan the rows for fixed size record tables. -@item @code{FAST} @tab Only check tables which hasn't been closed properly. -@item @code{CHANGED} @tab Only check tables which has been changed since last check or hasn't been closed properly. +@item @code{FAST} @tab Only check tables which haven't been closed properly. +@item @code{CHANGED} @tab Only check tables which have been changed since last check or haven't been closed properly. @item @code{EXTENDED} @tab Do a full key lookup for all keys for each row. This enasures that the table is 100 % consistent, but will take a long time! @end multitable @@ -18442,7 +18443,7 @@ The status variables listed above have the following meaning: @item @code{Bytes_received} @tab Number of bytes received from the client @item @code{Bytes_sent} @tab Number of bytes received from the client @item @code{Connections} @tab Number of connection attempts to the @strong{MySQL} server. -@item @code{Created_tmp_tables} @tab Number of implicit temporary tables that has been created while executing statements. +@item @code{Created_tmp_tables} @tab Number of implicit temporary tables that have been created while executing statements. @item @code{Delayed_insert_threads} @tab Number of delayed insert handler threads in use. @item @code{Delayed_writes} @tab Number of rows written with @code{INSERT DELAYED}. @item @code{Delayed_errors} @tab Number of rows written with @code{INSERT DELAYED} for which some error occurred (probably @code{duplicate key}). @@ -18475,7 +18476,7 @@ have.. @item @code{Open_tables} @tab Number of tables that are open. @item @code{Open_files} @tab Number of files that are open. @item @code{Open_streams} @tab Number of streams that are open (used mainly for logging) -@item @code{Opened_tables} @tab Number of tables that has been opened. +@item @code{Opened_tables} @tab Number of tables that have been opened. @item @code{Questions} @tab Number of queries sent to the server. @item @code{Slow_launch_threads} @tab Number of threads that has taken more than @code{slow_launch_time} to connect. @item @code{Slow_queries} @tab Number of queries that has taken more than @code{long_query_time} @@ -26485,9 +26486,9 @@ If you are using @code{--extended-check} and have much memory, you should increase the value of @code{key_buffer_size} a lot! @item -F or --fast -Check only tables that hasn't been closed properly. +Check only tables that haven't been closed properly. @item -C or --check-only-changed -Check only tables that has changed since last check. +Check only tables that have changed since last check. @item -f or --force Restart @code{myisamchk} with @code{-r} (repair) on the table, if @code{myisamchk} finds any errors in the table. @@ -35404,9 +35405,9 @@ Added atomic @code{RENAME} command. Don't count entries with @code{NULL} in @code{COUNT(DISTINCT ..)}. @item Changed @code{ALTER TABLE}, @code{LOAD DATA INFILE} on empty tables and -@code{INSERT ... SELECT...} on empty tables to create non-unique indexs +@code{INSERT ... SELECT...} on empty tables to create non-unique indexes in a separate batch with sorting. This will make the above calls much -faster when you have many index. +faster when you have many indexes. @item @code{ALTER TABLE} now logs the first used insert_id correctly. @item @@ -35431,7 +35432,7 @@ Fixed that @code{INSERT INTO bdb_table ... SELECT} works with BDB tables. @item Check table now updates key statistics for the table. @item -@code{ANALYZE TABLE} will now only update tables that has been changed +@code{ANALYZE TABLE} will now only update tables that have been changed since last @code{ANALYZE}. Note that this is a new feature and tables will not be marked to be analyzed until they are updated in any way with 3.23.23 or newer. For older tables, you have to do @code{CHECK TABLE} diff --git a/Makefile.am b/Makefile.am index bd67f65f7c3..f10e60f8c51 100644 --- a/Makefile.am +++ b/Makefile.am @@ -21,7 +21,7 @@ TAR = gtar # These are built from source in the Docs directory EXTRA_DIST = INSTALL-SOURCE README \ COPYING COPYING.LIB MIRRORS -SUBDIRS = include @docs_dirs@ @readline_dir@ libmysql client \ +SUBDIRS = include @docs_dirs@ @readline_dir@ @sql_client_dirs@ \ @sql_server_dirs@ scripts tests man \ @bench_dirs@ support-files @@ -33,6 +33,7 @@ config.h: linked_client_sources linked_server_sources linked_client_sources: cd libmysql; $(MAKE) link_sources + cd libmysql_r; $(MAKE) link_sources echo timestamp > linked_client_sources #avoid recursive make calls in sql directory diff --git a/configure.in b/configure.in index 88496f601f8..f200fefca33 100644 --- a/configure.in +++ b/configure.in @@ -987,15 +987,6 @@ else fi #---END: -if test "$THREAD_SAFE_CLIENT" = "no" -then - CLIENT_LIBS=$NON_THREADED_CLIENT_LIBS -else - CLIENT_LIBS=$LIBS - AC_DEFINE(THREAD_SAFE_CLIENT) -fi -AC_SUBST(CLIENT_LIBS) - # for user definable functions (must be checked after threads on AIX) AC_CHECK_LIB(dl,dlopen) @@ -1769,6 +1760,19 @@ MYSQL_CHECK_BDB # If we have threads generate some library functions and test programs sql_server_dirs= server_scripts= + +dnl This probably should be cleaned up more - for now the threaded +dnl client is just using plain-old libs. +sql_client_dirs="libmysql client" +CLIENT_LIBS=$NON_THREADED_CLIENT_LIBS +if test "$THREAD_SAFE_CLIENT" != "no" +then + sql_client_dirs="libmysql_r $sql_client_dirs" + AC_DEFINE(THREAD_SAFE_CLIENT) +fi +AC_SUBST(CLIENT_LIBS) +AC_SUBST(sql_client_dirs) + if test "$with_server" = "yes" then AC_DEFINE(THREAD) @@ -1840,7 +1844,7 @@ AC_OUTPUT(Makefile extra/Makefile mysys/Makefile isam/Makefile \ strings/Makefile regex/Makefile heap/Makefile \ myisam/Makefile myisammrg/Makefile \ man/Makefile \ - readline/Makefile libmysql/Makefile client/Makefile \ + readline/Makefile libmysql_r/Makefile libmysql/Makefile client/Makefile \ sql/Makefile sql/share/Makefile \ merge/Makefile dbug/Makefile scripts/Makefile \ include/Makefile sql-bench/Makefile \ diff --git a/include/global.h b/include/global.h index d7cd0ff9881..9cffcbf477b 100644 --- a/include/global.h +++ b/include/global.h @@ -33,7 +33,7 @@ #endif /* _cplusplus */ /* The client defines this to avoid all thread code */ -#if defined(UNDEF_THREADS_HACK) && !defined(THREAD_SAFE_CLIENT) +#if defined(UNDEF_THREADS_HACK) #undef THREAD #undef HAVE_mit_thread #undef HAVE_LINUXTHREADS diff --git a/libmysql/Makefile.am b/libmysql/Makefile.am index 2e04b33a72a..c67aebc10c9 100644 --- a/libmysql/Makefile.am +++ b/libmysql/Makefile.am @@ -17,60 +17,15 @@ # This file is public domain and comes with NO WARRANTY of any kind -MYSQLDATAdir = $(localstatedir) -MYSQLSHAREdir = $(pkgdatadir) -MYSQLBASEdir= $(prefix) -INCLUDES = -I$(srcdir)/../include -I../include \ - -I$(srcdir)/.. -I$(top_srcdir) -I.. -LIBS = @CLIENT_LIBS@ -LDADD = @CLIENT_EXTRA_LDFLAGS@ libmysqlclient.la -pkglib_LTLIBRARIES = libmysqlclient.la +target = libmysqlclient.la +target_defs = -DUNDEF_THREADS_HACK +LIBS = @CLIENT_LIBS@ -noinst_PROGRAMS = conf_to_src +include $(srcdir)/Makefile.shared -# We need .lo, not .o files for everything. -CHARSET_OBJS=@CHARSET_OBJS@ -LTCHARSET_OBJS= ${CHARSET_OBJS:.o=.lo} - -libmysqlclient_la_SOURCES = libmysql.c net.c violite.c password.c \ - get_password.c errmsg.c - -mystringsobjects = strmov.lo strxmov.lo strnmov.lo strmake.lo strend.lo \ - strnlen.lo strfill.lo is_prefix.lo \ - int2str.lo str2int.lo strinstr.lo strcont.lo \ - strcend.lo \ - bchange.lo bmove.lo bmove_upp.lo longlong2str.lo \ - strtoull.lo strtoll.lo llstr.lo strto.lo \ - ctype.lo $(LTCHARSET_OBJS) -mystringsextra= strto.c ctype_autoconf.c -dbugobjects = dbug.lo # IT IS IN SAFEMALLOC.C sanity.lo -mysysheaders = mysys_priv.h my_static.h -mysysobjects1 = my_init.lo my_static.lo my_malloc.lo my_realloc.lo \ - my_create.lo my_delete.lo my_tempnam.lo my_open.lo \ - mf_casecnv.lo my_read.lo my_write.lo errors.lo \ - my_error.lo my_getwd.lo my_div.lo \ - mf_pack.lo my_messnc.lo mf_dirname.lo mf_fn_ext.lo\ - mf_wcomp.lo typelib.lo safemalloc.lo my_alloc.lo \ - mf_format.lo mf_path.lo mf_unixpath.lo my_fopen.lo \ - mf_loadpath.lo my_pthread.lo my_thr_init.lo \ - thr_mutex.lo mulalloc.lo string.lo default.lo \ - my_compress.lo array.lo my_once.lo list.lo my_net.lo \ - charset.lo -# Not needed in the minimum library -mysysobjects2 = getopt.lo getopt1.lo getvar.lo my_lib.lo -mysysobjects = $(mysysobjects1) $(mysysobjects2) -libmysqlclient_la_LIBADD = $(mysysobjects) $(mystringsobjects) $(dbugobjects) -libmysqlclient_la_LDFLAGS = -version-info @SHARED_LIB_VERSION@ -CLEANFILES = $(libmysqlclient_la_LIBADD) $(SHLIBOBJS) \ - libmysqclient.la -DEFS = -DUNDEF_THREADS_HACK \ - -DDEFAULT_CHARSET_HOME="\"$(MYSQLBASEdir)\"" \ - -DDATADIR="\"$(MYSQLDATAdir)\"" \ - -DSHAREDIR="\"$(MYSQLSHAREdir)\"" - -# The automatic dependencies miss this -bmove_upp.lo: $(LTCHARSET_OBJS) -ctype.c: ctype_extra_sources.c +libmysqlclient_la_SOURCES = $(target_sources) +libmysqlclient_la_LIBADD = $(target_libadd) +libmysqlclient_la_LDFLAGS = $(target_ldflags) # This is called from the toplevel makefile link_sources: @@ -95,19 +50,6 @@ link_sources: @LN_CP_F@ $(srcdir)/../mysys/$$f $(srcdir)/$$f; \ done; -clean-local: - rm -f `echo $(mystringsobjects) | sed "s;\.lo;.c;g"` \ - `echo $(dbugobjects) | sed "s;\.lo;.c;g"` \ - `echo $(mysysobjects) | sed "s;\.lo;.c;g"` \ - $(mystringsextra) ctype_extra_sources.c \ - ../linked_client_sources - -ctype_extra_sources.c: conf_to_src - ./conf_to_src $(top_srcdir) @CHARSETS_NEED_SOURCE@ > \ - $(srcdir)/ctype_extra_sources.c -conf_to_src_SOURCES = conf_to_src.c -conf_to_src_LDADD= - # This part requires GNUmake # # This makes a distribution file with only the files needed to compile @@ -128,10 +70,10 @@ lobjs = $(mysysobjects1) $(dbugobjects) $(mystringsobjects) do-lib-dist: dir=libmysql-$(MYSQL_NO_DASH_VERSION); \ srcs1=`echo $(lobjs) | sed "s;\.lo;.c;g"`; \ - srcs2=$(libmysqlclient_la_SOURCES); \ + srcs2=$(target_sources); \ srcs="$$srcs1 $$srcs2"; \ objs1=`echo $(lobjs) | sed "s;\.lo;.o;g"`; \ - objs2=`echo $(libmysqlclient_la_SOURCES) | sed "s;\.c;.o;g"`; \ + objs2=`echo $(target_sources) | sed "s;\.c;.o;g"`; \ objs="$$objs1 $$objs2"; \ rm -rf $$dir; \ mkdir $$dir; \ @@ -147,6 +89,3 @@ do-lib-dist: echo ' $$(AR) r $$@ $$?' >>$$dir/Makefile; \ gtar cvzf $$dir.tar.gz $$dir; \ cd $$dir; gmake - -# Don't update the files from bitkeeper -%::SCCS/s.% diff --git a/libmysql/Makefile.shared b/libmysql/Makefile.shared new file mode 100644 index 00000000000..67c92413d8c --- /dev/null +++ b/libmysql/Makefile.shared @@ -0,0 +1,89 @@ +## Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB +## +## This library is free software; you can redistribute it and/or +## modify it under the terms of the GNU Library General Public +## License as published by the Free Software Foundation; either +## version 2 of the License, or (at your option) any later version. +## +## This library is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## Library General Public License for more details. +## +## You should have received a copy of the GNU Library General Public +## License along with this library; if not, write to the Free +## Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +## MA 02111-1307, USA +## +## This file is public domain and comes with NO WARRANTY of any kind + +MYSQLDATAdir = $(localstatedir) +MYSQLSHAREdir = $(pkgdatadir) +MYSQLBASEdir= $(prefix) +INCLUDES = -I$(srcdir)/../include -I../include \ + -I$(srcdir)/.. -I$(top_srcdir) -I.. +## We'll use CLIENT_EXTRA_LDFLAGS for threaded and non-threaded +## until someone complains that they need separate options. +LDADD = @CLIENT_EXTRA_LDFLAGS@ $(target) +pkglib_LTLIBRARIES = $(target) + +noinst_PROGRAMS = conf_to_src + +# We need .lo, not .o files for everything. +CHARSET_OBJS=@CHARSET_OBJS@ +LTCHARSET_OBJS= ${CHARSET_OBJS:.o=.lo} + +target_sources = libmysql.c net.c violite.c password.c \ + get_password.c errmsg.c + +mystringsobjects = strmov.lo strxmov.lo strnmov.lo strmake.lo strend.lo \ + strnlen.lo strfill.lo is_prefix.lo \ + int2str.lo str2int.lo strinstr.lo strcont.lo \ + strcend.lo \ + bchange.lo bmove.lo bmove_upp.lo longlong2str.lo \ + strtoull.lo strtoll.lo llstr.lo strto.lo \ + ctype.lo $(LTCHARSET_OBJS) +mystringsextra= strto.c ctype_autoconf.c +dbugobjects = dbug.lo # IT IS IN SAFEMALLOC.C sanity.lo +mysysheaders = mysys_priv.h my_static.h +mysysobjects1 = my_init.lo my_static.lo my_malloc.lo my_realloc.lo \ + my_create.lo my_delete.lo my_tempnam.lo my_open.lo \ + mf_casecnv.lo my_read.lo my_write.lo errors.lo \ + my_error.lo my_getwd.lo my_div.lo \ + mf_pack.lo my_messnc.lo mf_dirname.lo mf_fn_ext.lo\ + mf_wcomp.lo typelib.lo safemalloc.lo my_alloc.lo \ + mf_format.lo mf_path.lo mf_unixpath.lo my_fopen.lo \ + mf_loadpath.lo my_pthread.lo my_thr_init.lo \ + thr_mutex.lo mulalloc.lo string.lo default.lo \ + my_compress.lo array.lo my_once.lo list.lo my_net.lo \ + charset.lo +# Not needed in the minimum library +mysysobjects2 = getopt.lo getopt1.lo getvar.lo my_lib.lo +mysysobjects = $(mysysobjects1) $(mysysobjects2) +target_libadd = $(mysysobjects) $(mystringsobjects) $(dbugobjects) +target_ldflags = -version-info @SHARED_LIB_VERSION@ +CLEANFILES = $(target_libadd) $(SHLIBOBJS) \ + $(target) +DEFS = -DDEFAULT_CHARSET_HOME="\"$(MYSQLBASEdir)\"" \ + -DDATADIR="\"$(MYSQLDATAdir)\"" \ + -DSHAREDIR="\"$(MYSQLSHAREdir)\"" $(target_defs) + +# The automatic dependencies miss this +bmove_upp.lo: $(LTCHARSET_OBJS) +ctype.lo: ctype_extra_sources.c + +clean-local: + rm -f `echo $(mystringsobjects) | sed "s;\.lo;.c;g"` \ + `echo $(dbugobjects) | sed "s;\.lo;.c;g"` \ + `echo $(mysysobjects) | sed "s;\.lo;.c;g"` \ + $(mystringsextra) ctype_extra_sources.c \ + ../linked_client_sources + +ctype_extra_sources.c: conf_to_src + ./conf_to_src $(top_srcdir) @CHARSETS_NEED_SOURCE@ > \ + $(srcdir)/ctype_extra_sources.c +conf_to_src_SOURCES = conf_to_src.c +conf_to_src_LDADD= + +# Don't update the files from bitkeeper +%::SCCS/s.% diff --git a/libmysql_r/Makefile.am b/libmysql_r/Makefile.am new file mode 100644 index 00000000000..424e6bdf854 --- /dev/null +++ b/libmysql_r/Makefile.am @@ -0,0 +1,39 @@ +# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + +# This file is public domain and comes with NO WARRANTY of any kind + +target = libmysqlclient_r.la +target_defs = +## LIBS = @LIBS@ + +## automake barfs if you don't use $(srcdir) or $(top_srcdir) in include +include $(top_srcdir)/libmysql/Makefile.shared + +libmysql_dir = $(top_srcdir)/libmysql + +libmysqlclient_r_la_SOURCES = $(target_sources) +libmysqlclient_r_la_LIBADD = $(target_libadd) +libmysqlclient_r_la_LDFLAGS = $(target_ldflags) + +# This is called from the toplevel makefile +link_sources: + set -x; \ + for f in `cd $(libmysql_dir) && echo *.[ch]`; do \ + rm -f $(srcdir)/$$f; \ + @LN_CP_F@ $(libmysql_dir)/$$f $(srcdir)/$$f; \ + done diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index b0fdb1592c3..315484f47dc 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -189,6 +189,7 @@ tar cf $RBR/all.tar . # Save shared libraries (cd libmysql/.libs; tar cf $RBR/shared-libs.tar *.so*) +(cd libmysql_r/.libs; tar rf $RBR/shared-libs.tar *.so*) # Save manual to avoid rebuilding mv Docs/manual.ps Docs/manual.ps.save @@ -353,6 +354,11 @@ fi %changelog +* Fri Aug 18 2000 + +- Added separate libmysql_r directory; now both a threaded + and non-threaded library is shipped. + * Wed Sep 28 1999 David Axmark <davida@mysql.com> - Added the support-files/my-example.cnf to the docs directory. |