diff options
author | Davi Arnaut <Davi.Arnaut@Sun.COM> | 2010-07-09 09:28:51 -0300 |
---|---|---|
committer | Davi Arnaut <Davi.Arnaut@Sun.COM> | 2010-07-09 09:28:51 -0300 |
commit | 1c924a165259dc8ffb9c1cdcdb1f0d43876bcb20 (patch) | |
tree | 8edee282fc8a225a291cd9be2e44e38709e31b1a /storage/federated | |
parent | 024dba64b64f395151f6b95650e8ee69a1591428 (diff) | |
parent | 11fae04527098cb6c266eae41188504bd22a5b52 (diff) | |
download | mariadb-git-1c924a165259dc8ffb9c1cdcdb1f0d43876bcb20.tar.gz |
Merge of mysql-5.1-bugteam into mysql-trunk-merge.
Diffstat (limited to 'storage/federated')
-rw-r--r-- | storage/federated/Makefile.am | 4 | ||||
-rw-r--r-- | storage/federated/ha_federated.cc | 17 |
2 files changed, 8 insertions, 13 deletions
diff --git a/storage/federated/Makefile.am b/storage/federated/Makefile.am index f4cd634567d..e07b0d95b97 100644 --- a/storage/federated/Makefile.am +++ b/storage/federated/Makefile.am @@ -36,14 +36,14 @@ noinst_HEADERS = ha_federated.h EXTRA_LTLIBRARIES = ha_federated.la pkgplugin_LTLIBRARIES = @plugin_federated_shared_target@ ha_federated_la_LDFLAGS = -module -rpath $(pkgplugindir) -ha_federated_la_CXXFLAGS= $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN +ha_federated_la_CXXFLAGS= $(AM_CXXFLAGS) -DMYSQL_DYNAMIC_PLUGIN ha_federated_la_CFLAGS = $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN ha_federated_la_SOURCES = ha_federated.cc EXTRA_LIBRARIES = libfederated.a noinst_LIBRARIES = @plugin_federated_static_target@ -libfederated_a_CXXFLAGS = $(AM_CFLAGS) +libfederated_a_CXXFLAGS = $(AM_CXXFLAGS) libfederated_a_CFLAGS = $(AM_CFLAGS) libfederated_a_SOURCES= ha_federated.cc diff --git a/storage/federated/ha_federated.cc b/storage/federated/ha_federated.cc index 5534c520604..d17b56bd4b1 100644 --- a/storage/federated/ha_federated.cc +++ b/storage/federated/ha_federated.cc @@ -594,7 +594,6 @@ static int parse_url_error(FEDERATED_SHARE *share, TABLE *table, int error_num) int get_connection(MEM_ROOT *mem_root, FEDERATED_SHARE *share) { int error_num= ER_FOREIGN_SERVER_DOESNT_EXIST; - char error_buffer[FEDERATED_QUERY_BUFFER_SIZE]; FOREIGN_SERVER *server, server_buffer; DBUG_ENTER("ha_federated::get_connection"); @@ -646,10 +645,8 @@ int get_connection(MEM_ROOT *mem_root, FEDERATED_SHARE *share) DBUG_RETURN(0); error: - my_sprintf(error_buffer, - (error_buffer, "server name: '%s' doesn't exist!", - share->connection_string)); - my_error(error_num, MYF(0), error_buffer); + my_printf_error(error_num, "server name: '%s' doesn't exist!", + MYF(0), share->connection_string); DBUG_RETURN(error_num); } @@ -2443,8 +2440,8 @@ int ha_federated::index_read_idx_with_result_set(uchar *buf, uint index, if (real_query(sql_query.ptr(), sql_query.length())) { - my_sprintf(error_buffer, (error_buffer, "error: %d '%s'", - mysql_errno(mysql), mysql_error(mysql))); + sprintf(error_buffer, "error: %d '%s'", + mysql_errno(mysql), mysql_error(mysql)); retval= ER_QUERY_ON_FOREIGN_DATA_SOURCE; goto error; } @@ -2841,7 +2838,6 @@ int ha_federated::rnd_pos(uchar *buf, uchar *pos) int ha_federated::info(uint flag) { - char error_buffer[FEDERATED_QUERY_BUFFER_SIZE]; char status_buf[FEDERATED_QUERY_BUFFER_SIZE]; int error; uint error_code; @@ -2925,9 +2921,8 @@ error: mysql_free_result(result); if (mysql) { - my_sprintf(error_buffer, (error_buffer, ": %d : %s", - mysql_errno(mysql), mysql_error(mysql))); - my_error(error_code, MYF(0), error_buffer); + my_printf_error(error_code, ": %d : %s", MYF(0), + mysql_errno(mysql), mysql_error(mysql)); } else if (remote_error_number != -1 /* error already reported */) |