List:Commits« Previous MessageNext Message »
From:Guilhem Bichot Date:February 13 2009 7:39pm
Subject:bzr push into mysql-6.0 branch (guilhem:2711 to 2713)
View as plain text  
 2713 Guilhem Bichot	2009-02-13
      Merge of changes done to MyISAM in 6.0 only, into Maria. The changes to mysys/mf_keycache.c
      (do bzr diff -r 'revid:revision-id:guilhem@stripped:revision-id:guilhem@stripped'
      to see them) are not merged, because Maria's page cache is too different (hard to apply same fix,
      and don't know if it has same bug); this was a change in case of a block read error.
      modified:
        storage/maria/ha_maria.cc
        storage/maria/maria_backup_engine.cc

 2712 Guilhem Bichot	2009-02-13 [merge]
      Merge of 5.1-maria into 6.0-maria. Except the non-Maria part of changes found here:
      http://lists2.mysql.com/maria/370 http://lists2.mysql.com/maria/380
      which are left for the runtime team to evaluate and/or re-use.
      Propagation of MyISAM changes to Maria will follow.
      added:
        mysql-test/suite/maria/t/maria-preload-master.opt
      modified:
        client/mysqltest.cc
        configure.in
        dbug/dbug.c
        dbug/tests-t.pl
        dbug/user.r
        include/atomic/generic-msvc.h
        include/lf.h
        include/maria.h
        include/my_pthread.h
        include/waiting_threads.h
        mysql-test/mysql-test-run.pl
        mysql-test/r/ctype_utf8.result
        mysql-test/suite/maria/r/maria-big.result
        mysql-test/suite/maria/r/maria-big2.result
        mysql-test/suite/maria/r/maria-connect.result
        mysql-test/suite/maria/r/maria-purge.result
        mysql-test/suite/maria/r/maria-recover.result
        mysql-test/suite/maria/r/maria-recovery-rtree-ft.result
        mysql-test/suite/maria/r/maria-recovery3.result
        mysql-test/suite/maria/r/maria.result
        mysql-test/suite/maria/r/maria_notembedded.result
        mysql-test/suite/maria/r/maria_partition.result
        mysql-test/suite/maria/r/ps_maria.result
        mysql-test/suite/maria/t/maria-autozerofill.test
        mysql-test/suite/maria/t/maria-big.test
        mysql-test/suite/maria/t/maria-big2.test
        mysql-test/suite/maria/t/maria-connect.test
        mysql-test/suite/maria/t/maria-purge.test
        mysql-test/suite/maria/t/maria-recover.test
        mysql-test/suite/maria/t/maria-recovery-rtree-ft.test
        mysql-test/suite/maria/t/maria-recovery3.test
        mysql-test/suite/maria/t/maria.test
        mysql-test/suite/maria/t/maria3.test
        mysql-test/suite/maria/t/maria_notembedded.test
        mysql-test/suite/maria/t/maria_partition.test
        mysql-test/suite/maria/t/maria_showlog_error.test
        mysql-test/suite/maria/t/ps_maria.test
        mysql-test/t/ctype_utf8.test
        mysys/lf_alloc-pin.c
        mysys/lf_hash.c
        mysys/my_static.c
        mysys/my_thr_init.c
        mysys/thr_lock.c
        mysys/thr_mutex.c
        mysys/waiting_threads.c
        sql/item_cmpfunc.cc
        sql/mysqld.cc
        sql/sql_class.cc
        sql/sql_class.h
        sql/sql_insert.cc
        sql/sql_select.cc
        storage/maria/ha_maria.cc
        storage/maria/ma_blockrec.c
        storage/maria/ma_blockrec.h
        storage/maria/ma_check.c
        storage/maria/ma_checkpoint.c
        storage/maria/ma_close.c
        storage/maria/ma_commit.c
        storage/maria/ma_create.c
        storage/maria/ma_dbug.c
        storage/maria/ma_delete_all.c
        storage/maria/ma_delete_table.c
        storage/maria/ma_extra.c
        storage/maria/ma_ft_boolean_search.c
        storage/maria/ma_ft_parser.c
        storage/maria/ma_ftdefs.h
        storage/maria/ma_key_recover.c
        storage/maria/ma_locking.c
        storage/maria/ma_loghandler.c
        storage/maria/ma_loghandler.h
        storage/maria/ma_open.c
        storage/maria/ma_pagecache.c
        storage/maria/ma_recovery.c
        storage/maria/ma_rename.c
        storage/maria/ma_rt_index.c
        storage/maria/ma_state.c
        storage/maria/ma_state.h
        storage/maria/ma_write.c
        storage/maria/maria_def.h
        storage/maria/maria_pack.c
        storage/maria/maria_read_log.c
        storage/maria/trnman.c
        storage/maria/trnman.h
        storage/maria/trnman_public.h
        storage/maria/unittest/trnman-t.c
        storage/myisam/mi_create.c
        storage/myisam/myisamdef.h
        support-files/mysql.spec.sh
        unittest/mysys/lf-t.c
        unittest/mysys/my_atomic-t.c
        unittest/mysys/thr_template.c
        unittest/mysys/waiting_threads-t.c

 2711 Guilhem Bichot	2009-02-13 [merge]
      Merge of 6.0-main into 6.0-maria. The MyISAM changes will be soon propagated to Maria.
      suite/maria tests may fail in pushbuild, some of those will be auto-corrected
      when 5.1-maria is merged (incompatibilities between old suite/maria and new mtr)
      removed:
        mysql-test/create-test-result
        mysql-test/fix-result
        mysql-test/include/have_bug25714.inc
        mysql-test/include/restart_mysqld.inc
        mysql-test/include/wait_show_pattern.inc
        mysql-test/include/wait_slave_status.inc
        mysql-test/install_test_db.sh
        mysql-test/lib/mtr_diff.pl
        mysql-test/lib/mtr_im.pl
        mysql-test/lib/mtr_timer.pl
        mysql-test/misc/
        mysql-test/misc/kill_master.sh
        mysql-test/misc/mysql-test_V1.9.pl
        mysql-test/mysql-test-run-shell.sh
        mysql-test/ndb/
        mysql-test/ndb/Makefile.am
        mysql-test/ndb/basic.result
        mysql-test/ndb/basic.test
        mysql-test/ndb/basic_log.result
        mysql-test/ndb/ndb_config_1_node.ini
        mysql-test/ndb/ndb_config_2_node.ini
        mysql-test/ndb/ndb_config_4_node.ini
        mysql-test/ndb/ndbcluster.sh
        mysql-test/ndb/restart.result
        mysql-test/ndb/restart.test
        mysql-test/ndb/restart_log.result
        mysql-test/r/events_restart_phase2.result
        mysql-test/r/events_restart_phase3.result
        mysql-test/r/have_bug25714.require
        mysql-test/r/not_as_root.require
        mysql-test/r/outfile.result
        mysql-test/resolve-stack
        mysql-test/std_data/server-cert-des.pem
        mysql-test/std_data/server-key-des.pem
        mysql-test/suite/ndb/r/ndb_discover_db2.result
        mysql-test/suite/ndb/t/ndb_discover_db2-master.opt
        mysql-test/suite/ndb/t/ndb_discover_db2.test
        mysql-test/suite/ndb/t/ndb_partition_error2-master.opt
        mysql-test/suite/ndb/t/ndb_restore_partition-master.opt
        mysql-test/suite/parts/r/partition_bit_ndb.result
        mysql-test/suite/parts/t/partition_bit_ndb.test
        mysql-test/suite/parts/t/partition_sessions.test
        mysql-test/suite/rpl/data/
        mysql-test/suite/rpl/t/rpl000017-slave.opt
        mysql-test/suite/rpl/t/rpl000018-master.opt
        mysql-test/suite/rpl/t/rpl000018-slave.opt
        mysql-test/suite/rpl/t/rpl_auto_increment-slave.opt
        mysql-test/suite/rpl/t/rpl_bug33931-slave.opt
        mysql-test/suite/rpl/t/rpl_dual_pos_advance-slave.opt
        mysql-test/suite/rpl/t/rpl_extraCol_innodb-master.opt
        mysql-test/suite/rpl/t/rpl_extraCol_innodb-slave.opt
        mysql-test/suite/rpl/t/rpl_extraColmaster_innodb-master.opt
        mysql-test/suite/rpl/t/rpl_extraColmaster_innodb-slave.opt
        mysql-test/suite/rpl/t/rpl_foreign_key_innodb-slave.opt
        mysql-test/suite/rpl/t/rpl_idempotency-master.opt
        mysql-test/suite/rpl/t/rpl_insert_id-slave.opt
        mysql-test/suite/rpl/t/rpl_insert_id_pk-slave.opt
        mysql-test/suite/rpl/t/rpl_insert_ignore-slave.opt
        mysql-test/suite/rpl/t/rpl_invoked_features-master.opt
        mysql-test/suite/rpl/t/rpl_invoked_features-slave.opt
        mysql-test/suite/rpl/t/rpl_load_from_master-slave.opt
        mysql-test/suite/rpl/t/rpl_multi_engine-slave.opt
        mysql-test/suite/rpl/t/rpl_read_only-slave.opt
        mysql-test/suite/rpl/t/rpl_relay_space_innodb-master.opt
        mysql-test/suite/rpl/t/rpl_relay_space_innodb-slave.opt
        mysql-test/suite/rpl/t/rpl_row_basic_11bugs-slave.opt
        mysql-test/suite/rpl/t/rpl_row_basic_3innodb-slave.opt
        mysql-test/suite/rpl/t/rpl_row_blob_innodb-slave.opt
        mysql-test/suite/rpl/t/rpl_row_create_table-slave.opt
        mysql-test/suite/rpl/t/rpl_row_func003-slave.opt
        mysql-test/suite/rpl/t/rpl_row_inexist_tbl-slave.opt
        mysql-test/suite/rpl/t/rpl_row_log_innodb-slave.opt
        mysql-test/suite/rpl/t/rpl_row_mystery22.test
        mysql-test/suite/rpl/t/rpl_row_sp002_innodb-master.opt
        mysql-test/suite/rpl/t/rpl_row_sp002_innodb-slave.opt
        mysql-test/suite/rpl/t/rpl_row_sp003-master.opt
        mysql-test/suite/rpl/t/rpl_row_sp003-slave.opt
        mysql-test/suite/rpl/t/rpl_row_sp006_InnoDB-slave.opt
        mysql-test/suite/rpl/t/rpl_row_sp007_innodb-slave.opt
        mysql-test/suite/rpl/t/rpl_row_tabledefs_3innodb-slave.opt
        mysql-test/suite/rpl/t/rpl_slave_skip-slave.opt
        mysql-test/suite/rpl/t/rpl_stm_000001-slave.opt
        mysql-test/suite/rpl_ndb_big/t/rpl_ndb_dd_partitions-master.opt
        mysql-test/suite/rpl_ndb_big/t/rpl_ndb_dd_partitions-slave.opt
        mysql-test/suite/rpl_ndb_big/t/rpl_truncate_7ndb_2-master.opt
        mysql-test/suite/sys_vars/inc/multi_range_count_basic.inc
        mysql-test/suite/sys_vars/inc/tmp_table_size_basic.inc
        mysql-test/suite/sys_vars/r/multi_range_count_basic_32.result
        mysql-test/suite/sys_vars/r/multi_range_count_basic_64.result
        mysql-test/suite/sys_vars/r/tmp_table_size_basic_32.result
        mysql-test/suite/sys_vars/r/tmp_table_size_basic_64.result
        mysql-test/suite/sys_vars/t/multi_range_count_basic_32.test
        mysql-test/suite/sys_vars/t/multi_range_count_basic_64.test
        mysql-test/suite/sys_vars/t/tmp_table_size_basic_32.test
        mysql-test/suite/sys_vars/t/tmp_table_size_basic_64.test
        mysql-test/t/error_simulation-master.opt
        mysql-test/t/events_restart_phase2-master.opt
        mysql-test/t/events_restart_phase2.test
        mysql-test/t/events_restart_phase3-master.opt
        mysql-test/t/events_restart_phase3.test
        mysql-test/t/log_bin_trust_function_creators_func-master.opt
        mysql-test/t/rpl_init_slave_func-slave.opt
        mysql-test/t/rpl_slave_exec_mode_basic.test
        mysql-test/t/wait_timeout-master.opt
        sql/backup/debug.h
      added:
        config/ac-macros/libmemcached.m4
        config/ac-macros/search_for_lib.m4
        extra/libevent/CMakeLists.txt
        extra/libevent/WIN32-Code/
        extra/libevent/WIN32-Code/config.h
        extra/libevent/WIN32-Code/misc.c
        extra/libevent/WIN32-Code/misc.h
        extra/libevent/WIN32-Code/tree.h
        extra/libevent/WIN32-Code/win32.c
        extra/libevent/compat/sys/tree.h
        mysql-test/include/analyze-timeout.test
        mysql-test/include/blackhole.inc
        mysql-test/include/check-warnings.test
        mysql-test/include/check_events_off.inc
        mysql-test/include/circular_rpl_for_4_hosts_init.inc
        mysql-test/include/circular_rpl_for_4_hosts_sync.inc
        mysql-test/include/cleanup_fake_relay_log.inc
        mysql-test/include/default_my.cnf
        mysql-test/include/default_mysqld.cnf
        mysql-test/include/default_ndbd.cnf
        mysql-test/include/have_one-thread-per-connection.inc
        mysql-test/include/have_simple_parser.inc
        mysql-test/include/have_ssl.inc
        mysql-test/include/mtr_check.sql
        mysql-test/include/mtr_warnings.sql
        mysql-test/include/ndb_master-slave_2ch.inc
        mysql-test/include/no_running_event_scheduler.inc
        mysql-test/include/no_running_events.inc
        mysql-test/include/restart_mysqld.inc
        mysql-test/include/running_event_scheduler.inc
        mysql-test/include/setup_fake_relay_log.inc
        mysql-test/include/show_rpl_debug_info.inc
        mysql-test/include/start_slave.inc
        mysql-test/include/stop_slave.inc
        mysql-test/include/sync_slave_io_with_master.inc
        mysql-test/include/wait_condition_sp.inc
        mysql-test/include/wait_for_ndb_to_binlog.inc
        mysql-test/include/wait_for_slave_io_error.inc
        mysql-test/include/wait_for_slave_io_to_start.inc
        mysql-test/include/wait_for_status_var.inc
        mysql-test/install_test_db.sh
        mysql-test/lib/My/ConfigFactory.pm
        mysql-test/lib/My/CoreDump.pm
        mysql-test/lib/My/File/
        mysql-test/lib/My/File/Path.pm
        mysql-test/lib/My/Find.pm
        mysql-test/lib/My/Handles.pm
        mysql-test/lib/My/Options.pm
        mysql-test/lib/My/Platform.pm
        mysql-test/lib/My/SafeProcess/
        mysql-test/lib/My/SafeProcess.pm
        mysql-test/lib/My/SafeProcess/Base.pm
        mysql-test/lib/My/SafeProcess/CMakeLists.txt
        mysql-test/lib/My/SafeProcess/Makefile.am
        mysql-test/lib/My/SafeProcess/safe_kill_win.cc
        mysql-test/lib/My/SafeProcess/safe_process.cc
        mysql-test/lib/My/SafeProcess/safe_process.pl
        mysql-test/lib/My/SafeProcess/safe_process_win.cc
        mysql-test/lib/My/SysInfo.pm
        mysql-test/lib/My/Test.pm
        mysql-test/lib/t/
        mysql-test/lib/t/Base.t
        mysql-test/lib/t/Find.t
        mysql-test/lib/t/Options.t
        mysql-test/lib/t/Platform.t
        mysql-test/lib/t/SafeProcess.t
        mysql-test/lib/t/SafeProcessStress.pl
        mysql-test/lib/t/copytree.t
        mysql-test/lib/t/dummyd.pl
        mysql-test/lib/t/rmtree.t
        mysql-test/lib/t/testMyConfig.t
        mysql-test/lib/t/testMyConfigFactory.t
        mysql-test/lib/t/test_child.pl
        mysql-test/lib/v1/
        mysql-test/lib/v1/My/
        mysql-test/lib/v1/My/Config.pm
        mysql-test/lib/v1/mtr_cases.pl
        mysql-test/lib/v1/mtr_gcov.pl
        mysql-test/lib/v1/mtr_gprof.pl
        mysql-test/lib/v1/mtr_im.pl
        mysql-test/lib/v1/mtr_io.pl
        mysql-test/lib/v1/mtr_match.pl
        mysql-test/lib/v1/mtr_misc.pl
        mysql-test/lib/v1/mtr_process.pl
        mysql-test/lib/v1/mtr_report.pl
        mysql-test/lib/v1/mtr_stress.pl
        mysql-test/lib/v1/mtr_timer.pl
        mysql-test/lib/v1/mtr_unique.pl
        mysql-test/lib/v1/mysql-test-run.pl
        mysql-test/lib/v1/ndb_config_1_node.ini
        mysql-test/lib/v1/ndb_config_2_node.ini
        mysql-test/r/fulltext_plugin.result
        mysql-test/r/have_simple_parser.require
        mysql-test/r/innodb_bug34053.result
        mysql-test/r/innodb_bug38231.result
        mysql-test/r/innodb_bug39438.result
        mysql-test/r/innodb_mysql_rbk.result
        mysql-test/r/join_optimizer.result
        mysql-test/r/myisam_keycache_coverage.result
        mysql-test/r/outfile.result
        mysql-test/r/partition_innodb_semi_consistent.result
        mysql-test/r/query_cache_28249.result
        mysql-test/std_data/bug40482-bin.000001
        mysql-test/std_data/ndb_config_config.ini
        mysql-test/suite/backup/r/backup_datatypes.result
        mysql-test/suite/backup/r/backup_myisam.result
        mysql-test/suite/backup/r/backup_myisam_coverage.result
        mysql-test/suite/backup/r/backup_stream_errors.result
        mysql-test/suite/backup/r/backup_view_on_view.result
        mysql-test/suite/backup/t/backup_datatypes.test
        mysql-test/suite/backup/t/backup_myisam.test
        mysql-test/suite/backup/t/backup_myisam_coverage.test
        mysql-test/suite/backup/t/backup_stream_errors.test
        mysql-test/suite/backup/t/backup_view_on_view.test
        mysql-test/suite/backup_engines/r/backup_partitioning.result
        mysql-test/suite/backup_engines/t/backup_partitioning.test
        mysql-test/suite/binlog/r/binlog_innodb_row.result
        mysql-test/suite/binlog/r/binlog_tmp_table.result
        mysql-test/suite/binlog/t/binlog_innodb_row.test
        mysql-test/suite/binlog/t/binlog_tmp_table.test
        mysql-test/suite/bugs/r/rpl_bug36391.result
        mysql-test/suite/bugs/t/rpl_bug36391-master.opt
        mysql-test/suite/bugs/t/rpl_bug36391.test
        mysql-test/suite/ddl_lock/
        mysql-test/suite/ddl_lock/README
        mysql-test/suite/ddl_lock/include/
        mysql-test/suite/ddl_lock/include/stress_settings.inc
        mysql-test/suite/ddl_lock/include/sync_lock.inc
        mysql-test/suite/ddl_lock/r/
        mysql-test/suite/ddl_lock/r/concurrent_ddl.result
        mysql-test/suite/ddl_lock/r/create_stress_tables.result
        mysql-test/suite/ddl_lock/r/stress_ddl.result
        mysql-test/suite/ddl_lock/r/stress_dml.result
        mysql-test/suite/ddl_lock/stress_init.txt
        mysql-test/suite/ddl_lock/stress_tests.txt
        mysql-test/suite/ddl_lock/t/
        mysql-test/suite/ddl_lock/t/concurrent_ddl.test
        mysql-test/suite/ddl_lock/t/create_stress_tables.test
        mysql-test/suite/ddl_lock/t/stress_ddl.test
        mysql-test/suite/ddl_lock/t/stress_dml.test
        mysql-test/suite/federated/
        mysql-test/suite/federated/disabled.def
        mysql-test/suite/federated/my.cnf
        mysql-test/suite/funcs_1/r/falcon_storedproc.result
        mysql-test/suite/funcs_1/r/memory_storedproc.result
        mysql-test/suite/funcs_1/r/myisam_storedproc.result
        mysql-test/suite/funcs_1/r/ndb_storedproc.result
        mysql-test/suite/funcs_1/t/falcon_storedproc.test
        mysql-test/suite/ndb/my.cnf
        mysql-test/suite/ndb/r/ndb_dd_ddl_grant.result
        mysql-test/suite/ndb/t/ndb_dd_ddl_grant.test
        mysql-test/suite/ndb_binlog/my.cnf
        mysql-test/suite/ndb_team/my.cnf
        mysql-test/suite/rpl/my.cnf
        mysql-test/suite/rpl/r/rpl_binlog_corruption.result
        mysql-test/suite/rpl/r/rpl_bug26395.result
        mysql-test/suite/rpl/r/rpl_circular_for_4_hosts.result
        mysql-test/suite/rpl/r/rpl_cross_version.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_slave_grp_exec.result
        mysql-test/suite/rpl/r/rpl_spec_variables.result
        mysql-test/suite/rpl/rpl_1slave_base.cnf
        mysql-test/suite/rpl/t/rpl_000015.cnf
        mysql-test/suite/rpl/t/rpl_binlog_corruption-master.opt
        mysql-test/suite/rpl/t/rpl_binlog_corruption.test
        mysql-test/suite/rpl/t/rpl_bug26395.test
        mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.cnf
        mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.test
        mysql-test/suite/rpl/t/rpl_cross_version-master.opt
        mysql-test/suite/rpl/t/rpl_cross_version.test
        mysql-test/suite/rpl/t/rpl_row_conflicts.test
        mysql-test/suite/rpl/t/rpl_slave_grp_exec.test
        mysql-test/suite/rpl/t/rpl_spec_variables-slave.opt
        mysql-test/suite/rpl/t/rpl_spec_variables.test
        mysql-test/suite/rpl/t/rpl_stm_conflicts.test
        mysql-test/suite/rpl_ndb/my.cnf
        mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_2ch.result
        mysql-test/suite/rpl_ndb/r/rpl_ndb_denote_gap.result
        mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_tables.result
        mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_2ch.cnf
        mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_2ch.test
        mysql-test/suite/rpl_ndb/t/rpl_ndb_denote_gap.test
        mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables-master.opt
        mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables-slave.opt
        mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables.test
        mysql-test/suite/rpl_ndb_big/my.cnf
        mysql-test/suite/rpl_ndb_big/t/rpl_ndb_dd_partitions-master.opt
        mysql-test/suite/rpl_ndb_big/t/rpl_ndb_dd_partitions-slave.opt
        mysql-test/suite/sys_vars/r/tmp_table_size_basic.result
        mysql-test/suite/sys_vars/t/rpl_slave_exec_mode_basic.test
        mysql-test/suite/sys_vars/t/tmp_table_size_basic.test
        mysql-test/t/change_user-master.opt
        mysql-test/t/events_restart-master.opt
        mysql-test/t/fulltext_plugin-master.opt
        mysql-test/t/fulltext_plugin.test
        mysql-test/t/innodb_bug34053.test
        mysql-test/t/innodb_bug38231.test
        mysql-test/t/innodb_bug39438-master.opt
        mysql-test/t/innodb_bug39438.test
        mysql-test/t/innodb_mysql_rbk-master.opt
        mysql-test/t/innodb_mysql_rbk.test
        mysql-test/t/join_optimizer.test
        mysql-test/t/myisam_keycache_coverage.test
        mysql-test/t/partition_innodb_semi_consistent-master.opt
        mysql-test/t/partition_innodb_semi_consistent.test
        mysql-test/t/query_cache_28249.test
        sql/debug_sync.h
        sql/share/errmsg-cnv.sh
        sql/share/errmsg-utf8.txt
        storage/ndb/src/mgmapi/mgmapi_error.c
        storage/ndb/test/run-test/conf-upgrade.cnf
        storage/ndb/test/run-test/upgrade-tests.txt
      renamed:
        client/mysqltest.c => client/mysqltest.cc
        mysql-test/include/analyze_failure_sync_with_master.test => mysql-test/include/analyze-sync_with_master.test
        mysql-test/include/charset_basic.inc => mysql-test/suite/sys_vars/inc/charset_basic.inc
        mysql-test/include/collation_basic.inc => mysql-test/suite/sys_vars/inc/collation_basic.inc
        mysql-test/include/federated.inc => mysql-test/suite/federated/federated.inc
        mysql-test/include/federated_cleanup.inc => mysql-test/suite/federated/federated_cleanup.inc
        mysql-test/include/have_federated_db.inc => mysql-test/suite/federated/have_federated_db.inc
        mysql-test/lib/mtr_cases.pl => mysql-test/lib/mtr_cases.pm
        mysql-test/lib/mtr_match.pl => mysql-test/lib/mtr_match.pm
        mysql-test/lib/mtr_report.pl => mysql-test/lib/mtr_report.pm
        mysql-test/lib/mtr_unique.pl => mysql-test/lib/mtr_unique.pm
        mysql-test/r/auto_commit_basic.result => mysql-test/suite/sys_vars/r/auto_commit_basic.result
        mysql-test/r/auto_increment_increment_basic.result => mysql-test/suite/sys_vars/r/auto_increment_increment_basic.result
        mysql-test/r/auto_increment_increment_func.result => mysql-test/suite/sys_vars/r/auto_increment_increment_func.result
        mysql-test/r/auto_increment_offset_basic.result => mysql-test/suite/sys_vars/r/auto_increment_offset_basic.result
        mysql-test/r/auto_increment_offset_func.result => mysql-test/suite/sys_vars/r/auto_increment_offset_func.result
        mysql-test/r/autocommit_func.result => mysql-test/suite/sys_vars/r/autocommit_func.result
        mysql-test/r/automatic_sp_privileges_basic.result => mysql-test/suite/sys_vars/r/automatic_sp_privileges_basic.result
        mysql-test/r/automatic_sp_privileges_func.result => mysql-test/suite/sys_vars/r/automatic_sp_privileges_func.result
        mysql-test/r/basedir_basic.result => mysql-test/suite/sys_vars/r/basedir_basic.result
        mysql-test/r/big_tables_basic.result => mysql-test/suite/sys_vars/r/big_tables_basic.result
        mysql-test/r/binlog_format_basic.result => mysql-test/suite/sys_vars/r/binlog_format_basic.result
        mysql-test/r/binlog_index.result => mysql-test/suite/binlog/r/binlog_index.result
        mysql-test/r/character_set_client_basic.result => mysql-test/suite/sys_vars/r/character_set_client_basic.result
        mysql-test/r/character_set_client_func.result => mysql-test/suite/sys_vars/r/character_set_client_func.result
        mysql-test/r/character_set_connection_basic.result => mysql-test/suite/sys_vars/r/character_set_connection_basic.result
        mysql-test/r/character_set_connection_func.result => mysql-test/suite/sys_vars/r/character_set_connection_func.result
        mysql-test/r/character_set_database_basic.result => mysql-test/suite/sys_vars/r/character_set_database_basic.result
        mysql-test/r/character_set_database_func.result => mysql-test/suite/sys_vars/r/character_set_database_func.result
        mysql-test/r/character_set_filesystem_basic.result => mysql-test/suite/sys_vars/r/character_set_filesystem_basic.result
        mysql-test/r/character_set_results_basic.result => mysql-test/suite/sys_vars/r/character_set_results_basic.result
        mysql-test/r/character_set_results_func.result => mysql-test/suite/sys_vars/r/character_set_results_func.result
        mysql-test/r/character_set_server_basic.result => mysql-test/suite/sys_vars/r/character_set_server_basic.result
        mysql-test/r/character_set_server_func.result => mysql-test/suite/sys_vars/r/character_set_server_func.result
        mysql-test/r/character_set_system_basic.result => mysql-test/suite/sys_vars/r/character_set_system_basic.result
        mysql-test/r/collation_connection_basic.result => mysql-test/suite/sys_vars/r/collation_connection_basic.result
        mysql-test/r/collation_connection_func.result => mysql-test/suite/sys_vars/r/collation_connection_func.result
        mysql-test/r/collation_database_basic.result => mysql-test/suite/sys_vars/r/collation_database_basic.result
        mysql-test/r/collation_database_func.result => mysql-test/suite/sys_vars/r/collation_database_func.result
        mysql-test/r/collation_server_basic.result => mysql-test/suite/sys_vars/r/collation_server_basic.result
        mysql-test/r/collation_server_func.result => mysql-test/suite/sys_vars/r/collation_server_func.result
        mysql-test/r/completion_type_basic.result => mysql-test/suite/sys_vars/r/completion_type_basic.result
        mysql-test/r/completion_type_func.result => mysql-test/suite/sys_vars/r/completion_type_func.result
        mysql-test/r/concurrent_insert_basic.result => mysql-test/suite/sys_vars/r/concurrent_insert_basic.result
        mysql-test/r/concurrent_insert_func.result => mysql-test/suite/sys_vars/r/concurrent_insert_func.result
        mysql-test/r/connect_timeout_basic.result => mysql-test/suite/sys_vars/r/connect_timeout_basic.result
        mysql-test/r/datadir_basic.result => mysql-test/suite/sys_vars/r/datadir_basic.result
        mysql-test/r/default_week_format_basic.result => mysql-test/suite/sys_vars/r/default_week_format_basic.result
        mysql-test/r/default_week_format_func.result => mysql-test/suite/sys_vars/r/default_week_format_func.result
        mysql-test/r/delay_key_write_basic.result => mysql-test/suite/sys_vars/r/delay_key_write_basic.result
        mysql-test/r/delay_key_write_func.result => mysql-test/suite/sys_vars/r/delay_key_write_func.result
        mysql-test/r/delayed_insert_limit_func.result => mysql-test/suite/sys_vars/r/delayed_insert_limit_func.result
        mysql-test/r/delayed_insert_timeout_basic.result => mysql-test/suite/sys_vars/r/delayed_insert_timeout_basic.result
        mysql-test/r/div_precision_increment_basic.result => mysql-test/suite/sys_vars/r/div_precision_increment_basic.result
        mysql-test/r/div_precision_increment_func.result => mysql-test/suite/sys_vars/r/div_precision_increment_func.result
        mysql-test/r/engine_condition_pushdown_basic.result => mysql-test/suite/sys_vars/r/engine_condition_pushdown_basic.result
        mysql-test/r/error_count_basic.result => mysql-test/suite/sys_vars/r/error_count_basic.result
        mysql-test/r/event_scheduler_basic.result => mysql-test/suite/sys_vars/r/event_scheduler_basic.result
        mysql-test/r/event_scheduler_func.result => mysql-test/suite/sys_vars/r/event_scheduler_func.result
        mysql-test/r/events_restart_phase1.result => mysql-test/r/events_restart.result
        mysql-test/r/expire_logs_days_basic.result => mysql-test/suite/sys_vars/r/expire_logs_days_basic.result
        mysql-test/r/federated.result => mysql-test/suite/federated/federated.result
        mysql-test/r/federated_archive.result => mysql-test/suite/federated/federated_archive.result
        mysql-test/r/federated_bug_13118.result => mysql-test/suite/federated/federated_bug_13118.result
        mysql-test/r/federated_bug_25714.result => mysql-test/suite/federated/federated_bug_25714.result
        mysql-test/r/federated_innodb.result => mysql-test/suite/federated/federated_innodb.result
        mysql-test/r/federated_server.result => mysql-test/suite/federated/federated_server.result
        mysql-test/r/federated_transactions.result => mysql-test/suite/federated/federated_transactions.result
        mysql-test/r/flush_basic.result => mysql-test/suite/sys_vars/r/flush_basic.result
        mysql-test/r/foreign_key_checks_basic.result => mysql-test/suite/sys_vars/r/foreign_key_checks_basic.result
        mysql-test/r/foreign_key_checks_func.result => mysql-test/suite/sys_vars/r/foreign_key_checks_func.result
        mysql-test/r/ft_boolean_syntax_basic.result => mysql-test/suite/sys_vars/r/ft_boolean_syntax_basic.result
        mysql-test/r/ft_boolean_syntax_func.result => mysql-test/suite/sys_vars/r/ft_boolean_syntax_func.result
        mysql-test/r/general_log_basic.result => mysql-test/suite/sys_vars/r/general_log_basic.result
        mysql-test/r/general_log_file_basic.result => mysql-test/suite/sys_vars/r/general_log_file_basic.result
        mysql-test/r/general_log_file_func.result => mysql-test/suite/sys_vars/r/general_log_file_func.result
        mysql-test/r/general_log_func.result => mysql-test/suite/sys_vars/r/general_log_func.result
        mysql-test/r/group_concat_max_len_basic.result => mysql-test/suite/sys_vars/r/group_concat_max_len_basic.result
        mysql-test/r/group_concat_max_len_func.result => mysql-test/suite/sys_vars/r/group_concat_max_len_func.result
        mysql-test/r/have_compress_basic.result => mysql-test/suite/sys_vars/r/have_compress_basic.result
        mysql-test/r/have_crypt_basic.result => mysql-test/suite/sys_vars/r/have_crypt_basic.result
        mysql-test/r/have_csv_basic.result => mysql-test/suite/sys_vars/r/have_csv_basic.result
        mysql-test/r/have_dynamic_loading_basic.result => mysql-test/suite/sys_vars/r/have_dynamic_loading_basic.result
        mysql-test/r/have_geometry_basic.result => mysql-test/suite/sys_vars/r/have_geometry_basic.result
        mysql-test/r/have_innodb_basic.result => mysql-test/suite/sys_vars/r/have_innodb_basic.result
        mysql-test/r/have_ndbcluster_basic.result => mysql-test/suite/sys_vars/r/have_ndbcluster_basic.result
        mysql-test/r/have_openssl_basic.result => mysql-test/suite/sys_vars/r/have_openssl_basic.result
        mysql-test/r/have_partitioning_basic.result => mysql-test/suite/sys_vars/r/have_partitioning_basic.result
        mysql-test/r/have_query_cache_basic.result => mysql-test/suite/sys_vars/r/have_query_cache_basic.result
        mysql-test/r/have_rtree_keys_basic.result => mysql-test/suite/sys_vars/r/have_rtree_keys_basic.result
        mysql-test/r/have_ssl_basic.result => mysql-test/suite/sys_vars/r/have_ssl_basic.result
        mysql-test/r/have_symlink_basic.result => mysql-test/suite/sys_vars/r/have_symlink_basic.result
        mysql-test/r/hostname_basic.result => mysql-test/suite/sys_vars/r/hostname_basic.result
        mysql-test/r/identity_basic.result => mysql-test/suite/sys_vars/r/identity_basic.result
        mysql-test/r/identity_func.result => mysql-test/suite/sys_vars/r/identity_func.result
        mysql-test/r/init_connect_basic.result => mysql-test/suite/sys_vars/r/init_connect_basic.result
        mysql-test/r/init_slave_basic.result => mysql-test/suite/sys_vars/r/init_slave_basic.result
        mysql-test/r/innodb_additional_mem_pool_size_basic.result => mysql-test/suite/sys_vars/r/innodb_additional_mem_pool_size_basic.result
        mysql-test/r/innodb_autoextend_increment_basic.result => mysql-test/suite/sys_vars/r/innodb_autoextend_increment_basic.result
        mysql-test/r/innodb_autoinc_lock_mode_basic.result => mysql-test/suite/sys_vars/r/innodb_autoinc_lock_mode_basic.result
        mysql-test/r/innodb_autoinc_lock_mode_func.result => mysql-test/suite/sys_vars/r/innodb_autoinc_lock_mode_func.result
        mysql-test/r/innodb_buffer_pool_size_basic.result => mysql-test/suite/sys_vars/r/innodb_buffer_pool_size_basic.result
        mysql-test/r/innodb_checksums_basic.result => mysql-test/suite/sys_vars/r/innodb_checksums_basic.result
        mysql-test/r/innodb_commit_concurrency_basic.result => mysql-test/suite/sys_vars/r/innodb_commit_concurrency_basic.result
        mysql-test/r/innodb_data_file_path_basic.result => mysql-test/suite/sys_vars/r/innodb_data_file_path_basic.result
        mysql-test/r/innodb_data_home_dir_basic.result => mysql-test/suite/sys_vars/r/innodb_data_home_dir_basic.result
        mysql-test/r/innodb_doublewrite_basic.result => mysql-test/suite/sys_vars/r/innodb_doublewrite_basic.result
        mysql-test/r/innodb_fast_shutdown_basic.result => mysql-test/suite/sys_vars/r/innodb_fast_shutdown_basic.result
        mysql-test/r/innodb_file_io_threads_basic.result => mysql-test/suite/sys_vars/r/innodb_file_io_threads_basic.result
        mysql-test/r/innodb_file_per_table_basic.result => mysql-test/suite/sys_vars/r/innodb_file_per_table_basic.result
        mysql-test/r/innodb_flush_log_at_trx_commit_basic.result => mysql-test/suite/sys_vars/r/innodb_flush_log_at_trx_commit_basic.result
        mysql-test/r/innodb_flush_method_basic.result => mysql-test/suite/sys_vars/r/innodb_flush_method_basic.result
        mysql-test/r/innodb_force_recovery_basic.result => mysql-test/suite/sys_vars/r/innodb_force_recovery_basic.result
        mysql-test/r/innodb_lock_wait_timeout_basic.result => mysql-test/suite/sys_vars/r/innodb_lock_wait_timeout_basic.result
        mysql-test/r/innodb_locks_unsafe_for_binlog_basic.result => mysql-test/suite/sys_vars/r/innodb_locks_unsafe_for_binlog_basic.result
        mysql-test/r/innodb_log_buffer_size_basic.result => mysql-test/suite/sys_vars/r/innodb_log_buffer_size_basic.result
        mysql-test/r/innodb_log_file_size_basic.result => mysql-test/suite/sys_vars/r/innodb_log_file_size_basic.result
        mysql-test/r/innodb_log_files_in_group_basic.result => mysql-test/suite/sys_vars/r/innodb_log_files_in_group_basic.result
        mysql-test/r/innodb_log_group_home_dir_basic.result => mysql-test/suite/sys_vars/r/innodb_log_group_home_dir_basic.result
        mysql-test/r/innodb_max_dirty_pages_pct_basic.result => mysql-test/suite/sys_vars/r/innodb_max_dirty_pages_pct_basic.result
        mysql-test/r/innodb_max_dirty_pages_pct_func.result => mysql-test/suite/sys_vars/r/innodb_max_dirty_pages_pct_func.result
        mysql-test/r/innodb_mirrored_log_groups_basic.result => mysql-test/suite/sys_vars/r/innodb_mirrored_log_groups_basic.result
        mysql-test/r/innodb_open_files_basic.result => mysql-test/suite/sys_vars/r/innodb_open_files_basic.result
        mysql-test/r/innodb_rollback_on_timeout_basic.result => mysql-test/suite/sys_vars/r/innodb_rollback_on_timeout_basic.result
        mysql-test/r/innodb_support_xa_basic.result => mysql-test/suite/sys_vars/r/innodb_support_xa_basic.result
        mysql-test/r/innodb_support_xa_func.result => mysql-test/suite/sys_vars/r/innodb_support_xa_func.result
        mysql-test/r/innodb_table_locks_basic.result => mysql-test/suite/sys_vars/r/innodb_table_locks_basic.result
        mysql-test/r/innodb_table_locks_func.result => mysql-test/suite/sys_vars/r/innodb_table_locks_func.result
        mysql-test/r/innodb_thread_concurrency_basic.result => mysql-test/suite/sys_vars/r/innodb_thread_concurrency_basic.result
        mysql-test/r/innodb_thread_sleep_delay_basic.result => mysql-test/suite/sys_vars/r/innodb_thread_sleep_delay_basic.result
        mysql-test/r/insert_id_basic.result => mysql-test/suite/sys_vars/r/insert_id_basic.result
        mysql-test/r/insert_id_func.result => mysql-test/suite/sys_vars/r/insert_id_func.result
        mysql-test/r/interactive_timeout_basic.result => mysql-test/suite/sys_vars/r/interactive_timeout_basic.result
        mysql-test/r/interactive_timeout_func.result => mysql-test/suite/sys_vars/r/interactive_timeout_func.result
        mysql-test/r/keep_files_on_create_basic.result => mysql-test/suite/sys_vars/r/keep_files_on_create_basic.result
        mysql-test/r/key_buffer_size_func.result => mysql-test/suite/sys_vars/r/key_buffer_size_func.result
        mysql-test/r/last_insert_id_func.result => mysql-test/suite/sys_vars/r/last_insert_id_func.result
        mysql-test/r/lc_time_names_basic.result => mysql-test/suite/sys_vars/r/lc_time_names_basic.result
        mysql-test/r/lc_time_names_func.result => mysql-test/suite/sys_vars/r/lc_time_names_func.result
        mysql-test/r/license_basic.result => mysql-test/suite/sys_vars/r/license_basic.result
        mysql-test/r/local_infile_basic.result => mysql-test/suite/sys_vars/r/local_infile_basic.result
        mysql-test/r/local_infile_func.result => mysql-test/suite/sys_vars/r/local_infile_func.result
        mysql-test/r/log_basic.result => mysql-test/suite/sys_vars/r/log_basic.result
        mysql-test/r/log_bin_trust_function_creators_basic.result => mysql-test/suite/sys_vars/r/log_bin_trust_function_creators_basic.result
        mysql-test/r/log_bin_trust_function_creators_func.result => mysql-test/suite/sys_vars/r/log_bin_trust_function_creators_func.result
        mysql-test/r/log_output_basic.result => mysql-test/suite/sys_vars/r/log_output_basic.result
        mysql-test/r/log_output_func.result => mysql-test/suite/sys_vars/r/log_output_func.result
        mysql-test/r/log_queries_not_using_indexes_basic.result => mysql-test/suite/sys_vars/r/log_queries_not_using_indexes_basic.result
        mysql-test/r/long_query_time_basic.result => mysql-test/suite/sys_vars/r/long_query_time_basic.result
        mysql-test/r/low_priority_updates_basic.result => mysql-test/suite/sys_vars/r/low_priority_updates_basic.result
        mysql-test/r/max_allowed_packet_basic.result => mysql-test/suite/sys_vars/r/max_allowed_packet_basic.result
        mysql-test/r/max_allowed_packet_func.result => mysql-test/suite/sys_vars/r/max_allowed_packet_func.result
        mysql-test/r/max_binlog_cache_size_func.result => mysql-test/suite/sys_vars/r/max_binlog_cache_size_func.result
        mysql-test/r/max_binlog_size_basic.result => mysql-test/suite/sys_vars/r/max_binlog_size_basic.result
        mysql-test/r/max_connections_basic.result => mysql-test/suite/sys_vars/r/max_connections_basic.result
        mysql-test/r/max_delayed_threads_basic.result => mysql-test/suite/sys_vars/r/max_delayed_threads_basic.result
        mysql-test/r/max_error_count_basic.result => mysql-test/suite/sys_vars/r/max_error_count_basic.result
        mysql-test/r/max_insert_delayed_threads_basic.result => mysql-test/suite/sys_vars/r/max_insert_delayed_threads_basic.result
        mysql-test/r/max_join_size_func.result => mysql-test/suite/sys_vars/r/max_join_size_func.result
        mysql-test/r/max_length_for_sort_data_basic.result => mysql-test/suite/sys_vars/r/max_length_for_sort_data_basic.result
        mysql-test/r/max_prepared_stmt_count_basic.result => mysql-test/suite/sys_vars/r/max_prepared_stmt_count_basic.result
        mysql-test/r/max_prepared_stmt_count_func.result => mysql-test/suite/sys_vars/r/max_prepared_stmt_count_func.result
        mysql-test/r/max_relay_log_size_basic.result => mysql-test/suite/sys_vars/r/max_relay_log_size_basic.result
        mysql-test/r/max_seeks_for_key_func.result => mysql-test/suite/sys_vars/r/max_seeks_for_key_func.result
        mysql-test/r/max_sort_length_basic.result => mysql-test/suite/sys_vars/r/max_sort_length_basic.result
        mysql-test/r/max_sort_length_func.result => mysql-test/suite/sys_vars/r/max_sort_length_func.result
        mysql-test/r/max_sp_recursion_depth_basic.result => mysql-test/suite/sys_vars/r/max_sp_recursion_depth_basic.result
        mysql-test/r/max_sp_recursion_depth_func.result => mysql-test/suite/sys_vars/r/max_sp_recursion_depth_func.result
        mysql-test/r/max_user_connections_basic.result => mysql-test/suite/sys_vars/r/max_user_connections_basic.result
        mysql-test/r/max_user_connections_func.result => mysql-test/suite/sys_vars/r/max_user_connections_func.result
        mysql-test/r/myisam_data_pointer_size_basic.result => mysql-test/suite/sys_vars/r/myisam_data_pointer_size_basic.result
        mysql-test/r/myisam_data_pointer_size_func.result => mysql-test/suite/sys_vars/r/myisam_data_pointer_size_func.result
        mysql-test/r/myisam_sort_buffer_size_basic.result => mysql-test/suite/sys_vars/r/myisam_sort_buffer_size_basic.result
        mysql-test/r/myisam_stats_method_basic.result => mysql-test/suite/sys_vars/r/myisam_stats_method_basic.result
        mysql-test/r/myisam_stats_method_func.result => mysql-test/suite/sys_vars/r/myisam_stats_method_func.result
        mysql-test/r/myisam_use_mmap_basic.result => mysql-test/suite/sys_vars/r/myisam_use_mmap_basic.result
        mysql-test/r/ndb_log_update_as_write_basic.result => mysql-test/suite/sys_vars/r/ndb_log_update_as_write_basic.result
        mysql-test/r/ndb_log_updated_only_basic.result => mysql-test/suite/sys_vars/r/ndb_log_updated_only_basic.result
        mysql-test/r/net_buffer_length_basic.result => mysql-test/suite/sys_vars/r/net_buffer_length_basic.result
        mysql-test/r/net_read_timeout_basic.result => mysql-test/suite/sys_vars/r/net_read_timeout_basic.result
        mysql-test/r/net_write_timeout_basic.result => mysql-test/suite/sys_vars/r/net_write_timeout_basic.result
        mysql-test/r/new_basic.result => mysql-test/suite/sys_vars/r/new_basic.result
        mysql-test/r/old_passwords_basic.result => mysql-test/suite/sys_vars/r/old_passwords_basic.result
        mysql-test/r/old_passwords_func.result => mysql-test/suite/sys_vars/r/old_passwords_func.result
        mysql-test/r/optimizer_prune_level_basic.result => mysql-test/suite/sys_vars/r/optimizer_prune_level_basic.result
        mysql-test/r/optimizer_search_depth_basic.result => mysql-test/suite/sys_vars/r/optimizer_search_depth_basic.result
        mysql-test/r/preload_buffer_size_basic.result => mysql-test/suite/sys_vars/r/preload_buffer_size_basic.result
        mysql-test/r/query_cache_limit_func.result => mysql-test/suite/sys_vars/r/query_cache_limit_func.result
        mysql-test/r/query_cache_type_basic.result => mysql-test/suite/sys_vars/r/query_cache_type_basic.result
        mysql-test/r/query_cache_type_func.result => mysql-test/suite/sys_vars/r/query_cache_type_func.result
        mysql-test/r/query_cache_wlock_invalidate_basic.result => mysql-test/suite/sys_vars/r/query_cache_wlock_invalidate_basic.result
        mysql-test/r/query_cache_wlock_invalidate_func.result => mysql-test/suite/sys_vars/r/query_cache_wlock_invalidate_func.result
        mysql-test/r/query_prealloc_size_func.result => mysql-test/suite/sys_vars/r/query_prealloc_size_func.result
        mysql-test/r/read_buffer_size_basic.result => mysql-test/suite/sys_vars/r/read_buffer_size_basic.result
        mysql-test/r/read_only_basic.result => mysql-test/suite/sys_vars/r/read_only_basic.result
        mysql-test/r/read_only_func.result => mysql-test/suite/sys_vars/r/read_only_func.result
        mysql-test/r/read_rnd_buffer_size_basic.result => mysql-test/suite/sys_vars/r/read_rnd_buffer_size_basic.result
        mysql-test/r/relay_log_purge_basic.result => mysql-test/suite/sys_vars/r/relay_log_purge_basic.result
        mysql-test/r/rpl_init_slave_func.result => mysql-test/suite/sys_vars/r/rpl_init_slave_func.result
        mysql-test/r/rpl_max_binlog_size_func.result => mysql-test/suite/sys_vars/r/rpl_max_binlog_size_func.result
        mysql-test/r/rpl_slave_allow_batching_basic.result => mysql-test/suite/sys_vars/r/rpl_slave_allow_batching_basic.result
        mysql-test/r/rpl_slave_compressed_protocol_basic.result => mysql-test/suite/sys_vars/r/rpl_slave_compressed_protocol_basic.result
        mysql-test/r/rpl_slave_exec_mode_basic.result => mysql-test/suite/sys_vars/r/rpl_slave_exec_mode_basic.result
        mysql-test/r/rpl_slave_net_timeout_basic.result => mysql-test/suite/sys_vars/r/rpl_slave_net_timeout_basic.result
        mysql-test/r/secure_auth_basic.result => mysql-test/suite/sys_vars/r/secure_auth_basic.result
        mysql-test/r/secure_auth_func.result => mysql-test/suite/sys_vars/r/secure_auth_func.result
        mysql-test/r/slave_allow_batching_basic.result => mysql-test/suite/sys_vars/r/slave_allow_batching_basic.result
        mysql-test/r/slave_compressed_protocol_basic.result => mysql-test/suite/sys_vars/r/slave_compressed_protocol_basic.result
        mysql-test/r/slave_net_timeout_basic.result => mysql-test/suite/sys_vars/r/slave_net_timeout_basic.result
        mysql-test/r/slow_launch_time_basic.result => mysql-test/suite/sys_vars/r/slow_launch_time_basic.result
        mysql-test/r/slow_launch_time_func.result => mysql-test/suite/sys_vars/r/slow_launch_time_func.result
        mysql-test/r/slow_query_log_basic.result => mysql-test/suite/sys_vars/r/slow_query_log_basic.result
        mysql-test/r/slow_query_log_file_basic.result => mysql-test/suite/sys_vars/r/slow_query_log_file_basic.result
        mysql-test/r/slow_query_log_file_func.result => mysql-test/suite/sys_vars/r/slow_query_log_file_func.result
        mysql-test/r/slow_query_log_func.result => mysql-test/suite/sys_vars/r/slow_query_log_func.result
        mysql-test/r/sql_auto_is_null_basic.result => mysql-test/suite/sys_vars/r/sql_auto_is_null_basic.result
        mysql-test/r/sql_big_selects_basic.result => mysql-test/suite/sys_vars/r/sql_big_selects_basic.result
        mysql-test/r/sql_big_selects_func.result => mysql-test/suite/sys_vars/r/sql_big_selects_func.result
        mysql-test/r/sql_big_tables_basic.result => mysql-test/suite/sys_vars/r/sql_big_tables_basic.result
        mysql-test/r/sql_big_tables_func.result => mysql-test/suite/sys_vars/r/sql_big_tables_func.result
        mysql-test/r/sql_buffer_result_basic.result => mysql-test/suite/sys_vars/r/sql_buffer_result_basic.result
        mysql-test/r/sql_buffer_result_func.result => mysql-test/suite/sys_vars/r/sql_buffer_result_func.result
        mysql-test/r/sql_log_bin_basic.result => mysql-test/suite/sys_vars/r/sql_log_bin_basic.result
        mysql-test/r/sql_log_off_basic.result => mysql-test/suite/sys_vars/r/sql_log_off_basic.result
        mysql-test/r/sql_log_off_func.result => mysql-test/suite/sys_vars/r/sql_log_off_func.result
        mysql-test/r/sql_low_priority_updates_basic.result => mysql-test/suite/sys_vars/r/sql_low_priority_updates_basic.result
        mysql-test/r/sql_low_priority_updates_func.result => mysql-test/suite/sys_vars/r/sql_low_priority_updates_func.result
        mysql-test/r/sql_max_join_size_func.result => mysql-test/suite/sys_vars/r/sql_max_join_size_func.result
        mysql-test/r/sql_mode_basic.result => mysql-test/suite/sys_vars/r/sql_mode_basic.result
        mysql-test/r/sql_mode_func.result => mysql-test/suite/sys_vars/r/sql_mode_func.result
        mysql-test/r/sql_notes_basic.result => mysql-test/suite/sys_vars/r/sql_notes_basic.result
        mysql-test/r/sql_notes_func.result => mysql-test/suite/sys_vars/r/sql_notes_func.result
        mysql-test/r/sql_quote_show_create_basic.result => mysql-test/suite/sys_vars/r/sql_quote_show_create_basic.result
        mysql-test/r/sql_quote_show_create_func.result => mysql-test/suite/sys_vars/r/sql_quote_show_create_func.result
        mysql-test/r/sql_safe_updates_basic.result => mysql-test/suite/sys_vars/r/sql_safe_updates_basic.result
        mysql-test/r/sql_safe_updates_func.result => mysql-test/suite/sys_vars/r/sql_safe_updates_func.result
        mysql-test/r/sql_select_limit_func.result => mysql-test/suite/sys_vars/r/sql_select_limit_func.result
        mysql-test/r/sql_slave_skip_counter_basic.result => mysql-test/suite/sys_vars/r/sql_slave_skip_counter_basic.result
        mysql-test/r/sql_warnings_basic.result => mysql-test/suite/sys_vars/r/sql_warnings_basic.result
        mysql-test/r/sql_warnings_func.result => mysql-test/suite/sys_vars/r/sql_warnings_func.result
        mysql-test/r/ssl_ca_basic.result => mysql-test/suite/sys_vars/r/ssl_ca_basic.result
        mysql-test/r/ssl_capath_basic.result => mysql-test/suite/sys_vars/r/ssl_capath_basic.result
        mysql-test/r/ssl_cert_basic.result => mysql-test/suite/sys_vars/r/ssl_cert_basic.result
        mysql-test/r/ssl_cipher_basic.result => mysql-test/suite/sys_vars/r/ssl_cipher_basic.result
        mysql-test/r/ssl_key_basic.result => mysql-test/suite/sys_vars/r/ssl_key_basic.result
        mysql-test/r/storage_engine_basic.result => mysql-test/suite/sys_vars/r/storage_engine_basic.result
        mysql-test/r/sync_frm_basic.result => mysql-test/suite/sys_vars/r/sync_frm_basic.result
        mysql-test/r/system_time_zone_basic.result => mysql-test/suite/sys_vars/r/system_time_zone_basic.result
        mysql-test/r/table_definition_cache_basic.result => mysql-test/suite/sys_vars/r/table_definition_cache_basic.result
        mysql-test/r/table_lock_wait_timeout_basic.result => mysql-test/suite/sys_vars/r/table_lock_wait_timeout_basic.result
        mysql-test/r/table_open_cache_basic.result => mysql-test/suite/sys_vars/r/table_open_cache_basic.result
        mysql-test/r/thread_cache_size_func.result => mysql-test/suite/sys_vars/r/thread_cache_size_func.result
        mysql-test/r/thread_handling_basic.result => mysql-test/suite/sys_vars/r/thread_handling_basic.result
        mysql-test/r/time_zone_basic.result => mysql-test/suite/sys_vars/r/time_zone_basic.result
        mysql-test/r/time_zone_func.result => mysql-test/suite/sys_vars/r/time_zone_func.result
        mysql-test/r/timed_mutexes_basic.result => mysql-test/suite/sys_vars/r/timed_mutexes_basic.result
        mysql-test/r/timestamp_func.result => mysql-test/suite/sys_vars/r/timestamp_func.result
        mysql-test/r/timestamp_sysdate_is_now_func.result => mysql-test/suite/sys_vars/r/timestamp_sysdate_is_now_func.result
        mysql-test/r/tmpdir_basic.result => mysql-test/suite/sys_vars/r/tmpdir_basic.result
        mysql-test/r/tx_isolation_basic.result => mysql-test/suite/sys_vars/r/tx_isolation_basic.result
        mysql-test/r/tx_isolation_func.result => mysql-test/suite/sys_vars/r/tx_isolation_func.result
        mysql-test/r/unique_checks_basic.result => mysql-test/suite/sys_vars/r/unique_checks_basic.result
        mysql-test/r/updatable_views_with_limit_basic.result => mysql-test/suite/sys_vars/r/updatable_views_with_limit_basic.result
        mysql-test/r/updatable_views_with_limit_func.result => mysql-test/suite/sys_vars/r/updatable_views_with_limit_func.result
        mysql-test/r/version_basic.result => mysql-test/suite/sys_vars/r/version_basic.result
        mysql-test/r/version_comment_basic.result => mysql-test/suite/sys_vars/r/version_comment_basic.result
        mysql-test/r/version_compile_machine_basic.result => mysql-test/suite/sys_vars/r/version_compile_machine_basic.result
        mysql-test/r/version_compile_os_basic.result => mysql-test/suite/sys_vars/r/version_compile_os_basic.result
        mysql-test/r/wait_timeout_func.result => mysql-test/suite/sys_vars/r/wait_timeout_func.result
        mysql-test/r/warning_count_basic.result => mysql-test/suite/sys_vars/r/warning_count_basic.result
        mysql-test/suite/backup/r/backup_myisam1.result => mysql-test/suite/backup/r/backup_myisam_extlocking.result
        mysql-test/suite/backup/r/backup_myisam2.result => mysql-test/suite/backup/r/backup_myisam_sync.result
        mysql-test/suite/backup/t/backup_myisam1-master.opt => mysql-test/suite/backup/t/backup_myisam_extlocking-master.opt
        mysql-test/suite/backup/t/backup_myisam1.test => mysql-test/suite/backup/t/backup_myisam_extlocking.test
        mysql-test/suite/backup/t/backup_myisam2.test => mysql-test/suite/backup/t/backup_myisam_sync.test
        mysql-test/suite/funcs_1/r/is_collation_character_set_applicability.result => mysql-test/suite/funcs_1/r/is_coll_char_set_appl.result
        mysql-test/suite/funcs_1/t/is_collation_character_set_applicability.test => mysql-test/suite/funcs_1/t/is_coll_char_set_appl.test
        mysql-test/suite/rpl/data/rpl_bug28618.dat => mysql-test/std_data/rpl_bug28618.dat
        mysql-test/suite/rpl/data/rpl_mixed.dat => mysql-test/std_data/rpl_mixed.dat
        mysql-test/suite/rpl/r/rpl_innodb_bug30919.result => mysql-test/r/innodb_bug30919.result
        mysql-test/suite/rpl/r/rpl_row_mystery22.result => mysql-test/suite/rpl/r/rpl_row_conflicts.result
        mysql-test/suite/rpl/r/rpl_stm_mystery22.result => mysql-test/suite/rpl/r/rpl_stm_conflicts.result
        mysql-test/suite/rpl/t/rpl_000015.slave-mi => mysql-test/suite/rpl/t/rpl_000015-slave.opt
        mysql-test/suite/rpl/t/rpl_innodb_bug30919-master.opt => mysql-test/t/innodb_bug30919-master.opt
        mysql-test/suite/rpl/t/rpl_innodb_bug30919.test => mysql-test/t/innodb_bug30919.test
        mysql-test/suite/rpl/t/rpl_rotate_logs-master.opt => mysql-test/suite/rpl/t/rpl_rotate_logs.cnf
        mysql-test/suite/rpl/t/rpl_rotate_logs.slave-mi => mysql-test/suite/rpl/t/rpl_rotate_logs-slave.opt
        mysql-test/suite/rpl/t/rpl_stm_mystery22.test => mysql-test/extra/rpl_tests/rpl_conflicts.test
        mysql-test/suite/rpl_ndb_big/r/rpl_ndb_transaction.result => mysql-test/suite/rpl_ndb_big/r/rpl_ndb_mixed_engines_transactions.result
        mysql-test/suite/rpl_ndb_big/t/rpl_ndb_transaction-master.opt => mysql-test/suite/rpl_ndb_big/t/rpl_ndb_mixed_engines_transactions-master.opt
        mysql-test/suite/rpl_ndb_big/t/rpl_ndb_transaction-slave.opt => mysql-test/suite/rpl_ndb_big/t/rpl_ndb_mixed_engines_transactions-slave.opt
        mysql-test/suite/rpl_ndb_big/t/rpl_ndb_transaction.test => mysql-test/suite/rpl_ndb_big/t/rpl_ndb_mixed_engines_transactions.test
        mysql-test/t/auto_commit_basic.test => mysql-test/suite/sys_vars/t/auto_commit_basic.test
        mysql-test/t/auto_increment_increment_basic.test => mysql-test/suite/sys_vars/t/auto_increment_increment_basic.test
        mysql-test/t/auto_increment_increment_func.test => mysql-test/suite/sys_vars/t/auto_increment_increment_func.test
        mysql-test/t/auto_increment_offset_basic.test => mysql-test/suite/sys_vars/t/auto_increment_offset_basic.test
        mysql-test/t/auto_increment_offset_func.test => mysql-test/suite/sys_vars/t/auto_increment_offset_func.test
        mysql-test/t/autocommit_func-master.opt => mysql-test/suite/sys_vars/t/autocommit_func-master.opt
        mysql-test/t/autocommit_func.test => mysql-test/suite/sys_vars/t/autocommit_func.test
        mysql-test/t/automatic_sp_privileges_basic.test => mysql-test/suite/sys_vars/t/automatic_sp_privileges_basic.test
        mysql-test/t/automatic_sp_privileges_func.test => mysql-test/suite/sys_vars/t/automatic_sp_privileges_func.test
        mysql-test/t/basedir_basic.test => mysql-test/suite/sys_vars/t/basedir_basic.test
        mysql-test/t/big_tables_basic.test => mysql-test/suite/sys_vars/t/big_tables_basic.test
        mysql-test/t/binlog_format_basic.test => mysql-test/suite/sys_vars/t/binlog_format_basic.test
        mysql-test/t/binlog_index.test => mysql-test/suite/binlog/t/binlog_index.test
        mysql-test/t/character_set_client_basic.test => mysql-test/suite/sys_vars/t/character_set_client_basic.test
        mysql-test/t/character_set_client_func.test => mysql-test/suite/sys_vars/t/character_set_client_func.test
        mysql-test/t/character_set_connection_basic.test => mysql-test/suite/sys_vars/t/character_set_connection_basic.test
        mysql-test/t/character_set_connection_func.test => mysql-test/suite/sys_vars/t/character_set_connection_func.test
        mysql-test/t/character_set_database_basic.test => mysql-test/suite/sys_vars/t/character_set_database_basic.test
        mysql-test/t/character_set_database_func.test => mysql-test/suite/sys_vars/t/character_set_database_func.test
        mysql-test/t/character_set_filesystem_basic.test => mysql-test/suite/sys_vars/t/character_set_filesystem_basic.test
        mysql-test/t/character_set_filesystem_func-master.opt => mysql-test/suite/sys_vars/t/character_set_filesystem_func-master.opt
        mysql-test/t/character_set_results_basic.test => mysql-test/suite/sys_vars/t/character_set_results_basic.test
        mysql-test/t/character_set_results_func.test => mysql-test/suite/sys_vars/t/character_set_results_func.test
        mysql-test/t/character_set_server_basic.test => mysql-test/suite/sys_vars/t/character_set_server_basic.test
        mysql-test/t/character_set_server_func.test => mysql-test/suite/sys_vars/t/character_set_server_func.test
        mysql-test/t/character_set_system_basic.test => mysql-test/suite/sys_vars/t/character_set_system_basic.test
        mysql-test/t/collation_connection_basic.test => mysql-test/suite/sys_vars/t/collation_connection_basic.test
        mysql-test/t/collation_connection_func.test => mysql-test/suite/sys_vars/t/collation_connection_func.test
        mysql-test/t/collation_database_basic.test => mysql-test/suite/sys_vars/t/collation_database_basic.test
        mysql-test/t/collation_database_func.test => mysql-test/suite/sys_vars/t/collation_database_func.test
        mysql-test/t/collation_server_basic.test => mysql-test/suite/sys_vars/t/collation_server_basic.test
        mysql-test/t/collation_server_func.test => mysql-test/suite/sys_vars/t/collation_server_func.test
        mysql-test/t/completion_type_basic.test => mysql-test/suite/sys_vars/t/completion_type_basic.test
        mysql-test/t/completion_type_func-master.opt => mysql-test/suite/sys_vars/t/completion_type_func-master.opt
        mysql-test/t/completion_type_func.test => mysql-test/suite/sys_vars/t/completion_type_func.test
        mysql-test/t/concurrent_insert_basic.test => mysql-test/suite/sys_vars/t/concurrent_insert_basic.test
        mysql-test/t/concurrent_insert_func.test => mysql-test/suite/sys_vars/t/concurrent_insert_func.test
        mysql-test/t/connect_timeout_basic.test => mysql-test/suite/sys_vars/t/connect_timeout_basic.test
        mysql-test/t/datadir_basic.test => mysql-test/suite/sys_vars/t/datadir_basic.test
        mysql-test/t/default_week_format_basic.test => mysql-test/suite/sys_vars/t/default_week_format_basic.test
        mysql-test/t/default_week_format_func.test => mysql-test/suite/sys_vars/t/default_week_format_func.test
        mysql-test/t/delay_key_write_basic.test => mysql-test/suite/sys_vars/t/delay_key_write_basic.test
        mysql-test/t/delay_key_write_func-master.opt => mysql-test/suite/sys_vars/t/delay_key_write_func-master.opt
        mysql-test/t/delay_key_write_func.test => mysql-test/suite/sys_vars/t/delay_key_write_func.test
        mysql-test/t/delayed_insert_limit_func.test => mysql-test/suite/sys_vars/t/delayed_insert_limit_func.test
        mysql-test/t/delayed_insert_timeout_basic.test => mysql-test/suite/sys_vars/t/delayed_insert_timeout_basic.test
        mysql-test/t/div_precision_increment_basic.test => mysql-test/suite/sys_vars/t/div_precision_increment_basic.test
        mysql-test/t/div_precision_increment_func.test => mysql-test/suite/sys_vars/t/div_precision_increment_func.test
        mysql-test/t/engine_condition_pushdown_basic.test => mysql-test/suite/sys_vars/t/engine_condition_pushdown_basic.test
        mysql-test/t/error_count_basic.test => mysql-test/suite/sys_vars/t/error_count_basic.test
        mysql-test/t/event_scheduler_basic.test => mysql-test/suite/sys_vars/t/event_scheduler_basic.test
        mysql-test/t/event_scheduler_func.test => mysql-test/suite/sys_vars/t/event_scheduler_func.test
        mysql-test/t/events_restart_phase1.test => mysql-test/t/events_restart.test
        mysql-test/t/expire_logs_days_basic.test => mysql-test/suite/sys_vars/t/expire_logs_days_basic.test
        mysql-test/t/federated.test => mysql-test/suite/federated/federated.test
        mysql-test/t/federated_archive.test => mysql-test/suite/federated/federated_archive.test
        mysql-test/t/federated_bug_13118.test => mysql-test/suite/federated/federated_bug_13118.test
        mysql-test/t/federated_bug_25714.test => mysql-test/suite/federated/federated_bug_25714.test
        mysql-test/t/federated_innodb-slave.opt => mysql-test/suite/federated/federated_innodb-slave.opt
        mysql-test/t/federated_innodb.test => mysql-test/suite/federated/federated_innodb.test
        mysql-test/t/federated_server.test => mysql-test/suite/federated/federated_server.test
        mysql-test/t/federated_transactions-slave.opt => mysql-test/suite/federated/federated_transactions-slave.opt
        mysql-test/t/federated_transactions.test => mysql-test/suite/federated/federated_transactions.test
        mysql-test/t/flush_basic.test => mysql-test/suite/sys_vars/t/flush_basic.test
        mysql-test/t/foreign_key_checks_basic.test => mysql-test/suite/sys_vars/t/foreign_key_checks_basic.test
        mysql-test/t/foreign_key_checks_func.test => mysql-test/suite/sys_vars/t/foreign_key_checks_func.test
        mysql-test/t/ft_boolean_syntax_basic.test => mysql-test/suite/sys_vars/t/ft_boolean_syntax_basic.test
        mysql-test/t/ft_boolean_syntax_func.test => mysql-test/suite/sys_vars/t/ft_boolean_syntax_func.test
        mysql-test/t/general_log_basic.test => mysql-test/suite/sys_vars/t/general_log_basic.test
        mysql-test/t/general_log_file_basic-master.opt => mysql-test/suite/sys_vars/t/general_log_file_basic-master.opt
        mysql-test/t/general_log_file_basic.test => mysql-test/suite/sys_vars/t/general_log_file_basic.test
        mysql-test/t/general_log_file_func-master.opt => mysql-test/suite/sys_vars/t/general_log_file_func-master.opt
        mysql-test/t/general_log_file_func.test => mysql-test/suite/sys_vars/t/general_log_file_func.test
        mysql-test/t/general_log_func.test => mysql-test/suite/sys_vars/t/general_log_func.test
        mysql-test/t/group_concat_max_len_basic.test => mysql-test/suite/sys_vars/t/group_concat_max_len_basic.test
        mysql-test/t/group_concat_max_len_func.test => mysql-test/suite/sys_vars/t/group_concat_max_len_func.test
        mysql-test/t/have_compress_basic.test => mysql-test/suite/sys_vars/t/have_compress_basic.test
        mysql-test/t/have_crypt_basic.test => mysql-test/suite/sys_vars/t/have_crypt_basic.test
        mysql-test/t/have_csv_basic.test => mysql-test/suite/sys_vars/t/have_csv_basic.test
        mysql-test/t/have_dynamic_loading_basic.test => mysql-test/suite/sys_vars/t/have_dynamic_loading_basic.test
        mysql-test/t/have_geometry_basic.test => mysql-test/suite/sys_vars/t/have_geometry_basic.test
        mysql-test/t/have_innodb_basic.test => mysql-test/suite/sys_vars/t/have_innodb_basic.test
        mysql-test/t/have_ndbcluster_basic.test => mysql-test/suite/sys_vars/t/have_ndbcluster_basic.test
        mysql-test/t/have_openssl_basic.test => mysql-test/suite/sys_vars/t/have_openssl_basic.test
        mysql-test/t/have_partitioning_basic.test => mysql-test/suite/sys_vars/t/have_partitioning_basic.test
        mysql-test/t/have_query_cache_basic.test => mysql-test/suite/sys_vars/t/have_query_cache_basic.test
        mysql-test/t/have_rtree_keys_basic.test => mysql-test/suite/sys_vars/t/have_rtree_keys_basic.test
        mysql-test/t/have_ssl_basic.test => mysql-test/suite/sys_vars/t/have_ssl_basic.test
        mysql-test/t/have_symlink_basic.test => mysql-test/suite/sys_vars/t/have_symlink_basic.test
        mysql-test/t/hostname_basic.test => mysql-test/suite/sys_vars/t/hostname_basic.test
        mysql-test/t/identity_basic.test => mysql-test/suite/sys_vars/t/identity_basic.test
        mysql-test/t/identity_func-master.opt => mysql-test/suite/sys_vars/t/identity_func-master.opt
        mysql-test/t/identity_func.test => mysql-test/suite/sys_vars/t/identity_func.test
        mysql-test/t/init_connect_basic.test => mysql-test/suite/sys_vars/t/init_connect_basic.test
        mysql-test/t/init_slave_basic.test => mysql-test/suite/sys_vars/t/init_slave_basic.test
        mysql-test/t/innodb_additional_mem_pool_size_basic.test => mysql-test/suite/sys_vars/t/innodb_additional_mem_pool_size_basic.test
        mysql-test/t/innodb_autoextend_increment_basic.test => mysql-test/suite/sys_vars/t/innodb_autoextend_increment_basic.test
        mysql-test/t/innodb_autoinc_lock_mode_basic.test => mysql-test/suite/sys_vars/t/innodb_autoinc_lock_mode_basic.test
        mysql-test/t/innodb_autoinc_lock_mode_func-master.opt => mysql-test/suite/sys_vars/t/innodb_autoinc_lock_mode_func-master.opt
        mysql-test/t/innodb_autoinc_lock_mode_func.test => mysql-test/suite/sys_vars/t/innodb_autoinc_lock_mode_func.test
        mysql-test/t/innodb_buffer_pool_size_basic.test => mysql-test/suite/sys_vars/t/innodb_buffer_pool_size_basic.test
        mysql-test/t/innodb_checksums_basic.test => mysql-test/suite/sys_vars/t/innodb_checksums_basic.test
        mysql-test/t/innodb_commit_concurrency_basic.test => mysql-test/suite/sys_vars/t/innodb_commit_concurrency_basic.test
        mysql-test/t/innodb_data_file_path_basic.test => mysql-test/suite/sys_vars/t/innodb_data_file_path_basic.test
        mysql-test/t/innodb_data_home_dir_basic.test => mysql-test/suite/sys_vars/t/innodb_data_home_dir_basic.test
        mysql-test/t/innodb_doublewrite_basic.test => mysql-test/suite/sys_vars/t/innodb_doublewrite_basic.test
        mysql-test/t/innodb_fast_shutdown_basic.test => mysql-test/suite/sys_vars/t/innodb_fast_shutdown_basic.test
        mysql-test/t/innodb_file_io_threads_basic.test => mysql-test/suite/sys_vars/t/innodb_file_io_threads_basic.test
        mysql-test/t/innodb_file_per_table_basic.test => mysql-test/suite/sys_vars/t/innodb_file_per_table_basic.test
        mysql-test/t/innodb_flush_log_at_trx_commit_basic.test => mysql-test/suite/sys_vars/t/innodb_flush_log_at_trx_commit_basic.test
        mysql-test/t/innodb_flush_method_basic.test => mysql-test/suite/sys_vars/t/innodb_flush_method_basic.test
        mysql-test/t/innodb_force_recovery_basic.test => mysql-test/suite/sys_vars/t/innodb_force_recovery_basic.test
        mysql-test/t/innodb_lock_wait_timeout_basic.test => mysql-test/suite/sys_vars/t/innodb_lock_wait_timeout_basic.test
        mysql-test/t/innodb_locks_unsafe_for_binlog_basic.test => mysql-test/suite/sys_vars/t/innodb_locks_unsafe_for_binlog_basic.test
        mysql-test/t/innodb_log_buffer_size_basic.test => mysql-test/suite/sys_vars/t/innodb_log_buffer_size_basic.test
        mysql-test/t/innodb_log_file_size_basic.test => mysql-test/suite/sys_vars/t/innodb_log_file_size_basic.test
        mysql-test/t/innodb_log_files_in_group_basic.test => mysql-test/suite/sys_vars/t/innodb_log_files_in_group_basic.test
        mysql-test/t/innodb_log_group_home_dir_basic.test => mysql-test/suite/sys_vars/t/innodb_log_group_home_dir_basic.test
        mysql-test/t/innodb_max_dirty_pages_pct_basic.test => mysql-test/suite/sys_vars/t/innodb_max_dirty_pages_pct_basic.test
        mysql-test/t/innodb_max_dirty_pages_pct_func.test => mysql-test/suite/sys_vars/t/innodb_max_dirty_pages_pct_func.test
        mysql-test/t/innodb_mirrored_log_groups_basic.test => mysql-test/suite/sys_vars/t/innodb_mirrored_log_groups_basic.test
        mysql-test/t/innodb_open_files_basic.test => mysql-test/suite/sys_vars/t/innodb_open_files_basic.test
        mysql-test/t/innodb_rollback_on_timeout_basic.test => mysql-test/suite/sys_vars/t/innodb_rollback_on_timeout_basic.test
        mysql-test/t/innodb_support_xa_basic.test => mysql-test/suite/sys_vars/t/innodb_support_xa_basic.test
        mysql-test/t/innodb_support_xa_func.test => mysql-test/suite/sys_vars/t/innodb_support_xa_func.test
        mysql-test/t/innodb_table_locks_basic.test => mysql-test/suite/sys_vars/t/innodb_table_locks_basic.test
        mysql-test/t/innodb_table_locks_func.test => mysql-test/suite/sys_vars/t/innodb_table_locks_func.test
        mysql-test/t/innodb_thread_concurrency_basic.test => mysql-test/suite/sys_vars/t/innodb_thread_concurrency_basic.test
        mysql-test/t/insert_id_basic.test => mysql-test/suite/sys_vars/t/insert_id_basic.test
        mysql-test/t/insert_id_func.test => mysql-test/suite/sys_vars/t/insert_id_func.test
        mysql-test/t/interactive_timeout_basic.test => mysql-test/suite/sys_vars/t/interactive_timeout_basic.test
        mysql-test/t/interactive_timeout_func.test => mysql-test/suite/sys_vars/t/interactive_timeout_func.test
        mysql-test/t/keep_files_on_create_basic.test => mysql-test/suite/sys_vars/t/keep_files_on_create_basic.test
        mysql-test/t/key_buffer_size_func.test => mysql-test/suite/sys_vars/t/key_buffer_size_func.test
        mysql-test/t/last_insert_id_func-master.opt => mysql-test/suite/sys_vars/t/last_insert_id_func-master.opt
        mysql-test/t/last_insert_id_func.test => mysql-test/suite/sys_vars/t/last_insert_id_func.test
        mysql-test/t/lc_time_names_basic.test => mysql-test/suite/sys_vars/t/lc_time_names_basic.test
        mysql-test/t/lc_time_names_func.test => mysql-test/suite/sys_vars/t/lc_time_names_func.test
        mysql-test/t/license_basic.test => mysql-test/suite/sys_vars/t/license_basic.test
        mysql-test/t/local_infile_basic.test => mysql-test/suite/sys_vars/t/local_infile_basic.test
        mysql-test/t/local_infile_func.test => mysql-test/suite/sys_vars/t/local_infile_func.test
        mysql-test/t/log_basic.test => mysql-test/suite/sys_vars/t/log_basic.test
        mysql-test/t/log_bin_trust_function_creators_basic.test => mysql-test/suite/sys_vars/t/log_bin_trust_function_creators_basic.test
        mysql-test/t/log_bin_trust_function_creators_func.test => mysql-test/suite/sys_vars/t/log_bin_trust_function_creators_func.test
        mysql-test/t/log_output_basic.test => mysql-test/suite/sys_vars/t/log_output_basic.test
        mysql-test/t/log_output_func.test => mysql-test/suite/sys_vars/t/log_output_func.test
        mysql-test/t/log_queries_not_using_indexes_basic.test => mysql-test/suite/sys_vars/t/log_queries_not_using_indexes_basic.test
        mysql-test/t/long_query_time_basic.test => mysql-test/suite/sys_vars/t/long_query_time_basic.test
        mysql-test/t/low_priority_updates_basic.test => mysql-test/suite/sys_vars/t/low_priority_updates_basic.test
        mysql-test/t/max_allowed_packet_basic.test => mysql-test/suite/sys_vars/t/max_allowed_packet_basic.test
        mysql-test/t/max_allowed_packet_func.test => mysql-test/suite/sys_vars/t/max_allowed_packet_func.test
        mysql-test/t/max_binlog_cache_size_func-master.opt => mysql-test/suite/sys_vars/t/max_binlog_cache_size_func-master.opt
        mysql-test/t/max_binlog_size_basic.test => mysql-test/suite/sys_vars/t/max_binlog_size_basic.test
        mysql-test/t/max_connections_basic.test => mysql-test/suite/sys_vars/t/max_connections_basic.test
        mysql-test/t/max_delayed_threads_basic.test => mysql-test/suite/sys_vars/t/max_delayed_threads_basic.test
        mysql-test/t/max_error_count_basic.test => mysql-test/suite/sys_vars/t/max_error_count_basic.test
        mysql-test/t/max_insert_delayed_threads_basic.test => mysql-test/suite/sys_vars/t/max_insert_delayed_threads_basic.test
        mysql-test/t/max_join_size_func.test => mysql-test/suite/sys_vars/t/max_join_size_func.test
        mysql-test/t/max_length_for_sort_data_basic.test => mysql-test/suite/sys_vars/t/max_length_for_sort_data_basic.test
        mysql-test/t/max_prepared_stmt_count_basic.test => mysql-test/suite/sys_vars/t/max_prepared_stmt_count_basic.test
        mysql-test/t/max_prepared_stmt_count_func.test => mysql-test/suite/sys_vars/t/max_prepared_stmt_count_func.test
        mysql-test/t/max_relay_log_size_basic.test => mysql-test/suite/sys_vars/t/max_relay_log_size_basic.test
        mysql-test/t/max_seeks_for_key_func.test => mysql-test/suite/sys_vars/t/max_seeks_for_key_func.test
        mysql-test/t/max_sort_length_basic.test => mysql-test/suite/sys_vars/t/max_sort_length_basic.test
        mysql-test/t/max_sort_length_func.test => mysql-test/suite/sys_vars/t/max_sort_length_func.test
        mysql-test/t/max_sp_recursion_depth_basic.test => mysql-test/suite/sys_vars/t/max_sp_recursion_depth_basic.test
        mysql-test/t/max_sp_recursion_depth_func.test => mysql-test/suite/sys_vars/t/max_sp_recursion_depth_func.test
        mysql-test/t/max_user_connections_basic.test => mysql-test/suite/sys_vars/t/max_user_connections_basic.test
        mysql-test/t/max_user_connections_func.test => mysql-test/suite/sys_vars/t/max_user_connections_func.test
        mysql-test/t/myisam_data_pointer_size_basic.test => mysql-test/suite/sys_vars/t/myisam_data_pointer_size_basic.test
        mysql-test/t/myisam_data_pointer_size_func.test => mysql-test/suite/sys_vars/t/myisam_data_pointer_size_func.test
        mysql-test/t/myisam_stats_method_basic.test => mysql-test/suite/sys_vars/t/myisam_stats_method_basic.test
        mysql-test/t/myisam_stats_method_func.test => mysql-test/suite/sys_vars/t/myisam_stats_method_func.test
        mysql-test/t/myisam_use_mmap_basic.test => mysql-test/suite/sys_vars/t/myisam_use_mmap_basic.test
        mysql-test/t/ndb_log_update_as_write_basic.test => mysql-test/suite/sys_vars/t/ndb_log_update_as_write_basic.test
        mysql-test/t/ndb_log_updated_only_basic.test => mysql-test/suite/sys_vars/t/ndb_log_updated_only_basic.test
        mysql-test/t/net_buffer_length_basic.test => mysql-test/suite/sys_vars/t/net_buffer_length_basic.test
        mysql-test/t/net_read_timeout_basic.test => mysql-test/suite/sys_vars/t/net_read_timeout_basic.test
        mysql-test/t/net_write_timeout_basic.test => mysql-test/suite/sys_vars/t/net_write_timeout_basic.test
        mysql-test/t/new_basic.test => mysql-test/suite/sys_vars/t/new_basic.test
        mysql-test/t/old_passwords_basic.test => mysql-test/suite/sys_vars/t/old_passwords_basic.test
        mysql-test/t/old_passwords_func.test => mysql-test/suite/sys_vars/t/old_passwords_func.test
        mysql-test/t/optimizer_prune_level_basic.test => mysql-test/suite/sys_vars/t/optimizer_prune_level_basic.test
        mysql-test/t/optimizer_search_depth_basic.test => mysql-test/suite/sys_vars/t/optimizer_search_depth_basic.test
        mysql-test/t/preload_buffer_size_basic.test => mysql-test/suite/sys_vars/t/preload_buffer_size_basic.test
        mysql-test/t/query_cache_limit_func.test => mysql-test/suite/sys_vars/t/query_cache_limit_func.test
        mysql-test/t/query_cache_type_basic.test => mysql-test/suite/sys_vars/t/query_cache_type_basic.test
        mysql-test/t/query_cache_type_func.test => mysql-test/suite/sys_vars/t/query_cache_type_func.test
        mysql-test/t/query_cache_wlock_invalidate_basic.test => mysql-test/suite/sys_vars/t/query_cache_wlock_invalidate_basic.test
        mysql-test/t/query_cache_wlock_invalidate_func.test => mysql-test/suite/sys_vars/t/query_cache_wlock_invalidate_func.test
        mysql-test/t/query_prealloc_size_func.test => mysql-test/suite/sys_vars/t/query_prealloc_size_func.test
        mysql-test/t/read_buffer_size_basic.test => mysql-test/suite/sys_vars/t/read_buffer_size_basic.test
        mysql-test/t/read_only_basic.test => mysql-test/suite/sys_vars/t/read_only_basic.test
        mysql-test/t/read_only_func.test => mysql-test/suite/sys_vars/t/read_only_func.test
        mysql-test/t/read_rnd_buffer_size_basic.test => mysql-test/suite/sys_vars/t/read_rnd_buffer_size_basic.test
        mysql-test/t/relay_log_purge_basic.test => mysql-test/suite/sys_vars/t/relay_log_purge_basic.test
        mysql-test/t/rpl_init_slave_func.test => mysql-test/suite/sys_vars/t/rpl_init_slave_func.test
        mysql-test/t/rpl_max_binlog_size_func-master.opt => mysql-test/suite/sys_vars/t/rpl_max_binlog_size_func-master.opt
        mysql-test/t/rpl_max_binlog_size_func.test => mysql-test/suite/sys_vars/t/rpl_max_binlog_size_func.test
        mysql-test/t/rpl_slave_allow_batching_basic.test => mysql-test/suite/sys_vars/t/rpl_slave_allow_batching_basic.test
        mysql-test/t/rpl_slave_compressed_protocol_basic.test => mysql-test/suite/sys_vars/t/rpl_slave_compressed_protocol_basic.test
        mysql-test/t/rpl_slave_net_timeout_basic.test => mysql-test/suite/sys_vars/t/rpl_slave_net_timeout_basic.test
        mysql-test/t/secure_auth_basic.test => mysql-test/suite/sys_vars/t/secure_auth_basic.test
        mysql-test/t/secure_auth_func-master.opt => mysql-test/suite/sys_vars/t/secure_auth_func-master.opt
        mysql-test/t/secure_auth_func.test => mysql-test/suite/sys_vars/t/secure_auth_func.test
        mysql-test/t/slave_allow_batching_basic.test => mysql-test/suite/sys_vars/t/slave_allow_batching_basic.test
        mysql-test/t/slave_compressed_protocol_basic.test => mysql-test/suite/sys_vars/t/slave_compressed_protocol_basic.test
        mysql-test/t/slave_net_timeout_basic.test => mysql-test/suite/sys_vars/t/slave_net_timeout_basic.test
        mysql-test/t/slow_launch_time_basic.test => mysql-test/suite/sys_vars/t/slow_launch_time_basic.test
        mysql-test/t/slow_launch_time_func.test => mysql-test/suite/sys_vars/t/slow_launch_time_func.test
        mysql-test/t/slow_query_log_basic.test => mysql-test/suite/sys_vars/t/slow_query_log_basic.test
        mysql-test/t/slow_query_log_file_basic-master.opt => mysql-test/suite/sys_vars/t/slow_query_log_file_basic-master.opt
        mysql-test/t/slow_query_log_file_basic.test => mysql-test/suite/sys_vars/t/slow_query_log_file_basic.test
        mysql-test/t/slow_query_log_file_func-master.opt => mysql-test/suite/sys_vars/t/slow_query_log_file_func-master.opt
        mysql-test/t/slow_query_log_file_func.test => mysql-test/suite/sys_vars/t/slow_query_log_file_func.test
        mysql-test/t/slow_query_log_func.test => mysql-test/suite/sys_vars/t/slow_query_log_func.test
        mysql-test/t/sql_auto_is_null_basic.test => mysql-test/suite/sys_vars/t/sql_auto_is_null_basic.test
        mysql-test/t/sql_big_selects_basic.test => mysql-test/suite/sys_vars/t/sql_big_selects_basic.test
        mysql-test/t/sql_big_selects_func.test => mysql-test/suite/sys_vars/t/sql_big_selects_func.test
        mysql-test/t/sql_big_tables_basic.test => mysql-test/suite/sys_vars/t/sql_big_tables_basic.test
        mysql-test/t/sql_big_tables_func.test => mysql-test/suite/sys_vars/t/sql_big_tables_func.test
        mysql-test/t/sql_buffer_result_basic.test => mysql-test/suite/sys_vars/t/sql_buffer_result_basic.test
        mysql-test/t/sql_buffer_result_func.test => mysql-test/suite/sys_vars/t/sql_buffer_result_func.test
        mysql-test/t/sql_log_bin_basic.test => mysql-test/suite/sys_vars/t/sql_log_bin_basic.test
        mysql-test/t/sql_log_off_basic.test => mysql-test/suite/sys_vars/t/sql_log_off_basic.test
        mysql-test/t/sql_log_off_func.test => mysql-test/suite/sys_vars/t/sql_log_off_func.test
        mysql-test/t/sql_low_priority_updates_basic.test => mysql-test/suite/sys_vars/t/sql_low_priority_updates_basic.test
        mysql-test/t/sql_low_priority_updates_func.test => mysql-test/suite/sys_vars/t/sql_low_priority_updates_func.test
        mysql-test/t/sql_max_join_size_func.test => mysql-test/suite/sys_vars/t/sql_max_join_size_func.test
        mysql-test/t/sql_mode_basic.test => mysql-test/suite/sys_vars/t/sql_mode_basic.test
        mysql-test/t/sql_mode_func.test => mysql-test/suite/sys_vars/t/sql_mode_func.test
        mysql-test/t/sql_notes_basic.test => mysql-test/suite/sys_vars/t/sql_notes_basic.test
        mysql-test/t/sql_notes_func.test => mysql-test/suite/sys_vars/t/sql_notes_func.test
        mysql-test/t/sql_quote_show_create_basic.test => mysql-test/suite/sys_vars/t/sql_quote_show_create_basic.test
        mysql-test/t/sql_quote_show_create_func.test => mysql-test/suite/sys_vars/t/sql_quote_show_create_func.test
        mysql-test/t/sql_safe_updates_basic.test => mysql-test/suite/sys_vars/t/sql_safe_updates_basic.test
        mysql-test/t/sql_safe_updates_func.test => mysql-test/suite/sys_vars/t/sql_safe_updates_func.test
        mysql-test/t/sql_select_limit_func.test => mysql-test/suite/sys_vars/t/sql_select_limit_func.test
        mysql-test/t/sql_slave_skip_counter_basic.test => mysql-test/suite/sys_vars/t/sql_slave_skip_counter_basic.test
        mysql-test/t/sql_warnings_basic.test => mysql-test/suite/sys_vars/t/sql_warnings_basic.test
        mysql-test/t/sql_warnings_func.test => mysql-test/suite/sys_vars/t/sql_warnings_func.test
        mysql-test/t/ssl_ca_basic.test => mysql-test/suite/sys_vars/t/ssl_ca_basic.test
        mysql-test/t/ssl_capath_basic.test => mysql-test/suite/sys_vars/t/ssl_capath_basic.test
        mysql-test/t/ssl_cert_basic.test => mysql-test/suite/sys_vars/t/ssl_cert_basic.test
        mysql-test/t/ssl_cipher_basic.test => mysql-test/suite/sys_vars/t/ssl_cipher_basic.test
        mysql-test/t/ssl_key_basic.test => mysql-test/suite/sys_vars/t/ssl_key_basic.test
        mysql-test/t/storage_engine_basic-master.opt => mysql-test/suite/sys_vars/t/storage_engine_basic-master.opt
        mysql-test/t/storage_engine_basic.test => mysql-test/suite/sys_vars/t/storage_engine_basic.test
        mysql-test/t/sync_frm_basic.test => mysql-test/suite/sys_vars/t/sync_frm_basic.test
        mysql-test/t/system_time_zone_basic.test => mysql-test/suite/sys_vars/t/system_time_zone_basic.test
        mysql-test/t/table_definition_cache_basic.test => mysql-test/suite/sys_vars/t/table_definition_cache_basic.test
        mysql-test/t/table_lock_wait_timeout_basic.test => mysql-test/suite/sys_vars/t/table_lock_wait_timeout_basic.test
        mysql-test/t/table_open_cache_basic.test => mysql-test/suite/sys_vars/t/table_open_cache_basic.test
        mysql-test/t/thread_cache_size_func.test => mysql-test/suite/sys_vars/t/thread_cache_size_func.test
        mysql-test/t/thread_handling_basic.test => mysql-test/suite/sys_vars/t/thread_handling_basic.test
        mysql-test/t/time_zone_basic.test => mysql-test/suite/sys_vars/t/time_zone_basic.test
        mysql-test/t/time_zone_func.test => mysql-test/suite/sys_vars/t/time_zone_func.test
        mysql-test/t/timed_mutexes_basic.test => mysql-test/suite/sys_vars/t/timed_mutexes_basic.test
        mysql-test/t/timestamp_func.test => mysql-test/suite/sys_vars/t/timestamp_func.test
        mysql-test/t/timestamp_sysdate_is_now_func-master.opt => mysql-test/suite/sys_vars/t/timestamp_sysdate_is_now_func-master.opt
        mysql-test/t/timestamp_sysdate_is_now_func.test => mysql-test/suite/sys_vars/t/timestamp_sysdate_is_now_func.test
        mysql-test/t/tmpdir_basic.test => mysql-test/suite/sys_vars/t/tmpdir_basic.test
        mysql-test/t/tx_isolation_basic.test => mysql-test/suite/sys_vars/t/tx_isolation_basic.test
        mysql-test/t/tx_isolation_func-master.opt => mysql-test/suite/sys_vars/t/tx_isolation_func-master.opt
        mysql-test/t/tx_isolation_func.test => mysql-test/suite/sys_vars/t/tx_isolation_func.test
        mysql-test/t/unique_checks_basic.test => mysql-test/suite/sys_vars/t/unique_checks_basic.test
        mysql-test/t/updatable_views_with_limit_basic.test => mysql-test/suite/sys_vars/t/updatable_views_with_limit_basic.test
        mysql-test/t/updatable_views_with_limit_func.test => mysql-test/suite/sys_vars/t/updatable_views_with_limit_func.test
        mysql-test/t/version_basic.test => mysql-test/suite/sys_vars/t/version_basic.test
        mysql-test/t/version_comment_basic.test => mysql-test/suite/sys_vars/t/version_comment_basic.test
        mysql-test/t/version_compile_machine_basic.test => mysql-test/suite/sys_vars/t/version_compile_machine_basic.test
        mysql-test/t/version_compile_os_basic.test => mysql-test/suite/sys_vars/t/version_compile_os_basic.test
        mysql-test/t/wait_timeout_func.test => mysql-test/suite/sys_vars/t/wait_timeout_func.test
        mysql-test/t/warning_count_basic.test => mysql-test/suite/sys_vars/t/warning_count_basic.test
      modified:
        .bzr-mysql/default.conf
        .bzrignore
        BUILD/compile-dist
        BUILD/compile-pentium-gcov
        BUILD/compile-solaris-amd64
        CMakeLists.txt
        Makefile.am
        client/CMakeLists.txt
        client/Makefile.am
        client/mysql.cc
        client/mysql_upgrade.c
        client/mysqladmin.cc
        client/mysqlbinlog.cc
        client/mysqlcheck.c
        client/mysqldump.c
        config/ac-macros/character_sets.m4
        configure.in
        extra/libevent/Makefile.am
        extra/libevent/buffer.c
        extra/libevent/evbuffer.c
        extra/libevent/evutil.c
        extra/libevent/evutil.h
        extra/perror.c
        extra/resolve_stack_dump.c
        extra/yassl/include/openssl/ssl.h
        include/config-win.h
        include/hash.h
        include/lf.h
        include/m_ctype.h
        include/m_string.h
        include/my_global.h
        include/my_pthread.h
        include/my_sys.h
        include/myisam.h
        include/mysql_com.h
        libmysqld/examples/CMakeLists.txt
        libmysqld/examples/Makefile.am
        libmysqld/examples/test-run
        libmysqld/lib_sql.cc
        mysql-test/Makefile.am
        mysql-test/extra/binlog_tests/blackhole.test
        mysql-test/extra/binlog_tests/ctype_ucs_binlog.test
        mysql-test/extra/binlog_tests/database.test
        mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test
        mysql-test/extra/binlog_tests/mix_innodb_myisam_side_effects.test
        mysql-test/extra/rpl_tests/rpl_EE_err.test
        mysql-test/extra/rpl_tests/rpl_auto_increment.test
        mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test
        mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test
        mysql-test/extra/rpl_tests/rpl_flsh_tbls.test
        mysql-test/extra/rpl_tests/rpl_loaddata.test
        mysql-test/extra/rpl_tests/rpl_log.test
        mysql-test/extra/rpl_tests/rpl_reset_slave.test
        mysql-test/extra/rpl_tests/rpl_row_001.test
        mysql-test/extra/rpl_tests/rpl_row_blob.test
        mysql-test/extra/rpl_tests/rpl_row_func003.test
        mysql-test/extra/rpl_tests/rpl_row_sp002.test
        mysql-test/extra/rpl_tests/rpl_row_sp003.test
        mysql-test/extra/rpl_tests/rpl_row_tabledefs.test
        mysql-test/extra/rpl_tests/rpl_stm_000001.test
        mysql-test/extra/rpl_tests/rpl_stm_EE_err2.test
        mysql-test/extra/rpl_tests/rpl_trig004.test
        mysql-test/include/check-testcase.test
        mysql-test/include/commit.inc
        mysql-test/include/concurrent.inc
        mysql-test/include/have_32bit.inc
        mysql-test/include/have_64bit.inc
        mysql-test/include/have_log_bin.inc
        mysql-test/include/have_ndbapi_examples.inc
        mysql-test/include/index_merge1.inc
        mysql-test/include/linux_sys_vars.inc
        mysql-test/include/loaddata_autocom.inc
        mysql-test/include/maria_empty_logs.inc
        mysql-test/include/maria_make_snapshot.inc
        mysql-test/include/maria_make_snapshot_for_feeding_recovery.inc
        mysql-test/include/maria_verify_recovery.inc
        mysql-test/include/master-slave-reset.inc
        mysql-test/include/master-slave.inc
        mysql-test/include/mix1.inc
        mysql-test/include/mrr_tests.inc
        mysql-test/include/mysqlbinlog_row_engine.inc
        mysql-test/include/mysqltest-x.inc
        mysql-test/include/ndb_backup.inc
        mysql-test/include/ndb_restore_master.inc
        mysql-test/include/ndb_restore_slave_eoption.inc
        mysql-test/include/ndb_show_tables_result.inc
        mysql-test/include/not_as_root.inc
        mysql-test/include/query_cache.inc
        mysql-test/include/report-features.test
        mysql-test/include/reset_master_and_slave.inc
        mysql-test/include/rpl_events.inc
        mysql-test/include/rpl_multi_engine.inc
        mysql-test/include/testdb_only.inc
        mysql-test/include/wait_for_slave_io_to_stop.inc
        mysql-test/include/wait_for_slave_param.inc
        mysql-test/include/wait_for_slave_sql_error.inc
        mysql-test/include/wait_for_slave_sql_error_and_skip.inc
        mysql-test/include/wait_for_slave_sql_to_start.inc
        mysql-test/include/wait_for_slave_sql_to_stop.inc
        mysql-test/include/wait_for_slave_to_start.inc
        mysql-test/include/wait_for_slave_to_stop.inc
        mysql-test/include/wait_until_connected_again.inc
        mysql-test/include/wait_until_disconnected.inc
        mysql-test/include/windows_sys_vars.inc
        mysql-test/lib/My/Config.pm
        mysql-test/lib/mtr_gcov.pl
        mysql-test/lib/mtr_io.pl
        mysql-test/lib/mtr_misc.pl
        mysql-test/lib/mtr_process.pl
        mysql-test/lib/mtr_stress.pl
        mysql-test/mysql-test-run.pl
        mysql-test/r/1st.result
        mysql-test/r/alter_table.result
        mysql-test/r/archive.result
        mysql-test/r/archive_aio_posix.result
        mysql-test/r/cache_innodb.result
        mysql-test/r/change_user.result
        mysql-test/r/comment_index.result
        mysql-test/r/commit_1innodb.result
        mysql-test/r/concurrent_innodb_safelog.result
        mysql-test/r/concurrent_innodb_unsafelog.result
        mysql-test/r/create.result
        mysql-test/r/csv.result
        mysql-test/r/ctype_big5.result
        mysql-test/r/ctype_latin2_ch.result
        mysql-test/r/ctype_ldml.result
        mysql-test/r/ctype_ucs.result
        mysql-test/r/date_formats.result
        mysql-test/r/debug_sync.result
        mysql-test/r/distinct.result
        mysql-test/r/drop-no_root.result
        mysql-test/r/drop.result
        mysql-test/r/error_simulation.result
        mysql-test/r/events_bugs.result
        mysql-test/r/events_scheduling.result
        mysql-test/r/fulltext.result
        mysql-test/r/func_compress.result
        mysql-test/r/func_if.result
        mysql-test/r/func_in.result
        mysql-test/r/func_math.result
        mysql-test/r/func_str.result
        mysql-test/r/func_time.result
        mysql-test/r/gis.result
        mysql-test/r/grant.result
        mysql-test/r/grant2.result
        mysql-test/r/grant4.result
        mysql-test/r/greedy_optimizer.result
        mysql-test/r/group_by.result
        mysql-test/r/have_outfile.require
        mysql-test/r/having.result
        mysql-test/r/implicit_commit.result
        mysql-test/r/index_merge_myisam.result
        mysql-test/r/information_schema.result
        mysql-test/r/init_file.result
        mysql-test/r/innodb-autoinc-optimize.result
        mysql-test/r/innodb-autoinc.result
        mysql-test/r/innodb-semi-consistent.result
        mysql-test/r/innodb.result
        mysql-test/r/innodb_bug34300.result
        mysql-test/r/innodb_mrr.result
        mysql-test/r/innodb_mysql.result
        mysql-test/r/innodb_notembedded.result
        mysql-test/r/insert_update.result
        mysql-test/r/join_cache.result
        mysql-test/r/join_nested_jcl6.result
        mysql-test/r/loaddata.result
        mysql-test/r/loaddata_autocom_innodb.result
        mysql-test/r/loadxml.result
        mysql-test/r/log_state.result
        mysql-test/r/log_tables.result
        mysql-test/r/lowercase_table3.result
        mysql-test/r/myisam.result
        mysql-test/r/myisam_mrr.result
        mysql-test/r/myisamlog.result
        mysql-test/r/myisampack.result
        mysql-test/r/mysql.result
        mysql-test/r/mysql_client_test.result
        mysql-test/r/mysql_upgrade.result
        mysql-test/r/mysqlbinlog.result
        mysql-test/r/mysqlbinlog2.result
        mysql-test/r/mysqlbinlog_base64.result
        mysql-test/r/mysqlbinlog_row.result
        mysql-test/r/mysqlbinlog_row_big.result
        mysql-test/r/mysqlbinlog_row_innodb.result
        mysql-test/r/mysqlbinlog_row_myisam.result
        mysql-test/r/mysqlbinlog_row_trans.result
        mysql-test/r/mysqlcheck.result
        mysql-test/r/mysqltest.result
        mysql-test/r/not_embedded_server.result
        mysql-test/r/null_key.result
        mysql-test/r/openssl_1.result
        mysql-test/r/order_by.result
        mysql-test/r/partition.result
        mysql-test/r/partition_datatype.result
        mysql-test/r/partition_error.result
        mysql-test/r/partition_mgm.result
        mysql-test/r/partition_mgm_err.result
        mysql-test/r/partition_not_windows.result
        mysql-test/r/partition_pruning.result
        mysql-test/r/profiling.result
        mysql-test/r/ps.result
        mysql-test/r/ps_1general.result
        mysql-test/r/query_cache.result
        mysql-test/r/query_cache_notembedded.result
        mysql-test/r/schema.result
        mysql-test/r/select.result
        mysql-test/r/select_jcl6.result
        mysql-test/r/show_check.result
        mysql-test/r/sp-destruct.result
        mysql-test/r/sp-dynamic.result
        mysql-test/r/sp-error.result
        mysql-test/r/sp-security.result
        mysql-test/r/sp-vars.result
        mysql-test/r/sp.result
        mysql-test/r/sp_notembedded.result
        mysql-test/r/status.result
        mysql-test/r/strict.result
        mysql-test/r/subselect.result
        mysql-test/r/subselect2.result
        mysql-test/r/subselect3.result
        mysql-test/r/subselect3_jcl6.result
        mysql-test/r/subselect_mat.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/subselect_notembedded.result
        mysql-test/r/subselect_sj.result
        mysql-test/r/subselect_sj2.result
        mysql-test/r/subselect_sj2_jcl6.result
        mysql-test/r/subselect_sj_jcl6.result
        mysql-test/r/symlink.result
        mysql-test/r/system_mysql_db.result
        mysql-test/r/temp_table.result
        mysql-test/r/timezone2.result
        mysql-test/r/trigger.result
        mysql-test/r/type_bit.result
        mysql-test/r/type_blob.result
        mysql-test/r/type_date.result
        mysql-test/r/type_float.result
        mysql-test/r/type_timestamp.result
        mysql-test/r/type_varchar.result
        mysql-test/r/user_var-binlog.result
        mysql-test/r/user_var.result
        mysql-test/r/variables-notembedded.result
        mysql-test/r/variables.result
        mysql-test/r/view.result
        mysql-test/r/wait_timeout.result
        mysql-test/r/warnings.result
        mysql-test/r/warnings_engine_disabled.result
        mysql-test/r/xml.result
        mysql-test/std_data/cacert.pem
        mysql-test/std_data/client-cert.pem
        mysql-test/std_data/client-key.pem
        mysql-test/std_data/server-cert.pem
        mysql-test/std_data/server-key.pem
        mysql-test/std_data/server8k-cert.pem
        mysql-test/std_data/server8k-key.pem
        mysql-test/suite/backup/r/backup_backupdir.result
        mysql-test/suite/backup/r/backup_db_grants.result
        mysql-test/suite/backup/r/backup_errors.result
        mysql-test/suite/backup/r/backup_logs.result
        mysql-test/suite/backup/r/backup_logs_output.result
        mysql-test/suite/backup/r/backup_logs_purge.result
        mysql-test/suite/backup/r/backup_maria.result
        mysql-test/suite/backup/r/backup_no_data.result
        mysql-test/suite/backup/r/backup_securefilepriv.result
        mysql-test/suite/backup/r/backup_tablespace.result
        mysql-test/suite/backup/r/backup_vp_nontx.result
        mysql-test/suite/backup/r/backup_vp_tx.result
        mysql-test/suite/backup/t/backup.test
        mysql-test/suite/backup/t/backup_backupdir.test
        mysql-test/suite/backup/t/backup_blob.test
        mysql-test/suite/backup/t/backup_charsets.test
        mysql-test/suite/backup/t/backup_compression.test
        mysql-test/suite/backup/t/backup_concurrent.test
        mysql-test/suite/backup/t/backup_db_grants.test
        mysql-test/suite/backup/t/backup_ddl_blocker.test
        mysql-test/suite/backup/t/backup_default.test
        mysql-test/suite/backup/t/backup_errors.test
        mysql-test/suite/backup/t/backup_fkey.test
        mysql-test/suite/backup/t/backup_lock_myisam.test
        mysql-test/suite/backup/t/backup_logs.test
        mysql-test/suite/backup/t/backup_logs_output-master.opt
        mysql-test/suite/backup/t/backup_logs_output.test
        mysql-test/suite/backup/t/backup_logs_purge.test
        mysql-test/suite/backup/t/backup_many_dbs.test
        mysql-test/suite/backup/t/backup_maria.test
        mysql-test/suite/backup/t/backup_maria_other_instance.test
        mysql-test/suite/backup/t/backup_multi_blocks.test
        mysql-test/suite/backup/t/backup_no_be.test
        mysql-test/suite/backup/t/backup_no_data.test
        mysql-test/suite/backup/t/backup_no_engine.test
        mysql-test/suite/backup/t/backup_nodata_driver.test
        mysql-test/suite/backup/t/backup_objects.test
        mysql-test/suite/backup/t/backup_procedures.test
        mysql-test/suite/backup/t/backup_securefilepriv-master.opt
        mysql-test/suite/backup/t/backup_securefilepriv.test
        mysql-test/suite/backup/t/backup_security.test
        mysql-test/suite/backup/t/backup_snapshot.test
        mysql-test/suite/backup/t/backup_tablespace.test
        mysql-test/suite/backup/t/backup_timeout.test
        mysql-test/suite/backup/t/backup_views.test
        mysql-test/suite/backup/t/backup_vp_nontx.test
        mysql-test/suite/backup/t/backup_vp_tx.test
        mysql-test/suite/backup/t/disabled.def
        mysql-test/suite/backup_engines/combinations
        mysql-test/suite/backup_engines/r/backup_functions.result
        mysql-test/suite/backup_engines/r/backup_procedures.result
        mysql-test/suite/backup_engines/t/backup_functions.test
        mysql-test/suite/backup_engines/t/backup_online_testing.test
        mysql-test/suite/backup_engines/t/backup_procedures.test
        mysql-test/suite/backup_engines/t/backup_triggers.test
        mysql-test/suite/binlog/combinations
        mysql-test/suite/binlog/r/binlog_auto_increment_bug33029.result
        mysql-test/suite/binlog/r/binlog_base64_flag.result
        mysql-test/suite/binlog/r/binlog_database.result
        mysql-test/suite/binlog/r/binlog_killed_simulate.result
        mysql-test/suite/binlog/r/binlog_multi_engine.result
        mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result
        mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result
        mysql-test/suite/binlog/r/binlog_start_comment.result
        mysql-test/suite/binlog/r/binlog_stm_blackhole.result
        mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result
        mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result
        mysql-test/suite/binlog/r/binlog_stm_row.result
        mysql-test/suite/binlog/r/binlog_unsafe.result
        mysql-test/suite/binlog/t/binlog_auto_increment_bug33029.test
        mysql-test/suite/binlog/t/binlog_killed.test
        mysql-test/suite/binlog/t/binlog_killed_simulate.test
        mysql-test/suite/binlog/t/binlog_start_comment.test
        mysql-test/suite/binlog/t/binlog_stm_row.test
        mysql-test/suite/bugs/combinations
        mysql-test/suite/falcon/r/falcon_bug_28049.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_bugs.result
        mysql-test/suite/falcon/t/disabled.def
        mysql-test/suite/falcon/t/falcon_bug_32398.test
        mysql-test/suite/falcon/t/falcon_online_index.test
        mysql-test/suite/funcs_1/datadict/basics_mixed1.inc
        mysql-test/suite/funcs_1/datadict/charset_collation.inc
        mysql-test/suite/funcs_1/datadict/datadict_priv.inc
        mysql-test/suite/funcs_1/datadict/is_key_column_usage.inc
        mysql-test/suite/funcs_1/datadict/is_routines.inc
        mysql-test/suite/funcs_1/datadict/is_schemata.inc
        mysql-test/suite/funcs_1/datadict/is_tables.inc
        mysql-test/suite/funcs_1/datadict/is_triggers.inc
        mysql-test/suite/funcs_1/datadict/is_views.inc
        mysql-test/suite/funcs_1/datadict/statistics.inc
        mysql-test/suite/funcs_1/datadict/table_constraints.inc
        mysql-test/suite/funcs_1/datadict/tables.inc
        mysql-test/suite/funcs_1/datadict/tables1.inc
        mysql-test/suite/funcs_1/include/falcon_tb1.inc
        mysql-test/suite/funcs_1/include/falcon_tb2.inc
        mysql-test/suite/funcs_1/include/falcon_tb3.inc
        mysql-test/suite/funcs_1/include/falcon_tb4.inc
        mysql-test/suite/funcs_1/include/innodb_tb1.inc
        mysql-test/suite/funcs_1/include/innodb_tb2.inc
        mysql-test/suite/funcs_1/include/innodb_tb3.inc
        mysql-test/suite/funcs_1/include/innodb_tb4.inc
        mysql-test/suite/funcs_1/include/memory_tb1.inc
        mysql-test/suite/funcs_1/include/memory_tb2.inc
        mysql-test/suite/funcs_1/include/memory_tb3.inc
        mysql-test/suite/funcs_1/include/memory_tb4.inc
        mysql-test/suite/funcs_1/include/myisam_tb1.inc
        mysql-test/suite/funcs_1/include/myisam_tb2.inc
        mysql-test/suite/funcs_1/include/myisam_tb3.inc
        mysql-test/suite/funcs_1/include/myisam_tb4.inc
        mysql-test/suite/funcs_1/include/ndb_tb1.inc
        mysql-test/suite/funcs_1/include/ndb_tb2.inc
        mysql-test/suite/funcs_1/include/ndb_tb3.inc
        mysql-test/suite/funcs_1/include/ndb_tb4.inc
        mysql-test/suite/funcs_1/include/sp_tb.inc
        mysql-test/suite/funcs_1/include/tb3.inc
        mysql-test/suite/funcs_1/r/charset_collation_1.result
        mysql-test/suite/funcs_1/r/charset_collation_2.result
        mysql-test/suite/funcs_1/r/charset_collation_3.result
        mysql-test/suite/funcs_1/r/falcon_func_view.result
        mysql-test/suite/funcs_1/r/falcon_storedproc_02.result
        mysql-test/suite/funcs_1/r/falcon_storedproc_03.result
        mysql-test/suite/funcs_1/r/falcon_storedproc_06.result
        mysql-test/suite/funcs_1/r/falcon_storedproc_07.result
        mysql-test/suite/funcs_1/r/falcon_storedproc_08.result
        mysql-test/suite/funcs_1/r/falcon_storedproc_10.result
        mysql-test/suite/funcs_1/r/falcon_trig_0102.result
        mysql-test/suite/funcs_1/r/falcon_trig_0407.result
        mysql-test/suite/funcs_1/r/falcon_trig_09.result
        mysql-test/suite/funcs_1/r/falcon_trig_1011ext.result
        mysql-test/suite/funcs_1/r/falcon_views.result
        mysql-test/suite/funcs_1/r/innodb_func_view.result
        mysql-test/suite/funcs_1/r/innodb_storedproc_02.result
        mysql-test/suite/funcs_1/r/innodb_storedproc_03.result
        mysql-test/suite/funcs_1/r/innodb_storedproc_06.result
        mysql-test/suite/funcs_1/r/innodb_storedproc_07.result
        mysql-test/suite/funcs_1/r/innodb_storedproc_08.result
        mysql-test/suite/funcs_1/r/innodb_storedproc_10.result
        mysql-test/suite/funcs_1/r/innodb_trig_0102.result
        mysql-test/suite/funcs_1/r/innodb_trig_0407.result
        mysql-test/suite/funcs_1/r/innodb_trig_09.result
        mysql-test/suite/funcs_1/r/innodb_trig_1011ext.result
        mysql-test/suite/funcs_1/r/innodb_views.result
        mysql-test/suite/funcs_1/r/is_basics_mixed.result
        mysql-test/suite/funcs_1/r/is_columns_falcon.result
        mysql-test/suite/funcs_1/r/is_columns_innodb.result
        mysql-test/suite/funcs_1/r/is_columns_is.result
        mysql-test/suite/funcs_1/r/is_columns_is_embedded.result
        mysql-test/suite/funcs_1/r/is_columns_memory.result
        mysql-test/suite/funcs_1/r/is_columns_myisam.result
        mysql-test/suite/funcs_1/r/is_columns_myisam_embedded.result
        mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result
        mysql-test/suite/funcs_1/r/is_columns_ndb.result
        mysql-test/suite/funcs_1/r/is_engines.result
        mysql-test/suite/funcs_1/r/is_statistics_mysql_embedded.result
        mysql-test/suite/funcs_1/r/is_table_constraints_mysql_embedded.result
        mysql-test/suite/funcs_1/r/is_tables_myisam_embedded.result
        mysql-test/suite/funcs_1/r/is_tables_mysql_embedded.result
        mysql-test/suite/funcs_1/r/memory_func_view.result
        mysql-test/suite/funcs_1/r/memory_storedproc_02.result
        mysql-test/suite/funcs_1/r/memory_storedproc_03.result
        mysql-test/suite/funcs_1/r/memory_storedproc_06.result
        mysql-test/suite/funcs_1/r/memory_storedproc_07.result
        mysql-test/suite/funcs_1/r/memory_storedproc_08.result
        mysql-test/suite/funcs_1/r/memory_storedproc_10.result
        mysql-test/suite/funcs_1/r/memory_trig_0102.result
        mysql-test/suite/funcs_1/r/memory_trig_0407.result
        mysql-test/suite/funcs_1/r/memory_trig_09.result
        mysql-test/suite/funcs_1/r/memory_trig_1011ext.result
        mysql-test/suite/funcs_1/r/memory_views.result
        mysql-test/suite/funcs_1/r/myisam_func_view.result
        mysql-test/suite/funcs_1/r/myisam_storedproc_02.result
        mysql-test/suite/funcs_1/r/myisam_storedproc_03.result
        mysql-test/suite/funcs_1/r/myisam_storedproc_06.result
        mysql-test/suite/funcs_1/r/myisam_storedproc_07.result
        mysql-test/suite/funcs_1/r/myisam_storedproc_08.result
        mysql-test/suite/funcs_1/r/myisam_storedproc_10.result
        mysql-test/suite/funcs_1/r/myisam_trig_0102.result
        mysql-test/suite/funcs_1/r/myisam_trig_0407.result
        mysql-test/suite/funcs_1/r/myisam_trig_09.result
        mysql-test/suite/funcs_1/r/myisam_trig_1011ext.result
        mysql-test/suite/funcs_1/r/myisam_views.result
        mysql-test/suite/funcs_1/r/ndb_func_view.result
        mysql-test/suite/funcs_1/r/ndb_storedproc_02.result
        mysql-test/suite/funcs_1/r/ndb_storedproc_03.result
        mysql-test/suite/funcs_1/r/ndb_storedproc_06.result
        mysql-test/suite/funcs_1/r/ndb_storedproc_07.result
        mysql-test/suite/funcs_1/r/ndb_storedproc_08.result
        mysql-test/suite/funcs_1/r/ndb_storedproc_10.result
        mysql-test/suite/funcs_1/r/ndb_trig_0102.result
        mysql-test/suite/funcs_1/r/ndb_trig_0407.result
        mysql-test/suite/funcs_1/r/ndb_trig_09.result
        mysql-test/suite/funcs_1/r/ndb_trig_1011ext.result
        mysql-test/suite/funcs_1/r/ndb_views.result
        mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result
        mysql-test/suite/funcs_1/r/processlist_priv_ps.result
        mysql-test/suite/funcs_1/r/storedproc.result
        mysql-test/suite/funcs_1/storedproc/load_sp_tb.inc
        mysql-test/suite/funcs_1/storedproc/param_check.inc
        mysql-test/suite/funcs_1/storedproc/storedproc_06.inc
        mysql-test/suite/funcs_1/storedproc/storedproc_10.inc
        mysql-test/suite/funcs_1/t/disabled.def
        mysql-test/suite/funcs_1/t/is_basics_mixed.test
        mysql-test/suite/funcs_1/t/is_column_privileges.test
        mysql-test/suite/funcs_1/t/is_column_privileges_is_mysql_test.test
        mysql-test/suite/funcs_1/t/is_columns.test
        mysql-test/suite/funcs_1/t/is_engines_federated.test
        mysql-test/suite/funcs_1/t/is_schema_privileges.test
        mysql-test/suite/funcs_1/t/is_schema_privileges_is_mysql_test.test
        mysql-test/suite/funcs_1/t/is_schemata_is_mysql_test.test
        mysql-test/suite/funcs_1/t/is_statistics.test
        mysql-test/suite/funcs_1/t/is_table_constraints.test
        mysql-test/suite/funcs_1/t/is_table_privileges.test
        mysql-test/suite/funcs_1/t/is_user_privileges.test
        mysql-test/suite/funcs_1/t/storedproc.test
        mysql-test/suite/funcs_1/triggers/triggers_03.inc
        mysql-test/suite/funcs_1/triggers/triggers_03e_columns.inc
        mysql-test/suite/funcs_1/triggers/triggers_03e_db_level.inc
        mysql-test/suite/funcs_1/triggers/triggers_03e_db_table_mix.inc
        mysql-test/suite/funcs_1/triggers/triggers_03e_definer.inc
        mysql-test/suite/funcs_1/triggers/triggers_03e_global_db_mix.inc
        mysql-test/suite/funcs_1/triggers/triggers_03e_prepare.inc
        mysql-test/suite/funcs_1/triggers/triggers_03e_table_level.inc
        mysql-test/suite/funcs_1/triggers/triggers_03e_transaction.inc
        mysql-test/suite/funcs_1/triggers/triggers_0407.inc
        mysql-test/suite/funcs_1/triggers/triggers_08.inc
        mysql-test/suite/funcs_1/triggers/triggers_09.inc
        mysql-test/suite/funcs_1/triggers/triggers_1011ext.inc
        mysql-test/suite/funcs_1/views/func_view.inc
        mysql-test/suite/funcs_2/t/disabled.def
        mysql-test/suite/jp/r/jp_create_db_sjis.result
        mysql-test/suite/jp/r/jp_create_db_ucs2.result
        mysql-test/suite/jp/r/jp_create_db_ujis.result
        mysql-test/suite/jp/r/jp_create_db_utf8.result
        mysql-test/suite/jp/t/jp_create_db_sjis.test
        mysql-test/suite/jp/t/jp_create_db_ucs2.test
        mysql-test/suite/jp/t/jp_create_db_ujis.test
        mysql-test/suite/jp/t/jp_create_db_utf8.test
        mysql-test/suite/maria/r/maria-recover.result
        mysql-test/suite/maria/r/maria-recovery2.result
        mysql-test/suite/maria/r/maria2.result
        mysql-test/suite/maria/r/maria_mrr.result
        mysql-test/suite/maria/t/maria-autozerofill.test
        mysql-test/suite/maria/t/maria-page-checksum.test
        mysql-test/suite/maria/t/maria-recover.test
        mysql-test/suite/maria/t/maria-recovery.test
        mysql-test/suite/maria/t/maria-recovery2.test
        mysql-test/suite/maria/t/maria2.test
        mysql-test/suite/maria/t/maria_mrr.test
        mysql-test/suite/ndb/r/bug36547.result
        mysql-test/suite/ndb/r/loaddata_autocom_ndb.result
        mysql-test/suite/ndb/r/ndb_alter_table_online.result
        mysql-test/suite/ndb/r/ndb_basic.result
        mysql-test/suite/ndb/r/ndb_blob_restore.result
        mysql-test/suite/ndb/r/ndb_config.result
        mysql-test/suite/ndb/r/ndb_dbug_lock.result
        mysql-test/suite/ndb/r/ndb_dd_ddl.result
        mysql-test/suite/ndb/r/ndb_discover_db.result
        mysql-test/suite/ndb/r/ndb_load.result
        mysql-test/suite/ndb/r/ndb_loaddatalocal.result
        mysql-test/suite/ndb/r/ndb_read_multi_range.result
        mysql-test/suite/ndb/r/ndb_replace.result
        mysql-test/suite/ndb/r/ndb_restore.result
        mysql-test/suite/ndb/r/ndb_restore_partition.result
        mysql-test/suite/ndb/r/ndb_restore_print.result
        mysql-test/suite/ndb/r/ndb_single_user.result
        mysql-test/suite/ndb/r/ndb_trigger.result
        mysql-test/suite/ndb/t/bug36547.test
        mysql-test/suite/ndb/t/disabled.def
        mysql-test/suite/ndb/t/ndb_alter_table_online.test
        mysql-test/suite/ndb/t/ndb_config.test
        mysql-test/suite/ndb/t/ndb_dbug_lock.test
        mysql-test/suite/ndb/t/ndb_dd_ddl.test
        mysql-test/suite/ndb/t/ndb_dd_dump.test
        mysql-test/suite/ndb/t/ndb_discover_db.test
        mysql-test/suite/ndb/t/ndb_load.test
        mysql-test/suite/ndb/t/ndb_loaddatalocal.test
        mysql-test/suite/ndb/t/ndb_read_multi_range.test
        mysql-test/suite/ndb/t/ndb_replace.test
        mysql-test/suite/ndb/t/ndb_restore_partition.test
        mysql-test/suite/ndb/t/ndb_single_user.test
        mysql-test/suite/ndb/t/ndb_trigger.test
        mysql-test/suite/ndb/t/ndbapi.test
        mysql-test/suite/ndb_binlog/r/ndb_binlog_basic.result
        mysql-test/suite/ndb_binlog/r/ndb_binlog_ddl_multi.result
        mysql-test/suite/ndb_binlog/r/ndb_binlog_discover.result
        mysql-test/suite/ndb_binlog/r/ndb_binlog_format.result
        mysql-test/suite/ndb_binlog/r/ndb_binlog_ignore_db.result
        mysql-test/suite/ndb_binlog/r/ndb_binlog_log_bin.result
        mysql-test/suite/ndb_binlog/r/ndb_binlog_multi.result
        mysql-test/suite/ndb_binlog/r/ndb_binlog_restore.result
        mysql-test/suite/ndb_binlog/t/ndb_binlog_basic.test
        mysql-test/suite/ndb_binlog/t/ndb_binlog_discover.test
        mysql-test/suite/ndb_team/r/ndb_dd_backuprestore.result
        mysql-test/suite/ndb_team/r/rpl_ndb_dd_advance.result
        mysql-test/suite/ndb_team/r/rpl_ndb_extraColMaster.result
        mysql-test/suite/ndb_team/t/ndb_autodiscover.test
        mysql-test/suite/ndb_team/t/rpl_ndb_dd_advance.test
        mysql-test/suite/parts/inc/partition.pre
        mysql-test/suite/parts/inc/partition_check_drop.inc
        mysql-test/suite/parts/inc/partition_key_32col.inc
        mysql-test/suite/parts/inc/partition_layout.inc
        mysql-test/suite/parts/inc/partition_layout_check1.inc
        mysql-test/suite/parts/inc/partition_layout_check2.inc
        mysql-test/suite/parts/inc/partition_supported_sql_funcs.inc
        mysql-test/suite/parts/r/ndb_dd_backuprestore.result
        mysql-test/suite/parts/r/part_supported_sql_func_innodb.result
        mysql-test/suite/parts/r/part_supported_sql_func_myisam.result
        mysql-test/suite/parts/r/part_supported_sql_func_ndb.result
        mysql-test/suite/parts/r/partition_auto_increment_ndb.result
        mysql-test/suite/parts/r/partition_bit_innodb.result
        mysql-test/suite/parts/r/partition_bit_myisam.result
        mysql-test/suite/parts/r/partition_mgm_lc0_archive.result
        mysql-test/suite/parts/r/partition_mgm_lc0_innodb.result
        mysql-test/suite/parts/r/partition_mgm_lc0_memory.result
        mysql-test/suite/parts/r/partition_mgm_lc0_myisam.result
        mysql-test/suite/parts/r/partition_mgm_lc0_ndb.result
        mysql-test/suite/parts/r/partition_mgm_lc1_archive.result
        mysql-test/suite/parts/r/partition_mgm_lc1_innodb.result
        mysql-test/suite/parts/r/partition_mgm_lc1_memory.result
        mysql-test/suite/parts/r/partition_mgm_lc1_myisam.result
        mysql-test/suite/parts/r/partition_mgm_lc1_ndb.result
        mysql-test/suite/parts/r/partition_mgm_lc2_archive.result
        mysql-test/suite/parts/r/partition_mgm_lc2_innodb.result
        mysql-test/suite/parts/r/partition_mgm_lc2_memory.result
        mysql-test/suite/parts/r/partition_mgm_lc2_myisam.result
        mysql-test/suite/parts/r/partition_mgm_lc2_ndb.result
        mysql-test/suite/parts/r/partition_special_innodb.result
        mysql-test/suite/parts/r/partition_special_myisam.result
        mysql-test/suite/parts/r/partition_t55.out
        mysql-test/suite/parts/r/rpl_partition.result
        mysql-test/suite/parts/t/disabled.def
        mysql-test/suite/parts/t/partition_basic_symlink_innodb.test
        mysql-test/suite/parts/t/partition_recover_myisam.test
        mysql-test/suite/parts/t/partition_repair_myisam.test
        mysql-test/suite/parts/t/partition_special_innodb.test
        mysql-test/suite/parts/t/partition_value_innodb.test
        mysql-test/suite/parts/t/partition_value_myisam.test
        mysql-test/suite/parts/t/partition_value_ndb.test
        mysql-test/suite/parts/t/rpl_partition.test
        mysql-test/suite/rpl/combinations
        mysql-test/suite/rpl/include/rpl_mixed_dml.inc
        mysql-test/suite/rpl/r/rpl000017.result
        mysql-test/suite/rpl/r/rpl_000015.result
        mysql-test/suite/rpl/r/rpl_LD_INFILE.result
        mysql-test/suite/rpl/r/rpl_alter_db.result
        mysql-test/suite/rpl/r/rpl_auto_increment.result
        mysql-test/suite/rpl/r/rpl_backup.result
        mysql-test/suite/rpl/r/rpl_blackhole.result
        mysql-test/suite/rpl/r/rpl_bug33931.result
        mysql-test/suite/rpl/r/rpl_change_master.result
        mysql-test/suite/rpl/r/rpl_deadlock_innodb.result
        mysql-test/suite/rpl/r/rpl_drop_db.result
        mysql-test/suite/rpl/r/rpl_drop_view.result
        mysql-test/suite/rpl/r/rpl_events.result
        mysql-test/suite/rpl/r/rpl_extraCol_falcon.result
        mysql-test/suite/rpl/r/rpl_extraCol_innodb.result
        mysql-test/suite/rpl/r/rpl_extraCol_myisam.result
        mysql-test/suite/rpl/r/rpl_extraColmaster_falcon.result
        mysql-test/suite/rpl/r/rpl_filter_tables_not_exist.result
        mysql-test/suite/rpl/r/rpl_flushlog_loop.result
        mysql-test/suite/rpl/r/rpl_found_rows.result
        mysql-test/suite/rpl/r/rpl_grant.result
        mysql-test/suite/rpl/r/rpl_heartbeat.result
        mysql-test/suite/rpl/r/rpl_idempotency.result
        mysql-test/suite/rpl/r/rpl_ignore_table.result
        mysql-test/suite/rpl/r/rpl_incident.result
        mysql-test/suite/rpl/r/rpl_init_slave.result
        mysql-test/suite/rpl/r/rpl_innodb.result
        mysql-test/suite/rpl/r/rpl_innodb_mixed_ddl.result
        mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result
        mysql-test/suite/rpl/r/rpl_known_bugs_detection.result
        mysql-test/suite/rpl/r/rpl_loaddata.result
        mysql-test/suite/rpl/r/rpl_loaddata_charset.result
        mysql-test/suite/rpl/r/rpl_loaddata_fatal.result
        mysql-test/suite/rpl/r/rpl_loaddata_m.result
        mysql-test/suite/rpl/r/rpl_loaddata_s.result
        mysql-test/suite/rpl/r/rpl_loaddata_simple.result
        mysql-test/suite/rpl/r/rpl_loaddatalocal.result
        mysql-test/suite/rpl/r/rpl_loadfile.result
        mysql-test/suite/rpl/r/rpl_locktrans_falcon.result
        mysql-test/suite/rpl/r/rpl_locktrans_innodb.result
        mysql-test/suite/rpl/r/rpl_locktrans_myisam.result
        mysql-test/suite/rpl/r/rpl_log_pos.result
        mysql-test/suite/rpl/r/rpl_misc_functions.result
        mysql-test/suite/rpl/r/rpl_mixed_ddl_dml.result
        mysql-test/suite/rpl/r/rpl_multi_engine.result
        mysql-test/suite/rpl/r/rpl_packet.result
        mysql-test/suite/rpl/r/rpl_ps.result
        mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result
        mysql-test/suite/rpl/r/rpl_replicate_do.result
        mysql-test/suite/rpl/r/rpl_rewrt_db.result
        mysql-test/suite/rpl/r/rpl_rotate_logs.result
        mysql-test/suite/rpl/r/rpl_row_001.result
        mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result
        mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result
        mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result
        mysql-test/suite/rpl/r/rpl_row_colSize.result
        mysql-test/suite/rpl/r/rpl_row_create_table.result
        mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result
        mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result
        mysql-test/suite/rpl/r/rpl_row_loaddata_m.result
        mysql-test/suite/rpl/r/rpl_row_log.result
        mysql-test/suite/rpl/r/rpl_row_log_innodb.result
        mysql-test/suite/rpl/r/rpl_row_max_relay_size.result
        mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result
        mysql-test/suite/rpl/r/rpl_row_reset_slave.result
        mysql-test/suite/rpl/r/rpl_row_sp002_innodb.result
        mysql-test/suite/rpl/r/rpl_row_sp007_innodb.result
        mysql-test/suite/rpl/r/rpl_row_stop_middle_update.result
        mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result
        mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result
        mysql-test/suite/rpl/r/rpl_row_until.result
        mysql-test/suite/rpl/r/rpl_server_id1.result
        mysql-test/suite/rpl/r/rpl_server_id2.result
        mysql-test/suite/rpl/r/rpl_skip_error.result
        mysql-test/suite/rpl/r/rpl_slave_skip.result
        mysql-test/suite/rpl/r/rpl_slave_status.result
        mysql-test/suite/rpl/r/rpl_sp.result
        mysql-test/suite/rpl/r/rpl_sp_effects.result
        mysql-test/suite/rpl/r/rpl_ssl.result
        mysql-test/suite/rpl/r/rpl_ssl1.result
        mysql-test/suite/rpl/r/rpl_stm_000001.result
        mysql-test/suite/rpl/r/rpl_stm_EE_err2.result
        mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result
        mysql-test/suite/rpl/r/rpl_stm_log.result
        mysql-test/suite/rpl/r/rpl_stm_max_relay_size.result
        mysql-test/suite/rpl/r/rpl_stm_reset_slave.result
        mysql-test/suite/rpl/r/rpl_stm_until.result
        mysql-test/suite/rpl/r/rpl_temporary.result
        mysql-test/suite/rpl/r/rpl_temporary_errors.result
        mysql-test/suite/rpl/r/rpl_timezone.result
        mysql-test/suite/rpl/r/rpl_trigger.result
        mysql-test/suite/rpl/r/rpl_variables.result
        mysql-test/suite/rpl/t/disabled.def
        mysql-test/suite/rpl/t/rpl000010.test
        mysql-test/suite/rpl/t/rpl000011.test
        mysql-test/suite/rpl/t/rpl000013.test
        mysql-test/suite/rpl/t/rpl000017-slave.sh*
        mysql-test/suite/rpl/t/rpl000017.test
        mysql-test/suite/rpl/t/rpl_000015-slave.sh*
        mysql-test/suite/rpl/t/rpl_000015.test
        mysql-test/suite/rpl/t/rpl_LD_INFILE.test
        mysql-test/suite/rpl/t/rpl_alter.test
        mysql-test/suite/rpl/t/rpl_alter_db.test
        mysql-test/suite/rpl/t/rpl_auto_increment_11932.test
        mysql-test/suite/rpl/t/rpl_backup.test
        mysql-test/suite/rpl/t/rpl_binlog_grant.test
        mysql-test/suite/rpl/t/rpl_binlog_query_filter_rules.test
        mysql-test/suite/rpl/t/rpl_bit.test
        mysql-test/suite/rpl/t/rpl_bit_npk.test
        mysql-test/suite/rpl/t/rpl_blackhole.test
        mysql-test/suite/rpl/t/rpl_bug33931.test
        mysql-test/suite/rpl/t/rpl_change_master.test
        mysql-test/suite/rpl/t/rpl_colSize.test
        mysql-test/suite/rpl/t/rpl_deadlock_innodb-slave.opt
        mysql-test/suite/rpl/t/rpl_do_grant.test
        mysql-test/suite/rpl/t/rpl_drop.test
        mysql-test/suite/rpl/t/rpl_drop_db.test
        mysql-test/suite/rpl/t/rpl_drop_view.test
        mysql-test/suite/rpl/t/rpl_dual_pos_advance.test
        mysql-test/suite/rpl/t/rpl_err_ignoredtable.test
        mysql-test/suite/rpl/t/rpl_events.test
        mysql-test/suite/rpl/t/rpl_filter_tables_not_exist.test
        mysql-test/suite/rpl/t/rpl_flushlog_loop-master.opt
        mysql-test/suite/rpl/t/rpl_flushlog_loop-master.sh*
        mysql-test/suite/rpl/t/rpl_flushlog_loop-slave.opt
        mysql-test/suite/rpl/t/rpl_flushlog_loop-slave.sh*
        mysql-test/suite/rpl/t/rpl_flushlog_loop.test
        mysql-test/suite/rpl/t/rpl_heartbeat.test
        mysql-test/suite/rpl/t/rpl_idempotency-slave.opt
        mysql-test/suite/rpl/t/rpl_idempotency.test
        mysql-test/suite/rpl/t/rpl_ignore_table.test
        mysql-test/suite/rpl/t/rpl_incident.test
        mysql-test/suite/rpl/t/rpl_init_slave.test
        mysql-test/suite/rpl/t/rpl_innodb-master.opt
        mysql-test/suite/rpl/t/rpl_innodb.test
        mysql-test/suite/rpl/t/rpl_innodb_bug28430-master.opt
        mysql-test/suite/rpl/t/rpl_innodb_bug28430-slave.opt
        mysql-test/suite/rpl/t/rpl_insert.test
        mysql-test/suite/rpl/t/rpl_known_bugs_detection.test
        mysql-test/suite/rpl/t/rpl_loaddata_charset.test
        mysql-test/suite/rpl/t/rpl_loaddata_fatal.test
        mysql-test/suite/rpl/t/rpl_loaddata_m.test
        mysql-test/suite/rpl/t/rpl_loaddata_s.test
        mysql-test/suite/rpl/t/rpl_loaddata_simple.test
        mysql-test/suite/rpl/t/rpl_loaddatalocal.test
        mysql-test/suite/rpl/t/rpl_loadfile.test
        mysql-test/suite/rpl/t/rpl_locktrans_myisam.test
        mysql-test/suite/rpl/t/rpl_log_pos.test
        mysql-test/suite/rpl/t/rpl_master_pos_wait.test
        mysql-test/suite/rpl/t/rpl_misc_functions-slave.sh*
        mysql-test/suite/rpl/t/rpl_misc_functions.test
        mysql-test/suite/rpl/t/rpl_mixed_ddl_dml.test
        mysql-test/suite/rpl/t/rpl_multi_delete.test
        mysql-test/suite/rpl/t/rpl_multi_delete2.test
        mysql-test/suite/rpl/t/rpl_multi_engine.test
        mysql-test/suite/rpl/t/rpl_optimize.test
        mysql-test/suite/rpl/t/rpl_packet.test
        mysql-test/suite/rpl/t/rpl_ps.test
        mysql-test/suite/rpl/t/rpl_relayrotate-slave.opt
        mysql-test/suite/rpl/t/rpl_relayspace.test
        mysql-test/suite/rpl/t/rpl_replicate_do.test
        mysql-test/suite/rpl/t/rpl_rewrt_db.test
        mysql-test/suite/rpl/t/rpl_rotate_logs-slave.sh*
        mysql-test/suite/rpl/t/rpl_rotate_logs.test
        mysql-test/suite/rpl/t/rpl_row_basic_11bugs-master.opt
        mysql-test/suite/rpl/t/rpl_row_create_table.test
        mysql-test/suite/rpl/t/rpl_row_inexist_tbl.test
        mysql-test/suite/rpl/t/rpl_row_max_relay_size.test
        mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test
        mysql-test/suite/rpl/t/rpl_row_sp001.test
        mysql-test/suite/rpl/t/rpl_row_sp005.test
        mysql-test/suite/rpl/t/rpl_row_sp008.test
        mysql-test/suite/rpl/t/rpl_row_sp009.test
        mysql-test/suite/rpl/t/rpl_row_sp010.test
        mysql-test/suite/rpl/t/rpl_row_stop_middle_update.test
        mysql-test/suite/rpl/t/rpl_row_trig002.test
        mysql-test/suite/rpl/t/rpl_row_trig003.test
        mysql-test/suite/rpl/t/rpl_row_until.test
        mysql-test/suite/rpl/t/rpl_server_id1.test
        mysql-test/suite/rpl/t/rpl_server_id2.test
        mysql-test/suite/rpl/t/rpl_session_var.test
        mysql-test/suite/rpl/t/rpl_set_charset.test
        mysql-test/suite/rpl/t/rpl_slave_skip.test
        mysql-test/suite/rpl/t/rpl_slave_status.test
        mysql-test/suite/rpl/t/rpl_sp.test
        mysql-test/suite/rpl/t/rpl_sp004.test
        mysql-test/suite/rpl/t/rpl_sp_effects.test
        mysql-test/suite/rpl/t/rpl_sporadic_master.test
        mysql-test/suite/rpl/t/rpl_ssl1.test
        mysql-test/suite/rpl/t/rpl_start_stop_slave.test
        mysql-test/suite/rpl/t/rpl_stm_until.test
        mysql-test/suite/rpl/t/rpl_temp_table.test
        mysql-test/suite/rpl/t/rpl_temporary.test
        mysql-test/suite/rpl/t/rpl_temporary_errors.test
        mysql-test/suite/rpl/t/rpl_timezone.test
        mysql-test/suite/rpl/t/rpl_trigger.test
        mysql-test/suite/rpl/t/rpl_user_variables.test
        mysql-test/suite/rpl/t/rpl_view.test
        mysql-test/suite/rpl_ndb/r/rpl_ndb_basic.result
        mysql-test/suite/rpl_ndb/r/rpl_ndb_circular.result
        mysql-test/suite/rpl_ndb/r/rpl_ndb_idempotent.result
        mysql-test/suite/rpl_ndb/t/disabled.def
        mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test
        mysql-test/suite/rpl_ndb/t/rpl_ndb_circular.test
        mysql-test/suite/rpl_ndb_big/r/rpl_ndb_2innodb.result
        mysql-test/suite/rpl_ndb_big/r/rpl_ndb_2myisam.result
        mysql-test/suite/rpl_ndb_big/r/rpl_ndb_2other.result
        mysql-test/suite/rpl_ndb_big/r/rpl_ndb_circular_simplex.result
        mysql-test/suite/rpl_ndb_big/r/rpl_ndb_ctype_ucs2_def.result
        mysql-test/suite/rpl_ndb_big/r/rpl_ndb_innodb_trans.result
        mysql-test/suite/rpl_ndb_big/r/rpl_ndb_multi.result
        mysql-test/suite/rpl_ndb_big/r/rpl_ndb_row_001.result
        mysql-test/suite/rpl_ndb_big/r/rpl_ndb_sync.result
        mysql-test/suite/rpl_ndb_big/r/rpl_row_basic_7ndb.result
        mysql-test/suite/rpl_ndb_big/t/rpl_ndb_2innodb-master.opt
        mysql-test/suite/rpl_ndb_big/t/rpl_ndb_2innodb.test
        mysql-test/suite/rpl_ndb_big/t/rpl_ndb_2myisam-master.opt
        mysql-test/suite/rpl_ndb_big/t/rpl_ndb_2myisam.test
        mysql-test/suite/rpl_ndb_big/t/rpl_ndb_2ndb.test
        mysql-test/suite/rpl_ndb_big/t/rpl_ndb_2other.test
        mysql-test/suite/rpl_ndb_big/t/rpl_ndb_apply_status.test
        mysql-test/suite/rpl_ndb_big/t/rpl_ndb_bank.test
        mysql-test/suite/rpl_ndb_big/t/rpl_ndb_circular_simplex.test
        mysql-test/suite/rpl_ndb_big/t/rpl_ndb_ctype_ucs2_def.test
        mysql-test/suite/rpl_ndb_big/t/rpl_ndb_innodb_trans.test
        mysql-test/suite/rpl_ndb_big/t/rpl_ndb_load.test
        mysql-test/suite/rpl_ndb_big/t/rpl_ndb_multi.test
        mysql-test/suite/rpl_ndb_big/t/rpl_ndb_sync.test
        mysql-test/suite/rpl_ndb_big/t/rpl_ndbapi_multi.test
        mysql-test/suite/rpl_ndb_big/t/rpl_truncate_7ndb_2.test
        mysql-test/suite/sys_vars/inc/join_buffer_size_basic.inc
        mysql-test/suite/sys_vars/inc/key_buffer_size_basic.inc
        mysql-test/suite/sys_vars/inc/query_alloc_block_size_basic.inc
        mysql-test/suite/sys_vars/inc/query_cache_size_basic.inc
        mysql-test/suite/sys_vars/inc/query_prealloc_size_basic.inc
        mysql-test/suite/sys_vars/inc/sort_buffer_size_basic.inc
        mysql-test/suite/sys_vars/inc/timestamp_basic.inc
        mysql-test/suite/sys_vars/r/join_buffer_size_basic_32.result
        mysql-test/suite/sys_vars/r/join_buffer_size_basic_64.result
        mysql-test/suite/sys_vars/r/key_buffer_size_basic_32.result
        mysql-test/suite/sys_vars/r/key_buffer_size_basic_64.result
        mysql-test/suite/sys_vars/r/log_warnings_basic_32.result
        mysql-test/suite/sys_vars/r/max_binlog_cache_size_basic_32.result
        mysql-test/suite/sys_vars/r/max_binlog_cache_size_basic_64.result
        mysql-test/suite/sys_vars/r/myisam_max_sort_file_size_basic_32.result
        mysql-test/suite/sys_vars/r/myisam_max_sort_file_size_basic_64.result
        mysql-test/suite/sys_vars/r/query_alloc_block_size_basic_32.result
        mysql-test/suite/sys_vars/r/query_cache_size_basic_32.result
        mysql-test/suite/sys_vars/r/query_cache_size_basic_64.result
        mysql-test/suite/sys_vars/r/query_prealloc_size_basic_32.result
        mysql-test/suite/sys_vars/r/range_alloc_block_size_basic_32.result
        mysql-test/suite/sys_vars/r/sort_buffer_size_basic_32.result
        mysql-test/suite/sys_vars/r/sort_buffer_size_basic_64.result
        mysql-test/suite/sys_vars/r/timestamp_basic_32.result
        mysql-test/suite/sys_vars/r/timestamp_basic_64.result
        mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic_32.result
        mysql-test/suite/sys_vars/t/disabled.def
        mysql-test/t/alter_table.test
        mysql-test/t/archive.test
        mysql-test/t/archive_aio_posix.test
        mysql-test/t/bootstrap.test
        mysql-test/t/change_user.test
        mysql-test/t/comment_index.test
        mysql-test/t/crash_commit_before.test
        mysql-test/t/create.test
        mysql-test/t/create_not_windows.test
        mysql-test/t/csv.test
        mysql-test/t/ctype_big5.test
        mysql-test/t/ctype_latin2_ch.test
        mysql-test/t/ctype_ldml.test
        mysql-test/t/ctype_ucs.test
        mysql-test/t/date_formats.test
        mysql-test/t/disabled.def
        mysql-test/t/distinct.test
        mysql-test/t/drop-no_root.test
        mysql-test/t/drop.test
        mysql-test/t/error_simulation.test
        mysql-test/t/events_bugs.test
        mysql-test/t/events_grant.test
        mysql-test/t/events_scheduling.test
        mysql-test/t/execution_constants.test
        mysql-test/t/fix_priv_tables.test
        mysql-test/t/fulltext.test
        mysql-test/t/fulltext2.test
        mysql-test/t/func_compress.test
        mysql-test/t/func_if.test
        mysql-test/t/func_in.test
        mysql-test/t/func_math.test
        mysql-test/t/func_str.test
        mysql-test/t/func_time.test
        mysql-test/t/gis.test
        mysql-test/t/grant.test
        mysql-test/t/grant2.test
        mysql-test/t/grant4.test
        mysql-test/t/grant_cache_no_prot.test
        mysql-test/t/grant_cache_ps_prot.test
        mysql-test/t/greedy_optimizer.test
        mysql-test/t/having.test
        mysql-test/t/implicit_commit.test
        mysql-test/t/information_schema.test
        mysql-test/t/information_schema_chmod.test
        mysql-test/t/init_file.test
        mysql-test/t/innodb-autoinc-optimize.test
        mysql-test/t/innodb-autoinc.test
        mysql-test/t/innodb-semi-consistent-master.opt
        mysql-test/t/innodb-semi-consistent.test
        mysql-test/t/innodb.test
        mysql-test/t/innodb_bug34300.test
        mysql-test/t/innodb_mrr.test
        mysql-test/t/innodb_mysql.test
        mysql-test/t/innodb_notembedded.test
        mysql-test/t/insert_update.test
        mysql-test/t/join_cache.test
        mysql-test/t/loaddata.test
        mysql-test/t/loadxml.test
        mysql-test/t/log_state.test
        mysql-test/t/log_tables.test
        mysql-test/t/lowercase_table3.test
        mysql-test/t/merge.test
        mysql-test/t/myisam-system.test
        mysql-test/t/myisam.test
        mysql-test/t/myisam_mrr.test
        mysql-test/t/myisamlog.test
        mysql-test/t/myisampack.test
        mysql-test/t/mysql.test
        mysql-test/t/mysql_client_test.test
        mysql-test/t/mysql_upgrade.test
        mysql-test/t/mysqlbinlog-cp932.test
        mysql-test/t/mysqlbinlog.test
        mysql-test/t/mysqlbinlog2.test
        mysql-test/t/mysqlbinlog_base64.test
        mysql-test/t/mysqlbinlog_row.test
        mysql-test/t/mysqlbinlog_row_big.test
        mysql-test/t/mysqlbinlog_row_trans.test
        mysql-test/t/mysqlcheck.test
        mysql-test/t/mysqldump.test
        mysql-test/t/mysqltest.test
        mysql-test/t/not_embedded_server.test
        mysql-test/t/openssl_1.test
        mysql-test/t/outfile.test
        mysql-test/t/partition.test
        mysql-test/t/partition_error.test
        mysql-test/t/partition_federated.test
        mysql-test/t/partition_innodb_stmt.test
        mysql-test/t/partition_mgm.test
        mysql-test/t/partition_not_windows.test
        mysql-test/t/partition_pruning.test
        mysql-test/t/profiling.test
        mysql-test/t/ps.test
        mysql-test/t/ps_1general.test
        mysql-test/t/query_cache.test
        mysql-test/t/query_cache_notembedded.test
        mysql-test/t/repair.test
        mysql-test/t/select.test
        mysql-test/t/show_check.test
        mysql-test/t/sp-destruct.test
        mysql-test/t/sp-error.test
        mysql-test/t/sp-security.test
        mysql-test/t/sp.test
        mysql-test/t/status.test
        mysql-test/t/strict.test
        mysql-test/t/subselect.test
        mysql-test/t/subselect3.test
        mysql-test/t/subselect_mat.test
        mysql-test/t/subselect_notembedded.test
        mysql-test/t/subselect_nulls.test
        mysql-test/t/subselect_sj.test
        mysql-test/t/symlink.test
        mysql-test/t/system_mysql_db.test
        mysql-test/t/system_mysql_db_fix30020.test
        mysql-test/t/system_mysql_db_fix40123.test
        mysql-test/t/system_mysql_db_fix50030.test
        mysql-test/t/system_mysql_db_fix50117.test
        mysql-test/t/temp_table.test
        mysql-test/t/timezone2.test
        mysql-test/t/trigger-compat.test
        mysql-test/t/trigger.test
        mysql-test/t/trigger_notembedded.test
        mysql-test/t/type_bit.test
        mysql-test/t/type_blob.test
        mysql-test/t/type_date.test
        mysql-test/t/type_float.test
        mysql-test/t/type_timestamp.test
        mysql-test/t/type_varchar.test
        mysql-test/t/upgrade.test
        mysql-test/t/user_limits.test
        mysql-test/t/user_var-binlog.test
        mysql-test/t/user_var.test
        mysql-test/t/varbinary.test
        mysql-test/t/variables-notembedded.test
        mysql-test/t/variables.test
        mysql-test/t/view.test
        mysql-test/t/wait_timeout.test
        mysql-test/t/warnings.test
        mysql-test/t/warnings_engine_disabled.test
        mysql-test/t/xml.test
        mysys/charset.c
        mysys/lf_hash.c
        mysys/mf_keycache.c
        mysys/my_delete.c
        mysys/my_error.c
        mysys/my_init.c
        mysys/my_safehash.c
        mysys/my_thr_init.c
        mysys/safemalloc.c
        mysys/thr_mutex.c
        netware/BUILD/nwbootstrap
        scripts/make_binary_distribution.sh
        scripts/mysql_install_db.sh
        scripts/mysql_system_tables.sql
        sql-common/my_time.c
        sql/CMakeLists.txt
        sql/Makefile.am
        sql/backup/Doxyfile
        sql/backup/api_types.h
        sql/backup/backup_aux.h
        sql/backup/backup_engine.h
        sql/backup/backup_info.cc
        sql/backup/backup_info.h
        sql/backup/backup_kernel.h
        sql/backup/backup_test.cc
        sql/backup/be_default.cc
        sql/backup/be_default.h
        sql/backup/be_logical.h
        sql/backup/be_native.h
        sql/backup/be_nodata.cc
        sql/backup/be_nodata.h
        sql/backup/be_snapshot.cc
        sql/backup/be_snapshot.h
        sql/backup/be_thread.cc
        sql/backup/be_thread.h
        sql/backup/buffer_iterator.cc
        sql/backup/buffer_iterator.h
        sql/backup/data_backup.cc
        sql/backup/error.h
        sql/backup/image_info.cc
        sql/backup/image_info.h
        sql/backup/kernel.cc
        sql/backup/logger.cc
        sql/backup/logger.h
        sql/backup/restore_info.h
        sql/backup/stream.cc
        sql/backup/stream.h
        sql/backup/stream_v1.c
        sql/backup/stream_v1.h
        sql/backup/stream_v1_transport.c
        sql/ddl_blocker.cc
        sql/debug_sync.cc
        sql/field.cc
        sql/field.h
        sql/filesort.cc
        sql/ha_ndbcluster.cc
        sql/ha_ndbcluster_binlog.cc
        sql/ha_partition.cc
        sql/ha_partition.h
        sql/handler.cc
        sql/handler.h
        sql/hash_filo.h
        sql/hostname.cc
        sql/item.cc
        sql/item.h
        sql/item_cmpfunc.cc
        sql/item_cmpfunc.h
        sql/item_create.cc
        sql/item_func.cc
        sql/item_func.h
        sql/item_strfunc.cc
        sql/item_subselect.cc
        sql/item_subselect.h
        sql/item_sum.cc
        sql/item_timefunc.cc
        sql/item_timefunc.h
        sql/key.cc
        sql/lex.h
        sql/lock.cc
        sql/log.cc
        sql/log.h
        sql/log_event.cc
        sql/log_event.h
        sql/mdl.cc
        sql/mysql_priv.h
        sql/mysqld.cc
        sql/opt_range.cc
        sql/opt_range.h
        sql/parse_file.cc
        sql/partition_info.cc
        sql/protocol.cc
        sql/protocol.h
        sql/records.h
        sql/repl_failsafe.cc
        sql/rpl_constants.h
        sql/rpl_filter.cc
        sql/rpl_handler.cc
        sql/rpl_mi.cc
        sql/rpl_mi.h
        sql/rpl_rli.cc
        sql/rpl_tblmap.cc
        sql/rpl_tblmap.h
        sql/scheduler.cc
        sql/set_var.cc
        sql/set_var.h
        sql/share/errmsg.txt
        sql/si_objects.cc
        sql/si_objects.h
        sql/slave.cc
        sql/sp.cc
        sql/sp_cache.cc
        sql/sp_head.cc
        sql/spatial.h
        sql/sql_acl.cc
        sql/sql_base.cc
        sql/sql_binlog.cc
        sql/sql_cache.cc
        sql/sql_class.cc
        sql/sql_class.h
        sql/sql_connect.cc
        sql/sql_cursor.cc
        sql/sql_db.cc
        sql/sql_delete.cc
        sql/sql_error.cc
        sql/sql_error.h
        sql/sql_handler.cc
        sql/sql_insert.cc
        sql/sql_join_cache.cc
        sql/sql_lex.cc
        sql/sql_lex.h
        sql/sql_locale.cc
        sql/sql_parse.cc
        sql/sql_partition.cc
        sql/sql_plugin.cc
        sql/sql_plugin.h
        sql/sql_prepare.cc
        sql/sql_repl.cc
        sql/sql_repl.h
        sql/sql_select.cc
        sql/sql_select.h
        sql/sql_servers.cc
        sql/sql_show.cc
        sql/sql_table.cc
        sql/sql_test.cc
        sql/sql_trigger.cc
        sql/sql_trigger.h
        sql/sql_udf.cc
        sql/sql_union.cc
        sql/sql_update.cc
        sql/sql_yacc.yy
        sql/table.cc
        sql/table.h
        sql/transaction.cc
        sql/tztime.cc
        sql/unireg.cc
        storage/archive/ha_archive.cc
        storage/archive/support/archive_read_test.slap
        storage/blackhole/ha_blackhole.cc
        storage/csv/ha_tina.cc
        storage/example/ha_example.cc
        storage/falcon/Cache.cpp
        storage/falcon/ha_falcon.cpp
        storage/federated/ha_federated.cc
        storage/heap/ha_heap.cc
        storage/innobase/btr/btr0sea.c
        storage/innobase/buf/buf0lru.c
        storage/innobase/dict/dict0dict.c
        storage/innobase/dict/dict0mem.c
        storage/innobase/handler/ha_innodb.cc
        storage/innobase/handler/ha_innodb.h
        storage/innobase/include/btr0sea.h
        storage/innobase/include/data0type.ic
        storage/innobase/include/dict0dict.h
        storage/innobase/include/dict0mem.h
        storage/innobase/include/ha_prototypes.h
        storage/innobase/include/hash0hash.ic
        storage/innobase/include/lock0lock.h
        storage/innobase/include/row0mysql.h
        storage/innobase/include/srv0srv.h
        storage/innobase/include/sync0sync.ic
        storage/innobase/lock/lock0lock.c
        storage/innobase/pars/make_bison.sh
        storage/innobase/pars/make_flex.sh
        storage/innobase/row/row0mysql.c
        storage/innobase/row/row0sel.c
        storage/innobase/srv/srv0srv.c
        storage/innobase/trx/trx0trx.c
        storage/innobase/trx/trx0undo.c
        storage/maria/ha_maria.cc
        storage/maria/ha_maria.h
        storage/maria/ma_create.c
        storage/maria/ma_init.c
        storage/maria/ma_key.c
        storage/maria/ma_non_trans_log.c
        storage/maria/ma_open.c
        storage/maria/ma_pagecache.c
        storage/maria/ma_recovery.c
        storage/maria/ma_recovery_util.c
        storage/maria/ma_test_big.sh
        storage/maria/maria_backup_engine.cc
        storage/maria/tablockman.c
        storage/myisam/ft_boolean_search.c
        storage/myisam/ft_parser.c
        storage/myisam/ftdefs.h
        storage/myisam/ha_myisam.cc
        storage/myisam/ha_myisam.h
        storage/myisam/mi_check.c
        storage/myisam/mi_create.c
        storage/myisam/mi_key.c
        storage/myisam/mi_log.c
        storage/myisam/mi_open.c
        storage/myisam/mi_test_all.sh
        storage/myisam/myisam_backup_engine.cc
        storage/myisam/myisamdef.h
        storage/myisammrg/ha_myisammrg.cc
        storage/ndb/demos/run_demo1-PS.sh
        storage/ndb/demos/run_demo1-SS.sh
        storage/ndb/include/mgmapi/mgmapi.h
        storage/ndb/include/mgmapi/mgmapi_config_parameters.h
        storage/ndb/include/mgmapi/mgmapi_error.h
        storage/ndb/include/mgmapi/ndb_logevent.h
        storage/ndb/include/ndbapi/NdbScanOperation.hpp
        storage/ndb/include/util/Bitmask.hpp
        storage/ndb/src/common/portlib/NdbThread.c
        storage/ndb/src/common/util/Bitmask.cpp
        storage/ndb/src/kernel/blocks/ERROR_codes.txt
        storage/ndb/src/kernel/blocks/backup/Backup.cpp
        storage/ndb/src/kernel/blocks/backup/Backup.hpp
        storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
        storage/ndb/src/kernel/blocks/dblqh/Dblqh.hpp
        storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
        storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
        storage/ndb/src/kernel/blocks/dbutil/DbUtil.cpp
        storage/ndb/src/kernel/blocks/lgman.cpp
        storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp
        storage/ndb/src/kernel/vm/Configuration.cpp
        storage/ndb/src/mgmapi/Makefile.am
        storage/ndb/src/mgmapi/ndb_logevent.cpp
        storage/ndb/src/mgmsrv/MgmtSrvr.cpp
        storage/ndb/src/mgmsrv/MgmtSrvr.hpp
        storage/ndb/src/mgmsrv/Services.cpp
        storage/ndb/src/mgmsrv/Services.hpp
        storage/ndb/src/ndbapi/ClusterMgr.cpp
        storage/ndb/src/ndbapi/ClusterMgr.hpp
        storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
        storage/ndb/src/ndbapi/NdbEventOperationImpl.hpp
        storage/ndb/src/ndbapi/NdbScanOperation.cpp
        storage/ndb/src/ndbapi/Ndbif.cpp
        storage/ndb/src/ndbapi/TransporterFacade.hpp
        storage/ndb/src/ndbapi/ndberror.c
        storage/ndb/test/include/DbUtil.hpp
        storage/ndb/test/ndbapi/testBasic.cpp
        storage/ndb/test/ndbapi/testMgm.cpp
        storage/ndb/test/ndbapi/testNodeRestart.cpp
        storage/ndb/test/ndbapi/testScan.cpp
        storage/ndb/test/ndbapi/testUpgrade.cpp
        storage/ndb/test/run-test/Makefile.am
        storage/ndb/test/run-test/atrt-gather-result.sh
        storage/ndb/test/run-test/atrt.hpp
        storage/ndb/test/run-test/autotest-boot.sh
        storage/ndb/test/run-test/autotest-run.sh
        storage/ndb/test/run-test/command.cpp
        storage/ndb/test/run-test/daily-basic-tests.txt
        storage/ndb/test/run-test/db.cpp
        storage/ndb/test/run-test/files.cpp
        storage/ndb/test/run-test/main.cpp
        storage/ndb/test/run-test/setup.cpp
        storage/ndb/test/src/DbUtil.cpp
        storage/ndb/test/src/HugoTransactions.cpp
        storage/ndb/test/src/NDBT_Tables.cpp
        storage/ndb/test/tools/log_listner.cpp
        storage/ndb/tools/waiter.cpp
        strings/ctype-czech.c
        strings/ctype-mb.c
        strings/ctype.c
        strings/xml.c
        support-files/my-small.cnf.sh
        support-files/mysql.spec.sh
        tests/mysql_client_test.c
        client/mysqltest.cc
        mysql-test/include/analyze-sync_with_master.test
        mysql-test/suite/federated/federated.inc
        mysql-test/suite/federated/federated_cleanup.inc
        mysql-test/suite/federated/have_federated_db.inc
        mysql-test/lib/mtr_cases.pm
        mysql-test/lib/mtr_match.pm
        mysql-test/lib/mtr_report.pm
        mysql-test/lib/mtr_unique.pm
        mysql-test/suite/sys_vars/r/binlog_format_basic.result
        mysql-test/suite/binlog/r/binlog_index.result
        mysql-test/suite/sys_vars/r/character_set_connection_func.result
        mysql-test/suite/sys_vars/r/character_set_database_func.result
        mysql-test/suite/sys_vars/r/completion_type_func.result
        mysql-test/suite/sys_vars/r/concurrent_insert_func.result
        mysql-test/suite/sys_vars/r/delay_key_write_func.result
        mysql-test/r/events_restart.result
        mysql-test/suite/federated/federated.result
        mysql-test/suite/federated/federated_archive.result
        mysql-test/suite/federated/federated_bug_13118.result
        mysql-test/suite/federated/federated_bug_25714.result
        mysql-test/suite/federated/federated_innodb.result
        mysql-test/suite/federated/federated_server.result
        mysql-test/suite/sys_vars/r/general_log_file_basic.result
        mysql-test/suite/sys_vars/r/general_log_file_func.result
        mysql-test/suite/sys_vars/r/general_log_func.result
        mysql-test/suite/sys_vars/r/innodb_autoextend_increment_basic.result
        mysql-test/suite/sys_vars/r/innodb_autoinc_lock_mode_func.result
        mysql-test/suite/sys_vars/r/innodb_fast_shutdown_basic.result
        mysql-test/suite/sys_vars/r/innodb_max_dirty_pages_pct_func.result
        mysql-test/suite/sys_vars/r/innodb_table_locks_func.result
        mysql-test/suite/sys_vars/r/key_buffer_size_func.result
        mysql-test/suite/sys_vars/r/local_infile_func.result
        mysql-test/suite/sys_vars/r/log_basic.result
        mysql-test/suite/sys_vars/r/log_bin_trust_function_creators_func.result
        mysql-test/suite/sys_vars/r/log_queries_not_using_indexes_basic.result
        mysql-test/suite/sys_vars/r/max_allowed_packet_func.result
        mysql-test/suite/sys_vars/r/max_seeks_for_key_func.result
        mysql-test/suite/sys_vars/r/max_sort_length_func.result
        mysql-test/suite/sys_vars/r/myisam_data_pointer_size_func.result
        mysql-test/suite/sys_vars/r/myisam_stats_method_func.result
        mysql-test/suite/sys_vars/r/query_cache_limit_func.result
        mysql-test/suite/sys_vars/r/query_cache_type_func.result
        mysql-test/suite/sys_vars/r/query_prealloc_size_func.result
        mysql-test/suite/sys_vars/r/rpl_init_slave_func.result
        mysql-test/suite/sys_vars/r/rpl_max_binlog_size_func.result
        mysql-test/suite/sys_vars/r/rpl_slave_net_timeout_basic.result
        mysql-test/suite/sys_vars/r/slave_net_timeout_basic.result
        mysql-test/suite/sys_vars/r/slow_query_log_file_basic.result
        mysql-test/suite/sys_vars/r/slow_query_log_file_func.result
        mysql-test/suite/backup/r/backup_myisam_extlocking.result
        mysql-test/suite/backup/r/backup_myisam_sync.result
        mysql-test/suite/backup/t/backup_myisam_extlocking.test
        mysql-test/suite/backup/t/backup_myisam_sync.test
        mysql-test/suite/funcs_1/t/is_coll_char_set_appl.test
        mysql-test/suite/rpl/r/rpl_row_conflicts.result
        mysql-test/suite/rpl/r/rpl_stm_conflicts.result
        mysql-test/suite/rpl/t/rpl_rotate_logs.cnf
        mysql-test/extra/rpl_tests/rpl_conflicts.test
        mysql-test/suite/rpl_ndb_big/r/rpl_ndb_mixed_engines_transactions.result
        mysql-test/suite/rpl_ndb_big/t/rpl_ndb_mixed_engines_transactions-master.opt
        mysql-test/suite/rpl_ndb_big/t/rpl_ndb_mixed_engines_transactions.test
        mysql-test/suite/sys_vars/t/binlog_format_basic.test
        mysql-test/suite/binlog/t/binlog_index.test
        mysql-test/suite/sys_vars/t/character_set_client_basic.test
        mysql-test/suite/sys_vars/t/character_set_connection_basic.test
        mysql-test/suite/sys_vars/t/character_set_connection_func.test
        mysql-test/suite/sys_vars/t/character_set_database_basic.test
        mysql-test/suite/sys_vars/t/character_set_database_func.test
        mysql-test/suite/sys_vars/t/character_set_filesystem_basic.test
        mysql-test/suite/sys_vars/t/character_set_results_basic.test
        mysql-test/suite/sys_vars/t/character_set_server_basic.test
        mysql-test/suite/sys_vars/t/collation_connection_basic.test
        mysql-test/suite/sys_vars/t/collation_database_basic.test
        mysql-test/suite/sys_vars/t/collation_server_basic.test
        mysql-test/suite/sys_vars/t/completion_type_func.test
        mysql-test/suite/sys_vars/t/concurrent_insert_func.test
        mysql-test/suite/sys_vars/t/delay_key_write_func.test
        mysql-test/t/events_restart.test
        mysql-test/suite/federated/federated.test
        mysql-test/suite/federated/federated_archive.test
        mysql-test/suite/federated/federated_bug_13118.test
        mysql-test/suite/federated/federated_bug_25714.test
        mysql-test/suite/federated/federated_innodb.test
        mysql-test/suite/federated/federated_server.test
        mysql-test/suite/federated/federated_transactions.test
        mysql-test/suite/sys_vars/t/general_log_file_basic.test
        mysql-test/suite/sys_vars/t/general_log_file_func.test
        mysql-test/suite/sys_vars/t/general_log_func.test
        mysql-test/suite/sys_vars/t/innodb_autoextend_increment_basic.test
        mysql-test/suite/sys_vars/t/innodb_autoinc_lock_mode_func.test
        mysql-test/suite/sys_vars/t/innodb_fast_shutdown_basic.test
        mysql-test/suite/sys_vars/t/innodb_max_dirty_pages_pct_func.test
        mysql-test/suite/sys_vars/t/innodb_table_locks_func.test
        mysql-test/suite/sys_vars/t/key_buffer_size_func.test
        mysql-test/suite/sys_vars/t/local_infile_func.test
        mysql-test/suite/sys_vars/t/log_basic.test
        mysql-test/suite/sys_vars/t/log_bin_trust_function_creators_func.test
        mysql-test/suite/sys_vars/t/log_queries_not_using_indexes_basic.test
        mysql-test/suite/sys_vars/t/max_allowed_packet_func.test
        mysql-test/suite/sys_vars/t/max_seeks_for_key_func.test
        mysql-test/suite/sys_vars/t/max_sort_length_func.test
        mysql-test/suite/sys_vars/t/myisam_data_pointer_size_func.test
        mysql-test/suite/sys_vars/t/myisam_stats_method_func.test
        mysql-test/suite/sys_vars/t/query_cache_limit_func.test
        mysql-test/suite/sys_vars/t/query_cache_type_func.test
        mysql-test/suite/sys_vars/t/query_prealloc_size_func.test
        mysql-test/suite/sys_vars/t/rpl_init_slave_func.test
        mysql-test/suite/sys_vars/t/rpl_max_binlog_size_func.test
        mysql-test/suite/sys_vars/t/slave_allow_batching_basic.test
        mysql-test/suite/sys_vars/t/slow_query_log_file_basic.test
        mysql-test/suite/sys_vars/t/slow_query_log_file_func.test
        mysql-test/suite/sys_vars/t/thread_cache_size_func.test

=== modified file 'client/mysqltest.cc'
--- a/client/mysqltest.cc	2009-02-05 12:49:39 +0000
+++ b/client/mysqltest.cc	2009-02-13 16:30:54 +0000
@@ -5912,7 +5912,6 @@ int parse_args(int argc, char **argv)
   if (debug_check_flag)
     my_end_arg= MY_CHECK_ERROR;
 
-
   if (!record)
   {
     /* Check that the result file exists */

=== modified file 'configure.in'
--- a/configure.in	2009-02-04 12:34:03 +0000
+++ b/configure.in	2009-02-13 16:30:54 +0000
@@ -838,7 +838,7 @@ AC_HEADER_STDC
 AC_HEADER_SYS_WAIT
 AC_CHECK_HEADERS(fcntl.h fenv.h float.h floatingpoint.h fpu_control.h ieeefp.h \
  limits.h memory.h pwd.h select.h \
- stdlib.h stddef.h sys/fpu.h sys/stat.h \
+ stdlib.h stddef.h sys/fpu.h sys/stat.h fnmatch.h \
  strings.h string.h synch.h sys/mman.h sys/socket.h netinet/in.h arpa/inet.h \
  sys/timeb.h sys/types.h sys/un.h sys/vadvise.h sys/wait.h term.h \
  unistd.h utime.h sys/utime.h termio.h termios.h sched.h crypt.h alloca.h \

=== modified file 'dbug/dbug.c'
--- a/dbug/dbug.c	2008-12-24 10:48:24 +0000
+++ b/dbug/dbug.c	2009-02-13 16:30:54 +0000
@@ -75,7 +75,7 @@
  *        (the logic is - think of a call stack as of a path.
  *        "function" means only this function, "function/" means the hierarchy.
  *        in the future, filters like function1/function2 could be supported.
- *        wildcards are a natural extension too: * and ?)
+ *        following this logic glob(7) wildcards are supported.)
  *
  */
 
@@ -88,6 +88,13 @@
 #include <my_global.h>
 #include <m_string.h>
 #include <errno.h>
+
+#ifdef HAVE_FNMATCH_H
+#include <fnmatch.h>
+#else
+#define fnmatch(A,B,C) strcmp(A,B)
+#endif
+
 #if defined(MSDOS) || defined(__WIN__)
 #include <process.h>
 #endif
@@ -1477,7 +1484,9 @@ next:
     {
       if (!strncmp((*cur)->str, start, len))
       {
-        if (todo == EXCLUDE)
+        if ((*cur)->flags & todo)  /* same action ? */
+          (*cur)->flags|= subdir;  /* just merge the SUBDIR flag */
+        else if (todo == EXCLUDE)
         {
           struct link *delme=*cur;
           *cur=(*cur)->next_link;
@@ -1571,7 +1580,7 @@ static int InList(struct link *linkp, co
 
   for (result=MATCHED; linkp != NULL; linkp= linkp->next_link)
   {
-    if (!strcmp(linkp->str, cp))
+    if (!fnmatch(linkp->str, cp, 0))
       return linkp->flags;
     if (!(linkp->flags & EXCLUDE))
       result=NOT_MATCHED;

=== modified file 'dbug/tests-t.pl'
--- a/dbug/tests-t.pl	2008-04-16 14:31:38 +0000
+++ b/dbug/tests-t.pl	2009-02-10 18:13:24 +0000
@@ -483,3 +483,14 @@ func2: info: s=ko
 | | <func3
 | <func2
 <main
+# repeated keyword
+% ./tests d:-d,info,info
+=> execute
+=> evaluate: ON
+=> evaluate_if: OFF
+main: explain: dbug explained: d:-d,info
+% ./tests d:-d,info/,info
+=> execute
+=> evaluate: ON
+=> evaluate_if: OFF
+main: explain: dbug explained: d:-d,info/

=== modified file 'dbug/user.r'
--- a/dbug/user.r	2008-04-28 16:24:05 +0000
+++ b/dbug/user.r	2009-02-11 18:57:38 +0000
@@ -941,6 +941,9 @@ a complete log file in case of crashes. 
 multi-threaded environment.
 .LI d[,keywords]
 Enable output from macros with specified keywords.
+Every keyword can be a
+.I glob(7)
+pattern.
 An empty list of keywords implies that all keywords are selected.
 .LI D[,time]
 Delay for specified time after each output line, to let output drain.
@@ -948,6 +951,9 @@ Time is given in tenths of a second (val
 Default is zero.
 .LI f[,functions]
 Limit debugger actions to the specified list of functions.
+Every function can be a
+.I glob(7)
+pattern.
 An empty list of functions implies that all functions are selected.
 Every function in the list may optionally be followed by a '/' -
 this will implicitly select all the functions down the call stack.
@@ -966,6 +972,9 @@ Mark each debugger output line with the 
 current process.
 .LI g,[functions]
 Enable profiling for the specified list of functions.
+Every function can be a
+.I glob(7)
+pattern.
 An empty list of functions enables profiling for all functions.
 See
 .B PROFILING\ WITH\ DBUG
@@ -984,7 +993,11 @@ Like 'a[,file]' but overwrite old file, 
 .LI O[,file]
 Like 'A[,file]' but overwrite old file, do not append.
 .LI p[,processes]
-Limit debugger actions to the specified processes.  An empty list
+Limit debugger actions to the specified processes.
+Every name can be a
+.I glob(7)
+pattern.
+An empty list
 implies all processes.  This is useful for processes which run child
 processes.  Note that each debugger output line can be marked with the
 name of the current process via the 'P' flag.  The process name must

=== modified file 'include/atomic/generic-msvc.h'
--- a/include/atomic/generic-msvc.h	2008-10-20 09:16:47 +0000
+++ b/include/atomic/generic-msvc.h	2009-02-13 16:30:54 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2006 MySQL AB
+/* Copyright (C) 2006-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.
 
    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
@@ -56,11 +56,11 @@ C_MODE_END
 #endif /*_M_IX86*/
 
 #define MY_ATOMIC_MODE "msvc-intrinsics"
-#define IL_EXCHG_ADD32(X,Y) InterlockedExchangeAdd((volatile LONG *)(X),(Y))
-#define IL_COMP_EXCHG32(X,Y,Z) InterlockedCompareExchange((volatile LONG *)(X),(Y),(Z))
-#define IL_COMP_EXCHGptr InterlockedCompareExchangePointer
-#define IL_EXCHG32       InterlockedExchange
-#define IL_EXCHGptr      InterlockedExchangePointer
+#define IL_EXCHG_ADD32(X,Y)     InterlockedExchangeAdd((volatile LONG *)(X),(Y))
+#define IL_COMP_EXCHG32(X,Y,Z)  InterlockedCompareExchange((volatile LONG *)(X),(Y),(Z))
+#define IL_COMP_EXCHGptr        InterlockedCompareExchangePointer
+#define IL_EXCHG32(X,Y)         InterlockedExchange((volatile LONG *)(X),(Y))
+#define IL_EXCHGptr             InterlockedExchangePointer
 #define make_atomic_add_body(S) \
   v= IL_EXCHG_ADD ## S (a, v)
 #define make_atomic_cas_body(S)                                 \

=== modified file 'include/lf.h'
--- a/include/lf.h	2009-01-27 02:08:48 +0000
+++ b/include/lf.h	2009-02-13 16:30:54 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007 MySQL AB
+/* Copyright (C) 2007-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.
 
    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
@@ -187,8 +187,8 @@ typedef struct st_lf_allocator {
   uchar * volatile top;
   uint element_size;
   uint32 volatile mallocs;
-  void (*constructor)(uchar *);
-  void (*destructor)(uchar *);
+  void (*constructor)(uchar *); /* called, when an object is malloc()'ed */
+  void (*destructor)(uchar *);  /* called, when an object is free()'d    */
 } LF_ALLOCATOR;
 
 void lf_alloc_init(LF_ALLOCATOR *allocator, uint size, uint free_ptr_offset);
@@ -219,7 +219,7 @@ lock_wrap(lf_alloc_new, void *,
 #define LF_HASH_UNIQUE 1
 
 /* lf_hash overhead per element (that is, sizeof(LF_SLIST) */
-#define LF_HASH_OVERHEAD (sizeof(int*)*4)
+extern const int LF_HASH_OVERHEAD;
 
 typedef struct {
   LF_DYNARRAY array;                    /* hash itself */

=== modified file 'include/maria.h'
--- a/include/maria.h	2009-01-28 11:08:55 +0000
+++ b/include/maria.h	2009-02-13 16:30:54 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2006 MySQL AB
+/* Copyright (C) 2006-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.
 
    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
@@ -36,6 +36,8 @@ extern "C" {
 #include <myisamchk.h>
 #include <mysql/plugin.h>
 
+#define MARIA_CANNOT_ROLLBACK
+
 /*
   Limit max keys according to HA_MAX_POSSIBLE_KEY; See myisamchk.h for details
 */
@@ -193,7 +195,7 @@ typedef struct st_maria_keydef          
   uint16 maxlength;                     /* max length of (packed) key (auto) */
   uint32 write_comp_flag;		/* compare flag for write key (auto) */
   uint32 version;                       /* For concurrent read/write */
-  uint32 ftparser_nr;                   /* distinct ftparser number */
+  uint32 ftkey_nr;                      /* full-text index number */
 
   HA_KEYSEG *seg, *end;
   struct st_mysql_ftparser *parser;     /* Fulltext [pre]parser */

=== modified file 'include/my_pthread.h'
--- a/include/my_pthread.h	2009-01-26 19:15:24 +0000
+++ b/include/my_pthread.h	2009-02-13 16:30:54 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (C) 2000-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.
 
    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
@@ -380,19 +380,19 @@ int my_pthread_mutex_trylock(pthread_mut
 
 /* adapt for two different flavors of struct timespec */
 #ifdef HAVE_TIMESPEC_TS_SEC
-#define TV_sec  ts_sec
-#define TV_nsec ts_nsec
+#define MY_tv_sec  ts_sec
+#define MY_tv_nsec ts_nsec
 #else
-#define TV_sec  tv_sec
-#define TV_nsec tv_nsec
+#define MY_tv_sec  tv_sec
+#define MY_tv_nsec tv_nsec
 #endif /* HAVE_TIMESPEC_TS_SEC */
 
 #ifndef set_timespec_time_nsec
 #define set_timespec_time_nsec(ABSTIME,TIME,NSEC) do {                  \
   ulonglong nsec= (NSEC);                                               \
   ulonglong now= (TIME) + (nsec/100);                                   \
-  (ABSTIME).TV_sec=  (now / ULL(10000000));                             \
-  (ABSTIME).TV_nsec= (now % ULL(10000000) * 100 + (nsec % 100));        \
+  (ABSTIME).MY_tv_sec=  (now / ULL(10000000));                          \
+  (ABSTIME).MY_tv_nsec= (now % ULL(10000000) * 100 + (nsec % 100));     \
 } while(0)
 #endif /* !set_timespec_time_nsec */
 

=== modified file 'include/waiting_threads.h'
--- a/include/waiting_threads.h	2008-12-17 18:40:14 +0000
+++ b/include/waiting_threads.h	2009-02-13 16:30:54 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2008 MySQL AB
+/* Copyright (C) 2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.
 
    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
@@ -24,16 +24,18 @@
 C_MODE_START
 
 typedef struct st_wt_resource_id WT_RESOURCE_ID;
+typedef struct st_wt_resource WT_RESOURCE;
 
 typedef struct st_wt_resource_type {
-  int (*compare)(void *a, void *b);
-  const void *(*make_key)(WT_RESOURCE_ID *id, uint *len);
+  my_bool (*compare)(const void *a, const void *b);
+  const void *(*make_key)(const WT_RESOURCE_ID *id, uint *len); /* not used */
 } WT_RESOURCE_TYPE;
 
 struct st_wt_resource_id {
   ulonglong value;
-  WT_RESOURCE_TYPE *type;
+  const WT_RESOURCE_TYPE *type;
 };
+/* the below differs from sizeof(WT_RESOURCE_ID) by the amount of padding */
 #define sizeof_WT_RESOURCE_ID (sizeof(ulonglong)+sizeof(void*))
 
 #define WT_WAIT_STATS  24
@@ -43,93 +45,17 @@ extern uint32    wt_wait_stats[WT_WAIT_S
 extern uint32    wt_cycle_stats[2][WT_CYCLE_STATS+1];
 extern uint32    wt_success_stats;
 
-/*
-  'lock' protects 'owners', 'state', and 'waiter_count'
-  'id' is read-only
-
-  a resource is picked up from a hash in a lock-free manner
-  it's returned pinned, so it cannot be freed at once
-  but it may be freed right after the pin is removed
-  to free a resource it should be
-    1. have no owners
-    2. have no waiters
-
-  two ways to access a resource:
-    1. find it in a hash
-       - it's returned pinned.
-        a) take a lock in exclusive mode
-        b) check the state, it should be ACTIVE
-        c) unpin
-    2. by a direct reference
-       - could only used if a resource cannot be freed
-       e.g. accessing a resource by thd->waiting_for is safe,
-       a resource cannot be freed as there's a thread waiting for it
-*/
-typedef struct st_wt_resource {
-  WT_RESOURCE_ID  id;
-  uint            waiter_count;
-  enum { ACTIVE, FREE } state;
-#ifndef DBUG_OFF
-  pthread_mutex_t  *mutex;
-#endif
-  /*
-    before the 'lock' all elements are mutable, after (and including) -
-    immutable in the sense that lf_hash_insert() won't memcpy() over them.
-    See wt_init().
-  */
-#ifdef WT_RWLOCKS_USE_MUTEXES
-  /*
-    we need a special rwlock-like 'lock' to allow readers bypass
-    waiting writers, otherwise readers can deadlock. For example:
-
-      A waits on resource x, owned by B, B waits on resource y, owned
-      by A, we have a cycle (A->x->B->y->A)
-      Both A and B start deadlock detection:
-
-        A locks x                          B locks y
-        A goes deeper                      B goes deeper
-        A locks y                          B locks x
-
-      with mutexes it would deadlock. With rwlocks it won't, as long
-      as both A and B are taking read locks (and they do).
-      But other threads may take write locks. Assume there's
-      C who wants to start waiting on x, and D who wants to start
-      waiting on y.
-
-        A read-locks x                       B read-locks y
-        A goes deeper                        B goes deeper
-     => C write-locks x (to add a new edge)  D write-locks y
-     .. C is blocked                         D is blocked
-        A read-locks y                       B read-locks x
-
-      Now, if a read lock can bypass a pending wrote lock request, we're fine.
-      If it can not, we have a deadlock.
-
-    writer starvation is technically possible, but unlikely, because
-    the contention is expected to be low.
-  */
-  struct {
-    pthread_cond_t   cond;
-    pthread_mutex_t  mutex;
-    uint readers: 16;
-    uint pending_writers: 15;
-    uint write_locked: 1;
-  } lock;
-#else
-  rw_lock_t lock;
-#endif
-  pthread_cond_t   cond;
-  DYNAMIC_ARRAY    owners;
-} WT_RESOURCE;
-
 typedef struct st_wt_thd {
   /*
     XXX
-    there's no protection (mutex) against concurrent access of
-    the dynarray below. it is assumed that a caller will have it
-    automatically (not to protect this array but to protect its
-    own - caller's - data structures, and we'll get it for free.
-    If not, we'll need to add a mutex
+    there's no protection (mutex) against concurrent access of the
+    dynarray below. it is assumed that a caller will have it anyway
+    (not to protect this array but to protect its own - caller's -
+    data structures), and we'll get it for free. A caller needs to
+    ensure that a blocker won't release a resource before a blocked
+    thread starts waiting, which is usually done with a mutex.
+    
+    If the above assumption is wrong, we'll need to add a mutex here.
   */
   DYNAMIC_ARRAY   my_resources;
   /*
@@ -141,8 +67,10 @@ typedef struct st_wt_thd {
   LF_PINS        *pins;
 
   /* pointers to values */
-  ulong *timeout_short, *deadlock_search_depth_short;
-  ulong *timeout_long, *deadlock_search_depth_long;
+  const ulong *timeout_short;
+  const ulong *deadlock_search_depth_short;
+  const ulong *timeout_long;
+  const ulong *deadlock_search_depth_long;
 
   /*
     weight relates to the desirability of a transaction being killed if it's
@@ -169,13 +97,13 @@ typedef struct st_wt_thd {
   */
   ulong volatile weight;
   /*
-    'killed' is indirectly protected by waiting_for->lock -
-    a killed thread needs to clear its 'waiting_for', and thus needs a lock.
+    'killed' is indirectly protected by waiting_for->lock because
+    a killed thread needs to clear its 'waiting_for' and thus needs a lock.
     That is a thread needs an exclusive lock to read 'killed' reliably.
     But other threads may change 'killed' from 0 to 1, a shared
     lock is enough for that.
    */
-  my_bool volatile killed;
+  my_bool killed;
 #ifndef DBUG_OFF
   const char     *name;
 #endif
@@ -185,16 +113,17 @@ typedef struct st_wt_thd {
 #define WT_OK                   0
 #define WT_DEADLOCK             -1
 #define WT_DEPTH_EXCEEDED       -2
+#define WT_FREE_TO_GO           -3
 
 void wt_init(void);
 void wt_end(void);
-void wt_thd_lazy_init(WT_THD *, ulong *, ulong *, ulong *, ulong *);
+void wt_thd_lazy_init(WT_THD *, const ulong *, const ulong *, const ulong *, const ulong *);
 void wt_thd_destroy(WT_THD *);
-int wt_thd_will_wait_for(WT_THD *, WT_THD *, WT_RESOURCE_ID *);
+int wt_thd_will_wait_for(WT_THD *, WT_THD *, const WT_RESOURCE_ID *);
 int wt_thd_cond_timedwait(WT_THD *, pthread_mutex_t *);
-void wt_thd_release(WT_THD *, WT_RESOURCE_ID *);
+void wt_thd_release(WT_THD *, const WT_RESOURCE_ID *);
 #define wt_thd_release_all(THD) wt_thd_release((THD), 0)
-int wt_resource_id_memcmp(void *, void *);
+my_bool wt_resource_id_memcmp(const void *, const void *);
 
 C_MODE_END
 

=== modified file 'mysql-test/mysql-test-run.pl'
--- a/mysql-test/mysql-test-run.pl	2009-02-13 12:40:13 +0000
+++ b/mysql-test/mysql-test-run.pl	2009-02-13 16:30:54 +0000
@@ -115,11 +115,11 @@ my $path_config_file;           # The ge
 # executables will be used by the test suite.
 our $opt_vs_config = $ENV{'MTR_VS_CONFIG'};
 
-my $DEFAULT_SUITES= "main,backup,binlog,federated,rpl,rpl_ndb,ndb";
+my $DEFAULT_SUITES= "main,backup,binlog,federated,rpl,rpl_ndb,ndb,maria";
 
 our $opt_usage;
+our $opt_list_options;
 our $opt_suites;
-our $opt_suites_default= "main,backup,backup_engines,binlog,rpl,rpl_ndb,ndb"; # Default suites to run
 our $opt_script_debug= 0;  # Script debugging, enable with --script-debug
 our $opt_verbose= 0;  # Verbose output, enable with --verbose
 our $exe_mysql;
@@ -771,7 +771,7 @@ sub command_line_setup {
   # Read the command line options
   # Note: Keep list, and the order, in sync with usage at end of this file
   Getopt::Long::Configure("pass_through");
-  GetOptions(
+  my %options=(
              # Control what engine/variation to run
              'embedded-server'          => \$opt_embedded_server,
              'ps-protocol'              => \$opt_ps_protocol,
@@ -892,9 +892,13 @@ sub command_line_setup {
 	     'timediff'                 => \&report_option,
 
              'help|h'                   => \$opt_usage,
-            ) or usage("Can't read options");
+             'list-options'             => \$opt_list_options,
+            );
+
+  GetOptions(%options) or usage("Can't read options");
 
   usage("") if $opt_usage;
+  list_options(\%options) if $opt_list_options;
 
   # --------------------------------------------------------------------------
   # Setup verbosity
@@ -2618,6 +2622,7 @@ sub mysql_install_db {
   mtr_add_arg($args, "--loose-skip-innodb");
   mtr_add_arg($args, "--loose-skip-falcon");
   mtr_add_arg($args, "--loose-skip-ndbcluster");
+  mtr_add_arg($args, "--loose-skip-maria");
   mtr_add_arg($args, "--tmpdir=%s", "$opt_vardir/tmp/");
   mtr_add_arg($args, "--core-file");
 
@@ -5129,3 +5134,15 @@ HERE
 
 }
 
+
+sub list_options ($) {
+  my $hash= shift;
+
+  for (keys %$hash) {
+    s/(=.*|!)$//;
+    s/\|/\n--/g;
+    print "--$_\n";
+  }
+
+  exit(1);
+}

=== modified file 'mysql-test/r/ctype_utf8.result'
--- a/mysql-test/r/ctype_utf8.result	2008-12-13 19:55:44 +0000
+++ b/mysql-test/r/ctype_utf8.result	2009-02-13 16:30:54 +0000
@@ -240,7 +240,7 @@ select hex(s1) from t1;
 hex(s1)
 41
 drop table t1;
-create table t1 (a text character set utf8, primary key(a(360)));
+create table t1 (a text character set utf8, primary key(a(371)));
 ERROR 42000: Specified key was too long; max key length is 1332 bytes
 CREATE TABLE t1 ( a varchar(10) ) CHARACTER SET utf8;
 INSERT INTO t1 VALUES ( 'test' );

=== modified file 'mysql-test/suite/maria/r/maria-big.result'
--- a/mysql-test/suite/maria/r/maria-big.result	2008-12-10 14:30:52 +0000
+++ b/mysql-test/suite/maria/r/maria-big.result	2009-02-13 16:30:54 +0000
@@ -1,8 +1,6 @@
 set global max_allowed_packet=400000000;
 set storage_engine=maria;
 affected rows: 0
-set global maria_log_file_size=4294967295;
-affected rows: 0
 drop table if exists t1, t2;
 affected rows: 0
 create table t1(a char(3));

=== modified file 'mysql-test/suite/maria/r/maria-big2.result'
--- a/mysql-test/suite/maria/r/maria-big2.result	2008-10-01 12:13:39 +0000
+++ b/mysql-test/suite/maria/r/maria-big2.result	2009-02-12 14:08:56 +0000
@@ -3,3 +3,4 @@ Table	Op	Msg_type	Msg_text
 test.t2	check	status	OK
 Table	Op	Msg_type	Msg_text
 test.t2	check	status	OK
+drop table t2;

=== modified file 'mysql-test/suite/maria/r/maria-connect.result'
--- a/mysql-test/suite/maria/r/maria-connect.result	2008-10-20 09:16:47 +0000
+++ b/mysql-test/suite/maria/r/maria-connect.result	2009-02-13 16:30:54 +0000
@@ -1,6 +1,5 @@
 set global storage_engine=maria;
 set session storage_engine=maria;
-set global maria_log_file_size=4294967295;
 drop table if exists t1;
 SET SQL_WARNINGS=1;
 RESET MASTER;

=== modified file 'mysql-test/suite/maria/r/maria-purge.result'
--- a/mysql-test/suite/maria/r/maria-purge.result	2008-10-01 12:13:39 +0000
+++ b/mysql-test/suite/maria/r/maria-purge.result	2009-02-12 14:08:56 +0000
@@ -38,13 +38,13 @@ set global maria_log_file_size=16777216;
 set global maria_checkpoint_interval=30;
 SHOW ENGINE maria logs;
 Type	Name	Status
-MARIA	master-data/maria_log.00000002	in use
+MARIA	maria_log.00000002	in use
 insert into t2 select * from t1;
 insert into t1 select * from t2;
 set global maria_checkpoint_interval=30;
 SHOW ENGINE maria logs;
 Type	Name	Status
-MARIA	master-data/maria_log.00000004	in use
+MARIA	maria_log.00000004	in use
 set global maria_log_file_size=16777216;
 select @@global.maria_log_file_size;
 @@global.maria_log_file_size
@@ -52,7 +52,7 @@ select @@global.maria_log_file_size;
 set global maria_checkpoint_interval=30;
 SHOW ENGINE maria logs;
 Type	Name	Status
-MARIA	master-data/maria_log.00000004	in use
+MARIA	maria_log.00000004	in use
 set global maria_log_file_size=8388608;
 select @@global.maria_log_file_size;
 @@global.maria_log_file_size
@@ -62,32 +62,32 @@ insert into t1 select * from t2;
 set global maria_checkpoint_interval=30;
 SHOW ENGINE maria logs;
 Type	Name	Status
-MARIA	master-data/maria_log.00000004	free
-MARIA	master-data/maria_log.00000005	free
-MARIA	master-data/maria_log.00000006	free
-MARIA	master-data/maria_log.00000007	free
-MARIA	master-data/maria_log.00000008	in use
+MARIA	maria_log.00000004	free
+MARIA	maria_log.00000005	free
+MARIA	maria_log.00000006	free
+MARIA	maria_log.00000007	free
+MARIA	maria_log.00000008	in use
 flush logs;
 SHOW ENGINE maria logs;
 Type	Name	Status
-MARIA	master-data/maria_log.00000008	in use
+MARIA	maria_log.00000008	in use
 set global maria_log_file_size=16777216;
 set global maria_log_purge_type=external;
 insert into t1 select * from t2;
 set global maria_checkpoint_interval=30;
 SHOW ENGINE maria logs;
 Type	Name	Status
-MARIA	master-data/maria_log.00000008	free
-MARIA	master-data/maria_log.00000009	in use
+MARIA	maria_log.00000008	free
+MARIA	maria_log.00000009	in use
 flush logs;
 SHOW ENGINE maria logs;
 Type	Name	Status
-MARIA	master-data/maria_log.00000008	free
-MARIA	master-data/maria_log.00000009	in use
+MARIA	maria_log.00000008	free
+MARIA	maria_log.00000009	in use
 set global maria_log_purge_type=immediate;
 insert into t1 select * from t2;
 set global maria_checkpoint_interval=30;
 SHOW ENGINE maria logs;
 Type	Name	Status
-MARIA	master-data/maria_log.00000011	in use
+MARIA	maria_log.00000011	in use
 drop table t1, t2;

=== modified file 'mysql-test/suite/maria/r/maria-recover.result'
--- a/mysql-test/suite/maria/r/maria-recover.result	2008-11-12 15:23:22 +0000
+++ b/mysql-test/suite/maria/r/maria-recover.result	2009-02-13 16:30:54 +0000
@@ -35,3 +35,4 @@ select * from t_corrupted2;
 a
 ThursdayMorningsMarket
 drop database mysqltest;
+set global maria_recover=backup;

=== modified file 'mysql-test/suite/maria/r/maria-recovery-rtree-ft.result'
--- a/mysql-test/suite/maria/r/maria-recovery-rtree-ft.result	2008-10-20 09:16:47 +0000
+++ b/mysql-test/suite/maria/r/maria-recovery-rtree-ft.result	2009-02-13 16:30:54 +0000
@@ -156,4 +156,6 @@ mysqltest.t1	check	status	OK
 Checksum-check
 ok
 use mysqltest;
-drop table t1,t2;
+drop database mysqltest_for_feeding_recovery;
+drop database mysqltest_for_comparison;
+drop database mysqltest;

=== modified file 'mysql-test/suite/maria/r/maria-recovery3.result'
--- a/mysql-test/suite/maria/r/maria-recovery3.result	2008-12-05 21:11:46 +0000
+++ b/mysql-test/suite/maria/r/maria-recovery3.result	2009-02-12 14:08:56 +0000
@@ -25,5 +25,70 @@ Checksum-check
 ok
 use mysqltest;
 drop table t1;
+* TEST of logging of BLOBs
+CREATE TABLE `t1` (
+`blob` blob,
+`blob_key` blob
+) ENGINE=maria ROW_FORMAT=page
+;
+* copied t1 for feeding_recovery
+* compared t1 to old version
+set global maria_checkpoint_interval=0;
+INSERT INTO `t1` VALUES (NULL,repeat('A',5198));
+INSERT INTO `t1` VALUES (NULL,repeat('B',65535));
+INSERT INTO `t1` VALUES (repeat('K',5198),repeat('L',2325));
+INSERT INTO `t1` VALUES (repeat('C',65535),NULL);
+INSERT INTO `t1` VALUES (NULL,repeat('D',65535));
+INSERT INTO `t1` VALUES (repeat('E',65535),repeat('F',16111));
+INSERT INTO `t1` VALUES (repeat('G',65535),repeat('H',65535));
+INSERT INTO `t1` VALUES (repeat('I',5198),repeat('J',65535));
+check table t1 extended;
+Table	Op	Msg_type	Msg_text
+mysqltest.t1	check	status	OK
+flush table t1;
+* copied t1 for comparison
+* compared t1 to old version
+SET SESSION debug="+d,maria_flush_whole_log,maria_crash";
+* crashing mysqld intentionally
+set global maria_checkpoint_interval=1;
+ERROR HY000: Lost connection to MySQL server during query
+* copied t1 back for feeding_recovery
+* recovery happens
+check table t1 extended;
+Table	Op	Msg_type	Msg_text
+mysqltest.t1	check	status	OK
+* testing that checksum after recovery is as expected
+Checksum-check
+ok
+* compared t1 to old version
+use mysqltest;
+drop table t1;
+create table t1 engine=maria select 1;
+* copied t1 for feeding_recovery
+set global maria_checkpoint_interval=0;
+insert into t1 values(2);
+truncate table t1;
+flush table t1;
+* copied t1 for comparison
+truncate table t1;
+SET SESSION debug="+d,maria_flush_whole_log,maria_crash_create_table";
+* crashing mysqld intentionally
+truncate table t1;
+ERROR HY000: Lost connection to MySQL server during query
+* recovery happens
+check table t1 extended;
+Table	Op	Msg_type	Msg_text
+mysqltest.t1	check	warning	Size of indexfile is: 372      Should be: 8192
+mysqltest.t1	check	status	OK
+* testing that checksum after recovery is as expected
+Checksum-check
+ok
+use mysqltest;
+truncate table t1;
+check table t1 extended;
+Table	Op	Msg_type	Msg_text
+mysqltest.t1	check	status	OK
+drop table t1;
+drop database mysqltest_for_feeding_recovery;
 drop database mysqltest_for_comparison;
 drop database mysqltest;

=== modified file 'mysql-test/suite/maria/r/maria.result'
--- a/mysql-test/suite/maria/r/maria.result	2008-12-14 11:36:15 +0000
+++ b/mysql-test/suite/maria/r/maria.result	2009-02-13 16:30:54 +0000
@@ -2132,7 +2132,7 @@ c3 VARCHAR(10) NOT NULL,
 KEY (c1),
 KEY (c2)
 ) ENGINE=maria DEFAULT CHARSET=utf8 PACK_KEYS=0;
-MARIA file:          MYSQLTEST_VARDIR/master-data/test/t1
+MARIA file:          MYSQLD_DATADIR/test/t1
 Record format:       Block
 Crashsafe:           yes
 Character set:       utf8_general_ci (45)
@@ -2594,3 +2594,13 @@ flush tables with read lock;
 ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
 unlock tables;
 drop table t1, t2;
+create table t1(a int primary key, b blob, c blob) engine=maria;
+insert into t1 values(1,repeat('a',100), repeat('b',657860));
+Warnings:
+Warning	1265	Data truncated for column 'c' at row 1
+insert into t1 values(1,repeat('a',100), repeat('b',657860));
+ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
+check table t1;
+Table	Op	Msg_type	Msg_text
+test.t1	check	status	OK
+drop table t1;

=== modified file 'mysql-test/suite/maria/r/maria_notembedded.result'
--- a/mysql-test/suite/maria/r/maria_notembedded.result	2008-11-27 15:18:17 +0000
+++ b/mysql-test/suite/maria/r/maria_notembedded.result	2009-02-13 16:30:54 +0000
@@ -30,9 +30,27 @@ insert t1 values (2);
 lock table t1 write concurrent;
 insert t1 values (3);
 insert t1 values (2);
+lock table t1 write concurrent;
+insert t1 values (4);
 insert t1 values (3);
+lock table t1 write concurrent;
+insert t1 values (5);
+insert t1 values (4);
+lock table t1 write concurrent;
+insert t1 values (6);
+insert t1 values (5);
+insert t1 values (6);
 ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
 unlock tables;
 ERROR 23000: Duplicate entry '2' for key 'a'
 unlock tables;
+ERROR 23000: Duplicate entry '3' for key 'a'
+unlock tables;
+ERROR 23000: Duplicate entry '4' for key 'a'
+unlock tables;
+ERROR 23000: Duplicate entry '5' for key 'a'
+unlock tables;
+check table t1;
+Table	Op	Msg_type	Msg_text
+test.t1	check	status	OK
 drop table t1;

=== modified file 'mysql-test/suite/maria/r/maria_partition.result'
--- a/mysql-test/suite/maria/r/maria_partition.result	2008-10-15 12:44:31 +0000
+++ b/mysql-test/suite/maria/r/maria_partition.result	2009-02-12 14:08:56 +0000
@@ -1,7 +1,6 @@
 set global storage_engine=maria;
 set session storage_engine=maria;
 set global maria_page_checksum=0;
-set global maria_log_file_size=4294967295;
 drop table if exists t1,t2;
 drop view if exists v1;
 SET SQL_WARNINGS=1;
@@ -10,3 +9,27 @@ insert into t1 values (1);
 alter table t1 partition by list (s1) (partition p1 values in (2));
 ERROR HY000: Table has no partition for value 1
 drop table t1;
+create table t2(a blob) engine=maria;
+create table t1(a int primary key) engine=maria;
+insert into t2 values ('foo'),('bar');
+select * from t2 left join t1 on (t2.a=t1.a) where t2.a='bbb';
+a	a
+insert into t1 values (1);
+select * from t2 left join t1 on (t2.a=t1.a) where t2.a='bbb';
+a	a
+insert into t1 values (2);
+select * from t2 left join t1 on (t2.a=t1.a) where t2.a='bbb';
+a	a
+drop table t1,t2;
+create table t2(a blob);
+create table t1(a int primary key) PARTITION BY HASH (a) PARTITIONS 2;
+insert into t2 values ('foo'),('bar');
+select * from t2 left join t1 on (t2.a=t1.a) where t2.a='bbb';
+a	a
+insert into t1 values (1);
+select * from t2 left join t1 on (t2.a=t1.a) where t2.a='bbb';
+a	a
+insert into t1 values (2);
+select * from t2 left join t1 on (t2.a=t1.a) where t2.a='bbb';
+a	a
+drop table t1,t2;

=== modified file 'mysql-test/suite/maria/r/ps_maria.result'
--- a/mysql-test/suite/maria/r/ps_maria.result	2008-10-20 12:42:30 +0000
+++ b/mysql-test/suite/maria/r/ps_maria.result	2009-02-13 16:30:54 +0000
@@ -1,4 +1,3 @@
-set global maria_log_file_size=4294967295;
 use test;
 drop table if exists t1, t9 ;
 create table t1

=== modified file 'mysql-test/suite/maria/t/maria-autozerofill.test'
--- a/mysql-test/suite/maria/t/maria-autozerofill.test	2008-11-12 15:23:22 +0000
+++ b/mysql-test/suite/maria/t/maria-autozerofill.test	2009-02-13 16:30:54 +0000
@@ -24,8 +24,8 @@ create table t1(a int) engine=maria;
 insert into t1 values(1);
 flush table t1;
 # Check that table is not zerofilled, not movable
-let $MYSQLTEST_DATADIR= `select @@datadir`;
---exec $MARIA_CHK -dv $MYSQLTEST_DATADIR/mysqltest/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+let $MYSQLD_DATADIR= `select @@datadir`;
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/mysqltest/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
 perl;
     use strict;
     use warnings;
@@ -49,7 +49,7 @@ enable_ps_protocol;
 flush table t1;
 
 # Check that table is auto-zerofilled, movable
---exec $MARIA_CHK -dv $MYSQLTEST_DATADIR/mysqltest/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/mysqltest/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
 perl;
     use strict;
     use warnings;
@@ -66,7 +66,7 @@ insert into t1 values(2);
 flush table t1;
 
 # Check that table is not zerofilled, not movable
---exec $MARIA_CHK -dv $MYSQLTEST_DATADIR/mysqltest/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/mysqltest/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
 perl;
     use strict;
     use warnings;

=== modified file 'mysql-test/suite/maria/t/maria-big.test'
--- a/mysql-test/suite/maria/t/maria-big.test	2008-12-10 14:30:52 +0000
+++ b/mysql-test/suite/maria/t/maria-big.test	2009-02-13 16:30:54 +0000
@@ -2,6 +2,7 @@
 --source include/have_maria.inc
 --source include/big_test.inc
 
+let $default_max_allowed_packet=`select @@global.max_allowed_packet`;
 set global max_allowed_packet=400000000;
 # need new session to use setting above
 connect (root,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK);
@@ -9,7 +10,6 @@ connection root;
 
 enable_info;
 set storage_engine=maria;
-set global maria_log_file_size=4294967295;
 disable_warnings;
 drop table if exists t1, t2;
 enable_warnings;
@@ -64,3 +64,8 @@ select a,length(b) from t1;
 check table t1;
 
 drop table t1;
+--disable_result_log
+--disable_query_log
+eval set global max_allowed_packet=$default_max_allowed_packet;
+--enable_result_log
+--enable_query_log

=== modified file 'mysql-test/suite/maria/t/maria-big2.test'
--- a/mysql-test/suite/maria/t/maria-big2.test	2008-10-01 12:13:39 +0000
+++ b/mysql-test/suite/maria/t/maria-big2.test	2009-02-12 14:08:56 +0000
@@ -4074,3 +4074,4 @@ insert into t2(a,b) values ('mozkakabudl
 ;
 }
 enable_query_log;
+drop table t2;

=== modified file 'mysql-test/suite/maria/t/maria-connect.test'
--- a/mysql-test/suite/maria/t/maria-connect.test	2008-10-20 09:16:47 +0000
+++ b/mysql-test/suite/maria/t/maria-connect.test	2009-02-13 16:30:54 +0000
@@ -9,8 +9,6 @@ let $default=`select @@global.storage_en
 set global storage_engine=maria;
 set session storage_engine=maria;
 
-set global maria_log_file_size=4294967295;
-
 # Initialise
 --disable_warnings
 drop table if exists t1;

=== added file 'mysql-test/suite/maria/t/maria-preload-master.opt'
--- a/mysql-test/suite/maria/t/maria-preload-master.opt	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/maria/t/maria-preload-master.opt	2009-01-12 12:08:06 +0000
@@ -0,0 +1 @@
+--skip-safemalloc

=== modified file 'mysql-test/suite/maria/t/maria-purge.test'
--- a/mysql-test/suite/maria/t/maria-purge.test	2008-10-20 09:16:47 +0000
+++ b/mysql-test/suite/maria/t/maria-purge.test	2009-02-13 16:30:54 +0000
@@ -65,19 +65,19 @@ insert into t1 select * from t2;
 set global maria_log_file_size=16777216;
 # force a checkpoint to allow log purge
 eval set global maria_checkpoint_interval=$def_checkinterval;
---replace_regex /Size +[0-9]+ ; .+master-data/master-data/
+--replace_regex /Size +[0-9]+ ; .+maria_log/maria_log/
 SHOW ENGINE maria logs;
 
 insert into t2 select * from t1;
 insert into t1 select * from t2;
 
 eval set global maria_checkpoint_interval=$def_checkinterval;
---replace_regex /Size +[0-9]+ ; .+master-data/master-data/
+--replace_regex /Size +[0-9]+ ; .+maria_log/maria_log/
 SHOW ENGINE maria logs;
 set global maria_log_file_size=16777216;
 select @@global.maria_log_file_size;
 eval set global maria_checkpoint_interval=$def_checkinterval;
---replace_regex /Size +[0-9]+ ; .+master-data/master-data/
+--replace_regex /Size +[0-9]+ ; .+maria_log/maria_log/
 SHOW ENGINE maria logs;
 set global maria_log_file_size=8388608;
 select @@global.maria_log_file_size;
@@ -85,26 +85,26 @@ select @@global.maria_log_file_size;
 set global maria_log_purge_type=at_flush;
 insert into t1 select * from t2;
 eval set global maria_checkpoint_interval=$def_checkinterval;
---replace_regex /Size +[0-9]+ ; .+master-data/master-data/
+--replace_regex /Size +[0-9]+ ; .+maria_log/maria_log/
 SHOW ENGINE maria logs;
 flush logs;
---replace_regex /Size +[0-9]+ ; .+master-data/master-data/
+--replace_regex /Size +[0-9]+ ; .+maria_log/maria_log/
 SHOW ENGINE maria logs;
 
 set global maria_log_file_size=16777216;
 set global maria_log_purge_type=external;
 insert into t1 select * from t2;
 eval set global maria_checkpoint_interval=$def_checkinterval;
---replace_regex /Size +[0-9]+ ; .+master-data/master-data/
+--replace_regex /Size +[0-9]+ ; .+maria_log/maria_log/
 SHOW ENGINE maria logs;
 flush logs;
---replace_regex /Size +[0-9]+ ; .+master-data/master-data/
+--replace_regex /Size +[0-9]+ ; .+maria_log/maria_log/
 SHOW ENGINE maria logs;
 
 set global maria_log_purge_type=immediate;
 insert into t1 select * from t2;
 eval set global maria_checkpoint_interval=$def_checkinterval;
---replace_regex /Size +[0-9]+ ; .+master-data/master-data/
+--replace_regex /Size +[0-9]+ ; .+maria_log/maria_log/
 SHOW ENGINE maria logs;
 
 drop table t1, t2;

=== modified file 'mysql-test/suite/maria/t/maria-recover.test'
--- a/mysql-test/suite/maria/t/maria-recover.test	2008-11-12 15:23:22 +0000
+++ b/mysql-test/suite/maria/t/maria-recover.test	2009-02-13 16:30:54 +0000
@@ -62,3 +62,4 @@ enable_ps_protocol;
 select * from t_corrupted2; # should show just rows
 
 drop database mysqltest;
+set global maria_recover=backup;

=== modified file 'mysql-test/suite/maria/t/maria-recovery-rtree-ft.test'
--- a/mysql-test/suite/maria/t/maria-recovery-rtree-ft.test	2008-10-20 09:16:47 +0000
+++ b/mysql-test/suite/maria/t/maria-recovery-rtree-ft.test	2009-02-13 16:30:54 +0000
@@ -208,4 +208,10 @@ select count(*) from t2;
 }
 
 -- source include/maria_verify_recovery.inc
-drop table t1,t2;
+
+# clean up everything
+let $mms_purpose=feeding_recovery;
+eval drop database mysqltest_for_$mms_purpose;
+let $mms_purpose=comparison;
+eval drop database mysqltest_for_$mms_purpose;
+drop database mysqltest;

=== modified file 'mysql-test/suite/maria/t/maria-recovery3.test'
--- a/mysql-test/suite/maria/t/maria-recovery3.test	2008-12-05 21:11:46 +0000
+++ b/mysql-test/suite/maria/t/maria-recovery3.test	2009-02-12 14:08:56 +0000
@@ -6,7 +6,7 @@
 --source include/have_maria.inc
 
 set global maria_log_file_size=4294967295;
-let $MARIA_LOG=../tmp;
+let $MARIA_LOG=../../tmp;
 
 --disable_warnings
 drop database if exists mysqltest;
@@ -39,7 +39,6 @@ let $mvr_restore_old_snapshot=0;
 # UNDO phase prevents physical comparison, normally,
 # so we'll only use checksums to compare.
 let $mms_compare_physically=0;
-let $mvr_crash_statement= set global maria_checkpoint_interval=1;
 create table t1(a int primary key) engine=maria;
 insert into t1 values(1);
 -- source include/maria_make_snapshot_for_comparison.inc
@@ -65,7 +64,55 @@ drop table t1;
 # before checkpoint happens, test should still pass (though it won't
 # reproduce the conditions of the bug).
 
+# Test for BUG#41493 Maria: two recovery failures (wrong logging of BLOB pages)
+--echo * TEST of logging of BLOBs
+let $mvr_restore_old_snapshot=1;
+let $mms_compare_physically=1;
+CREATE TABLE `t1` (
+`blob` blob,
+`blob_key` blob
+) ENGINE=maria ROW_FORMAT=page
+;
+-- source include/maria_make_snapshot_for_feeding_recovery.inc
+set global maria_checkpoint_interval=0; # no checkpoints
+INSERT INTO `t1` VALUES (NULL,repeat('A',5198));
+INSERT INTO `t1` VALUES (NULL,repeat('B',65535));
+INSERT INTO `t1` VALUES (repeat('K',5198),repeat('L',2325));
+INSERT INTO `t1` VALUES (repeat('C',65535),NULL);
+INSERT INTO `t1` VALUES (NULL,repeat('D',65535));
+INSERT INTO `t1` VALUES (repeat('E',65535),repeat('F',16111));
+INSERT INTO `t1` VALUES (repeat('G',65535),repeat('H',65535));
+INSERT INTO `t1` VALUES (repeat('I',5198),repeat('J',65535));
+check table t1 extended;
+-- source include/maria_make_snapshot_for_comparison.inc
+-- source include/maria_verify_recovery.inc
+drop table t1;
+
+# Test for BUG#42112 "Maria: recovery failure (pushbuild2) Assertion
+# `rownr == 0 && new_page' failed"
+
+let $mvr_restore_old_snapshot=0;
+let $mms_compare_physically=0;
+create table t1 engine=maria select 1;
+-- source include/maria_make_snapshot_for_feeding_recovery.inc
+set global maria_checkpoint_interval=0; # no checkpoints
+insert into t1 values(2);
+truncate table t1;
+-- source include/maria_make_snapshot_for_comparison.inc
+let $mvr_crash_statement= truncate table t1;
+let $mvr_debug_option="+d,maria_flush_whole_log,maria_crash_create_table";
+truncate table t1;
+-- source include/maria_verify_recovery.inc
+# Table is bad but at least Recovery didn't crash and a new truncate
+# can succeed:
+truncate table t1;
+check table t1 extended;
+drop table t1;
+
+
 # clean up everything
+let $mms_purpose=feeding_recovery;
+eval drop database mysqltest_for_$mms_purpose;
 let $mms_purpose=comparison;
 eval drop database mysqltest_for_$mms_purpose;
 drop database mysqltest;

=== modified file 'mysql-test/suite/maria/t/maria.test'
--- a/mysql-test/suite/maria/t/maria.test	2008-11-27 15:18:17 +0000
+++ b/mysql-test/suite/maria/t/maria.test	2009-02-13 16:30:54 +0000
@@ -12,6 +12,7 @@ let $default_checksum=`select @@global.m
 set global storage_engine=maria;
 set session storage_engine=maria;
 set global maria_page_checksum=0;
+let $default_log_file_size=`select @@global.maria_log_file_size`;
 set global maria_log_file_size=4294967295;
 
 # Initialise
@@ -1407,8 +1408,9 @@ CREATE TABLE t1 (
   KEY (c1),
   KEY (c2)
 ) ENGINE=maria DEFAULT CHARSET=utf8 PACK_KEYS=0;
---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
---exec $MARIA_CHK -d $MYSQLTEST_VARDIR/master-data/test/t1
+let $MYSQLD_DATADIR= `select @@datadir`;
+--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
+--exec $MARIA_CHK -d $MYSQLD_DATADIR/test/t1
 DROP TABLE t1;
 
 # Test warnings with transactional=1 with MyISAM
@@ -1870,10 +1872,23 @@ unlock tables;
 drop table t1, t2;
 
 #
+# Bug #40311
+# Crash when aborting inserting of row with 2 blobs where first is short
+#
+
+create table t1(a int primary key, b blob, c blob) engine=maria;
+insert into t1 values(1,repeat('a',100), repeat('b',657860));
+--error ER_DUP_ENTRY
+insert into t1 values(1,repeat('a',100), repeat('b',657860));
+check table t1;
+drop table t1;
+
 # Set defaults back
 #
 --disable_result_log
 --disable_query_log
-eval set global storage_engine=$default_engine, maria_page_checksum=$default_checksum;
+eval set global storage_engine=$default_engine,
+maria_page_checksum=$default_checksum,
+maria_log_file_size=$default_log_file_size;
 --enable_result_log
 --enable_query_log

=== modified file 'mysql-test/suite/maria/t/maria3.test'
--- a/mysql-test/suite/maria/t/maria3.test	2008-12-10 14:30:52 +0000
+++ b/mysql-test/suite/maria/t/maria3.test	2009-02-13 16:30:54 +0000
@@ -7,6 +7,7 @@ let $default_checksum=`select @@global.m
 set global storage_engine=maria;
 set session storage_engine=maria;
 set global maria_page_checksum=0;
+let $default_log_file_size=`select @@global.maria_log_file_size`;
 set global maria_log_file_size=4294967295;
 
 # Initialise
@@ -481,6 +482,8 @@ drop table t1, t2;
 
 --disable_result_log
 --disable_query_log
-eval set global storage_engine=$default_engine, maria_page_checksum=$default_checksum;
+eval set global storage_engine=$default_engine,
+maria_page_checksum=$default_checksum,
+maria_log_file_size=$default_log_file_size;
 --enable_result_log
 --enable_query_log

=== modified file 'mysql-test/suite/maria/t/maria_notembedded.test'
--- a/mysql-test/suite/maria/t/maria_notembedded.test	2008-11-27 15:18:17 +0000
+++ b/mysql-test/suite/maria/t/maria_notembedded.test	2009-02-13 16:30:54 +0000
@@ -33,27 +33,65 @@ drop table t1;
 #
 create table t1 (a int unique) transactional=1;
 insert t1 values (1);
+
 lock table t1 write concurrent;
 insert t1 values (2);
-connect(con_d,localhost,root,,);
+
+connect(con_a,localhost,root,,);
 lock table t1 write concurrent;
 insert t1 values (3);
 send insert t1 values (2);
+
+connect(con_b,localhost,root,,);
+lock table t1 write concurrent;
+insert t1 values (4);
+send insert t1 values (3);
+
+connect(con_c,localhost,root,,);
+lock table t1 write concurrent;
+insert t1 values (5);
+send insert t1 values (4);
+
+connect(con_d,localhost,root,,);
+lock table t1 write concurrent;
+insert t1 values (6);
+send insert t1 values (5);
+
 connection default;
-let $wait_condition=select count(*) = 1 from information_schema.processlist where state="waiting for a resource";
+let $wait_condition=select count(*) = 4 from information_schema.processlist where state="waiting for a resource";
 --source include/wait_condition.inc
 --error ER_LOCK_DEADLOCK
-insert t1 values (3);
+insert t1 values (6);
 unlock tables;
+
+connection con_a;
+--error ER_DUP_ENTRY
+reap;
+unlock tables;
+disconnect con_a;
+
+connection con_b;
+--error ER_DUP_ENTRY
+reap;
+unlock tables;
+disconnect con_b;
+
+connection con_c;
+--error ER_DUP_ENTRY
+reap;
+unlock tables;
+disconnect con_c;
+
 connection con_d;
 --error ER_DUP_ENTRY
 reap;
 unlock tables;
 disconnect con_d;
+
 connection default;
+check table t1;
 drop table t1;
 
-
 --disable_result_log
 --disable_query_log
 eval set session storage_engine=$default_engine;

=== modified file 'mysql-test/suite/maria/t/maria_partition.test'
--- a/mysql-test/suite/maria/t/maria_partition.test	2008-10-15 12:44:31 +0000
+++ b/mysql-test/suite/maria/t/maria_partition.test	2009-02-12 14:08:56 +0000
@@ -8,7 +8,6 @@ let $default_checksum=`select @@global.m
 set global storage_engine=maria;
 set session storage_engine=maria;
 set global maria_page_checksum=0;
-set global maria_log_file_size=4294967295;
 
 # Initialise
 --disable_warnings
@@ -27,6 +26,29 @@ insert into t1 values (1);
 alter table t1 partition by list (s1) (partition p1 values in (2));
 drop table t1;
 
+#
+# Test outer join const propagation
+#
+create table t2(a blob) engine=maria;
+create table t1(a int primary key) engine=maria;
+insert into t2 values ('foo'),('bar');
+select * from t2 left join t1 on (t2.a=t1.a) where t2.a='bbb';
+insert into t1 values (1);
+select * from t2 left join t1 on (t2.a=t1.a) where t2.a='bbb';
+insert into t1 values (2);
+select * from t2 left join t1 on (t2.a=t1.a) where t2.a='bbb';
+drop table t1,t2;
+
+create table t2(a blob);
+create table t1(a int primary key) PARTITION BY HASH (a) PARTITIONS 2;
+insert into t2 values ('foo'),('bar');
+select * from t2 left join t1 on (t2.a=t1.a) where t2.a='bbb';
+insert into t1 values (1);
+select * from t2 left join t1 on (t2.a=t1.a) where t2.a='bbb';
+insert into t1 values (2);
+select * from t2 left join t1 on (t2.a=t1.a) where t2.a='bbb';
+drop table t1,t2;
+
 # Set defaults back
 --disable_result_log
 --disable_query_log

=== modified file 'mysql-test/suite/maria/t/maria_showlog_error.test'
--- a/mysql-test/suite/maria/t/maria_showlog_error.test	2008-12-05 09:15:23 +0000
+++ b/mysql-test/suite/maria/t/maria_showlog_error.test	2009-02-12 14:08:56 +0000
@@ -18,7 +18,8 @@ connection default;
 
 connection default;
 
-remove_file $MYSQLTEST_VARDIR/master-data/$MARIA_LOG/maria_log.00000001;
+let MYSQLD_DATADIR= `select @@datadir`;
+remove_file $MYSQLD_DATADIR/$MARIA_LOG/maria_log.00000001;
 --replace_regex /Size unknown ; .*maria_log.00000001/Size unknown ; maria_log.00000001/
 show engine maria logs;
 

=== modified file 'mysql-test/suite/maria/t/ps_maria.test'
--- a/mysql-test/suite/maria/t/ps_maria.test	2008-10-01 12:13:39 +0000
+++ b/mysql-test/suite/maria/t/ps_maria.test	2009-02-12 14:08:56 +0000
@@ -9,7 +9,6 @@
 #       BEFORE ADDING NEW TEST CASES HERE !!!
 
 -- source include/have_maria.inc
-set global maria_log_file_size=4294967295;
 
 use test;
 

=== modified file 'mysql-test/t/ctype_utf8.test'
--- a/mysql-test/t/ctype_utf8.test	2008-11-21 13:38:27 +0000
+++ b/mysql-test/t/ctype_utf8.test	2009-02-13 16:30:54 +0000
@@ -164,7 +164,7 @@ drop table t1;
 # UTF8 breaks primary keys for cols > 333 characters
 #
 --error 1071
-create table t1 (a text character set utf8, primary key(a(360)));
+create table t1 (a text character set utf8, primary key(a(371)));
 
 
 #

=== modified file 'mysys/lf_alloc-pin.c'
--- a/mysys/lf_alloc-pin.c	2008-10-07 16:49:01 +0000
+++ b/mysys/lf_alloc-pin.c	2009-01-15 21:27:36 +0000
@@ -1,5 +1,5 @@
 /* QQ: TODO multi-pinbox */
-/* Copyright (C) 2006 MySQL AB
+/* Copyright (C) 2006-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.
 
    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
@@ -330,7 +330,7 @@ static void _lf_pinbox_real_free(LF_PINS
 {
   int npins, alloca_size;
   void *list, **addr;
-  uchar *first, *last= NULL;
+  void *first, *last= NULL;
   LF_PINBOX *pinbox= pins->pinbox;
 
   LINT_INIT(first);

=== modified file 'mysys/lf_hash.c'
--- a/mysys/lf_hash.c	2009-01-27 02:08:48 +0000
+++ b/mysys/lf_hash.c	2009-02-13 16:30:54 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2006 MySQL AB
+/* Copyright (C) 2006-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.
 
    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
@@ -42,6 +42,8 @@ typedef struct {
   */
 } LF_SLIST;
 
+const int LF_HASH_OVERHEAD= sizeof(LF_SLIST);
+
 /*
   a structure to pass the context (pointers two the three successive elements
   in a list) from lfind to linsert/ldelete
@@ -315,7 +317,6 @@ void lf_hash_init(LF_HASH *hash, uint el
                   uint key_offset, uint key_length, my_hash_get_key get_key,
                   CHARSET_INFO *charset)
 {
-  compile_time_assert(sizeof(LF_SLIST) == LF_HASH_OVERHEAD);
   lf_alloc_init(&hash->alloc, sizeof(LF_SLIST)+element_size,
                 offsetof(LF_SLIST, key));
   lf_dynarray_init(&hash->array, sizeof(LF_SLIST *));

=== modified file 'mysys/my_static.c'
--- a/mysys/my_static.c	2008-10-31 18:02:34 +0000
+++ b/mysys/my_static.c	2009-02-13 16:30:54 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (C) 2000-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.
 
    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
@@ -101,6 +101,7 @@ static const char *proc_info_dummy(void 
   return 0;
 }
 
+/* this is to be able to call set_thd_proc_info from the C code */
 const char *(*proc_info_hook)(void *, const char *, const char *, const char *,
                               const unsigned int)= proc_info_dummy;
 

=== modified file 'mysys/my_thr_init.c'
--- a/mysys/my_thr_init.c	2009-01-26 19:15:24 +0000
+++ b/mysys/my_thr_init.c	2009-02-13 16:30:54 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (C) 2000-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.
 
    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
@@ -336,7 +336,8 @@ my_bool my_thread_init(void)
                         0);
   pthread_cond_init(&tmp->suspend, NULL);
 
-  tmp->stack_ends_here= &tmp + STACK_DIRECTION * my_thread_stack_size;
+  tmp->stack_ends_here= (char*)&tmp +
+                         STACK_DIRECTION * (long)my_thread_stack_size;
 
   pthread_mutex_lock(&THR_LOCK_threads);
   tmp->id= ++thread_id;

=== modified file 'mysys/thr_lock.c'
--- a/mysys/thr_lock.c	2009-01-16 11:53:32 +0000
+++ b/mysys/thr_lock.c	2009-02-13 16:30:54 +0000
@@ -511,7 +511,8 @@ wait_for_lock(struct st_lock_list *wait,
   {
     result= THR_LOCK_SUCCESS;
     if (data->lock->get_status)
-      (*data->lock->get_status)(data->status_param, 0);
+      (*data->lock->get_status)(data->status_param,
+                                data->type == TL_WRITE_CONCURRENT_INSERT);
     check_locks(data->lock,"got wait_for_lock",0);
   }
   pthread_mutex_unlock(&data->lock->mutex);

=== modified file 'mysys/thr_mutex.c'
--- a/mysys/thr_mutex.c	2009-01-27 02:08:48 +0000
+++ b/mysys/thr_mutex.c	2009-02-13 16:30:54 +0000
@@ -745,15 +745,23 @@ static void print_deadlock_warning(safe_
   fprintf(stderr, "safe_mutex: Found wrong usage of mutex "
           "'%s' and '%s'\n",
           parent_mutex->name, new_mutex->name);
+  DBUG_PRINT("info", ("safe_mutex: Found wrong usage of mutex "
+                      "'%s' and '%s'",
+                      parent_mutex->name, new_mutex->name));
   fprintf(stderr, "Mutex currently locked (in reverse order):\n");
+  DBUG_PRINT("info", ("Mutex currently locked (in reverse order):"));
   fprintf(stderr, "%-32.32s  %s  line %u\n", new_mutex->name, new_mutex->file,
           new_mutex->line);
+  DBUG_PRINT("info", ("%-32.32s  %s  line %u\n", new_mutex->name,
+                      new_mutex->file, new_mutex->line));
   for (mutex_root= *my_thread_var_mutex_in_use() ;
        mutex_root;
        mutex_root= mutex_root->next)
   {
     fprintf(stderr, "%-32.32s  %s  line %u\n", mutex_root->name,
             mutex_root->file, mutex_root->line);
+    DBUG_PRINT("info", ("%-32.32s  %s  line %u", mutex_root->name,
+                        mutex_root->file, mutex_root->line));
   }
   fflush(stderr);
   DBUG_VOID_RETURN;

=== modified file 'mysys/waiting_threads.c'
--- a/mysys/waiting_threads.c	2008-12-17 18:40:14 +0000
+++ b/mysys/waiting_threads.c	2009-02-13 16:30:54 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2008 MySQL AB
+/* Copyright (C) 2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.
 
    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
@@ -13,74 +13,134 @@
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
-/*
+/**
+  @file
+
   "waiting threads" subsystem - a unified interface for threads to wait
   on each other, with built-in deadlock detection.
 
   Main concepts
   ^^^^^^^^^^^^^
-    a thread - is represented by a WT_THD structure. One physical thread
-      can have only one WT_THD descriptor.
+  a thread - is represented by a WT_THD structure. One physical thread
+    can have only one WT_THD descriptor at any given moment.
 
-    a resource - a thread does not wait for other threads directly,
-      instead it waits for a "resource", which is "owned" by other threads.
-      It waits, exactly, for all "owners" to "release" a resource.
-      It does not have to correspond to a physical resource. For example, it
-      may be convenient in certain cases to force resource == thread.
-      A resource is represented by a WT_RESOURCE structure. 
+  a resource - a thread does not wait for other threads directly,
+    instead it waits for a "resource", which is "owned" by other threads.
+    It waits, exactly, for all "owners" to "release" a resource.
+    It does not have to correspond to a physical resource. For example, it
+    may be convenient in certain cases to force resource == thread.
+    A resource is represented by a WT_RESOURCE structure. 
 
-    a resource identifier - a pair of {resource type, value}. A value is
-      an ulonglong number. Represented by a WT_RESOURCE_ID structure.
+  a resource identifier - a pair of {resource type, value}. A value is
+    an ulonglong number. Represented by a WT_RESOURCE_ID structure.
 
-    a resource type - a pointer to a statically defined instance of
+  a resource type - a pointer to a statically defined instance of
     WT_RESOURCE_TYPE structure. This structure contains a pointer to
     a function that knows how to compare values of this resource type.
     In the simple case it could be wt_resource_id_memcmp().
 
-   Usage
-   ^^^^^
-   to use the interface one needs to use this thread's WT_THD,
-   call wt_thd_will_wait_for() for every thread it needs to wait on,
-   then call wt_thd_cond_timedwait(). When thread releases a resource
-   it should call wt_thd_release() (or wt_thd_release_all()) - it will
-   notify (send a signal) threads waiting in wt_thd_cond_timedwait(),
-   if appropriate.
-
-   Just like with pthread's cond_wait, there could be spurious
-   wake-ups from wt_thd_cond_timedwait(). A caller is expected to
-   handle that.
-
-   wt_thd_will_wait_for() and wt_thd_cond_timedwait() return either
-   WT_OK or WT_DEADLOCK. Additionally wt_thd_cond_timedwait() can return
-   WT_TIMEOUT. Out of memory and other fatal errors are reported as
-   WT_DEADLOCK - and a transaction must be aborted just the same.
-
-   Configuration
-   ^^^^^^^^^^^^^
-   There are four config variables. Two deadlock search depths - short and
-   long - and two timeouts. Deadlock search is performed with the short
-   depth on every wt_thd_will_wait_for() call. wt_thd_cond_timedwait()
-   waits with a short timeout, performs a deadlock search with the long
-   depth, and waits with a long timeout. As most deadlock cycles are supposed
-   to be short, most deadlocks will be detected at once, and waits will
-   rarely be necessary.
-
-   These config variables are thread-local. Different threads may have
-   different search depth and timeout values.
-
-   Also, deadlock detector supports different killing strategies, the victim
-   in a deadlock cycle is selected based on the "weight". See "weight"
-   description in waiting_threads.h for details. It's up to the caller to
-   set weights accordingly.
-
-   Status
-   ^^^^^^
-   We calculate the number of successfull waits (WT_OK returned from
-   wt_thd_cond_timedwait()), a number of timeouts, a deadlock cycle
-   length distribution - number of deadlocks with every length from
-   1 to WT_CYCLE_STATS, and a wait time distribution - number
-   of waits with a time from 1 us to 1 min in WT_CYCLE_STATS
-   intervals on a log scale.
+  a wait-for graph - a graph, that represenst "wait-for" relationships.
+    It has two types of nodes - threads and resources. There are directed
+    edges from a thread to a resource it is waiting for (WT_THD::waiting_for),
+    from a thread to resources that it "owns" (WT_THD::my_resources),
+    and from a resource to threads that "own" it (WT_RESOURCE::owners)
+
+  Graph completeness
+  ^^^^^^^^^^^^^^^^^^
+
+  For flawless deadlock detection wait-for graph must be complete.
+  It means that when a thread starts waiting it needs to know *all* its
+  blockers, and call wt_thd_will_wait_for() for every one of them.
+  Otherwise two phenomena should be expected:
+
+  1. Fuzzy timeouts:
+
+    thread A needs to get a lock, and is blocked by a thread B.
+    it waits.
+    Just before the timeout thread B releases the lock.
+    thread A is ready to grab the lock but discovers that it is also
+    blocked by a thread C.
+    It waits and times out.
+
+    As a result thread A has waited two timeout intervals, instead of one.
+
+  2. Unreliable cycle detection:
+
+     Thread A waits for threads B and C
+     Thread C waits for D
+     Thread D wants to start waiting for A
+
+     one can see immediately that thread D creates a cycle, and thus
+     a deadlock is detected.
+
+     But if thread A would only wait for B, and start waiting for C
+     when B would unlock, thread D would be allowed to wait, a deadlock
+     would be only detected when B unlocks or somebody times out.
+
+  These two phenomena don't affect a correctness, and strictly speaking,
+  the caller is not required to call wt_thd_will_wait_for() for *all*
+  blockers - it may optimize wt_thd_will_wait_for() calls. But they
+  may be perceived as bugs by users, it must be understood that such
+  an optimization comes with its price.
+
+  Usage
+  ^^^^^
+
+  First, the wt* subsystem must be initialized by calling
+  wt_init(). In the server you don't need to do it, it's done
+  in mysqld.cc.
+
+  Similarly, wt_end() frees wt* structures, should be called
+  at the end, but in the server mysqld.cc takes care of that.
+
+  Every WT_THD should be initialized with wt_thd_lazy_init().
+  After that they can be used in other wt_thd_* calls.
+  Before discarding, WT_THD should be free'd with
+  wt_thd_destroy(). In the server both are handled in sql_class.cc,
+  it's an error to try to do it manually.
+
+  To use the deadlock detection one needs to use this thread's WT_THD,
+  call wt_thd_will_wait_for() for every thread it needs to wait on,
+  then call wt_thd_cond_timedwait(). When thread releases a resource
+  it should call wt_thd_release() (or wt_thd_release_all()) - it will
+  notify (send a signal) threads waiting in wt_thd_cond_timedwait(),
+  if appropriate.
+
+  Just like with pthread's cond_wait, there could be spurious
+  wake-ups from wt_thd_cond_timedwait(). A caller is expected to
+  handle that (that is, to re-check the blocking criteria).
+
+  wt_thd_will_wait_for() and wt_thd_cond_timedwait() return either
+  WT_OK or WT_DEADLOCK. Additionally wt_thd_cond_timedwait() can return
+  WT_TIMEOUT. Out of memory and other fatal errors are reported as
+  WT_DEADLOCK - and a transaction must be aborted just the same.
+
+  Configuration
+  ^^^^^^^^^^^^^
+  There are four config variables. Two deadlock search depths - short and
+  long - and two timeouts. Deadlock search is performed with the short
+  depth on every wt_thd_will_wait_for() call. wt_thd_cond_timedwait()
+  waits with a short timeout, performs a deadlock search with the long
+  depth, and waits with a long timeout. As most deadlock cycles are supposed
+  to be short, most deadlocks will be detected at once, and waits will
+  rarely be necessary.
+
+  These config variables are thread-local. Different threads may have
+  different search depth and timeout values.
+
+  Also, deadlock detector supports different killing strategies, the victim
+  in a deadlock cycle is selected based on the "weight". See "weight"
+  description in waiting_threads.h for details. It's up to the caller to
+  set weights accordingly.
+
+  Status
+  ^^^^^^
+  We calculate the number of successfull waits (WT_OK returned from
+  wt_thd_cond_timedwait()), a number of timeouts, a deadlock cycle
+  length distribution - number of deadlocks with every length from
+  1 to WT_CYCLE_STATS, and a wait time distribution - number
+  of waits with a time from 1 us to 1 min in WT_WAIT_STATS
+  intervals on a log e scale.
 */
 
 /*
@@ -93,10 +153,11 @@
 
       (example A=IX, B=IS, C=S, D=X)
 
-   you need to include lock level in the resource identifier - thread 1
-   waiting for lock A on resource R and thread 2 waiting for lock B
-   on resource R should wait on different WT_RESOURCE structures, on different
-   {lock, resource} pairs. Otherwise the following is possible:
+   you need to include lock level in the resource identifier - a
+   thread waiting for lock of the type A on resource R and another
+   thread waiting for lock of the type B on resource R should wait on
+   different WT_RESOURCE structures, on different {lock, resource}
+   pairs.  Otherwise the following is possible:
 
       thread1> take S-lock on R
       thread2> take IS-lock on R
@@ -113,40 +174,46 @@
 #include <waiting_threads.h>
 #include <m_string.h>
 
-/*
-  status variables:
-    distribution of cycle lengths
-    wait time log distribution
-
-  Note:
-
-    we call deadlock() twice per wait (with different search lengths).
-    it means a deadlock will be counted twice. It's difficult to avoid,
-    as on the second search we could find a *different* deadlock and we
-    *want* to count it too. So we just count all deadlocks - two searches
-    mean two increments on the wt_cycle_stats.
-*/
+/* status variables */
 
+/**
+  preset table of wait intervals
+*/
 ulonglong wt_wait_table[WT_WAIT_STATS];
-uint32    wt_wait_stats[WT_WAIT_STATS+1];
-uint32    wt_cycle_stats[2][WT_CYCLE_STATS+1], wt_success_stats;
+/**
+  wait time distribution (log e scale)
+*/
+uint32 wt_wait_stats[WT_WAIT_STATS+1];
+/**
+  distribution of cycle lengths
+  first column tells whether this was during short or long detection
+*/
+uint32 wt_cycle_stats[2][WT_CYCLE_STATS+1];
+uint32 wt_success_stats;
 
 static my_atomic_rwlock_t cycle_stats_lock, wait_stats_lock, success_stats_lock;
 
+#ifdef SAFE_STATISTICS
+#define incr(VAR, LOCK)                           \
+  do {                                            \
+    my_atomic_rwlock_wrlock(&(LOCK));             \
+    my_atomic_add32(&(VAR), 1);                   \
+    my_atomic_rwlock_wrunlock(&(LOCK));           \
+  } while(0)
+#else
+#define incr(VAR,LOCK)  do { (VAR)++; } while(0)
+#endif
+
 static void increment_success_stats()
 {
-  my_atomic_rwlock_wrlock(&success_stats_lock);
-  my_atomic_add32(&wt_success_stats, 1);
-  my_atomic_rwlock_wrunlock(&success_stats_lock);
+  incr(wt_success_stats, success_stats_lock);
 }
 
 static void increment_cycle_stats(uint depth, uint slot)
 {
   if (depth >= WT_CYCLE_STATS)
     depth= WT_CYCLE_STATS;
-  my_atomic_rwlock_wrlock(&cycle_stats_lock);
-  my_atomic_add32(&wt_cycle_stats[slot][depth], 1);
-  my_atomic_rwlock_wrunlock(&cycle_stats_lock);
+  incr(wt_cycle_stats[slot][depth], cycle_stats_lock);
 }
 
 static void increment_wait_stats(ulonglong waited,int ret)
@@ -155,12 +222,89 @@ static void increment_wait_stats(ulonglo
   if ((ret) == ETIMEDOUT)
     i= WT_WAIT_STATS;
   else
-    for (i=0; i < WT_WAIT_STATS && waited/10 > wt_wait_table[i]; i++) ;
-  my_atomic_rwlock_wrlock(&wait_stats_lock);
-  my_atomic_add32(wt_wait_stats+i, 1);
-  my_atomic_rwlock_wrunlock(&wait_stats_lock);
+    for (i= 0; i < WT_WAIT_STATS && waited/10 > wt_wait_table[i]; i++) ;
+  incr(wt_wait_stats[i], wait_stats_lock);
 }
 
+/*
+  'lock' protects 'owners', 'state', and 'waiter_count'
+  'id' is read-only
+
+  a resource is picked up from a hash in a lock-free manner
+  it's returned pinned, so it cannot be freed at once
+  but it may be freed right after the pin is removed
+  to free a resource it should
+    1. have no owners
+    2. have no waiters
+
+  two ways to access a resource:
+    1. find it in a hash
+       - it's returned pinned.
+        a) take a lock in exclusive mode
+        b) check the state, it should be ACTIVE to be usable
+        c) unpin
+    2. by a direct reference
+       - could only used if a resource cannot be freed
+       e.g. accessing a resource by thd->waiting_for is safe,
+       a resource cannot be freed as there's a thread waiting for it
+*/
+struct st_wt_resource {
+  WT_RESOURCE_ID  id;
+  uint            waiter_count;
+  enum { ACTIVE, FREE } state;
+#ifndef DBUG_OFF
+  pthread_mutex_t  *cond_mutex; /* a mutex for the 'cond' below */
+#endif
+  /*
+    before the 'lock' all elements are mutable, after (and including) -
+    immutable in the sense that lf_hash_insert() won't memcpy() over them.
+    See wt_init().
+  */
+#ifdef WT_RWLOCKS_USE_MUTEXES
+  /*
+    we need a special rwlock-like 'lock' to allow readers bypass
+    waiting writers, otherwise readers can deadlock. For example:
+
+      A waits on resource x, owned by B, B waits on resource y, owned
+      by A, we have a cycle (A->x->B->y->A)
+      Both A and B start deadlock detection:
+
+        A locks x                          B locks y
+        A goes deeper                      B goes deeper
+        A locks y                          B locks x
+
+      with mutexes it would deadlock. With rwlocks it won't, as long
+      as both A and B are taking read locks (and they do).
+      But other threads may take write locks. Assume there's
+      C who wants to start waiting on x, and D who wants to start
+      waiting on y.
+
+        A read-locks x                       B read-locks y
+        A goes deeper                        B goes deeper
+     => C write-locks x (to add a new edge)  D write-locks y
+     .. C is blocked                         D is blocked
+        A read-locks y                       B read-locks x
+
+      Now, if a read lock can bypass a pending wrote lock request, we're fine.
+      If it can not, we have a deadlock.
+
+    writer starvation is technically possible, but unlikely, because
+    the contention is expected to be low.
+  */
+  struct {
+    pthread_cond_t   cond;
+    pthread_mutex_t  mutex;
+    uint readers: 16;
+    uint pending_writers: 15;
+    uint write_locked: 1;
+  } lock;
+#else
+  rw_lock_t lock;
+#endif
+  pthread_cond_t   cond; /* the corresponding mutex is provided by the caller */
+  DYNAMIC_ARRAY    owners;
+};
+
 #ifdef  WT_RWLOCKS_USE_MUTEXES
 static void rc_rwlock_init(WT_RESOURCE *rc)
 {
@@ -169,6 +313,8 @@ static void rc_rwlock_init(WT_RESOURCE *
 }
 static void rc_rwlock_destroy(WT_RESOURCE *rc)
 {
+  DBUG_ASSERT(rc->lock.write_locked == 0);
+  DBUG_ASSERT(rc->lock.readers == 0);
   pthread_cond_destroy(&rc->lock.cond);
   pthread_mutex_destroy(&rc->lock.mutex);
 }
@@ -188,7 +334,7 @@ static void rc_wrlock(WT_RESOURCE *rc)
   pthread_mutex_lock(&rc->lock.mutex);
   while (rc->lock.write_locked || rc->lock.readers)
     pthread_cond_wait(&rc->lock.cond, &rc->lock.mutex);
-  rc->lock.write_locked=1;
+  rc->lock.write_locked= 1;
   pthread_mutex_unlock(&rc->lock.mutex);
   DBUG_PRINT("wt", ("LOCK resid=%ld for WRITE", (ulong)rc->id.value));
 }
@@ -198,7 +344,7 @@ static void rc_unlock(WT_RESOURCE *rc)
   pthread_mutex_lock(&rc->lock.mutex);
   if (rc->lock.write_locked)
   {
-    rc->lock.write_locked=0;
+    rc->lock.write_locked= 0;
     pthread_cond_broadcast(&rc->lock.cond);
   }
   else if (--rc->lock.readers == 0)
@@ -242,12 +388,12 @@ static LF_HASH      reshash;
 /**
   WT_RESOURCE constructor
 
-  It's called from lf_hash and takes an offset to LF_SLIST instance.
+  It's called from lf_hash and takes a pointer to an LF_SLIST instance.
   WT_RESOURCE is located at arg+sizeof(LF_SLIST)
 */
 static void wt_resource_init(uchar *arg)
 {
-  WT_RESOURCE *rc=(WT_RESOURCE*)(arg+LF_HASH_OVERHEAD);
+  WT_RESOURCE *rc= (WT_RESOURCE*)(arg+LF_HASH_OVERHEAD);
   DBUG_ENTER("wt_resource_init");
 
   bzero(rc, sizeof(*rc));
@@ -260,12 +406,12 @@ static void wt_resource_init(uchar *arg)
 /**
   WT_RESOURCE destructor
 
-  It's called from lf_hash and takes an offset to LF_SLIST instance.
+  It's called from lf_hash and takes a pointer to an LF_SLIST instance.
   WT_RESOURCE is located at arg+sizeof(LF_SLIST)
 */
 static void wt_resource_destroy(uchar *arg)
 {
-  WT_RESOURCE *rc=(WT_RESOURCE*)(arg+LF_HASH_OVERHEAD);
+  WT_RESOURCE *rc= (WT_RESOURCE*)(arg+LF_HASH_OVERHEAD);
   DBUG_ENTER("wt_resource_destroy");
 
   DBUG_ASSERT(rc->owners.elements == 0);
@@ -278,6 +424,7 @@ static void wt_resource_destroy(uchar *a
 void wt_init()
 {
   DBUG_ENTER("wt_init");
+  DBUG_ASSERT(reshash.alloc.constructor != wt_resource_init);
 
   lf_hash_init(&reshash, sizeof(WT_RESOURCE), LF_HASH_UNIQUE, 0,
                sizeof_WT_RESOURCE_ID, 0, 0);
@@ -293,15 +440,15 @@ void wt_init()
   reshash.element_size= offsetof(WT_RESOURCE, lock);
   bzero(wt_wait_stats, sizeof(wt_wait_stats));
   bzero(wt_cycle_stats, sizeof(wt_cycle_stats));
-  wt_success_stats=0;
-  { /* initialize wt_wait_table[]. from 1 us to 1 min, log scale */
+  wt_success_stats= 0;
+  { /* initialize wt_wait_table[]. from 1 us to 1 min, log e scale */
     int i;
-    double from=log(1);   /* 1 us */
-    double to=log(60e6);  /* 1 min */
-    for (i=0; i < WT_WAIT_STATS; i++)
+    double from= log(1);   /* 1 us */
+    double to= log(60e6);  /* 1 min */
+    for (i= 0; i < WT_WAIT_STATS; i++)
     {
-      wt_wait_table[i]=(ulonglong)exp((to-from)/(WT_WAIT_STATS-1)*i+from);
-      DBUG_ASSERT(i==0 || wt_wait_table[i-1] != wt_wait_table[i]);
+      wt_wait_table[i]= (ulonglong)exp((to-from)/(WT_WAIT_STATS-1)*i+from);
+      DBUG_ASSERT(i == 0 || wt_wait_table[i-1] != wt_wait_table[i]);
     }
   }
   my_atomic_rwlock_init(&cycle_stats_lock);
@@ -325,7 +472,7 @@ void wt_end()
 /**
   Lazy WT_THD initialization
 
-  Cheap initialization of WT_THD. Only initialized fields that don't require
+  Cheap initialization of WT_THD. Only initialize fields that don't require
   memory allocations - basically, it only does assignments. The rest of the
   WT_THD structure will be initialized on demand, on the first use.
   This allows one to initialize lazily all WT_THD structures, even if some
@@ -335,14 +482,18 @@ void wt_end()
   @param ts     a pointer to deadlock timeout short value
   @param dl     a pointer to deadlock search depth long value
   @param tl     a pointer to deadlock timeout long value
+
+  @note these are pointers to values, and WT_THD stores them as pointers.
+  It allows one later to change search depths and timeouts for existing
+  threads. It also means that the pointers must stay valid for the lifetime
+  of WT_THD.
 */
-void wt_thd_lazy_init(WT_THD *thd, ulong *ds, ulong *ts, ulong *dl, ulong *tl)
+void wt_thd_lazy_init(WT_THD *thd, const ulong *ds, const ulong *ts,
+                                   const ulong *dl, const ulong *tl)
 {
   DBUG_ENTER("wt_thd_lazy_init");
-  thd->waiting_for=0;
-  thd->my_resources.buffer= 0;
-  thd->my_resources.elements= 0;
-  thd->weight=0;
+  thd->waiting_for= 0;
+  thd->weight= 0;
   thd->deadlock_search_depth_short= ds;
   thd->timeout_short= ts;
   thd->deadlock_search_depth_long= dl;
@@ -350,7 +501,7 @@ void wt_thd_lazy_init(WT_THD *thd, ulong
   /* dynamic array is also initialized lazily - without memory allocations */
   my_init_dynamic_array(&thd->my_resources, sizeof(WT_RESOURCE *), 0, 5);
 #ifndef DBUG_OFF
-  thd->name=my_thread_name();
+  thd->name= my_thread_name();
 #endif
   DBUG_VOID_RETURN;
 }
@@ -367,9 +518,9 @@ static int fix_thd_pins(WT_THD *thd)
 {
   if (unlikely(thd->pins == 0))
   {
-    thd->pins=lf_hash_get_pins(&reshash);
+    thd->pins= lf_hash_get_pins(&reshash);
 #ifndef DBUG_OFF
-    thd->name=my_thread_name();
+    thd->name= my_thread_name();
 #endif
   }
   return thd->pins == 0;
@@ -380,12 +531,12 @@ void wt_thd_destroy(WT_THD *thd)
   DBUG_ENTER("wt_thd_destroy");
 
   DBUG_ASSERT(thd->my_resources.elements == 0);
+  DBUG_ASSERT(thd->waiting_for == 0);
 
   if (thd->pins != 0)
     lf_hash_put_pins(thd->pins);
 
   delete_dynamic(&thd->my_resources);
-  thd->waiting_for=0;
   DBUG_VOID_RETURN;
 }
 /**
@@ -394,7 +545,7 @@ void wt_thd_destroy(WT_THD *thd)
   It can be used in WT_RESOURCE_TYPE structures where bytewise
   comparison of values is sufficient.
 */
-int wt_resource_id_memcmp(void *a, void *b)
+my_bool wt_resource_id_memcmp(const void *a, const void *b)
 {
   /* we use the fact that there's no padding in the middle of WT_RESOURCE_ID */
   compile_time_assert(offsetof(WT_RESOURCE_ID, type) == sizeof(ulonglong));
@@ -405,10 +556,10 @@ int wt_resource_id_memcmp(void *a, void 
   arguments for the recursive deadlock_search function
 */
 struct deadlock_arg {
-  WT_THD *thd;          /**< starting point of a search */
-  uint    max_depth;    /**< search depth limit */
-  WT_THD *victim;       /**< a thread to be killed to resolve a deadlock */
-  WT_RESOURCE *rc;      /**< see comment at the end of deadlock_search() */
+  WT_THD * const thd;          /**< starting point of a search */
+  uint const max_depth;        /**< search depth limit */
+  WT_THD *victim;              /**< a thread to be killed to resolve a deadlock */
+  WT_RESOURCE *last_locked_rc; /**< see comment at the end of deadlock_search() */
 };
 
 /**
@@ -421,10 +572,10 @@ static void change_victim(WT_THD* found,
     if (arg->victim != arg->thd)
     {
       rc_unlock(arg->victim->waiting_for); /* release the previous victim */
-      DBUG_ASSERT(arg->rc == found->waiting_for);
+      DBUG_ASSERT(arg->last_locked_rc == found->waiting_for);
     }
     arg->victim= found;
-    arg->rc= 0;
+    arg->last_locked_rc= 0;
   }
 }
 
@@ -444,7 +595,7 @@ static int deadlock_search(struct deadlo
 
   LF_REQUIRE_PINS(1);
 
-  arg->rc= 0;
+  arg->last_locked_rc= 0;
 
   if (depth > arg->max_depth)
   {
@@ -453,7 +604,10 @@ static int deadlock_search(struct deadlo
   }
 
 retry:
-  /* safe dereference as explained in lf_alloc-pin.c */
+  /*
+    safe dereference as explained in lf_alloc-pin.c
+    (in short: protects against lf_alloc_free() in lf_hash_delete())
+  */
   do
   {
     rc= *shared_ptr;
@@ -469,6 +623,7 @@ retry:
   rc_rdlock(rc);
   if (rc->state != ACTIVE || *shared_ptr != rc)
   {
+    /* blocker is not waiting on this resource anymore */
     rc_unlock(rc);
     lf_unpin(arg->thd->pins, 0);
     goto retry;
@@ -480,20 +635,22 @@ retry:
     Below is not a pure depth-first search. It's a depth-first with a
     slightest hint of breadth-first. Depth-first is:
 
-      check(element):
+      check(element, X):
         foreach current in element->nodes[] do:
-          if current == element return error;
-          check(current);
+          if current == X return error;
+          check(current, X);
 
     while we do
 
-      check(element):
+      check(element, X):
         foreach current in element->nodes[] do:
-          if current == element return error;
+          if current == X return error;
         foreach current in element->nodes[] do:
-          check(current);
+          check(current, X);
+
+    preferring shorter deadlocks over longer ones.
   */
-  for (i=0; i < rc->owners.elements; i++)
+  for (i= 0; i < rc->owners.elements; i++)
   {
     cursor= *dynamic_element(&rc->owners, i, WT_THD**);
     /*
@@ -517,7 +674,7 @@ retry:
       goto end;
     }
   }
-  for (i=0; i < rc->owners.elements; i++)
+  for (i= 0; i < rc->owners.elements; i++)
   {
     cursor= *dynamic_element(&rc->owners, i, WT_THD**);
     switch (deadlock_search(arg, cursor, depth+1)) {
@@ -528,20 +685,21 @@ retry:
       break;
     case WT_DEADLOCK:
       ret= WT_DEADLOCK;
-      change_victim(cursor, arg);       /* also sets arg->rc to 0 */
+      change_victim(cursor, arg);       /* also sets arg->last_locked_rc to 0 */
       i= rc->owners.elements;           /* jump out of the loop */
       break;
     default:
       DBUG_ASSERT(0);
     }
-    if (arg->rc)
-      rc_unlock(arg->rc);
+    if (arg->last_locked_rc)
+      rc_unlock(arg->last_locked_rc);
   }
 end:
   /*
     Note that 'rc' is locked in this function, but it's never unlocked here.
-    Instead it's saved in arg->rc and the *caller* is expected to unlock it.
-    It's done to support different killing strategies. This is how it works:
+    Instead it's saved in arg->last_locked_rc and the *caller* is
+    expected to unlock it.  It's done to support different killing
+    strategies. This is how it works:
     Assuming a graph
 
       thd->A->B->C->thd
@@ -552,9 +710,9 @@ end:
     on. Goes down recursively, locks B. Goes down recursively, locks C.
     Notices that C is waiting on thd. Deadlock detected. Sets arg->victim=thd.
     Returns from the last deadlock_search() call. C stays locked!
-    Now it checks whether C is a more appropriate victim then 'thd'.
+    Now it checks whether C is a more appropriate victim than 'thd'.
     If yes - arg->victim=C, otherwise C is unlocked. Returns. B stays locked.
-    Now it checks whether B is a more appropriate victim then arg->victim.
+    Now it checks whether B is a more appropriate victim than arg->victim.
     If yes - old arg->victim is unlocked and arg->victim=B,
     otherwise B is unlocked. Return.
     And so on.
@@ -566,7 +724,7 @@ end:
     is unrolled and we are back to deadlock() function, there are only two
     locks left - on thd and on the victim.
   */
-  arg->rc= rc;
+  arg->last_locked_rc= rc;
   DBUG_PRINT("wt", ("exit: %s",
                     ret == WT_DEPTH_EXCEEDED ? "WT_DEPTH_EXCEEDED" :
                     ret ? "WT_DEADLOCK" : "OK"));
@@ -612,13 +770,31 @@ static int deadlock(WT_THD *thd, WT_THD 
   */
   if (ret == WT_DEADLOCK && depth)
     change_victim(blocker, &arg);
-  if (arg.rc)
-    rc_unlock(arg.rc);
+  if (arg.last_locked_rc)
+  {
+    /*
+      Special return code if there's nobody to wait for.
+
+      depth == 0 means that we start the search from thd (thd == blocker).
+      ret == WT_OK means that no cycle was found and
+        arg.last_locked_rc == thd->waiting_for.
+      and arg.last_locked_rc->owners.elements == 0 means that
+        (applying the rule above) thd->waiting_for->owners.elements == 0,
+        and thd doesn't have anybody to wait for.
+    */
+    if (depth == 0 && ret == WT_OK && arg.last_locked_rc->owners.elements == 0)
+    {
+      DBUG_ASSERT(thd == blocker);
+      DBUG_ASSERT(arg.last_locked_rc == thd->waiting_for);
+      ret= WT_FREE_TO_GO;
+    }
+    rc_unlock(arg.last_locked_rc);
+  }
   /* notify the victim, if appropriate */
   if (ret == WT_DEADLOCK && arg.victim != thd)
   {
     DBUG_PRINT("wt", ("killing %s", arg.victim->name));
-    arg.victim->killed=1;
+    arg.victim->killed= 1;
     pthread_cond_broadcast(&arg.victim->waiting_for->cond);
     rc_unlock(arg.victim->waiting_for);
     ret= WT_OK;
@@ -642,7 +818,7 @@ static int unlock_lock_and_free_resource
 
   if (rc->owners.elements || rc->waiter_count)
   {
-    DBUG_PRINT("wt", ("nothing to do, %d owners, %d waiters",
+    DBUG_PRINT("wt", ("nothing to do, %u owners, %u waiters",
                       rc->owners.elements, rc->waiter_count));
     rc_unlock(rc);
     DBUG_RETURN(0);
@@ -666,12 +842,8 @@ static int unlock_lock_and_free_resource
      2. set the state to FREE
      3. release the lock
      4. remove from the hash
-
-     I *think* it's safe to release the lock while the element is still
-     in the hash. If not, the corrected procedure should be
-     3. pin; 4; remove; 5; release; 6; unpin and it'll need pin[3].
   */
-  rc->state=FREE;
+  rc->state= FREE;
   rc_unlock(rc);
   DBUG_RETURN(lf_hash_delete(&reshash, thd->pins, key, keylen) == -1);
 }
@@ -722,15 +894,19 @@ static int stop_waiting(WT_THD *thd)
 /**
   notify the system that a thread needs to wait for another thread
 
-  called by a *waiter* to declare what resource it will wait for.
+  called by a *waiter* to declare that it (thd) will wait for another
+  thread (blocker) on a specific resource (resid).
   can be called many times, if many blockers own a blocking resource.
   but must always be called with the same resource id - a thread cannot
   wait for more than one resource at a time.
 
+  @return WT_OK or WT_DEADLOCK
+
   As a new edge is added to the wait-for graph, a deadlock detection is
   performed for this new edge.
 */
-int wt_thd_will_wait_for(WT_THD *thd, WT_THD *blocker, WT_RESOURCE_ID *resid)
+int wt_thd_will_wait_for(WT_THD *thd, WT_THD *blocker,
+                         const WT_RESOURCE_ID *resid)
 {
   uint i;
   WT_RESOURCE *rc;
@@ -805,7 +981,7 @@ retry:
 
     /*
       we can safely access the resource here, it's in the hash as it has
-      at least one owner, and non-zero waiter_count
+      non-zero waiter_count
     */
     rc= thd->waiting_for;
     rc_wrlock(rc);
@@ -818,7 +994,11 @@ retry:
       DBUG_RETURN(WT_DEADLOCK);
     }
   }
-  for (i=0; i < rc->owners.elements; i++)
+  /*
+    Another thread could be waiting on this resource for this very 'blocker'.
+    In this case we should not add it to the list for the second time.
+  */
+  for (i= 0; i < rc->owners.elements; i++)
     if (*dynamic_element(&rc->owners, i, WT_THD**) == blocker)
       break;
   if (i >= rc->owners.elements)
@@ -837,19 +1017,21 @@ retry:
   }
   rc_unlock(rc);
 
-  if (deadlock(thd, blocker, 1, *thd->deadlock_search_depth_short))
+  if (deadlock(thd, blocker, 1, *thd->deadlock_search_depth_short) != WT_OK)
   {
     stop_waiting(thd);
     DBUG_RETURN(WT_DEADLOCK);
   }
-  DBUG_RETURN(0);
+  DBUG_RETURN(WT_OK);
 }
 
 /**
-  called by a *waiter* to start waiting
+  called by a *waiter* (thd) to start waiting
 
   It's supposed to be a drop-in replacement for
   pthread_cond_timedwait(), and it takes mutex as an argument.
+
+  @return one of WT_TIMEOUT, WT_DEADLOCK, WT_OK
 */
 int wt_thd_cond_timedwait(WT_THD *thd, pthread_mutex_t *mutex)
 {
@@ -861,10 +1043,10 @@ int wt_thd_cond_timedwait(WT_THD *thd, p
   DBUG_PRINT("wt", ("enter: thd=%s, rc=%p", thd->name, rc));
 
 #ifndef DBUG_OFF
-  if (rc->mutex)
-    DBUG_ASSERT(rc->mutex == mutex);
+  if (rc->cond_mutex)
+    DBUG_ASSERT(rc->cond_mutex == mutex);
   else
-    rc->mutex= mutex;
+    rc->cond_mutex= mutex;
   safe_mutex_assert_owner(mutex);
 #endif
 
@@ -873,22 +1055,32 @@ int wt_thd_cond_timedwait(WT_THD *thd, p
 #ifdef __WIN__
   /*
     only for the sake of Windows we distinguish between
-    'before' and 'starttime'
+    'before' and 'starttime':
+
+    my_getsystime() returns high-resolution value, that cannot be used for
+    waiting (it doesn't follow system clock changes), but is good for time
+    intervals.
+
+    GetSystemTimeAsFileTime() follows system clock, but is low-resolution
+    and will result in lousy intervals.
   */
   GetSystemTimeAsFileTime((PFILETIME)&starttime);
 #endif
 
   rc_wrlock(rc);
-  if (rc->owners.elements == 0 || thd->killed)
+  if (rc->owners.elements == 0)
     ret= WT_OK;
   rc_unlock(rc);
 
   set_timespec_time_nsec(timeout, starttime, (*thd->timeout_short)*ULL(1000));
-  if (ret == WT_TIMEOUT)
+  if (ret == WT_TIMEOUT && !thd->killed)
     ret= pthread_cond_timedwait(&rc->cond, mutex, &timeout);
-  if (ret == WT_TIMEOUT)
+  if (ret == WT_TIMEOUT && !thd->killed)
   {
-    if (deadlock(thd, thd, 0, *thd->deadlock_search_depth_long))
+    int r= deadlock(thd, thd, 0, *thd->deadlock_search_depth_long);
+    if (r == WT_FREE_TO_GO)
+      ret= WT_OK;
+    else if (r != WT_OK)
       ret= WT_DEADLOCK;
     else if (*thd->timeout_long > *thd->timeout_short)
     {
@@ -915,24 +1107,25 @@ int wt_thd_cond_timedwait(WT_THD *thd, p
   @param resid   a resource to release. 0 to release all resources
 */
 
-void wt_thd_release(WT_THD *thd, WT_RESOURCE_ID *resid)
+void wt_thd_release(WT_THD *thd, const WT_RESOURCE_ID *resid)
 {
   uint i;
   DBUG_ENTER("wt_thd_release");
 
-  for (i=0; i < thd->my_resources.elements; i++)
+  for (i= 0; i < thd->my_resources.elements; i++)
   {
-    uint j;
     WT_RESOURCE *rc= *dynamic_element(&thd->my_resources, i, WT_RESOURCE**);
     if (!resid || (resid->type->compare(&rc->id, resid) == 0))
     {
+      uint j;
+
       rc_wrlock(rc);
       /*
         nobody's trying to free the resource now,
         as its owners[] array is not empty (at least thd must be there)
       */
       DBUG_ASSERT(rc->state == ACTIVE);
-      for (j=0; j < rc->owners.elements; j++)
+      for (j= 0; j < rc->owners.elements; j++)
         if (*dynamic_element(&rc->owners, j, WT_THD**) == thd)
           break;
       DBUG_ASSERT(j < rc->owners.elements);
@@ -941,8 +1134,8 @@ void wt_thd_release(WT_THD *thd, WT_RESO
       {
         pthread_cond_broadcast(&rc->cond);
 #ifndef DBUG_OFF
-        if (rc->mutex)
-          safe_mutex_assert_owner(rc->mutex);
+        if (rc->cond_mutex)
+          safe_mutex_assert_owner(rc->cond_mutex);
 #endif
       }
       unlock_lock_and_free_resource(thd, rc);

=== modified file 'sql/item_cmpfunc.cc'
--- a/sql/item_cmpfunc.cc	2009-01-30 14:13:39 +0000
+++ b/sql/item_cmpfunc.cc	2009-02-13 16:30:54 +0000
@@ -5341,6 +5341,7 @@ void Item_equal::update_used_tables()
   not_null_tables_cache= used_tables_cache= 0;
   if ((const_item_cache= cond_false))
     return;
+  const_item_cache= 1;
   while ((item=li++))
   {
     item->update_used_tables();

=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc	2009-02-04 12:34:03 +0000
+++ b/sql/mysqld.cc	2009-02-13 16:30:54 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.
+/* Copyright (C) 2000-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.
 
    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
@@ -3935,8 +3935,6 @@ static int init_server_components()
   if (table_def_init() | hostname_cache_init())
     unireg_abort(1);
 
-  wt_init();
-
   query_cache_result_size_limit(query_cache_limit);
   query_cache_set_min_res_unit(query_cache_min_res_unit);
   query_cache_init();
@@ -3949,6 +3947,7 @@ static int init_server_components()
   init_slave_list();
   init_slave_start();
 #endif
+  wt_init();
 
   /* Setup logs */
 
@@ -7866,7 +7865,7 @@ static void usage(void)
     default_collation_name= (char*) default_charset_info->name;
   print_version();
   puts("\
-Copyright (C) 2000 MySQL AB, by Monty and others\n\
+Copyright (C) 2000-2008 MySQL AB, Monty and others, 2008-2009 Sun Microsystems, Inc.\n\
 This software comes with ABSOLUTELY NO WARRANTY. This is free software,\n\
 and you are welcome to modify and redistribute it under the GPL license\n\n\
 Starts the MySQL database server\n");

=== modified file 'sql/sql_class.cc'
--- a/sql/sql_class.cc	2009-02-05 12:49:39 +0000
+++ b/sql/sql_class.cc	2009-02-13 16:30:54 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.
+/* Copyright (C) 2000-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.
 
    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
@@ -1028,6 +1028,8 @@ bool THD::store_globals()
   */
   mysys_var->id= thread_id;
   real_id= pthread_self();                      // For debugging
+  mysys_var->stack_ends_here= thread_stack +    // for consistency, see libevent_thread_proc
+                              STACK_DIRECTION * (long)my_thread_stack_size;
 
   /*
     We have to call thr_lock_info_init() again here as THD may have been

=== modified file 'sql/sql_class.h'
--- a/sql/sql_class.h	2009-02-04 10:49:16 +0000
+++ b/sql/sql_class.h	2009-02-13 16:30:54 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.
+/* Copyright (C) 2000-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.
 
    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
@@ -1415,7 +1415,7 @@ public:
     THD_TRANS stmt;			// Trans for current statement
     bool on;                            // see ha_enable_transaction()
     XID_STATE xid_state;
-    WT_THD wt;
+    WT_THD wt;                          ///< for deadlock detection
     Rows_log_event *m_pending_rows_event;
 
     /*

=== modified file 'sql/sql_insert.cc'
--- a/sql/sql_insert.cc	2009-01-18 23:21:43 +0000
+++ b/sql/sql_insert.cc	2009-02-13 16:30:54 +0000
@@ -3562,6 +3562,12 @@ static TABLE *create_table_from_items(TH
                                     MYSQL_LOCK_IGNORE_FLUSH, &not_used)) ||
         hooks->postlock(&table, 1))
   {
+    /* purecov: begin tested */
+    /*
+      This can happen in innodb when you get a deadlock when using same table
+      in insert and select
+    */
+    my_error(ER_CANT_LOCK, MYF(0), my_errno);
     if (*lock)
     {
       mysql_unlock_tables(thd, *lock);
@@ -3571,6 +3577,7 @@ static TABLE *create_table_from_items(TH
     if (!create_info->table_existed)
       drop_open_table(thd, table, create_table->db, create_table->table_name);
     DBUG_RETURN(0);
+    /* purecov: end */
   }
   DBUG_RETURN(table);
 }

=== modified file 'sql/sql_select.cc'
--- a/sql/sql_select.cc	2009-02-05 12:49:39 +0000
+++ b/sql/sql_select.cc	2009-02-13 16:30:54 +0000
@@ -4032,11 +4032,10 @@ make_join_statistics(JOIN *join, TABLE_L
     s->needed_reg.init();
     table_vector[i]=s->table=table=tables->table;
     table->pos_in_table_list= tables;
-    error= table->file->info(HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK);
-    if(error)
+    if ((error= table->file->info(HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK)))
     {
-        table->file->print_error(error, MYF(0));
-        DBUG_RETURN(1);
+      table->file->print_error(error, MYF(0));
+      DBUG_RETURN(1);
     }
     table->quick_keys.clear_all();
     table->reginfo.join_tab=s;
@@ -16655,6 +16654,11 @@ join_read_const_table(JOIN_TAB *tab, POS
       if (!table->maybe_null || error > 0)
 	DBUG_RETURN(error);
     }
+    /*
+      The optimizer trust the engine that when stats.records is 0, there
+      was no found rows
+    */
+    DBUG_ASSERT(table->file->stats.records > 0 || error);
   }
   else
   {
@@ -16684,6 +16688,17 @@ join_read_const_table(JOIN_TAB *tab, POS
   }
   if (*tab->on_expr_ref && !table->null_row)
   {
+#if !defined(DBUG_OFF) && defined(NOT_USING_ITEM_EQUAL)
+    /*
+      This test could be very usefull to find bugs in the optimizer
+      where we would call this function with an expression that can't be
+      evaluated yet. We can't have this enabled by default as long as
+      have items like Item_equal, that doesn't report they are const but
+      they can still be called even if they contain not const items.
+    */
+    (*tab->on_expr_ref)->update_used_tables();
+    DBUG_ASSERT((*tab->on_expr_ref)->const_item());
+#endif
     if ((table->null_row= test((*tab->on_expr_ref)->val_int() == 0)))
       mark_as_null_row(table);  
   }

=== modified file 'storage/maria/ha_maria.cc'
--- a/storage/maria/ha_maria.cc	2009-02-13 12:40:13 +0000
+++ b/storage/maria/ha_maria.cc	2009-02-13 18:16:54 +0000
@@ -1,5 +1,5 @@
-/* Copyright (C) 2006,2004 MySQL AB & MySQL Finland AB & TCX DataKonsult AB,
-   2008 - 2009 Sun Microsystems, Inc.
+/* Copyright (C) 2004-2008 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+   Copyright (C) 2008-2009 Sun Microsystems, Inc.
 
    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
@@ -41,9 +41,11 @@ C_MODE_END
   Note that in future versions, only *transactional* Maria tables can
   rollback, so this flag should be up or down conditionally.
 */
-#define MARIA_CANNOT_ROLLBACK HA_NO_TRANSACTIONS
 #ifdef MARIA_CANNOT_ROLLBACK
+#define CANNOT_ROLLBACK_FLAG HA_NO_TRANSACTIONS
 #define trans_register_ha(A, B, C)  do { /* nothing */ } while(0)
+#else
+#define CANNOT_ROLLBACK_FLAG 0
 #endif
 #define THD_TRN (*(TRN **)thd_ha_data(thd, maria_hton))
 
@@ -755,7 +757,7 @@ handler(hton, table_arg), file(0),
 int_table_flags(HA_NULL_IN_KEY | HA_CAN_FULLTEXT | HA_CAN_SQL_HANDLER |
                 HA_BINLOG_ROW_CAPABLE | HA_BINLOG_STMT_CAPABLE |
                 HA_DUPLICATE_POS | HA_CAN_INDEX_BLOBS | HA_AUTO_PART_KEY |
-                HA_FILE_BASED | HA_CAN_GEOMETRY | MARIA_CANNOT_ROLLBACK |
+                HA_FILE_BASED | HA_CAN_GEOMETRY | CANNOT_ROLLBACK_FLAG |
                 HA_CAN_BIT_FIELD | HA_CAN_RTREEKEYS |
                 HA_HAS_RECORDS | HA_STATS_RECORDS_IS_EXACT),
 can_enable_indexes(1), bulk_insert_single_undo(BULK_INSERT_NONE)
@@ -1414,7 +1416,7 @@ int ha_maria::preload_keys(THD * thd, HA
 
   if ((error= maria_preload(file, map, table_list->ignore_leaves)))
   {
-    char buf[MYSYS_ERRMSG_SIZE];
+    char buf[MYSQL_ERRMSG_SIZE];
     const char *errmsg;
 
     switch (error) {
@@ -2041,7 +2043,7 @@ int ha_maria::info(uint flag, my_bool lo
     stats.data_file_length=  maria_info.data_file_length;
     stats.index_file_length= maria_info.index_file_length;
     stats.delete_length=     maria_info.delete_length;
-    stats.check_time=        maria_info.check_time;
+    stats.check_time=        (ulong) maria_info.check_time;
     stats.mean_rec_length=   maria_info.mean_reclength;
   }
   if (flag & HA_STATUS_CONST)
@@ -2049,7 +2051,7 @@ int ha_maria::info(uint flag, my_bool lo
     TABLE_SHARE *share= table->s;
     stats.max_data_file_length=  maria_info.max_data_file_length;
     stats.max_index_file_length= maria_info.max_index_file_length;
-    stats.create_time= maria_info.create_time;
+    stats.create_time= (ulong) maria_info.create_time;
     ref_length= maria_info.reflength;
     share->db_options_in_use= maria_info.options;
     stats.block_size= maria_block_size;
@@ -2092,7 +2094,7 @@ int ha_maria::info(uint flag, my_bool lo
     my_store_ptr(dup_ref, ref_length, maria_info.dup_key_pos);
   }
   /* Faster to always update, than to do it based on flag */
-  stats.update_time= maria_info.update_time;
+  stats.update_time= (ulong) maria_info.update_time;
   stats.auto_increment_value= maria_info.auto_increment;
 
   return 0;
@@ -2143,6 +2145,9 @@ int ha_maria::extra_opt(enum ha_extra_fu
 
 int ha_maria::delete_all_rows()
 {
+  THD *thd= current_thd;
+  (void) translog_log_debug_info(file->trn, LOGREC_DEBUG_INFO_QUERY,
+                                 (uchar*) thd->query, thd->query_length);
   if (file->s->now_transactional &&
       ((table->in_use->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)) ||
        table->in_use->locked_tables_mode))
@@ -2159,6 +2164,9 @@ int ha_maria::delete_all_rows()
 
 int ha_maria::delete_table(const char *name)
 {
+  THD *thd= current_thd;
+  (void) translog_log_debug_info(0, LOGREC_DEBUG_INFO_QUERY,
+                                 (uchar*) thd->query, thd->query_length);
   return maria_delete_table(name);
 }
 
@@ -2202,13 +2210,7 @@ int ha_maria::external_lock(THD *thd, in
         trnman_new_statement(trn);
       }
 
-      /* If handler uses versioning */
-      if (file->s->lock_key_trees)
-      {
-        if (_ma_setup_live_state(file))
-          DBUG_RETURN(HA_ERR_OUT_OF_MEM);
-      }
-      else
+      if (!file->s->lock_key_trees)             // If we don't use versioning
       {
         /*
           We come here in the following cases:
@@ -2239,6 +2241,16 @@ int ha_maria::external_lock(THD *thd, in
         DBUG_PRINT("info", ("Disabling logging for table"));
         _ma_tmp_disable_logging_for_table(file, TRUE);
       }
+#ifdef EXTRA_DEBUG
+      if (lock_type == F_WRLCK &&
+          ! (trnman_get_flags(trn) & TRN_STATE_INFO_LOGGED))
+      {
+        trnman_set_flags(trn, trnman_get_flags(trn) | TRN_STATE_INFO_LOGGED |
+                         TRN_STATE_TABLES_CAN_CHANGE);
+        (void) translog_log_debug_info(trn, LOGREC_DEBUG_INFO_QUERY,
+                                       (uchar*) thd->query, thd->query_length);
+      }
+#endif
     }
     else
     {
@@ -2251,7 +2263,8 @@ int ha_maria::external_lock(THD *thd, in
         Note that we can come here without having an exclusive lock on the
         table, for example in this case:
         external_lock(F_(WR|RD)LCK); thr_lock() which fails due to lock
-        abortion; external_lock(F_UNLCK).
+        abortion; external_lock(F_UNLCK). Fortunately, the re-enabling happens
+        only if we were the thread which disabled logging.
       */
       if (_ma_reenable_logging_for_table(file, TRUE))
         DBUG_RETURN(1);
@@ -2263,9 +2276,10 @@ int ha_maria::external_lock(THD *thd, in
         external lock of the table
       */
       file->state= &file->s->state.state;
-      if (trn && trnman_has_locked_tables(trn))
+      if (trn)
       {
-        if (!trnman_decrement_locked_tables(trn))
+        if (trnman_has_locked_tables(trn) &&
+            !trnman_decrement_locked_tables(trn))
         {
           /*
             OK should not have been sent to client yet (ACID),
@@ -2289,6 +2303,7 @@ int ha_maria::external_lock(THD *thd, in
           }
 #endif
         }
+        trnman_set_flags(trn, trnman_get_flags(trn) & ~ TRN_STATE_INFO_LOGGED);
       }
     }
   } /* if transactional table */
@@ -2323,6 +2338,16 @@ int ha_maria::start_stmt(THD *thd, thr_l
       call to start_stmt().
     */
     trnman_new_statement(trn);
+
+#ifdef EXTRA_DEBUG
+    if (!(trnman_get_flags(trn) & TRN_STATE_INFO_LOGGED) &&
+        trnman_get_flags(trn) & TRN_STATE_TABLES_CAN_CHANGE)
+    {
+      trnman_set_flags(trn, trnman_get_flags(trn) | TRN_STATE_INFO_LOGGED);
+      (void) translog_log_debug_info(trn, LOGREC_DEBUG_INFO_QUERY,
+                                     (uchar*) thd->query, thd->query_length);
+    }
+#endif
   }
   return 0;
 }
@@ -2532,6 +2557,7 @@ int ha_maria::create(const char *name, r
   TABLE_SHARE *share= table_arg->s;
   uint options= share->db_options_in_use;
   enum data_file_type row_type;
+  THD *thd= current_thd;
   DBUG_ENTER("ha_maria::create");
 
   for (i= 0; i < share->keys; i++)
@@ -2596,6 +2622,9 @@ int ha_maria::create(const char *name, r
        ha_create_info->page_checksum ==  HA_CHOICE_YES)
     create_flags|= HA_CREATE_PAGE_CHECKSUM;
 
+  (void) translog_log_debug_info(0, LOGREC_DEBUG_INFO_QUERY,
+                                 (uchar*) thd->query, thd->query_length);
+
   /* TODO: Check that the following fn_format is really needed */
   error=
     maria_create(fn_format(buff, name, "", "",
@@ -2612,6 +2641,9 @@ int ha_maria::create(const char *name, r
 
 int ha_maria::rename_table(const char *from, const char *to)
 {
+  THD *thd= current_thd;
+  (void) translog_log_debug_info(0, LOGREC_DEBUG_INFO_QUERY,
+                                 (uchar*) thd->query, thd->query_length);
   return maria_rename(from, to);
 }
 
@@ -2756,6 +2788,8 @@ static int maria_commit(handlerton *hton
   TRN *trn= THD_TRN;
   DBUG_ENTER("maria_commit");
   trnman_reset_locked_tables(trn, 0);
+  trnman_set_flags(trn, trnman_get_flags(trn) & ~TRN_STATE_INFO_LOGGED);
+
   /* statement or transaction ? */
   if ((thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)) && !all)
     DBUG_RETURN(0); // end of statement

=== modified file 'storage/maria/ma_blockrec.c'
--- a/storage/maria/ma_blockrec.c	2008-12-09 09:56:02 +0000
+++ b/storage/maria/ma_blockrec.c	2009-02-05 22:38:30 +0000
@@ -2408,11 +2408,23 @@ static my_bool free_full_page_range(MARI
                                     uint count)
 {
   my_bool res= 0;
+  uint delete_count;
   MARIA_SHARE *share= info->s;
   DBUG_ENTER("free_full_page_range");
 
-  if (pagecache_delete_pages(share->pagecache, &info->dfile,
-                             page, count, PAGECACHE_LOCK_WRITE, 0))
+  delete_count= count;
+  if (share->state.state.data_file_length ==
+      (page + count) * share->block_size)
+  {
+    /*
+      Don't delete last page from pagecache as this will make the file
+      shorter than expected if the last operation extended the file
+    */
+    delete_count--;
+  }
+  if (delete_count &&
+      pagecache_delete_pages(share->pagecache, &info->dfile,
+                             page, delete_count, PAGECACHE_LOCK_WRITE, 0))
     res= 1;
 
   if (share->now_transactional)
@@ -3134,8 +3146,8 @@ static my_bool write_block_record(MARIA_
 
           log_pos= store_page_range(log_pos, tmp_block, block_size,
                                     blob_length, &extents);
-          tmp_block+= tmp_block->sub_blocks;
         }
+        tmp_block+= tmp_block->sub_blocks;
       }
     }
 
@@ -3489,23 +3501,26 @@ my_bool _ma_write_abort_block_record(MAR
   for (block= blocks->block + 1, end= block + blocks->count - 1; block < end;
        block++)
   {
-    if (block->used & BLOCKUSED_TAIL)
-    {
-      /*
-        block->page_count is set to the tail directory entry number in
-        write_block_record()
-      */
-      if (delete_head_or_tail(info, block->page, block->page_count & ~TAIL_BIT,
-                              0, 0))
-        res= 1;
-    }
-    else if (block->used & BLOCKUSED_USED)
+    if (block->used & BLOCKUSED_USED)
     {
-      if (free_full_page_range(info, block->page, block->page_count))
-        res= 1;
+      if (block->used & BLOCKUSED_TAIL)
+      {
+        /*
+          block->page_count is set to the tail directory entry number in
+          write_block_record()
+        */
+        if (delete_head_or_tail(info, block->page,
+                                block->page_count & ~TAIL_BIT,
+                                0, 0))
+          res= 1;
+      }
+      else
+      {
+        if (free_full_page_range(info, block->page, block->page_count))
+          res= 1;
+      }
     }
   }
-
   if (share->now_transactional)
   {
     if (_ma_write_clr(info, info->cur_row.orig_undo_lsn,
@@ -6167,6 +6182,7 @@ err:
                              PAGECACHE_UNPIN, LSN_IMPOSSIBLE,
                              LSN_IMPOSSIBLE, 0, FALSE);
   _ma_mark_file_crashed(share);
+  DBUG_ASSERT(0); /* catch recovery errors early */
   DBUG_RETURN((my_errno= error));
 }
 
@@ -6265,6 +6281,7 @@ err:
                            PAGECACHE_UNPIN, LSN_IMPOSSIBLE,
                            LSN_IMPOSSIBLE, 0, FALSE);
   _ma_mark_file_crashed(share);
+  DBUG_ASSERT(0);
   DBUG_RETURN((my_errno= error));
 
 }
@@ -6322,6 +6339,7 @@ uint _ma_apply_redo_free_blocks(MARIA_HA
     if (res)
     {
       _ma_mark_file_crashed(share);
+      DBUG_ASSERT(0);
       DBUG_RETURN(res);
     }
   }
@@ -6405,6 +6423,7 @@ uint _ma_apply_redo_free_head_or_tail(MA
 
 err:
   _ma_mark_file_crashed(share);
+  DBUG_ASSERT(0);
   DBUG_RETURN(1);
 }
 
@@ -6416,6 +6435,10 @@ err:
    @parma  lsn             LSN to put on pages
    @param  header          Header (with FILEID)
    @param  redo_lsn        REDO record's LSN
+   @param[out] number_of_blobs Number of blobs found in log record
+   @param[out] number_of_ranges Number of ranges found
+   @param[out] first_page  First page touched
+   @param[out] last_page   Last page touched
 
    @note Write full pages (full head & blob pages)
 
@@ -6426,13 +6449,18 @@ err:
 
 uint _ma_apply_redo_insert_row_blobs(MARIA_HA *info,
                                      LSN lsn, const uchar *header,
-                                     LSN redo_lsn)
+                                     LSN redo_lsn,
+                                     uint * const number_of_blobs,
+                                     uint * const number_of_ranges,
+                                     pgcache_page_no_t * const first_page,
+                                     pgcache_page_no_t * const last_page)
 {
   MARIA_SHARE *share= info->s;
   const uchar *data;
   uint      data_size= FULL_PAGE_SIZE(share->block_size);
   uint      blob_count, ranges;
   uint16    sid;
+  pgcache_page_no_t first_page2= ULONGLONG_MAX, last_page2= 0;
   DBUG_ENTER("_ma_apply_redo_insert_row_blobs");
 
   share->state.changed|= (STATE_CHANGED | STATE_NOT_ZEROFILLED |
@@ -6440,9 +6468,9 @@ uint _ma_apply_redo_insert_row_blobs(MAR
 
   sid= fileid_korr(header);
   header+= FILEID_STORE_SIZE;
-  ranges= pagerange_korr(header);
+  *number_of_ranges= ranges= pagerange_korr(header);
   header+= PAGERANGE_STORE_SIZE;
-  blob_count= pagerange_korr(header);
+  *number_of_blobs= blob_count= pagerange_korr(header);
   header+= PAGERANGE_STORE_SIZE;
   DBUG_ASSERT(ranges >= blob_count);
 
@@ -6480,6 +6508,8 @@ uint _ma_apply_redo_insert_row_blobs(MAR
         enum pagecache_page_pin unpin_method;
         uint length;
 
+        set_if_smaller(first_page2, page);
+        set_if_bigger(last_page2, page);
         if (_ma_redo_not_needed_for_page(sid, redo_lsn, page, FALSE))
           continue;
 
@@ -6530,15 +6560,22 @@ uint _ma_apply_redo_insert_row_blobs(MAR
           }
           else
           {
+#ifndef DBUG_OFF
+            uchar found_page_type= (buff[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK);
+#endif
             if (lsn_korr(buff) >= lsn)
             {
               /* Already applied */
+              DBUG_PRINT("info", ("already applied %llu >= %llu",
+                                  lsn_korr(buff), lsn));
               pagecache_unlock_by_link(share->pagecache, page_link.link,
                                        PAGECACHE_LOCK_WRITE_UNLOCK,
                                        PAGECACHE_UNPIN, LSN_IMPOSSIBLE,
                                        LSN_IMPOSSIBLE, 0, FALSE);
               continue;
             }
+            DBUG_ASSERT((found_page_type == (uchar) BLOB_PAGE) ||
+                        (found_page_type == (uchar) UNALLOCATED_PAGE));
           }
           unlock_method= PAGECACHE_LOCK_WRITE_UNLOCK;
           unpin_method=  PAGECACHE_UNPIN;
@@ -6580,10 +6617,13 @@ uint _ma_apply_redo_insert_row_blobs(MAR
         goto err;
     }
   }
+  *first_page= first_page2;
+  *last_page=  last_page2;
   DBUG_RETURN(0);
 
 err:
   _ma_mark_file_crashed(share);
+  DBUG_ASSERT(0);
   DBUG_RETURN(1);
 }
 
@@ -7075,7 +7115,10 @@ my_bool _ma_apply_undo_bulk_insert(MARIA
   error= (maria_delete_all_rows(info) ||
           maria_enable_indexes(info) ||
           /* we enabled indices so need '2' below */
-          _ma_state_info_write(info->s, 1|2|4) ||
+          _ma_state_info_write(info->s,
+                               MA_STATE_INFO_WRITE_DONT_MOVE_OFFSET |
+                               MA_STATE_INFO_WRITE_FULL_INFO |
+                               MA_STATE_INFO_WRITE_LOCK) ||
           _ma_write_clr(info, undo_lsn, LOGREC_UNDO_BULK_INSERT,
                         FALSE, 0, &lsn, NULL));
   DBUG_RETURN(error);

=== modified file 'storage/maria/ma_blockrec.h'
--- a/storage/maria/ma_blockrec.h	2008-12-05 21:11:46 +0000
+++ b/storage/maria/ma_blockrec.h	2009-02-09 21:52:42 +0000
@@ -122,6 +122,7 @@ static inline MARIA_RECORD_POS ma_record
                                             uint dir_entry)
 {
   DBUG_ASSERT(dir_entry <= 255);
+  DBUG_ASSERT(page > 0); /* page 0 is bitmap, not data page */
   return (MARIA_RECORD_POS) (((ulonglong) page << 8) | dir_entry);
 }
 
@@ -236,7 +237,11 @@ uint _ma_apply_redo_free_blocks(MARIA_HA
 uint _ma_apply_redo_free_head_or_tail(MARIA_HA *info, LSN lsn,
                                       const uchar *header);
 uint _ma_apply_redo_insert_row_blobs(MARIA_HA *info, LSN lsn,
-                                     const uchar *header, LSN redo_lsn);
+                                     const uchar *header, LSN redo_lsn,
+                                     uint * const number_of_blobs,
+                                     uint * const number_of_ranges,
+                                     pgcache_page_no_t * const first_page,
+                                     pgcache_page_no_t * const last_page);
 my_bool _ma_apply_redo_bitmap_new_page(MARIA_HA *info, LSN lsn,
                                        const uchar *header);
 my_bool _ma_apply_undo_row_insert(MARIA_HA *info, LSN undo_lsn,

=== modified file 'storage/maria/ma_check.c'
--- a/storage/maria/ma_check.c	2009-02-10 14:51:40 +0000
+++ b/storage/maria/ma_check.c	2009-02-13 16:30:54 +0000
@@ -2207,7 +2207,11 @@ static my_bool protect_against_repair_cr
                             FLUSH_FORCE_WRITE,
                             discard_index ? FLUSH_IGNORE_CHANGED :
                             FLUSH_FORCE_WRITE) ||
-      (share->changed && _ma_state_info_write(share, 1|2|4)))
+      (share->changed &&
+       _ma_state_info_write(share,
+                            MA_STATE_INFO_WRITE_DONT_MOVE_OFFSET |
+                            MA_STATE_INFO_WRITE_FULL_INFO |
+                            MA_STATE_INFO_WRITE_LOCK)))
     return TRUE;
   /* In maria_chk this is not needed: */
   if (maria_multi_threaded && share->base.born_transactional)
@@ -2216,7 +2220,9 @@ static my_bool protect_against_repair_cr
     {
       /* this can be true only for a transactional table */
       maria_mark_crashed_on_repair(info);
-      if (_ma_state_info_write(share, 1|4))
+      if (_ma_state_info_write(share,
+                               MA_STATE_INFO_WRITE_DONT_MOVE_OFFSET |
+                               MA_STATE_INFO_WRITE_LOCK))
         return TRUE;
     }
     if (translog_status == TRANSLOG_OK &&
@@ -3259,7 +3265,7 @@ static my_bool maria_zerofill_data(HA_CH
   pgcache_page_no_t page;
   uint block_size= share->block_size;
   MARIA_FILE_BITMAP *bitmap= &share->bitmap;
-  my_bool zero_lsn= !(param->testflag & T_ZEROFILL_KEEP_LSN);
+  my_bool zero_lsn= !(param->testflag & T_ZEROFILL_KEEP_LSN), error;
   DBUG_ENTER("maria_zerofill_data");
 
   /* This works only with BLOCK_RECORD files */
@@ -3354,15 +3360,22 @@ static my_bool maria_zerofill_data(HA_CH
                              PAGECACHE_UNPIN, LSN_IMPOSSIBLE,
                              LSN_IMPOSSIBLE, 1, FALSE);
   }
-  DBUG_RETURN(_ma_bitmap_flush(share) ||
-              flush_pagecache_blocks(share->pagecache, &info->dfile,
-                                     FLUSH_FORCE_WRITE));
+  error= _ma_bitmap_flush(share);
+  if (flush_pagecache_blocks(share->pagecache, &info->dfile,
+                             FLUSH_FORCE_WRITE))
+    error= 1;
+  DBUG_RETURN(error);
 
 err:
   pagecache_unlock_by_link(share->pagecache, page_link.link,
                            PAGECACHE_LOCK_WRITE_UNLOCK,
                            PAGECACHE_UNPIN, LSN_IMPOSSIBLE,
                            LSN_IMPOSSIBLE, 0, FALSE);
+  /* flush what was changed so far */
+  (void) _ma_bitmap_flush(share);
+  (void) flush_pagecache_blocks(share->pagecache, &info->dfile,
+                                FLUSH_FORCE_WRITE);
+
   DBUG_RETURN(1);
 }
 
@@ -3672,7 +3685,7 @@ int maria_repair_by_sort(HA_CHECK *param
 
         Note, built-in parser is always nr. 0 - see ftparser_call_initializer()
       */
-      if (sort_param.keyinfo->ftparser_nr == 0)
+      if (sort_param.keyinfo->ftkey_nr == 0)
       {
         /*
           for built-in parser the number of generated index entries
@@ -4223,6 +4236,9 @@ int maria_repair_parallel(HA_CHECK *para
   sort_param[0].fix_datafile= ! rep_quick;
   sort_param[0].calc_checksum= test(param->testflag & T_CALC_CHECKSUM);
 
+  if (!maria_ftparser_alloc_param(info))
+    goto err;
+
   sort_info.got_error=0;
   pthread_mutex_lock(&sort_info.mutex);
 
@@ -5980,7 +5996,9 @@ int maria_update_state_info(HA_CHECK *pa
       if (!share->state.create_time)
 	share->state.create_time= share->state.check_time;
     }
-    if (_ma_state_info_write(share, 1|2))
+    if (_ma_state_info_write(share,
+                             MA_STATE_INFO_WRITE_DONT_MOVE_OFFSET |
+                             MA_STATE_INFO_WRITE_FULL_INFO))
       goto err;
     share->changed=0;
   }

=== modified file 'storage/maria/ma_checkpoint.c'
--- a/storage/maria/ma_checkpoint.c	2009-01-28 11:08:55 +0000
+++ b/storage/maria/ma_checkpoint.c	2009-02-13 16:30:54 +0000
@@ -368,7 +368,9 @@ static void flush_all_tables(int what_to
                                    FLUSH_KEEP, FLUSH_KEEP);
         break;
       case 1:
-        res= _ma_state_info_write(info->s, 1|4);
+        res= _ma_state_info_write(info->s,
+                                  MA_STATE_INFO_WRITE_DONT_MOVE_OFFSET|
+                                  MA_STATE_INFO_WRITE_LOCK);
         DBUG_PRINT("maria_flush_states",
                    ("is_of_horizon: LSN (%lu,0x%lx)",
                     LSN_IN_PARTS(info->s->state.is_of_horizon)));
@@ -651,6 +653,14 @@ pthread_handler_t ma_checkpoint_backgrou
             We use FLUSH_KEEP_LAZY: if a file is already in flush, it's
             smarter to move to the next file than wait for this one to be
             completely flushed, which may take long.
+            StaleFilePointersInFlush: notice how below we use "dfile" which
+            is an OS file descriptor plus some function and MARIA_SHARE
+            pointers; this data dates from a previous checkpoint; since then,
+            the table may have been closed (so MARIA_SHARE* became stale), and
+            the file descriptor reassigned to another table which does not
+            have the same CRC-read-set callbacks: it is thus important that
+            flush_pagecache_blocks_with_filter() does not use the pointers,
+            only the OS file descriptor.
           */
           int res=
             flush_pagecache_blocks_with_filter(maria_pagecache,
@@ -1047,7 +1057,8 @@ static int collect_tables(LEX_STRING *st
         if (kfile.file >= 0)
           sync_error|=
             _ma_state_info_write_sub(share, kfile.file,
-                                     &state_copy->state, 1);
+                                     &state_copy->state,
+                                     MA_STATE_INFO_WRITE_DONT_MOVE_OFFSET);
         /*
           We don't set share->changed=0 because it may interfere with a
           concurrent _ma_writeinfo() doing share->changed=1 (cancel its

=== modified file 'storage/maria/ma_close.c'
--- a/storage/maria/ma_close.c	2009-01-28 11:08:55 +0000
+++ b/storage/maria/ma_close.c	2009-02-13 16:30:54 +0000
@@ -107,7 +107,7 @@ int maria_close(register MARIA_HA *info)
           State must be written to file as it was not done at table's
           unlocking.
         */
-        if (_ma_state_info_write(share, 1))
+        if (_ma_state_info_write(share, MA_STATE_INFO_WRITE_DONT_MOVE_OFFSET))
           error= my_errno;
       }
       if (share->MA_LOG_OPEN_stored_in_physical_log)
@@ -165,7 +165,7 @@ int maria_close(register MARIA_HA *info)
       MARIA_STATE_HISTORY_CLOSED *history;
       /*
         Here we ignore the unlikely case that we don't have memory to
-        store the case. In the worst case what happens is that any transaction
+        store the state. In the worst case what happens is that any transaction
         that tries to access this table will get a wrong status information.
       */
       if ((history= (MARIA_STATE_HISTORY_CLOSED *)
@@ -176,6 +176,8 @@ int maria_close(register MARIA_HA *info)
         if (my_hash_insert(&maria_stored_state, (uchar*) history))
           my_free(history, MYF(0));
       }
+      /* Marker for concurrent checkpoint */
+      share->state_history= 0;
     }
   }
   pthread_mutex_unlock(&THR_LOCK_maria);

=== modified file 'storage/maria/ma_commit.c'
--- a/storage/maria/ma_commit.c	2008-12-05 21:11:46 +0000
+++ b/storage/maria/ma_commit.c	2009-01-15 21:27:36 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007 MySQL AB
+/* Copyright (C) 2007-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.
 
    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
@@ -17,7 +17,7 @@
 #include "trnman.h"
 
 /**
-   @brief writes a COMMIT record to log and commits transaction in memory
+   writes a COMMIT record to log and commits transaction in memory
 
    @param  trn              transaction
 
@@ -82,7 +82,7 @@ int ma_commit(TRN *trn)
 
 
 /**
-   @brief Writes a COMMIT record for a transaciton associated with a file
+   Writes a COMMIT record for a transaciton associated with a file
 
    @param  info              Maria handler
 
@@ -98,13 +98,17 @@ int maria_commit(MARIA_HA *info)
 
 
 /**
-   @brief Starts a transaction on a file handle
+   Starts a transaction on a file handle
 
    @param  info              Maria handler
 
    @return Operation status
      @retval 0      ok
      @retval #      Error code.
+
+   @note this can be used only in single-threaded programs (tests),
+   because we create a transaction (trnman_new_trn) with WT_THD=0.
+   XXX it needs to be fixed when we'll start using maria_begin from SQL.
 */
 
 int maria_begin(MARIA_HA *info)

=== modified file 'storage/maria/ma_create.c'
--- a/storage/maria/ma_create.c	2009-02-13 12:40:13 +0000
+++ b/storage/maria/ma_create.c	2009-02-13 16:30:54 +0000
@@ -653,7 +653,8 @@ int maria_create(const char *name, enum 
   /* There are only 16 bits for the total header length. */
   if (info_length > 65535)
   {
-    my_printf_error(0, "Maria table '%s' has too many columns and/or "
+    my_printf_error(HA_WRONG_CREATE_OPTION,
+                    "Maria table '%s' has too many columns and/or "
                     "indexes and/or unique constraints.",
                     MYF(0), name + dirname_length(name));
     my_errno= HA_WRONG_CREATE_OPTION;
@@ -751,6 +752,13 @@ int maria_create(const char *name, enum 
       (via maria_recreate_table()) and it does not have a log.
     */
     sync_dir= MY_SYNC_DIR;
+    /*
+      If crash between _ma_state_info_write_sub() and
+      _ma_update_state__lsns_sub(), table should be ignored by Recovery (or
+      old REDOs would fail), so we cannot let LSNs be 0:
+    */
+    share.state.skip_redo_lsn= share.state.is_of_horizon=
+      share.state.create_rename_lsn= LSN_MAX;
   }
 
   if (datafile_type == DYNAMIC_RECORD)
@@ -859,7 +867,8 @@ int maria_create(const char *name, enum 
   errpos=1;
 
   DBUG_PRINT("info", ("write state info and base info"));
-  if (_ma_state_info_write_sub(&share, file, &share.state, 2) ||
+  if (_ma_state_info_write_sub(&share, file, &share.state,
+                               MA_STATE_INFO_WRITE_FULL_INFO) ||
       _ma_base_info_write(file, &share.base))
     goto err;
   DBUG_PRINT("info", ("base_pos: %d  base_info_size: %d",
@@ -1072,11 +1081,21 @@ int maria_create(const char *name, enum 
                                        log_array, NULL, NULL) ||
                  translog_flush(lsn)))
       goto err;
+    share.kfile.file= file;
+    DBUG_EXECUTE_IF("maria_flush_whole_log",
+                    {
+                      DBUG_PRINT("maria_flush_whole_log", ("now"));
+                      translog_flush(translog_get_horizon());
+                    });
+    DBUG_EXECUTE_IF("maria_crash_create_table",
+                    {
+                      DBUG_PRINT("maria_crash_create_table", ("now"));
+                      DBUG_ABORT();
+                    });
     /*
       store LSN into file, needed for Recovery to not be confused if a
       DROP+CREATE happened (applying REDOs to the wrong table).
     */
-    share.kfile.file= file;
     if (_ma_update_state_lsns_sub(&share, lsn, trnman_get_min_safe_trid(),
                                   FALSE, TRUE))
       goto err;

=== modified file 'storage/maria/ma_dbug.c'
--- a/storage/maria/ma_dbug.c	2008-08-25 18:23:18 +0000
+++ b/storage/maria/ma_dbug.c	2009-02-13 16:30:54 +0000
@@ -180,6 +180,7 @@ my_bool _ma_check_table_is_closed(const 
   DBUG_ENTER("_ma_check_table_is_closed");
 
   (void) fn_format(filename,name,"",MARIA_NAME_IEXT,4+16+32);
+  pthread_mutex_lock(&THR_LOCK_maria);
   for (pos=maria_open_list ; pos ; pos=pos->next)
   {
     MARIA_HA *info=(MARIA_HA*) pos->data;
@@ -190,10 +191,12 @@ my_bool _ma_check_table_is_closed(const 
       {
 	fprintf(stderr,"Warning:  Table: %s is open on %s\n", name,where);
 	DBUG_PRINT("warning",("Table: %s is open on %s", name,where));
+        pthread_mutex_unlock(&THR_LOCK_maria);
 	DBUG_RETURN(1);
       }
     }
   }
+  pthread_mutex_unlock(&THR_LOCK_maria);
   DBUG_RETURN(0);
 }
 #endif /* EXTRA_DEBUG */

=== modified file 'storage/maria/ma_delete_all.c'
--- a/storage/maria/ma_delete_all.c	2009-02-10 14:51:40 +0000
+++ b/storage/maria/ma_delete_all.c	2009-02-13 16:30:54 +0000
@@ -121,8 +121,16 @@ int maria_delete_all_rows(MARIA_HA *info
       but redo_insert are skipped (dirty pages list is empty).
       To avoid this, we need to set skip_redo_lsn now, and thus need to sync
       files.
+      Also fixes the problem of:
+      bulk insert; insert; delete_all; crash:
+      "bulk insert" is skipped (no REDOs), so if "insert" would not be skipped
+      (if we didn't update skip_redo_lsn below) then "insert" would be tried
+      and fail, saying that it sees that the first page has to be created
+      though the inserted row has rownr>0.
     */
-    my_bool error= _ma_state_info_write(share, 1|4) ||
+    my_bool error= _ma_state_info_write(share,
+                                        MA_STATE_INFO_WRITE_DONT_MOVE_OFFSET |
+                                        MA_STATE_INFO_WRITE_LOCK) ||
       _ma_update_state_lsns(share, lsn, trnman_get_min_trid(), FALSE, FALSE) ||
       _ma_sync_table_files(info);
     info->trn->rec_lsn= LSN_IMPOSSIBLE;

=== modified file 'storage/maria/ma_delete_table.c'
--- a/storage/maria/ma_delete_table.c	2008-08-06 14:03:27 +0000
+++ b/storage/maria/ma_delete_table.c	2008-12-22 00:17:37 +0000
@@ -69,11 +69,6 @@ int maria_delete_table(const char *name)
       MY_SYNC_DIR : 0;
     maria_close(info);
   }
-#ifdef USE_RAID
-#ifdef EXTRA_DEBUG
-  _ma_check_table_is_closed(name,"delete");
-#endif
-#endif /* USE_RAID */
 
   if (sync_dir)
   {

=== modified file 'storage/maria/ma_extra.c'
--- a/storage/maria/ma_extra.c	2009-01-28 11:08:55 +0000
+++ b/storage/maria/ma_extra.c	2009-02-13 16:30:54 +0000
@@ -289,7 +289,9 @@ int maria_extra(MARIA_HA *info, enum ha_
         for the posterity is by writing it to disk.
       */
       DBUG_ASSERT(!maria_in_recovery);
-      error= _ma_state_info_write(share, 1|2);
+      error= _ma_state_info_write(share,
+                                  MA_STATE_INFO_WRITE_DONT_MOVE_OFFSET |
+                                  MA_STATE_INFO_WRITE_FULL_INFO);
     }
     pthread_mutex_unlock(&share->intern_lock);
     break;
@@ -307,7 +309,9 @@ int maria_extra(MARIA_HA *info, enum ha_
     if (!error && share->changed)
     {
       pthread_mutex_lock(&share->intern_lock);
-      if (!(error= _ma_state_info_write(share, 1|2)))
+      if (!(error= _ma_state_info_write(share,
+                                        MA_STATE_INFO_WRITE_DONT_MOVE_OFFSET|
+                                        MA_STATE_INFO_WRITE_FULL_INFO)))
         share->changed= 0;
       pthread_mutex_unlock(&share->intern_lock);
     }
@@ -365,7 +369,10 @@ int maria_extra(MARIA_HA *info, enum ha_
       if (do_flush)
       {
         /* Save the state so that others can find it from disk. */
-        if ((share->changed && _ma_state_info_write(share, 1 | 2)) ||
+        if ((share->changed &&
+             _ma_state_info_write(share,
+                                  MA_STATE_INFO_WRITE_DONT_MOVE_OFFSET |
+                                  MA_STATE_INFO_WRITE_FULL_INFO)) ||
             my_sync(share->kfile.file, MYF(0)))
           error= my_errno;
         else
@@ -624,7 +631,11 @@ int _ma_flush_table_files(MARIA_HA *info
           error= 1;
       }
       else
-        info->s->bitmap.changed= 0;
+      {
+        pthread_mutex_lock(&share->bitmap.bitmap_lock);
+        share->bitmap.changed= 0;
+        pthread_mutex_unlock(&share->bitmap.bitmap_lock);
+      }
       if (flush_pagecache_blocks(share->pagecache, &info->dfile,
                                  flush_type_for_data))
         error= 1;

=== modified file 'storage/maria/ma_ft_boolean_search.c'
--- a/storage/maria/ma_ft_boolean_search.c	2008-06-26 05:18:28 +0000
+++ b/storage/maria/ma_ft_boolean_search.c	2009-02-12 17:51:00 +0000
@@ -161,11 +161,11 @@ static int FTB_WORD_cmp(my_off_t *v, FTB
 
 static int FTB_WORD_cmp_list(CHARSET_INFO *cs, FTB_WORD **a, FTB_WORD **b)
 {
-  /* ORDER BY word DESC, ndepth DESC */
-  int i= ha_compare_text(cs, (uchar*) (*b)->word+1,(*b)->len-1,
-                             (uchar*) (*a)->word+1,(*a)->len-1,0,0);
+  /* ORDER BY word, ndepth */
+  int i= ha_compare_text(cs, (uchar*) (*a)->word + 1,(*a)->len - 1,
+                             (uchar*) (*b)->word + 1,(*b)->len - 1, 0, 0);
   if (!i)
-    i=CMP_NUM((*b)->ndepth,(*a)->ndepth);
+    i=CMP_NUM((*a)->ndepth, (*b)->ndepth);
   return i;
 }
 
@@ -879,23 +879,49 @@ static int ftb_find_relevance_add_word(M
   FT_INFO *ftb= ftb_param->ftb;
   FTB_WORD *ftbw;
   int a, b, c;
+  /*
+    Find right-most element in the array of query words matching this
+    word from a document.
+  */
   for (a= 0, b= ftb->queue.elements, c= (a+b)/2; b-a>1; c= (a+b)/2)
   {
     ftbw= ftb->list[c];
     if (ha_compare_text(ftb->charset, (uchar*)word, len,
                         (uchar*)ftbw->word+1, ftbw->len-1,
-                        (my_bool)(ftbw->flags&FTB_FLAG_TRUNC), 0) > 0)
+                        (my_bool)(ftbw->flags&FTB_FLAG_TRUNC), 0) < 0)
       b= c;
     else
       a= c;
   }
+  /*
+    If there were no words with truncation operator, we iterate to the
+    beginning of an array until array element is equal to the word from
+    a document. This is done mainly because the same word may be
+    mentioned twice (or more) in the query.
+
+    In case query has words with truncation operator we must iterate
+    to the beginning of the array. There may be non-matching query words
+    between matching word with truncation operator and the right-most
+    matching element. E.g., if we're looking for 'aaa15' in an array of
+    'aaa1* aaa14 aaa15 aaa16'.
+
+    Worse of that there still may be match even if the binary search
+    above didn't find matching element. E.g., if we're looking for
+    'aaa15' in an array of 'aaa1* aaa14 aaa16'. The binary search will
+    stop at 'aaa16'.
+  */
   for (; c >= 0; c--)
   {
     ftbw= ftb->list[c];
     if (ha_compare_text(ftb->charset, (uchar*)word, len,
                         (uchar*)ftbw->word + 1,ftbw->len - 1,
                         (my_bool)(ftbw->flags & FTB_FLAG_TRUNC), 0))
-      break;
+    {
+      if (ftb->with_scan & FTB_FLAG_TRUNC)
+        continue;
+      else
+        break;
+    }
     if (ftbw->docid[1] == ftb->info->cur_row.lastpos)
       continue;
     ftbw->docid[1]= ftb->info->cur_row.lastpos;

=== modified file 'storage/maria/ma_ft_parser.c'
--- a/storage/maria/ma_ft_parser.c	2008-06-24 14:14:56 +0000
+++ b/storage/maria/ma_ft_parser.c	2009-02-12 17:51:00 +0000
@@ -326,59 +326,39 @@ int maria_ft_parse(TREE *wtree, uchar *d
 
 
 #define MAX_PARAM_NR 2
-MYSQL_FTPARSER_PARAM *maria_ftparser_call_initializer(MARIA_HA *info,
-                                                      uint keynr, uint paramnr)
+
+MYSQL_FTPARSER_PARAM* maria_ftparser_alloc_param(MARIA_HA *info)
 {
-  uint32 ftparser_nr;
-  struct st_mysql_ftparser *parser;
-  if (! info->ftparser_param)
+  if (!info->ftparser_param)
   {
-    /* info->ftparser_param can not be zero after the initialization,
-       because it always includes built-in fulltext parser. And built-in
-       parser can be called even if the table has no fulltext indexes and
-       no varchar/text fields. */
-    if (! info->s->ftparsers)
-    {
-      /* It's ok that modification to shared structure is done w/o mutex
-         locks, because all threads would set the same variables to the
-         same values. */
-      uint i, j, keys= info->s->state.header.keys, ftparsers= 1;
-      for (i= 0; i < keys; i++)
-      {
-        MARIA_KEYDEF *keyinfo= &info->s->keyinfo[i];
-        if (keyinfo->flag & HA_FULLTEXT)
-        {
-          for (j= 0;; j++)
-          {
-            if (j == i)
-            {
-              keyinfo->ftparser_nr= ftparsers++;
-              break;
-            }
-            if (info->s->keyinfo[j].flag & HA_FULLTEXT &&
-                keyinfo->parser == info->s->keyinfo[j].parser)
-            {
-              keyinfo->ftparser_nr= info->s->keyinfo[j].ftparser_nr;
-              break;
-            }
-          }
-        }
-      }
-      info->s->ftparsers= ftparsers;
-    }
-    /*
-      We have to allocate two MYSQL_FTPARSER_PARAM structures per plugin
-      because in a boolean search a parser is called recursively
-      ftb_find_relevance* calls ftb_check_phrase*
-      (MAX_PARAM_NR=2)
+    /* 
+.     info->ftparser_param can not be zero after the initialization,
+      because it always includes built-in fulltext parser. And built-in
+      parser can be called even if the table has no fulltext indexes and
+      no varchar/text fields.
+
+      ftb_find_relevance... parser (ftb_find_relevance_parse,
+      ftb_find_relevance_add_word) calls ftb_check_phrase... parser
+      (ftb_check_phrase_internal, ftb_phrase_add_word). Thus MAX_PARAM_NR=2.
     */
     info->ftparser_param= (MYSQL_FTPARSER_PARAM *)
       my_malloc(MAX_PARAM_NR * sizeof(MYSQL_FTPARSER_PARAM) *
-                info->s->ftparsers, MYF(MY_WME|MY_ZEROFILL));
+                info->s->ftkeys, MYF(MY_WME | MY_ZEROFILL));
     init_alloc_root(&info->ft_memroot, FTPARSER_MEMROOT_ALLOC_SIZE, 0);
-    if (! info->ftparser_param)
-      return 0;
   }
+  return info->ftparser_param;
+}
+
+
+MYSQL_FTPARSER_PARAM *maria_ftparser_call_initializer(MARIA_HA *info,
+                                                      uint keynr, uint paramnr)
+{
+  uint32 ftparser_nr;
+  struct st_mysql_ftparser *parser;
+  
+  if (!maria_ftparser_alloc_param(info))
+    return 0;
+
   if (keynr == NO_SUCH_KEY)
   {
     ftparser_nr= 0;
@@ -386,7 +366,7 @@ MYSQL_FTPARSER_PARAM *maria_ftparser_cal
   }
   else
   {
-    ftparser_nr= info->s->keyinfo[keynr].ftparser_nr;
+    ftparser_nr= info->s->keyinfo[keynr].ftkey_nr;
     parser= info->s->keyinfo[keynr].parser;
   }
   DBUG_ASSERT(paramnr < MAX_PARAM_NR);
@@ -419,7 +399,7 @@ void maria_ftparser_call_deinitializer(M
     for (j=0; j < MAX_PARAM_NR; j++)
     {
       MYSQL_FTPARSER_PARAM *ftparser_param=
-        &info->ftparser_param[keyinfo->ftparser_nr*MAX_PARAM_NR + j];
+        &info->ftparser_param[keyinfo->ftkey_nr*MAX_PARAM_NR + j];
       if (keyinfo->flag & HA_FULLTEXT && ftparser_param->mysql_add_word)
       {
         if (keyinfo->parser->deinit)

=== modified file 'storage/maria/ma_ftdefs.h'
--- a/storage/maria/ma_ftdefs.h	2008-06-26 05:18:28 +0000
+++ b/storage/maria/ma_ftdefs.h	2009-02-12 17:51:00 +0000
@@ -147,6 +147,7 @@ void maria_ft_boolean_close_search(FT_IN
 float maria_ft_boolean_get_relevance(FT_INFO *);
 my_off_t maria_ft_boolean_get_docid(FT_INFO *);
 void maria_ft_boolean_reinit_search(FT_INFO *);
+MYSQL_FTPARSER_PARAM* maria_ftparser_alloc_param(MARIA_HA *info);
 extern MYSQL_FTPARSER_PARAM *maria_ftparser_call_initializer(MARIA_HA *info,
                                                              uint keynr,
                                                              uint paramnr);

=== modified file 'storage/maria/ma_key_recover.c'
--- a/storage/maria/ma_key_recover.c	2008-10-14 15:18:14 +0000
+++ b/storage/maria/ma_key_recover.c	2009-01-08 08:20:04 +0000
@@ -123,12 +123,23 @@ my_bool _ma_write_clr(MARIA_HA *info, LS
   log_array[TRANSLOG_INTERNAL_PARTS + 0].str=    log_data;
   log_array[TRANSLOG_INTERNAL_PARTS + 0].length= (uint) (log_pos - log_data);
 
+
+  /*
+    We need intern_lock mutex for calling _ma_state_info_write in the trigger.
+    We do it here to have the same sequence of mutexes locking everywhere
+    (first intern_lock then transactional log  buffer lock)
+  */
+  if (undo_type == LOGREC_UNDO_BULK_INSERT)
+    pthread_mutex_lock(&info->s->intern_lock);
+
   res= translog_write_record(res_lsn, LOGREC_CLR_END,
                              info->trn, info,
                              (translog_size_t)
                              log_array[TRANSLOG_INTERNAL_PARTS + 0].length,
                              TRANSLOG_INTERNAL_PARTS + 1, log_array,
                              log_data + LSN_STORE_SIZE, &msg);
+  if (undo_type == LOGREC_UNDO_BULK_INSERT)
+    pthread_mutex_unlock(&info->s->intern_lock);
   DBUG_RETURN(res);
 }
 
@@ -149,6 +160,7 @@ my_bool write_hook_for_clr_end(enum tran
   struct st_msg_to_write_hook_for_clr_end *msg=
     (struct st_msg_to_write_hook_for_clr_end *)hook_arg;
   my_bool error= FALSE;
+  DBUG_ENTER("write_hook_for_clr_end");
   DBUG_ASSERT(trn->trid != 0);
   trn->undo_lsn= msg->previous_undo_lsn;
 
@@ -177,9 +189,12 @@ my_bool write_hook_for_clr_end(enum tran
   case LOGREC_UNDO_KEY_DELETE:
     break;
   case LOGREC_UNDO_BULK_INSERT:
+    safe_mutex_assert_owner(&share->intern_lock);
     error= (maria_enable_indexes(tbl_info) ||
             /* we enabled indices, need '2' below */
-            _ma_state_info_write(share, 1|2|4));
+            _ma_state_info_write(share,
+                                 MA_STATE_INFO_WRITE_DONT_MOVE_OFFSET |
+                                 MA_STATE_INFO_WRITE_FULL_INFO));
     /* no need for _ma_reset_status(): REDO_DELETE_ALL is just before us */
     break;
   default:
@@ -187,7 +202,7 @@ my_bool write_hook_for_clr_end(enum tran
   }
   if (trn->undo_lsn == LSN_IMPOSSIBLE) /* has fully rolled back */
     trn->first_undo_lsn= LSN_WITH_FLAGS_TO_FLAGS(trn->first_undo_lsn);
-  return error;
+  DBUG_RETURN(error);
 }
 
 

=== modified file 'storage/maria/ma_locking.c'
--- a/storage/maria/ma_locking.c	2009-01-28 11:08:55 +0000
+++ b/storage/maria/ma_locking.c	2009-02-13 16:30:54 +0000
@@ -294,7 +294,8 @@ int _ma_writeinfo(register MARIA_HA *inf
 #endif
 
       if ((error= _ma_state_info_write_sub(share, share->kfile.file,
-                                           &share->state, 1)))
+                                           &share->state,
+                                           MA_STATE_INFO_WRITE_DONT_MOVE_OFFSET)))
 	olderror=my_errno;
 #ifdef _WIN32
       if (maria_flush)
@@ -362,9 +363,15 @@ int _ma_mark_file_changed(MARIA_HA *info
 {
   uchar buff[3];
   register MARIA_SHARE *share= info->s;
+  int error= 1;
   DBUG_ENTER("_ma_mark_file_changed");
 
-  if (!(share->state.changed & STATE_CHANGED) || ! share->global_changed)
+#define _MA_ALREADY_MARKED_FILE_CHANGED                                 \
+  ((share->state.changed & STATE_CHANGED) && share->global_changed)
+  if (_MA_ALREADY_MARKED_FILE_CHANGED)
+    DBUG_RETURN(0);
+  pthread_mutex_lock(&share->intern_lock); /* recheck under mutex */
+  if (! _MA_ALREADY_MARKED_FILE_CHANGED)
   {
     share->state.changed|=(STATE_CHANGED | STATE_NOT_ANALYZED |
 			   STATE_NOT_OPTIMIZED_KEYS);
@@ -395,7 +402,7 @@ int _ma_mark_file_changed(MARIA_HA *info
                     sizeof(share->state.header) +
                     MARIA_FILE_OPEN_COUNT_OFFSET,
                     MYF(MY_NABP)))
-        DBUG_RETURN(1);
+        goto err;
     }
     /* Set uuid of file if not yet set (zerofilled file) */
     if (share->base.born_transactional &&
@@ -407,11 +414,15 @@ int _ma_mark_file_changed(MARIA_HA *info
            _ma_update_state_lsns_sub(share, LSN_IMPOSSIBLE,
                                      trnman_get_min_trid(),
                                      TRUE, TRUE)))
-        DBUG_RETURN(1);
+        goto err;
       share->state.changed|= STATE_NOT_MOVABLE;
     }
   }
-  DBUG_RETURN(0);
+  error= 0;
+err:
+  pthread_mutex_unlock(&share->intern_lock);
+  DBUG_RETURN(error);
+#undef _MA_ALREADY_MARKED_FILE_CHANGED
 }
 
 /*
@@ -568,7 +579,8 @@ int ma_remap_file_and_write_state_for_un
 #endif
   if (!share->base.born_transactional || force)
   {
-    if (_ma_state_info_write_sub(share, share->kfile.file, &share->state, 1))
+    if (_ma_state_info_write_sub(share, share->kfile.file, &share->state,
+                                 MA_STATE_INFO_WRITE_DONT_MOVE_OFFSET))
       error=my_errno;
     else
     {

=== modified file 'storage/maria/ma_loghandler.c'
--- a/storage/maria/ma_loghandler.c	2009-01-28 11:08:55 +0000
+++ b/storage/maria/ma_loghandler.c	2009-02-13 16:30:54 +0000
@@ -686,6 +686,10 @@ static LOG_DESC INIT_LOGREC_IMPORTED_TAB
 {LOGRECTYPE_VARIABLE_LENGTH, 0, 0, NULL, NULL, NULL, 0,
  "imported_table", LOGREC_IS_GROUP_ITSELF, NULL, NULL};
 
+static LOG_DESC INIT_LOGREC_DEBUG_INFO=
+{LOGRECTYPE_VARIABLE_LENGTH, 0, 0, NULL, NULL, NULL, 0,
+ "info", LOGREC_IS_GROUP_ITSELF, NULL, NULL};
+
 const myf log_write_flags= MY_WME | MY_NABP | MY_WAIT_IF_FULL;
 
 void translog_table_init()
@@ -775,6 +779,9 @@ void translog_table_init()
     INIT_LOGREC_REDO_BITMAP_NEW_PAGE;
   log_record_type_descriptor[LOGREC_IMPORTED_TABLE]=
     INIT_LOGREC_IMPORTED_TABLE;
+  log_record_type_descriptor[LOGREC_DEBUG_INFO]=
+    INIT_LOGREC_DEBUG_INFO;
+
   for (i= LOGREC_FIRST_FREE; i < LOGREC_NUMBER_OF_TYPES; i++)
     log_record_type_descriptor[i].rclass= LOGRECTYPE_NOT_ALLOWED;
 #ifndef DBUG_OFF
@@ -7421,6 +7428,10 @@ static void translog_force_current_buffe
   log_descriptor.bc.buffer->offset= new_buff_beginning;
   log_descriptor.bc.write_counter= write_counter;
   log_descriptor.bc.previous_offset= previous_offset;
+  new_buffer->prev_last_lsn= BUFFER_MAX_LSN(old_buffer);
+  DBUG_PRINT("info", ("prev_last_lsn set to (%lu,0x%lx)  buffer: 0x%lx",
+                      LSN_IN_PARTS(new_buffer->prev_last_lsn),
+                      (ulong) new_buffer));
 
   /*
     Advances this log pointer, increases writers and let other threads to
@@ -8302,6 +8313,46 @@ void translog_set_file_size(uint32 size)
   DBUG_VOID_RETURN;
 }
 
+
+/**
+   Write debug information to log if we EXTRA_DEBUG is enabled
+*/
+
+my_bool translog_log_debug_info(TRN *trn __attribute__((unused)),
+                                enum translog_debug_info_type type
+                                __attribute__((unused)),
+                                uchar *info __attribute__((unused)),
+                                size_t length __attribute__((unused)))
+{
+#ifdef EXTRA_DEBUG
+  LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 2];
+  uchar debug_type;
+  LSN lsn;
+
+  if (!trn)
+  {
+    /*
+      We can't log the current transaction because we don't have
+      an active transaction. Use a temporary transaction object instead
+    */
+    trn= &dummy_transaction_object;
+  }
+  debug_type= (uchar) type;
+  log_array[TRANSLOG_INTERNAL_PARTS + 0].str= &debug_type;
+  log_array[TRANSLOG_INTERNAL_PARTS + 0].length= 1;
+  log_array[TRANSLOG_INTERNAL_PARTS + 1].str= info;
+  log_array[TRANSLOG_INTERNAL_PARTS + 1].length= length;
+  return translog_write_record(&lsn, LOGREC_DEBUG_INFO,
+                               trn, NULL,
+                               (translog_size_t) (1+ length),
+                               sizeof(log_array)/sizeof(log_array[0]),
+                               log_array, NULL, NULL);
+#else
+  return 0;
+#endif
+}
+
+
 #ifdef MARIA_DUMP_LOG
 #include <my_getopt.h>
 extern void translog_example_table_init();

=== modified file 'storage/maria/ma_loghandler.h'
--- a/storage/maria/ma_loghandler.h	2008-07-09 09:02:27 +0000
+++ b/storage/maria/ma_loghandler.h	2009-01-15 22:25:53 +0000
@@ -144,6 +144,7 @@ enum translog_record_type
   LOGREC_UNDO_BULK_INSERT,
   LOGREC_REDO_BITMAP_NEW_PAGE,
   LOGREC_IMPORTED_TABLE,
+  LOGREC_DEBUG_INFO,
   LOGREC_FIRST_FREE,
   LOGREC_RESERVED_FUTURE_EXTENSION= 63
 };
@@ -167,6 +168,12 @@ enum en_key_op
   KEY_OP_COMPACT_PAGE   /* Compact key page */
 };
 
+
+enum translog_debug_info_type
+{
+  LOGREC_DEBUG_INFO_QUERY
+};
+
 /* Size of log file; One log file is restricted to 4G */
 typedef uint32 translog_size_t;
 
@@ -323,6 +330,9 @@ translog_assign_id_to_share_from_recover
 extern my_bool translog_walk_filenames(const char *directory,
                                        my_bool (*callback)(const char *,
                                                            const char *));
+extern my_bool translog_log_debug_info(TRN *trn,
+                                       enum translog_debug_info_type type,
+                                       uchar *info, size_t length);
 
 enum enum_translog_status
 {

=== modified file 'storage/maria/ma_open.c'
--- a/storage/maria/ma_open.c	2009-02-13 12:40:13 +0000
+++ b/storage/maria/ma_open.c	2009-02-13 16:30:54 +0000
@@ -561,6 +561,7 @@ MARIA_HA *maria_open(const char *name, i
     share->block_size= share->base.block_size;   /* Convenience */
     {
       HA_KEYSEG *pos=share->keyparts;
+      uint32 ftkey_nr= 1;
       for (i=0 ; i < keys ; i++)
       {
         share->keyinfo[i].share= share;
@@ -633,6 +634,7 @@ MARIA_HA *maria_open(const char *name, i
             share->ft2_keyinfo.end=pos;
             setup_key_functions(& share->ft2_keyinfo);
           }
+          share->keyinfo[i].ftkey_nr= ftkey_nr++;
 	}
         setup_key_functions(share->keyinfo+i);
 	share->keyinfo[i].end=pos;
@@ -670,7 +672,7 @@ MARIA_HA *maria_open(const char *name, i
 	pos->flag=0;
 	pos++;
       }
-      share->ftparsers= 0;
+      share->ftkeys= ftkey_nr;
     }
     share->data_file_type= share->state.header.data_file_type;
     share->base_length= (BASE_ROW_HEADER_SIZE +
@@ -1208,11 +1210,13 @@ static void setup_key_functions(register
    Then calls _ma_state_info_write_sub().
 
    @param  share           table
-   @param  pWrite          bitmap: if 1 is set my_pwrite() is used otherwise
-                           my_write(); if 2 is set, info about keys is written
-                           (should only be needed after ALTER TABLE
-                           ENABLE/DISABLE KEYS, and REPAIR/OPTIMIZE); if 4 is
-                           set, MARIA_SHARE::intern_lock is taken.
+   @param  pWrite          bitmap: if 1 (MA_STATE_INFO_WRITE_DONT_MOVE_OFFSET)
+                           is set my_pwrite() is used otherwise my_write();
+                           if 2 (MA_STATE_INFO_WRITE_FULL_INFO) is set, info
+                           about keys is written (should only be needed
+                           after ALTER TABLE ENABLE/DISABLE KEYS, and
+                           REPAIR/OPTIMIZE); if 4 (MA_STATE_INFO_WRITE_LOCK)
+                           is set, MARIA_SHARE::intern_lock is taken.
 
    @return Operation status
      @retval 0      OK
@@ -1225,7 +1229,7 @@ uint _ma_state_info_write(MARIA_SHARE *s
   if (share->options & HA_OPTION_READ_ONLY_DATA)
     return 0;
 
-  if (pWrite & 4)
+  if (pWrite & MA_STATE_INFO_WRITE_LOCK)
     pthread_mutex_lock(&share->intern_lock);
   else if (maria_multi_threaded)
   {
@@ -1244,7 +1248,7 @@ uint _ma_state_info_write(MARIA_SHARE *s
                         LSN_IN_PARTS(share->state.is_of_horizon)));
   }
   res= _ma_state_info_write_sub(share, share->kfile.file, &share->state, pWrite);
-  if (pWrite & 4)
+  if (pWrite & MA_STATE_INFO_WRITE_LOCK)
     pthread_mutex_unlock(&share->intern_lock);
   share->changed= 0;
   return res;
@@ -1259,10 +1263,12 @@ uint _ma_state_info_write(MARIA_SHARE *s
    @param  share           table's share
    @param  file            descriptor of the index file to write
    @param  state           state information to write to the file
-   @param  pWrite          bitmap: if 1 is set my_pwrite() is used otherwise
-                           my_write(); if 2 is set, info about keys is written
-                           (should only be needed after ALTER TABLE
-                           ENABLE/DISABLE KEYS, and REPAIR/OPTIMIZE).
+   @param  pWrite          bitmap: if 1 (MA_STATE_INFO_WRITE_DONT_MOVE_OFFSET)
+                           is set my_pwrite() is used otherwise my_write();
+                           if 2 (MA_STATE_INFO_WRITE_FULL_INFO) is set, info
+                           about keys is written (should only be needed
+                           after ALTER TABLE ENABLE/DISABLE KEYS, and
+                           REPAIR/OPTIMIZE).
 
    @notes
      For transactional multiuser tables, this function is called
@@ -1328,7 +1334,7 @@ uint _ma_state_info_write_sub(MARIA_SHAR
     mi_sizestore(ptr,state->key_root[i]);		ptr+= 8;
   }
   mi_sizestore(ptr,state->key_del);	        	ptr+= 8;
-  if (pWrite & 2)				/* From maria_chk */
+  if (pWrite & MA_STATE_INFO_WRITE_FULL_INFO)	/* From maria_chk */
   {
     uint key_parts= mi_uint2korr(state->header.key_parts);
     mi_int4store(ptr,state->sec_index_changed); 	ptr+= 4;
@@ -1348,7 +1354,7 @@ uint _ma_state_info_write_sub(MARIA_SHAR
     }
   }
 
-  res= (pWrite & 1) ?
+  res= (pWrite & MA_STATE_INFO_WRITE_DONT_MOVE_OFFSET) ?
     my_pwrite(file, buff, (size_t) (ptr-buff), 0L,
               MYF(MY_NABP | MY_THREADSAFE)) :
     my_write(file,  buff, (size_t) (ptr-buff),
@@ -1601,7 +1607,7 @@ uchar *_ma_keydef_read(uchar *ptr, MARIA
    keydef->underflow_block_length=keydef->block_length/3;
    keydef->version	= 0;			/* Not saved */
    keydef->parser       = &ft_default_parser;
-   keydef->ftparser_nr  = 0;
+   keydef->ftkey_nr     = 0;
    return ptr;
 }
 

=== modified file 'storage/maria/ma_pagecache.c'
--- a/storage/maria/ma_pagecache.c	2009-02-13 12:40:13 +0000
+++ b/storage/maria/ma_pagecache.c	2009-02-13 16:30:54 +0000
@@ -2979,7 +2979,11 @@ void pagecache_unlock_by_link(PAGECACHE 
     }
     if (lsn != LSN_IMPOSSIBLE)
       check_and_set_lsn(pagecache, lsn, block);
-    block->status&= ~PCBLOCK_ERROR;
+    /*
+      Reset error flag. Mark also that page is active; This may not have
+      been the case if there was an error reading the page
+    */
+    block->status= (block->status & ~PCBLOCK_ERROR) | PCBLOCK_READ;
   }
 
   /* if we lock for write we must link the block to changed blocks */
@@ -4228,11 +4232,11 @@ static int flush_cached_blocks(PAGECACHE
        @todo IO If page is contiguous with next page to flush, group flushes
        in one single my_pwrite().
     */
-    /*
+    /**
       It is important to use block->hash_link->file below and not 'file', as
-      the first one is right and the second may have different content (and
-      this matters for callbacks, bitmap pages and data pages have different
-      ones).
+      the first one is right and the second may have different out-of-date
+      content (see StaleFilePointersInFlush in ma_checkpoint.c).
+      @todo change argument of functions to be File.
     */
     error= pagecache_fwrite(pagecache, &block->hash_link->file,
                             block->buffer,

=== modified file 'storage/maria/ma_recovery.c'
--- a/storage/maria/ma_recovery.c	2009-02-13 12:40:13 +0000
+++ b/storage/maria/ma_recovery.c	2009-02-13 16:30:54 +0000
@@ -98,6 +98,7 @@ prototype_redo_exec_hook(UNDO_KEY_DELETE
 prototype_redo_exec_hook(UNDO_KEY_DELETE_WITH_ROOT);
 prototype_redo_exec_hook(COMMIT);
 prototype_redo_exec_hook(CLR_END);
+prototype_redo_exec_hook(DEBUG_INFO);
 prototype_undo_exec_hook(UNDO_ROW_INSERT);
 prototype_undo_exec_hook(UNDO_ROW_DELETE);
 prototype_undo_exec_hook(UNDO_ROW_UPDATE);
@@ -488,6 +489,11 @@ static void display_record_position(cons
          number ? "" : "   ", number, LSN_IN_PARTS(rec->lsn),
          rec->short_trid, log_desc->name, rec->type,
          (ulong)rec->record_length);
+  if (rec->type == LOGREC_DEBUG_INFO)
+  {
+    /* Print some extra information */
+    (*log_desc->record_execute_in_redo_phase)(rec);
+  }
 }
 
 
@@ -1412,6 +1418,9 @@ prototype_redo_exec_hook(REDO_INSERT_ROW
 {
   int error= 1;
   uchar *buff;
+  uint number_of_blobs, number_of_ranges;
+  pgcache_page_no_t first_page, last_page;
+  char llbuf1[22], llbuf2[22];
   MARIA_HA *info= get_MARIA_HA_from_REDO_record(rec);
   if (info == NULL)
     return 0;
@@ -1426,11 +1435,19 @@ prototype_redo_exec_hook(REDO_INSERT_ROW
   }
   buff= log_record_buffer.str;
   if (_ma_apply_redo_insert_row_blobs(info, current_group_end_lsn,
-                                      buff, rec->lsn))
-    goto end;
+                                      buff, rec->lsn, &number_of_blobs,
+                                      &number_of_ranges,
+                                      &first_page, &last_page))
+    goto end;
+  llstr(first_page, llbuf1);
+  llstr(last_page, llbuf2);
+  tprint(tracef, " %u blobs %u ranges, first page %s last %s",
+         number_of_blobs, number_of_ranges, llbuf1, llbuf2);
+
   error= 0;
 
 end:
+  tprint(tracef, " \n");
   return error;
 }
 
@@ -1993,6 +2010,37 @@ prototype_redo_exec_hook(CLR_END)
 
 
 /**
+   Hock to print debug information (like MySQL query)
+*/
+
+prototype_redo_exec_hook(DEBUG_INFO)
+{
+  uchar *data;
+  enum translog_debug_info_type debug_info;
+
+  enlarge_buffer(rec);
+  if (log_record_buffer.str == NULL ||
+      translog_read_record(rec->lsn, 0, rec->record_length,
+                           log_record_buffer.str, NULL) !=
+      rec->record_length)
+  {
+    eprint(tracef, "Failed to read record debug record");
+    return 1;
+  }
+  debug_info= (enum translog_debug_info_type) log_record_buffer.str[0];
+  data= log_record_buffer.str + 1;
+  switch (debug_info) {
+  case LOGREC_DEBUG_INFO_QUERY:
+    tprint(tracef, "Query: %s\n", (char*) data);
+    break;
+  default:
+    DBUG_ASSERT(0);
+  }
+  return 0;
+}
+
+
+/**
   In some cases we have to skip execution of an UNDO record during the UNDO
   phase.
 */
@@ -2350,6 +2398,7 @@ static int run_redo_phase(LSN lsn, enum 
   install_redo_exec_hook(UNDO_BULK_INSERT);
   install_undo_exec_hook(UNDO_BULK_INSERT);
   install_redo_exec_hook(IMPORTED_TABLE);
+  install_redo_exec_hook(DEBUG_INFO);
 
   current_group_end_lsn= LSN_IMPOSSIBLE;
 #ifndef DBUG_OFF
@@ -2760,7 +2809,8 @@ static void prepare_table_for_close(MARI
       cmp_translog_addr(share->lsn_of_file_id, horizon) < 0)
   {
     share->state.is_of_horizon= horizon;
-    _ma_state_info_write_sub(share, share->kfile.file, &share->state, 1);
+    _ma_state_info_write_sub(share, share->kfile.file, &share->state,
+                             MA_STATE_INFO_WRITE_DONT_MOVE_OFFSET);
   }
 
   /*
@@ -3276,7 +3326,10 @@ void _ma_tmp_disable_logging_for_table(M
 /**
    Re-enables logging for a table which had it temporarily disabled.
 
-   Only the thread which disabled logging is allowed to reenable it.
+   Only the thread which disabled logging is allowed to reenable it. Indeed,
+   re-enabling logging affects all open instances, one must have exclusive
+   access to the table to do that. In practice, the one which disables has
+   such access.
 
    @param  info            table
    @param  flush_pages     if function needs to flush pages first
@@ -3315,7 +3368,9 @@ my_bool _ma_reenable_logging_for_table(M
       */
       if (_ma_flush_table_files(info, MARIA_FLUSH_DATA | MARIA_FLUSH_INDEX,
                                 FLUSH_RELEASE, FLUSH_RELEASE) ||
-          _ma_state_info_write(share, 1|4) ||
+          _ma_state_info_write(share,
+                               MA_STATE_INFO_WRITE_DONT_MOVE_OFFSET |
+                               MA_STATE_INFO_WRITE_LOCK) ||
           _ma_sync_table_files(info))
         DBUG_RETURN(1);
     }
@@ -3392,6 +3447,7 @@ static void print_redo_phase_progress(TR
   }
 }
 
+
 #ifdef MARIA_EXTERNAL_LOCKING
 #error Marias Checkpoint and Recovery are really not ready for it
 #endif

=== modified file 'storage/maria/ma_rename.c'
--- a/storage/maria/ma_rename.c	2008-08-06 14:03:27 +0000
+++ b/storage/maria/ma_rename.c	2008-12-22 00:17:37 +0000
@@ -104,11 +104,6 @@ int maria_rename(const char *old_name, c
   }
 
   maria_close(info);
-#ifdef USE_RAID
-#ifdef EXTRA_DEBUG
-  _ma_check_table_is_closed(old_name,"rename raidcheck");
-#endif
-#endif /* USE_RAID */
 
   fn_format(from,old_name,"",MARIA_NAME_IEXT,MY_UNPACK_FILENAME|MY_APPEND_EXT);
   fn_format(to,new_name,"",MARIA_NAME_IEXT,MY_UNPACK_FILENAME|MY_APPEND_EXT);

=== modified file 'storage/maria/ma_rt_index.c'
--- a/storage/maria/ma_rt_index.c	2008-06-26 05:18:28 +0000
+++ b/storage/maria/ma_rt_index.c	2009-01-26 21:14:43 +0000
@@ -433,7 +433,7 @@ int maria_rtree_get_first(MARIA_HA *info
   info->maria_rtree_recursion_depth= -1;
   info->keyread_buff_used= 1;
 
-  return maria_rtree_get_req(info, &keyinfo[keynr], key_length, root, 0);
+  return maria_rtree_get_req(info, keyinfo, key_length, root, 0);
 }
 
 

=== modified file 'storage/maria/ma_state.c'
--- a/storage/maria/ma_state.c	2009-01-12 13:04:54 +0000
+++ b/storage/maria/ma_state.c	2009-02-13 16:30:54 +0000
@@ -91,18 +91,26 @@ my_bool _ma_setup_live_state(MARIA_HA *i
     It's enough to compare trids here (instead of calling
     tranman_can_read_from) as history->trid is a commit_trid
   */
-  while (trn->trid < history->trid)
+  while (trn->trid <= history->trid)
     history= history->next;
   pthread_mutex_unlock(&share->intern_lock);
   /* The current item can't be deleted as it's the first one visible for us */
   tables->state_start=  tables->state_current= history->state;
-  tables->state_current.changed= 0;
+  tables->state_current.changed= tables->state_current.no_transid= 0;
 
   DBUG_PRINT("info", ("records: %ld", (ulong) tables->state_start.records));
 
 end:
   info->state_start= &tables->state_start;
   info->state= &tables->state_current;
+
+  /*
+    Mark in transaction state if we are not using transid (versioning)
+    on rows. If not, then we will in _ma_trnman_end_trans_hook()
+    ensure that the state is visible for all at end of transaction
+  */
+  tables->state_current.no_transid|= !(info->row_flag & ROW_FLAG_TRANSID);
+
   DBUG_RETURN(0);
 }
 
@@ -406,51 +414,70 @@ my_bool _ma_trnman_end_trans_hook(TRN *t
       MARIA_STATE_HISTORY *history;
 
       pthread_mutex_lock(&share->intern_lock);
-      if (active_transactions && share->now_transactional &&
-          trnman_exists_active_transactions(share->state_history->trid,
-                                            trn->commit_trid, 1))
+
+      /* We only have to update history state if something changed */
+      if (tables->state_current.changed)
       {
-        /*
-          There exist transactions that are still using the current
-          share->state_history.  Create a new history item for this
-          commit and add it first in the state_history list. This
-          ensures that all history items are stored in the list in
-          decresing trid order.
-        */
-        if (!(history= my_malloc(sizeof(*history), MYF(MY_WME))))
+        if (tables->state_current.no_transid)
         {
-          /* purecov: begin inspected */
-          error= 1;
-          pthread_mutex_unlock(&share->intern_lock);
-          my_free(tables, MYF(0));
-          continue;
-          /* purecov: end */
+          /*
+            The change was done without using transid on rows (like in
+            bulk insert). In this case this thread is the only one
+            that is using the table and all rows will be visble
+            for all transactions.
+          */
+          _ma_reset_history(share);
+        }
+        else
+        {
+          if (active_transactions && share->now_transactional &&
+              trnman_exists_active_transactions(share->state_history->trid,
+                                                trn->commit_trid, 1))
+          {
+            /*
+              There exist transactions that are still using the current
+              share->state_history.  Create a new history item for this
+              commit and add it first in the state_history list. This
+              ensures that all history items are stored in the list in
+              decresing trid order.
+            */
+            if (!(history= my_malloc(sizeof(*history), MYF(MY_WME))))
+            {
+              /* purecov: begin inspected */
+              error= 1;
+              pthread_mutex_unlock(&share->intern_lock);
+              my_free(tables, MYF(0));
+              continue;
+              /* purecov: end */
+            }
+            history->state= share->state_history->state;
+            history->next= share->state_history;
+            share->state_history= history;
+          }
+          else
+          {
+            /* Previous history can't be seen by anyone, reuse old memory */
+            history= share->state_history;
+            DBUG_PRINT("info", ("removing history->trid: %lu  new: %lu",
+                                (ulong) history->trid,
+                                (ulong) trn->commit_trid));
+          }
+
+          history->state.records+= (tables->state_current.records -
+                                    tables->state_start.records);
+          history->state.checksum+= (tables->state_current.checksum -
+                                     tables->state_start.checksum);
+          history->trid= trn->commit_trid;
+
+          if (history->next)
+          {
+            /* Remove not visible states */
+            share->state_history= _ma_remove_not_visible_states(history, 0, 1);
+          }
+          DBUG_PRINT("info", ("share: 0x%lx  in_trans: %d",
+                              (ulong) share, share->in_trans));
         }
-        history->state= share->state_history->state;
-        history->next= share->state_history;
-        share->state_history= history;
-      }
-      else
-      {
-        /* Previous history can't be seen by anyone, reuse old memory */
-        history= share->state_history;
-        DBUG_PRINT("info", ("removing history->trid: %lu  new: %lu",
-                            (ulong) history->trid, (ulong) trn->commit_trid));
-      }
-
-      history->state.records+= (tables->state_current.records -
-                                tables->state_start.records);
-      history->state.checksum+= (tables->state_current.checksum -
-                                 tables->state_start.checksum);
-      history->trid= trn->commit_trid;
-
-      if (history->next)
-      {
-        /* Remove not visible states */
-        share->state_history= _ma_remove_not_visible_states(history, 0, 1);
       }
-      DBUG_PRINT("info", ("share: 0x%lx  in_trans: %d",
-                          (ulong) share, share->in_trans));
       share->in_trans--;
       pthread_mutex_unlock(&share->intern_lock);
     }
@@ -511,7 +538,6 @@ void _ma_remove_table_from_trnman(MARIA_
 
 
 
-
 /****************************************************************************
   The following functions are called by thr_lock() in threaded applications
   for transactional tables.
@@ -536,9 +562,24 @@ void _ma_block_get_status(void* param, m
   info->row_flag= info->s->base.default_row_flag;
   if (concurrent_insert)
   {
+    DBUG_ASSERT(info->lock.type == TL_WRITE_CONCURRENT_INSERT);
     info->row_flag|= ROW_FLAG_TRANSID;
     info->row_base_length+= TRANSID_SIZE;
   }
+  else
+  {
+    DBUG_ASSERT(info->lock.type != TL_WRITE_CONCURRENT_INSERT);
+  }
+
+  if (info->s->lock_key_trees)
+  {
+    /*
+      Assume for now that this doesn't fail (It can only fail in
+      out of memory conditions)
+      TODO: Fix this by having one extra state pre-allocated
+    */
+    (void) _ma_setup_live_state(info);
+  }
   DBUG_VOID_RETURN;
 }
 
@@ -574,7 +615,16 @@ void maria_versioning(MARIA_HA *info, my
 {
   /* For now, this is a hack */
   if (info->s->have_versioning)
+  {
+    enum thr_lock_type save_lock_type;
+    /* Assume is a non threaded application (for now) */
+    info->s->lock_key_trees= 0;
+    /* Set up info->lock.type temporary for _ma_block_get_status() */
+    save_lock_type= info->lock.type;
+    info->lock.type= versioning ? TL_WRITE_CONCURRENT_INSERT : TL_WRITE;
     _ma_block_get_status((void*) info, versioning);
+    info->lock.type= save_lock_type;
+  }
 }
 
 
@@ -609,6 +659,7 @@ void _ma_copy_nontrans_state_information
 void _ma_reset_history(MARIA_SHARE *share)
 {
   MARIA_STATE_HISTORY *history, *next;
+  DBUG_ENTER("_ma_reset_history");
 
   share->state_history->trid= 0;          /* Visibly by all */
   share->state_history->state= share->state.state;
@@ -620,6 +671,7 @@ void _ma_reset_history(MARIA_SHARE *shar
     next= history->next;
     my_free(history, MYF(0));
   }
+  DBUG_VOID_RETURN;
 }
 
 

=== modified file 'storage/maria/ma_state.h'
--- a/storage/maria/ma_state.h	2008-12-08 20:09:59 +0000
+++ b/storage/maria/ma_state.h	2008-12-22 00:17:37 +0000
@@ -17,14 +17,15 @@
 
 typedef struct st_maria_status_info
 {
-  ha_rows records;				/* Rows in table */
-  ha_rows del;					/* Removed rows */
-  my_off_t empty;				/* lost space in datafile */
-  my_off_t key_empty;				/* lost space in indexfile */
+  ha_rows records;                      /* Rows in table */
+  ha_rows del;                          /* Removed rows */
+  my_off_t empty;                       /* lost space in datafile */
+  my_off_t key_empty;                   /* lost space in indexfile */
   my_off_t key_file_length;
   my_off_t data_file_length;
   ha_checksum checksum;
-  my_bool     changed;
+  uint32 changed:1,                     /* Set if table was changed */
+         no_transid:1;                  /* Set if no transid was set on rows */
 } MARIA_STATUS_INFO;
 
 

=== modified file 'storage/maria/ma_write.c'
--- a/storage/maria/ma_write.c	2008-11-20 19:18:59 +0000
+++ b/storage/maria/ma_write.c	2009-02-13 16:30:54 +0000
@@ -1,4 +1,5 @@
-/* Copyright (C) 2006 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2004-2008 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+   Copyright (C) 2008-2009 Sun Microsystems, Inc.
 
    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
@@ -39,8 +40,8 @@ static uchar *_ma_find_last_pos(MARIA_HA
                                 uchar *page, uchar **after_key);
 static my_bool _ma_ck_write_tree(register MARIA_HA *info, MARIA_KEY *key);
 static my_bool _ma_ck_write_btree(register MARIA_HA *info, MARIA_KEY *key);
-static int _ma_ck_write_btree_with_log(MARIA_HA *info, MARIA_KEY *key,
-                                       my_off_t *root, uint32 comp_flag);
+static int _ma_ck_write_btree_with_log(MARIA_HA *, MARIA_KEY *, my_off_t *,
+                                       uint32);
 static my_bool _ma_log_split(MARIA_HA *info, my_off_t page, const uchar *buff,
                              uint org_length, uint new_length,
                              const uchar *key_pos,
@@ -181,9 +182,8 @@ int maria_write(MARIA_HA *info, uchar *r
       else
       {
         while (keyinfo->ck_insert(info,
-                                  (*keyinfo->make_key)(info, &int_key, i,
-                                                       buff, record, filepos,
-                                                       info->trn->trid)))
+                 (*keyinfo->make_key)(info, &int_key, i, buff, record,
+                                      filepos, info->trn->trid)))
         {
           TRN *blocker;
           DBUG_PRINT("error",("Got error: %d on write",my_errno));
@@ -193,10 +193,12 @@ int maria_write(MARIA_HA *info, uchar *r
             below doesn't work for them.
             Also, filter out non-thread maria use, and table modified in
             the same transaction.
+            At last, filter out non-dup-unique errors.
           */
           if (!local_lock_tree)
             goto err;
-          if (info->dup_key_trid == info->trn->trid)
+          if (info->dup_key_trid == info->trn->trid ||
+              my_errno != HA_ERR_FOUND_DUPP_KEY)
           {
 	    rw_unlock(&keyinfo->root_lock);
             goto err;
@@ -230,9 +232,11 @@ int maria_write(MARIA_HA *info, uchar *r
             /* running. now we wait */
             WT_RESOURCE_ID rc;
             int res;
+            const char *old_proc_info; 
 
             rc.type= &ma_rc_dup_unique;
-            rc.value= (intptr)blocker; /* TODO savepoint id when we'll have them */
+            /* TODO savepoint id when we'll have them */
+            rc.value= (intptr)blocker;
             res= wt_thd_will_wait_for(info->trn->wt, blocker->wt, & rc);
             if (res != WT_OK)
             {
@@ -240,14 +244,12 @@ int maria_write(MARIA_HA *info, uchar *r
               my_errno= HA_ERR_LOCK_DEADLOCK;
               goto err;
             }
-            {
-              const char *old_proc_info= proc_info_hook(0,
-                    "waiting for a resource", __func__, __FILE__, __LINE__);
-
-              res= wt_thd_cond_timedwait(info->trn->wt, & blocker->state_lock);
+            old_proc_info= proc_info_hook(0,
+                                          "waiting for a resource",
+                                          __func__, __FILE__, __LINE__);
+            res= wt_thd_cond_timedwait(info->trn->wt, & blocker->state_lock);
+            proc_info_hook(0, old_proc_info, __func__, __FILE__, __LINE__);
 
-              proc_info_hook(0, old_proc_info, __func__, __FILE__, __LINE__);
-            }
             pthread_mutex_unlock(& blocker->state_lock);
             if (res != WT_OK)
             {
@@ -257,6 +259,9 @@ int maria_write(MARIA_HA *info, uchar *r
             }
           }
           rw_wrlock(&keyinfo->root_lock);
+#ifndef MARIA_CANNOT_ROLLBACK
+          keyinfo->version++;
+#endif
         }
       }
 
@@ -320,6 +325,8 @@ err:
   fatal_error= 0;
   if (my_errno == HA_ERR_FOUND_DUPP_KEY ||
       my_errno == HA_ERR_RECORD_FILE_FULL ||
+      my_errno == HA_ERR_LOCK_DEADLOCK ||
+      my_errno == HA_ERR_LOCK_WAIT_TIMEOUT ||
       my_errno == HA_ERR_NULL_IN_SPATIAL ||
       my_errno == HA_ERR_OUT_OF_MEM)
   {
@@ -671,12 +678,14 @@ static int w_search(register MARIA_HA *i
         When the index will support true versioning - with multiple
         identical values in the UNIQUE index, invisible to each other -
         the following should be changed to "continue inserting keys, at the
-        end (of the row or statement) wait". Until it's done we cannot properly
-        support deadlock timeouts.
+        end (of the row or statement) wait". We need to wait on *all*
+        unique conflicts at once, not one-at-a-time, because we need to
+        know all blockers in advance, otherwise we'll have incomplete wait-for
+        graph.
       */
       /*
-        transaction that has inserted the conflicting key is in progress.
-        wait for it to be committed or aborted.
+        transaction that has inserted the conflicting key may be in progress.
+        the caller will wait for it to be committed or aborted.
       */
       info->dup_key_trid= _ma_trid_from_key(&tmp_key);
       info->dup_key_pos= dup_key_pos;

=== modified file 'storage/maria/maria_backup_engine.cc'
--- a/storage/maria/maria_backup_engine.cc	2009-02-13 12:40:13 +0000
+++ b/storage/maria/maria_backup_engine.cc	2009-02-13 18:16:54 +0000
@@ -283,6 +283,9 @@ private:
   size_t bytes_since_last_sleep; ///< how many bytes sent since we last slept
 };
 
+/* Needed for VisualAge 6.0 */
+const size_t Backup::bytes_between_sleeps;
+
 /**
   When we send a backup packet to the backup kernel, we prefix it with a code
   which tells which type of file this packet belongs to. Starts at 1 because

=== modified file 'storage/maria/maria_def.h'
--- a/storage/maria/maria_def.h	2009-02-10 14:51:40 +0000
+++ b/storage/maria/maria_def.h	2009-02-13 16:30:54 +0000
@@ -355,7 +355,7 @@ typedef struct st_maria_share
   ulong state_diff_length;
   uint rec_reflength;			/* rec_reflength in use now */
   uint keypage_header;
-  uint32 ftparsers;			/* Number of distinct ftparsers
+  uint32 ftkeys;			/* Number of distinct full-text keys
 						   + 1 */
   PAGECACHE_FILE kfile;			/* Shared keyfile */
   File data_file;			/* Shared data file */
@@ -1198,6 +1198,12 @@ extern size_t _ma_nommap_pwrite(MARIA_HA
 				size_t Count, my_off_t offset, myf MyFlags);
 
 C_MODE_START
+/* my_pwrite instead of my_write used */
+#define MA_STATE_INFO_WRITE_DONT_MOVE_OFFSET 1
+/* info should be written */
+#define MA_STATE_INFO_WRITE_FULL_INFO        2
+/* intern_lock taking is needed */
+#define MA_STATE_INFO_WRITE_LOCK             4
 uint _ma_state_info_write(MARIA_SHARE *share, uint pWrite);
 uint _ma_state_info_read_dsk(File file, MARIA_STATE_INFO *state,
                              my_bool force);

=== modified file 'storage/maria/maria_pack.c'
--- a/storage/maria/maria_pack.c	2009-01-28 11:08:55 +0000
+++ b/storage/maria/maria_pack.c	2009-02-13 16:30:54 +0000
@@ -303,7 +303,7 @@ static void print_version(void)
 static void usage(void)
 {
   print_version();
-  puts("Copyright (C) 2002 MySQL AB");
+  puts("Copyright 2002-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.");
   puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,");
   puts("and you are welcome to modify and redistribute it under the GPL license\n");
 
@@ -3007,7 +3007,9 @@ static int save_state(MARIA_HA *isam_fil
   if (share->base.keys)
     isamchk_neaded=1;
   DBUG_RETURN(_ma_state_info_write_sub(share, share->kfile.file,
-                                       &share->state, (1 + 2)));
+                                       &share->state,
+                                       MA_STATE_INFO_WRITE_DONT_MOVE_OFFSET |
+                                       MA_STATE_INFO_WRITE_FULL_INFO));
 }
 
 
@@ -3047,7 +3049,9 @@ static int save_state_mrg(File file,PACK
   if (isam_file->s->base.keys)
     isamchk_neaded=1;
   state.changed=STATE_CHANGED | STATE_NOT_ANALYZED; /* Force check of table */
-  DBUG_RETURN (_ma_state_info_write_sub(isam_file->s, file,&state,1+2));
+  DBUG_RETURN (_ma_state_info_write_sub(isam_file->s, file,&state,
+                                        MA_STATE_INFO_WRITE_DONT_MOVE_OFFSET |
+                                        MA_STATE_INFO_WRITE_FULL_INFO));
 }
 
 

=== modified file 'storage/maria/maria_read_log.c'
--- a/storage/maria/maria_read_log.c	2008-06-05 16:11:22 +0000
+++ b/storage/maria/maria_read_log.c	2009-02-13 16:30:54 +0000
@@ -23,9 +23,9 @@ static const char *load_default_groups[]
 static void get_options(int *argc,char * * *argv);
 #ifndef DBUG_OFF
 #if defined(__WIN__)
-const char *default_dbug_option= "d:t:i:O,\\maria_read_log.trace";
+const char *default_dbug_option= "d:t:O,\\maria_read_log.trace";
 #else
-const char *default_dbug_option= "d:t:i:o,/tmp/maria_read_log.trace";
+const char *default_dbug_option= "d:t:o,/tmp/maria_read_log.trace";
 #endif
 #endif /* DBUG_OFF */
 static my_bool opt_display_only, opt_apply, opt_apply_undo, opt_silent;

=== modified file 'storage/maria/trnman.c'
--- a/storage/maria/trnman.c	2008-12-09 12:36:51 +0000
+++ b/storage/maria/trnman.c	2009-01-16 16:18:17 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2006 MySQL AB
+/* Copyright (C) 2006-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.
 
    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
@@ -42,7 +42,7 @@ static TrID global_trid_generator;
   The default value is used when transaction manager not initialize;
   Probably called from maria_chk
 */
-static TrID trid_min_read_from= ~(TrID) 0;
+static TrID trid_min_read_from= MAX_TRID;
 
 /* the mutex for everything above */
 static pthread_mutex_t LOCK_trn_list;
@@ -59,6 +59,7 @@ static TRN **short_trid_to_active_trn;
 /* locks for short_trid_to_active_trn and pool */
 static my_atomic_rwlock_t LOCK_short_trid_to_trn, LOCK_pool;
 static my_bool default_trnman_end_trans_hook(TRN *, my_bool, my_bool);
+static void trnman_free_trn(TRN *);
 
 my_bool (*trnman_end_trans_hook)(TRN *, my_bool, my_bool)=
   default_trnman_end_trans_hook;
@@ -88,6 +89,19 @@ void trnman_reset_locked_tables(TRN *trn
   trn->locked_tables= locked_tables;
 }
 
+#ifdef EXTRA_DEBUG
+uint16 trnman_get_flags(TRN *trn)
+{
+  return trn->flags;
+}
+
+void trnman_set_flags(TRN *trn, uint16 flags)
+{
+  trn->flags= flags;
+}
+#endif
+
+/** Wake up threads waiting for this transaction */
 static void wt_thd_release_self(TRN *trn)
 {
   if (trn->wt)
@@ -149,12 +163,12 @@ int trnman_init(TrID initial_trid)
   */
 
   active_list_max.trid= active_list_min.trid= 0;
-  active_list_max.min_read_from= ~(TrID) 0;
+  active_list_max.min_read_from= MAX_TRID;
   active_list_max.next= active_list_min.prev= 0;
   active_list_max.prev= &active_list_min;
   active_list_min.next= &active_list_max;
 
-  committed_list_max.commit_trid= ~(TrID) 0;
+  committed_list_max.commit_trid= MAX_TRID;
   committed_list_max.next= committed_list_min.prev= 0;
   committed_list_max.prev= &committed_list_min;
   committed_list_min.next= &committed_list_max;
@@ -198,6 +212,7 @@ void trnman_destroy()
   {
     TRN *trn= pool;
     pool= pool->next;
+    DBUG_ASSERT(trn->wt == NULL);
     pthread_mutex_destroy(&trn->state_lock);
     my_free((void *)trn, MYF(0));
   }
@@ -251,10 +266,12 @@ static uint get_short_trid(TRN *trn)
   return res;
 }
 
-/*
-  DESCRIPTION
-    start a new transaction, allocate and initialize transaction object
-    mutex and cond will be used for lock waits
+/**
+  Allocates and initialzies a new TRN object
+
+  @note the 'wt' parameter can only be 0 in a single-threaded code (or,
+  generally, where threads cannot block each other), otherwise the
+  first call to the deadlock detector will sigsegv.
 */
 
 TRN *trnman_new_trn(WT_THD *wt)
@@ -338,7 +355,8 @@ TRN *trnman_new_trn(WT_THD *wt)
     trn->min_read_from= trn->trid + 1;
   }
 
-  trn->commit_trid=  ~(TrID)0;
+  /* no other transaction can read changes done by this one */
+  trn->commit_trid=  MAX_TRID;
   trn->rec_lsn= trn->undo_lsn= trn->first_undo_lsn= 0;
   trn->used_tables= 0;
 
@@ -394,6 +412,7 @@ my_bool trnman_end_trn(TRN *trn, my_bool
 
   /* if a rollback, all UNDO records should have been executed */
   DBUG_ASSERT(commit || trn->undo_lsn == 0);
+  DBUG_ASSERT(trn != &dummy_transaction_object);
   DBUG_PRINT("info", ("pthread_mutex_lock LOCK_trn_list"));
 
   pthread_mutex_lock(&LOCK_trn_list);
@@ -429,7 +448,8 @@ my_bool trnman_end_trn(TRN *trn, my_bool
   }
 
   pthread_mutex_lock(&trn->state_lock);
-  trn->commit_trid= global_trid_generator;
+  if (commit)
+    trn->commit_trid= global_trid_generator;
   wt_thd_release_self(trn);
   pthread_mutex_unlock(&trn->state_lock);
 
@@ -502,7 +522,7 @@ my_bool trnman_end_trn(TRN *trn, my_bool
   running. It may even be called automatically on checkpoints if no
   transactions are running.
 */
-void trnman_free_trn(TRN *trn)
+static void trnman_free_trn(TRN *trn)
 {
   /*
      union is to solve strict aliasing issue.
@@ -580,6 +600,16 @@ int trnman_can_read_from(TRN *trn, TrID 
   return can;
 }
 
+/**
+  Finds a TRN by its TrID
+
+  @param trn    current trn. Needed for pinning pointers (see lf_pin)
+  @param trid   trid to search for
+
+  @return found trn or 0
+
+  @note that trn is returned with its state locked!
+*/
 TRN *trnman_trid_to_trn(TRN *trn, TrID trid)
 {
   TRN **found;
@@ -604,7 +634,7 @@ TRN *trnman_trid_to_trn(TRN *trn, TrID t
   lf_hash_search_unpin(trn->pins);
 
   /* Gotcha! */
-  return *found; /* note that TRN is returned locked !!! */
+  return *found;
 }
 
 /* TODO: the stubs below are waiting for savepoints to be implemented */
@@ -885,11 +915,22 @@ my_bool trnman_exists_active_transaction
   for (trn= active_list_min.next; trn != &active_list_max; trn= trn->next)
   {
     /*
-      We use >= for min_id as min_id is a commit_trid and trn->trid
-      is transaction id.  In the case they are the same, then the
-      trn started after the min_id was committed.
+      We use <= for max_id as max_id is a commit_trid and trn->trid
+      is transaction id.  When calculating commit_trid we use the
+      current value of global_trid_generator.  global_trid_generator is
+      incremented for each new transaction.
+
+      For example, assuming we have
+      min_id = 5
+      max_id = 10
+
+      A trid of value 5 can't see the history event between 5 & 10
+      at it vas started before min_id 5 was committed.
+      A trid of value 10 can't see the next history event (max_id = 10)
+      as it started before this was committed. In this case it must use
+      the this event.
     */
-    if (trn->trid >= min_id && trn->trid < max_id)
+    if (trn->trid > min_id && trn->trid <= max_id)
     {
       ret= 1;
       break;

=== modified file 'storage/maria/trnman.h'
--- a/storage/maria/trnman.h	2008-08-07 20:57:25 +0000
+++ b/storage/maria/trnman.h	2009-01-16 16:18:17 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2006 MySQL AB
+/* Copyright (C) 2006-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.
 
    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
@@ -22,7 +22,7 @@ C_MODE_START
 #include "trnman_public.h"
 #include "ma_loghandler_lsn.h"
 
-/*
+/**
   trid - 6 uchar transaction identifier. Assigned when a transaction
   is created. Transaction can always be identified by its trid,
   even after transaction has ended.
@@ -33,7 +33,7 @@ C_MODE_START
   when short_id is 0, TRN is not initialized, for all practical purposes
   it could be considered unused.
 
-  when commit_trid is ~(TrID)0 the transaction is running, otherwise it's
+  when commit_trid is MAX_TRID the transaction is running, otherwise it's
   committed.
 
   state_lock mutex protects the state of a TRN, that is whether a TRN
@@ -46,16 +46,18 @@ struct st_ma_transaction
   LF_PINS              *pins;
   WT_THD               *wt;
   pthread_mutex_t      state_lock;
-  void                 *used_tables;  /* Tables used by transaction */
+  void                 *used_tables;  /**< Tables used by transaction */
   TRN                  *next, *prev;
   TrID                 trid, min_read_from, commit_trid;
   LSN		       rec_lsn, undo_lsn;
   LSN_WITH_FLAGS       first_undo_lsn;
   uint                 locked_tables;
   uint16               short_id;
+  uint16               flags;         /**< Various flags */
 };
 
 #define TRANSACTION_LOGGED_LONG_ID ULL(0x8000000000000000)
+#define MAX_TRID (~(TrID)0)
 
 extern WT_RESOURCE_TYPE ma_rc_dup_unique;
 

=== modified file 'storage/maria/trnman_public.h'
--- a/storage/maria/trnman_public.h	2008-12-08 20:09:59 +0000
+++ b/storage/maria/trnman_public.h	2009-01-16 16:18:17 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2006 MySQL AB
+/* Copyright (C) 2006-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.
 
    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
@@ -44,7 +44,6 @@ my_bool trnman_end_trn(TRN *trn, my_bool
 #define trnman_commit_trn(T) trnman_end_trn(T, TRUE)
 #define trnman_abort_trn(T)  trnman_end_trn(T, FALSE)
 #define trnman_rollback_trn(T)  trnman_end_trn(T, FALSE)
-void trnman_free_trn(TRN *trn);
 int trnman_can_read_from(TRN *trn, TrID trid);
 TRN *trnman_trid_to_trn(TRN *trn, TrID trid);
 void trnman_new_statement(TRN *trn);
@@ -70,5 +69,17 @@ my_bool trnman_exists_active_transaction
 void trnman_lock();
 void trnman_unlock();
 my_bool trman_is_inited();
+#ifdef EXTRA_DEBUG
+uint16 trnman_get_flags(TRN *);
+void trnman_set_flags(TRN *, uint16 flags);
+#else
+#define trnman_get_flags(A) 0
+#define trnman_set_flags(A, B) do { } while (0)
+#endif
+
+/* Flag bits */
+#define TRN_STATE_INFO_LOGGED       1  /* Query is logged */
+#define TRN_STATE_TABLES_CAN_CHANGE 2  /* Things can change during trans. */
+
 C_MODE_END
 #endif

=== modified file 'storage/maria/unittest/trnman-t.c'
--- a/storage/maria/unittest/trnman-t.c	2008-10-20 09:16:47 +0000
+++ b/storage/maria/unittest/trnman-t.c	2009-02-13 16:30:54 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2006 MySQL AB
+/* Copyright (C) 2006-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.
 
    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
@@ -40,7 +40,8 @@ pthread_handler_t test_trnman(void *arg)
   TRN    *trn[MAX_ITER];
   int    m= (*(int *)arg);
 
-  my_thread_init();
+  if (my_thread_init())
+    BAIL_OUT("my_thread_init failed!");
 
   for (x= ((int)(intptr)(&m)); m > 0; )
   {

=== modified file 'storage/myisam/mi_create.c'
--- a/storage/myisam/mi_create.c	2009-02-13 12:40:13 +0000
+++ b/storage/myisam/mi_create.c	2009-02-13 16:30:54 +0000
@@ -496,7 +496,8 @@ int mi_create(const char *name,uint keys
   /* There are only 16 bits for the total header length. */
   if (info_length > 65535)
   {
-    my_printf_error(0, "MyISAM table '%s' has too many columns and/or "
+    my_printf_error(HA_WRONG_CREATE_OPTION,
+                    "MyISAM table '%s' has too many columns and/or "
                     "indexes and/or unique constraints.",
                     MYF(0), name + dirname_length(name));
     my_errno= HA_WRONG_CREATE_OPTION;

=== modified file 'storage/myisam/myisamdef.h'
--- a/storage/myisam/myisamdef.h	2009-01-30 14:13:39 +0000
+++ b/storage/myisam/myisamdef.h	2009-02-13 16:30:54 +0000
@@ -203,15 +203,15 @@ typedef struct st_mi_isam_share
   ulong min_pack_length;                /* Theese are used by packed data */
   ulong max_pack_length;
   ulong state_diff_length;
-  uint rec_reflength;                   /* rec_reflength in use now */
-  uint unique_name_length;
+  uint	rec_reflength;			/* rec_reflength in use now */
+  uint  unique_name_length;
   uint32 ftkeys;                        /* Number of full-text keys + 1 */
-  File kfile;                           /* Shared keyfile */
-  File data_file;                       /* Shared data file */
-  int mode;                             /* mode of file on open */
-  uint reopen;                          /* How many times reopened */
-  uint w_locks, r_locks, tot_locks;     /* Number of read/write locks */
-  uint blocksize;                       /* blocksize of keyfile */
+  File	kfile;				/* Shared keyfile */
+  File	data_file;			/* Shared data file */
+  int	mode;				/* mode of file on open */
+  uint	reopen;				/* How many times reopened */
+  uint	w_locks,r_locks,tot_locks;	/* Number of read/write locks */
+  uint	blocksize;			/* blocksize of keyfile */
   myf write_flag;
   enum data_file_type data_file_type;
   /* Below flag is needed to make log tables work with concurrent insert */

=== modified file 'support-files/mysql.spec.sh'
--- a/support-files/mysql.spec.sh	2008-12-28 07:07:52 +0000
+++ b/support-files/mysql.spec.sh	2009-02-13 16:30:54 +0000
@@ -387,7 +387,12 @@ CFLAGS="$CFLAGS" \
 CXXFLAGS="$CXXFLAGS" \
 BuildMySQL "\
 		--with-debug \
-		--with-comment=\"MySQL Community Server - Debug (%{license})\"")
+%if %{MARIA_BUILD}
+		--with-comment=\"MySQL Community Server - Debug [Maria] (%{license})\" \
+%else
+		--with-comment=\"MySQL Community Server - Debug (%{license})\" \
+%endif
+")
 
 # We might want to save the config log file
 if test -n "$MYSQL_DEBUGCONFLOG_DEST"

=== modified file 'unittest/mysys/lf-t.c'
--- a/unittest/mysys/lf-t.c	2008-07-29 14:10:24 +0000
+++ b/unittest/mysys/lf-t.c	2009-01-15 21:27:36 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2006 MySQL AB
+/* Copyright (C) 2008-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.
 
    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
@@ -13,6 +13,12 @@
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
+/**
+  @file
+
+  Unit tests for lock-free algorithms of mysys
+*/
+
 #include "thr_template.c"
 
 #include <lf.h>
@@ -47,6 +53,10 @@ pthread_handler_t test_lf_pinbox(void *a
   return 0;
 }
 
+/*
+  thread local data area, allocated using lf_alloc.
+  union is required to enforce the minimum required element size (sizeof(ptr))
+*/
 typedef union {
   int32 data;
   void *not_used;

=== modified file 'unittest/mysys/my_atomic-t.c'
--- a/unittest/mysys/my_atomic-t.c	2008-10-20 09:16:47 +0000
+++ b/unittest/mysys/my_atomic-t.c	2009-02-13 16:30:54 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2006 MySQL AB
+/* Copyright (C) 2006-2008 MySQL AB, 2008 Sun Microsystems, Inc.
 
    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

=== modified file 'unittest/mysys/thr_template.c'
--- a/unittest/mysys/thr_template.c	2008-08-29 19:50:04 +0000
+++ b/unittest/mysys/thr_template.c	2009-01-15 21:27:36 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2006 MySQL AB
+/* Copyright (C) 2006-2008 MySQL AB, 2008 Sun Microsystems, Inc.
 
    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

=== modified file 'unittest/mysys/waiting_threads-t.c'
--- a/unittest/mysys/waiting_threads-t.c	2008-10-21 19:31:14 +0000
+++ b/unittest/mysys/waiting_threads-t.c	2009-02-12 10:06:03 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2006 MySQL AB
+/* Copyright (C) 2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.
 
    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
@@ -16,7 +16,6 @@
 #include "thr_template.c"
 #include <waiting_threads.h>
 #include <m_string.h>
-#include <locale.h>
 
 struct test_wt_thd {
   WT_THD thd;
@@ -25,12 +24,14 @@ struct test_wt_thd {
 
 uint i, cnt;
 pthread_mutex_t lock;
+pthread_cond_t thread_sync;
 
 ulong wt_timeout_short=100, wt_deadlock_search_depth_short=4;
 ulong wt_timeout_long=10000, wt_deadlock_search_depth_long=15;
 
 #define reset(ARRAY) bzero(ARRAY, sizeof(ARRAY))
 
+/* see explanation of the kill strategies in waiting_threads.h */
 enum { LATEST, RANDOM, YOUNGEST, LOCKS } kill_strategy;
 
 WT_RESOURCE_TYPE restype={ wt_resource_id_memcmp, 0};
@@ -48,9 +49,19 @@ pthread_handler_t test_wt(void *arg)
 
   my_thread_init();
 
-  pthread_mutex_lock(&lock);
+  pthread_mutex_lock(&mutex);
   id= cnt++;
-  pthread_mutex_unlock(&lock);
+  wt_thd_lazy_init(& thds[id].thd,
+                   & wt_deadlock_search_depth_short, & wt_timeout_short,
+                   & wt_deadlock_search_depth_long, & wt_timeout_long);
+
+  /* now, wait for everybody to be ready to run */
+  if (cnt >= THREADS)
+    pthread_cond_broadcast(&thread_sync);
+  else
+    while (cnt < THREADS)
+      pthread_cond_wait(&thread_sync, &mutex);
+  pthread_mutex_unlock(&mutex);
 
   my_rnd_init(&rand, (ulong)(intptr)&m, id);
   if (kill_strategy == YOUNGEST)
@@ -68,13 +79,14 @@ pthread_handler_t test_wt(void *arg)
 
     res= 0;
 
+    /* prepare for waiting for a random number of random threads */
     for (j= n= (rnd() % THREADS)/10; !res && j >= 0; j--)
     {
 retry:
-      i= rnd() % (THREADS-1);
-      if (i >= id) i++;
+      i= rnd() % (THREADS-1); /* pick a random thread */
+      if (i >= id) i++;   /* with a number from 0 to THREADS-1 excluding ours */
 
-      for (k=n; k >=j; k--)
+      for (k=n; k >=j; k--) /* the one we didn't pick before */
         if (blockers[k] == i)
           goto retry;
       blockers[j]= i;
@@ -110,23 +122,23 @@ retry:
       thds[id].thd.weight++;
   }
 
+  pthread_mutex_lock(&mutex);
+  /* wait for everybody to finish */
+  if (!--cnt)
+    pthread_cond_broadcast(&thread_sync);
+  else
+    while (cnt)
+      pthread_cond_wait(&thread_sync, &mutex);
+
   pthread_mutex_lock(& thds[id].lock);
   pthread_mutex_lock(&lock);
   wt_thd_release_all(& thds[id].thd);
   pthread_mutex_unlock(&lock);
   pthread_mutex_unlock(& thds[id].lock);
+  wt_thd_destroy(& thds[id].thd);
 
-#ifndef DBUG_OFF
-  {
-#define DEL "(deleted)"
-    char *x=malloc(strlen(thds[id].thd.name)+sizeof(DEL)+1);
-    strxmov(x, thds[id].thd.name, DEL, 0);
-    thds[id].thd.name=x; /* it's a memory leak, go on, shoot me */
-  }
-#endif
-
-  pthread_mutex_lock(&mutex);
-  if (!--running_threads) pthread_cond_signal(&cond);
+  if (!--running_threads) /* now, signal when everybody is done with deinit */
+    pthread_cond_signal(&cond);
   pthread_mutex_unlock(&mutex);
   DBUG_PRINT("wt", ("exiting"));
   my_thread_end();
@@ -136,6 +148,7 @@ retry:
 void do_one_test()
 {
   double sum, sum0;
+  DBUG_ENTER("do_one_test");
 
   reset(wt_cycle_stats);
   reset(wt_wait_stats);
@@ -161,31 +174,33 @@ void do_one_test()
            wt_wait_table[cnt], wt_wait_stats[cnt]);
   diag("timed out: %u", wt_wait_stats[cnt]);
   diag("successes: %u", wt_success_stats);
+
+  DBUG_VOID_RETURN;
 }
 
 void do_tests()
 {
-  plan(12);
-  compile_time_assert(THREADS >= 3);
+  DBUG_ENTER("do_tests");
+  plan(14);
+  compile_time_assert(THREADS >= 4);
 
   DBUG_PRINT("wt", ("================= initialization ==================="));
 
   bad= my_atomic_initialize();
   ok(!bad, "my_atomic_initialize() returned %d", bad);
 
+  pthread_cond_init(&thread_sync, 0);
   pthread_mutex_init(&lock, 0);
   wt_init();
   for (cnt=0; cnt < THREADS; cnt++)
-  {
-    wt_thd_lazy_init(& thds[cnt].thd,
-                     & wt_deadlock_search_depth_short, & wt_timeout_short,
-                     & wt_deadlock_search_depth_long, & wt_timeout_long);
     pthread_mutex_init(& thds[cnt].lock, 0);
-  }
   {
-    WT_RESOURCE_ID resid[3];
-    for (i=0; i < 3; i++)
+    WT_RESOURCE_ID resid[4];
+    for (i=0; i < array_elements(resid); i++)
     {
+      wt_thd_lazy_init(& thds[i].thd,
+                       & wt_deadlock_search_depth_short, & wt_timeout_short,
+                       & wt_deadlock_search_depth_long, & wt_timeout_long);
       resid[i].value= i+1;
       resid[i].type= &restype;
     }
@@ -206,28 +221,26 @@ void do_tests()
     pthread_mutex_lock(&lock);
     bad= wt_thd_cond_timedwait(& thds[0].thd, &lock);
     pthread_mutex_unlock(&lock);
-    ok(bad == ETIMEDOUT, "timeout test returned %d", bad);
+    ok(bad == WT_TIMEOUT, "timeout test returned %d", bad);
 
     ok_wait(0,1,0);
     ok_wait(1,2,1);
     ok_deadlock(2,0,2);
 
     pthread_mutex_lock(&lock);
-    wt_thd_cond_timedwait(& thds[0].thd, &lock);
-    wt_thd_cond_timedwait(& thds[1].thd, &lock);
+    ok(wt_thd_cond_timedwait(& thds[0].thd, &lock) == WT_TIMEOUT, "as always");
+    ok(wt_thd_cond_timedwait(& thds[1].thd, &lock) == WT_TIMEOUT, "as always");
     wt_thd_release_all(& thds[0].thd);
     wt_thd_release_all(& thds[1].thd);
     wt_thd_release_all(& thds[2].thd);
     wt_thd_release_all(& thds[3].thd);
-    pthread_mutex_unlock(&lock);
 
-    for (cnt=0; cnt < 3; cnt++)
+    for (i=0; i < array_elements(resid); i++)
     {
-      wt_thd_destroy(& thds[cnt].thd);
-      wt_thd_lazy_init(& thds[cnt].thd,
-                       & wt_deadlock_search_depth_short, & wt_timeout_short,
-                       & wt_deadlock_search_depth_long, & wt_timeout_long);
+      wt_thd_release_all(& thds[i].thd);
+      wt_thd_destroy(& thds[i].thd);
     }
+    pthread_mutex_unlock(&lock);
   }
 
   wt_deadlock_search_depth_short=6;
@@ -243,27 +256,23 @@ void do_tests()
 
 #define test_kill_strategy(X)                   \
   diag("kill strategy: " #X);                   \
+  DBUG_EXECUTE("reset_file",                    \
+               { rewind(DBUG_FILE); ftruncate(fileno(DBUG_FILE), 0); }); \
+  DBUG_PRINT("info", ("kill strategy: " #X));   \
   kill_strategy=X;                              \
   do_one_test();
 
   test_kill_strategy(LATEST);
-  SKIP_BIG_TESTS(1)
-  {
-    test_kill_strategy(RANDOM);
-  }
+  test_kill_strategy(RANDOM);
   test_kill_strategy(YOUNGEST);
   test_kill_strategy(LOCKS);
 
   DBUG_PRINT("wt", ("================= cleanup ==================="));
-  pthread_mutex_lock(&lock);
   for (cnt=0; cnt < THREADS; cnt++)
-  {
-    wt_thd_release_all(& thds[cnt].thd);
-    wt_thd_destroy(& thds[cnt].thd);
     pthread_mutex_destroy(& thds[cnt].lock);
-  }
-  pthread_mutex_unlock(&lock);
   wt_end();
   pthread_mutex_destroy(&lock);
+  pthread_cond_destroy(&thread_sync);
+  DBUG_VOID_RETURN;
 }
 

Thread
bzr push into mysql-6.0 branch (guilhem:2711 to 2713) Guilhem Bichot13 Feb