mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 20:42:30 +01:00
9dde418895
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)"
155 lines
5.9 KiB
Makefile
155 lines
5.9 KiB
Makefile
# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
|
|
#
|
|
# This program is free software; you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# This program 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 General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program; if not, write to the Free Software
|
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
#called from the top level Makefile
|
|
|
|
MYSQLDATAdir = $(localstatedir)
|
|
MYSQLSHAREdir = $(pkgdatadir)
|
|
MYSQLBASEdir= $(prefix)
|
|
INCLUDES = @MT_INCLUDES@ \
|
|
@bdb_includes@ @innodb_includes@ @ndbcluster_includes@ \
|
|
-I$(top_srcdir)/include -I$(top_srcdir)/regex \
|
|
-I$(srcdir) $(openssl_includes)
|
|
WRAPLIBS= @WRAPLIBS@
|
|
SUBDIRS = share
|
|
libexec_PROGRAMS = mysqld
|
|
noinst_PROGRAMS = gen_lex_hash
|
|
bin_PROGRAMS = mysql_tzinfo_to_sql
|
|
gen_lex_hash_LDFLAGS = @NOINST_LDFLAGS@
|
|
LDADD = @isam_libs@ \
|
|
../myisam/libmyisam.a \
|
|
../myisammrg/libmyisammrg.a \
|
|
../heap/libheap.a \
|
|
../vio/libvio.a \
|
|
../mysys/libmysys.a \
|
|
../dbug/libdbug.a \
|
|
../regex/libregex.a \
|
|
../strings/libmystrings.a
|
|
|
|
mysqld_LDADD = @MYSQLD_EXTRA_LDFLAGS@ \
|
|
@bdb_libs@ @innodb_libs@ @pstack_libs@ \
|
|
@innodb_system_libs@ \
|
|
@ndbcluster_libs@ @ndbcluster_system_libs@ \
|
|
$(LDADD) $(CXXLDFLAGS) $(WRAPLIBS) @LIBDL@ @openssl_libs@
|
|
noinst_HEADERS = item.h item_func.h item_sum.h item_cmpfunc.h \
|
|
item_strfunc.h item_timefunc.h item_uniq.h \
|
|
item_create.h item_subselect.h item_row.h \
|
|
mysql_priv.h item_geofunc.h sql_bitmap.h \
|
|
procedure.h sql_class.h sql_lex.h sql_list.h \
|
|
sql_manager.h sql_map.h sql_string.h unireg.h \
|
|
field.h handler.h mysqld_suffix.h \
|
|
ha_isammrg.h ha_isam.h ha_myisammrg.h\
|
|
ha_heap.h ha_myisam.h ha_berkeley.h ha_innodb.h \
|
|
ha_ndbcluster.h opt_range.h protocol.h \
|
|
sql_select.h structs.h table.h sql_udf.h hash_filo.h\
|
|
lex.h lex_symbol.h sql_acl.h sql_crypt.h \
|
|
log_event.h sql_repl.h slave.h \
|
|
stacktrace.h sql_sort.h sql_cache.h set_var.h \
|
|
spatial.h gstream.h client_settings.h tzfile.h \
|
|
tztime.h examples/ha_example.h examples/ha_archive.h
|
|
mysqld_SOURCES = sql_lex.cc sql_handler.cc \
|
|
item.cc item_sum.cc item_buff.cc item_func.cc \
|
|
item_cmpfunc.cc item_strfunc.cc item_timefunc.cc \
|
|
thr_malloc.cc item_create.cc item_subselect.cc \
|
|
item_row.cc item_geofunc.cc \
|
|
field.cc strfunc.cc key.cc sql_class.cc sql_list.cc \
|
|
net_serv.cc protocol.cc sql_state.c \
|
|
lock.cc my_lock.c \
|
|
sql_string.cc sql_manager.cc sql_map.cc \
|
|
mysqld.cc password.c hash_filo.cc hostname.cc \
|
|
set_var.cc sql_parse.cc sql_yacc.yy \
|
|
sql_base.cc table.cc sql_select.cc sql_insert.cc \
|
|
sql_prepare.cc sql_error.cc \
|
|
sql_update.cc sql_delete.cc uniques.cc sql_do.cc \
|
|
procedure.cc item_uniq.cc sql_test.cc \
|
|
log.cc log_event.cc init.cc derror.cc sql_acl.cc \
|
|
unireg.cc des_key_file.cc \
|
|
discover.cc time.cc opt_range.cc opt_sum.cc \
|
|
records.cc filesort.cc handler.cc \
|
|
ha_heap.cc ha_myisam.cc ha_myisammrg.cc \
|
|
ha_berkeley.cc ha_innodb.cc \
|
|
ha_isam.cc ha_isammrg.cc ha_ndbcluster.cc \
|
|
sql_db.cc sql_table.cc sql_rename.cc sql_crypt.cc \
|
|
sql_load.cc mf_iocache.cc field_conv.cc sql_show.cc \
|
|
sql_udf.cc sql_analyse.cc sql_analyse.h sql_cache.cc \
|
|
slave.cc sql_repl.cc sql_union.cc sql_derived.cc \
|
|
client.c sql_client.cc mini_client_errors.c pack.c\
|
|
stacktrace.c repl_failsafe.h repl_failsafe.cc \
|
|
gstream.cc spatial.cc sql_help.cc protocol_cursor.cc \
|
|
tztime.cc my_time.c \
|
|
examples/ha_example.cc examples/ha_archive.cc
|
|
gen_lex_hash_SOURCES = gen_lex_hash.cc
|
|
gen_lex_hash_LDADD = $(LDADD) $(CXXLDFLAGS)
|
|
|
|
mysql_tzinfo_to_sql_SOURCES = mysql_tzinfo_to_sql_tztime.cc
|
|
mysql_tzinfo_to_sql_CXXFLAGS = -DTZINFO2SQL $(AM_CXXFLAGS)
|
|
mysql_tzinfo_to_sql_LDADD = $(LDADD) $(CXXLDFLAGS)
|
|
|
|
DEFS = -DMYSQL_SERVER \
|
|
-DDEFAULT_MYSQL_HOME="\"$(MYSQLBASEdir)\"" \
|
|
-DDATADIR="\"$(MYSQLDATAdir)\"" \
|
|
-DSHAREDIR="\"$(MYSQLSHAREdir)\"" \
|
|
@DEFS@
|
|
# Don't put lex_hash.h in BUILT_SOURCES as this will give infinite recursion
|
|
BUILT_SOURCES = sql_yacc.cc sql_yacc.h
|
|
EXTRA_DIST = udf_example.cc $(BUILT_SOURCES)
|
|
AM_YFLAGS = -d
|
|
|
|
link_sources:
|
|
rm -f mini_client_errors.c
|
|
@LN_CP_F@ ../libmysql/errmsg.c mini_client_errors.c
|
|
rm -f pack.c
|
|
@LN_CP_F@ ../sql-common/pack.c pack.c
|
|
rm -f client.c
|
|
@LN_CP_F@ ../sql-common/client.c client.c
|
|
rm -f my_time.c
|
|
@LN_CP_F@ ../sql-common/my_time.c my_time.c
|
|
|
|
gen_lex_hash.o: gen_lex_hash.cc lex.h
|
|
$(CXXCOMPILE) -c $(INCLUDES) $<
|
|
|
|
mysql_tzinfo_to_sql_tztime.cc: tztime.cc
|
|
rm -f $(srcdir)/mysql_tzinfo_to_sql_tztime.cc
|
|
@LN_CP_F@ $(srcdir)/tztime.cc $(srcdir)/mysql_tzinfo_to_sql_tztime.cc
|
|
|
|
# Try to get better dependencies for the grammar. Othervise really bad
|
|
# things like different grammars for different pars of MySQL can
|
|
# happen if you are unlucky.
|
|
sql_yacc.cc: sql_yacc.yy
|
|
sql_yacc.h: sql_yacc.yy
|
|
|
|
sql_yacc.o: sql_yacc.cc sql_yacc.h $(HEADERS)
|
|
@echo "Note: The following compile may take a long time."
|
|
@echo "If it fails, re-run configure with --with-low-memory"
|
|
$(CXXCOMPILE) $(LM_CFLAGS) -c $<
|
|
|
|
lex_hash.h: lex.h gen_lex_hash.cc sql_yacc.h
|
|
$(MAKE) gen_lex_hash$(EXEEXT)
|
|
./gen_lex_hash$(EXEEXT) > $@
|
|
|
|
# Hack to ensure that lex_hash.h is built early
|
|
sql_lex.o: lex_hash.h
|
|
|
|
# For testing of udf_example.so; Works on platforms with gcc
|
|
# (This is not part of our build process but only provided as an example)
|
|
udf_example.so: udf_example.cc
|
|
$(CXXCOMPILE) -shared -o $@ $<
|
|
|
|
#distclean:
|
|
# rm -f lex_hash.h
|
|
|
|
# Don't update the files from bitkeeper
|
|
%::SCCS/s.%
|