From 5099033c26826fd2625b6424134999853e33a29d Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 29 May 2008 18:33:33 +0300 Subject: WL#3138: Maria - fast "SELECT COUNT(*) FROM t;" and "CHECKSUM TABLE t" Added argument to maria_end_bulk_insert() to know if the table will be deleted after the operation Fixed wrong call to strmake Don't call bulk insert in case of inserting only one row (speed optimization as starting/stopping bulk insert Allow storing year 2155 in year field When running with purify/valgrind avoid copying structures over themself Added hook 'trnnam_end_trans_hook' that is called when transaction ends Added trn->used_tables that is used to an entry for all tables used by transaction Fixed that ndb doesn't crash on duplicate key error when start_bulk_insert/end_bulk_insert are not called include/maria.h: Added argument to maria_end_bulk_insert() to know if the table will be deleted after the operation include/my_tree.h: Added macro 'reset_free_element()' to be able to ignore calls to the external free function. Is used to optimize end-bulk-insert in case of failures, in which case we don't want write the remaining keys in the tree mysql-test/install_test_db.sh: Upgrade to new mysql_install_db options mysql-test/r/maria-mvcc.result: New tests mysql-test/r/maria.result: New tests mysql-test/suite/ndb/r/ndb_auto_increment.result: Fixed error message now when bulk insert is not always called mysql-test/suite/ndb/t/ndb_auto_increment.test: Fixed error message now when bulk insert is not always called mysql-test/t/maria-mvcc.test: Added testing of versioning of count(*) mysql-test/t/maria-page-checksum.test: Added comment mysql-test/t/maria.test: More tests mysys/hash.c: Code style change sql/field.cc: Allow storing year 2155 in year field sql/ha_ndbcluster.cc: Added new argument to end_bulk_insert() to signal if the bulk insert should ignored sql/ha_ndbcluster.h: Added new argument to end_bulk_insert() to signal if the bulk insert should ignored sql/ha_partition.cc: Added new argument to end_bulk_insert() to signal if the bulk insert should ignored sql/ha_partition.h: Added new argument to end_bulk_insert() to signal if the bulk insert should ignored sql/handler.cc: Don't call get_dup_key() if there is no table object. This can happen if the handler generates a duplicate key error on commit sql/handler.h: Added new argument to end_bulk_insert() to signal if the bulk insert should ignored (ie, the table will be deleted) sql/item.cc: Style fix Removed compiler warning sql/log_event.cc: Added new argument to ha_end_bulk_insert() sql/log_event_old.cc: Added new argument to ha_end_bulk_insert() sql/mysqld.cc: Removed compiler warning sql/protocol.cc: Added DBUG sql/sql_class.cc: Added DBUG Fixed wrong call to strmake sql/sql_insert.cc: Don't call bulk insert in case of inserting only one row (speed optimization as starting/stopping bulk insert involves a lot of if's) Added new argument to ha_end_bulk_insert() sql/sql_load.cc: Added new argument to ha_end_bulk_insert() sql/sql_parse.cc: Style fixes Avoid goto in common senario sql/sql_select.cc: When running with purify/valgrind avoid copying structures over themself. This is not a real bug in itself, but it's a waste of cycles and causes valgrind warnings sql/sql_select.h: Avoid copying structures over themself. This is not a real bug in itself, but it's a waste of cycles and causes valgrind warnings sql/sql_table.cc: Call HA_EXTRA_PREPARE_FOR_DROP if table created by ALTER TABLE is going to be dropped Added new argument to ha_end_bulk_insert() storage/archive/ha_archive.cc: Added new argument to end_bulk_insert() storage/archive/ha_archive.h: Added new argument to end_bulk_insert() storage/federated/ha_federated.cc: Added new argument to end_bulk_insert() storage/federated/ha_federated.h: Added new argument to end_bulk_insert() storage/maria/Makefile.am: Added ma_state.c and ma_state.h storage/maria/ha_maria.cc: Versioning of count(*) and checksum - share->state.state is now assumed to be correct, not handler->state - Call _ma_setup_live_state() in external lock to get count(*)/checksum versioning. In case of not versioned and not concurrent insertable table, file->s->state.state contains the correct state information Other things: - file->s -> share - Added DBUG_ASSERT() for unlikely case - Optimized end_bulk_insert() to not write anything if table is going to be deleted (as in failed alter table) - Indentation changes in external_lock becasue of removed 'goto' caused a big conflict even if very little was changed storage/maria/ha_maria.h: New argument to end_bulk_insert() storage/maria/ma_blockrec.c: Update for versioning of count(*) and checksum Keep share->state.state.data_file_length up to date (not info->state->data_file_length) Moved _ma_block_xxxx_status() and maria_versioning() functions to ma_state.c storage/maria/ma_check.c: Update and use share->state.state instead of info->state info->s to share Update info->state at end of repair Call _ma_reset_state() to update share->state_history at end of repair storage/maria/ma_checkpoint.c: Call _ma_remove_not_visible_states() on checkpoint to clean up not visible state history from tables storage/maria/ma_close.c: Remember state history for running transaction even if table is closed storage/maria/ma_commit.c: Ensure we always call trnman_commit_trn() even if other calls fails. If we don't do that, the translog and state structures will not be freed storage/maria/ma_delete.c: Versioning of count(*) and checksum: - Always update info->state->checksum and info->state->records storage/maria/ma_delete_all.c: Versioning of count(*) and checksum: - Ensure that share->state.state is updated, as here is where we store the primary information storage/maria/ma_dynrec.c: Use lock_key_trees instead of concurrent_insert to check if trees should be locked. This allows us to lock trees both for concurrent_insert and for index versioning. storage/maria/ma_extra.c: Versioning of count(*) and checksum: - Use share->state.state instead of info->state - share->concurrent_insert -> share->non_transactional_concurrent_insert - Don't update share->state.state from info->state if transactional table Optimization: - Don't flush io_cache or bitmap if we are using FLUSH_IGNORE_CHANGED storage/maria/ma_info.c: Get most state information from current state storage/maria/ma_init.c: Add hash table and free function to store states for closed tables Install hook for transaction commit/rollback to update history state storage/maria/ma_key_recover.c: Versioning of count(*) and checksum: - Use share->state.state instead of info->state storage/maria/ma_locking.c: Versioning of count(*) and checksum: - Call virtual functions (if exists) to restore/update status - Move _ma_xxx_status() functions to ma_state.c info->s -> share storage/maria/ma_open.c: Versioning of count(*) and checksum: - For not transactional tables, set info->state to point to new allocated state structure. - Initialize new info->state_start variable that points to state at start of transaction - Copy old history states from hash table (maria_stored_states) first time the table is opened - Split flag share->concurrent_insert to non_transactional_concurrent_insert & lock_key_tree - For now, only enable versioning of tables without keys (to be fixed in soon!) - Added new virtual function to restore status in maria_lock_database) More DBUG storage/maria/ma_page.c: Versioning of count(*) and checksum: - Use share->state.state instead of info->state - Modify share->state.state.key_file_length under share->intern_lock storage/maria/ma_range.c: Versioning of count(*) and checksum: - Lock trees based on share->lock_key_trees info->s -> share storage/maria/ma_recovery.c: Versioning of count(*) and checksum: - Use share->state.state instead of info->state - Update state information on close and when reenabling logging storage/maria/ma_rkey.c: Versioning of count(*) and checksum: - Lock trees based on share->lock_key_trees storage/maria/ma_rnext.c: Versioning of count(*) and checksum: - Lock trees based on share->lock_key_trees storage/maria/ma_rnext_same.c: Versioning of count(*) and checksum: - Lock trees based on share->lock_key_trees - Only skip rows based on file length if non_transactional_concurrent_insert is set storage/maria/ma_rprev.c: Versioning of count(*) and checksum: - Lock trees based on share->lock_key_trees storage/maria/ma_rsame.c: Versioning of count(*) and checksum: - Lock trees based on share->lock_key_trees storage/maria/ma_sort.c: Use share->state.state instead of info->state Fixed indentation storage/maria/ma_static.c: Added maria_stored_state storage/maria/ma_update.c: Versioning of count(*) and checksum: - Always update info->state->checksum and info->state->records - Remove optimization for index file update as it doesn't work for transactional tables storage/maria/ma_write.c: Versioning of count(*) and checksum: - Always update info->state->checksum and info->state->records storage/maria/maria_def.h: Move MARIA_STATUS_INFO to ma_state.h Changes to MARIA_SHARE: - Added state_history to store count(*)/checksum states - Added in_trans as counter if table is used by running transactions - Split concurrent_insert into lock_key_trees and on_transactional_concurrent_insert. - Added virtual function lock_restore_status Changes to MARIA_HA: - save_state -> state_save - Added state_start to store state at start of transaction storage/maria/maria_pack.c: Versioning of count(*) and checksum: - Use share->state.state instead of info->state Indentation fixes storage/maria/trnman.c: Added hook 'trnnam_end_trans_hook' that is called when transaction ends Added trn->used_tables that is used to an entry for all tables used by transaction More DBUG Changed return type of trnman_end_trn() to my_bool Added trnman_get_min_trid() to get minimum trid in use. Added trnman_exists_active_transactions() to check if there exist a running transaction started between two commit id storage/maria/trnman.h: Added 'used_tables' Moved all pointers into same groups to get better memory alignment storage/maria/trnman_public.h: Added prototypes for new functions and variables Chagned return type of trnman_end_trn() to my_bool storage/myisam/ha_myisam.cc: Added argument to end_bulk_insert() if operation should be aborted storage/myisam/ha_myisam.h: Added argument to end_bulk_insert() if operation should be aborted storage/maria/ma_state.c: Functions to handle state of count(*) and checksum storage/maria/ma_state.h: Structures and declarations to handle state of count(*) and checksum --- storage/federated/ha_federated.cc | 4 ++-- storage/federated/ha_federated.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'storage/federated') diff --git a/storage/federated/ha_federated.cc b/storage/federated/ha_federated.cc index 091a26f6f36..29de7bbaed6 100644 --- a/storage/federated/ha_federated.cc +++ b/storage/federated/ha_federated.cc @@ -1961,12 +1961,12 @@ void ha_federated::start_bulk_insert(ha_rows rows) @retval != 0 Error occured at remote server. Also sets my_errno. */ -int ha_federated::end_bulk_insert() +int ha_federated::end_bulk_insert(bool abort) { int error= 0; DBUG_ENTER("ha_federated::end_bulk_insert"); - if (bulk_insert.str && bulk_insert.length) + if (!abort && bulk_insert.str && bulk_insert.length) { if (real_query(bulk_insert.str, bulk_insert.length)) error= stash_remote_error(); diff --git a/storage/federated/ha_federated.h b/storage/federated/ha_federated.h index 1974f9936fc..d2a86794904 100644 --- a/storage/federated/ha_federated.h +++ b/storage/federated/ha_federated.h @@ -205,7 +205,7 @@ public: int close(void); // required void start_bulk_insert(ha_rows rows); - int end_bulk_insert(); + int end_bulk_insert(bool abort); int write_row(uchar *buf); int update_row(const uchar *old_data, uchar *new_data); int delete_row(const uchar *buf); -- cgit v1.2.1 From bd4e65515f556b6bca45d06d81370d99cf649647 Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Sat, 31 Jan 2009 23:22:44 +0200 Subject: Fixed compiler warnings found by gcc 4.3.2 - Added braces around expressions with &&, ||, & and | - Added empty line before ; for empty while and for loops - Added () around if with assignments - Removed const before function returning simple type Changed BUILD scripts to not build with NDB BUILD/SETUP.sh: By default, don't build ndb with --max in Maria tree. NDB is not kept up to date anyway in 5.1 client/mysql.cc: Added braces around && to get rid of compiler warnings sql/event_db_repository.cc: Added braces around && to get rid of compiler warnings sql/events.cc: Added braces around && to get rid of compiler warnings sql/field.cc: Added braces around && to get rid of compiler warnings Fixed for loops sql/field.h: Added braces around & to get rid of compiler warnings sql/field_conv.cc: Added braces around && to get rid of compiler warnings Fixed bug when copying between DATETIME fields and strict dates are used Removed not needeed else sql/gstream.cc: Added braces around && to get rid of compiler warnings sql/ha_ndbcluster.cc: Added braces around && to get rid of compiler warnings Added {} to get rid of compiler warnings sql/handler.cc: Added braces around && to get rid of compiler warnings sql/item.cc: Added braces around && to get rid of compiler warnings sql/item_cmpfunc.cc: Added braces around && to get rid of compiler warnings Removed some not needed space sql/item_func.cc: Added braces around && to get rid of compiler warnings sql/item_strfunc.cc: Added braces around && to get rid of compiler warnings sql/item_subselect.cc: Added braces around && to get rid of compiler warnings sql/item_sum.cc: Added braces around && to get rid of compiler warnings sql/item_timefunc.cc: Added braces around && to get rid of compiler warnings sql/item_xmlfunc.cc: Added empty line before ; for empty while and for loops sql/log.cc: Added braces around && to get rid of compiler warnings sql/log_event.cc: Added braces around && to get rid of compiler warnings Removed not needed else sql/log_event_old.cc: Added braces around && to get rid of compiler warnings sql/opt_range.cc: Added braces around && to get rid of compiler warnings sql/opt_sum.cc: Added braces around && to get rid of compiler warnings sql/set_var.cc: Added empty line before ; for empty while and for loops Added () around if with assignments sql/slave.cc: Added braces around && to get rid of compiler warnings Added empty line before ; for empty while and for loops sql/spatial.h: Added braces around && to get rid of compiler warnings sql/sql_acl.cc: Added braces around && to get rid of compiler warnings sql/sql_analyse.cc: Added empty line before ; for empty while and for loops sql/sql_base.cc: Added braces around && to get rid of compiler warnings sql/sql_connect.cc: Added braces around && to get rid of compiler warnings sql/sql_db.cc: Added braces around && to get rid of compiler warnings sql/sql_delete.cc: Added braces around && to get rid of compiler warnings sql/sql_help.cc: Added empty line before ; for empty while and for loops sql/sql_insert.cc: Added braces around && to get rid of compiler warnings Added () around if with assignments sql/sql_lex.cc: Cast char array references to uchar; Fixed wrong array referencing when using characters > ASCII 128 in SQL statments Added empty line before ; for empty while and for loops Trivial indent fixes Added braces around && to get rid of compiler warnings sql/sql_load.cc: Added braces around && to get rid of compiler warnings sql/sql_parse.cc: Added braces around && to get rid of compiler warnings sql/sql_partition.cc: Added braces around && to get rid of compiler warnings sql/sql_plugin.cc: Fixed bug in detecing if option variable should be readonly Added empty line before ; for empty while and for loops sql/sql_prepare.cc: Added braces around && to get rid of compiler warnings sql/sql_select.cc: Added braces around && to get rid of compiler warnings Added () around if with assignments Added empty line before ; for empty while and for loops sql/sql_show.cc: Added braces around && to get rid of compiler warnings sql/sql_table.cc: Added braces around && to get rid of compiler warnings sql/sql_trigger.cc: Added braces around && to get rid of compiler warnings sql/sql_update.cc: Added braces around && to get rid of compiler warnings sql/sql_yacc.yy: Added braces around && to get rid of compiler warnings sql/table.cc: Added braces around && to get rid of compiler warnings sql/table.h: Added braces around && to get rid of compiler warnings sql/time.cc: Added braces around && to get rid of compiler warnings sql/tztime.cc: Added braces around && to get rid of compiler warnings sql/uniques.cc: Added braces around && to get rid of compiler warnings storage/federated/ha_federated.cc: Fixed bug in testing of variable to ha_info() (Not critical) storage/heap/ha_heap.cc: Added braces around && to get rid of compiler warnings storage/maria/ha_maria.cc: Fixed bug: Mark that maria_log_dir_path is readonly Added braces around && to get rid of compiler warnings storage/ndb/include/ndbapi/NdbEventOperation.hpp: Removed const before function returning simple type storage/ndb/include/ndbapi/NdbOperation.hpp: Removed const before function returning simple type storage/ndb/src/ndbapi/Ndb.cpp: Added empty line before ; for empty while and for loops storage/ndb/src/ndbapi/NdbEventOperation.cpp: Removed const before function returning simple type storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp: Removed const before function returning simple type storage/ndb/src/ndbapi/NdbEventOperationImpl.hpp: Removed const before function returning simple type storage/ndb/src/ndbapi/NdbRecAttr.cpp: Added empty line before ; for empty while and for loops storage/ndb/src/ndbapi/TransporterFacade.hpp: Added braces around && to get rid of compiler warnings --- storage/federated/ha_federated.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'storage/federated') diff --git a/storage/federated/ha_federated.cc b/storage/federated/ha_federated.cc index 45725a5314d..fa2bd9454e9 100644 --- a/storage/federated/ha_federated.cc +++ b/storage/federated/ha_federated.cc @@ -2828,7 +2828,7 @@ int ha_federated::info(uint flag) if (!(row= mysql_fetch_row(result))) goto error; - if (flag & HA_STATUS_VARIABLE | HA_STATUS_CONST) + if (flag & (HA_STATUS_VARIABLE | HA_STATUS_CONST)) { /* deleted is set in ha_federated::info -- cgit v1.2.1 From 226f0c7601a7bc3d0274d0b7aa6523743856cf11 Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Fri, 30 Oct 2009 20:50:56 +0200 Subject: Added federatedx storage engine Fixed compiler warnings client/mysqladmin.cc: Fixed compiler warning extra/yassl/taocrypt/src/twofish.cpp: Fixed compiler warning libmysqld/Makefile.am: Use federatedx instead of federated (Should actually be removed) mysql-test/mysql-test-run.pl: Fixed warning mysql-test/valgrind.supp: Removed warning found on 64 bit Linux machine storage/pbxt/src/cache_xt.cc: Fixed compile warning storage/xtradb/include/buf0buf.ic: Fixed compiler warning --- storage/federated/README | 7 +++++++ storage/federated/plug.in | 5 ----- storage/federated/plug.in.disabled | 5 +++++ 3 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 storage/federated/README delete mode 100644 storage/federated/plug.in create mode 100644 storage/federated/plug.in.disabled (limited to 'storage/federated') diff --git a/storage/federated/README b/storage/federated/README new file mode 100644 index 00000000000..1b521cb7859 --- /dev/null +++ b/storage/federated/README @@ -0,0 +1,7 @@ +The files in this directory are not used by MariaDB + +MariaDB uses the new federated storage engine that can be found in the +federatedx directory. + +This directory is only kept around to make it easy to merge code from the +MySQL source repositories that uses the old and disabled federated code. diff --git a/storage/federated/plug.in b/storage/federated/plug.in deleted file mode 100644 index 23b607d699b..00000000000 --- a/storage/federated/plug.in +++ /dev/null @@ -1,5 +0,0 @@ -MYSQL_STORAGE_ENGINE(federated,,[Federated Storage Engine], - [Connects to tables on remote MySQL servers], [max,max-no-ndb]) -MYSQL_PLUGIN_STATIC(federated, [libfederated.a]) -MYSQL_PLUGIN_DYNAMIC(federated, [ha_federated.la]) -MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS(federated, [ha_federated.cc]) diff --git a/storage/federated/plug.in.disabled b/storage/federated/plug.in.disabled new file mode 100644 index 00000000000..23b607d699b --- /dev/null +++ b/storage/federated/plug.in.disabled @@ -0,0 +1,5 @@ +MYSQL_STORAGE_ENGINE(federated,,[Federated Storage Engine], + [Connects to tables on remote MySQL servers], [max,max-no-ndb]) +MYSQL_PLUGIN_STATIC(federated, [libfederated.a]) +MYSQL_PLUGIN_DYNAMIC(federated, [ha_federated.la]) +MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS(federated, [ha_federated.cc]) -- cgit v1.2.1 From 20739646d793d658d1ec6ded46e1d9b90f5d5fb4 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 1 Apr 2010 17:34:51 +0300 Subject: Maria WL#61 Interface for maria extensions. Alternative plugin interface with additional info (maturity and string version). CMakeLists.txt: Maria plugin interface used. config/ac-macros/plugins.m4: Maria plugin interface used. configure.in: Maria plugin interface used. include/mysql/plugin.h: Maria plugin interface added. include/mysql/plugin_auth.h.pp: Maria plugin interface added. plugin/auth/auth_socket.c: Maria plugin interface added. plugin/auth/dialog.c: Maria plugin interface added. plugin/daemon_example/daemon_example.cc: Maria plugin interface added. plugin/fulltext/plugin_example.c: Maria plugin interface added. sql/ha_ndbcluster.cc: Maria plugin interface added. sql/ha_partition.cc: Maria plugin interface added. sql/log.cc: Maria plugin interface added. sql/sql_acl.cc: Maria plugin interface added. sql/sql_builtin.cc.in: Maria plugin interface used. sql/sql_plugin.cc: Maria plugin interface added. sql/sql_plugin.h: Maria plugin interface used. sql/sql_show.cc: Maria plugin interface added. storage/archive/ha_archive.cc: Maria plugin interface added. storage/blackhole/ha_blackhole.cc: Maria plugin interface added. storage/csv/ha_tina.cc: Maria plugin interface added. storage/example/ha_example.cc: Maria plugin interface added. storage/federated/ha_federated.cc: Maria plugin interface added. storage/federatedx/ha_federatedx.cc: Maria plugin interface added. storage/heap/ha_heap.cc: Maria plugin interface added. storage/ibmdb2i/ha_ibmdb2i.cc: Maria plugin interface added. storage/innobase/handler/ha_innodb.cc: Maria plugin interface added. storage/innodb_plugin/handler/i_s.cc: Maria plugin interface added. storage/maria/ha_maria.cc: Maria plugin interface added. storage/myisam/ha_myisam.cc: Maria plugin interface added. storage/myisammrg/ha_myisammrg.cc: Maria plugin interface added. storage/pbxt/src/ha_pbxt.cc: Maria plugin interface added. storage/xtradb/handler/ha_innodb.cc: Maria plugin interface added. storage/xtradb/handler/i_s.cc: Maria plugin interface added. storage/xtradb/handler/i_s.h: Maria plugin interface added. --- storage/federated/ha_federated.cc | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'storage/federated') diff --git a/storage/federated/ha_federated.cc b/storage/federated/ha_federated.cc index d9b1f1ffeeb..08dd36a8537 100644 --- a/storage/federated/ha_federated.cc +++ b/storage/federated/ha_federated.cc @@ -3379,3 +3379,20 @@ mysql_declare_plugin(federated) NULL /* config options */ } mysql_declare_plugin_end; +maria_declare_plugin(federated) +{ + MYSQL_STORAGE_ENGINE_PLUGIN, + &federated_storage_engine, + "FEDERATED", + "Patrick Galbraith and Brian Aker, MySQL AB", + "Federated MySQL storage engine", + PLUGIN_LICENSE_GPL, + federated_db_init, /* Plugin Init */ + federated_done, /* Plugin Deinit */ + 0x0100 /* 1.0 */, + NULL, /* status variables */ + NULL, /* system variables */ + "1.0", /* string version */ + MariaDB_PLUGIN_MATURITY_BETA /* maturity */ +} +maria_declare_plugin_end; -- cgit v1.2.1 From 14e53d066807f7164d94dd8449ab4458509ada88 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 9 Jun 2010 23:29:18 +0200 Subject: allow federated and innodb_plugin to be built storage/federated/Makefile.am: federated needs functions from mysys/string.c. mysqld does not use them, so they don't get into the binary. storage/federated/plug.in: enable federated again. remove it from all configurations. storage/federatedx/Makefile.am: federatedx is now called federatedx in configure storage/federatedx/ha_federatedx.cc: federatedx is now called federatedx in configure storage/federatedx/plug.in: federatedx is now called federatedx in configure storage/innodb_plugin/plug.in: enable innodb plugin again. remove it from all configurations. storage/xtradb/CMakeLists.txt: xtradb is now called xtradb in configure, and builds libxtradb.a and ha_xtradb.so storage/xtradb/Makefile.am: xtradb is now called xtradb in configure, and builds libxtradb.a and ha_xtradb.so storage/xtradb/handler/ha_innodb.cc: xtradb is now called xtradb in configure, and builds libxtradb.a and ha_xtradb.so storage/xtradb/plug.in: xtradb is now called xtradb in configure, and builds libxtradb.a and ha_xtradb.so --- storage/federated/Makefile.am | 4 +--- storage/federated/plug.in | 5 +++++ storage/federated/plug.in.disabled | 5 ----- 3 files changed, 6 insertions(+), 8 deletions(-) create mode 100644 storage/federated/plug.in delete mode 100644 storage/federated/plug.in.disabled (limited to 'storage/federated') diff --git a/storage/federated/Makefile.am b/storage/federated/Makefile.am index 64ea0207017..26786ee48cb 100644 --- a/storage/federated/Makefile.am +++ b/storage/federated/Makefile.am @@ -26,8 +26,6 @@ INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include \ -I$(srcdir) WRAPLIBS= -LDADD = - DEFS = @DEFS@ noinst_HEADERS = ha_federated.h @@ -37,7 +35,7 @@ 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_CFLAGS = $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN -ha_federated_la_SOURCES = ha_federated.cc +ha_federated_la_SOURCES = ha_federated.cc $(top_srcdir)/mysys/string.c EXTRA_LIBRARIES = libfederated.a diff --git a/storage/federated/plug.in b/storage/federated/plug.in new file mode 100644 index 00000000000..714888b2ebf --- /dev/null +++ b/storage/federated/plug.in @@ -0,0 +1,5 @@ +MYSQL_STORAGE_ENGINE(federated,,[Federated Storage Engine], + [Connects to tables on remote MySQL servers], []) +MYSQL_PLUGIN_STATIC(federated, [libfederated.a]) +MYSQL_PLUGIN_DYNAMIC(federated, [ha_federated.la]) +MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS(federated, [ha_federated.cc]) diff --git a/storage/federated/plug.in.disabled b/storage/federated/plug.in.disabled deleted file mode 100644 index 23b607d699b..00000000000 --- a/storage/federated/plug.in.disabled +++ /dev/null @@ -1,5 +0,0 @@ -MYSQL_STORAGE_ENGINE(federated,,[Federated Storage Engine], - [Connects to tables on remote MySQL servers], [max,max-no-ndb]) -MYSQL_PLUGIN_STATIC(federated, [libfederated.a]) -MYSQL_PLUGIN_DYNAMIC(federated, [ha_federated.la]) -MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS(federated, [ha_federated.cc]) -- cgit v1.2.1 From 069a068c90d8fa6ccb8028f3f2cd42c238b04699 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Fri, 23 Jul 2010 22:37:21 +0200 Subject: restore the unintentinally broken ABI --- storage/federated/ha_federated.cc | 7 +++++-- storage/federated/ha_federated.h | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'storage/federated') diff --git a/storage/federated/ha_federated.cc b/storage/federated/ha_federated.cc index 4330d9bdd30..619393289a9 100644 --- a/storage/federated/ha_federated.cc +++ b/storage/federated/ha_federated.cc @@ -1983,12 +1983,12 @@ void ha_federated::start_bulk_insert(ha_rows rows) @retval != 0 Error occured at remote server. Also sets my_errno. */ -int ha_federated::end_bulk_insert(bool abort) +int ha_federated::end_bulk_insert() { int error= 0; DBUG_ENTER("ha_federated::end_bulk_insert"); - if (!abort && bulk_insert.str && bulk_insert.length) + if (!table_will_be_deleted && bulk_insert.str && bulk_insert.length) { if (real_query(bulk_insert.str, bulk_insert.length)) error= stash_remote_error(); @@ -2905,6 +2905,8 @@ int ha_federated::extra(ha_extra_function operation) case HA_EXTRA_INSERT_WITH_UPDATE: insert_dup_update= TRUE; break; + case HA_EXTRA_PREPARE_FOR_DROP: + table_will_be_deleted = TRUE; default: /* do nothing */ DBUG_PRINT("info",("unhandled operation: %d", (uint) operation)); @@ -3305,6 +3307,7 @@ int ha_federated::external_lock(THD *thd, int lock_type) } } #endif /* XXX_SUPERCEDED_BY_WL2952 */ + table_will_be_deleted = FALSE; DBUG_RETURN(error); } diff --git a/storage/federated/ha_federated.h b/storage/federated/ha_federated.h index ab31e3c1680..142e0e95e2b 100644 --- a/storage/federated/ha_federated.h +++ b/storage/federated/ha_federated.h @@ -88,7 +88,7 @@ class ha_federated: public handler Array of all stored results we get during a query execution. */ DYNAMIC_ARRAY results; - bool position_called; + bool position_called, table_will_be_deleted; uint fetch_num; // stores the fetch num MYSQL_ROW_OFFSET current_position; // Current position used by ::position() int remote_error_number; @@ -210,7 +210,7 @@ public: int close(void); // required void start_bulk_insert(ha_rows rows); - int end_bulk_insert(bool abort); + int end_bulk_insert(); int write_row(uchar *buf); int update_row(const uchar *old_data, uchar *new_data); int delete_row(const uchar *buf); -- cgit v1.2.1 From 44fec70b7968778808673d9668c5fe08da03a7ca Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 9 Sep 2010 15:35:47 +0200 Subject: build dynamic plugins with the -shared libtool option to avoid double compilation --- storage/federated/Makefile.am | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'storage/federated') diff --git a/storage/federated/Makefile.am b/storage/federated/Makefile.am index 8419e0b866e..414fb5b7d5f 100644 --- a/storage/federated/Makefile.am +++ b/storage/federated/Makefile.am @@ -33,15 +33,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_CXXFLAGS) -DMYSQL_DYNAMIC_PLUGIN -ha_federated_la_CFLAGS = $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN +ha_federated_la_CXXFLAGS= -shared $(AM_CXXFLAGS) -DMYSQL_DYNAMIC_PLUGIN +ha_federated_la_CFLAGS = -shared $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN ha_federated_la_SOURCES = ha_federated.cc $(top_srcdir)/mysys/string.c EXTRA_LIBRARIES = libfederated.a noinst_LIBRARIES = @plugin_federated_static_target@ libfederated_a_CXXFLAGS = $(AM_CXXFLAGS) -libfederated_a_CFLAGS = $(AM_CFLAGS) libfederated_a_SOURCES= ha_federated.cc -- cgit v1.2.1 From 7bab240fdd61fd2d74d091b5b735fd9b4a4968a8 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sun, 12 Sep 2010 14:31:14 +0200 Subject: build federared* with libmysqlservices --- storage/federated/Makefile.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'storage/federated') diff --git a/storage/federated/Makefile.am b/storage/federated/Makefile.am index 414fb5b7d5f..7853ccedd21 100644 --- a/storage/federated/Makefile.am +++ b/storage/federated/Makefile.am @@ -32,7 +32,8 @@ 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_LDFLAGS = -module -rpath $(pkgplugindir) \ + -L$(top_builddir)/libservices -lmysqlservices ha_federated_la_CXXFLAGS= -shared $(AM_CXXFLAGS) -DMYSQL_DYNAMIC_PLUGIN ha_federated_la_CFLAGS = -shared $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN ha_federated_la_SOURCES = ha_federated.cc $(top_srcdir)/mysys/string.c -- cgit v1.2.1