List:Commits« Previous MessageNext Message »
From:Alexander Nozdrin Date:February 16 2009 6:05pm
Subject:bzr push into mysql-6.0 branch (alik:2698 to 2700)
View as plain text  
 2700 Alexander Nozdrin	2009-02-16
      Fix default.conf
      modified:
        .bzr-mysql/default.conf

 2699 Sergey Petrunia	2009-02-16 [merge]
      Merge mysql-6.0-runtime -> mysql-6.0-opt
      modified:
        mysql-test/r/kill.result
        mysql-test/suite/binlog/t/disabled.def
        mysql-test/suite/ndb/t/disabled.def
        mysql-test/suite/rpl/t/disabled.def
        mysql-test/suite/rpl_ndb_big/t/disabled.def
        mysql-test/suite/sys_vars/t/disabled.def
        mysql-test/t/disabled.def
        mysql-test/t/kill.test
        tests/mysql_client_test.c

 2698 Igor Babaev	2009-02-13 [merge]
      Automerge
      removed:
        cmd-line-utils/libedit/TEST/
        cmd-line-utils/libedit/TEST/test.c
        cmd-line-utils/libedit/compat.h
        cmd-line-utils/libedit/compat_conf.h
        cmd-line-utils/libedit/editline.3
        cmd-line-utils/libedit/editrc.5
        cmd-line-utils/libedit/fgetln.c
        cmd-line-utils/libedit/fgetln.h
        cmd-line-utils/libedit/libedit_term.h
        cmd-line-utils/libedit/strlcpy.c
        cmd-line-utils/libedit/strlcpy.h
        cmd-line-utils/libedit/tokenizer.h
        cmd-line-utils/libedit/unvis.c
        cmd-line-utils/libedit/vis.c
        cmd-line-utils/libedit/vis.h
        mysql-test/include/wait_for_query_to_suceed.inc
        mysql-test/suite/falcon_team/r/falcon_bug_29246.result
        mysql-test/suite/falcon_team/t/falcon_bug_29246.test
        storage/falcon/Blob.cpp
        storage/falcon/Page.cpp
        storage/falcon/SyncWait.cpp
      added:
        cmd-line-utils/libedit/README
        cmd-line-utils/libedit/filecomplete.c
        cmd-line-utils/libedit/filecomplete.h
        mysql-test/extra/binlog_tests/binlog_truncate.test
        mysql-test/include/count_sessions.inc
        mysql-test/include/wait_for_query_to_succeed.inc
        mysql-test/include/wait_until_count_sessions.inc
        mysql-test/r/innodb_ignore_builtin.result
        mysql-test/suite/binlog/r/binlog_truncate_innodb.result
        mysql-test/suite/binlog/r/binlog_truncate_myisam.result
        mysql-test/suite/binlog/t/binlog_truncate_innodb-master.opt
        mysql-test/suite/binlog/t/binlog_truncate_innodb.test
        mysql-test/suite/binlog/t/binlog_truncate_myisam.test
        mysql-test/suite/falcon/r/falcon_bug_26433-big.result
        mysql-test/suite/falcon/r/falcon_bug_33148.result
        mysql-test/suite/falcon/r/falcon_bug_33720.result
        mysql-test/suite/falcon/r/falcon_bug_35257.result
        mysql-test/suite/falcon/r/falcon_bug_36186.result
        mysql-test/suite/falcon/r/falcon_bug_40607.result
        mysql-test/suite/falcon/r/falcon_bug_40801.result
        mysql-test/suite/falcon/r/falcon_bug_41548.result
        mysql-test/suite/falcon/r/falcon_bug_41582.result
        mysql-test/suite/falcon/r/falcon_bug_41688.result
        mysql-test/suite/falcon/r/falcon_bug_42069.result
        mysql-test/suite/falcon/r/falcon_bug_42196.result
        mysql-test/suite/falcon/r/falcon_ps_repeatable_read.result
        mysql-test/suite/falcon/t/falcon_bug_26433-big.test
        mysql-test/suite/falcon/t/falcon_bug_33148.test
        mysql-test/suite/falcon/t/falcon_bug_33720.test
        mysql-test/suite/falcon/t/falcon_bug_35257.test
        mysql-test/suite/falcon/t/falcon_bug_36186.test
        mysql-test/suite/falcon/t/falcon_bug_40607.test
        mysql-test/suite/falcon/t/falcon_bug_40801.test
        mysql-test/suite/falcon/t/falcon_bug_41548.test
        mysql-test/suite/falcon/t/falcon_bug_41582.test
        mysql-test/suite/falcon/t/falcon_bug_41688.test
        mysql-test/suite/falcon/t/falcon_bug_42069.test
        mysql-test/suite/falcon/t/falcon_bug_42196.test
        mysql-test/suite/falcon/t/falcon_ps_repeatable_read.test
        mysql-test/suite/rpl/r/rpl_drop_if_exists.result
        mysql-test/suite/rpl/t/rpl_drop_if_exists.test
        mysql-test/t/innodb_ignore_builtin-master.opt
        mysql-test/t/innodb_ignore_builtin.test
        storage/falcon/SRLInventoryPage.cpp
        storage/falcon/SRLInventoryPage.h
      renamed:
        mysql-test/suite/falcon/r/falcon_bug_34351_C.result => mysql-test/suite/falcon_team/r/falcon_bug_34351_C.result
        mysql-test/suite/falcon/t/falcon_bug_34351_C.test => mysql-test/suite/falcon_team/t/falcon_bug_34351_C.test
        mysql-test/suite/falcon_team/r/falcon_bug_26433.result => mysql-test/suite/falcon/r/falcon_bug_26433.result
        mysql-test/suite/falcon_team/r/falcon_bug_28048.result => mysql-test/suite/falcon/r/falcon_bug_28048.result
        mysql-test/suite/falcon_team/r/falcon_bug_31296.result => mysql-test/suite/falcon/r/falcon_bug_31296.result
        mysql-test/suite/falcon_team/r/falcon_bug_36294.result => mysql-test/suite/falcon_team/r/falcon_bug_36294-big.result
        mysql-test/suite/falcon_team/t/falcon_bug_26433.test => mysql-test/suite/falcon/t/falcon_bug_26433.test
        mysql-test/suite/falcon_team/t/falcon_bug_28048.test => mysql-test/suite/falcon/t/falcon_bug_28048.test
        mysql-test/suite/falcon_team/t/falcon_bug_31296.test => mysql-test/suite/falcon/t/falcon_bug_31296.test
        mysql-test/suite/falcon_team/t/falcon_bug_36294.test => mysql-test/suite/falcon_team/t/falcon_bug_36294-big.test
        netware/BUILD/nwbootstrap => netware/BUILD/nwbuild
      modified:
        .bzr-mysql/default.conf
        BUILD/Makefile.am
        Docs/Makefile.am
        Makefile.am
        client/Makefile.am
        client/mysql.cc
        client/mysqldump.c
        cmd-line-utils/Makefile.am
        cmd-line-utils/libedit/Makefile.am
        cmd-line-utils/libedit/chared.c
        cmd-line-utils/libedit/chared.h
        cmd-line-utils/libedit/common.c
        cmd-line-utils/libedit/config.h
        cmd-line-utils/libedit/el.c
        cmd-line-utils/libedit/el.h
        cmd-line-utils/libedit/el_term.h
        cmd-line-utils/libedit/emacs.c
        cmd-line-utils/libedit/hist.c
        cmd-line-utils/libedit/histedit.h
        cmd-line-utils/libedit/history.c
        cmd-line-utils/libedit/key.c
        cmd-line-utils/libedit/key.h
        cmd-line-utils/libedit/makelist.sh
        cmd-line-utils/libedit/map.c
        cmd-line-utils/libedit/np/fgetln.c
        cmd-line-utils/libedit/np/strlcat.c
        cmd-line-utils/libedit/np/strlcpy.c
        cmd-line-utils/libedit/np/unvis.c
        cmd-line-utils/libedit/np/vis.c
        cmd-line-utils/libedit/np/vis.h
        cmd-line-utils/libedit/parse.c
        cmd-line-utils/libedit/parse.h
        cmd-line-utils/libedit/prompt.c
        cmd-line-utils/libedit/read.c
        cmd-line-utils/libedit/read.h
        cmd-line-utils/libedit/readline.c
        cmd-line-utils/libedit/readline/readline.h
        cmd-line-utils/libedit/refresh.c
        cmd-line-utils/libedit/search.c
        cmd-line-utils/libedit/sig.c
        cmd-line-utils/libedit/sig.h
        cmd-line-utils/libedit/sys.h
        cmd-line-utils/libedit/term.c
        cmd-line-utils/libedit/tokenizer.c
        cmd-line-utils/libedit/tty.c
        cmd-line-utils/libedit/tty.h
        cmd-line-utils/libedit/vi.c
        cmd-line-utils/readline/Makefile.am
        config/ac-macros/alloca.m4
        config/ac-macros/check_cpu.m4
        config/ac-macros/compiler_flag.m4
        config/ac-macros/ha_ndbcluster.m4
        config/ac-macros/large_file.m4
        config/ac-macros/libevent_configure.m4
        config/ac-macros/misc.m4
        config/ac-macros/readline.m4
        config/ac-macros/ssl.m4
        config/ac-macros/zlib.m4
        configure.in
        dbug/Makefile.am
        extra/CMakeLists.txt*
        extra/Makefile.am
        extra/comp_err.c
        extra/libevent/Makefile.am
        extra/yassl/Makefile.am
        extra/yassl/src/Makefile.am
        extra/yassl/taocrypt/Makefile.am
        extra/yassl/taocrypt/benchmark/Makefile.am
        extra/yassl/taocrypt/src/Makefile.am
        extra/yassl/taocrypt/test/Makefile.am
        extra/yassl/testsuite/Makefile.am
        include/Makefile.am
        include/config-win.h
        include/my_global.h
        include/thr_lock.h
        libmysql/Makefile.am
        libmysql_r/Makefile.am
        libmysqld/Makefile.am
        libmysqld/examples/Makefile.am
        man/Makefile.am
        mysql-test/Makefile.am
        mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test
        mysql-test/extra/rpl_tests/rpl_truncate.test
        mysql-test/extra/rpl_tests/rpl_truncate_helper.test
        mysql-test/include/ps_modify.inc
        mysql-test/include/wait_until_connected_again.inc
        mysql-test/lib/My/SafeProcess/safe_process_win.cc
        mysql-test/lib/mtr_report.pm
        mysql-test/lib/mtr_unique.pm
        mysql-test/lib/v1/mtr_report.pl
        mysql-test/lib/v1/mysql-test-run.pl
        mysql-test/mysql-test-run.pl
        mysql-test/r/auto_increment.result
        mysql-test/r/commit_1innodb.result
        mysql-test/r/csv_not_null.result
        mysql-test/r/delayed.result
        mysql-test/r/func_misc.result
        mysql-test/r/func_sapdb.result
        mysql-test/r/grant.result
        mysql-test/r/grant2.result
        mysql-test/r/information_schema.result
        mysql-test/r/lock_tables_lost_commit.result
        mysql-test/r/lowercase_table.result
        mysql-test/r/merge.result
        mysql-test/r/multi_update.result
        mysql-test/r/myisampack.result
        mysql-test/r/mysqlbinlog_row_trans.result
        mysql-test/r/mysqldump.result
        mysql-test/r/null.result
        mysql-test/r/outfile.result
        mysql-test/r/packet.result
        mysql-test/r/ps_2myisam.result
        mysql-test/r/ps_3innodb.result
        mysql-test/r/ps_4heap.result
        mysql-test/r/ps_5merge.result
        mysql-test/r/query_cache_notembedded.result
        mysql-test/r/read_only.result
        mysql-test/r/status.result
        mysql-test/r/subselect.result
        mysql-test/r/subselect_no_mat.result
        mysql-test/r/subselect_no_opts.result
        mysql-test/r/subselect_no_semijoin.result
        mysql-test/r/synchronization.result
        mysql-test/r/warnings.result
        mysql-test/r/windows.result
        mysql-test/r/xml.result
        mysql-test/suite/backup/r/backup_tablespace.result
        mysql-test/suite/backup_engines/t/disabled.def
        mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result
        mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result
        mysql-test/suite/binlog/r/binlog_unsafe.result
        mysql-test/suite/binlog/t/binlog_unsafe.test
        mysql-test/suite/binlog/t/disabled.def
        mysql-test/suite/falcon/r/falcon_bug_29246.result
        mysql-test/suite/falcon/r/falcon_bug_32398.result
        mysql-test/suite/falcon/r/falcon_bug_32833.result
        mysql-test/suite/falcon/r/falcon_online_index.result
        mysql-test/suite/falcon/r/falcon_options.result
        mysql-test/suite/falcon/r/falcon_options2.result
        mysql-test/suite/falcon/r/ps_8falcon.result
        mysql-test/suite/falcon/t/disabled.def
        mysql-test/suite/falcon/t/falcon_bug.template
        mysql-test/suite/falcon/t/falcon_bug_22180.test
        mysql-test/suite/falcon/t/falcon_bug_23689.test
        mysql-test/suite/falcon/t/falcon_bug_24511.test
        mysql-test/suite/falcon/t/falcon_bug_24858.test
        mysql-test/suite/falcon/t/falcon_bug_24921.test
        mysql-test/suite/falcon/t/falcon_bug_25555.test
        mysql-test/suite/falcon/t/falcon_bug_26057.test
        mysql-test/suite/falcon/t/falcon_bug_27697.test
        mysql-test/suite/falcon/t/falcon_bug_29246.test
        mysql-test/suite/falcon/t/falcon_bug_30480_A.test
        mysql-test/suite/falcon/t/falcon_bug_30480_B.test
        mysql-test/suite/falcon/t/falcon_bug_32398.test
        mysql-test/suite/falcon/t/falcon_bug_32833.test
        mysql-test/suite/falcon/t/falcon_bug_38304.test
        mysql-test/suite/falcon/t/falcon_bug_39708.test
        mysql-test/suite/falcon/t/falcon_bugs.test
        mysql-test/suite/falcon/t/falcon_bugs2.test
        mysql-test/suite/falcon/t/falcon_deadlock_collection.test
        mysql-test/suite/falcon/t/falcon_online_index.test
        mysql-test/suite/falcon/t/falcon_select.test
        mysql-test/suite/falcon/t/falcon_unicode-big.test
        mysql-test/suite/falcon_team/r/falcon_deadlock.result
        mysql-test/suite/falcon_team/t/falcon_bug_34174.test
        mysql-test/suite/falcon_team/t/falcon_bug_34351_B.test
        mysql-test/suite/falcon_team/t/falcon_deadlock.test
        mysql-test/suite/falcon_team/t/test2bug.def
        mysql-test/suite/funcs_1/r/innodb_trig_09.result
        mysql-test/suite/funcs_1/r/memory_trig_09.result
        mysql-test/suite/funcs_1/r/myisam_trig_09.result
        mysql-test/suite/funcs_1/r/ndb_trig_09.result
        mysql-test/suite/funcs_1/triggers/triggers_09.inc
        mysql-test/suite/ndb/r/ps_7ndb.result
        mysql-test/suite/parts/inc/partition_auto_increment.inc
        mysql-test/suite/parts/r/partition_auto_increment_blackhole.result
        mysql-test/suite/parts/r/partition_auto_increment_falcon.result
        mysql-test/suite/parts/r/partition_auto_increment_innodb.result
        mysql-test/suite/parts/r/partition_auto_increment_maria.result
        mysql-test/suite/parts/r/partition_auto_increment_memory.result
        mysql-test/suite/parts/r/partition_auto_increment_myisam.result
        mysql-test/suite/parts/r/partition_auto_increment_ndb.result
        mysql-test/suite/rpl/r/rpl_extraColmaster_falcon.result
        mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result
        mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result
        mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result
        mysql-test/suite/rpl/r/rpl_sp.result
        mysql-test/suite/rpl/r/rpl_truncate_2myisam.result
        mysql-test/suite/rpl/r/rpl_truncate_3innodb.result
        mysql-test/suite/rpl/r/rpl_truncate_falcon.result
        mysql-test/suite/rpl/t/rpl_err_ignoredtable.test
        mysql-test/suite/rpl/t/rpl_heartbeat.test
        mysql-test/suite/rpl/t/rpl_truncate_falcon.test
        mysql-test/t/auto_increment.test
        mysql-test/t/check.test
        mysql-test/t/compress.test
        mysql-test/t/csv_not_null.test
        mysql-test/t/delayed.test
        mysql-test/t/disabled.def
        mysql-test/t/func_misc.test
        mysql-test/t/func_sapdb.test
        mysql-test/t/grant.test
        mysql-test/t/grant2.test
        mysql-test/t/grant3.test
        mysql-test/t/information_schema.test
        mysql-test/t/lock_tables_lost_commit.test
        mysql-test/t/lowercase_table.test
        mysql-test/t/merge.test
        mysql-test/t/multi_update.test
        mysql-test/t/myisampack.test
        mysql-test/t/mysqldump.test
        mysql-test/t/null.test
        mysql-test/t/openssl_1.test
        mysql-test/t/outfile.test
        mysql-test/t/overflow.test
        mysql-test/t/packet.test
        mysql-test/t/query_cache_notembedded.test
        mysql-test/t/read_only.test
        mysql-test/t/rename.test
        mysql-test/t/sp-threads.test
        mysql-test/t/status.test
        mysql-test/t/subselect.test
        mysql-test/t/synchronization.test
        mysql-test/t/timezone_grant.test
        mysql-test/t/warnings.test
        mysql-test/t/windows.test
        mysql-test/t/xml.test
        mysys/Makefile.am
        mysys/tests/Makefile.am
        mysys/thr_lock.c
        netware/Makefile.am
        plugin/Makefile.am
        plugin/audit_null/Makefile.am
        plugin/daemon_example/Makefile.am
        plugin/fulltext/Makefile.am
        pstack/Makefile.am
        pstack/aout/Makefile.am
        regex/Makefile.am
        scripts/Makefile.am
        scripts/make_win_bin_dist
        scripts/mysqld_multi.sh
        sql-bench/Makefile.am
        sql-bench/bench-init.pl.sh
        sql-common/Makefile.am
        sql/CMakeLists.txt
        sql/Makefile.am
        sql/backup/Makefile.am
        sql/item.cc
        sql/item_timefunc.h
        sql/item_xmlfunc.cc
        sql/lock.cc
        sql/log_event.cc
        sql/mysql_priv.h
        sql/mysqld.cc
        sql/set_var.cc
        sql/share/Makefile.am
        sql/share/errmsg.txt
        sql/sql_base.cc
        sql/sql_class.cc
        sql/sql_db.cc
        sql/sql_delete.cc
        sql/sql_insert.cc
        sql/sql_parse.cc
        sql/sql_plugin.cc
        sql/sql_select.cc
        sql/sql_select.h
        sql/sql_show.cc
        sql/sql_show.h
        sql/sql_tablespace.cc
        sql/sql_update.cc
        sql/sql_yacc.yy
        sql/table.cc
        storage/Makefile.am
        storage/archive/Makefile.am
        storage/blackhole/Makefile.am
        storage/csv/Makefile.am
        storage/example/Makefile.am
        storage/falcon/BackLog.cpp
        storage/falcon/CMakeLists.txt
        storage/falcon/Connection.cpp
        storage/falcon/DataPage.h
        storage/falcon/Database.cpp
        storage/falcon/Database.h
        storage/falcon/DateTime.cpp
        storage/falcon/Dbb.cpp
        storage/falcon/Dbb.h
        storage/falcon/DeferredIndex.cpp
        storage/falcon/DeferredIndex.h
        storage/falcon/Engine.h
        storage/falcon/IO.cpp
        storage/falcon/Index.cpp
        storage/falcon/Interlock.h
        storage/falcon/Makefile.am
        storage/falcon/MemMgr.cpp
        storage/falcon/MemMgr.h
        storage/falcon/PageInventoryPage.cpp
        storage/falcon/Record.cpp
        storage/falcon/Record.h
        storage/falcon/RecordGroup.cpp
        storage/falcon/RecordGroup.h
        storage/falcon/RecordLeaf.cpp
        storage/falcon/RecordLeaf.h
        storage/falcon/RecordLocatorPage.cpp
        storage/falcon/RecordScavenge.cpp
        storage/falcon/RecordScavenge.h
        storage/falcon/RecordSection.cpp
        storage/falcon/RecordSection.h
        storage/falcon/RecordVersion.cpp
        storage/falcon/RecordVersion.h
        storage/falcon/SRLCommit.cpp
        storage/falcon/SRLCreateTableSpace.cpp
        storage/falcon/SRLPrepare.cpp
        storage/falcon/SRLRollback.cpp
        storage/falcon/SRLRollback.h
        storage/falcon/SRLUpdateIndex.cpp
        storage/falcon/SRLUpdateRecords.cpp
        storage/falcon/SRLUpdateRecords.h
        storage/falcon/SRLVersion.h
        storage/falcon/Scavenger.cpp
        storage/falcon/Section.cpp
        storage/falcon/SerialLog.cpp
        storage/falcon/SerialLogControl.cpp
        storage/falcon/SerialLogControl.h
        storage/falcon/SerialLogRecord.cpp
        storage/falcon/SerialLogRecord.h
        storage/falcon/SparseArray.h
        storage/falcon/Statement.cpp
        storage/falcon/StorageDatabase.cpp
        storage/falcon/StorageDatabase.h
        storage/falcon/StorageHandler.cpp
        storage/falcon/StorageParameters.h
        storage/falcon/StorageTable.cpp
        storage/falcon/StorageTable.h
        storage/falcon/StorageTableShare.cpp
        storage/falcon/StorageTableShare.h
        storage/falcon/StorageVersion.h
        storage/falcon/SyncObject.cpp
        storage/falcon/SyncObject.h
        storage/falcon/Table.cpp
        storage/falcon/Table.h
        storage/falcon/TableSpaceManager.cpp
        storage/falcon/TableSpaceManager.h
        storage/falcon/Thread.cpp
        storage/falcon/Thread.h
        storage/falcon/Transaction.cpp
        storage/falcon/Transaction.h
        storage/falcon/TransactionManager.cpp
        storage/falcon/TransactionManager.h
        storage/falcon/TransformLib/Makefile.am
        storage/falcon/ha_falcon.cpp
        storage/falcon/ha_falcon.h
        storage/falcon/plug.in
        storage/federated/Makefile.am
        storage/heap/Makefile.am
        storage/innobase/Makefile.am
        storage/innobase/handler/ha_innodb.cc
        storage/maria/Makefile.am
        storage/maria/plug.in
        storage/maria/unittest/Makefile.am
        storage/myisam/Makefile.am
        storage/myisam/myisampack.c
        storage/myisammrg/Makefile.am
        storage/myisammrg/myrg_open.c
        storage/ndb/Makefile.am
        storage/ndb/config/common.mk.am
        storage/ndb/config/type_kernel.mk.am
        storage/ndb/config/type_mgmapiclient.mk.am
        storage/ndb/config/type_ndbapi.mk.am
        storage/ndb/config/type_ndbapiclient.mk.am
        storage/ndb/config/type_ndbapitest.mk.am
        storage/ndb/config/type_ndbapitools.mk.am
        storage/ndb/config/type_util.mk.am
        storage/ndb/docs/Makefile.am
        storage/ndb/include/Makefile.am
        storage/ndb/src/Makefile.am
        storage/ndb/src/common/Makefile.am
        storage/ndb/src/common/debugger/Makefile.am
        storage/ndb/src/common/debugger/signaldata/Makefile.am
        storage/ndb/src/common/logger/Makefile.am
        storage/ndb/src/common/mgmcommon/Makefile.am
        storage/ndb/src/common/portlib/Makefile.am
        storage/ndb/src/common/transporter/Makefile.am
        storage/ndb/src/common/transporter/TransporterRegistry.cpp
        storage/ndb/src/common/util/Makefile.am
        storage/ndb/src/cw/Makefile.am
        storage/ndb/src/cw/cpcd/Makefile.am
        storage/ndb/src/kernel/Makefile.am
        storage/ndb/src/kernel/blocks/Makefile.am
        storage/ndb/src/kernel/blocks/backup/Makefile.am
        storage/ndb/src/kernel/blocks/dbdict/Makefile.am
        storage/ndb/src/kernel/blocks/dbdih/Makefile.am
        storage/ndb/src/kernel/blocks/dblqh/Makefile.am
        storage/ndb/src/kernel/blocks/dbtup/Makefile.am
        storage/ndb/src/kernel/error/Makefile.am
        storage/ndb/src/kernel/vm/Makefile.am
        storage/ndb/src/mgmapi/Makefile.am
        storage/ndb/src/mgmclient/Makefile.am
        storage/ndb/src/mgmsrv/Makefile.am
        storage/ndb/src/ndbapi/Makefile.am
        storage/ndb/swig/Makefile.am
        storage/ndb/test/Makefile.am
        storage/ndb/test/ndbapi/Makefile.am
        storage/ndb/test/ndbapi/bank/Makefile.am
        storage/ndb/test/run-test/Makefile.am
        storage/ndb/test/src/Makefile.am
        storage/ndb/test/tools/Makefile.am
        storage/ndb/tools/Makefile.am
        strings/Makefile.am
        support-files/MacOSX/Makefile.am
        support-files/Makefile.am
        support-files/RHEL4-SElinux/Makefile.am
        tests/Makefile.am
        unittest/Makefile.am
        unittest/examples/Makefile.am
        unittest/mysys/Makefile.am
        unittest/mytap/Makefile.am
        unittest/mytap/t/Makefile.am
        vio/Makefile.am
        win/Makefile.am
        win/configure.js
        zlib/Makefile.am
        mysql-test/suite/falcon/r/falcon_bug_26433.result
        mysql-test/suite/falcon/t/falcon_bug_26433.test
        mysql-test/suite/falcon_team/t/falcon_bug_36294-big.test
        netware/BUILD/nwbuild

=== modified file '.bzr-mysql/default.conf'
--- a/.bzr-mysql/default.conf	2009-02-12 17:56:03 +0000
+++ b/.bzr-mysql/default.conf	2009-02-16 18:04:46 +0000
@@ -1,5 +1,5 @@
 [MYSQL]
-tree_location = bzr+ssh://bk-internal.mysql.com/bzrroot/server/mysql-6.0-bugteam
+tree_location = bzr+ssh://bk-internal.mysql.com/bzrroot/server/mysql-6.0
 post_commit_to = "commits@stripped"
 post_push_to = "commits@stripped"
-tree_name = "mysql-6.0-bugteam"
+tree_name = mysql-6.0

=== modified file 'mysql-test/r/innodb_mysql.result'
--- a/mysql-test/r/innodb_mysql.result	2009-02-02 12:28:30 +0000
+++ b/mysql-test/r/innodb_mysql.result	2009-02-12 18:27:05 +0000
@@ -1848,3 +1848,24 @@ TRUNCATE TABLE t2;
 DROP TABLE t2;
 DROP TABLE t1;
 End of 5.1 tests
+#
+# BUG#42744: Crash when using a join buffer to join a table with a blob
+# column and an additional column used for duplicate elimination.
+#
+CREATE TABLE t1 (a tinyblob) ENGINE=InnoDB;
+CREATE TABLE t2 (a int PRIMARY KEY,  b tinyblob) ENGINE=InnoDB;
+INSERT INTO t1 VALUES ('1'), (NULL);
+INSERT INTO t2 VALUES (1, '1');
+set join_cache_level=1;
+EXPLAIN
+SELECT t2.b FROM t1,t2 WHERE t1.a IN (SELECT 1 FROM t2);
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	t2	ALL	NULL	NULL	NULL	NULL	1	Start temporary
+1	PRIMARY	t2	index	NULL	PRIMARY	4	NULL	1	Using index; Using join buffer
+1	PRIMARY	t1	ALL	NULL	NULL	NULL	NULL	2	Using where; End temporary; Using join buffer
+SELECT t2.b FROM t1,t2 WHERE t1.a IN (SELECT 1 FROM t2);
+b
+1
+set join_cache_level=default;
+DROP TABLE t1,t2;
+End of 6.0 tests

=== modified file 'mysql-test/r/join_cache.result'
--- a/mysql-test/r/join_cache.result	2009-01-14 10:29:36 +0000
+++ b/mysql-test/r/join_cache.result	2009-02-12 00:02:09 +0000
@@ -3679,12 +3679,12 @@ SELECT t1.a, t2.a, t3.a, t2.b, t3.b, t3.
 FROM (t1,t2) LEFT JOIN t3 ON (t1.a=t3.a AND t2.b=t3.b) 
 WHERE t1.a=t2.a;
 a	a	a	b	b	val
-2	2	2	30	30	0
 1	1	NULL	10	NULL	NULL
 1	1	NULL	20	NULL	NULL
 1	1	NULL	30	NULL	NULL
 1	1	NULL	40	NULL	NULL
 1	1	NULL	50	NULL	NULL
+2	2	2	30	30	0
 2	2	2	40	40	0
 2	2	2	50	50	0
 2	2	2	60	60	0

=== modified file 'mysql-test/r/kill.result'
--- a/mysql-test/r/kill.result	2008-08-18 05:43:50 +0000
+++ b/mysql-test/r/kill.result	2009-02-13 17:00:42 +0000
@@ -138,107 +138,4 @@ KILL CONNECTION_ID();
 # of close of the connection socket
 SELECT 1;
 Got one of the listed errors
-#
-# Additional test for WL#3726 "DDL locking for all metadata objects"
-# Check that DDL and DML statements waiting for metadata locks can
-# be killed. Note that we don't cover all situations here since it
-# can be tricky to write test case for some of them (e.g. REPAIR or
-# ALTER and other statements under LOCK TABLES).
-#
-drop tables if exists t1, t2, t3;
-create table t1 (i int primary key);
-# Test for RENAME TABLE
-# Switching to connection 'blocker'
-lock table t1 read;
-# Switching to connection 'ddl'
-rename table t1 to t2;
-# Switching to connection 'default'
-kill query ID;
-# Switching to connection 'ddl'
-ERROR 70100: Query execution was interrupted
-# Test for DROP TABLE
-drop table t1;
-# Switching to connection 'default'
-kill query ID;
-# Switching to connection 'ddl'
-ERROR 70100: Query execution was interrupted
-# Test for CREATE TRIGGER
-create trigger t1_bi before insert on t1 for each row set @a:=1;
-# Switching to connection 'default'
-kill query ID;
-# Switching to connection 'ddl'
-ERROR 70100: Query execution was interrupted
-#
-# Tests for various kinds of ALTER TABLE
-#
-# Full-blown ALTER which should copy table
-alter table t1 add column j int;
-# Switching to connection 'default'
-kill query ID;
-# Switching to connection 'ddl'
-ERROR 70100: Query execution was interrupted
-# Two kinds of simple ALTER
-alter table t1 rename to t2;
-# Switching to connection 'default'
-kill query ID;
-# Switching to connection 'ddl'
-ERROR 70100: Query execution was interrupted
-alter table t1 disable keys;
-# Switching to connection 'default'
-kill query ID;
-# Switching to connection 'ddl'
-ERROR 70100: Query execution was interrupted
-# Fast ALTER
-alter table t1 alter column i set default 100;
-# Switching to connection 'default'
-kill query ID;
-# Switching to connection 'ddl'
-ERROR 70100: Query execution was interrupted
-# Special case which is triggered only for MERGE tables.
-# Switching to connection 'blocker'
-unlock tables;
-create table t2 (i int primary key) engine=merge union=(t1);
-lock tables t2 read;
-# Switching to connection 'ddl'
-alter table t2 alter column i set default 100;
-# Switching to connection 'default'
-kill query ID;
-# Switching to connection 'ddl'
-ERROR 70100: Query execution was interrupted
-# Test for DML waiting for meta-data lock
-# Switching to connection 'blocker'
-unlock tables;
-drop table t2;
-create table t2 (k int);
-lock tables t1 read;
-# Switching to connection 'ddl'
-rename tables t1 to t3, t2 to t1;
-# Switching to connection 'dml'
-insert into t2 values (1);
-# Switching to connection 'default'
-kill query ID2;
-# Switching to connection 'dml'
-ERROR 70100: Query execution was interrupted
-# Switching to connection 'blocker'
-unlock tables;
-# Switching to connection 'ddl'
-# Test for DML waiting for tables to be flushed
-# Switching to connection 'blocker'
-lock tables t1 read;
-# Switching to connection 'ddl'
-# Let us mark locked table t1 as old
-flush tables;
-# Switching to connection 'dml'
-select * from t1;
-# Switching to connection 'default'
-kill query ID2;
-# Switching to connection 'dml'
-ERROR 70100: Query execution was interrupted
-# Switching to connection 'blocker'
-unlock tables;
-# Switching to connection 'ddl'
-# Cleanup.
-# Switching to connection 'default'
-drop table t3;
-drop table t1;
 set @@global.concurrent_insert= @old_concurrent_insert;

=== modified file 'mysql-test/r/partition_hash.result'
--- a/mysql-test/r/partition_hash.result	2008-07-07 20:42:19 +0000
+++ b/mysql-test/r/partition_hash.result	2009-02-05 19:06:44 +0000
@@ -93,7 +93,7 @@ id	select_type	table	partitions	type	pos
 1	SIMPLE	t1	p0,p1,p2,p3	ALL	NULL	NULL	NULL	NULL	9	Using where
 explain partitions select * from t1 where a >= 1 and a <= 5;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p0,p1,p2,p3	ALL	NULL	NULL	NULL	NULL	9	Using where
+1	SIMPLE	t1	p0,p1,p2	ALL	NULL	NULL	NULL	NULL	9	Using where
 drop table t1;
 CREATE TABLE t1 (
 a int not null,

=== modified file 'mysql-test/r/partition_pruning.result'
--- a/mysql-test/r/partition_pruning.result	2009-01-08 10:20:10 +0000
+++ b/mysql-test/r/partition_pruning.result	2009-02-05 19:06:44 +0000
@@ -951,3 +951,22 @@ explain partitions select * from t1 wher
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t1	p0	ALL	NULL	NULL	NULL	NULL	2	Using where
 drop table t1;
+# 
+# BUG#33730 Full table scan instead selected partitions for query more than 10 partitions
+# 
+create table t0 (a int);
+insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t1 (a int)
+partition by range(a+0) (
+partition p0 values less than (64),
+partition p1 values less than (128),
+partition p2 values less than (255)
+);
+insert into t1 select A.a + 10*B.a from t0 A, t0 B;
+explain partitions select * from t1 where a between 10 and 13;
+id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	p0	ALL	NULL	NULL	NULL	NULL	64	Using where
+explain partitions select * from t1 where a between 10 and 10+33;
+id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	p0,p1,p2	ALL	NULL	NULL	NULL	NULL	100	Using where
+drop table t0, t1;

=== modified file 'mysql-test/suite/binlog/t/disabled.def'
--- a/mysql-test/suite/binlog/t/disabled.def	2009-02-09 23:03:35 +0000
+++ b/mysql-test/suite/binlog/t/disabled.def	2009-02-16 08:39:55 +0000
@@ -13,6 +13,5 @@ binlog_truncate_innodb	: BUG#42643 2009-
 
 binlog_multi_engine     : Bug#30544 istruewing 2007-11-26
 binlog_row_ctype_cp932  : Bug#33376 2007-12-19 mats Write set for table not set correctly when inserting an empty set
-binlog_base64_flag      : Bug#38316 sven 2007-12-14
 binlog_killed           : Bug#39861 kostja 2008-04-20
 binlog_killed_simulate  : Bug#37932 kostja 2008-04-20

=== modified file 'mysql-test/suite/ndb/r/ndb_read_multi_range.result'
--- a/mysql-test/suite/ndb/r/ndb_read_multi_range.result	2009-02-02 15:58:48 +0000
+++ b/mysql-test/suite/ndb/r/ndb_read_multi_range.result	2009-02-13 05:56:16 +0000
@@ -692,3 +692,34 @@ i	i	9
 m	m	13
 v	v	22
 drop table t1, t2;
+create table t1 (
+uid int, fid int, index(uid)
+) engine=ndb;
+insert into t1 values
+(1,1), (1,2), (1,3), (1,4),
+(2,5), (2,6), (2,7), (2,8),
+(3,1), (3,2), (3,9);
+create table t2 (
+uid int primary key, name varchar(128), index(name)
+) engine=ndb;
+insert into t2 values 
+(1, "A"), (2, "B"), (3, "C"), (4, "D"), (5, "E"),
+(6, "F"), (7, "G"), (8, "H"), (9, "I");
+set join_cache_level=7;
+select name from t2, t1 
+where t1.uid in (select t2.uid from t2, t1 where t1.uid=1 and t2.uid=t1.fid)
+and t2.uid=t1.fid;
+name
+A
+A
+B
+B
+C
+D
+E
+F
+G
+H
+I
+set join_cache_level=default;
+drop table t1,t2;

=== modified file 'mysql-test/suite/ndb/t/disabled.def'
--- a/mysql-test/suite/ndb/t/disabled.def	2009-02-02 12:28:30 +0000
+++ b/mysql-test/suite/ndb/t/disabled.def	2009-02-13 16:18:07 +0000
@@ -13,5 +13,4 @@
 ndb_partition_error2	  : Bug#40989 msvensson 2007-06-27 HF is not sure if the test can work as internded on all the platforms
 # the below testcase have been reworked to avoid the bug, test contains comment, keep bug open
 #ndb_binlog_ddl_multi     : BUG#18976 2006-04-10 kent    CRBR: multiple binlog, second binlog may miss schema log events
-ndb_discover_db2          : BUG#41858 2009-01-09 lsoares This has been fixed already by the ndb team. Test should be re-enabled once the fix reaches main tree and merge into rpl tream trees takes place.
-ndb_cache_trans           : Bug#42197 Query cache and autocommit
+ndb_cache_trans           : Bug#42565 ndb_cache_trans failure since SERVER_STATUS_IN_TRANS added to hash key

=== modified file 'mysql-test/suite/ndb/t/ndb_read_multi_range.test'
--- a/mysql-test/suite/ndb/t/ndb_read_multi_range.test	2009-02-02 15:58:48 +0000
+++ b/mysql-test/suite/ndb/t/ndb_read_multi_range.test	2009-02-13 05:56:16 +0000
@@ -535,3 +535,35 @@ select * from t1
     or (a = 'v')
     order by a asc, b asc;
 drop table t1, t2;
+
+
+
+#
+# bug#42593: batched key access join employing a hash table
+#
+
+create table t1 (
+  uid int, fid int, index(uid)
+) engine=ndb;
+insert into t1 values
+  (1,1), (1,2), (1,3), (1,4),
+  (2,5), (2,6), (2,7), (2,8),
+  (3,1), (3,2), (3,9);
+
+create table t2 (
+  uid int primary key, name varchar(128), index(name)
+) engine=ndb;
+insert into t2 values 
+  (1, "A"), (2, "B"), (3, "C"), (4, "D"), (5, "E"),
+  (6, "F"), (7, "G"), (8, "H"), (9, "I");
+
+set join_cache_level=7;
+
+--sorted_result
+select name from t2, t1 
+  where t1.uid in (select t2.uid from t2, t1 where t1.uid=1 and t2.uid=t1.fid)
+        and t2.uid=t1.fid;
+
+set join_cache_level=default;
+
+drop table t1,t2;

=== modified file 'mysql-test/suite/rpl/t/disabled.def'
--- a/mysql-test/suite/rpl/t/disabled.def	2009-01-30 14:13:39 +0000
+++ b/mysql-test/suite/rpl/t/disabled.def	2009-02-14 11:23:14 +0000
@@ -10,11 +10,10 @@
 #
 ##############################################################################
 
-rpl_ndb_multi              : Bug#30751: rpl_ndb_multi missing row in output
-rpl_log_pos                : Bug#8693 Test 'rpl_log_pos' fails sometimes
 rpl_extraColmaster_innodb  : BUG#41097 2008-12-12 sven result files for rpl_extraColmaster_myisam, rpl_extraColmaster_innodb are gone
 rpl_extraColmaster_myisam  : BUG#41097 2008-12-12 sven result files for rpl_extraColmaster_myisam, rpl_extraColmaster_innodb are gone
 rpl_row_until              : BUG#41423 2008-12-12 sven rpl_row_until needs maintenance
-rpl_binlog_corruption : BUG#41793 2008-12-30 sven rpl_binlog_corruption disabled in main (needs new mtr)
+rpl_binlog_corruption      : BUG#41793 2008-12-30 sven rpl_binlog_corruption disabled in main (needs new mtr)
 rpl_extraCol_falcon        : Bug#40930 2008-11-21 johnemb rpl.rpl_extraCol_falcon fails doing STOP SLAVE (on Windows PB2)
-rpl_cross_version	   : Bug #42311 2009-01-23 aelkin
+rpl_cross_version	   : Bug#42311 2009-01-23 aelkin
+rpl_log_pos                : Bug#42858 2009-02-14 alik rpl.rpl_log_pos fails, thus was disabled

=== modified file 'mysql-test/suite/rpl_ndb_big/t/disabled.def'
--- a/mysql-test/suite/rpl_ndb_big/t/disabled.def	2008-12-10 14:32:27 +0000
+++ b/mysql-test/suite/rpl_ndb_big/t/disabled.def	2009-02-13 16:18:07 +0000
@@ -10,6 +10,6 @@
 #
 ##############################################################################
 
-rpl_ndb_circular_simplex : Bug#33849 COMMIT event missing in cluster circular replication.
+rpl_ndb_circular_simplex : Bug#42837 rpl_ndb_big.rpl_ndb_circular_simplex is disabled 
 
 # the below testcase have been reworked to avoid the bug, test contains comment, keep bug open

=== modified file 'mysql-test/suite/sys_vars/t/disabled.def'
--- a/mysql-test/suite/sys_vars/t/disabled.def	2009-01-30 14:13:39 +0000
+++ b/mysql-test/suite/sys_vars/t/disabled.def	2009-02-13 16:18:07 +0000
@@ -9,12 +9,12 @@
 #  Do not use any TAB characters for whitespace.
 #
 ##############################################################################
-rpl_recovery_rank_basic_64  : Bug #36522: Some tests of system variables have diffs on 64bit platorms
-query_cache_size_basic_32   : Bug#36747: Allocating a large query cache is not deterministic
-query_cache_size_basic_64   : Bug#36747: Allocating a large query cache is not deterministic
-query_alloc_block_size_basic_64:  Bug #37708 query_alloc_block_size_basic_64 fails in pushbuild
-max_heap_table_size_basic_32 : Bug#36877 main.max_heap_table_size_basic_32 fails on some systems
-#query_cache_wlock_invalidate_func : Bug#37962 2008-12-08 Test contains sleeps/race conditions
-#thread_cache_size_func            : Bug#40575 2008-11-07 joro main.thread_cache_size_func fails in pushbuild when run with pool of threads
-log_output_basic                  : Bug#40988 log_output_basic.test succeeded though syntactically false.
+rpl_recovery_rank_basic_64          : Bug#42838: sys_vars.rpl_recovery_rank_basic_64 is disabled
+query_alloc_block_size_basic_64     : Bug#42839: sys_vars.query_alloc_block_size_basic_64 is disabled
+query_cache_size_basic_32           : Bug#36747: Allocating a large query cache is not deterministic
+query_cache_size_basic_64           : Bug#36747: Allocating a large query cache is not deterministic
+max_heap_table_size_basic_32        : Bug#36877: main.max_heap_table_size_basic_32 fails on some systems
+#query_cache_wlock_invalidate_func  : Bug#37962: 2008-12-08 Test contains sleeps/race conditions
+#thread_cache_size_func             : Bug#40575: 2008-11-07 joro main.thread_cache_size_func fails in pushbuild when run with pool of threads
+log_output_basic                    : Bug#40988: log_output_basic.test succeeded though syntactically false.
 

=== modified file 'mysql-test/t/disabled.def'
--- a/mysql-test/t/disabled.def	2009-02-04 12:34:03 +0000
+++ b/mysql-test/t/disabled.def	2009-02-16 08:39:55 +0000
@@ -9,35 +9,12 @@
 #  Do not use any TAB characters for whitespace.
 #
 ##############################################################################
-lowercase_table3         : Bug#32667 lowercase_table3.test reports to error log
+lowercase_table3     : Bug#32667 lowercase_table3.test reports to error log
 ctype_create         : Bug#32965 main.ctype_create fails
-csv_alter_table      : Bug#33696 2008-01-21 pcrews no .result file - bug allows NULL columns in CSV tables
+csv_alter_table      : Bug#42831 main.csv_alter_table is disabled 
 cast                 : Bug#35594 2008-03-27 main.cast fails on Windows2003-64
-delayed_insert_limit_func             : BUG#37962 2008-07-08 sven *_func tests containing sleeps/race conditions
-event_scheduler_func                  : BUG#37962 BUG#40816 2008-07-08 sven *_func tests containing sleeps/race conditions
-interactive_timeout_func              : BUG#37962 2008-07-08 sven *_func tests containing sleeps/race conditions
-query_cache_wlock_invalidate_func     : BUG#37962 2008-07-08 sven *_func tests containing sleeps/race conditions
-rpl_init_slave_func                   : BUG#37962 2008-07-08 sven *_func tests containing sleeps/race conditions
-rpl_max_binlog_size_func              : BUG#37962 2008-07-08 sven *_func tests containing sleeps/race conditions
-slow_query_log_func                   : BUG#37962 2008-07-08 sven *_func tests containing sleeps/race conditions
-sql_low_priority_updates_func         : BUG#37962 2008-07-08 sven *_func tests containing sleeps/race conditions
-timestamp_func                        : BUG#37962 2008-07-08 sven *_func tests containing sleeps/race conditions
-log_output_func                       : BUG#37766 2008-07-10 sven main.log_output_func randomly fails in pushbuild
-events_bugs                           : Bug#37774 Bug#39569 Bug#39863 Bug#39848 2008-10-08 alik
-slow_query_log_func                   : Bug #37962: *_func tests containing sleeps/race conditions
-thread_cache_size_func      : Bug#40574 2008-11-07 joro main.thread_cache_size_func fails in pushbuild when run with pool of threads
-innodb_max_dirty_pages_pct_func       : BUG#41018 BUG#39382 2008-12-02 sven test fails often. some failures fill up the disk, causing subsequent failures in many other tests
-log_output_basic     : Bug #40988       log_output_basic.test succeeded though syntactically false.
-innodb               : Bug #41056    Innodb.test shows some difference to its result file.
-innodb                            : Bug#41299 2008-12-08 alik
-federated_transactions            : Bug#29523 Transactions do not work
-;backup_no_engine                  : Bug#36021 2008-04-13 rsomla server crashes when openning table with unknown storage engine
-;backup_triggers_and_events       : Bug#37762 2008-07-01 rafal Test fails on remove_file for unknown reasons
-;backup_no_be                     : Bug#38023 2008-07-16 rafal Test triggers valgrind warnings described in the bug
-user_limits                       : Bug#41147 main.user_limits test fails with user exceeding the 'max_questions' resource (because of thread pool)
-;wait_timeout_func                 : Bug #41225 joro wait_timeout_func fails
-;kill                              : Bug#37780 2008-12-03 HHunger need some changes to be robust enough for pushbuild.
-query_cache_28249                 : Bug#41098 Query Cache returns wrong result with concurrent insert
-innodb_bug39438          : BUG#42383 2009-01-28 lsoares "This fails in embedded and on windows.  Note that this test is not run on windows and on embedded in PB for main trees currently"
-subselect3_jcl6          : BUG#42534 subselect3_jcl6 produces valgrind warnings with MTR2 (2008-02-02 spetrunia)
-join_cache               : Bug#42585 joro main.join_cache fails on powermacg5  
+events_bugs          : Bug#37774 Bug#39569 Bug#39863 Bug#39848 2008-10-08 alik
+innodb               : Bug#41299 2008-12-08 alik
+user_limits          : Bug#42384 thread_handling = pool-of-threads, wrong handling of max_questions user limit
+query_cache_28249    : Bug#41098 Query Cache returns wrong result with concurrent insert
+innodb_bug39438      : BUG#42383 2009-01-28 lsoares "This fails in embedded and on windows.  Note that this test is not run on windows and on embedded in PB for main trees currently"

=== modified file 'mysql-test/t/innodb_mysql.test'
--- a/mysql-test/t/innodb_mysql.test	2009-01-09 10:20:32 +0000
+++ b/mysql-test/t/innodb_mysql.test	2009-02-12 18:27:05 +0000
@@ -185,3 +185,26 @@ DROP TABLE t2;
 DROP TABLE t1;
 
 --echo End of 5.1 tests
+
+--echo #
+--echo # BUG#42744: Crash when using a join buffer to join a table with a blob
+--echo # column and an additional column used for duplicate elimination.
+--echo #
+
+CREATE TABLE t1 (a tinyblob) ENGINE=InnoDB;
+CREATE TABLE t2 (a int PRIMARY KEY,  b tinyblob) ENGINE=InnoDB;
+INSERT INTO t1 VALUES ('1'), (NULL);
+INSERT INTO t2 VALUES (1, '1');
+ 
+set join_cache_level=1;
+
+EXPLAIN
+SELECT t2.b FROM t1,t2 WHERE t1.a IN (SELECT 1 FROM t2);
+
+SELECT t2.b FROM t1,t2 WHERE t1.a IN (SELECT 1 FROM t2);
+
+set join_cache_level=default;
+
+DROP TABLE t1,t2;
+
+--echo End of 6.0 tests

=== modified file 'mysql-test/t/join_cache.test'
--- a/mysql-test/t/join_cache.test	2009-01-14 10:29:36 +0000
+++ b/mysql-test/t/join_cache.test	2009-02-12 00:02:09 +0000
@@ -1070,7 +1070,7 @@ EXPLAIN
 SELECT t1.a, t2.a, t3.a, t2.b, t3.b, t3.val 
   FROM (t1,t2) LEFT JOIN t3 ON (t1.a=t3.a AND t2.b=t3.b) 
     WHERE t1.a=t2.a; 
-
+--sorted_result
 SELECT t1.a, t2.a, t3.a, t2.b, t3.b, t3.val 
   FROM (t1,t2) LEFT JOIN t3 ON (t1.a=t3.a AND t2.b=t3.b) 
     WHERE t1.a=t2.a;

=== modified file 'mysql-test/t/kill.test'
--- a/mysql-test/t/kill.test	2008-08-18 05:43:50 +0000
+++ b/mysql-test/t/kill.test	2009-02-13 17:00:42 +0000
@@ -328,243 +328,247 @@ KILL CONNECTION_ID();
 SELECT 1;
 --connection default
 
---echo #
---echo # Additional test for WL#3726 "DDL locking for all metadata objects"
---echo # Check that DDL and DML statements waiting for metadata locks can
---echo # be killed. Note that we don't cover all situations here since it
---echo # can be tricky to write test case for some of them (e.g. REPAIR or
---echo # ALTER and other statements under LOCK TABLES).
---echo #
---disable_warnings
-drop tables if exists t1, t2, t3;
---enable_warnings
-
-create table t1 (i int primary key);
-connect (blocker, localhost, root, , );
-connect (dml, localhost, root, , );
-connect (ddl, localhost, root, , );
-
---echo # Test for RENAME TABLE
---echo # Switching to connection 'blocker'
-connection blocker;
-lock table t1 read;
---echo # Switching to connection 'ddl'
-connection ddl;
-let $ID= `select connection_id()`;
---send rename table t1 to t2
---echo # Switching to connection 'default'
-connection default;
-let $wait_condition=
-  select count(*) = 1 from information_schema.processlist
-  where state = "Waiting for table" and info = "rename table t1 to t2";
---source include/wait_condition.inc
---replace_result $ID ID
-eval kill query $ID;
---echo # Switching to connection 'ddl'
-connection ddl;
---error ER_QUERY_INTERRUPTED
---reap
-
---echo # Test for DROP TABLE
---send drop table t1
---echo # Switching to connection 'default'
-connection default;
-let $wait_condition=
-  select count(*) = 1 from information_schema.processlist
-  where state = "Waiting for table" and
-        info = "drop table t1";
---source include/wait_condition.inc
---replace_result $ID ID
-eval kill query $ID;
---echo # Switching to connection 'ddl'
-connection ddl;
---error ER_QUERY_INTERRUPTED
---reap
-
---echo # Test for CREATE TRIGGER
---send create trigger t1_bi before insert on t1 for each row set @a:=1
---echo # Switching to connection 'default'
-connection default;
-let $wait_condition=
-  select count(*) = 1 from information_schema.processlist
-  where state = "Waiting for table" and
-        info = "create trigger t1_bi before insert on t1 for each row set @a:=1";
---source include/wait_condition.inc
---replace_result $ID ID
-eval kill query $ID;
---echo # Switching to connection 'ddl'
-connection ddl;
---error ER_QUERY_INTERRUPTED
---reap
-
---echo #
---echo # Tests for various kinds of ALTER TABLE
---echo #
---echo # Full-blown ALTER which should copy table
---send alter table t1 add column j int
---echo # Switching to connection 'default'
-connection default;
-let $wait_condition=
-  select count(*) = 1 from information_schema.processlist
-  where state = "Waiting for table" and
-        info = "alter table t1 add column j int";
---source include/wait_condition.inc
---replace_result $ID ID
-eval kill query $ID;
---echo # Switching to connection 'ddl'
-connection ddl;
---error ER_QUERY_INTERRUPTED
---reap
-
---echo # Two kinds of simple ALTER
---send alter table t1 rename to t2
---echo # Switching to connection 'default'
-connection default;
-let $wait_condition=
-  select count(*) = 1 from information_schema.processlist
-  where state = "Waiting for table" and
-        info = "alter table t1 rename to t2";
---source include/wait_condition.inc
---replace_result $ID ID
-eval kill query $ID;
---echo # Switching to connection 'ddl'
-connection ddl;
---error ER_QUERY_INTERRUPTED
---reap
---send alter table t1 disable keys
---echo # Switching to connection 'default'
-connection default;
-let $wait_condition=
-  select count(*) = 1 from information_schema.processlist
-  where state = "Waiting for table" and
-        info = "alter table t1 disable keys";
---source include/wait_condition.inc
---replace_result $ID ID
-eval kill query $ID;
---echo # Switching to connection 'ddl'
-connection ddl;
---error ER_QUERY_INTERRUPTED
---reap
---echo # Fast ALTER
---send alter table t1 alter column i set default 100
---echo # Switching to connection 'default'
-connection default;
-let $wait_condition=
-  select count(*) = 1 from information_schema.processlist
-  where state = "Waiting for table" and
-        info = "alter table t1 alter column i set default 100";
---source include/wait_condition.inc
---replace_result $ID ID
-eval kill query $ID;
---echo # Switching to connection 'ddl'
-connection ddl;
---error ER_QUERY_INTERRUPTED
---reap
---echo # Special case which is triggered only for MERGE tables.
---echo # Switching to connection 'blocker'
-connection blocker;
-unlock tables;
-create table t2 (i int primary key) engine=merge union=(t1);
-lock tables t2 read;
---echo # Switching to connection 'ddl'
-connection ddl;
---send alter table t2 alter column i set default 100
---echo # Switching to connection 'default'
-connection default;
-let $wait_condition=
-  select count(*) = 1 from information_schema.processlist
-  where state = "Waiting for table" and
-        info = "alter table t2 alter column i set default 100";
---source include/wait_condition.inc
---replace_result $ID ID
-eval kill query $ID;
---echo # Switching to connection 'ddl'
-connection ddl;
---error ER_QUERY_INTERRUPTED
---reap
-
---echo # Test for DML waiting for meta-data lock
---echo # Switching to connection 'blocker'
-connection blocker;
-unlock tables;
-drop table t2;
-create table t2 (k int);
-lock tables t1 read;
---echo # Switching to connection 'ddl'
-connection ddl;
-# Let us add pending exclusive metadata lock on t2
---send rename tables t1 to t3, t2 to t1
---echo # Switching to connection 'dml'
-connection dml;
-let $wait_condition=
-  select count(*) = 1 from information_schema.processlist
-  where state = "Waiting for table" and
-        info = "rename tables t1 to t3, t2 to t1";
---source include/wait_condition.inc
-let $ID2= `select connection_id()`;
---send insert into t2 values (1)
---echo # Switching to connection 'default'
-connection default;
-let $wait_condition=
-  select count(*) = 1 from information_schema.processlist
-  where state = "Waiting for table" and
-        info = "insert into t2 values (1)";
---source include/wait_condition.inc
---replace_result $ID2 ID2
-eval kill query $ID2;
---echo # Switching to connection 'dml'
-connection dml;
---error ER_QUERY_INTERRUPTED
---reap
---echo # Switching to connection 'blocker'
-connection blocker;
-unlock tables;
---echo # Switching to connection 'ddl'
-connection ddl;
---reap
-
---echo # Test for DML waiting for tables to be flushed
---echo # Switching to connection 'blocker'
-connection blocker;
-lock tables t1 read;
---echo # Switching to connection 'ddl'
-connection ddl;
---echo # Let us mark locked table t1 as old
---send flush tables
---echo # Switching to connection 'dml'
-connection dml;
-let $wait_condition=
-  select count(*) = 1 from information_schema.processlist
-  where state = "Flushing tables" and
-        info = "flush tables";
---source include/wait_condition.inc
---send select * from t1
---echo # Switching to connection 'default'
-connection default;
-let $wait_condition=
-  select count(*) = 1 from information_schema.processlist
-  where state = "Waiting for table" and
-        info = "select * from t1";
---source include/wait_condition.inc
---replace_result $ID2 ID2
-eval kill query $ID2;
---echo # Switching to connection 'dml'
-connection dml;
---error ER_QUERY_INTERRUPTED
---reap
---echo # Switching to connection 'blocker'
-connection blocker;
-unlock tables;
---echo # Switching to connection 'ddl'
-connection ddl;
---reap
-
---echo # Cleanup.
---echo # Switching to connection 'default'
-connection default;
-drop table t3;
-drop table t1;
-
+###########################################################################
+#
+#
+#
+# --echo #
+# --echo # Additional test for WL#3726 "DDL locking for all metadata objects"
+# --echo # Check that DDL and DML statements waiting for metadata locks can
+# --echo # be killed. Note that we don't cover all situations here since it
+# --echo # can be tricky to write test case for some of them (e.g. REPAIR or
+# --echo # ALTER and other statements under LOCK TABLES).
+# --echo #
+# --disable_warnings
+# drop tables if exists t1, t2, t3;
+# --enable_warnings
+# 
+# create table t1 (i int primary key);
+# connect (blocker, localhost, root, , );
+# connect (dml, localhost, root, , );
+# connect (ddl, localhost, root, , );
+# 
+# --echo # Test for RENAME TABLE
+# --echo # Switching to connection 'blocker'
+# connection blocker;
+# lock table t1 read;
+# --echo # Switching to connection 'ddl'
+# connection ddl;
+# let $ID= `select connection_id()`;
+# --send rename table t1 to t2
+# --echo # Switching to connection 'default'
+# connection default;
+# let $wait_condition=
+#   select count(*) = 1 from information_schema.processlist
+#   where state = "Waiting for table" and info = "rename table t1 to t2";
+# --source include/wait_condition.inc
+# --replace_result $ID ID
+# eval kill query $ID;
+# --echo # Switching to connection 'ddl'
+# connection ddl;
+# --error ER_QUERY_INTERRUPTED
+# --reap
+# 
+# --echo # Test for DROP TABLE
+# --send drop table t1
+# --echo # Switching to connection 'default'
+# connection default;
+# let $wait_condition=
+#   select count(*) = 1 from information_schema.processlist
+#   where state = "Waiting for table" and
+#         info = "drop table t1";
+# --source include/wait_condition.inc
+# --replace_result $ID ID
+# eval kill query $ID;
+# --echo # Switching to connection 'ddl'
+# connection ddl;
+# --error ER_QUERY_INTERRUPTED
+# --reap
+# 
+# --echo # Test for CREATE TRIGGER
+# --send create trigger t1_bi before insert on t1 for each row set @a:=1
+# --echo # Switching to connection 'default'
+# connection default;
+# let $wait_condition=
+#   select count(*) = 1 from information_schema.processlist
+#   where state = "Waiting for table" and
+#         info = "create trigger t1_bi before insert on t1 for each row set @a:=1";
+# --source include/wait_condition.inc
+# --replace_result $ID ID
+# eval kill query $ID;
+# --echo # Switching to connection 'ddl'
+# connection ddl;
+# --error ER_QUERY_INTERRUPTED
+# --reap
+# 
+# --echo #
+# --echo # Tests for various kinds of ALTER TABLE
+# --echo #
+# --echo # Full-blown ALTER which should copy table
+# --send alter table t1 add column j int
+# --echo # Switching to connection 'default'
+# connection default;
+# let $wait_condition=
+#   select count(*) = 1 from information_schema.processlist
+#   where state = "Waiting for table" and
+#         info = "alter table t1 add column j int";
+# --source include/wait_condition.inc
+# --replace_result $ID ID
+# eval kill query $ID;
+# --echo # Switching to connection 'ddl'
+# connection ddl;
+# --error ER_QUERY_INTERRUPTED
+# --reap
+# 
+# --echo # Two kinds of simple ALTER
+# --send alter table t1 rename to t2
+# --echo # Switching to connection 'default'
+# connection default;
+# let $wait_condition=
+#   select count(*) = 1 from information_schema.processlist
+#   where state = "Waiting for table" and
+#         info = "alter table t1 rename to t2";
+# --source include/wait_condition.inc
+# --replace_result $ID ID
+# eval kill query $ID;
+# --echo # Switching to connection 'ddl'
+# connection ddl;
+# --error ER_QUERY_INTERRUPTED
+# --reap
+# --send alter table t1 disable keys
+# --echo # Switching to connection 'default'
+# connection default;
+# let $wait_condition=
+#   select count(*) = 1 from information_schema.processlist
+#   where state = "Waiting for table" and
+#         info = "alter table t1 disable keys";
+# --source include/wait_condition.inc
+# --replace_result $ID ID
+# eval kill query $ID;
+# --echo # Switching to connection 'ddl'
+# connection ddl;
+# --error ER_QUERY_INTERRUPTED
+# --reap
+# --echo # Fast ALTER
+# --send alter table t1 alter column i set default 100
+# --echo # Switching to connection 'default'
+# connection default;
+# let $wait_condition=
+#   select count(*) = 1 from information_schema.processlist
+#   where state = "Waiting for table" and
+#         info = "alter table t1 alter column i set default 100";
+# --source include/wait_condition.inc
+# --replace_result $ID ID
+# eval kill query $ID;
+# --echo # Switching to connection 'ddl'
+# connection ddl;
+# --error ER_QUERY_INTERRUPTED
+# --reap
+# --echo # Special case which is triggered only for MERGE tables.
+# --echo # Switching to connection 'blocker'
+# connection blocker;
+# unlock tables;
+# create table t2 (i int primary key) engine=merge union=(t1);
+# lock tables t2 read;
+# --echo # Switching to connection 'ddl'
+# connection ddl;
+# --send alter table t2 alter column i set default 100
+# --echo # Switching to connection 'default'
+# connection default;
+# let $wait_condition=
+#   select count(*) = 1 from information_schema.processlist
+#   where state = "Waiting for table" and
+#         info = "alter table t2 alter column i set default 100";
+# --source include/wait_condition.inc
+# --replace_result $ID ID
+# eval kill query $ID;
+# --echo # Switching to connection 'ddl'
+# connection ddl;
+# --error ER_QUERY_INTERRUPTED
+# --reap
+# 
+# --echo # Test for DML waiting for meta-data lock
+# --echo # Switching to connection 'blocker'
+# connection blocker;
+# unlock tables;
+# drop table t2;
+# create table t2 (k int);
+# lock tables t1 read;
+# --echo # Switching to connection 'ddl'
+# connection ddl;
+# # Let us add pending exclusive metadata lock on t2
+# --send rename tables t1 to t3, t2 to t1
+# --echo # Switching to connection 'dml'
+# connection dml;
+# let $wait_condition=
+#   select count(*) = 1 from information_schema.processlist
+#   where state = "Waiting for table" and
+#         info = "rename tables t1 to t3, t2 to t1";
+# --source include/wait_condition.inc
+# let $ID2= `select connection_id()`;
+# --send insert into t2 values (1)
+# --echo # Switching to connection 'default'
+# connection default;
+# let $wait_condition=
+#   select count(*) = 1 from information_schema.processlist
+#   where state = "Waiting for table" and
+#         info = "insert into t2 values (1)";
+# --source include/wait_condition.inc
+# --replace_result $ID2 ID2
+# eval kill query $ID2;
+# --echo # Switching to connection 'dml'
+# connection dml;
+# --error ER_QUERY_INTERRUPTED
+# --reap
+# --echo # Switching to connection 'blocker'
+# connection blocker;
+# unlock tables;
+# --echo # Switching to connection 'ddl'
+# connection ddl;
+# --reap
+# 
+# --echo # Test for DML waiting for tables to be flushed
+# --echo # Switching to connection 'blocker'
+# connection blocker;
+# lock tables t1 read;
+# --echo # Switching to connection 'ddl'
+# connection ddl;
+# --echo # Let us mark locked table t1 as old
+# --send flush tables
+# --echo # Switching to connection 'dml'
+# connection dml;
+# let $wait_condition=
+#   select count(*) = 1 from information_schema.processlist
+#   where state = "Flushing tables" and
+#         info = "flush tables";
+# --source include/wait_condition.inc
+# --send select * from t1
+# --echo # Switching to connection 'default'
+# connection default;
+# let $wait_condition=
+#   select count(*) = 1 from information_schema.processlist
+#   where state = "Waiting for table" and
+#         info = "select * from t1";
+# --source include/wait_condition.inc
+# --replace_result $ID2 ID2
+# eval kill query $ID2;
+# --echo # Switching to connection 'dml'
+# connection dml;
+# --error ER_QUERY_INTERRUPTED
+# --reap
+# --echo # Switching to connection 'blocker'
+# connection blocker;
+# unlock tables;
+# --echo # Switching to connection 'ddl'
+# connection ddl;
+# --reap
+# 
+# --echo # Cleanup.
+# --echo # Switching to connection 'default'
+# connection default;
+# drop table t3;
+# drop table t1;
+# 
 ###########################################################################
 
 # Restore global concurrent_insert value. Keep in the end of the test file.

=== modified file 'mysql-test/t/partition_pruning.test'
--- a/mysql-test/t/partition_pruning.test	2008-12-28 11:33:49 +0000
+++ b/mysql-test/t/partition_pruning.test	2009-02-05 19:06:44 +0000
@@ -808,3 +808,22 @@ INSERT INTO t1 VALUES ('2006-03-01 12:00
 -- echo must use p0 only:
 explain partitions select * from t1 where recdate < '2006-01-01 00:00:00';
 drop table t1;
+
+-- echo # 
+-- echo # BUG#33730 Full table scan instead selected partitions for query more than 10 partitions
+-- echo # 
+create table t0 (a int);
+insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t1 (a int)
+  partition by range(a+0) (
+  partition p0 values less than (64),
+  partition p1 values less than (128),
+  partition p2 values less than (255)
+);
+insert into t1 select A.a + 10*B.a from t0 A, t0 B;
+
+# this will use interval_via_walking
+explain partitions select * from t1 where a between 10 and 13;
+explain partitions select * from t1 where a between 10 and 10+33;
+
+drop table t0, t1;

=== modified file 'sql/sql_join_cache.cc'
--- a/sql/sql_join_cache.cc	2009-01-26 15:07:22 +0000
+++ b/sql/sql_join_cache.cc	2009-02-13 05:56:16 +0000
@@ -163,9 +163,8 @@ void JOIN_CACHE::calc_record_fields()
   referenced_fields= 0;
 
   for ( ; tab < join_tab ; tab++)
-  {
-    if (!tab->used_fieldlength)	    
-      calc_used_field_length(join->thd, tab);
+  {	    
+    calc_used_field_length(join->thd, tab);
     flag_fields+= test(tab->used_null_fields || tab->used_uneven_bit_fields);
     flag_fields+= test(tab->table->maybe_null);
     fields+= tab->used_fields;
@@ -1149,7 +1148,7 @@ void JOIN_CACHE::reset(bool for_writing)
   if (for_writing)
   {
     records= 0;
-    last_rec_pos= buff-1;
+    last_rec_pos= buff;
     aux_buff_size= 0;
     end_pos= pos;
     last_rec_blob_data_is_in_rec_buff= 0;
@@ -1320,7 +1319,7 @@ uint JOIN_CACHE::read_all_record_fields(
 {
   uchar *init_pos= pos;
   
-  if (pos > last_rec_pos)
+  if (pos > last_rec_pos || !records)
     return 0;
 
   /* First match flag, read null bitmaps and null_row flag for each table */
@@ -2243,7 +2242,7 @@ enum_nested_loop_state JOIN_CACHE_BKA::j
   if (!records)
     return NESTED_LOOP_OK;  
                    
-  rc= init_join_matching_records(&seq_funcs);
+  rc= init_join_matching_records(&seq_funcs, records);
   if (rc != NESTED_LOOP_OK)
     goto finish;
 
@@ -2287,6 +2286,7 @@ finish:                  
   SYNOPSIS
     init_join_matching_records()
       seq_funcs    structure of range sequence interface
+      ranges       number of keys/ranges in the sequence
 
   DESCRIPTION
     This function calls the multi_range_read_init function to set up
@@ -2299,14 +2299,16 @@ finish:                  
     intended invocation of the join_matching_records method. The
     multi_range_read_init function also receives the parameters for
     MRR buffer to be used and flags specifying the mode in which
-    this buffer will be functioning. 
+    this buffer will be functioning.
+    The number of keys in the sequence expected by multi_range_read_init
+    is passed through the parameter ranges.  
     
   RETURN
     return one of enum_nested_loop_state
 */
 
 enum_nested_loop_state 
-JOIN_CACHE_BKA::init_join_matching_records(RANGE_SEQ_IF *seq_funcs)
+JOIN_CACHE_BKA::init_join_matching_records(RANGE_SEQ_IF *seq_funcs, uint ranges)
 {
   int error;
   handler *file= join_tab->table->file;
@@ -2332,7 +2334,7 @@ JOIN_CACHE_BKA::init_join_matching_recor
   */ 
   if (!file->inited)
     file->ha_index_init(join_tab->ref.key, 1);
-  if ((error= file->multi_range_read_init(seq_funcs, (void*) this, records,
+  if ((error= file->multi_range_read_init(seq_funcs, (void*) this, ranges,
 					  mrr_mode, &mrr_buff)))
     rc= error < 0 ? NESTED_LOOP_NO_MORE_ROWS: NESTED_LOOP_ERROR;
   
@@ -2412,7 +2414,7 @@ uint JOIN_CACHE_BKA::get_next_key(uchar 
   uchar *init_pos;
   JOIN_CACHE *cache;
   
-  if (pos > last_rec_pos)
+  if (pos > last_rec_pos || !records)
     return 0;
 
   /* Any record in a BKA cache is prepended with its length */
@@ -2526,6 +2528,7 @@ int JOIN_CACHE_BKA_UNIQUE::init()
   DBUG_ENTER("JOIN_CACHE_BKA_UNIQUE::init");
 
   hash_table= 0;
+  key_entries= 0;
 
   if ((rc= JOIN_CACHE_BKA::init()))
     DBUG_RETURN (rc);
@@ -2705,6 +2708,8 @@ bool JOIN_CACHE_BKA_UNIQUE::put_record()
       memcpy(cp, key, key_len);
     }
     last_key_entry= cp;
+    /* Increment the counter of key_entries in the hash table */ 
+    key_entries++;
   }  
   return is_full;
 }
@@ -2862,6 +2867,7 @@ void JOIN_CACHE_BKA_UNIQUE:: cleanup_has
 {
   last_key_entry= hash_table;
   bzero(hash_table, (buff+buff_size)-hash_table);
+  key_entries= 0;
 }
 
 
@@ -3110,7 +3116,7 @@ JOIN_CACHE_BKA_UNIQUE::join_matching_rec
   if (!records)
     return NESTED_LOOP_OK;  
                    
-  rc= init_join_matching_records(&seq_funcs);
+  rc= init_join_matching_records(&seq_funcs, key_entries);
   if (rc != NESTED_LOOP_OK)
     goto finish;
 

=== modified file 'sql/sql_partition.cc'
--- a/sql/sql_partition.cc	2009-02-04 13:08:05 +0000
+++ b/sql/sql_partition.cc	2009-02-12 18:21:57 +0000
@@ -6739,7 +6739,7 @@ int get_part_iter_for_interval_via_mappi
 
 
 /* See get_part_iter_for_interval_via_walking for definition of what this is */
-#define MAX_RANGE_TO_WALK 10
+#define MAX_RANGE_TO_WALK 32
 
 
 /*
@@ -6775,16 +6775,6 @@ int get_part_iter_for_interval_via_mappi
     Intervals with +inf/-inf, and [NULL, c1] interval can be processed but
     that is more tricky and I don't have time to do it right now.
 
-    Additionally we have these requirements:
-    * number of values in the interval must be less then number of
-      [sub]partitions, and 
-    * Number of values in the interval must be less then MAX_RANGE_TO_WALK.
-    
-    The rationale behind these requirements is that if they are not met
-    we're likely to hit most of the partitions and traversing the interval
-    will only add overhead. So it's better return "all partitions used" in
-    that case.
-
   RETURN
     0 - No matching partitions, iterator not initialized
     1 - Some partitions would match, iterator intialized for traversing them
@@ -6880,7 +6870,23 @@ int get_part_iter_for_interval_via_walki
   b += test(!(flags & NEAR_MAX));
   ulonglong n_values= b - a;
   
-  if (n_values > total_parts || n_values > MAX_RANGE_TO_WALK)
+  /*
+    Will it pay off to enumerate all values in the [a..b] range and evaluate
+    the partitioning function for every value? It depends on 
+     1. whether we'll be able to infer that some partitions are not used 
+     2. if time savings from not scanning these partitions will be greater
+        than time spent in enumeration.
+    We will assume that the cost of accessing one extra partition is greater
+    than the cost of evaluating the partitioning function O(#partitions).
+    This means we should jump at any chance to eliminate a partition, which
+    gives us this logic:
+
+    Do the enumeration if
+     - the number of values to enumerate is comparable to the number of
+       partitions, or
+     - there are not many values to enumerate.
+  */
+  if ((n_values > 2*total_parts) && n_values > MAX_RANGE_TO_WALK)
   {
     DBUG_RETURN(-1);
   }

=== modified file 'sql/sql_select.cc'
--- a/sql/sql_select.cc	2009-02-12 17:56:03 +0000
+++ b/sql/sql_select.cc	2009-02-13 17:44:21 +0000
@@ -7881,20 +7881,19 @@ static void fix_semijoin_strategies_for_
 
 
 /*
-  Set up join struct according to best position.
+  Set up join struct according to the picked join order in
   
   SYNOPSIS
     get_best_combination()
-      join  The join to process
+      join  The join to process (the picked join order is mainly in
+            join->best_positions)
 
   DESCRIPTION
-    Setup join structures according the picked join order:
+    Setup join structures according the picked join order
     - finalize semi-join strategy choices (see
         fix_semijoin_strategies_for_picked_join_order)
-
     - create join->join_tab array and put there the JOIN_TABs in the join order
-      
-    - create ref access data structures
+    - create data structures describing ref access methods.
 
   RETURN 
     FALSE  OK

=== modified file 'sql/sql_select.h'
--- a/sql/sql_select.h	2009-02-05 09:45:14 +0000
+++ b/sql/sql_select.h	2009-02-13 20:55:55 +0000
@@ -819,7 +819,8 @@ protected:
   enum_nested_loop_state join_matching_records(bool skip_last);
 
   /* Prepare to search for records that match records from the join buffer */
-  enum_nested_loop_state init_join_matching_records(RANGE_SEQ_IF *seq_funcs);
+  enum_nested_loop_state init_join_matching_records(RANGE_SEQ_IF *seq_funcs,
+                                                    uint ranges);
 
   /* Finish searching for records that match records from the join buffer */
   enum_nested_loop_state end_join_matching_records(enum_nested_loop_state rc);
@@ -974,6 +975,9 @@ private:
   /* Number of hash entries in the hash table */
   uint hash_entries;
 
+  /* Number of key entries in the hash table (number of distinct keys) */
+  uint key_entries;
+
   /* The position of the last key entry in the hash table */
   uchar *last_key_entry;
 

=== modified file 'tests/mysql_client_test.c'
--- a/tests/mysql_client_test.c	2009-01-26 16:03:39 +0000
+++ b/tests/mysql_client_test.c	2009-02-13 17:37:02 +0000
@@ -1810,7 +1810,7 @@ static void test_wl4435()
 
       MYSQL_RES *rs_metadata= mysql_stmt_result_metadata(stmt);
 
-      num_fields= mysql_num_fields(rs_metadata);
+      num_fields= mysql_stmt_field_count(stmt);
       fields= mysql_fetch_fields(rs_metadata);
 
       rs_bind= (MYSQL_BIND *) malloc(sizeof (MYSQL_BIND) * num_fields);
@@ -1926,7 +1926,7 @@ static void test_wl4435()
       if (rc > 0)
       {
         printf("Error: %s (errno: %d)\n",
-               mysql_error(mysql), mysql_errno(mysql));
+               mysql_stmt_error(stmt), mysql_stmt_errno(stmt));
         DIE(rc > 0);
       }
 

Thread
bzr push into mysql-6.0 branch (alik:2698 to 2700)Alexander Nozdrin16 Feb