2004-08-05 11:59:17 +02:00
|
|
|
# Copyright (C) 2000-2004 MySQL AB
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of version 2 GNU General Public License as
|
|
|
|
# published by the Free Software Foundation.
|
|
|
|
#
|
|
|
|
# There are special exceptions to the terms and conditions of the GPL as it
|
|
|
|
# is applied to this software. View the full text of the exception in file
|
2004-08-05 17:05:11 +02:00
|
|
|
# EXCEPTIONS-CLIENT in the directory of this software distribution.
|
2004-08-05 11:59:17 +02:00
|
|
|
#
|
|
|
|
# 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
|
2000-08-18 20:49:31 +02:00
|
|
|
|
|
|
|
MYSQLDATAdir = $(localstatedir)
|
|
|
|
MYSQLSHAREdir = $(pkgdatadir)
|
|
|
|
MYSQLBASEdir= $(prefix)
|
|
|
|
## 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
|
|
|
|
|
|
|
|
|
2002-07-23 17:31:22 +02:00
|
|
|
target_sources = libmysql.c password.c manager.c \
|
|
|
|
get_password.c errmsg.c
|
2000-08-18 20:49:31 +02:00
|
|
|
|
2002-01-02 20:29:41 +01:00
|
|
|
mystringsobjects = strmov.lo strxmov.lo strxnmov.lo strnmov.lo \
|
2004-02-13 15:27:21 +01:00
|
|
|
strmake.lo strend.lo strtod.lo \
|
2000-08-18 20:49:31 +02:00
|
|
|
strnlen.lo strfill.lo is_prefix.lo \
|
|
|
|
int2str.lo str2int.lo strinstr.lo strcont.lo \
|
2003-01-29 14:31:20 +01:00
|
|
|
strcend.lo bcmp.lo ctype-latin1.lo \
|
2000-08-18 20:49:31 +02:00
|
|
|
bchange.lo bmove.lo bmove_upp.lo longlong2str.lo \
|
2003-01-14 13:28:36 +01:00
|
|
|
strtoull.lo strtoll.lo llstr.lo my_vsnprintf.lo \
|
2002-10-23 12:40:22 +02:00
|
|
|
ctype.lo ctype-simple.lo ctype-bin.lo ctype-mb.lo \
|
2005-01-12 11:58:15 +01:00
|
|
|
ctype-big5.lo ctype-czech.lo ctype-cp932.lo ctype-eucjpms.lo ctype-euc_kr.lo \
|
2003-01-29 12:08:09 +01:00
|
|
|
ctype-win1250ch.lo ctype-utf8.lo ctype-extra.lo \
|
2003-05-21 12:29:44 +02:00
|
|
|
ctype-ucs2.lo ctype-gb2312.lo ctype-gbk.lo \
|
2004-03-24 13:16:08 +01:00
|
|
|
ctype-sjis.lo ctype-tis620.lo ctype-ujis.lo \
|
2005-06-24 22:41:33 +02:00
|
|
|
ctype-uca.lo xml.lo my_strtoll10.lo str_alloc.lo
|
2002-03-19 17:03:10 +01:00
|
|
|
|
2002-08-06 21:20:11 +02:00
|
|
|
mystringsextra= strto.c
|
2000-08-18 20:49:31 +02:00
|
|
|
dbugobjects = dbug.lo # IT IS IN SAFEMALLOC.C sanity.lo
|
|
|
|
mysysheaders = mysys_priv.h my_static.h
|
2003-08-27 01:51:39 +02:00
|
|
|
vioheaders = vio_priv.h
|
2000-08-18 20:49:31 +02:00
|
|
|
mysysobjects1 = my_init.lo my_static.lo my_malloc.lo my_realloc.lo \
|
2000-10-05 00:00:36 +02:00
|
|
|
my_create.lo my_delete.lo mf_tempfile.lo my_open.lo \
|
2004-02-19 18:33:09 +01:00
|
|
|
my_file.lo my_read.lo my_write.lo errors.lo \
|
2000-08-18 20:49:31 +02:00
|
|
|
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 \
|
2001-06-01 02:53:14 +02:00
|
|
|
my_symlink.lo my_fstream.lo \
|
2000-08-18 20:49:31 +02:00
|
|
|
mf_loadpath.lo my_pthread.lo my_thr_init.lo \
|
2005-05-18 19:10:17 +02:00
|
|
|
thr_mutex.lo mulalloc.lo string.lo \
|
|
|
|
default.lo default_modify.lo \
|
2000-08-18 20:49:31 +02:00
|
|
|
my_compress.lo array.lo my_once.lo list.lo my_net.lo \
|
2003-10-06 21:56:34 +02:00
|
|
|
charset.lo charset-def.lo hash.lo mf_iocache.lo \
|
2003-01-28 07:38:28 +01:00
|
|
|
mf_iocache2.lo my_seek.lo my_sleep.lo \
|
2005-01-25 17:32:09 +01:00
|
|
|
my_pread.lo mf_cache.lo md5.lo sha1.lo \
|
|
|
|
my_getopt.lo my_gethostbyname.lo my_port.lo \
|
2005-05-15 23:54:02 +02:00
|
|
|
my_rename.lo my_chsize.lo
|
2002-07-23 17:31:22 +02:00
|
|
|
sqlobjects = net.lo
|
Fix for Bug#4030 "Client side conversion string -> date type doesn't
work (prepared statements)" and after-review fixes:
- str_to_TIME renamed to str_to_datetime to pair with str_to_time
- functions str_to_time and str_to_TIME moved to sql-common
- send_data_str now supports MYSQL_TYPE_TIME, MYSQL_TIME_DATE,
MYSQL_TIME_DATETIME types of user input buffers.
- few more comments in the client library
- a test case added.
VC++Files/libmysql/libmysql.dsp:
new file: my_time.c
VC++Files/libmysqld/libmysqld.dsp:
new file: my_time.c
VC++Files/sql/mysqld.dsp:
new file: my_time.c
include/Makefile.am:
- mysql_time.h added to the list of installed client library headers
include/mysql.h:
- declarations for MYSQL_TIME and enum_mysql_timestamp_type moved to
mysql_time.h, which is in shared use of client library and mysys.
libmysql/Makefile.shared:
- my_time.lo added to the list of libmysql objects
libmysql/libmysql.c:
Fix for bug#4030 "Client side conversion string -> date type doesn't work
(prepared statements)" and cleanup.
- added case labels for TIME/DATE/DATETIME types to send_data_str
- comments for read_binary_{date,time,datetime}, fetch_result_*, fetch_results.
libmysqld/Makefile.am:
- my_time.c added
sql-common/Makefile.am:
- my_time.c added to the list of files included into source distribution.
sql/Makefile.am:
my_time.c added to the list of mysqld sources.
sql/field.cc:
- TIMESTAMP_{TIME,DATE,DATETIME,...} renamed to
MYSQL_TIMESTAMP_{TIME,DATETIME,DATE,...}
sql/item.cc:
- TIMESTAMP_{TIME,DATE,DATETIME,...} renamed to
MYSQL_TIMESTAMP_{TIME,DATETIME,DATE,...}
sql/item_timefunc.cc:
- TIMESTAMP_{TIME,DATE,DATETIME,...} renamed to
MYSQL_TIMESTAMP_{TIME,DATETIME,DATE,...}
sql/mysql_priv.h:
- added typedefs for TIME and timestamp_type
- removed declarations for str_to_time and str_to_TIME (now this functions
reside in mysys)
sql/mysqld.cc:
- log_10_int moved to mysys (it's used by str_to_TIME and str_to_time)
- enum values TIMESTAMP_{TIME,DATE,DATETIME} were renamed to
MYSQL_TIMESTAMP_{TIME,DATE,DATETIME}
sql/set_var.cc:
- TIMESTAMP_{TIME,DATE,DATETIME,...} renamed to
MYSQL_TIMESTAMP_{TIME,DATETIME,DATE,...}
sql/set_var.h:
- fixed timestamp_type usage to be compatible with typedef.
sql/sql_prepare.cc:
- TIMESTAMP_{TIME,DATE,DATETIME} were renamed to
MYSQL_TIMESTAMP_{TIME,DATE,DATETIME}
- embedded library implementation of set_param_{time,date,datetime} is
much simplier now, as MYSQL_TIME is the same as TIME.
sql/sql_yacc.yy:
- s/\<TIMESTAMP_/MYSQL_TIMESTAMP/gc
sql/structs.h:
- declarations for TIME and timestamp_type replaced with typedefs
- str_to_datetime arguments moved to mysys headers
sql/time.cc:
- str_to_time and str_to_TIME moved to mysys
- TIMESTAMP_{TIME,DATE,DATETIME,...} renamed to
MYSQL_TIMESTAMP_{TIME,DATETIME,DATE,...} as these names are now
exported to client.
- str_to_TIME renamed to str_to_datetime to pair with str_to_time
- str_to_TIME_with_warn renamed accordingly
sql/tztime.cc:
- TIMESTAMP_{TIME,DATE,DATETIME,...} renamed to
MYSQL_TIMESTAMP_{TIME,DATETIME,DATE,...}
tests/client_test.c:
- a test case for Bug#4030 "Client side conversion string -> date type
doesn't work (prepared statements)"
2004-06-24 17:08:36 +02:00
|
|
|
sql_cmn_objects = pack.lo client.lo my_time.lo
|
2001-08-29 08:13:29 +02:00
|
|
|
|
2000-08-18 20:49:31 +02:00
|
|
|
# Not needed in the minimum library
|
2002-06-28 08:18:23 +02:00
|
|
|
mysysobjects2 = my_lib.lo
|
2000-08-18 20:49:31 +02:00
|
|
|
mysysobjects = $(mysysobjects1) $(mysysobjects2)
|
2002-06-28 08:18:23 +02:00
|
|
|
target_libadd = $(mysysobjects) $(mystringsobjects) $(dbugobjects) \
|
2003-04-23 16:37:33 +02:00
|
|
|
$(sql_cmn_objects) $(vio_objects) $(sqlobjects)
|
2006-01-17 15:51:08 +01:00
|
|
|
target_ldflags = -version-info @SHARED_LIB_VERSION@ @LD_VERSION_SCRIPT@
|
2001-07-24 08:07:46 +02:00
|
|
|
vio_objects= vio.lo viosocket.lo viossl.lo viosslfactories.lo
|
2000-08-18 20:49:31 +02:00
|
|
|
CLEANFILES = $(target_libadd) $(SHLIBOBJS) \
|
|
|
|
$(target)
|
|
|
|
DEFS = -DDEFAULT_CHARSET_HOME="\"$(MYSQLBASEdir)\"" \
|
|
|
|
-DDATADIR="\"$(MYSQLDATAdir)\"" \
|
2005-01-04 19:13:47 +01:00
|
|
|
-DDEFAULT_HOME_ENV=MYSQL_HOME \
|
2005-07-18 14:33:18 +02:00
|
|
|
-DDEFAULT_GROUP_SUFFIX_ENV=MYSQL_GROUP_SUFFIX \
|
2006-04-10 15:11:37 +02:00
|
|
|
-DDEFAULT_SYSCONFDIR="\"$(sysconfdir)\"" \
|
2000-08-18 20:49:31 +02:00
|
|
|
-DSHAREDIR="\"$(MYSQLSHAREdir)\"" $(target_defs)
|
|
|
|
|
2006-04-03 12:07:18 +02:00
|
|
|
if HAVE_YASSL
|
2006-11-27 21:15:25 +01:00
|
|
|
yassl_las = $(top_builddir)/extra/yassl/src/libyassl.la \
|
|
|
|
$(top_builddir)/extra/yassl/taocrypt/src/libtaocrypt.la
|
2006-04-03 12:07:18 +02:00
|
|
|
endif
|
|
|
|
|
2000-08-18 20:49:31 +02:00
|
|
|
# The automatic dependencies miss this
|
2002-03-19 17:03:10 +01:00
|
|
|
#bmove_upp.lo: $(LTCHARSET_OBJS)
|
2000-08-18 20:49:31 +02:00
|
|
|
|
|
|
|
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"` \
|
2002-12-27 17:37:55 +01:00
|
|
|
`echo $(vio_objects) | sed "s;\.lo;.c;g"` \
|
2003-04-23 16:37:33 +02:00
|
|
|
`echo $(sql_cmn_objects) | sed "s;\.lo;.c;g"` \
|
2002-12-27 17:37:55 +01:00
|
|
|
$(CHARSET_SRCS) $(CHARSET_OBJS) \
|
2003-08-29 12:44:35 +02:00
|
|
|
$(mystringsextra) $(mysysheaders) $(vioheaders)\
|
"After Monty's review" changes to the fix for BUG#8325 "Deadlock in replication thread stops replication":
s/sleep/safe_sleep (thread safe); sleep 0/1/2/3/4/5/5/5 (get slave less late);
no message on error log (deadlock is too common sometimes), a global counter
instead (SHOW STATUS LIKE 'slave_retried_transactions').
Plus a fix for libmysql/Makefile.shared
libmysql/Makefile.shared:
When we "make clean" in libmysql/ we remove the symlinks there, so we
need to mark that they have to be recreated later: this is done by removing
../linked_libmysql_sources. If we don't do this, 'make' will fail after 'cd libmysql;make clean'.
This Makefile.shared is used by libmysql_r too.
No reason to remove linked_client_sources as we don't remove the links in client/.
mysql-test/r/rpl_deadlock.result:
result fix
mysql-test/t/rpl_deadlock.test:
small test addition
sql/mysqld.cc:
if active_mi could not be alloced, die. New SHOW STATUS LIKE "slave_retried_transactions".
sql/slave.cc:
If slave retries automatically a transaction, no message on error log
(too common situation); sleep 0 secs at first retry, then 1, 2, 3, 4,
5, 5, 5... Sleeping 0 is to get the least possible late, as deadlocks
are usually resolved at first try. New global counter rli->retried_trans
(for SHOW STATUS: total number of times the slave had to retry
any transaction). safe_sleep() is thread-safe, sleep() was not.
I change the rli->trans_retries counter to go from 0 to max instead
of the other way (better for new sleep()).
sql/slave.h:
new global counter rli->retried_trans
sql/sql_show.cc:
SHOW STATUS LIKE "slave_retried_transactions"; needs replication mutexes.
Can't be a simple SHOW_LONG, because active_mi is unset (not alloced yet)
when the static global status_vars is created (active_mi is set
in init_slave()).
sql/structs.h:
new SHOW_SLAVE_RETRIED_TRANS
BitKeeper/etc/logging_ok:
Logging to logging@openlogging.org accepted
2005-03-23 19:19:36 +01:00
|
|
|
../linked_libmysql_sources ../linked_libmysql_r_sources \
|
|
|
|
net.c
|
2000-08-18 20:49:31 +02:00
|
|
|
|
|
|
|
conf_to_src_SOURCES = conf_to_src.c
|
|
|
|
conf_to_src_LDADD=
|
2001-04-18 01:53:21 +02:00
|
|
|
#force static linking of conf_to_src - essential when linking against
|
|
|
|
#custom installation of libc
|
|
|
|
conf_to_src_LDFLAGS=@NOINST_LDFLAGS@
|
|
|
|
|
2000-08-18 20:49:31 +02:00
|
|
|
# Don't update the files from bitkeeper
|
|
|
|
%::SCCS/s.%
|