From: magnus.blaudd Date: September 30 2011 11:22am Subject: bzr push into mysql-trunk-cluster branch (magnus.blaudd:3369 to 3370) List-Archive: http://lists.mysql.com/commits/141234 Message-Id: <201109301122.p8UBMpGO011266@acsmt358.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 3370 magnus.blaudd@stripped 2011-09-30 [merge] Merge modified: cmake/configure.pl include/my_base.h sql/abstract_query_plan.cc sql/binlog.cc sql/ha_ndbcluster.cc sql/ha_ndbcluster.h sql/ha_ndbcluster_binlog.cc sql/ha_ndbcluster_cond.cc sql/ha_ndbcluster_cond.h sql/ha_ndbcluster_connection.cc sql/ha_ndbcluster_push.cc sql/ha_ndbcluster_push.h sql/ha_partition.h sql/handler.cc sql/handler.h sql/rpl_injector.h sql/rpl_mi.cc sql/rpl_mi.h sql/rpl_reporting.cc sql/sql_select.cc sql/table.cc storage/archive/archive_reader.c storage/ndb/CMakeLists.txt 3369 magnus.blaudd@stripped 2011-09-27 [merge] Merge trunk-cluster-base(3435) -> trunk-cluster removed: scripts/make_binary_distribution.sh scripts/make_win_bin_dist support-files/config.huge.ini.sh support-files/config.medium.ini.sh support-files/config.small.ini.sh support-files/ndb-config-2-node.ini.sh added: mysql-test/r/auth_rpl.result mysql-test/suite/opt_trace/include/filesort_pq.inc mysql-test/suite/opt_trace/r/filesort_pq.result mysql-test/suite/opt_trace/t/filesort_pq.test mysql-test/t/auth_rpl-master.opt mysql-test/t/auth_rpl-slave.opt mysql-test/t/auth_rpl.test modified: CMakeLists.txt client/mysql_plugin.c client/mysqltest.cc cmake/mysql_version.cmake cmake/plugin.cmake config.h.cmake extra/perror.c include/my_base.h include/mysql/plugin.h include/mysql/plugin_audit.h.pp include/mysql/plugin_auth.h.pp include/mysql/plugin_ftparser.h.pp include/mysql/psi/mysql_socket.h libmysql/authentication_win/common.cc libmysql/authentication_win/common.h libmysql/authentication_win/handshake_client.cc libmysql/authentication_win/log_client.cc libmysql/client_settings.h mysql-test/collections/default.experimental mysql-test/collections/disabled-weekly.list mysql-test/include/icp_tests.inc mysql-test/include/mtr_check.sql mysql-test/include/order_by.inc mysql-test/mysql-test-run.pl mysql-test/r/ctype_errors.result mysql-test/r/ctype_utf16.result mysql-test/r/ctype_utf32_uca.result mysql-test/r/derived.result mysql-test/r/func_str.result mysql-test/r/innodb_icp.result mysql-test/r/innodb_icp_none.result mysql-test/r/innodb_mrr_cost_icp.result mysql-test/r/innodb_mrr_icp.result mysql-test/r/join.result mysql-test/r/myisam_icp.result mysql-test/r/myisam_icp_none.result mysql-test/r/myisampack.result mysql-test/r/order_by_all.result mysql-test/r/order_by_icp_mrr.result mysql-test/r/order_by_none.result mysql-test/r/plugin_auth.result mysql-test/r/query_cache.result mysql-test/r/range_all.result mysql-test/r/sp-error.result mysql-test/r/sp.result mysql-test/r/subquery_all.result mysql-test/r/subquery_all_bka.result mysql-test/r/subquery_sj_dupsweed.result mysql-test/r/subquery_sj_dupsweed_bka.result mysql-test/r/subquery_sj_dupsweed_bkaunique.result mysql-test/r/subquery_sj_loosescan.result mysql-test/r/subquery_sj_loosescan_bka.result mysql-test/r/subquery_sj_loosescan_bkaunique.result mysql-test/r/subquery_sj_mat.result mysql-test/r/subquery_sj_mat_bka.result mysql-test/r/subquery_sj_mat_bkaunique.result mysql-test/r/subquery_sj_none.result mysql-test/r/subquery_sj_none_bka.result mysql-test/r/subquery_sj_none_bka_nobnl.result mysql-test/r/subquery_sj_none_bkaunique.result mysql-test/r/type_float.result mysql-test/r/union.result mysql-test/r/view_grant.result mysql-test/suite/innodb/r/innodb-index.result mysql-test/suite/innodb/t/innodb-index.test mysql-test/suite/opt_trace/r/bugs_no_prot_none.result mysql-test/suite/opt_trace/r/bugs_ps_prot_none.result mysql-test/suite/opt_trace/r/general2_no_prot.result mysql-test/suite/opt_trace/r/general2_ps_prot.result mysql-test/suite/opt_trace/r/general_no_prot_none.result mysql-test/suite/opt_trace/r/general_ps_prot_none.result mysql-test/suite/opt_trace/r/range_no_prot.result mysql-test/suite/opt_trace/r/range_ps_prot.result mysql-test/suite/perfschema/r/pfs_upgrade.result mysql-test/suite/perfschema/t/socket_instances_func.test mysql-test/suite/perfschema/t/socket_instances_func_win.test mysql-test/suite/perfschema/t/socket_summary_by_instance_func.test mysql-test/suite/perfschema/t/socket_summary_by_instance_func_win.test mysql-test/suite/rpl/r/rpl_row_ignorable_event.result mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result mysql-test/suite/rpl/t/rpl_row_ignorable_event.test mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test mysql-test/t/ctype_errors.test mysql-test/t/ctype_utf32_uca.test mysql-test/t/derived.test mysql-test/t/func_str.test mysql-test/t/join.test mysql-test/t/multi_plugin_load.test mysql-test/t/myisampack.test mysql-test/t/mysql_plugin.test mysql-test/t/plugin_auth.test mysql-test/t/query_cache.test mysql-test/t/sp-error.test mysql-test/t/sp.test mysql-test/t/type_float.test mysql-test/t/union.test mysql-test/t/view_grant.test mysql-test/valgrind.supp mysys/my_handler_errors.h plugin/audit_null/audit_null.c plugin/auth/auth_socket.c plugin/auth/dialog.c plugin/auth/qa_auth_interface.c plugin/auth/qa_auth_server.c plugin/auth/test_plugin.c plugin/daemon_example/daemon_example.cc plugin/fulltext/plugin_example.c plugin/semisync/semisync_master.cc plugin/semisync/semisync_master_plugin.cc plugin/semisync/semisync_slave_plugin.cc scripts/CMakeLists.txt scripts/mysql_install_db.pl.in scripts/mysql_install_db.sh scripts/mysql_system_tables.sql sql/binlog.cc sql/client_settings.h sql/filesort.cc sql/ha_partition.cc sql/handler.cc sql/item.cc sql/item.h sql/item_create.cc sql/item_strfunc.cc sql/item_strfunc.h sql/opt_range.cc sql/opt_trace.h sql/rpl_slave.cc sql/share/errmsg-utf8.txt sql/sql_acl.cc sql/sql_base.cc sql/sql_cache.cc sql/sql_error.cc sql/sql_lex.cc sql/sql_plugin.cc sql/sql_select.cc sql/sql_test.cc sql/sql_test.h sql/sql_union.cc sql/sql_update.cc sql/sql_yacc.yy sql/table.h storage/archive/ha_archive.cc storage/blackhole/ha_blackhole.cc storage/csv/ha_tina.cc storage/example/ha_example.cc storage/federated/ha_federated.cc storage/heap/ha_heap.cc storage/innobase/CMakeLists.txt storage/innobase/btr/btr0btr.c storage/innobase/btr/btr0cur.c storage/innobase/btr/btr0pcur.c storage/innobase/buf/buf0buddy.c storage/innobase/buf/buf0buf.c storage/innobase/buf/buf0flu.c storage/innobase/data/data0data.c storage/innobase/dict/dict0dict.c storage/innobase/dict/dict0load.c storage/innobase/fsp/fsp0fsp.c storage/innobase/handler/ha_innodb.cc storage/innobase/handler/i_s.cc storage/innobase/ibuf/ibuf0ibuf.c storage/innobase/include/btr0btr.ic storage/innobase/include/btr0pcur.h storage/innobase/include/btr0pcur.ic storage/innobase/include/buf0buf.h storage/innobase/include/buf0buf.ic storage/innobase/include/data0data.ic storage/innobase/include/data0type.ic storage/innobase/include/db0err.h storage/innobase/include/dict0dict.ic storage/innobase/include/dict0load.h storage/innobase/include/mtr0mtr.h storage/innobase/include/page0page.h storage/innobase/include/page0page.ic storage/innobase/include/page0zip.ic storage/innobase/include/rem0rec.ic storage/innobase/include/row0upd.ic storage/innobase/include/srv0mon.h storage/innobase/include/sync0sync.h storage/innobase/include/trx0sys.h storage/innobase/include/trx0trx.h storage/innobase/include/trx0undo.h storage/innobase/include/univ.i storage/innobase/include/ut0mem.h storage/innobase/include/ut0mem.ic storage/innobase/log/log0log.c storage/innobase/mtr/mtr0log.c storage/innobase/mtr/mtr0mtr.c storage/innobase/os/os0file.c storage/innobase/page/page0cur.c storage/innobase/page/page0page.c storage/innobase/page/page0zip.c storage/innobase/read/read0read.c storage/innobase/rem/rem0cmp.c storage/innobase/row/row0merge.c storage/innobase/row/row0mysql.c storage/innobase/row/row0purge.c storage/innobase/row/row0row.c storage/innobase/row/row0sel.c storage/innobase/row/row0upd.c storage/innobase/srv/srv0start.c storage/innobase/sync/sync0sync.c storage/innobase/trx/trx0purge.c storage/innobase/trx/trx0rec.c storage/innobase/trx/trx0undo.c storage/innobase/ut/ut0mem.c storage/innobase/ut/ut0ut.c storage/myisam/ft_boolean_search.c storage/myisam/ft_nlq_search.c storage/myisam/ha_myisam.cc storage/myisam/mi_check.c storage/myisam/mi_write.c storage/myisammrg/ha_myisammrg.cc storage/perfschema/ha_perfschema.cc storage/perfschema/pfs.cc storage/perfschema/pfs_instr.cc storage/perfschema/pfs_instr.h strings/dtoa.c support-files/CMakeLists.txt support-files/mysql.spec.sh tests/mysql_client_test.c unittest/gunit/CMakeLists.txt === modified file 'cmake/configure.pl' --- a/cmake/configure.pl 2011-09-07 10:08:09 +0000 +++ b/cmake/configure.pl 2011-09-28 09:38:22 +0000 @@ -206,11 +206,12 @@ foreach my $option (@ARGV) ($option =~ /enable/ ? "1" : "0"); next; } - if ($option =~ /with-gcov/) + if ($option =~ /with-comment=/) { - $cmakeargs = $cmakeargs." -DENABLE_GCOV=ON"; - next; + $cmakeargs = $cmakeargs." \"-DWITH_COMMENT=".substr($option,13)."\""; + next; } +#ifndef MCP_NDB_BUILD_INTEGRATION if ($option =~ /with-classpath=/) { $cmakeargs = $cmakeargs." \"-DWITH_CLASSPATH=".substr($option,15)."\""; @@ -226,6 +227,12 @@ foreach my $option (@ARGV) $cmakeargs = $cmakeargs." \"-DWITH_NDB_CCFLAGS=".substr($option,17)."\""; next; } +#endif + if ($option =~ /with-gcov/) + { + $cmakeargs = $cmakeargs." -DENABLE_GCOV=ON"; + next; + } $option = uc($option); $option =~ s/-/_/g; === modified file 'include/my_base.h' --- a/include/my_base.h 2011-09-27 12:11:16 +0000 +++ b/include/my_base.h 2011-09-28 07:52:48 +0000 @@ -565,10 +565,6 @@ enum data_file_type { /* Deprecated, currently used only by NDB at row retrieval */ #define SKIP_RANGE 256 -#ifndef MCP_BUG58084 -#define READ_KEY_FROM_RANGE 512 /* Reserved for MySQL Cluster internal use */ -#define EMPTY_RANGE 1024 /* Reserved for MySQL Cluster internal use */ -#endif typedef struct st_key_range { === modified file 'sql/abstract_query_plan.cc' --- a/sql/abstract_query_plan.cc 2011-07-01 06:38:52 +0000 +++ b/sql/abstract_query_plan.cc 2011-09-30 10:24:10 +0000 @@ -16,10 +16,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - #include "sql_priv.h" #include "sql_select.h" #include "abstract_query_plan.h" === modified file 'sql/binlog.cc' --- a/sql/binlog.cc 2011-09-27 12:11:16 +0000 +++ b/sql/binlog.cc 2011-09-28 10:06:31 +0000 @@ -4874,10 +4874,6 @@ int THD::binlog_write_table_map(TABLE *t binlog_start_trans_and_stmt(this, &the_event); -#ifndef MCP_BUG11799583 - the_event.flags |= LOG_EVENT_NO_FILTER_F; -#endif - binlog_cache_mngr *const cache_mngr= (binlog_cache_mngr*) thd_get_ha_data(this, binlog_hton); === modified file 'sql/ha_ndbcluster.cc' --- a/sql/ha_ndbcluster.cc 2011-09-27 12:11:16 +0000 +++ b/sql/ha_ndbcluster.cc 2011-09-30 10:24:10 +0000 @@ -21,10 +21,6 @@ MySQL and NDB Cluster */ -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - #include "ha_ndbcluster_glue.h" #ifdef WITH_NDBCLUSTER_STORAGE_ENGINE @@ -45,7 +41,9 @@ #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" @@ -896,7 +894,7 @@ SHOW_VAR ndb_status_index_stat_variables {NullS, NullS, SHOW_LONG} }; -#ifndef NO_PUSHED_JOIN +#ifndef NDB_WITHOUT_JOIN_PUSHDOWN static int ndbcluster_make_pushed_join(handlerton *, THD*,AQP::Join_plan*); #endif @@ -3069,17 +3067,7 @@ static const ulong index_type_flags[]= HA_READ_NEXT | HA_READ_PREV | HA_READ_RANGE | - HA_READ_ORDER | - /* - NOTE 1: our ordered indexes are not really clustered - but since accesing data when scanning index is free - it's a good approxiamtion - - NOTE 2: We really should consider DD attributes here too - (for which there is IO to read data when scanning index) - but that will need to handled later... - */ - HA_CLUSTERED_INDEX, + HA_READ_ORDER, /* UNIQUE_INDEX */ HA_ONLY_WHOLE_INDEX, @@ -3088,15 +3076,13 @@ static const ulong index_type_flags[]= HA_READ_NEXT | HA_READ_PREV | HA_READ_RANGE | - HA_READ_ORDER | - HA_CLUSTERED_INDEX, + HA_READ_ORDER, /* ORDERED_INDEX */ HA_READ_NEXT | HA_READ_PREV | HA_READ_RANGE | - HA_READ_ORDER | - HA_CLUSTERED_INDEX + HA_READ_ORDER }; static const int index_flags_size= sizeof(index_type_flags)/sizeof(ulong); @@ -3134,9 +3120,24 @@ inline ulong ha_ndbcluster::index_flags( bool ha_ndbcluster::primary_key_is_clustered() { - if (table->s->primary_key != MAX_KEY) - return test(index_flags(table->s->primary_key, 0, 0) & HA_CLUSTERED_INDEX); - return FALSE; + + if (table->s->primary_key == MAX_KEY) + return false; + + /* + NOTE 1: our ordered indexes are not really clustered + but since accesing data when scanning index is free + it's a good approximation + + NOTE 2: We really should consider DD attributes here too + (for which there is IO to read data when scanning index) + but that will need to be handled later... + */ + const ndb_index_type idx_type = + get_index_type_from_table(table->s->primary_key); + return (idx_type == PRIMARY_KEY_ORDERED_INDEX || + idx_type == UNIQUE_ORDERED_INDEX || + idx_type == ORDERED_INDEX); } bool ha_ndbcluster::check_index_fields_in_write_set(uint keyno) @@ -3177,6 +3178,7 @@ 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)) { // Is parent of pushed join @@ -3210,6 +3212,7 @@ int ha_ndbcluster::pk_read(const uchar * } } else +#endif { if (m_pushed_join_operation == PUSHED_ROOT) { @@ -3591,6 +3594,7 @@ 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)) { DBUG_ASSERT(lm == NdbOperation::LM_CommittedRead); @@ -3621,6 +3625,7 @@ int ha_ndbcluster::unique_index_read(con } } else +#endif { if (m_pushed_join_operation == PUSHED_ROOT) { @@ -3981,6 +3986,7 @@ 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) @@ -4060,8 +4066,9 @@ ha_ndbcluster::pk_unique_index_read_key_ const int ret= create_pushed_join(paramValues, key_def->key_parts); DBUG_RETURN(ret); -} // ha_ndbcluster::pk_unique_index_read_key_pushed +} +#endif /** Count number of columns in key part. */ static uint @@ -4223,6 +4230,7 @@ int ha_ndbcluster::ordered_index_scan(co pbound = &bound; } +#ifndef NDB_WITHOUT_JOIN_PUSHDOWN if (check_if_pushable(NdbQueryOperationDef::OrderedIndexScan, active_index, sorted)) { @@ -4251,7 +4259,8 @@ int ha_ndbcluster::ordered_index_scan(co DBUG_ASSERT(!uses_blob_value(table->read_set)); // Can't have BLOB in pushed joins (yet) } - else // if (check_if_pushable(NdbQueryOperationDef::OrderedIndexScan)) + else +#endif { if (m_pushed_join_operation == PUSHED_ROOT) { @@ -4416,6 +4425,7 @@ 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(); @@ -4425,7 +4435,8 @@ int ha_ndbcluster::full_table_scan(const m_thd_ndb->m_scan_count++; DBUG_ASSERT(!uses_blob_value(table->read_set)); // Can't have BLOB in pushed joins (yet) } - else // if (check_if_pushable(NdbQueryOperationDef::TableScan)) + else +#endif { if (m_pushed_join_operation == PUSHED_ROOT) { @@ -6474,11 +6485,7 @@ int ha_ndbcluster::index_first(uchar *bu // Start the ordered index scan and fetch the first row // Only HA_READ_ORDER indexes get called by index_first -#ifdef MCP_BUG11764737 - const int error= ordered_index_scan(0, 0, TRUE, FALSE, buf, NULL); -#else const int error= ordered_index_scan(0, 0, m_sorted, FALSE, buf, NULL); -#endif table->status=error ? STATUS_NOT_FOUND: 0; DBUG_RETURN(error); } @@ -6488,11 +6495,7 @@ int ha_ndbcluster::index_last(uchar *buf { DBUG_ENTER("ha_ndbcluster::index_last"); ha_statistic_increment(&SSV::ha_read_last_count); -#ifdef MCP_BUG11764737 - const int error= ordered_index_scan(0, 0, TRUE, TRUE, buf, NULL); -#else const int error= ordered_index_scan(0, 0, m_sorted, TRUE, buf, NULL); -#endif table->status=error ? STATUS_NOT_FOUND: 0; DBUG_RETURN(error); } @@ -7220,6 +7223,7 @@ 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 { @@ -7228,6 +7232,7 @@ 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 @@ -10615,8 +10620,6 @@ ha_ndbcluster::~ha_ndbcluster() release_blobs_buffer(); // Check for open cursor/transaction - DBUG_ASSERT(m_active_cursor == NULL); - DBUG_ASSERT(m_active_query == NULL); DBUG_ASSERT(m_thd_ndb == NULL); // Discard any generated condition @@ -10627,12 +10630,15 @@ 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) { delete m_pushed_join_member; // Also delete QueryDef } m_pushed_join_member= NULL; +#endif DBUG_VOID_RETURN; } @@ -11853,7 +11859,9 @@ 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 } // Initialize ndb interface @@ -13786,6 +13794,7 @@ ha_ndbcluster::read_multi_range_first(KE break; } +#ifndef NDB_WITHOUT_JOIN_PUSHDOWN /* Create the scan operation for the first scan range. */ if (check_if_pushable(NdbQueryOperationDef::OrderedIndexScan, active_index, @@ -13802,9 +13811,10 @@ ha_ndbcluster::read_multi_range_first(KE query->getQueryOperation((uint)PUSHED_ROOT)->setOrdering(NdbQueryOptions::ScanOrdering_ascending)) ERR_RETURN(query->getNdbError()); } - } // check_if_pushable() - - else if (!m_multi_cursor) + } + else +#endif + if (!m_multi_cursor) { if (m_pushed_join_operation == PUSHED_ROOT) { @@ -14300,7 +14310,7 @@ ha_ndbcluster::read_multi_range_fetch_ne } #endif -#ifndef NO_PUSHED_JOIN +#ifndef NDB_WITHOUT_JOIN_PUSHDOWN /** * Try to find pushable subsets of a join plan. @@ -14356,8 +14366,10 @@ int ndbcluster_make_pushed_join(handlert } } DBUG_RETURN(0); -} // ndbcluster_make_pushed_join - +} +#endif + + /** * In case a pushed join having the table for this handler as its root * has been produced. ::assign_pushed_join() is responsible for setting @@ -14383,7 +14395,7 @@ ha_ndbcluster::assign_pushed_join(const pushed_join->get_operation_count()-1)); DBUG_RETURN(0); -} // ha_ndbcluster::assign_pushed_join() +} /** @@ -14426,7 +14438,7 @@ ha_ndbcluster::maybe_pushable_join(const } return true; -} // ha_ndbcluster::is_pushable() +} /** * Check if this table access operation (and a number of succeding operation) @@ -14442,6 +14454,7 @@ 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, @@ -14500,7 +14513,8 @@ ha_ndbcluster::create_pushed_join(const m_thd_ndb->m_pushed_queries_executed++; DBUG_RETURN(0); -} // ha_ndbcluster::create_pushed_join +} +#endif /** @@ -14640,7 +14654,6 @@ ha_ndbcluster::test_push_flag(enum ha_pu DBUG_RETURN(false); } -#endif /** @param[in] comment table comment defined by user === modified file 'sql/ha_ndbcluster.h' --- a/sql/ha_ndbcluster.h 2011-09-23 12:53:33 +0000 +++ b/sql/ha_ndbcluster.h 2011-09-30 10:24:10 +0000 @@ -21,10 +21,6 @@ */ -#ifdef USE_PRAGMA_INTERFACE -#pragma interface /* gcc class implementation */ -#endif - /* Blob tables and events are internal to NDB and must never be accessed */ #define IS_NDB_BLOB_PREFIX(A) is_prefix(A, "NDB$BLOB") @@ -425,6 +421,13 @@ static void set_tabname(const char *path bool maybe_pushable_join(const char*& reason) const; int assign_pushed_join(const ndb_pushed_join* pushed_join); +#ifdef NDB_WITHOUT_JOIN_PUSHDOWN + enum ha_push_flag { + HA_PUSH_BLOCK_CONST_TABLE, + HA_PUSH_MULTIPLE_DEPENDENCY, + HA_PUSH_NO_ORDERED_INDEX + }; +#endif bool test_push_flag(enum ha_push_flag flag) const; uint number_of_pushed_joins() const; === modified file 'sql/ha_ndbcluster_binlog.cc' --- a/sql/ha_ndbcluster_binlog.cc 2011-09-23 12:53:33 +0000 +++ b/sql/ha_ndbcluster_binlog.cc 2011-09-28 14:58:56 +0000 @@ -644,6 +644,7 @@ ndbcluster_binlog_index_purge_file(THD * } +#ifndef NDB_WITHOUT_DIST_PRIV // Determine if privilege tables are distributed, ie. stored in NDB static bool priv_tables_are_in_ndb(THD *thd) @@ -679,7 +680,7 @@ priv_tables_are_in_ndb(THD *thd) } DBUG_RETURN(distributed); } - +#endif static void ndbcluster_binlog_log_query(handlerton *hton, THD *thd, enum_binlog_command binlog_command, @@ -731,6 +732,7 @@ ndbcluster_binlog_log_query(handlerton * type= SOT_DROP_DB; DBUG_ASSERT(FALSE); break; +#ifndef NDB_WITHOUT_DIST_PRIV case LOGCOM_CREATE_USER: type= SOT_CREATE_USER; if (priv_tables_are_in_ndb(thd)) @@ -771,6 +773,7 @@ ndbcluster_binlog_log_query(handlerton * log= 1; } break; +#endif } if (log) { === modified file 'sql/ha_ndbcluster_cond.cc' --- a/sql/ha_ndbcluster_cond.cc 2011-09-07 10:08:09 +0000 +++ b/sql/ha_ndbcluster_cond.cc 2011-09-30 10:24:10 +0000 @@ -20,10 +20,6 @@ This file defines the NDB Cluster handler engine_condition_pushdown */ -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - #include "ha_ndbcluster_glue.h" #ifdef WITH_NDBCLUSTER_STORAGE_ENGINE === modified file 'sql/ha_ndbcluster_cond.h' --- a/sql/ha_ndbcluster_cond.h 2011-07-08 09:34:07 +0000 +++ b/sql/ha_ndbcluster_cond.h 2011-09-30 10:24:10 +0000 @@ -21,10 +21,6 @@ the NDB Cluster handler */ -#ifdef USE_PRAGMA_INTERFACE -#pragma interface /* gcc class implementation */ -#endif - typedef enum ndb_item_type { NDB_VALUE = 0, // Qualified more with Item::Type NDB_FIELD = 1, // Qualified from table definition === modified file 'sql/ha_ndbcluster_connection.cc' --- a/sql/ha_ndbcluster_connection.cc 2011-07-05 12:46:07 +0000 +++ b/sql/ha_ndbcluster_connection.cc 2011-09-30 10:24:10 +0000 @@ -16,10 +16,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - #include "ha_ndbcluster_glue.h" #ifdef WITH_NDBCLUSTER_STORAGE_ENGINE === modified file 'sql/ha_ndbcluster_push.cc' --- a/sql/ha_ndbcluster_push.cc 2011-09-07 10:08:09 +0000 +++ b/sql/ha_ndbcluster_push.cc 2011-09-30 10:24:10 +0000 @@ -22,14 +22,9 @@ to the ndb data node (for execution by the SPJ block). */ -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif #include "ha_ndbcluster_glue.h" -#include "rpl_mi.h" - #ifdef WITH_NDBCLUSTER_STORAGE_ENGINE #include "ha_ndbcluster.h" @@ -45,12 +40,6 @@ #include - -#ifdef ndb_dynamite -#undef assert -#define assert(x) do { if(x) break; ::printf("%s %d: assert failed: %s\n", __FILE__, __LINE__, #x); ::fflush(stdout); ::signal(SIGABRT,SIG_DFL); ::abort(); ::kill(::getpid(),6); ::kill(::getpid(),9); } while (0) -#endif - #define EXPLAIN_NO_PUSH(msgfmt, ...) \ do \ { \ === modified file 'sql/ha_ndbcluster_push.h' --- a/sql/ha_ndbcluster_push.h 2011-07-04 08:38:03 +0000 +++ b/sql/ha_ndbcluster_push.h 2011-09-30 10:24:10 +0000 @@ -15,10 +15,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifdef USE_PRAGMA_INTERFACE -#pragma interface /* gcc class implementation */ -#endif - #include "sql_bitmap.h" class NdbTransaction; === modified file 'sql/ha_partition.h' --- a/sql/ha_partition.h 2011-09-07 10:08:09 +0000 +++ b/sql/ha_partition.h 2011-09-28 10:00:58 +0000 @@ -177,11 +177,7 @@ private: MY_BITMAP m_locked_partitions; public: handler *clone(const char *name, MEM_ROOT *mem_root); -#ifndef MCP_BUG56438 virtual void set_part_info(partition_info *part_info, bool early) -#else - virtual void set_part_info(partition_info *part_info) -#endif { m_part_info= part_info; m_is_sub_partitioned= part_info->is_sub_partitioned(); === modified file 'sql/handler.cc' --- a/sql/handler.cc 2011-09-27 12:11:16 +0000 +++ b/sql/handler.cc 2011-09-28 08:56:16 +0000 @@ -4850,7 +4850,7 @@ void ha_binlog_log_query(THD *thd, handl #endif -#ifndef MC_GLOBAL_SCHEMA_LOCK +#ifndef MCP_GLOBAL_SCHEMA_LOCK /** Fill list of htons which are initialized and have the global_schema_func set */ === modified file 'sql/handler.h' --- a/sql/handler.h 2011-09-23 10:44:30 +0000 +++ b/sql/handler.h 2011-09-28 18:53:09 +0000 @@ -243,13 +243,7 @@ typedef Bitmap HA_AL #define HA_KEY_SCAN_NOT_ROR 128 #define HA_DO_INDEX_COND_PUSHDOWN 256 /* Supports Index Condition Pushdown */ -#ifndef MCP_WL4784 -/* - no IO if read data when scan index - i.e index is covering -*/ -#define HA_CLUSTERED_INDEX 512 -#endif + /* bits in alter_table_flags: === modified file 'sql/rpl_injector.h' --- a/sql/rpl_injector.h 2011-09-07 10:08:09 +0000 +++ b/sql/rpl_injector.h 2011-09-28 09:12:47 +0000 @@ -193,9 +193,6 @@ public: use_table() is called after any *_row() function has been called for the transaction. - The caller is responsible for filtering out table map events - which shouldn't be included due to binlog_do/ignore db. - RETURN VALUE 0 All OK === modified file 'sql/rpl_mi.cc' --- a/sql/rpl_mi.cc 2011-09-07 10:08:09 +0000 +++ b/sql/rpl_mi.cc 2011-09-28 10:27:22 +0000 @@ -116,10 +116,6 @@ Master_info::Master_info( ssl_crl[0]= 0; ssl_crlpath[0]= 0; master_uuid[0]= 0; ignore_server_ids= new Server_ids(sizeof(::server_id)); - -#ifndef MCP_WL4080 - master_epoch= 0; -#endif } Master_info::~Master_info() === modified file 'sql/rpl_mi.h' --- a/sql/rpl_mi.h 2011-09-07 10:08:09 +0000 +++ b/sql/rpl_mi.h 2011-09-28 10:21:55 +0000 @@ -109,10 +109,6 @@ public: char master_uuid[UUID_LENGTH+1]; char bind_addr[HOSTNAME_LENGTH+1]; -#ifndef MCP_WL4080 - uint64 master_epoch; -#endif - int init_info(); void end_info(); int flush_info(bool force= FALSE); === modified file 'sql/rpl_reporting.cc' --- a/sql/rpl_reporting.cc 2011-09-07 10:08:09 +0000 +++ b/sql/rpl_reporting.cc 2011-09-28 10:21:55 +0000 @@ -79,9 +79,14 @@ int Slave_reporting_capability::has_temp /* currently temporary error set in ndbcluster */ +#ifndef MCP_FIX_COMPILER_ERROR_INSIDE_HAVE_NDB_BINLOG Diagnostics_area::Sql_condition_iterator it= thd->get_stmt_da()->sql_conditions(); const Sql_condition *err; +#else + List_iterator_fast it(thd->warning_info->warn_list()); + Sql_condition *err; +#endif while ((err= it++)) { DBUG_PRINT("info", ("has condition %d %s", err->get_sql_errno(), === modified file 'sql/sql_select.cc' --- a/sql/sql_select.cc 2011-09-27 12:11:16 +0000 +++ b/sql/sql_select.cc 2011-09-28 08:59:31 +0000 @@ -281,7 +281,7 @@ Item_equal *find_item_equal(COND_EQUAL * /** This class determines the optimal join order for tables within a basic query block, ie a query specification clause, possibly extended - / with semi-joined tables from embedded subqueries. + with semi-joined tables from embedded subqueries. This class takes as prerequisite a join class where all dependencies among tables have been sorted out, all possible access paths have been === modified file 'sql/table.cc' --- a/sql/table.cc 2011-09-23 10:44:30 +0000 +++ b/sql/table.cc 2011-09-28 10:34:58 +0000 @@ -2145,7 +2145,6 @@ int open_table_from_share(THD *thd, TABL #else tmp= fix_partition_func(thd, outparam, is_create_table); #endif - outparam->part_info->item_free_list= part_func_arena.free_list; } outparam->part_info->item_free_list= part_func_arena.free_list; partititon_err: === modified file 'storage/archive/archive_reader.c' --- a/storage/archive/archive_reader.c 2011-09-07 10:08:09 +0000 +++ b/storage/archive/archive_reader.c 2011-09-28 07:08:07 +0000 @@ -1,3 +1,18 @@ +/* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. + + 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. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + 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 */ + #include "azlib.h" #include #include === modified file 'storage/ndb/CMakeLists.txt' --- a/storage/ndb/CMakeLists.txt 2011-09-23 12:53:33 +0000 +++ b/storage/ndb/CMakeLists.txt 2011-09-30 10:24:10 +0000 @@ -87,6 +87,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) ENDIF() # NDB is DEFAULT plugin in MySQL Cluster No bundle (reason: useless for push emails).