diff options
author | unknown <tomas@poseidon.ndb.mysql.com> | 2004-12-20 12:36:14 +0100 |
---|---|---|
committer | unknown <tomas@poseidon.ndb.mysql.com> | 2004-12-20 12:36:14 +0100 |
commit | 8c01aba776c21448f1f10be51200cd2d1ebd2ab5 (patch) | |
tree | 49a42be532437e1949397ca04ceb31401b770066 /sql/ha_ndbcluster.cc | |
parent | 6cbcd3423afd72961d7f04c5536426ba92e24db8 (diff) | |
download | mariadb-git-8c01aba776c21448f1f10be51200cd2d1ebd2ab5.tar.gz |
added config parameter Group on connection
moved NdbWaiter, m_ndb_cluster_connection, to impl class
moved node selection things to cluster connection
moved all private things to impl class
added opts for shared memory and node selection
changed opts handling somewhat; introduced enum for options and common handling of option variables
added checks for transporter support
automatic addition of shared mem transporters
moved wait_until_ready code to cluster connection
added control of usage of new node selection method
ndb/include/mgmapi/mgmapi_config_parameters.h:
added config parameter Group on connection
ndb/include/ndbapi/Ndb.hpp:
moved NdbWaiter, m_ndb_cluster_connection, to impl class
moved node selection things to cluster connection
ndb/include/ndbapi/ndb_cluster_connection.hpp:
moved all private things to impl class
ndb/include/util/ndb_opts.h:
added opts for shared memory and node selection
ndb/src/kernel/vm/Configuration.cpp:
changed opts handling somewhat; introduced enum for options and common handling of option variables
ndb/src/mgmclient/main.cpp:
changed opts handling somewhat; introduced enum for options and common handling of option variables
ndb/src/mgmsrv/ConfigInfo.cpp:
added checks for transporter support
automatic addition of shared mem transporters
ndb/src/mgmsrv/MgmtSrvr.cpp:
in alloc node id first choose connection with specified hostname
ndb/src/mgmsrv/main.cpp:
changed opts handling somewhat; introduced enum for options and common handling of option variables
ndb/src/ndbapi/DictCache.hpp:
added include file
ndb/src/ndbapi/Ndb.cpp:
enabled using new node selection method
moved wait_until_ready code to cluster connection
moved node selection (hint) to cluster connection
removed start transaction dgroup
ndb/src/ndbapi/NdbDictionaryImpl.hpp:
removed and added inclusde files
ndb/src/ndbapi/NdbImpl.hpp:
moved things from Ndb into Impl class
moved waiter things to new file NdbWaiter.hpp
ndb/src/ndbapi/NdbScanOperation.cpp:
ndbwaiter is no in impl class
ndb/src/ndbapi/Ndbif.cpp:
ndbwaiter is no in impl class
ndb/src/ndbapi/Ndbinit.cpp:
moved some Ndb things into impl class
ndb/src/ndbapi/TransporterFacade.hpp:
changed friend declaration
ndb/src/ndbapi/ndb_cluster_connection.cpp:
moved node selection things to cluster connection
moved things from cluster connection to cluster connection impl class
ndb/test/ndbapi/testNdbApi.cpp:
removed start transaction dgroup
ndb/tools/delete_all.cpp:
changed opts handling somewhat; introduced enum for options and common handling of option variables
ndb/tools/desc.cpp:
changed opts handling somewhat; introduced enum for options and common handling of option variables
ndb/tools/drop_index.cpp:
changed opts handling somewhat; introduced enum for options and common handling of option variables
ndb/tools/drop_tab.cpp:
changed opts handling somewhat; introduced enum for options and common handling of option variables
ndb/tools/listTables.cpp:
changed opts handling somewhat; introduced enum for options and common handling of option variables
ndb/tools/restore/restore_main.cpp:
changed opts handling somewhat; introduced enum for options and common handling of option variables
ndb/tools/select_all.cpp:
changed opts handling somewhat; introduced enum for options and common handling of option variables
ndb/tools/select_count.cpp:
changed opts handling somewhat; introduced enum for options and common handling of option variables
ndb/tools/waiter.cpp:
changed opts handling somewhat; introduced enum for options and common handling of option variables
sql/ha_ndbcluster.cc:
added control of usage of new node selection method
sql/mysqld.cc:
added control of usage of new node selection method
Diffstat (limited to 'sql/ha_ndbcluster.cc')
-rw-r--r-- | sql/ha_ndbcluster.cc | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index 029fe31ecf7..eb201ee6ef5 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -32,6 +32,10 @@ #include <ndbapi/NdbApi.hpp> #include <ndbapi/NdbScanFilter.hpp> +// options from from mysqld.cc +extern my_bool opt_ndb_optimized_node_selection; +extern const char *opt_ndbcluster_connectstring; + // Default value for parallelism static const int parallelism= 240; @@ -39,9 +43,6 @@ static const int parallelism= 240; // createable against NDB from this handler static const int max_transactions= 256; -// connectstring to cluster if given by mysqld -const char *ndbcluster_connectstring= 0; - static const char *ha_ndb_ext=".ndb"; #define NDB_HIDDEN_PRIMARY_KEY_LENGTH 8 @@ -4233,15 +4234,19 @@ bool ndbcluster_init() int res; DBUG_ENTER("ndbcluster_init"); // Set connectstring if specified - if (ndbcluster_connectstring != 0) - DBUG_PRINT("connectstring", ("%s", ndbcluster_connectstring)); + if (opt_ndbcluster_connectstring != 0) + DBUG_PRINT("connectstring", ("%s", opt_ndbcluster_connectstring)); if ((g_ndb_cluster_connection= - new Ndb_cluster_connection(ndbcluster_connectstring)) == 0) + new Ndb_cluster_connection(opt_ndbcluster_connectstring)) == 0) { - DBUG_PRINT("error",("Ndb_cluster_connection(%s)",ndbcluster_connectstring)); + DBUG_PRINT("error",("Ndb_cluster_connection(%s)", + opt_ndbcluster_connectstring)); goto ndbcluster_init_error; } + g_ndb_cluster_connection->set_optimized_node_selection + (opt_ndb_optimized_node_selection); + // Create a Ndb object to open the connection to NDB g_ndb= new Ndb(g_ndb_cluster_connection, "sys"); g_ndb->getDictionary()->set_local_table_data_size(sizeof(Ndb_table_local_info)); @@ -4256,7 +4261,7 @@ bool ndbcluster_init() DBUG_PRINT("info",("NDBCLUSTER storage engine at %s on port %d", g_ndb_cluster_connection->get_connected_host(), g_ndb_cluster_connection->get_connected_port())); - g_ndb->waitUntilReady(10); + g_ndb_cluster_connection->wait_until_ready(10,0); } else if(res == 1) { |