2010-09-01 08:38:53 +05:00
|
|
|
# Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
|
2001-04-11 13:04:03 +02:00
|
|
|
#
|
2010-09-01 08:38:53 +05:00
|
|
|
# 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; version 2 of the License.
|
2001-04-11 13:04:03 +02:00
|
|
|
#
|
2010-09-01 08:38:53 +05:00
|
|
|
# This program is distributed in the hope that it will be useful,
|
2001-04-11 13:04:03 +02:00
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2010-09-01 08:38:53 +05:00
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
2001-04-11 13:04:03 +02:00
|
|
|
#
|
2010-09-01 08:38:53 +05:00
|
|
|
# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
2001-04-11 13:04:03 +02:00
|
|
|
|
2001-10-08 04:58:07 +03:00
|
|
|
MYSQLDATAdir = $(localstatedir)
|
|
|
|
MYSQLSHAREdir = $(pkgdatadir)
|
|
|
|
MYSQLBASEdir= $(prefix)
|
2005-11-06 13:13:06 +01:00
|
|
|
MYSQLLIBdir= $(libdir)
|
2008-01-02 13:00:46 +00:00
|
|
|
pkgplugindir = $(pkglibdir)/plugin
|
2001-04-11 13:04:03 +02:00
|
|
|
|
2007-08-02 15:37:33 +02:00
|
|
|
EXTRA_DIST = libmysqld.def CMakeLists.txt
|
2001-04-11 13:04:03 +02:00
|
|
|
DEFS = -DEMBEDDED_LIBRARY -DMYSQL_SERVER \
|
|
|
|
-DDEFAULT_MYSQL_HOME="\"$(MYSQLBASEdir)\"" \
|
2009-07-31 15:22:02 -04:00
|
|
|
-DMYSQL_DATADIR="\"$(MYSQLDATAdir)\"" \
|
2005-11-06 13:13:06 +01:00
|
|
|
-DSHAREDIR="\"$(MYSQLSHAREdir)\"" \
|
2008-12-20 11:01:41 +01:00
|
|
|
-DPLUGINDIR="\"$(pkgplugindir)\"" \
|
Backport of:
ChangeSet@1.2703, 2007-12-07 09:35:28-05:00, cmiller@zippy.cornsilk.net +40 -0
Bug#13174: SHA2 function
Patch contributed from Bill Karwin, paper unnumbered CLA in Seattle
Implement SHA2 functions.
Chad added code to make it work with YaSSL. Also, he removed the
(probable) bug of embedded server never using SSL-dependent
functions. (libmysqld/Makefile.am didn't read ANY autoconf defs.)
Function specification:
SHA2( string cleartext, integer hash_length )
-> string hash, or NULL
where hash_length is one of 224, 256, 384, or 512. If either is
NULL or a length is unsupported, then the result is NULL. The
resulting string is always the length of the hash_length parameter
or is NULL.
Include the canonical hash examples from the NIST in the test
results.
---
Polish and address concerns of reviewers.
.bzrignore:
Added libmysqld/sha2.cc to the ignore list.
client/mysql.cc:
Add condition to remove code for embedded server.
client/mysqltest.cc:
Add condition to remove code for embedded server.
include/Makefile.am:
New header file to header list.
include/mysql_embed.h:
Embedded servers can use SSL-library functions too!
include/sha2.h:
Compatibility layer to make YaSSL behave like OpenSSL.
include/sslopt-case.h:
Remove SSL-communication parameters from command lines.
include/sslopt-longopts.h:
Remove SSL-communication parameters from command lines.
include/sslopt-vars.h:
Don't declare variables that are only used in SSL communication, if
we are compiling the embedded server.
include/violite.h:
Don't even compile the SSL-communication function if we're in the
embedded server.
---
Remove CPP condition indentation.
libmysqld/CMakeLists.txt:
Add new file to source list.
libmysqld/Makefile.am:
Include standard DEFS in embedded compilation. It's an undiscovered
but that it's not there.
Add new file to source list.
libmysqld/examples/Makefile.am:
Include autoconf DEFS.
libmysqld/lib_sql.cc:
Initialize SSL-related variables in embedded server.
mysql-test/include/have_ssl_crypto_functs.inc:
Distinguish between communication and crypto.
Use the tristate value of "have_ssl" variable to know whether to
test or not for SSL-provided crypto functions.
mysql-test/r/func_digest.result:
Test against the sample test vectors in the NIST Secure
Hash Standard (http://csrc.nist.gov/cryptval/shs.htm)
mysql-test/r/func_encrypt_nossl.result:
Update results to the new error message text.
mysql-test/r/have_ssl_is_yes_or_disabled_only.require:
Distinguish between communication and crypto.
Use the tristate value of "have_ssl" variable to know whether to
test or not for SSL-provided crypto functions.
mysql-test/suite/rpl/t/rpl_ssl.test:
Distinguish between communication and crypto.
mysql-test/suite/rpl/t/rpl_ssl1.test:
Distinguish between communication and crypto.
mysql-test/t/func_des_encrypt.test:
Distinguish between communication and crypto.
mysql-test/t/func_digest.test:
Test against the sample test vectors in the NIST Secure
Hash Standard (http://csrc.nist.gov/cryptval/shs.htm)
Also, test that various parameters (legal and illegal)
do what we expect.
---
Distinguish between communication and crypto.
mysql-test/t/func_encrypt.test:
Distinguish between communication and crypto.
mysql-test/t/openssl_1.test:
Don't test SSL communication if we're in the embedded server.
---
Distinguish between communication and crypto.
mysql-test/t/ssl-big.test:
Don't test SSL communication if we're in the embedded server.
---
Distinguish between communication and crypto.
mysql-test/t/ssl.test:
Don't test SSL communication if we're in the embedded server.
---
Distinguish between communication and crypto.
mysql-test/t/ssl_8k_key.test:
Don't test SSL communication if we're in the embedded server.
---
Distinguish between communication and crypto.
mysql-test/t/ssl_compress.test:
Don't test SSL communication if we're in the embedded server.
---
Distinguish between communication and crypto.
mysql-test/t/ssl_connect.test:
Don't test SSL communication if we're in the embedded server.
---
Distinguish between communication and crypto.
sql-common/client.c:
SSL is useful for more functionality than just connecting. Test
for whether we are not embedded server also.
sql/CMakeLists.txt:
Add new source file to source list so that we have access to SHA2
functions.
sql/Makefile.am:
Add new source file to source list so that we have access to SHA2
functions.
sql/item_create.cc:
Bootstrap the SHA2 function into the server.
sql/item_strfunc.cc:
Add new SHA2 Item class methods.
Clean up two minor problems.
---
Remove extraneous debugging.
---
We must check nullness of a parameter only /after/ computing its
value.
sql/item_strfunc.h:
Declare new SHA2 Item class.
sql/mysqld.cc:
For embedded server, don't refer to SSL-communications variables
or values.
---
Remove CPP condition indentation.
sql/sha2.cc:
Compatibility layer to make YaSSL behave like OpenSSL.
---
Add comment for generated functions.
sql/sql_acl.cc:
For embedded server, don't refer to SSL-communications variables
or values.
sql/sql_connect.cc:
SSL is useful for more functionality than just connecting. Test
for whether we are not embedded server also.
sql/sys_vars.cc:
For embedded server, don't refer to SSL-communications variables
or values.
2010-04-13 19:04:45 +04:00
|
|
|
-DDISABLE_DTRACE \
|
|
|
|
@DEFS@
|
2005-11-07 16:25:06 +01:00
|
|
|
INCLUDES= -I$(top_builddir)/include -I$(top_srcdir)/include \
|
2006-11-27 18:29:50 +01:00
|
|
|
-I$(top_builddir)/sql -I$(top_srcdir)/sql \
|
|
|
|
-I$(top_srcdir)/sql/examples \
|
2004-12-14 01:54:16 +02:00
|
|
|
-I$(top_srcdir)/regex \
|
2006-10-18 17:03:37 +05:00
|
|
|
$(openssl_includes) @ZLIB_INCLUDES@ \
|
|
|
|
@condition_dependent_plugin_includes@
|
2001-04-11 13:04:03 +02:00
|
|
|
|
2001-10-08 04:58:07 +03:00
|
|
|
noinst_LIBRARIES = libmysqld_int.a
|
|
|
|
pkglib_LIBRARIES = libmysqld.a
|
2001-09-18 06:05:55 +03:00
|
|
|
SUBDIRS = . examples
|
2003-12-01 17:19:10 +04:00
|
|
|
libmysqld_sources= libmysqld.c lib_sql.cc emb_qcache.cc
|
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 19:08:36 +04:00
|
|
|
libmysqlsources = errmsg.c get_password.c libmysql.c client.c pack.c \
|
2010-08-09 11:32:50 +03:00
|
|
|
my_time.c client_plugin.c
|
2001-04-11 13:04:03 +02:00
|
|
|
|
2003-12-01 17:19:10 +04:00
|
|
|
noinst_HEADERS = embedded_priv.h emb_qcache.h
|
2001-10-02 05:53:00 +03:00
|
|
|
|
2003-11-03 14:01:59 +02:00
|
|
|
sqlsources = derror.cc field.cc field_conv.cc strfunc.cc filesort.cc \
|
2007-04-24 14:24:06 +02:00
|
|
|
ha_ndbcluster.cc ha_ndbcluster_cond.cc \
|
2006-04-13 13:49:29 -07:00
|
|
|
ha_ndbcluster_binlog.cc ha_partition.cc \
|
|
|
|
handler.cc sql_handler.cc \
|
2003-03-18 22:14:02 +01:00
|
|
|
hostname.cc init.cc password.c \
|
2001-04-11 13:04:03 +02:00
|
|
|
item.cc item_buff.cc item_cmpfunc.cc item_create.cc \
|
|
|
|
item_func.cc item_strfunc.cc item_sum.cc item_timefunc.cc \
|
Bug#22687 (Functions UNIQUE_USERS, GROUP_UNIQUE_USERS)
According to some internal communication, these two functions are place
holders for future enhancements. Because they use a variable number of
parameters, the implementation defined a reserved keyword for them in the
parser grammar.
Unfortunately, doing so creates a bug similar to Bug 21114 reported for the
function FORMAT.
In the 5.1 code base, due to improvements in the code implemented with bug
21114, having a reserved keyword for functions with a variable number of
arguments is not needed any more by the implementation.
As a result, this fix removes the place-holder implementation, and removes
the unnecessary reserved keywords. Should the functions UNIQUE_USERS and
GROUP_UNIQUE_USERS be finally implemented in a later release, the
implementation should sub class Create_native_func in sql/item_create.cc.
For example, see the class Create_func_concat.
BitKeeper/deleted/.del-item_uniq.cc:
Rename: sql/item_uniq.cc -> BitKeeper/deleted/.del-item_uniq.cc
BitKeeper/deleted/.del-item_uniq.h:
Rename: sql/item_uniq.h -> BitKeeper/deleted/.del-item_uniq.h
libmysqld/Makefile.am:
Remove native functions UNIQUE_USERS() and GROUP_UNIQUE_USERS().
mysql-test/r/parser.result:
Remove native functions UNIQUE_USERS() and GROUP_UNIQUE_USERS().
mysql-test/t/parser.test:
Remove native functions UNIQUE_USERS() and GROUP_UNIQUE_USERS().
sql/Makefile.am:
Remove native functions UNIQUE_USERS() and GROUP_UNIQUE_USERS().
sql/item.h:
Remove native functions UNIQUE_USERS() and GROUP_UNIQUE_USERS().
sql/item_sum.h:
Remove native functions UNIQUE_USERS() and GROUP_UNIQUE_USERS().
sql/lex.h:
Remove native functions UNIQUE_USERS() and GROUP_UNIQUE_USERS().
sql/mysql_priv.h:
Remove native functions UNIQUE_USERS() and GROUP_UNIQUE_USERS().
sql/sql_yacc.yy:
Remove native functions UNIQUE_USERS() and GROUP_UNIQUE_USERS().
2007-01-11 14:58:05 -07:00
|
|
|
item_geofunc.cc item_subselect.cc item_row.cc\
|
2005-12-21 17:13:52 +04:00
|
|
|
item_xmlfunc.cc \
|
Backport of:
ChangeSet@1.2703, 2007-12-07 09:35:28-05:00, cmiller@zippy.cornsilk.net +40 -0
Bug#13174: SHA2 function
Patch contributed from Bill Karwin, paper unnumbered CLA in Seattle
Implement SHA2 functions.
Chad added code to make it work with YaSSL. Also, he removed the
(probable) bug of embedded server never using SSL-dependent
functions. (libmysqld/Makefile.am didn't read ANY autoconf defs.)
Function specification:
SHA2( string cleartext, integer hash_length )
-> string hash, or NULL
where hash_length is one of 224, 256, 384, or 512. If either is
NULL or a length is unsupported, then the result is NULL. The
resulting string is always the length of the hash_length parameter
or is NULL.
Include the canonical hash examples from the NIST in the test
results.
---
Polish and address concerns of reviewers.
.bzrignore:
Added libmysqld/sha2.cc to the ignore list.
client/mysql.cc:
Add condition to remove code for embedded server.
client/mysqltest.cc:
Add condition to remove code for embedded server.
include/Makefile.am:
New header file to header list.
include/mysql_embed.h:
Embedded servers can use SSL-library functions too!
include/sha2.h:
Compatibility layer to make YaSSL behave like OpenSSL.
include/sslopt-case.h:
Remove SSL-communication parameters from command lines.
include/sslopt-longopts.h:
Remove SSL-communication parameters from command lines.
include/sslopt-vars.h:
Don't declare variables that are only used in SSL communication, if
we are compiling the embedded server.
include/violite.h:
Don't even compile the SSL-communication function if we're in the
embedded server.
---
Remove CPP condition indentation.
libmysqld/CMakeLists.txt:
Add new file to source list.
libmysqld/Makefile.am:
Include standard DEFS in embedded compilation. It's an undiscovered
but that it's not there.
Add new file to source list.
libmysqld/examples/Makefile.am:
Include autoconf DEFS.
libmysqld/lib_sql.cc:
Initialize SSL-related variables in embedded server.
mysql-test/include/have_ssl_crypto_functs.inc:
Distinguish between communication and crypto.
Use the tristate value of "have_ssl" variable to know whether to
test or not for SSL-provided crypto functions.
mysql-test/r/func_digest.result:
Test against the sample test vectors in the NIST Secure
Hash Standard (http://csrc.nist.gov/cryptval/shs.htm)
mysql-test/r/func_encrypt_nossl.result:
Update results to the new error message text.
mysql-test/r/have_ssl_is_yes_or_disabled_only.require:
Distinguish between communication and crypto.
Use the tristate value of "have_ssl" variable to know whether to
test or not for SSL-provided crypto functions.
mysql-test/suite/rpl/t/rpl_ssl.test:
Distinguish between communication and crypto.
mysql-test/suite/rpl/t/rpl_ssl1.test:
Distinguish between communication and crypto.
mysql-test/t/func_des_encrypt.test:
Distinguish between communication and crypto.
mysql-test/t/func_digest.test:
Test against the sample test vectors in the NIST Secure
Hash Standard (http://csrc.nist.gov/cryptval/shs.htm)
Also, test that various parameters (legal and illegal)
do what we expect.
---
Distinguish between communication and crypto.
mysql-test/t/func_encrypt.test:
Distinguish between communication and crypto.
mysql-test/t/openssl_1.test:
Don't test SSL communication if we're in the embedded server.
---
Distinguish between communication and crypto.
mysql-test/t/ssl-big.test:
Don't test SSL communication if we're in the embedded server.
---
Distinguish between communication and crypto.
mysql-test/t/ssl.test:
Don't test SSL communication if we're in the embedded server.
---
Distinguish between communication and crypto.
mysql-test/t/ssl_8k_key.test:
Don't test SSL communication if we're in the embedded server.
---
Distinguish between communication and crypto.
mysql-test/t/ssl_compress.test:
Don't test SSL communication if we're in the embedded server.
---
Distinguish between communication and crypto.
mysql-test/t/ssl_connect.test:
Don't test SSL communication if we're in the embedded server.
---
Distinguish between communication and crypto.
sql-common/client.c:
SSL is useful for more functionality than just connecting. Test
for whether we are not embedded server also.
sql/CMakeLists.txt:
Add new source file to source list so that we have access to SHA2
functions.
sql/Makefile.am:
Add new source file to source list so that we have access to SHA2
functions.
sql/item_create.cc:
Bootstrap the SHA2 function into the server.
sql/item_strfunc.cc:
Add new SHA2 Item class methods.
Clean up two minor problems.
---
Remove extraneous debugging.
---
We must check nullness of a parameter only /after/ computing its
value.
sql/item_strfunc.h:
Declare new SHA2 Item class.
sql/mysqld.cc:
For embedded server, don't refer to SSL-communications variables
or values.
---
Remove CPP condition indentation.
sql/sha2.cc:
Compatibility layer to make YaSSL behave like OpenSSL.
---
Add comment for generated functions.
sql/sql_acl.cc:
For embedded server, don't refer to SSL-communications variables
or values.
sql/sql_connect.cc:
SSL is useful for more functionality than just connecting. Test
for whether we are not embedded server also.
sql/sys_vars.cc:
For embedded server, don't refer to SSL-communications variables
or values.
2010-04-13 19:04:45 +04:00
|
|
|
sha2.cc des_key_file.cc \
|
2007-04-12 15:50:54 +02:00
|
|
|
key.cc lock.cc log.cc sql_state.c \
|
WL#5151: Conversion between different types when replicating
Row-based replication requires the types of columns on the
master and slave to be approximately the same (some safe
conversions between strings are allowed), but does not
allow safe conversions between fields of similar types such
as TINYINT and INT.
This patch implement type conversions between similar fields
on the master and slave.
The conversions are controlled using a new variable
SLAVE_TYPE_CONVERSIONS of type SET('ALL_LOSSY','ALL_NON_LOSSY').
Non-lossy conversions are any conversions that do not run the
risk of losing any information, while lossy conversions can
potentially truncate the value. The column definitions are
checked to decide if the conversion is acceptable.
If neither conversion is enabled, it is required that the
definitions of the columns are identical on master and slave.
Conversion is done by creating an internal conversion table,
unpacking the master data into it, and then copy the data to
the real table on the slave.
.bzrignore:
New files added
client/Makefile.am:
New files added
client/mysqlbinlog.cc:
Functions in rpl_utility.cc is now needed by mysqlbinlog.cc.
libmysqld/Makefile.am:
New files added
mysql-test/extra/rpl_tests/check_type.inc:
Test include file to check a single type conversion.
mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test:
Switching to use INT instead of TEXT for column that should not have matching types.
mysql-test/extra/rpl_tests/rpl_row_basic.test:
Adding code to enable type conversions for BIT tests since InnoDB
cannot handle them properly due to incorrect information stored as
metadata.
mysql-test/extra/rpl_tests/type_conversions.test:
Test file to check a set of type conversions
with current settings of slave_type_conversions.
mysql-test/suite/rpl/t/rpl_typeconv.test:
Test file to test conversions from master to slave with
all possible values for slave_type_conversions.
The test also checks that the slave_type_conversions
variable works as expected.
sql/field.cc:
Changing definition of compatible_field_size to both check if
two field with identical base types are compatible and give an
order between them if they are compatible.
This only implement checking on the slave, so it will not affect
replication from an old master to a new slave.
sql/field.h:
Changing prototypes for functions:
- compatible_field_size()
- init_for_tmp_table()
- row_pack_length()
sql/log_event.cc:
Changing compability checks to build a conversion table if the fields
are compatible, but does not have the same base type.
sql/log_event_old.cc:
Changing compability checks to build a conversion table if the fields
are compatible, but does not have the same base type.
sql/mysql_priv.h:
Adding global option variable for SLAVE_TYPE_CONVERSIONS
sql/mysqld.cc:
Adding SLAVE_TYPE_CONVERSIONS global server variable.
sql/rpl_record.cc:
Changing unpack_row to use the conversion table if present.
sql/rpl_rli.h:
Removing function get_tabledef and replacing it with get_table_data().
This function retrieve data for table opened for replication, not just
table definition.
sql/rpl_utility.cc:
Function table_def::compatible_with is changed to compare table on master
and slave for compatibility and generate a conversions table if they are
compatible.
Computing real type of fields from metadata for ENUM and SET types.
Computing pack_length correctly for ENUM, SET, and BLOB types.
Adding optimization to not check compatibility if no
slave type conversions are enabled.
sql/rpl_utility.h:
Changing prototypes since implementation has changed.
Modifying table_def::type() to return real type instead of stored type.
sql/set_var.cc:
Adding SLAVE_TYPE_CONVERSIONS variable.
sql/set_var.h:
Adding SLAVE_TYPE_CONVERSIONS variable.
sql/share/errmsg.txt:
Adding error messages for slave type conversions.
sql/sql_class.h:
Adding SLAVE_TYPE_CONVERSIONS variable.
sql/sql_select.cc:
Correcting create_virtual_tmp_table() to compute null bit positions
correctly in the presence of bit fields.
2009-12-14 12:04:55 +01:00
|
|
|
log_event.cc rpl_record.cc rpl_utility.cc \
|
2007-04-12 15:50:54 +02:00
|
|
|
log_event_old.cc rpl_record_old.cc \
|
2004-02-03 14:35:24 +04:00
|
|
|
protocol.cc net_serv.cc opt_range.cc \
|
2001-10-11 05:37:05 +03:00
|
|
|
opt_sum.cc procedure.cc records.cc sql_acl.cc \
|
2006-07-04 17:40:40 +05:00
|
|
|
sql_load.cc discover.cc sql_locale.cc \
|
2010-08-16 16:25:23 +02:00
|
|
|
sql_profile.cc sql_admin.cc sql_truncate.cc datadict.cc \
|
2010-08-13 13:51:48 +04:00
|
|
|
sql_reload.cc \
|
2001-04-11 13:04:03 +02:00
|
|
|
sql_analyse.cc sql_base.cc sql_cache.cc sql_class.cc \
|
2002-06-14 15:08:50 -07:00
|
|
|
sql_crypt.cc sql_db.cc sql_delete.cc sql_error.cc sql_insert.cc \
|
2010-07-23 17:14:35 -03:00
|
|
|
sql_lex.cc sql_list.cc sql_manager.cc \
|
2007-02-23 13:13:55 +02:00
|
|
|
scheduler.cc sql_connect.cc sql_parse.cc \
|
2003-05-02 21:07:41 +05:00
|
|
|
sql_prepare.cc sql_derived.cc sql_rename.cc \
|
2009-12-22 10:35:56 +01:00
|
|
|
sql_select.cc sql_do.cc sql_show.cc set_var.cc sys_vars.cc \
|
2001-04-11 13:04:03 +02:00
|
|
|
sql_string.cc sql_table.cc sql_test.cc sql_udf.cc \
|
2010-03-31 16:05:33 +02:00
|
|
|
sql_update.cc sql_yacc.cc table.cc thr_malloc.cc sql_time.cc \
|
2008-06-18 13:17:15 -03:00
|
|
|
unireg.cc uniques.cc sql_union.cc hash_filo.cc \
|
A fix and a test case for Bug#6513 "Test Suite: Values inserted by using
cursor is interpreted latin1 character and Bug#9819 "Cursors: Mysql Server
Crash while fetching from table with 5 million records."
A fix for a possible memory leak when fetching into an SP cursor
in a long loop.
The patch uses a common implementation of cursors in the binary protocol and
in stored procedures and implements materialized cursors.
For implementation details, see comments in sql_cursor.cc
include/my_sys.h:
- declaration for multi_alloc_root
libmysqld/Makefile.am:
- drop protocol_cursor.cc, add sql_cursor.cc (replaces the old
implementation of cursors with a new one)
mysql-test/r/ctype_ujis.result:
- test results fixed (a test case for Bug#6513)
mysql-test/r/sp-big.result:
- test results fixed (a test case for Bug#9819)
mysql-test/t/ctype_ujis.test:
Add a test case for Bug#6513 "Test Suite: Values inserted by using cursor is
interpreted latin1 character"
mysql-test/t/sp-big.test:
Add a restricted test case for Bug#9819 "Cursors: Mysql Server Crash
while fetching from table with 5 million records."
mysys/my_alloc.c:
- an implementation of multi_alloc_root; this is largely a copy-paste
from mulalloc.c, but the function is small and there is no easy way
to reuse the existing C function.
sql/Makefile.am:
- add sql_cursor.h, sql_cursor.cc (a new implementation of stored procedure
cursors) and drop protocol_cursor.cc (the old one)
sql/handler.cc:
- now TABLE object has its mem_root always initialized.
Adjust the implementation handler::ha_open
sql/item_subselect.cc:
- adjust to the changed declaration of st_select_lex_unit::prepare
sql/protocol.h:
- drop Protocol_cursor
sql/sp_head.cc:
- move juggling with Query_arena::free_list and Item::next to
sp_eval_func_item, as this is needed in 3 places already.
sql/sp_head.h:
- declare a no-op implementation for cleanup_stmt in sp_instr_cpush.
This method is needed for non-materializing cursors, which are yet not
used in stored procedures.
- declaration for sp_eval_func_item
sql/sp_rcontext.cc:
- reimplement sp_cursor using the new implementation of server side cursors.
- use sp_eval_func_item to assign values of SP variables from the
row fetched from a cursor. This should fix a possible memory leak in
the old implementation of sp_cursor::fetch
sql/sp_rcontext.h:
- reimplement sp_cursor using the new implementation of server side cursors.
sql/sql_class.cc:
- disable the functionality that closes transient cursors at commit/rollback;
transient cursors are not used in 5.0, instead we use materialized ones.
To be enabled in a later version.
sql/sql_class.h:
- adjust to the rename Cursor -> Server_side_cursor
- additional declarations of select_union used in materialized cursors
sql/sql_derived.cc:
- reuse bits of tmp table code in UNION, derived tables, and materialized
cursors
- cleanup comments
sql/sql_lex.h:
- declarations of auxiliary methods used by materialized cursors
- a cleanup in st_select_lex_unit interface
sql/sql_list.h:
- add an array operator new[] to class Sql_alloc
sql/sql_prepare.cc:
- split the tight coupling of cursors and prepared statements to reuse
the same implementation in stored procedures
- cleanups of error processing in Prepared_statement::{prepare,execute}
sql/sql_select.cc:
- move the implementation of sensitive (non-materializing) cursors to
sql_cursor.cc
- make temporary tables self-contained: the table, its record and fields
are allocated in TABLE::mem_root. This implementation is not clean
and resets thd->mem_root several times because of the way create_tmp_table
works (many additional things are done inside it).
- adjust to the changed declaration of st_select_lex_unit::prepare
sql/sql_select.h:
- move the declaration of sensitive (non-materializing) cursors to
sql_cursor.cc
sql/sql_union.cc:
- move pieces of st_select_unit::prepare to select_union and st_table
methods to be able to reuse code in the implementation of materialized
cursors
sql/sql_view.cc:
- adjust to the changed signature of st_select_lex_unit::prepare
sql/table.cc:
- implement auxiliary st_table methods for use with temporary tables
sql/table.h:
- add declarations for auxiliary methods of st_table used to work with
temporary tables
tests/mysql_client_test.c:
- if cursors are materialized, a parallel update of the table used
in the cursor may go through: update the test.
sql/sql_cursor.cc:
New BitKeeper file ``sql/sql_cursor.cc'' -- implementation of server side
cursors
sql/sql_cursor.h:
New BitKeeper file ``sql/sql_cursor.h'' - declarations for
server side cursors.
2005-09-22 02:11:21 +04:00
|
|
|
spatial.cc gstream.cc sql_help.cc tztime.cc sql_cursor.cc \
|
2004-05-11 23:23:49 +03:00
|
|
|
sp_head.cc sp_pcontext.cc sp.cc sp_cache.cc sp_rcontext.cc \
|
2005-03-25 14:12:46 -08:00
|
|
|
parse_file.cc sql_view.cc sql_trigger.cc my_decimal.cc \
|
2006-04-13 13:49:29 -07:00
|
|
|
rpl_filter.cc sql_partition.cc sql_builtin.cc sql_plugin.cc \
|
2009-12-03 21:37:38 +03:00
|
|
|
debug_sync.cc sql_tablespace.cc transaction.cc \
|
2010-08-16 16:25:23 +02:00
|
|
|
rpl_injector.cc my_user.c partition_info.cc sql_alter.cc \
|
2009-10-22 23:30:28 +01:00
|
|
|
sql_servers.cc event_parse_data.cc sql_signal.cc \
|
2010-08-16 14:53:30 +02:00
|
|
|
rpl_handler.cc mdl.cc keycaches.cc sql_audit.cc \
|
|
|
|
sql_partition_admin.cc
|
2001-04-11 13:04:03 +02:00
|
|
|
|
2007-09-26 18:47:55 +02:00
|
|
|
libmysqld_int_a_SOURCES= $(libmysqld_sources)
|
|
|
|
nodist_libmysqld_int_a_SOURCES= $(libmysqlsources) $(sqlsources)
|
2001-10-08 23:20:19 +03:00
|
|
|
libmysqld_a_SOURCES=
|
2001-10-08 04:58:07 +03:00
|
|
|
|
2005-11-07 16:25:06 +01:00
|
|
|
sqlstoragesources = $(EXTRA_libmysqld_a_SOURCES)
|
2006-10-18 17:03:37 +05:00
|
|
|
storagesources = @condition_dependent_plugin_modules@
|
2006-12-28 09:42:04 +04:00
|
|
|
storageobjects = @condition_dependent_plugin_objects@
|
2006-10-18 17:03:37 +05:00
|
|
|
storagesourceslinks = @condition_dependent_plugin_links@
|
2005-11-07 16:25:06 +01:00
|
|
|
|
2001-04-11 13:04:03 +02:00
|
|
|
# automake misses these
|
|
|
|
sql_yacc.cc sql_yacc.h: $(top_srcdir)/sql/sql_yacc.yy
|
|
|
|
|
2001-10-08 04:58:07 +03:00
|
|
|
# The following libraries should be included in libmysqld.a
|
|
|
|
INC_LIB= $(top_builddir)/regex/libregex.a \
|
|
|
|
$(top_builddir)/mysys/libmysys.a \
|
|
|
|
$(top_builddir)/strings/libmystrings.a \
|
|
|
|
$(top_builddir)/dbug/libdbug.a \
|
2005-10-27 21:48:43 +02:00
|
|
|
$(top_builddir)/vio/libvio.a \
|
2007-05-07 15:39:36 +02:00
|
|
|
@NDB_SCI_LIBS@ \
|
2006-04-13 13:49:29 -07:00
|
|
|
@mysql_plugin_libs@ \
|
2006-05-20 14:12:42 +02:00
|
|
|
$(yassl_inc_libs)
|
2001-10-08 04:58:07 +03:00
|
|
|
|
2006-04-05 12:56:05 +02:00
|
|
|
if HAVE_YASSL
|
2006-11-29 18:36:51 +01:00
|
|
|
yassl_inc_libs= $(top_builddir)/extra/yassl/src/.libs/libyassl.a \
|
|
|
|
$(top_builddir)/extra/yassl/taocrypt/src/.libs/libtaocrypt.a
|
2006-04-05 12:56:05 +02:00
|
|
|
endif
|
2005-11-07 16:25:06 +01:00
|
|
|
|
|
|
|
# Storage engine specific compilation options
|
|
|
|
ha_ndbcluster.o:ha_ndbcluster.cc
|
|
|
|
$(CXXCOMPILE) @ndbcluster_includes@ $(LM_CFLAGS) -c $<
|
|
|
|
|
2007-04-24 14:24:06 +02:00
|
|
|
ha_ndbcluster_cond.o:ha_ndbcluster_cond.cc
|
|
|
|
$(CXXCOMPILE) @ndbcluster_includes@ $(LM_CFLAGS) -c $<
|
|
|
|
|
2006-01-12 19:51:02 +01:00
|
|
|
ha_ndbcluster_binlog.o: ha_ndbcluster_binlog.cc
|
|
|
|
$(CXXCOMPILE) @ndbcluster_includes@ $(LM_CFLAGS) -c $<
|
|
|
|
|
2005-11-07 16:25:06 +01:00
|
|
|
# Until we can remove dependency on ha_ndbcluster.h
|
|
|
|
handler.o: handler.cc
|
|
|
|
$(CXXCOMPILE) @ndbcluster_includes@ $(LM_CFLAGS) -c $<
|
|
|
|
|
2006-12-28 09:42:04 +04:00
|
|
|
# We need rules to compile these as no good way
|
|
|
|
# found to append fileslists that collected by configure
|
|
|
|
# to the sources list
|
|
|
|
|
|
|
|
ha_federated.o:ha_federated.cc
|
|
|
|
$(CXXCOMPILE) $(LM_CFLAGS) -c $<
|
|
|
|
|
|
|
|
ha_heap.o:ha_heap.cc
|
|
|
|
$(CXXCOMPILE) $(LM_CFLAGS) -c $<
|
|
|
|
|
|
|
|
ha_innodb.o:ha_innodb.cc
|
|
|
|
$(CXXCOMPILE) $(LM_CFLAGS) -c $<
|
|
|
|
|
|
|
|
ha_myisam.o:ha_myisam.cc
|
|
|
|
$(CXXCOMPILE) $(LM_CFLAGS) -c $<
|
|
|
|
|
|
|
|
ha_myisammrg.o:ha_myisammrg.cc
|
|
|
|
$(CXXCOMPILE) $(LM_CFLAGS) -c $<
|
2005-11-07 16:25:06 +01:00
|
|
|
|
2001-10-08 04:58:07 +03:00
|
|
|
#
|
2004-05-25 22:00:14 +03:00
|
|
|
# To make it easy for the end user to use the embedded library we
|
|
|
|
# generate a total libmysqld.a from all library files,
|
2001-10-08 04:58:07 +03:00
|
|
|
|
2005-06-02 22:59:37 +02:00
|
|
|
# note - InnoDB libraries have circular dependencies, so in INC_LIB
|
|
|
|
# few libraries are present two times. Metrowerks linker doesn't like
|
|
|
|
# it at all. Traditional ar has no problems with it, but still there's no
|
|
|
|
# need to add the same file twice to the library, so 'sort -u' save us
|
|
|
|
# some time and spares unnecessary work.
|
|
|
|
|
2006-12-28 09:42:04 +04:00
|
|
|
libmysqld.a: libmysqld_int.a $(INC_LIB) $(libmysqld_a_DEPENDENCIES) $(storageobjects)
|
2005-05-10 13:53:47 +02:00
|
|
|
if DARWIN_MWCC
|
2006-12-28 09:42:04 +04:00
|
|
|
mwld -lib -o $@ libmysqld_int.a `echo $(INC_LIB) | sort -u` $(storageobjects)
|
2005-05-10 13:53:47 +02:00
|
|
|
else
|
2010-01-06 11:27:35 +01:00
|
|
|
-rm -f libmysqld.a
|
2010-07-15 15:44:15 -03:00
|
|
|
current_dir=`pwd`; \
|
|
|
|
rm -rf tmp; mkdir tmp; \
|
|
|
|
(for arc in $(INC_LIB) ./libmysqld_int.a; do \
|
|
|
|
arpath=`echo $$arc|sed 's|[^/]*$$||'|sed 's|\.libs/$$||'`; \
|
|
|
|
artmp=`echo $$arc|sed 's|^.*/|tmp/lib-|'`; \
|
|
|
|
for F in `$(AR) t $$arc | grep -v SYMDEF`; do \
|
|
|
|
if test -e "$$arpath/$$F" ; then echo "$$arpath/$$F"; else \
|
|
|
|
mkdir $$artmp; cd $$artmp > /dev/null; \
|
|
|
|
$(AR) x ../../$$arc; \
|
|
|
|
cd $$current_dir > /dev/null; \
|
|
|
|
ls $$artmp/* | grep -v SYMDEF; \
|
|
|
|
continue 2; fi; done; \
|
|
|
|
done; echo $(libmysqld_a_DEPENDENCIES) ) | sort -u | xargs $(AR) cq libmysqld.a; \
|
|
|
|
$(AR) r libmysqld.a $(storageobjects); \
|
|
|
|
$(RANLIB) libmysqld.a ; \
|
|
|
|
rm -rf tmp
|
2005-05-10 13:53:47 +02:00
|
|
|
endif
|
2001-10-08 04:58:07 +03:00
|
|
|
|
2001-04-11 13:04:03 +02:00
|
|
|
## XXX: any time the client interface changes, we'll need to bump
|
|
|
|
## the version info for libmysqld; however, it's possible for the
|
|
|
|
## libmysqld interface to change without affecting the standard
|
|
|
|
## libmysqlclient interface. Should we make a separate version
|
|
|
|
## string for the two?
|
2001-10-08 04:58:07 +03:00
|
|
|
#libmysqld_la_LDFLAGS = -version-info @SHARED_LIB_VERSION@
|
|
|
|
#CLEANFILES = $(libmysqld_la_LIBADD) libmysqld.la
|
2001-04-11 13:04:03 +02:00
|
|
|
|
2007-03-27 23:56:48 +02:00
|
|
|
BUILT_SOURCES = link_sources
|
|
|
|
|
|
|
|
CLEANFILES = $(BUILT_SOURCES)
|
|
|
|
|
2001-04-11 13:04:03 +02:00
|
|
|
link_sources:
|
2006-10-19 16:39:24 +05:00
|
|
|
for f in $(sqlsources); do \
|
2005-09-24 15:51:45 +02:00
|
|
|
rm -f $$f; \
|
2006-11-27 18:29:50 +01:00
|
|
|
if test -e $(top_srcdir)/sql/$$f ; \
|
2007-05-02 14:01:49 +02:00
|
|
|
then \
|
2006-11-27 18:29:50 +01:00
|
|
|
@LN_CP_F@ $(top_srcdir)/sql/$$f $$f; \
|
2007-05-02 14:01:49 +02:00
|
|
|
else \
|
2006-11-27 18:29:50 +01:00
|
|
|
@LN_CP_F@ $(top_builddir)/sql/$$f $$f; \
|
2007-05-02 14:01:49 +02:00
|
|
|
fi ; \
|
2001-04-11 13:04:03 +02:00
|
|
|
done; \
|
2006-10-19 16:39:24 +05:00
|
|
|
for f in $(libmysqlsources); do \
|
2005-09-24 15:51:45 +02:00
|
|
|
rm -f $$f; \
|
2006-11-27 18:29:50 +01:00
|
|
|
if test -e $(top_srcdir)/libmysql/$$f ; \
|
|
|
|
then \
|
|
|
|
@LN_CP_F@ $(top_srcdir)/libmysql/$$f $$f; \
|
|
|
|
else \
|
|
|
|
@LN_CP_F@ $(top_builddir)/libmysql/$$f $$f; \
|
|
|
|
fi ; \
|
2003-06-17 21:32:31 +05:00
|
|
|
done; \
|
2006-05-09 00:49:16 +02:00
|
|
|
if test -n "$(sqlstoragesources)" ; \
|
2006-05-08 23:47:58 +02:00
|
|
|
then \
|
|
|
|
for f in "$(sqlstoragesources)"; do \
|
|
|
|
rm -f "$$f"; \
|
|
|
|
@LN_CP_F@ `find $(srcdir)/../sql -name "$$f"` "$$f"; \
|
|
|
|
done; \
|
|
|
|
fi; \
|
2006-10-18 17:03:37 +05:00
|
|
|
if test -n "$(storagesources)" ; \
|
|
|
|
then \
|
|
|
|
rm -f $(storagesources); \
|
2006-10-19 16:39:24 +05:00
|
|
|
for f in $(storagesourceslinks); do \
|
2006-10-18 17:03:37 +05:00
|
|
|
@LN_CP_F@ $(top_srcdir)/$$f . ; \
|
|
|
|
done; \
|
|
|
|
fi; \
|
2005-09-24 15:51:45 +02:00
|
|
|
rm -f client_settings.h; \
|
2007-03-27 23:56:48 +02:00
|
|
|
@LN_CP_F@ $(top_srcdir)/libmysql/client_settings.h \
|
|
|
|
client_settings.h; \
|
|
|
|
echo timestamp > link_sources
|
2003-06-17 21:32:31 +05:00
|
|
|
|
2001-04-11 13:04:03 +02:00
|
|
|
|
|
|
|
clean-local:
|
2007-03-27 23:56:48 +02:00
|
|
|
rm -f `echo $(sqlsources) $(libmysqlsources) $(sqlstoragesources) $(storagesources) | sed "s;\.lo;.c;g"`; \
|
2003-06-17 21:32:31 +05:00
|
|
|
rm -f client_settings.h
|