3383 magnus.blaudd@stripped 2011-09-28
remove compiler warnings ignored by Cluster team
modified:
support-files/compiler_warnings.supp
3382 magnus.blaudd@stripped 2011-09-28 [merge]
Merge trunk-cluster -> trunk-cluster-merge
modified:
sql/binlog.cc
sql/ha_partition.h
sql/rpl_mi.cc
sql/rpl_mi.h
sql/rpl_reporting.cc
sql/table.cc
3381 magnus.blaudd@stripped 2011-09-28 [merge]
Merge trunk-cluster -> trunk-cluster-merge
modified:
cmake/configure.pl
3380 magnus.blaudd@stripped 2011-09-28 [merge]
Merge trunk-cluster -> trunk-cluster-merge
modified:
sql/rpl_injector.h
sql/sql_select.cc
3379 magnus.blaudd@stripped 2011-09-28
MCP
- remove MCP patch for WL#6004
modified:
sql/handler.h
sql/sql_acl.cc
3378 magnus.blaudd@stripped 2011-09-28
remove another extra newline
modified:
sql/sql_update.cc
3377 magnus.blaudd@stripped 2011-09-28
remove extra newline
modified:
sql/sql_truncate.cc
3376 magnus.blaudd@stripped 2011-09-28 [merge]
Merge trunk-cluster -> trunk-cluster-merge
modified:
sql/handler.cc
3375 magnus.blaudd@stripped 2011-09-28
remove extra newline
modified:
sql/handler.cc
3374 magnus.blaudd@stripped 2011-09-28
MCP
- remove MCP patch for WL#5906
modified:
sql/handler.h
sql/sql_delete.cc
sql/sql_update.cc
3373 magnus.blaudd@stripped 2011-09-28
MCP
- remove MCP patch for WL4784
removed:
sql/abstract_query_plan.cc
sql/abstract_query_plan.h
modified:
sql/CMakeLists.txt
sql/handler.cc
sql/handler.h
sql/opt_explain.cc
sql/sql_select.cc
sql/sql_select.h
3372 magnus.blaudd@stripped 2011-09-28 [merge]
Merge trunk-cluster -> trunk-cluster-merge
modified:
include/my_base.h
3371 magnus.blaudd@stripped 2011-09-28 [merge]
Merge trunk-cluster -> trunk-cluster-merge
modified:
storage/archive/archive_reader.c
3370 magnus.blaudd@stripped 2011-09-27 [merge]
Merge trunk-cluster -> trunk-cluster-merge
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 13:38:39 +0000
+++ b/include/my_base.h 2011-09-28 08:00:32 +0000
@@ -556,10 +556,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/CMakeLists.txt'
--- a/sql/CMakeLists.txt 2011-09-27 12:11:16 +0000
+++ b/sql/CMakeLists.txt 2011-09-28 08:33:28 +0000
@@ -37,7 +37,6 @@ IF(SSL_DEFINES)
ENDIF()
SET(SQL_SHARED_SOURCES
- abstract_query_plan.cc # MCP_WL4784
datadict.cc
debug_sync.cc
derror.cc
=== removed 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 1970-01-01 00:00:00 +0000
@@ -1,559 +0,0 @@
-/*
- Copyright 2010 Sun Microsystems, Inc.
- All rights reserved. Use is subject to license terms.
-
- 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
-*/
-
-#ifdef USE_PRAGMA_IMPLEMENTATION
-#pragma implementation // gcc: Class implementation
-#endif
-
-#include "sql_priv.h"
-#include "sql_select.h"
-#include "abstract_query_plan.h"
-
-
-
-namespace AQP
-{
-
- /**
- @param join_tab Array of access methods constituting the nested loop join.
- @param access_count Length of array.
- */
- Join_plan::Join_plan(const JOIN* join)
- : m_join_tabs(join->join_tab),
- m_access_count(join->tables),
- m_table_accesses(NULL)
- {
- /*
- This combination is assumed not to appear. If it does, code must
- be written to handle it.
- */
- DBUG_ASSERT((m_join_tabs[0].use_quick != 2)
- || (m_join_tabs[0].type == JT_ALL)
- || (m_join_tabs[0].select == NULL)
- || (m_join_tabs[0].select->quick == NULL));
-
- m_table_accesses= new Table_access[m_access_count];
- for(uint i= 0; i < m_access_count; i++)
- {
- m_table_accesses[i].m_join_plan= this;
- m_table_accesses[i].m_tab_no= i;
- }
- }
-
- Join_plan::~Join_plan()
- {
- delete[] m_table_accesses;
- m_table_accesses= NULL;
- }
-
- /** Get the JOIN_TAB of the n'th table access operation.*/
- const JOIN_TAB* Join_plan::get_join_tab(uint join_tab_no) const
- {
- DBUG_ASSERT(join_tab_no < m_access_count);
- return m_join_tabs + join_tab_no;
- }
-
- void
- Join_plan::find_skippabable_group_or_order() const
- {
- const
- JOIN* const join= m_join_tabs->join;
-
- if (join->const_tables < join->tables)
- {
- JOIN_TAB* join_head= join->join_tab+join->const_tables;
-
- m_group_by_filesort_is_skippable= join->group_optimized_away;
- m_order_by_filesort_is_skippable= join->skip_sort_order;
-
- /* A single row don't have to be sorted */
- if (join_head->type == JT_CONST ||
- join_head->type == JT_SYSTEM ||
- join_head->type == JT_EQ_REF)
- {
- m_group_by_filesort_is_skippable= true;
- m_order_by_filesort_is_skippable= true;
- }
- else if (join->select_options & SELECT_BIG_RESULT)
- {
- /* Excluded from ordered index optimization */
- }
- else if (join->group_list && !m_group_by_filesort_is_skippable)
- {
- if (!join->tmp_table_param.quick_group || join->procedure)
- {
- /* Unsure how to handle - Is disabled in ::compute_type_and_index() */
- }
- if (join->simple_group)
- {
- /**
- test_if_skip_sort_order(...group_list...) already done by JOIN::optimize().
- As we still have a 'simple_group', GROUP BY has been optimized through an
- access path providing an ordered sequence as required by GROUP BY:
-
- Verify this assumption in ASSERT below:
- */
- DBUG_ASSERT(test_if_skip_sort_order(join_head, join->group_list,
- join->unit->select_limit_cnt, true,
- &join_head->table->keys_in_use_for_group_by));
- m_group_by_filesort_is_skippable= true;
- }
- }
- else if (join->order && !m_order_by_filesort_is_skippable)
- {
- if (join->simple_order)
- {
- m_order_by_filesort_is_skippable=
- test_if_skip_sort_order(join_head,
- join->order,
- join->unit->select_limit_cnt, false,
- &join_head->table->keys_in_use_for_order_by);
- }
- }
- }
- }
-
- bool
- Join_plan::group_by_filesort_is_skippable() const
- {
- return (m_group_by_filesort_is_skippable == true);
- }
-
- bool
- Join_plan::order_by_filesort_is_skippable() const
- {
- return (m_order_by_filesort_is_skippable == true);
- }
-
- /**
- Determine join type between this table access and some other table
- access that preceeds it in the join plan..
- */
- enum_join_type
- Table_access::get_join_type(const Table_access* predecessor) const
- {
- DBUG_ENTER("get_join_type");
- DBUG_ASSERT(get_access_no() > predecessor->get_access_no());
-
- if (get_join_tab()->table->pos_in_table_list->outer_join != 0)
- {
- /*
- This cover unnested outer joins such as
- 'select * from t1 left join t2 on t1.attr=t1.pk'.
- */
- DBUG_PRINT("info", ("JT_OUTER_JOIN between %s and %s",
- predecessor->get_join_tab()->table->alias,
- get_join_tab()->table->alias));
- DBUG_RETURN(JT_OUTER_JOIN);
- }
-
- const TABLE_LIST* const child_embedding=
- get_join_tab()->table->pos_in_table_list->embedding;
-
- if (child_embedding == NULL)
- {
- // 'this' is not on the inner side of any left join.
- DBUG_PRINT("info", ("JT_INNER_JOIN between %s and %s",
- predecessor->get_join_tab()->table->alias,
- get_join_tab()->table->alias));
- DBUG_RETURN(JT_INNER_JOIN);
- }
-
- DBUG_ASSERT(child_embedding->outer_join != 0);
-
- const TABLE_LIST *predecessor_embedding=
- predecessor->get_join_tab()->table->pos_in_table_list->embedding;
-
- /*
- This covers the nested join case, i.e:
- <table reference> LEFT JOIN (<joined table>).
-
- TABLE_LIST objects form a tree where TABLE_LIST::emebedding points to
- the parent object. Now if child_embedding is non null and not an
- ancestor of predecessor_embedding in the embedding tree, then 'this'
- must be on the inner side of some left join where 'predecessor' is on
- the outer side.
- */
- while (true)
- {
- if (predecessor_embedding == child_embedding)
- {
- DBUG_PRINT("info", ("JT_INNER_JOIN between %s and %s",
- predecessor->get_join_tab()->table->alias,
- get_join_tab()->table->alias));
- DBUG_RETURN(JT_INNER_JOIN);
- }
- else if (predecessor_embedding == NULL)
- {
- /*
- We reached the root of the tree without finding child_embedding,
- so it must be in another branch and hence on the inner side of some
- left join where 'predecessor' is on the outer side.
- */
- DBUG_PRINT("info", ("JT_OUTER_JOIN between %s and %s",
- predecessor->get_join_tab()->table->alias,
- get_join_tab()->table->alias));
- DBUG_RETURN(JT_OUTER_JOIN);
- }
- // Iterate through ancestors of predecessor_embedding.
- predecessor_embedding = predecessor_embedding->embedding;
- }
- }
-
- /**
- Get the number of key values for this operation. It is an error
- to call this method on an operation that is not an index lookup
- operation.
- */
- uint Table_access::get_no_of_key_fields() const
- {
- DBUG_ASSERT(m_access_type == AT_PRIMARY_KEY ||
- m_access_type == AT_UNIQUE_KEY ||
- m_access_type == AT_MULTI_PRIMARY_KEY ||
- m_access_type == AT_MULTI_UNIQUE_KEY ||
- m_access_type == AT_ORDERED_INDEX_SCAN); // Used as 'range scan'
- return get_join_tab()->ref.key_parts;
- }
-
- /**
- Get the field_no'th key values for this operation. It is an error
- to call this method on an operation that is not an index lookup
- operation.
- */
- const Item* Table_access::get_key_field(uint field_no) const
- {
- DBUG_ASSERT(field_no < get_no_of_key_fields());
- return get_join_tab()->ref.items[field_no];
- }
-
- /**
- Get the field_no'th KEY_PART_INFO for this operation. It is an error
- to call this method on an operation that is not an index lookup
- operation.
- */
- const KEY_PART_INFO* Table_access::get_key_part_info(uint field_no) const
- {
- DBUG_ASSERT(field_no < get_no_of_key_fields());
- const KEY* key= &get_join_tab()->table->key_info[get_join_tab()->ref.key];
- return &key->key_part[field_no];
- }
-
- /**
- Get the table that this operation accesses.
- */
- TABLE* Table_access::get_table() const
- {
- return get_join_tab()->table;
- }
-
- /** Get the JOIN_TAB object that corresponds to this operation.*/
- const JOIN_TAB* Table_access::get_join_tab() const
- {
- return m_join_plan->get_join_tab(m_tab_no);
- }
-
- /** Get the Item_equal's set relevant for the specified 'Item_field' */
- Item_equal*
- Table_access::get_item_equal(const Item_field* field_item) const
- {
- DBUG_ASSERT(field_item->type() == Item::FIELD_ITEM);
-
- COND_EQUAL* const cond_equal = get_join_tab()->join->cond_equal;
- if (cond_equal!=NULL)
- {
- return (field_item->item_equal != NULL)
- ? field_item->item_equal
- : const_cast<Item_field*>(field_item)->find_item_equal(cond_equal);
- }
- return NULL;
- }
-
- /**
- Write an entry in the trace file about the contents of this object.
- */
- void Table_access::dbug_print() const
- {
- DBUG_PRINT("info", ("type:%d", get_join_tab()->type));
- DBUG_PRINT("info", ("ref.key:%d", get_join_tab()->ref.key));
- DBUG_PRINT("info", ("ref.key_parts:%d", get_join_tab()->ref.key_parts));
- DBUG_PRINT("info", ("ref.key_length:%d", get_join_tab()->ref.key_length));
-
- DBUG_PRINT("info", ("order:%p", get_join_tab()->join->order));
- DBUG_PRINT("info", ("skip_sort_order:%d",
- get_join_tab()->join->skip_sort_order));
- DBUG_PRINT("info", ("no_order:%d", get_join_tab()->join->no_order));
- DBUG_PRINT("info", ("simple_order:%d", get_join_tab()->join->simple_order));
-
- DBUG_PRINT("info", ("group:%d", get_join_tab()->join->group));
- DBUG_PRINT("info", ("group_list:%p", get_join_tab()->join->group_list));
- DBUG_PRINT("info", ("simple_group:%d", get_join_tab()->join->simple_group));
- DBUG_PRINT("info", ("group_optimized_away:%d",
- get_join_tab()->join->group_optimized_away));
-
- DBUG_PRINT("info", ("full_join:%d", get_join_tab()->join->full_join));
- DBUG_PRINT("info", ("need_tmp:%d", get_join_tab()->join->need_tmp));
- DBUG_PRINT("info", ("select_distinct:%d",
- get_join_tab()->join->select_distinct));
-
- DBUG_PRINT("info", ("use_quick:%d", get_join_tab()->use_quick));
- DBUG_PRINT("info", ("index:%d", get_join_tab()->index));
- DBUG_PRINT("info", ("quick:%p", get_join_tab()->quick));
- DBUG_PRINT("info", ("select:%p", get_join_tab()->select));
- if (get_join_tab()->select && get_join_tab()->select->quick)
- {
- DBUG_PRINT("info", ("select->quick->get_type():%d",
- get_join_tab()->select->quick->get_type()));
- }
- }
-
-
- /**
- Compute the access type and index (if apliccable) of this operation .
- */
- void Table_access::compute_type_and_index() const
- {
- DBUG_ENTER("Table_access::compute_type_and_index");
- const JOIN_TAB* const join_tab= get_join_tab();
- JOIN* const join= join_tab->join;
-
- /**
- * There are some JOIN arguments we don't fully understand or has
- * not yet invested time into exploring pushability of:
- */
- if (join->procedure)
- {
- m_access_type= AT_OTHER;
- m_other_access_reason =
- "'PROCEDURE'-clause post processing cannot be pushed.";
- DBUG_VOID_RETURN;
- }
-
- if (join->group_list && !join->tmp_table_param.quick_group)
- {
- m_access_type= AT_OTHER;
- m_other_access_reason =
- "GROUP BY cannot be done using index on grouped columns.";
- DBUG_VOID_RETURN;
- }
-
- /* Tables below 'const_tables' has been const'ified, or entirely
- * optimized away due to 'impossible WHERE/ON'
- */
- if (join_tab < join->join_tab+join->const_tables)
- {
- DBUG_PRINT("info", ("Operation %d is const-optimized.", m_tab_no));
- m_access_type= AT_FIXED;
- DBUG_VOID_RETURN;
- }
-
- /* First non-const table may provide 'simple' ordering for entire join */
- if (join_tab == join->join_tab+join->const_tables)
- {
- m_join_plan->find_skippabable_group_or_order();
- }
-
- /*
- Identify the type of access operation and the index to use (if any).
- */
- switch (join_tab->type)
- {
- case JT_EQ_REF:
- case JT_CONST:
- m_index_no= join_tab->ref.key;
-
- if (m_index_no == static_cast<int>(join_tab->table->s->primary_key))
- {
- DBUG_PRINT("info", ("Operation %d is a primary key lookup.", m_tab_no));
- m_access_type= AT_PRIMARY_KEY;
- }
- else
- {
- DBUG_PRINT("info", ("Operation %d is a unique index lookup.",
- m_tab_no));
- m_access_type= AT_UNIQUE_KEY;
- }
- break;
-
- case JT_REF:
- {
- DBUG_ASSERT(join_tab->ref.key >= 0);
- DBUG_ASSERT(join_tab->ref.key < MAX_KEY);
- m_index_no= join_tab->ref.key;
-
- /*
- All parts of a key are specified for an unique index -> access is a key lookup.
- */
- const KEY *key_info= join_tab->table->s->key_info;
- if (key_info[m_index_no].key_parts == join_tab->ref.key_parts &&
- key_info[m_index_no].flags & HA_NOSAME)
- {
- m_access_type=
- (m_index_no == static_cast<int32>(join_tab->table->s->primary_key))
- ? AT_PRIMARY_KEY
- : AT_UNIQUE_KEY;
- DBUG_PRINT("info", ("Operation %d is an unique key referrence.", m_tab_no));
- }
- else
- {
- DBUG_ASSERT(join_tab->ref.key_parts > 0);
- DBUG_ASSERT(join_tab->ref.key_parts <= key_info[m_index_no].key_parts);
- m_access_type= AT_ORDERED_INDEX_SCAN;
- DBUG_PRINT("info", ("Operation %d is an ordered index scan.", m_tab_no));
- }
- break;
- }
- case JT_NEXT:
- DBUG_ASSERT(join_tab->index < MAX_KEY);
- m_index_no= join_tab->index;
- m_access_type= AT_ORDERED_INDEX_SCAN;
- DBUG_PRINT("info", ("Operation %d is an ordered index scan.", m_tab_no));
- break;
-
- case JT_ALL:
- if (join_tab->use_quick == 2)
- {
- /*
- use_quick == 2 means that the decision on which access method to use
- will be taken late (as rows from the preceeding operation arrive).
- This operation is therefor not pushable.
- */
- DBUG_PRINT("info",
- ("Operation %d has 'use_quick == 2' -> not pushable",
- m_tab_no));
- m_access_type= AT_UNDECIDED;
- m_index_no= -1;
- }
- else
- {
- if (join_tab->select != NULL &&
- join_tab->select->quick != NULL)
- {
- QUICK_SELECT_I *quick= join_tab->select->quick;
-
- /** QUICK_SELECT results in execution of MRR (Multi Range Read).
- * Depending on each range, it may require execution of
- * either a PK-lookup or a range scan. To cover both of
- * these we may need to prepare both a pushed lookup join
- * and a pushed range scan. Currently we handle it as
- * a range scan and convert e PK lookup to a (closed-) range
- * whenever required.
- **/
-
- const KEY *key_info= join_tab->table->s->key_info;
- DBUG_EXECUTE("info", quick->dbug_dump(0, TRUE););
-
- // Temporary assert as we are still investigation the relation between
- // 'quick->index == MAX_KEY' and the different quick_types
- DBUG_ASSERT ((quick->index == MAX_KEY) ==
- ((quick->get_type() == QUICK_SELECT_I::QS_TYPE_INDEX_MERGE) ||
- (quick->get_type() == QUICK_SELECT_I::QS_TYPE_ROR_INTERSECT) ||
- (quick->get_type() == QUICK_SELECT_I::QS_TYPE_ROR_UNION)));
-
- // JT_INDEX_MERGE: We have a set of qualifying PKs as root of pushed joins
- if (quick->index == MAX_KEY)
- {
- m_index_no= join_tab->table->s->primary_key;
- m_access_type= AT_MULTI_PRIMARY_KEY; // Multiple PKs are produced by merge
- }
-
- // Else JT_RANGE: May be both exact PK and/or index scans when sorted index available
- else if (quick->index == join_tab->table->s->primary_key)
- {
- m_index_no= quick->index;
- if (key_info[m_index_no].algorithm == HA_KEY_ALG_HASH)
- m_access_type= AT_MULTI_PRIMARY_KEY; // MRR w/ multiple PK's
- else
- m_access_type= AT_MULTI_MIXED; // MRR w/ both range and PKs
- }
- else
- {
- m_index_no= quick->index;
- if (key_info[m_index_no].algorithm == HA_KEY_ALG_HASH)
- m_access_type= AT_MULTI_UNIQUE_KEY; // MRR with multiple unique keys
- else
- m_access_type= AT_MULTI_MIXED; // MRR w/ both range and unique keys
- }
- }
- else
- {
- DBUG_PRINT("info", ("Operation %d is a table scan.", m_tab_no));
- m_access_type= AT_TABLE_SCAN;
- }
- }
- break;
-
- default:
- /*
- Other join_types either cannot be pushed or the code analyze them is
- not yet in place.
- */
- DBUG_PRINT("info",
- ("Operation %d has join_type %d. -> Not pushable.",
- m_tab_no, join_tab->type));
- m_access_type= AT_OTHER;
- m_index_no= -1;
- m_other_access_reason = "This table access method can not be pushed.";
- break;
- }
- DBUG_VOID_RETURN;
- }
- // Table_access::compute_type_and_index()
-
-
- Table_access::Table_access()
- :m_join_plan(NULL),
- m_tab_no(0),
- m_access_type(AT_VOID),
- m_other_access_reason(NULL),
- m_index_no(-1)
- {}
-
- /**
- @return True iff ordered index access is *required* from this operation.
- */
- bool Table_access::is_fixed_ordered_index() const
- {
- const JOIN_TAB* const join_tab= get_join_tab();
-
- /* For the QUICK_SELECT_I classes we can disable ordered index usage by
- * setting 'QUICK_SELECT_I::sorted = false'.
- * However, QUICK_SELECT_I::QS_TYPE_RANGE_DESC is special as its
- * internal implementation requires its 'multi-ranges' to be retrieved
- * in (descending) sorted order from the underlying table.
- */
- if (join_tab->select != NULL &&
- join_tab->select->quick != NULL)
- {
- QUICK_SELECT_I *quick= join_tab->select->quick;
- return (quick->get_type() == QUICK_SELECT_I::QS_TYPE_RANGE_DESC);
- }
- return false;
- }
-
- /**
- Check if the results from this operation will joined with results
- from the next operation using a join buffer (instead of plain nested loop).
- @return True if using a join buffer.
- */
- bool Table_access::uses_join_cache() const
- {
- return get_join_tab()->next_select == sub_select_cache;
- }
-
-};
-// namespace AQP
=== removed file 'sql/abstract_query_plan.h'
--- a/sql/abstract_query_plan.h 2011-06-23 06:59:40 +0000
+++ b/sql/abstract_query_plan.h 1970-01-01 00:00:00 +0000
@@ -1,315 +0,0 @@
-/*
- Copyright 2010 Sun Microsystems, Inc.
- All rights reserved. Use is subject to license terms.
-
- 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
-*/
-
-#ifndef ABSTRACT_QUERY_PLAN_H_INCLUDED
-#define ABSTRACT_QUERY_PLAN_H_INCLUDED
-
-struct TABLE;
-struct st_join_table;
-typedef st_join_table JOIN_TAB;
-class JOIN;
-class Item;
-class Item_field;
-class Item_equal_iterator;
-
-/**
- Abstract query plan (AQP) is an interface for examining certain aspects of
- query plans without accessing mysqld internal classes (JOIN_TAB, SQL_SELECT
- etc.) directly.
-
- AQP maps join execution plans, as represented by mysqld internals, to a set
- of facade classes. Non-join operations such as sorting and aggregation is
- currently *not* modelled in the AQP.
-
- The AQP models an n-way join as a sequence of the n table access operations
- that the MySQL server would execute as part of its nested loop join
- execution. (Each such table access operation is a scan of a table or index,
- or an index lookup.) For each lookup operation, it is possible to examine
- the expression that represents each field in the key.
-
- A storage enging will typically use the AQP for finding sections of a join
- execution plan that may be executed in the engine rather than in mysqld. By
- using the AQP rather than the mysqld internals directly, the coupling between
- the engine and mysqld is reduced.
-*/
-namespace AQP
-{
- class Table_access;
-
- /**
- This class represents a query plan for an n-way join, in the form a
- sequence of n table access operations that will execute as a nested loop
- join.
- */
- class Join_plan
- {
- friend class Equal_set_iterator;
- friend class Table_access;
- public:
-
- explicit Join_plan(const JOIN* join);
-
- ~Join_plan();
-
- const Table_access* get_table_access(uint access_no) const;
-
- uint get_access_count() const;
-
- /**
- Can filesort(), normally required by execution of GROUP BY
- or ORDER BY, be skipped due to the columns already being
- accessible in required sorted order.
- */
- bool group_by_filesort_is_skippable() const;
- bool order_by_filesort_is_skippable() const;
-
- private:
- /**
- Array of the JOIN_TABs that are the internal representation of table
- access operations.
- */
- const JOIN_TAB* const m_join_tabs;
-
- /** Number of table access operations. */
- const uint m_access_count;
- Table_access* m_table_accesses;
-
- mutable bool m_group_by_filesort_is_skippable;
- mutable bool m_order_by_filesort_is_skippable;
-
- void find_skippabable_group_or_order() const;
-
- const JOIN_TAB* get_join_tab(uint join_tab_no) const;
-
- // No copying.
- Join_plan(const Join_plan&);
- Join_plan& operator=(const Join_plan&);
- };
- // class Join_plan
-
-
- /**
- This class is an iterator for iterating over sets of fields (columns) that
- should have the same value. For example, if the query is
- SELECT * FROM T1, T2, T3 WHERE T1.b = T2.a AND T2.a = T3.a
- then there would be such a set of {T1.b, T2.a, T3.a}.
- */
- class Equal_set_iterator
- {
- public:
- explicit Equal_set_iterator(Item_equal& item_equal)
- : m_iterator(item_equal) {}
-
- const Item_field* next()
- { return m_iterator++; }
-
- private:
- /**
- This class is implemented in terms of this mysqld internal class.
- */
- Item_equal_iterator m_iterator;
-
- // No copying.
- Equal_set_iterator(const Equal_set_iterator&);
- Equal_set_iterator& operator=(const Equal_set_iterator&);
- };
- // class Equal_set_iterator
-
- /** The type of a table access operation. */
- enum enum_access_type
- {
- /** For default initialization.*/
- AT_VOID,
- /** Value has already been fetched / determined by optimizer.*/
- AT_FIXED,
- /** Do a lookup of a single primary key.*/
- AT_PRIMARY_KEY,
- /** Do a lookup of a single unique index key.*/
- AT_UNIQUE_KEY,
- /** Scan an ordered index with a single upper and lower bound pair.*/
- AT_ORDERED_INDEX_SCAN,
- /** Do a multi range read for a set of primary keys.*/
- AT_MULTI_PRIMARY_KEY,
- /** Do a multi range read for a set of unique index keys.*/
- AT_MULTI_UNIQUE_KEY,
- /**
- Do a multi range read for a mix of ranges (for which there is an
- ordered index), and either primary keys or unique index keys.
- */
- AT_MULTI_MIXED,
- /** Scan a table. (No index is assumed to be used.) */
- AT_TABLE_SCAN,
- /** Access method will not be chosen before the execution phase.*/
- AT_UNDECIDED,
- /**
- The access method has properties that prevents it from being pushed to a
- storage engine.
- */
- AT_OTHER
- };
-
- /** The type of join operation require */
- enum enum_join_type
- {
- JT_OUTER_JOIN,
- JT_INNER_JOIN,
- JT_SEMI_JOIN
- };
-
- /**
- This class represents an access operation on a table, such as a table
- scan, or a scan or lookup via an index. A Table_access object is always
- owned by a Join_plan object, such that the life time of the Table_access
- object ends when the life time of the owning Join_plan object ends.
- */
- class Table_access
- {
- friend class Join_plan;
- friend inline bool equal(const Table_access*, const Table_access*);
- public:
-
- const Join_plan* get_join_plan() const;
-
- enum_access_type get_access_type() const;
-
- const char* get_other_access_reason() const;
-
- enum_join_type get_join_type(const Table_access* parent) const;
-
- uint get_no_of_key_fields() const;
-
- const Item* get_key_field(uint field_no) const;
-
- const KEY_PART_INFO* get_key_part_info(uint field_no) const;
-
- uint get_access_no() const;
-
- int get_index_no() const;
-
- TABLE* get_table() const;
-
- Item_equal* get_item_equal(const Item_field* field_item) const;
-
- void dbug_print() const;
-
- bool is_fixed_ordered_index() const;
-
- bool uses_join_cache() const;
-
- private:
-
- /** Backref. to the Join_plan which this Table_access is part of */
- const Join_plan* m_join_plan;
-
- /** This operation corresponds to m_root_tab[m_tab_no].*/
- uint m_tab_no;
-
- /** The type of this operation.*/
- mutable enum_access_type m_access_type;
-
- /**
- The reason for getting m_access_type==AT_OTHER. Used for explain extended.
- */
- mutable const char* m_other_access_reason;
-
- /** The index to use for this operation (if applicable )*/
- mutable int m_index_no;
-
- explicit Table_access();
-
- const JOIN_TAB* get_join_tab() const;
-
- void compute_type_and_index() const;
-
- /** No copying*/
- Table_access(const Table_access&);
- Table_access& operator=(const Table_access&);
- };
- // class Table_access
-
- /**
- Get the n'th table access operation.
- @param access_no The index of the table access operation to fetch.
- @return The access_no'th table access operation.
- */
- inline const Table_access* Join_plan::get_table_access(uint access_no) const
- {
- DBUG_ASSERT(access_no < m_access_count);
- return m_table_accesses + access_no;
- }
-
- /**
- @return The number of table access operations in the nested loop join.
- */
- inline uint Join_plan::get_access_count() const
- {
- return m_access_count;
- }
-
- /** Get the Join_plan that this Table_access belongs to.*/
- inline const Join_plan* Table_access::get_join_plan() const
- {
- return m_join_plan;
- }
-
- /** Get the type of this operation.*/
- inline enum_access_type Table_access::get_access_type() const
- {
- if (m_access_type == AT_VOID)
- compute_type_and_index();
- return m_access_type;
- }
-
- /**
- Get a description of the reason for getting access_type==AT_OTHER. To be
- used for informational messages.
- @return A string that should be assumed to have the same life time as the
- Table_access object.
- */
- inline const char* Table_access::get_other_access_reason() const
- {
- if (m_access_type == AT_VOID)
- compute_type_and_index();
- return m_other_access_reason;
- }
-
- /**
- @return The number of the index to use for this access operation (
- or -1 for non-index operations).
- */
- inline int Table_access::get_index_no() const
- {
- if (m_access_type == AT_VOID)
- compute_type_and_index();
-
- return m_index_no;
- }
-
- /**
- Get the number of this Table_access within the enclosing Join_plan.
- (This number will be in the range 0 to Join_plan::get_access_count() - 1.)
- */
- inline uint Table_access::get_access_no() const
- {
- return m_tab_no;
- }
-
-};
-// namespace AQP
-
-#endif
=== 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_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 13:38:39 +0000
+++ b/sql/handler.cc 2011-09-28 08:58:03 +0000
@@ -4337,29 +4337,6 @@ int ha_table_exists_in_engine(THD* thd,
DBUG_RETURN(args.err);
}
-#ifndef MCP_WL4784
-/**
- Prepare (sub-) sequences of joins in this statement
- which may be pushed to each storage engine for execution.
-*/
-int ha_make_pushed_joins(THD *thd, AQP::Join_plan* plan)
-{
- Ha_trx_info *info;
-
- for (info= thd->transaction.stmt.ha_list; info; info= info->next())
- {
- handlerton *hton= info->ht();
- if (hton && hton->make_pushed_join)
- {
- const int error= hton->make_pushed_join(hton, thd, plan);
- if (unlikely(error))
- return error;
- }
- }
- return 0;
-}
-#endif
-
/*
TODO: change this into a dynamic struct
List<handlerton> does not work as
@@ -4499,7 +4476,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 13:06:41 +0000
+++ b/sql/handler.h 2011-09-28 09:10:16 +0000
@@ -180,13 +180,6 @@
#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:
@@ -365,13 +358,6 @@ enum enum_binlog_command {
LOGCOM_CREATE_DB,
LOGCOM_ALTER_DB,
LOGCOM_DROP_DB
-#ifndef MCP_WL6004_DISTRIBUTION
- ,LOGCOM_CREATE_USER
- ,LOGCOM_DROP_USER
- ,LOGCOM_RENAME_USER
- ,LOGCOM_GRANT
- ,LOGCOM_REVOKE
-#endif
};
/* struct to hold information about the table that should be created */
@@ -415,32 +401,6 @@ typedef ulonglong my_xid; // this line i
#define COMPATIBLE_DATA_YES 0
#define COMPATIBLE_DATA_NO 1
-#ifndef MCP_WL4784
-namespace AQP {
- class Join_plan;
-};
-
-/* Flag used for for test_push_flag() */
-enum ha_push_flag {
-
- /* Handler want to block const table optimization */
- HA_PUSH_BLOCK_CONST_TABLE
-
- /* Handler reports a pushed join as having multiple dependencies
- if its results does not only depend on the root operation:
- ie. results from some child operations does not only depend
- on results from the root operation and/or other child operations
- within this pushed join
- */
- ,HA_PUSH_MULTIPLE_DEPENDENCY
-
- /* Handler is unable to return the result in sorted order using an
- ordered index on the parent operation.
- */
- ,HA_PUSH_NO_ORDERED_INDEX
-};
-#endif
-
/**
struct xid_t is binary compatible with the XID structure as
in the X/Open CAE Specification, Distributed Transaction Processing:
@@ -848,10 +808,6 @@ struct handlerton
int (*table_exists_in_engine)(handlerton *hton, THD* thd, const char *db,
const char *name);
-#ifndef MCP_WL4784
- int (*make_pushed_join)(handlerton *hton, THD* thd,
- AQP::Join_plan* plan);
-#endif
#ifndef MCP_GLOBAL_SCHEMA_LOCK
int (*global_schema_func)(THD* thd, bool lock, void* args);
#endif
@@ -1870,30 +1826,6 @@ public:
virtual int extra_opt(enum ha_extra_function operation, ulong cache_size)
{ return extra(operation); }
-#ifndef MCP_WL5906
- /*
- Informs the handler if this handler support read removal
- (could use table_flags, but patch is smaller this way)
- */
- virtual bool read_before_write_removal_supported(void) const
- { return false; }
-
- /*
- Informs handler that it is possible to optimise away the real read
- operation from the handler for the current table and instead
- use a generated read to optimise simple UPDATE and DELETEs.
- */
- virtual bool read_before_write_removal_possible(void)
- { return false; }
-
- /*
- Return the number of rows the handler has written while using
- read before write removal
- */
- virtual ha_rows read_before_write_removal_rows_written(void) const
- { DBUG_ASSERT(0); return (ha_rows) 0; }
-#endif
-
/**
In an UPDATE or DELETE, if the row under the cursor was locked by another
transaction, and the engine used an optimistic read of the last
@@ -2232,41 +2164,6 @@ public:
virtual Item *idx_cond_push(uint keyno, Item* idx_cond) { return idx_cond; }
-#ifndef MCP_WL4784
- /**
- Reports #tables included in pushed join which this
- handler instance is part of. ==0 -> Not pushed
- */
- virtual uint number_of_pushed_joins() const
- { return 0; }
-
- /**
- If this handler instance is part of a pushed join sequence
- returned TABLE instance being root of the pushed query?
- */
- virtual const TABLE* root_of_pushed_join() const
- { return NULL; }
-
- /**
- If this handler instance is a child in a pushed join sequence
- returned TABLE instance being my parent?
- */
- virtual const TABLE* parent_of_pushed_join() const
- { return NULL; }
-
- virtual bool test_push_flag(enum ha_push_flag flag) const
- {
- return FALSE;
- }
-
- virtual int index_read_pushed(uchar * buf, const uchar * key,
- key_part_map keypart_map)
- { return HA_ERR_WRONG_COMMAND; }
-
- virtual int index_next_pushed(uchar * buf)
- { return HA_ERR_WRONG_COMMAND; }
-#endif
-
virtual bool check_if_incompatible_data(HA_CREATE_INFO *create_info,
uint table_changes)
{ return COMPATIBLE_DATA_NO; }
@@ -2659,11 +2556,6 @@ int ha_rollback_to_savepoint(THD *thd, S
int ha_savepoint(THD *thd, SAVEPOINT *sv);
int ha_release_savepoint(THD *thd, SAVEPOINT *sv);
-#ifndef MCP_WL4784
-/* Build pushed joins in handlers implementing this feature */
-int ha_make_pushed_joins(THD *thd, AQP::Join_plan* plan);
-#endif
-
/* these are called by storage engines */
void trans_register_ha(THD *thd, bool all, handlerton *ht);
=== modified file 'sql/opt_explain.cc'
--- a/sql/opt_explain.cc 2011-09-06 12:43:05 +0000
+++ b/sql/opt_explain.cc 2011-09-28 08:33:28 +0000
@@ -720,42 +720,6 @@ void Explain_table_base::explain_extra_c
table->file->pushed_idx_cond) || (tab && tab->cache_idx_cond))
str_extra->append(STRING_WITH_LEN("; Using index condition"));
-#ifndef MCP_WL4784
- const TABLE* pushed_root= table->file->root_of_pushed_join();
- if (pushed_root)
- {
- char buf[64];
- int len;
- int pushed_id= 0;
-
- for (JOIN_TAB* prev= join->join_tab; prev <= tab; prev++)
- {
- const TABLE* prev_root= prev->table->file->root_of_pushed_join();
- if (prev_root == prev->table)
- {
- pushed_id++;
- if (prev_root == pushed_root)
- break;
- }
- }
- if (pushed_root == table)
- {
- uint pushed_count= tab->table->file->number_of_pushed_joins();
- len= my_snprintf(buf, sizeof(buf)-1,
- "; Parent of %d pushed join@%d",
- pushed_count, pushed_id);
- }
- else
- {
- len= my_snprintf(buf, sizeof(buf)-1,
- "; Child of '%s' in pushed join@%d",
- tab->table->file->parent_of_pushed_join()->alias,
- pushed_id);
- }
- str_extra->append(buf,len);
- }
-#endif
-
switch (quick_type) {
case QUICK_SELECT_I::QS_TYPE_ROR_UNION:
case QUICK_SELECT_I::QS_TYPE_ROR_INTERSECT:
=== 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<Sql_condition> 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_acl.cc'
--- a/sql/sql_acl.cc 2011-09-27 12:11:16 +0000
+++ b/sql/sql_acl.cc 2011-09-28 09:10:16 +0000
@@ -50,10 +50,6 @@
#include "hostname.h"
#include "sql_db.h"
-#ifndef MCP_WL6004_DISTRIBUTION
-#include "handler.h"
-#endif
-
bool mysql_user_table_is_in_short_password_format= false;
static const
@@ -1187,14 +1183,6 @@ my_bool acl_reload(THD *thd)
if (old_initialized)
mysql_mutex_unlock(&acl_cache->lock);
end:
-#ifndef MCP_WL6004_TRANS
- if (!thd->transaction.stmt.is_empty())
- {
- DBUG_PRINT("info", ("%u: Committing read transaction", __LINE__));
- trans_commit_stmt(thd);
- assert(thd->transaction.stmt.is_empty());
- }
-#endif
close_mysql_tables(thd);
DBUG_RETURN(return_val);
}
@@ -1846,9 +1834,6 @@ bool change_password(THD *thd, const cha
bool save_binlog_row_based;
uint new_password_len= (uint) strlen(new_password);
bool result= 1;
-#ifndef MCP_WL6004_DISTRIBUTION
- bool do_distribute= 0;
-#endif
DBUG_ENTER("change_password");
DBUG_PRINT("enter",("host: '%s' user: '%s' new_password: '%s'",
host,user,new_password));
@@ -1920,47 +1905,7 @@ bool change_password(THD *thd, const cha
acl_cache->clear(1); // Clear locked hostname cache
mysql_mutex_unlock(&acl_cache->lock);
result= 0;
-
-#ifndef MCP_WL6004_TRANS
- if (!thd->transaction.stmt.is_empty())
- {
- if (!result)
- {
- int err= trans_commit_stmt(thd);
- if (err == 0)
- {
- DBUG_PRINT("info", ("%u: Commit DDL transaction ok", __LINE__));
- }
- else
- {
- result= 1;
- do_distribute= 0;
- DBUG_PRINT("info", ("%u: Commit DDL transaction failed: %d",
- __LINE__, err));
- }
- }
- else
- {
- DBUG_PRINT("info", ("%u: Aborting DDL transaction", __LINE__));
- do_distribute= 0;
- trans_rollback_stmt(thd);
- }
- assert(thd->transaction.stmt.is_empty());
- }
-#endif
-
-#ifndef MCP_WL6004_DISTRIBUTION
- if (result)
- {
- do_distribute= 0;
- }
- else
- {
- do_distribute= 1;
- }
-#endif
-
- if (!result && mysql_bin_log.is_open())
+ if (mysql_bin_log.is_open())
{
query_length= sprintf(buff, "SET PASSWORD FOR '%-.120s'@'%-.120s'='%-.120s'",
acl_user->user ? acl_user->user : "",
@@ -1971,35 +1916,7 @@ bool change_password(THD *thd, const cha
FALSE, FALSE, FALSE, 0);
}
end:
-
-#ifndef MCP_WL6004_TRANS
- if (!thd->transaction.stmt.is_empty())
- {
- /**
- * We get here if something went wrong,
- * check that result != 0
- */
- assert(result != 0);
- DBUG_PRINT("info", ("%u: Aborting DDL transaction", __LINE__));
- trans_rollback_stmt(thd);
- assert(thd->transaction.stmt.is_empty());
- }
-#endif
-
-#ifndef MCP_WL6004_DISTRIBUTION
- if (do_distribute)
- {
- query_length= sprintf(buff, "SET PASSWORD FOR '%-.120s'@'%-.120s'='%-.120s'",
- acl_user->user ? acl_user->user : "",
- acl_user->host.hostname ? acl_user->host.hostname : "",
- new_password);
- ha_binlog_log_query(thd, 0, LOGCOM_GRANT,
- buff, query_length,
- "mysql", "");
- }
-#endif
-
- close_thread_tables(thd);
+ close_mysql_tables(thd);
/* Restore the state of binlog format */
DBUG_ASSERT(!thd->is_current_stmt_binlog_format_row());
@@ -3852,53 +3769,11 @@ int mysql_table_grant(THD *thd, TABLE_LI
thd->mem_root= old_root;
mysql_mutex_unlock(&acl_cache->lock);
-#ifndef MCP_WL6004_TRANS
- if (!thd->transaction.stmt.is_empty())
- {
- if (!result)
- {
- int err= trans_commit_stmt(thd);
- if (err == 0)
- {
- DBUG_PRINT("info", ("%u: Commit DDL transaction ok", __LINE__));
- }
- else
- {
- result= 1;
- DBUG_PRINT("info", ("%u: Commit DDL transaction failed: %d",
- __LINE__, err));
- }
- }
- else
- {
- DBUG_PRINT("info", ("%u: Aborting DDL transaction", __LINE__));
- trans_rollback_stmt(thd);
- }
- assert(thd->transaction.stmt.is_empty());
- }
-#endif
-
-#ifndef MCP_WL6004_DISTRIBUTION
- bool do_distribute= !result;
-#endif
-
if (should_write_to_binlog)
result= result |
write_bin_log(thd, FALSE, thd->query(), thd->query_length());
-
mysql_rwlock_unlock(&LOCK_grant);
-#ifndef MCP_WL6004_DISTRIBUTION
- if (do_distribute)
- {
- char *db= table_list->get_db_name();
- char *lex_db= thd->lex->select_lex.db;
- ha_binlog_log_query(thd, 0, LOGCOM_GRANT,
- thd->query(), thd->query_length(),
- (db)?db:((lex_db)?lex_db:"mysql"), "");
- }
-#endif
-
if (!result) /* success */
my_ok(thd);
@@ -4256,36 +4131,6 @@ bool mysql_grant(THD *thd, const char *d
}
mysql_mutex_unlock(&acl_cache->lock);
-#ifndef MCP_WL6004_TRANS
- if (!thd->transaction.stmt.is_empty())
- {
- if (!result)
- {
- int err= trans_commit_stmt(thd);
- if (err == 0)
- {
- DBUG_PRINT("info", ("%u: Commit DDL transaction ok", __LINE__));
- }
- else
- {
- result= 1;
- DBUG_PRINT("info", ("%u: Commit DDL transaction failed: %d",
- __LINE__, err));
- }
- }
- else
- {
- DBUG_PRINT("info", ("%u: Aborting DDL transaction", __LINE__));
- trans_rollback_stmt(thd);
- }
- assert(thd->transaction.stmt.is_empty());
- }
-#endif
-
-#ifndef MCP_WL6004_DISTRIBUTION
- bool do_distribute= !result;
-#endif
-
if (should_write_to_binlog)
{
if (thd->rewritten_query.length())
@@ -4300,16 +4145,6 @@ bool mysql_grant(THD *thd, const char *d
mysql_rwlock_unlock(&LOCK_grant);
-#ifndef MCP_WL6004_DISTRIBUTION
- if (do_distribute)
- {
- char *lex_db= thd->lex->select_lex.db;
- ha_binlog_log_query(thd, 0, LOGCOM_GRANT,
- thd->query(), thd->query_length(),
- (db)?db:((lex_db)?lex_db:"mysql"), "");
- }
-#endif
-
if (!result)
my_ok(thd);
/* Restore the state of binlog format */
@@ -4591,14 +4426,6 @@ static my_bool grant_reload_procs_priv(T
}
mysql_rwlock_unlock(&LOCK_grant);
-#ifndef MCP_WL6004_TRANS
- if (!thd->transaction.stmt.is_empty())
- {
- DBUG_PRINT("info", ("%u: Committing read transaction", __LINE__));
- trans_commit_stmt(thd);
- assert(thd->transaction.stmt.is_empty());
- }
-#endif
close_mysql_tables(thd);
DBUG_RETURN(return_val);
}
@@ -4670,14 +4497,6 @@ my_bool grant_reload(THD *thd)
free_root(&old_mem,MYF(0));
}
mysql_rwlock_unlock(&LOCK_grant);
-#ifndef MCP_WL6004_TRANS
- if (!thd->transaction.stmt.is_empty())
- {
- DBUG_PRINT("info", ("%u: Committing read transaction", __LINE__));
- trans_commit_stmt(thd);
- assert(thd->transaction.stmt.is_empty());
- }
-#endif
close_mysql_tables(thd);
/*
@@ -6759,25 +6578,6 @@ bool mysql_create_user(THD *thd, List <L
if (result)
my_error(ER_CANNOT_USER, MYF(0), "CREATE USER", wrong_users.c_ptr_safe());
-#ifndef MCP_WL6004_TRANS
- if (!thd->transaction.stmt.is_empty())
- {
- int err= trans_commit_stmt(thd);
- if (err == 0)
- {
- DBUG_PRINT("info", ("%u: Commit DDL ok", __LINE__));
- }
- else
- {
- result= 1;
- some_users_created= FALSE;
- DBUG_PRINT("info",
- ("%u: Commit DDL transaction failed: %d", __LINE__, err));
- }
- assert(thd->transaction.stmt.is_empty());
- }
-#endif
-
if (some_users_created)
{
result|= write_bin_log(thd, FALSE,
@@ -6786,16 +6586,6 @@ bool mysql_create_user(THD *thd, List <L
}
mysql_rwlock_unlock(&LOCK_grant);
-
-#ifndef MCP_WL6004_DISTRIBUTION
- if (some_users_created)
- {
- ha_binlog_log_query(thd, 0, LOGCOM_CREATE_USER,
- thd->query(), thd->query_length(),
- "mysql", "");
- }
-#endif
-
/* Restore the state of binlog format */
DBUG_ASSERT(!thd->is_current_stmt_binlog_format_row());
if (save_binlog_row_based)
@@ -6876,47 +6666,10 @@ bool mysql_drop_user(THD *thd, List <LEX
if (result)
my_error(ER_CANNOT_USER, MYF(0), "DROP USER", wrong_users.c_ptr_safe());
-#ifndef MCP_WL6004_TRANS
- if (!thd->transaction.stmt.is_empty())
- {
- if (!result)
- {
- int err= trans_commit_stmt(thd);
- if (err == 0)
- {
- DBUG_PRINT("info", ("%u: Commit DDL transaction ok", __LINE__));
- }
- else
- {
- result= 1;
- some_users_deleted= FALSE;
- DBUG_PRINT("info", ("%u: Commit DDL transaction failed: %d",
- __LINE__, err));
- }
- }
- else
- {
- DBUG_PRINT("info", ("%u: Aborting DDL transaction", __LINE__));
- trans_rollback_stmt(thd);
- }
- assert(thd->transaction.stmt.is_empty());
- }
-#endif
-
if (some_users_deleted)
result |= write_bin_log(thd, FALSE, thd->query(), thd->query_length());
mysql_rwlock_unlock(&LOCK_grant);
-
-#ifndef MCP_WL6004_DISTRIBUTION
- if (some_users_deleted)
- {
- ha_binlog_log_query(thd, 0, LOGCOM_DROP_USER,
- thd->query(), thd->query_length(),
- "mysql", "");
- }
-#endif
-
thd->variables.sql_mode= old_sql_mode;
/* Restore the state of binlog format */
DBUG_ASSERT(!thd->is_current_stmt_binlog_format_row());
@@ -7009,48 +6762,10 @@ bool mysql_rename_user(THD *thd, List <L
if (result)
my_error(ER_CANNOT_USER, MYF(0), "RENAME USER", wrong_users.c_ptr_safe());
-#ifndef MCP_WL6004_TRANS
- if (!thd->transaction.stmt.is_empty())
- {
- if (!result)
- {
- int err= trans_commit_stmt(thd);
- if (err == 0)
- {
- DBUG_PRINT("info", ("%u: Commit DDL transaction ok", __LINE__));
- }
- else
- {
- result= 1;
- some_users_renamed= FALSE;
- DBUG_PRINT("info", ("%u: Commit DDL transaction failed: %d",
- __LINE__, err));
- }
- }
- else
- {
- DBUG_PRINT("info", ("%u: Aborting DDL transaction", __LINE__));
- trans_rollback_stmt(thd);
- some_users_renamed= FALSE;
- }
- assert(thd->transaction.stmt.is_empty());
- }
-#endif
-
if (some_users_renamed && mysql_bin_log.is_open())
result |= write_bin_log(thd, FALSE, thd->query(), thd->query_length());
mysql_rwlock_unlock(&LOCK_grant);
-
-#ifndef MCP_WL6004_DISTRIBUTION
- if (some_users_renamed)
- {
- ha_binlog_log_query(thd, 0, LOGCOM_RENAME_USER,
- thd->query(), thd->query_length(),
- "mysql", "");
- }
-#endif
-
/* Restore the state of binlog format */
DBUG_ASSERT(!thd->is_current_stmt_binlog_format_row());
if (save_binlog_row_based)
@@ -7078,10 +6793,6 @@ bool mysql_revoke_all(THD *thd, List <L
uint counter, revoked, is_proc;
int result;
ACL_DB *acl_db;
-#ifndef MCP_WL6004_DISTRIBUTION
- char *db= NULL;
-#endif
-
TABLE_LIST tables[GRANT_TABLES];
bool save_binlog_row_based, should_write_to_binlog= FALSE;
DBUG_ENTER("mysql_revoke_all");
@@ -7162,9 +6873,6 @@ bool mysql_revoke_all(THD *thd, List <L
current element in acl_dbs.
*/
revoked= 1;
-#ifndef MCP_WL6004_DISTRIBUTION
- db= acl_db->db;
-#endif
continue;
}
result= -1; // Something went wrong
@@ -7256,32 +6964,6 @@ bool mysql_revoke_all(THD *thd, List <L
if (result)
my_message(ER_REVOKE_GRANTS, ER(ER_REVOKE_GRANTS), MYF(0));
-#ifndef MCP_WL6004_TRANS
- if (!thd->transaction.stmt.is_empty())
- {
- if (!result)
- {
- int err= trans_commit_stmt(thd);
- if (err == 0)
- {
- DBUG_PRINT("info", ("%u: Commit DDL transaction ok", __LINE__));
- }
- else
- {
- result= 1;
- DBUG_PRINT("info", ("%u: Commit DDL transaction failed: %d",
- __LINE__, err));
- }
- }
- else
- {
- DBUG_PRINT("info", ("%u: Aborting DDL transaction", __LINE__));
- trans_rollback_stmt(thd);
- }
- assert(thd->transaction.stmt.is_empty());
- }
-#endif
-
if (should_write_to_binlog)
{
result= result |
@@ -7289,17 +6971,6 @@ bool mysql_revoke_all(THD *thd, List <L
}
mysql_rwlock_unlock(&LOCK_grant);
-
-#ifndef MCP_WL6004_DISTRIBUTION
- if (true) // statment is always written to binlog??
- {
- char *lex_db= thd->lex->select_lex.db;
- ha_binlog_log_query(thd, 0, LOGCOM_REVOKE,
- thd->query(), thd->query_length(),
- (db)?db:((lex_db)?lex_db:"mysql"), "");
- }
-#endif
-
/* Restore the state of binlog format */
DBUG_ASSERT(!thd->is_current_stmt_binlog_format_row());
if (save_binlog_row_based)
=== modified file 'sql/sql_delete.cc'
--- a/sql/sql_delete.cc 2011-09-07 10:08:09 +0000
+++ b/sql/sql_delete.cc 2011-09-28 08:39:40 +0000
@@ -61,9 +61,6 @@ bool mysql_delete(THD *thd, TABLE_LIST *
bool const_cond_result;
ha_rows deleted= 0;
bool reverse= FALSE;
-#ifndef MCP_WL5906
- bool read_removal= false;
-#endif
bool skip_record;
bool need_sort= FALSE;
bool err= true;
@@ -337,34 +334,6 @@ bool mysql_delete(THD *thd, TABLE_LIST *
else
will_batch= !table->file->start_bulk_delete();
-#ifndef MCP_WL5906
- /*
- Read removal is possible if the selected quick read
- method is using full unique index
- */
- if (select && select->quick &&
- will_batch &&
- !using_limit &&
- table->file->read_before_write_removal_supported())
- {
- const uint idx = select->quick->index;
- DBUG_PRINT("rbwr", ("checking index: %d", idx));
- const KEY *key= table->key_info + idx;
- if ((key->flags & HA_NOSAME) == HA_NOSAME)
- {
- DBUG_PRINT("rbwr", ("index is unique"));
- bitmap_clear_all(&table->tmp_set);
- table->mark_columns_used_by_index_no_reset(idx, &table->tmp_set);
- if (bitmap_cmp(&table->tmp_set, table->read_set))
- {
- DBUG_PRINT("rbwr", ("using whole index, rbwr possible"));
- read_removal=
- table->file->read_before_write_removal_possible();
- }
- }
- }
-#endif
-
table->mark_columns_needed_for_delete();
while (!(error=info.read_record(&info)) && !thd->killed &&
@@ -426,15 +395,6 @@ bool mysql_delete(THD *thd, TABLE_LIST *
table->file->print_error(loc_error,MYF(0));
error=1;
}
-#ifndef MCP_WL5906
- if (read_removal)
- {
- /* Only handler knows how many records really was written */
- DBUG_PRINT("rbwr", ("old deleted: %ld", (long)deleted));
- deleted= table->file->read_before_write_removal_rows_written();
- DBUG_PRINT("rbwr", ("really deleted: %ld", (long)deleted));
- }
-#endif
THD_STAGE_INFO(thd, stage_end);
end_read_record(&info);
if (options & OPTION_QUICK)
=== 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 09:14:07 +0000
@@ -45,10 +45,6 @@
#include "filesort.h" // filesort_free_buffers
#include "sql_union.h" // mysql_union
#include "debug_sync.h" // DEBUG_SYNC
-#ifndef MCP_WL4784
-#include "abstract_query_plan.h"
-#endif
-
#include <m_ctype.h>
#include <my_bit.h>
#include <hash.h>
@@ -172,10 +168,6 @@ static int join_ft_read_first(JOIN_TAB *
static int join_ft_read_next(READ_RECORD *info);
int join_read_always_key_or_null(JOIN_TAB *tab);
int join_read_next_same_or_null(READ_RECORD *info);
-#ifndef MCP_WL4784
-static int join_read_linked_first(JOIN_TAB *tab);
-static int join_read_linked_next(READ_RECORD *info);
-#endif
static Item *make_cond_for_table(Item *cond,table_map table,
table_map used_table,
bool exclude_expensive_cond);
@@ -193,11 +185,9 @@ static bool test_if_cheaper_ordering(con
ha_rows *new_select_limit,
uint *new_used_key_parts= NULL,
uint *saved_best_key_parts= NULL);
-#ifdef MCP_WL4784
static bool test_if_skip_sort_order(JOIN_TAB *tab,ORDER *order,
ha_rows select_limit, bool no_changes,
const key_map *map);
-#endif
static bool list_contains_unique_index(TABLE *table,
bool (*find_func) (Field *, void *), void *data);
static bool find_field_in_item_list (Field *field, void *data);
@@ -255,10 +245,6 @@ static bool replace_subcondition(JOIN *j
static bool test_if_ref(Item *root_cond,
Item_field *left_item,Item *right_item);
-#ifndef MCP_WL4784
-static int make_pushed_join(THD *thd, JOIN *join);
-#endif
-
void get_partial_join_cost(JOIN *join, uint idx, double *read_time_arg,
double *record_count_arg);
static int
@@ -281,7 +267,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
@@ -2640,11 +2626,6 @@ JOIN::optimize()
}
}
-#ifndef MCP_WL4784
- if (make_pushed_join(thd, this))
- DBUG_RETURN(1);
-#endif
-
tmp_having= having;
if (select_options & SELECT_DESCRIBE)
{
@@ -2813,72 +2794,6 @@ setup_subq_exit:
DBUG_RETURN(0);
}
-#ifndef MCP_WL4784
-static int
-make_pushed_join(THD *thd, JOIN *join)
-{
- int active_pushed_joins= 0;
-
- // Let handler extract whatever it might implement of pushed joins
- AQP::Join_plan plan(join);
-
- const int error= ha_make_pushed_joins(thd, &plan);
- if (unlikely(error))
- return error;
-
- // Set up table accessors for child operations of pushed joins
- for (uint i=join->const_tables ; i < join->tables ; i++)
- {
- JOIN_TAB *tab=join->join_tab+i;
-
- uint pushed_joins= tab->table->file->number_of_pushed_joins();
- if (pushed_joins > 0)
- {
- if (tab->table->file->root_of_pushed_join() == tab->table)
- {
- active_pushed_joins += pushed_joins;
- }
- else
- {
- // Is child of a pushed join operation:
- // Replace 'read_key' access with its linked counterpart
- // ... Which is effectively a NOOP as the row is read as part of the linked operation
- tab->read_first_record= join_read_linked_first;
- DBUG_ASSERT(tab->read_record.read_record != join_read_next_same_or_null);
- tab->read_record.read_record= join_read_linked_next;
- tab->read_record.unlock_row= rr_unlock_row; // FIXME: likely incorrect
- }
- active_pushed_joins--;
- }
- }
-
- /* If we just pushed a join containing an ORDER BY and/or a GROUP BY clause,
- * we have to ensure that we either can skip the sort by scanning an ordered index,
- * or write to a temp. table later being filesorted.
- */
- if (join->const_tables < join->tables &&
- join->join_tab[join->const_tables].table->file->number_of_pushed_joins() > 0)
- {
- const handler *ha=join->join_tab[join->const_tables].table->file;
-
- if (join->group_list && join->simple_group &&
- (!plan.group_by_filesort_is_skippable() || ha->test_push_flag(HA_PUSH_NO_ORDERED_INDEX)))
- {
- join->need_tmp= 1;
- join->simple_order= join->simple_group= 0;
- }
- else if (join->order && join->simple_order &&
- (!plan.order_by_filesort_is_skippable() || ha->test_push_flag(HA_PUSH_NO_ORDERED_INDEX)))
- {
- join->need_tmp= 1;
- join->simple_order= join->simple_group= 0;
- }
- }
-
- DBUG_ASSERT(active_pushed_joins==0);
- return 0;
-}
-#endif
/**
Restore values in temporary join.
@@ -5181,16 +5096,6 @@ make_join_statistics(JOIN *join, TABLE_L
*/
extract_method= extract_no_table;
}
-#ifndef MCP_WL4784
- else if (table->file->test_push_flag(HA_PUSH_BLOCK_CONST_TABLE))
- {
- /*
- Handler implements pushed joins, and prefer const tables to
- be pushed together with rest of the pushed query.
- */
- extract_method= extract_no_table;
- }
-#endif
else if (*s->on_expr_ref)
{
/* s is the only inner table of an outer join, extract empty tables */
@@ -5351,17 +5256,11 @@ const_table_extraction_done:
Extract const tables with proper key dependencies.
Exclude tables that
1. are full-text searched, or
- 2. are part of nested outer join, or
- 3. are blocked by handler for const table optimize.
+ 2. are part of nested outer join.
*/
if (eq_part.is_prefix(table->key_info[key].key_parts) &&
!table->fulltext_searched && // 1
-#ifndef MCP_WL4784
- !table->pos_in_table_list->in_outer_join_nest() && // 2
- !table->file->test_push_flag(HA_PUSH_BLOCK_CONST_TABLE)) // 3
-#else
!table->pos_in_table_list->in_outer_join_nest()) // 2
-#endif
{
if (table->key_info[key].flags & HA_NOSAME)
{
@@ -19719,79 +19618,6 @@ join_read_key_unlock_row(st_join_table *
tab->ref.use_count--;
}
-#ifndef MCP_WL4784
-/**
- Read a table *assumed* to be included in execution of a pushed join.
- This is the counterpart of join_read_key() / join_read_always_key()
- for child tables in a pushed join.
-
- When the table access is performed as part of the pushed join,
- all 'linked' child colums are prefetched together with the parent row.
- The handler will then only format the row as required by MySQL and set
- 'table->status' accordingly.
-
- However, there may be situations where the prepared pushed join was not
- executed as assumed. It is the responsibility of the handler to handle
- these situation by letting ::index_read_pushed() then effectively do a
- plain old' index_read_map(..., HA_READ_KEY_EXACT);
-
- @param tab Table to read
-
- @retval
- 0 Row was found
- @retval
- -1 Row was not found
- @retval
- 1 Got an error (other than row not found) during read
-*/
-static int
-join_read_linked_first(JOIN_TAB *tab)
-{
- TABLE *table= tab->table;
- DBUG_ENTER("join_read_linked_first");
-
- DBUG_ASSERT(!tab->sorted); // Pushed child can't be sorted
- if (!table->file->inited)
- table->file->ha_index_init(tab->ref.key, tab->sorted);
-
- if (cp_buffer_from_ref(tab->join->thd, table, &tab->ref))
- {
- table->status=STATUS_NOT_FOUND;
- DBUG_RETURN(-1);
- }
-
- // 'read' itself is a NOOP:
- // handler::index_read_pushed() only unpack the prefetched row and set 'status'
- int error=table->file->index_read_pushed(table->record[0],
- tab->ref.key_buff,
- make_prev_keypart_map(tab->ref.key_parts));
- if (unlikely(error && error != HA_ERR_KEY_NOT_FOUND && error != HA_ERR_END_OF_FILE))
- DBUG_RETURN(report_error(table, error));
-
- table->null_row=0;
- int rc= table->status ? -1 : 0;
- DBUG_RETURN(rc);
-}
-
-
-static int
-join_read_linked_next(READ_RECORD *info)
-{
- TABLE *table= info->table;
- DBUG_ENTER("join_read_linked_next");
-
- int error=table->file->index_next_pushed(table->record[0]);
- if (error)
- {
- if (unlikely(error != HA_ERR_END_OF_FILE))
- DBUG_RETURN(report_error(table, error));
- table->status= STATUS_GARBAGE;
- DBUG_RETURN(-1);
- }
- DBUG_RETURN(error);
-}
-#endif
-
/*
ref access method implementation: "read_first" function
@@ -19889,21 +19715,8 @@ join_read_last_key(JOIN_TAB *tab)
/* ARGSUSED */
static int
-join_no_more_records(READ_RECORD *info)
+join_no_more_records(READ_RECORD *info __attribute__((unused)))
{
-#ifndef MCP_WL4784
- /**
- * When a pushed join completes, and its results did not only depend on
- * the key of this root operations: ('tab->ref.key_buff')
- * Results from this pushed join can not be reused
- * for later queries having the same root key.
- * (ref: join_read_key(), join_read_const() & join_read_system()
- */
- if (info->table->file->test_push_flag(HA_PUSH_MULTIPLE_DEPENDENCY))
- {
- info->table->status= STATUS_GARBAGE;
- }
-#endif
return -1;
}
@@ -21606,11 +21419,7 @@ find_field_in_item_list (Field *field, v
1 We can use an index.
*/
-#ifndef MCP_WL4784
-bool
-#else
static bool
-#endif
test_if_skip_sort_order(JOIN_TAB *tab,ORDER *order,ha_rows select_limit,
bool no_changes, const key_map *map)
{
@@ -24915,11 +24724,6 @@ test_if_cheaper_ordering(const JOIN_TAB
If not used with LIMIT, only use keys if the whole query can be
resolved with a key; This is because filesort() is usually faster than
retrieving all rows through an index.
-#ifndef MCP_WL4784
- The exception is if there is a pushed join which we can't filesort().
- This is due to the prefetch of result rows from the pushed join
- which filesort() is not able to buffer.
-#endif
*/
if (select_limit >= table_records)
{
=== modified file 'sql/sql_select.h'
--- a/sql/sql_select.h 2011-09-07 10:08:09 +0000
+++ b/sql/sql_select.h 2011-09-28 08:33:28 +0000
@@ -2138,12 +2138,6 @@ uint find_shortest_key(TABLE *table, con
Field* create_tmp_field_from_field(THD *thd, Field* org_field,
const char *name, TABLE *table,
Item_field *item, uint convert_blob_length);
-#ifndef MCP_WL4784
-bool test_if_skip_sort_order(JOIN_TAB *tab, ORDER *order,
- ha_rows select_limit, bool no_changes,
- const key_map *map);
-#endif
-
bool is_indexed_agg_distinct(JOIN *join, List<Item_field> *out_args);
=== modified file 'sql/sql_truncate.cc'
--- a/sql/sql_truncate.cc 2011-09-23 13:06:41 +0000
+++ b/sql/sql_truncate.cc 2011-09-28 09:01:08 +0000
@@ -252,7 +252,6 @@ static bool recreate_temporary_table(THD
TABLE_SHARE *share= table->s;
HA_CREATE_INFO create_info;
handlerton *table_type= table->s->db_type();
-
DBUG_ENTER("recreate_temporary_table");
memset(&create_info, 0, sizeof(create_info));
=== modified file 'sql/sql_update.cc'
--- a/sql/sql_update.cc 2011-09-27 12:11:16 +0000
+++ b/sql/sql_update.cc 2011-09-28 09:01:54 +0000
@@ -159,39 +159,6 @@ static bool check_fields(THD *thd, List<
}
-#ifndef MCP_WL5906
-/*
- Check if all expressions in list are constant expressions
-
- SYNOPSIS
- check_constant_expressions()
- values List of expressions
-
- RETURN
- TRUE Only constant expressions
- FALSE At least one non-constant expression
-*/
-
-static bool check_constant_expressions(List<Item> &values)
-{
- Item *value;
- List_iterator_fast<Item> v(values);
- DBUG_ENTER("check_constant_expressions");
-
- while ((value= v++))
- {
- if (!value->const_item())
- {
- DBUG_PRINT("exit", ("expression is not constant"));
- DBUG_RETURN(FALSE);
- }
- }
- DBUG_PRINT("exit", ("expression is constant"));
- DBUG_RETURN(TRUE);
-}
-#endif
-
-
/**
Re-read record if more columns are needed for error message.
@@ -305,9 +272,6 @@ int mysql_update(THD *thd,
#ifndef NO_EMBEDDED_ACCESS_CHECKS
uint want_privilege;
#endif
-#ifndef MCP_WL5906
- bool read_removal= false;
-#endif
uint table_count= 0;
ha_rows updated, found;
key_map old_covering_keys;
@@ -486,37 +450,6 @@ int mysql_update(THD *thd,
}
} // Ends scope for optimizer trace wrapper
-#ifndef MCP_WL5906
- /*
- Read removal is possible if the selected quick read
- method is using full unique index
-
- NOTE! table->read_set currently holds the columns which are
- used for the WHERE clause(this info is most likely already
- available in select->quick, but where?)
- */
- if (select && select->quick && select->quick->index != MAX_KEY &&
- !ignore &&
- !using_limit &&
- table->file->read_before_write_removal_supported())
- {
- const uint idx= select->quick->index;
- DBUG_PRINT("rbwr", ("checking index: %d", idx));
- const KEY *key= table->key_info + idx;
- if ((key->flags & HA_NOSAME) == HA_NOSAME)
- {
- DBUG_PRINT("rbwr", ("index is unique"));
- bitmap_clear_all(&table->tmp_set);
- table->mark_columns_used_by_index_no_reset(idx, &table->tmp_set);
- if (bitmap_cmp(&table->tmp_set, table->read_set))
- {
- DBUG_PRINT("rbwr", ("using full index, rbwr possible"));
- read_removal= true;
- }
- }
- }
-#endif
-
/* If running in safe sql mode, don't allow updates without keys */
if (table->quick_keys.is_clear_all())
{
@@ -699,13 +632,6 @@ int mysql_update(THD *thd,
}
if (table->key_read)
table->restore_column_maps_after_mark_index();
-
-#ifndef MCP_WL5906
- /* Rows are already read -> not possible to remove */
- DBUG_PRINT("rbwr", ("rows are already read, turning off rbwr"));
- read_removal= false;
-#endif
-
}
if (ignore)
@@ -745,16 +671,6 @@ int mysql_update(THD *thd,
else
will_batch= !table->file->start_bulk_update();
-#ifndef MCP_WL5906
- if (read_removal &&
- will_batch &&
- check_constant_expressions(values))
- {
- assert(select && select->quick);
- read_removal= table->file->read_before_write_removal_possible();
- }
-#endif
-
/*
Assure that we can use position()
if we need to create an error message.
@@ -961,22 +877,6 @@ int mysql_update(THD *thd,
table->file->end_bulk_update();
table->file->try_semi_consistent_read(0);
-#ifndef MCP_WL5906
- if (read_removal)
- {
- /* Only handler knows how many records really was written */
- DBUG_PRINT("rbwr", ("adjusting updated: %ld, found: %ld",
- (long)updated, (long)found));
-
- updated= table->file->read_before_write_removal_rows_written();
- if (!records_are_comparable(table))
- found= updated;
-
- DBUG_PRINT("rbwr", ("really updated: %ld, found: %ld",
- (long)updated, (long)found));
- }
-#endif
-
if (!transactional_table && updated > 0)
thd->transaction.stmt.mark_modified_non_trans_table();
=== modified file 'sql/table.cc'
--- a/sql/table.cc 2011-09-23 13:06:41 +0000
+++ b/sql/table.cc 2011-09-28 10:37:45 +0000
@@ -2120,7 +2120,6 @@ int open_table_from_share(THD *thd, TABL
{
if (work_part_info_used)
tmp= fix_partition_func(thd, outparam, is_create_table);
- 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 <string.h>
#include <assert.h>
=== modified file 'support-files/compiler_warnings.supp'
--- a/support-files/compiler_warnings.supp 2011-07-05 12:46:07 +0000
+++ b/support-files/compiler_warnings.supp 2011-09-28 10:43:14 +0000
@@ -98,12 +98,3 @@ mi_packrec.c : .*result of 32-bit shift
#
.* : .*no matching operator delete found; memory will not be freed if initialization throws an exception.*
ctype-simple.c : .*unary minus operator applied to unsigned type, result still unsigned.*
-
-#
-# 5.5-mainline
-#
-extra/perror.c : .*strerror.*
-plugin/semisync/semisync_master.cc : .*may be used uninitialized in this function.*
-storage/innobase/.* : .*
-client/mysqldump.c : .*may be used uninitialized in this function.*
-
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-trunk-cluster branch (magnus.blaudd:3370 to 3383) | magnus.blaudd | 2 Oct |