From: magnus.blaudd Date: November 26 2012 3:35pm Subject: bzr push into mysql-trunk-cluster branch (magnus.blaudd:3577 to 3578) List-Archive: http://lists.mysql.com/commits/145393 Message-Id: <20121126153556.1173.98025.3578@wholphin> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 3578 magnus.blaudd@stripped 2012-11-26 [merge] Merge modified: mysql-test/suite/ndb/t/ndb_many_fragments.test mysql-test/suite/ndb/t/test_mgmd.test mysql-test/suite/ndb_memcache/t/basic.test mysql-test/suite/ndb_memcache/t/external_values.test mysql-test/suite/ndb_memcache/t/lib_ascii.test mysql-test/suite/ndb_memcache/t/lib_binary.test mysql-test/suite/ndb_memcache/t/math1.test mysql-test/suite/ndb_memcache/t/math2.test mysql-test/suite/ndb_memcache/t/math3.test mysql-test/suite/ndb_memcache/t/mpart_key.test mysql-test/suite/ndb_memcache/t/reconf1.test mysql-test/suite/ndb_memcache/t/tsv1.test mysql-test/suite/ndb_memcache/t/tsv2.test mysql-test/suite/ndb_memcache/t/ttls_flags.test mysql-test/suite/ndb_memcache/t/type_char.test mysql-test/suite/ndb_memcache/t/type_numeric.test mysql-test/suite/ndb_memcache/t/type_signed.test mysql-test/suite/ndb_memcache/t/type_unsigned.test mysql-test/suite/ndb_memcache/t/unique_idx.test sql/ha_ndbcluster.cc sql/ha_ndbcluster_binlog.cc sql/ha_ndbcluster_push.cc sql/ndb_local_schema.cc storage/ndb/CMakeLists.txt 3577 magnus.blaudd@stripped 2012-11-21 [merge] Merge 7.3 -> trunk-cluster removed: mysql-test/suite/ndb/include/have_junit.inc mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb-slave.opt modified: mysql-test/lib/My/Exec.pm mysql-test/suite/ndb/include/have_java.inc mysql-test/suite/ndb/include/run_java.inc mysql-test/suite/ndb/t/clusterj.test mysql-test/suite/ndb/t/clusterj_jpa.test mysql-test/suite/rpl_ndb/t/disabled.def storage/ndb/clusterj/clusterj-jpatest/CMakeLists.txt storage/ndb/clusterj/clusterj-openjpa/CMakeLists.txt storage/ndb/clusterj/clusterj-test/CMakeLists.txt storage/ndb/compile-cluster storage/ndb/include/kernel/signaldata/DumpStateOrd.hpp storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp storage/ndb/src/kernel/vm/LockQueue.cpp storage/ndb/src/kernel/vm/LockQueue.hpp storage/ndb/src/ndbapi/ndberror.c === modified file 'mysql-test/suite/ndb/t/ndb_many_fragments.test' --- a/mysql-test/suite/ndb/t/ndb_many_fragments.test 2012-08-24 12:07:17 +0000 +++ b/mysql-test/suite/ndb/t/ndb_many_fragments.test 2012-11-26 14:24:01 +0000 @@ -1,3 +1,4 @@ +--source include/have_ndb.inc # # Tests of table partotioned across a large number # of fragments. Intended to test possible issues === modified file 'mysql-test/suite/ndb/t/test_mgmd.test' --- a/mysql-test/suite/ndb/t/test_mgmd.test 2011-11-23 09:54:30 +0000 +++ b/mysql-test/suite/ndb/t/test_mgmd.test 2012-11-26 14:29:23 +0000 @@ -1,3 +1,5 @@ +--source include/have_ndb.inc + # Test does not need to run with embedded # since mysqld/libmysqld is not involved --source include/not_embedded.inc === modified file 'mysql-test/suite/ndb_memcache/t/basic.test' --- a/mysql-test/suite/ndb_memcache/t/basic.test 2012-04-26 11:58:05 +0000 +++ b/mysql-test/suite/ndb_memcache/t/basic.test 2012-11-26 14:37:26 +0000 @@ -1,4 +1,4 @@ - +--source include/have_ndb.inc # Test the fundamental ability to connect to a memcached server, # wait for it to become ready, set a value, and then retreive that === modified file 'mysql-test/suite/ndb_memcache/t/external_values.test' --- a/mysql-test/suite/ndb_memcache/t/external_values.test 2012-10-13 04:48:45 +0000 +++ b/mysql-test/suite/ndb_memcache/t/external_values.test 2012-11-26 14:37:26 +0000 @@ -1,3 +1,4 @@ +--source include/have_ndb.inc --source suite/ndb_memcache/include/have_memcache.inc --source suite/ndb_memcache/include/misc_tables.inc === modified file 'mysql-test/suite/ndb_memcache/t/lib_ascii.test' --- a/mysql-test/suite/ndb_memcache/t/lib_ascii.test 2012-04-26 11:58:05 +0000 +++ b/mysql-test/suite/ndb_memcache/t/lib_ascii.test 2012-11-26 14:37:26 +0000 @@ -1,4 +1,4 @@ - +--source include/have_ndb.inc --source suite/ndb_memcache/include/have_memcache.inc # Test the ASCII protocol functions in the My/Memcache.pm library === modified file 'mysql-test/suite/ndb_memcache/t/lib_binary.test' --- a/mysql-test/suite/ndb_memcache/t/lib_binary.test 2012-04-26 11:58:05 +0000 +++ b/mysql-test/suite/ndb_memcache/t/lib_binary.test 2012-11-26 14:37:26 +0000 @@ -1,4 +1,4 @@ - +--source include/have_ndb.inc --source suite/ndb_memcache/include/have_memcache.inc # Test the binary protocol functions in the My/Memcache.pm library === modified file 'mysql-test/suite/ndb_memcache/t/math1.test' --- a/mysql-test/suite/ndb_memcache/t/math1.test 2012-04-26 11:58:05 +0000 +++ b/mysql-test/suite/ndb_memcache/t/math1.test 2012-11-26 14:37:26 +0000 @@ -1,4 +1,4 @@ - +--source include/have_ndb.inc --source suite/ndb_memcache/include/have_memcache.inc === modified file 'mysql-test/suite/ndb_memcache/t/math2.test' --- a/mysql-test/suite/ndb_memcache/t/math2.test 2012-04-26 11:58:05 +0000 +++ b/mysql-test/suite/ndb_memcache/t/math2.test 2012-11-26 14:37:26 +0000 @@ -1,4 +1,4 @@ - +--source include/have_ndb.inc --source suite/ndb_memcache/include/have_memcache.inc === modified file 'mysql-test/suite/ndb_memcache/t/math3.test' --- a/mysql-test/suite/ndb_memcache/t/math3.test 2012-10-12 21:50:46 +0000 +++ b/mysql-test/suite/ndb_memcache/t/math3.test 2012-11-26 14:37:26 +0000 @@ -1,4 +1,4 @@ - +--source include/have_ndb.inc --source suite/ndb_memcache/include/have_memcache.inc === modified file 'mysql-test/suite/ndb_memcache/t/mpart_key.test' --- a/mysql-test/suite/ndb_memcache/t/mpart_key.test 2012-10-12 21:50:46 +0000 +++ b/mysql-test/suite/ndb_memcache/t/mpart_key.test 2012-11-26 14:37:26 +0000 @@ -1,4 +1,4 @@ - +--source include/have_ndb.inc --source suite/ndb_memcache/include/have_memcache.inc --source suite/ndb_memcache/include/memcached_wait_for_ready.inc --source suite/ndb_memcache/include/misc_tables.inc === modified file 'mysql-test/suite/ndb_memcache/t/reconf1.test' --- a/mysql-test/suite/ndb_memcache/t/reconf1.test 2012-04-26 11:58:05 +0000 +++ b/mysql-test/suite/ndb_memcache/t/reconf1.test 2012-11-26 14:37:26 +0000 @@ -1,6 +1,5 @@ # Basic test of online reconfiguration - - +--source include/have_ndb.inc --source suite/ndb_memcache/include/have_memcache.inc --source suite/ndb_memcache/include/memcached_wait_for_ready.inc === modified file 'mysql-test/suite/ndb_memcache/t/tsv1.test' --- a/mysql-test/suite/ndb_memcache/t/tsv1.test 2012-04-26 11:58:05 +0000 +++ b/mysql-test/suite/ndb_memcache/t/tsv1.test 2012-11-26 14:37:26 +0000 @@ -1,4 +1,4 @@ - +--source include/have_ndb.inc --source suite/ndb_memcache/include/have_memcache.inc # Test reading & writing tab-separated values === modified file 'mysql-test/suite/ndb_memcache/t/tsv2.test' --- a/mysql-test/suite/ndb_memcache/t/tsv2.test 2012-04-26 11:58:05 +0000 +++ b/mysql-test/suite/ndb_memcache/t/tsv2.test 2012-11-26 14:37:26 +0000 @@ -1,7 +1,7 @@ # Test reading & writing multiple tab-separated values. # This test exposes a bug where parts of a previous longer value can be # appended to the (shorter) value of a subsequent request. - +--source include/have_ndb.inc --source suite/ndb_memcache/include/have_memcache.inc === modified file 'mysql-test/suite/ndb_memcache/t/ttls_flags.test' --- a/mysql-test/suite/ndb_memcache/t/ttls_flags.test 2012-04-26 11:58:05 +0000 +++ b/mysql-test/suite/ndb_memcache/t/ttls_flags.test 2012-11-26 14:37:26 +0000 @@ -1,3 +1,4 @@ +--source include/have_ndb.inc --source suite/ndb_memcache/include/have_memcache.inc --perl === modified file 'mysql-test/suite/ndb_memcache/t/type_char.test' --- a/mysql-test/suite/ndb_memcache/t/type_char.test 2012-10-12 21:50:46 +0000 +++ b/mysql-test/suite/ndb_memcache/t/type_char.test 2012-11-26 14:37:26 +0000 @@ -1,5 +1,5 @@ # CHAR - +--source include/have_ndb.inc --source suite/ndb_memcache/include/have_memcache.inc --source suite/ndb_memcache/include/memcached_wait_for_ready.inc --source suite/ndb_memcache/include/datatypes_tables.inc === modified file 'mysql-test/suite/ndb_memcache/t/type_numeric.test' --- a/mysql-test/suite/ndb_memcache/t/type_numeric.test 2012-04-26 11:58:05 +0000 +++ b/mysql-test/suite/ndb_memcache/t/type_numeric.test 2012-11-26 14:37:26 +0000 @@ -1,3 +1,4 @@ +--source include/have_ndb.inc --source suite/ndb_memcache/include/have_memcache.inc # Basic data type tests for === modified file 'mysql-test/suite/ndb_memcache/t/type_signed.test' --- a/mysql-test/suite/ndb_memcache/t/type_signed.test 2012-04-26 11:58:05 +0000 +++ b/mysql-test/suite/ndb_memcache/t/type_signed.test 2012-11-26 14:37:26 +0000 @@ -1,3 +1,4 @@ +--source include/have_ndb.inc --source suite/ndb_memcache/include/have_memcache.inc # Basic data type tests for === modified file 'mysql-test/suite/ndb_memcache/t/type_unsigned.test' --- a/mysql-test/suite/ndb_memcache/t/type_unsigned.test 2012-04-26 11:58:05 +0000 +++ b/mysql-test/suite/ndb_memcache/t/type_unsigned.test 2012-11-26 14:37:26 +0000 @@ -1,3 +1,4 @@ +--source include/have_ndb.inc --source suite/ndb_memcache/include/have_memcache.inc # Basic data type tests for === modified file 'mysql-test/suite/ndb_memcache/t/unique_idx.test' --- a/mysql-test/suite/ndb_memcache/t/unique_idx.test 2012-10-12 21:50:46 +0000 +++ b/mysql-test/suite/ndb_memcache/t/unique_idx.test 2012-11-26 14:37:26 +0000 @@ -8,7 +8,7 @@ # (3) Updates that contain the PK column are allowed if the PK value # does not change, but attempts to change the PK fail with NOT_STORED. - +--source include/have_ndb.inc --source suite/ndb_memcache/include/have_memcache.inc --source suite/ndb_memcache/include/memcached_wait_for_ready.inc --source suite/ndb_memcache/include/misc_tables.inc === modified file 'sql/ha_ndbcluster.cc' --- a/sql/ha_ndbcluster.cc 2012-11-21 13:09:28 +0000 +++ b/sql/ha_ndbcluster.cc 2012-11-23 14:18:01 +0000 @@ -40,9 +40,7 @@ #include "ndb_table_guard.h" #include "ndb_global_schema_lock.h" #include "ndb_global_schema_lock_guard.h" -#ifndef NDB_WITHOUT_JOIN_PUSHDOWN #include "abstract_query_plan.h" -#endif #include "ndb_dist_priv_util.h" #include "ha_ndb_index_stat.h" @@ -795,11 +793,6 @@ SHOW_VAR ndb_status_index_stat_variables {NullS, NullS, SHOW_LONG} }; -#ifndef NDB_WITHOUT_JOIN_PUSHDOWN -static int ndbcluster_make_pushed_join(handlerton *, - THD*, - const AQP::Join_plan*); -#endif /* Error handling functions @@ -2957,8 +2950,8 @@ int ha_ndbcluster::pk_read(const uchar * NdbOperation::LockMode lm= get_ndb_lock_mode(m_lock.type); -#ifndef NDB_WITHOUT_JOIN_PUSHDOWN - if (check_if_pushable(NdbQueryOperationDef::PrimaryKeyAccess, table->s->primary_key)) + if (check_if_pushable(NdbQueryOperationDef::PrimaryKeyAccess, + table->s->primary_key)) { // Is parent of pushed join DBUG_ASSERT(lm == NdbOperation::LM_CommittedRead); @@ -2991,7 +2984,6 @@ int ha_ndbcluster::pk_read(const uchar * } } else -#endif { if (m_pushed_join_operation == PUSHED_ROOT) { @@ -3373,8 +3365,8 @@ int ha_ndbcluster::unique_index_read(con NdbOperation::LockMode lm= get_ndb_lock_mode(m_lock.type); -#ifndef NDB_WITHOUT_JOIN_PUSHDOWN - if (check_if_pushable(NdbQueryOperationDef::UniqueIndexAccess, active_index)) + if (check_if_pushable(NdbQueryOperationDef::UniqueIndexAccess, + active_index)) { DBUG_ASSERT(lm == NdbOperation::LM_CommittedRead); const int error= pk_unique_index_read_key_pushed(active_index, key, NULL); @@ -3404,7 +3396,6 @@ int ha_ndbcluster::unique_index_read(con } } else -#endif { if (m_pushed_join_operation == PUSHED_ROOT) { @@ -3765,7 +3756,6 @@ ha_ndbcluster::pk_unique_index_read_key( extern void sql_print_information(const char *format, ...); -#ifndef NDB_WITHOUT_JOIN_PUSHDOWN static bool is_shrinked_varchar(const Field *field) @@ -3847,7 +3837,6 @@ ha_ndbcluster::pk_unique_index_read_key_ DBUG_RETURN(ret); } -#endif /** Count number of columns in key part. */ static uint @@ -4009,7 +3998,6 @@ int ha_ndbcluster::ordered_index_scan(co pbound = &bound; } -#ifndef NDB_WITHOUT_JOIN_PUSHDOWN if (check_if_pushable(NdbQueryOperationDef::OrderedIndexScan, active_index)) { const int error= create_pushed_join(); @@ -4038,7 +4026,6 @@ int ha_ndbcluster::ordered_index_scan(co DBUG_ASSERT(!uses_blob_value(table->read_set)); // Can't have BLOB in pushed joins (yet) } else -#endif { if (m_pushed_join_operation == PUSHED_ROOT) { @@ -4203,7 +4190,6 @@ int ha_ndbcluster::full_table_scan(const if (table_share->primary_key == MAX_KEY) get_hidden_fields_scan(&options, gets); -#ifndef NDB_WITHOUT_JOIN_PUSHDOWN if (check_if_pushable(NdbQueryOperationDef::TableScan)) { const int error= create_pushed_join(); @@ -4214,7 +4200,6 @@ int ha_ndbcluster::full_table_scan(const DBUG_ASSERT(!uses_blob_value(table->read_set)); // Can't have BLOB in pushed joins (yet) } else -#endif { if (m_pushed_join_operation == PUSHED_ROOT) { @@ -7199,7 +7184,6 @@ int ha_ndbcluster::reset() { m_cond->cond_clear(); } -#ifndef NDB_WITHOUT_JOIN_PUSHDOWN DBUG_ASSERT(m_active_query == NULL); if (m_pushed_join_operation==PUSHED_ROOT) // Root of pushed query { @@ -7208,7 +7192,6 @@ int ha_ndbcluster::reset() m_pushed_join_member= NULL; m_pushed_join_operation= -1; m_disable_pushed_join= FALSE; -#endif #if 0 // Magnus, disble this "hack" until it's possible to test if @@ -10715,7 +10698,6 @@ ha_ndbcluster::~ha_ndbcluster() m_cond= NULL; } DBUG_PRINT("info", ("Deleting pushed joins")); -#ifndef NDB_WITHOUT_JOIN_PUSHDOWN DBUG_ASSERT(m_active_query == NULL); DBUG_ASSERT(m_active_cursor == NULL); if (m_pushed_join_operation==PUSHED_ROOT) @@ -10723,7 +10705,6 @@ ha_ndbcluster::~ha_ndbcluster() delete m_pushed_join_member; // Also delete QueryDef } m_pushed_join_member= NULL; -#endif DBUG_VOID_RETURN; } @@ -11832,6 +11813,9 @@ static int ndb_wait_setup_func_impl(ulon int(*ndb_wait_setup_func)(ulong) = 0; #endif +static int +ndbcluster_make_pushed_join(handlerton *, THD*, const AQP::Join_plan*); + /* Version in composite numerical format */ static Uint32 ndb_version = NDB_VERSION_D; static MYSQL_SYSVAR_UINT( @@ -11912,9 +11896,7 @@ static int ndbcluster_init(void *p) h->discover= ndbcluster_discover; h->find_files= ndbcluster_find_files; h->table_exists_in_engine= ndbcluster_table_exists_in_engine; -#ifndef NDB_WITHOUT_JOIN_PUSHDOWN h->make_pushed_join= ndbcluster_make_pushed_join; -#endif h->is_supported_system_table = is_supported_system_table; } @@ -14152,13 +14134,10 @@ int ha_ndbcluster::multi_range_start_ret const NdbOperation *oplist[MRR_MAX_RANGES]; uint num_keyops= 0; NdbTransaction *trans= m_thd_ndb->trans; - bool is_pushed= false; int error; - -#ifndef NDB_WITHOUT_JOIN_PUSHDOWN - is_pushed= check_if_pushable(NdbQueryOperationDef::OrderedIndexScan, - active_index); -#endif + const bool is_pushed= + check_if_pushable(NdbQueryOperationDef::OrderedIndexScan, + active_index); DBUG_ENTER("multi_range_start_retrievals"); @@ -14298,8 +14277,7 @@ int ha_ndbcluster::multi_range_start_ret any_real_read= TRUE; DBUG_PRINT("info", ("any_real_read= TRUE")); - -#ifndef NDB_WITHOUT_JOIN_PUSHDOWN + /* Create the scan operation for the first scan range. */ if (check_if_pushable(NdbQueryOperationDef::OrderedIndexScan, active_index)) @@ -14318,7 +14296,6 @@ int ha_ndbcluster::multi_range_start_ret } } // check_if_pushable() else -#endif if (!m_multi_cursor) { /* Do a multi-range index scan for ranges not done by primary/unique key. */ @@ -14814,7 +14791,6 @@ ha_ndbcluster::read_multi_range_fetch_ne DBUG_RETURN(0); } -#ifndef NDB_WITHOUT_JOIN_PUSHDOWN /** * Try to find pushable subsets of a join plan. @@ -14823,6 +14799,7 @@ ha_ndbcluster::read_multi_range_fetch_ne * @param plan The join plan to examine. * @return Possible error code. */ + static int ndbcluster_make_pushed_join(handlerton *hton, THD* thd, @@ -14873,7 +14850,6 @@ int ndbcluster_make_pushed_join(handlert } DBUG_RETURN(0); } -#endif /** @@ -14960,7 +14936,6 @@ ha_ndbcluster::maybe_pushable_join(const * with sorted results. * @return True if the operation may be pushed. */ -#ifndef NDB_WITHOUT_JOIN_PUSHDOWN bool ha_ndbcluster::check_if_pushable(int type, //NdbQueryOperationDef::Type, uint idx) const @@ -14977,6 +14952,7 @@ ha_ndbcluster::check_if_pushable(int typ (idx *files, + LOOKUP_FIELD_VALUES *lookup_field_vals, + bool *with_i_schema); +#endif + /* */ === modified file 'sql/ha_ndbcluster_push.cc' --- a/sql/ha_ndbcluster_push.cc 2012-11-21 13:21:27 +0000 +++ b/sql/ha_ndbcluster_push.cc 2012-11-23 14:18:01 +0000 @@ -24,9 +24,6 @@ #include "ha_ndbcluster_glue.h" - -#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE - #include "ha_ndbcluster.h" #include "ha_ndbcluster_push.h" #include "ha_ndbcluster_binlog.h" @@ -1555,5 +1552,3 @@ ndbcluster_build_key_map(const NDBTAB* t } } } // ndbcluster_build_key_map - -#endif // WITH_NDBCLUSTER_STORAGE_ENGINE === modified file 'sql/ndb_local_schema.cc' --- a/sql/ndb_local_schema.cc 2012-11-01 13:20:28 +0000 +++ b/sql/ndb_local_schema.cc 2012-11-23 10:59:29 +0000 @@ -22,17 +22,9 @@ #endif #include "sql_class.h" +#include "sql_table.h" #include "mdl.h" - -// Avoid including all of sql_table.h and instead just duplicate -// declare the function again -extern uint -build_table_filename(char *buff, size_t bufflen, - const char *db, const char *table, const char *ext, - uint flags); - - static const char *ndb_ext=".ndb"; === modified file 'storage/ndb/CMakeLists.txt' --- a/storage/ndb/CMakeLists.txt 2012-11-21 13:09:28 +0000 +++ b/storage/ndb/CMakeLists.txt 2012-11-23 14:18:01 +0000 @@ -97,15 +97,12 @@ IF(NOT MYSQL_CLUSTER_VERSION) # Online alter table not supported in non MySQL Cluster # versions yet, compile ndbcluster without online alter support ADD_DEFINITIONS(-DNDB_WITHOUT_ONLINE_ALTER) - # Distributed privilege tables not supported in non - # MySQL Cluster version yet, compile ndbcluster without dist priv - ADD_DEFINITIONS(-DNDB_WITHOUT_DIST_PRIV) - # Pushdown of join queries not supported in non - # MySQL Cluster version yet, compile ndbcluster without it - ADD_DEFINITIONS(-DNDB_WITHOUT_JOIN_PUSHDOWN) # Global schema lock not supported in non # MySQL Cluster version yet, compile ndbcluster without it ADD_DEFINITIONS(-DNDB_WITHOUT_GLOBAL_SCHEMA_LOCK) + # The function 'make_db_list' i not available in non + # MySQL Cluster version yet, compile ndbcluster without it + ADD_DEFINITIONS(-DNDB_WITHOUT_MAKE_DB_LIST) ENDIF() # Online alter table currently not supported in trunk-cluster No bundle (reason: useless for push emails).