2614 Reggie Burnett 2008-09-05 [merge]
merged from 5.1 main
added:
mysql-test/include/wait_for_slave_sql_error_and_skip.inc
mysql-test/suite/rpl/r/rpl_filter_tables_not_exist.result
mysql-test/suite/rpl/t/rpl_filter_tables_not_exist-slave.opt
mysql-test/suite/rpl/t/rpl_filter_tables_not_exist.test
modified:
configure.in
include/my_sys.h
include/myisam.h
mysql-test/extra/binlog_tests/database.test
mysql-test/r/group_min_max.result
mysql-test/r/multi_update.result
mysql-test/r/myisam.result
mysql-test/r/partition_symlink.result
mysql-test/r/subselect.result
mysql-test/r/symlink.result
mysql-test/r/type_bit.result
mysql-test/suite/binlog/r/binlog_database.result
mysql-test/suite/binlog/r/binlog_innodb.result
mysql-test/suite/jp/std_data/jisx0208_sjis2.dat
mysql-test/suite/jp/t/disabled.def
mysql-test/t/group_min_max.test
mysql-test/t/myisam.test
mysql-test/t/partition_symlink.test
mysql-test/t/subselect.test
mysql-test/t/symlink.test
mysql-test/t/type_bit.test
mysys/my_symlink.c
mysys/thr_lock.c
sql/field.h
sql/log_event.cc
sql/log_event.h
sql/mysql_priv.h
sql/mysqld.cc
sql/opt_range.cc
sql/opt_range.h
sql/sql_class.cc
sql/sql_class.h
sql/sql_db.cc
sql/sql_parse.cc
sql/sql_select.cc
sql/sql_update.cc
storage/myisam/mi_check.c
storage/myisam/mi_create.c
storage/myisam/mi_open.c
storage/myisam/mi_static.c
storage/myisam/myisamchk.c
storage/myisam/myisamdef.h
storage/myisam/rt_index.c
2613 Reggie Burnett 2008-08-26 [merge]
merged from 5.1 main
removed:
mysql-test/include/binlog_cache_size_basic.inc
mysql-test/include/bulk_insert_buffer_size_basic.inc
mysql-test/include/delayed_insert_limit_basic.inc
mysql-test/include/delayed_queue_size_basic.inc
mysql-test/include/innodb_concurrency_tickets_basic.inc
mysql-test/include/innodb_max_purge_lag_basic.inc
mysql-test/include/innodb_sync_spin_loops_basic.inc
mysql-test/include/join_buffer_size_basic.inc
mysql-test/include/key_buffer_size_basic.inc
mysql-test/include/key_cache_age_threshold_basic.inc
mysql-test/include/key_cache_block_size_basic.inc
mysql-test/include/key_cache_division_limit_basic.inc
mysql-test/include/log_warnings_basic.inc
mysql-test/include/max_binlog_cache_size_basic.inc
mysql-test/include/max_connect_errors_basic.inc
mysql-test/include/max_heap_table_size_basic.inc
mysql-test/include/max_seeks_for_key_basic.inc
mysql-test/include/max_tmp_tables_basic.inc
mysql-test/include/max_write_lock_count_basic.inc
mysql-test/include/min_examined_row_limit_basic.inc
mysql-test/include/multi_range_count_basic.inc
mysql-test/include/myisam_max_sort_file_size_basic.inc
mysql-test/include/myisam_repair_threads_basic.inc
mysql-test/include/myisam_sort_buffer_size_basic.inc
mysql-test/include/net_retry_count_basic.inc
mysql-test/include/query_alloc_block_size_basic.inc
mysql-test/include/query_cache_limit_basic.inc
mysql-test/include/query_cache_min_res_unit_basic.inc
mysql-test/include/query_cache_size_basic.inc
mysql-test/include/query_prealloc_size_basic.inc
mysql-test/include/range_alloc_block_size_basic.inc
mysql-test/include/rpl_recovery_rank_basic.inc
mysql-test/include/server_id_basic.inc
mysql-test/include/slave_transaction_retries_basic.inc
mysql-test/include/sort_buffer_size_basic.inc
mysql-test/include/sync_binlog_basic.inc
mysql-test/include/timestamp_basic.inc
mysql-test/include/tmp_table_size_basic.inc
mysql-test/include/transaction_alloc_block_size_basic.inc
mysql-test/include/transaction_prealloc_size_basic.inc
mysql-test/include/wait_timeout_basic.inc
mysql-test/r/binlog_cache_size_basic_32.result
mysql-test/r/binlog_cache_size_basic_64.result
mysql-test/r/bulk_insert_buffer_size_basic_32.result
mysql-test/r/bulk_insert_buffer_size_basic_64.result
mysql-test/r/concurrent_innodb.result
mysql-test/r/delayed_insert_limit_basic_32.result
mysql-test/r/delayed_insert_limit_basic_64.result
mysql-test/r/delayed_queue_size_basic_32.result
mysql-test/r/delayed_queue_size_basic_64.result
mysql-test/r/innodb_concurrency_tickets_basic_32.result
mysql-test/r/innodb_concurrency_tickets_basic_64.result
mysql-test/r/innodb_max_purge_lag_basic_32.result
mysql-test/r/innodb_max_purge_lag_basic_64.result
mysql-test/r/innodb_sync_spin_loops_basic_32.result
mysql-test/r/innodb_sync_spin_loops_basic_64.result
mysql-test/r/join_buffer_size_basic_32.result
mysql-test/r/join_buffer_size_basic_64.result
mysql-test/r/key_buffer_size_basic_32.result
mysql-test/r/key_buffer_size_basic_64.result
mysql-test/r/key_cache_age_threshold_basic_32.result
mysql-test/r/key_cache_age_threshold_basic_64.result
mysql-test/r/key_cache_block_size_basic_32.result
mysql-test/r/key_cache_block_size_basic_64.result
mysql-test/r/key_cache_division_limit_basic_32.result
mysql-test/r/key_cache_division_limit_basic_64.result
mysql-test/r/log_warnings_basic_32.result
mysql-test/r/log_warnings_basic_64.result
mysql-test/r/max_binlog_cache_size_basic_32.result
mysql-test/r/max_binlog_cache_size_basic_64.result
mysql-test/r/max_connect_errors_basic_32.result
mysql-test/r/max_connect_errors_basic_64.result
mysql-test/r/max_heap_table_size_basic_32.result
mysql-test/r/max_heap_table_size_basic_64.result
mysql-test/r/max_seeks_for_key_basic_32.result
mysql-test/r/max_seeks_for_key_basic_64.result
mysql-test/r/max_tmp_tables_basic_32.result
mysql-test/r/max_tmp_tables_basic_64.result
mysql-test/r/max_write_lock_count_basic_32.result
mysql-test/r/max_write_lock_count_basic_64.result
mysql-test/r/min_examined_row_limit_basic_32.result
mysql-test/r/min_examined_row_limit_basic_64.result
mysql-test/r/multi_range_count_basic_32.result
mysql-test/r/multi_range_count_basic_64.result
mysql-test/r/myisam_max_sort_file_size_basic_32.result
mysql-test/r/myisam_max_sort_file_size_basic_64.result
mysql-test/r/myisam_repair_threads_basic_32.result
mysql-test/r/myisam_repair_threads_basic_64.result
mysql-test/r/myisam_sort_buffer_size_basic_32.result
mysql-test/r/myisam_sort_buffer_size_basic_64.result
mysql-test/r/net_retry_count_basic_32.result
mysql-test/r/net_retry_count_basic_64.result
mysql-test/r/query_alloc_block_size_basic_32.result
mysql-test/r/query_alloc_block_size_basic_64.result
mysql-test/r/query_cache_limit_basic_32.result
mysql-test/r/query_cache_limit_basic_64.result
mysql-test/r/query_cache_min_res_unit_basic_32.result
mysql-test/r/query_cache_min_res_unit_basic_64.result
mysql-test/r/query_cache_size_basic_32.result
mysql-test/r/query_cache_size_basic_64.result
mysql-test/r/query_prealloc_size_basic_32.result
mysql-test/r/query_prealloc_size_basic_64.result
mysql-test/r/range_alloc_block_size_basic_32.result
mysql-test/r/range_alloc_block_size_basic_64.result
mysql-test/r/rpl_recovery_rank_basic_32.result
mysql-test/r/rpl_recovery_rank_basic_64.result
mysql-test/r/server_id_basic_32.result
mysql-test/r/server_id_basic_64.result
mysql-test/r/slave_transaction_retries_basic_32.result
mysql-test/r/slave_transaction_retries_basic_64.result
mysql-test/r/sort_buffer_size_basic_32.result
mysql-test/r/sort_buffer_size_basic_64.result
mysql-test/r/sync_binlog_basic_32.result
mysql-test/r/sync_binlog_basic_64.result
mysql-test/r/timestamp_basic_32.result
mysql-test/r/timestamp_basic_64.result
mysql-test/r/tmp_table_size_basic_32.result
mysql-test/r/tmp_table_size_basic_64.result
mysql-test/r/transaction_alloc_block_size_basic_32.result
mysql-test/r/transaction_alloc_block_size_basic_64.result
mysql-test/r/transaction_prealloc_size_basic_32.result
mysql-test/r/transaction_prealloc_size_basic_64.result
mysql-test/r/wait_timeout_basic_32.result
mysql-test/r/wait_timeout_basic_64.result
mysql-test/t/binlog_cache_size_basic_32.test
mysql-test/t/binlog_cache_size_basic_64.test
mysql-test/t/bulk_insert_buffer_size_basic_32.test
mysql-test/t/bulk_insert_buffer_size_basic_64.test
mysql-test/t/concurrent_innodb-master.opt
mysql-test/t/concurrent_innodb.test
mysql-test/t/delayed_insert_limit_basic_32.test
mysql-test/t/delayed_insert_limit_basic_64.test
mysql-test/t/delayed_queue_size_basic_32.test
mysql-test/t/delayed_queue_size_basic_64.test
mysql-test/t/innodb_concurrency_tickets_basic_32.test
mysql-test/t/innodb_concurrency_tickets_basic_64.test
mysql-test/t/innodb_max_purge_lag_basic_32.test
mysql-test/t/innodb_max_purge_lag_basic_64.test
mysql-test/t/innodb_sync_spin_loops_basic_32.test
mysql-test/t/innodb_sync_spin_loops_basic_64.test
mysql-test/t/join_buffer_size_basic_32.test
mysql-test/t/join_buffer_size_basic_64.test
mysql-test/t/key_buffer_size_basic_32.test
mysql-test/t/key_buffer_size_basic_64.test
mysql-test/t/key_cache_age_threshold_basic_32.test
mysql-test/t/key_cache_age_threshold_basic_64.test
mysql-test/t/key_cache_block_size_basic_32.test
mysql-test/t/key_cache_block_size_basic_64.test
mysql-test/t/key_cache_division_limit_basic_32.test
mysql-test/t/key_cache_division_limit_basic_64.test
mysql-test/t/log_warnings_basic_32.test
mysql-test/t/log_warnings_basic_64.test
mysql-test/t/max_binlog_cache_size_basic_32.test
mysql-test/t/max_binlog_cache_size_basic_64.test
mysql-test/t/max_connect_errors_basic_32.test
mysql-test/t/max_connect_errors_basic_64.test
mysql-test/t/max_heap_table_size_basic_32.test
mysql-test/t/max_heap_table_size_basic_64.test
mysql-test/t/max_seeks_for_key_basic_32.test
mysql-test/t/max_seeks_for_key_basic_64.test
mysql-test/t/max_tmp_tables_basic_32.test
mysql-test/t/max_tmp_tables_basic_64.test
mysql-test/t/max_write_lock_count_basic_32.test
mysql-test/t/max_write_lock_count_basic_64.test
mysql-test/t/min_examined_row_limit_basic_32.test
mysql-test/t/min_examined_row_limit_basic_64.test
mysql-test/t/multi_range_count_basic_32.test
mysql-test/t/multi_range_count_basic_64.test
mysql-test/t/myisam_max_sort_file_size_basic_32.test
mysql-test/t/myisam_max_sort_file_size_basic_64.test
mysql-test/t/myisam_repair_threads_basic_32.test
mysql-test/t/myisam_repair_threads_basic_64.test
mysql-test/t/myisam_sort_buffer_size_basic_32.test
mysql-test/t/myisam_sort_buffer_size_basic_64.test
mysql-test/t/net_retry_count_basic_32.test
mysql-test/t/net_retry_count_basic_64.test
mysql-test/t/query_alloc_block_size_basic_32.test
mysql-test/t/query_alloc_block_size_basic_64.test
mysql-test/t/query_cache_limit_basic_32.test
mysql-test/t/query_cache_limit_basic_64.test
mysql-test/t/query_cache_min_res_unit_basic_32.test
mysql-test/t/query_cache_min_res_unit_basic_64.test
mysql-test/t/query_cache_size_basic_32.test
mysql-test/t/query_cache_size_basic_64.test
mysql-test/t/query_prealloc_size_basic_32.test
mysql-test/t/query_prealloc_size_basic_64.test
mysql-test/t/range_alloc_block_size_basic_32.test
mysql-test/t/range_alloc_block_size_basic_64.test
mysql-test/t/rpl_recovery_rank_basic_32.test
mysql-test/t/rpl_recovery_rank_basic_64.test
mysql-test/t/server_id_basic_32.test
mysql-test/t/server_id_basic_64.test
mysql-test/t/slave_transaction_retries_basic_32.test
mysql-test/t/slave_transaction_retries_basic_64.test
mysql-test/t/sort_buffer_size_basic_32.test
mysql-test/t/sort_buffer_size_basic_64.test
mysql-test/t/sync_binlog_basic_32.test
mysql-test/t/sync_binlog_basic_64.test
mysql-test/t/timestamp_basic_32.test
mysql-test/t/timestamp_basic_64.test
mysql-test/t/tmp_table_size_basic_32.test
mysql-test/t/tmp_table_size_basic_64.test
mysql-test/t/transaction_alloc_block_size_basic_32.test
mysql-test/t/transaction_alloc_block_size_basic_64.test
mysql-test/t/transaction_prealloc_size_basic_32.test
mysql-test/t/transaction_prealloc_size_basic_64.test
mysql-test/t/wait_timeout_basic_32.test
mysql-test/t/wait_timeout_basic_64.test
added:
mysql-test/include/have_case_insensitive_file_system.inc
mysql-test/include/have_lowercase2.inc
mysql-test/include/mysqlbinlog_row_engine.inc
mysql-test/include/ps_ddl_1.inc
mysql-test/r/case_insensitive_file_system.require
mysql-test/r/concurrent_innodb_safelog.result
mysql-test/r/concurrent_innodb_unsafelog.result
mysql-test/r/innodb-autoinc-optimize.result
mysql-test/r/innodb-autoinc.result
mysql-test/r/innodb_bug34300.result
mysql-test/r/innodb_bug35220.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/std_data/corrupt_t1#P#p1.MYI
mysql-test/std_data/corrupt_t1.MYI
mysql-test/std_data/parts/t1_will_crash#P#p1_first_1024.MYD
mysql-test/std_data/parts/t1_will_crash#P#p2.MYD
mysql-test/std_data/parts/t1_will_crash#P#p2.MYI
mysql-test/std_data/parts/t1_will_crash#P#p3.MYI
mysql-test/std_data/parts/t1_will_crash#P#p4.MYI
mysql-test/std_data/parts/t1_will_crash#P#p6.MYD
mysql-test/std_data/parts/t1_will_crash#P#p6_2.MYD
mysql-test/std_data/parts/t1_will_crash#P#p6_3.MYD
mysql-test/suite/parts/inc/partition_mgm.inc
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_recover_myisam.result
mysql-test/suite/parts/r/partition_repair_myisam.result
mysql-test/suite/parts/t/partition_mgm_lc0_archive.test
mysql-test/suite/parts/t/partition_mgm_lc0_innodb.test
mysql-test/suite/parts/t/partition_mgm_lc0_memory.test
mysql-test/suite/parts/t/partition_mgm_lc0_myisam.test
mysql-test/suite/parts/t/partition_mgm_lc0_ndb.test
mysql-test/suite/parts/t/partition_mgm_lc1_archive-master.opt
mysql-test/suite/parts/t/partition_mgm_lc1_archive.test
mysql-test/suite/parts/t/partition_mgm_lc1_innodb-master.opt
mysql-test/suite/parts/t/partition_mgm_lc1_innodb.test
mysql-test/suite/parts/t/partition_mgm_lc1_memory-master.opt
mysql-test/suite/parts/t/partition_mgm_lc1_memory.test
mysql-test/suite/parts/t/partition_mgm_lc1_myisam-master.opt
mysql-test/suite/parts/t/partition_mgm_lc1_myisam.test
mysql-test/suite/parts/t/partition_mgm_lc1_ndb-master.opt
mysql-test/suite/parts/t/partition_mgm_lc1_ndb.test
mysql-test/suite/parts/t/partition_mgm_lc2_archive-master.opt
mysql-test/suite/parts/t/partition_mgm_lc2_archive.test
mysql-test/suite/parts/t/partition_mgm_lc2_innodb-master.opt
mysql-test/suite/parts/t/partition_mgm_lc2_innodb.test
mysql-test/suite/parts/t/partition_mgm_lc2_memory-master.opt
mysql-test/suite/parts/t/partition_mgm_lc2_memory.test
mysql-test/suite/parts/t/partition_mgm_lc2_myisam-master.opt
mysql-test/suite/parts/t/partition_mgm_lc2_myisam.test
mysql-test/suite/parts/t/partition_mgm_lc2_ndb-master.opt
mysql-test/suite/parts/t/partition_mgm_lc2_ndb.test
mysql-test/suite/parts/t/partition_recover_myisam-master.opt
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-master.opt
mysql-test/suite/rpl/r/rpl_plugin_load.result
mysql-test/suite/rpl/t/rpl_plugin_load-master.opt
mysql-test/suite/rpl/t/rpl_plugin_load-slave.opt
mysql-test/suite/rpl/t/rpl_plugin_load.test
mysql-test/suite/sys_vars/
mysql-test/suite/sys_vars/README
mysql-test/suite/sys_vars/inc/
mysql-test/suite/sys_vars/inc/binlog_cache_size_basic.inc
mysql-test/suite/sys_vars/inc/bulk_insert_buffer_size_basic.inc
mysql-test/suite/sys_vars/inc/delayed_insert_limit_basic.inc
mysql-test/suite/sys_vars/inc/delayed_queue_size_basic.inc
mysql-test/suite/sys_vars/inc/innodb_concurrency_tickets_basic.inc
mysql-test/suite/sys_vars/inc/innodb_max_purge_lag_basic.inc
mysql-test/suite/sys_vars/inc/innodb_sync_spin_loops_basic.inc
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/key_cache_age_threshold_basic.inc
mysql-test/suite/sys_vars/inc/key_cache_block_size_basic.inc
mysql-test/suite/sys_vars/inc/key_cache_division_limit_basic.inc
mysql-test/suite/sys_vars/inc/log_warnings_basic.inc
mysql-test/suite/sys_vars/inc/max_binlog_cache_size_basic.inc
mysql-test/suite/sys_vars/inc/max_connect_errors_basic.inc
mysql-test/suite/sys_vars/inc/max_heap_table_size_basic.inc
mysql-test/suite/sys_vars/inc/max_seeks_for_key_basic.inc
mysql-test/suite/sys_vars/inc/max_tmp_tables_basic.inc
mysql-test/suite/sys_vars/inc/max_write_lock_count_basic.inc
mysql-test/suite/sys_vars/inc/min_examined_row_limit_basic.inc
mysql-test/suite/sys_vars/inc/multi_range_count_basic.inc
mysql-test/suite/sys_vars/inc/myisam_max_sort_file_size_basic.inc
mysql-test/suite/sys_vars/inc/myisam_repair_threads_basic.inc
mysql-test/suite/sys_vars/inc/myisam_sort_buffer_size_basic.inc
mysql-test/suite/sys_vars/inc/net_retry_count_basic.inc
mysql-test/suite/sys_vars/inc/query_alloc_block_size_basic.inc
mysql-test/suite/sys_vars/inc/query_cache_limit_basic.inc
mysql-test/suite/sys_vars/inc/query_cache_min_res_unit_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/range_alloc_block_size_basic.inc
mysql-test/suite/sys_vars/inc/rpl_recovery_rank_basic.inc
mysql-test/suite/sys_vars/inc/server_id_basic.inc
mysql-test/suite/sys_vars/inc/slave_transaction_retries_basic.inc
mysql-test/suite/sys_vars/inc/sort_buffer_size_basic.inc
mysql-test/suite/sys_vars/inc/sync_binlog_basic.inc
mysql-test/suite/sys_vars/inc/timestamp_basic.inc
mysql-test/suite/sys_vars/inc/tmp_table_size_basic.inc
mysql-test/suite/sys_vars/inc/transaction_alloc_block_size_basic.inc
mysql-test/suite/sys_vars/inc/transaction_prealloc_size_basic.inc
mysql-test/suite/sys_vars/inc/wait_timeout_basic.inc
mysql-test/suite/sys_vars/r/
mysql-test/suite/sys_vars/r/binlog_cache_size_basic_32.result
mysql-test/suite/sys_vars/r/binlog_cache_size_basic_64.result
mysql-test/suite/sys_vars/r/bulk_insert_buffer_size_basic_32.result
mysql-test/suite/sys_vars/r/bulk_insert_buffer_size_basic_64.result
mysql-test/suite/sys_vars/r/delayed_insert_limit_basic_32.result
mysql-test/suite/sys_vars/r/delayed_insert_limit_basic_64.result
mysql-test/suite/sys_vars/r/delayed_queue_size_basic_32.result
mysql-test/suite/sys_vars/r/delayed_queue_size_basic_64.result
mysql-test/suite/sys_vars/r/innodb_concurrency_tickets_basic_32.result
mysql-test/suite/sys_vars/r/innodb_concurrency_tickets_basic_64.result
mysql-test/suite/sys_vars/r/innodb_max_purge_lag_basic_32.result
mysql-test/suite/sys_vars/r/innodb_max_purge_lag_basic_64.result
mysql-test/suite/sys_vars/r/innodb_sync_spin_loops_basic_32.result
mysql-test/suite/sys_vars/r/innodb_sync_spin_loops_basic_64.result
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/key_cache_age_threshold_basic_32.result
mysql-test/suite/sys_vars/r/key_cache_age_threshold_basic_64.result
mysql-test/suite/sys_vars/r/key_cache_block_size_basic_32.result
mysql-test/suite/sys_vars/r/key_cache_block_size_basic_64.result
mysql-test/suite/sys_vars/r/key_cache_division_limit_basic_32.result
mysql-test/suite/sys_vars/r/key_cache_division_limit_basic_64.result
mysql-test/suite/sys_vars/r/log_warnings_basic_32.result
mysql-test/suite/sys_vars/r/log_warnings_basic_64.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/max_connect_errors_basic_32.result
mysql-test/suite/sys_vars/r/max_connect_errors_basic_64.result
mysql-test/suite/sys_vars/r/max_heap_table_size_basic_32.result
mysql-test/suite/sys_vars/r/max_heap_table_size_basic_64.result
mysql-test/suite/sys_vars/r/max_seeks_for_key_basic_32.result
mysql-test/suite/sys_vars/r/max_seeks_for_key_basic_64.result
mysql-test/suite/sys_vars/r/max_tmp_tables_basic_32.result
mysql-test/suite/sys_vars/r/max_tmp_tables_basic_64.result
mysql-test/suite/sys_vars/r/max_write_lock_count_basic_32.result
mysql-test/suite/sys_vars/r/max_write_lock_count_basic_64.result
mysql-test/suite/sys_vars/r/min_examined_row_limit_basic_32.result
mysql-test/suite/sys_vars/r/min_examined_row_limit_basic_64.result
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/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/myisam_repair_threads_basic_32.result
mysql-test/suite/sys_vars/r/myisam_repair_threads_basic_64.result
mysql-test/suite/sys_vars/r/myisam_sort_buffer_size_basic_32.result
mysql-test/suite/sys_vars/r/myisam_sort_buffer_size_basic_64.result
mysql-test/suite/sys_vars/r/net_retry_count_basic_32.result
mysql-test/suite/sys_vars/r/net_retry_count_basic_64.result
mysql-test/suite/sys_vars/r/query_alloc_block_size_basic_32.result
mysql-test/suite/sys_vars/r/query_alloc_block_size_basic_64.result
mysql-test/suite/sys_vars/r/query_cache_limit_basic_32.result
mysql-test/suite/sys_vars/r/query_cache_limit_basic_64.result
mysql-test/suite/sys_vars/r/query_cache_min_res_unit_basic_32.result
mysql-test/suite/sys_vars/r/query_cache_min_res_unit_basic_64.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/query_prealloc_size_basic_64.result
mysql-test/suite/sys_vars/r/range_alloc_block_size_basic_32.result
mysql-test/suite/sys_vars/r/range_alloc_block_size_basic_64.result
mysql-test/suite/sys_vars/r/rpl_recovery_rank_basic_32.result
mysql-test/suite/sys_vars/r/rpl_recovery_rank_basic_64.result
mysql-test/suite/sys_vars/r/server_id_basic_32.result
mysql-test/suite/sys_vars/r/server_id_basic_64.result
mysql-test/suite/sys_vars/r/slave_transaction_retries_basic_32.result
mysql-test/suite/sys_vars/r/slave_transaction_retries_basic_64.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/sync_binlog_basic_32.result
mysql-test/suite/sys_vars/r/sync_binlog_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/tmp_table_size_basic_32.result
mysql-test/suite/sys_vars/r/tmp_table_size_basic_64.result
mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic_32.result
mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic_64.result
mysql-test/suite/sys_vars/r/transaction_prealloc_size_basic_32.result
mysql-test/suite/sys_vars/r/transaction_prealloc_size_basic_64.result
mysql-test/suite/sys_vars/r/wait_timeout_basic_32.result
mysql-test/suite/sys_vars/r/wait_timeout_basic_64.result
mysql-test/suite/sys_vars/t/
mysql-test/suite/sys_vars/t/binlog_cache_size_basic_32.test
mysql-test/suite/sys_vars/t/binlog_cache_size_basic_64.test
mysql-test/suite/sys_vars/t/bulk_insert_buffer_size_basic_32.test
mysql-test/suite/sys_vars/t/bulk_insert_buffer_size_basic_64.test
mysql-test/suite/sys_vars/t/delayed_insert_limit_basic_32.test
mysql-test/suite/sys_vars/t/delayed_insert_limit_basic_64.test
mysql-test/suite/sys_vars/t/delayed_queue_size_basic_32.test
mysql-test/suite/sys_vars/t/delayed_queue_size_basic_64.test
mysql-test/suite/sys_vars/t/innodb_concurrency_tickets_basic_32.test
mysql-test/suite/sys_vars/t/innodb_concurrency_tickets_basic_64.test
mysql-test/suite/sys_vars/t/innodb_max_purge_lag_basic_32.test
mysql-test/suite/sys_vars/t/innodb_max_purge_lag_basic_64.test
mysql-test/suite/sys_vars/t/innodb_sync_spin_loops_basic_32.test
mysql-test/suite/sys_vars/t/innodb_sync_spin_loops_basic_64.test
mysql-test/suite/sys_vars/t/join_buffer_size_basic_32.test
mysql-test/suite/sys_vars/t/join_buffer_size_basic_64.test
mysql-test/suite/sys_vars/t/key_buffer_size_basic_32.test
mysql-test/suite/sys_vars/t/key_buffer_size_basic_64.test
mysql-test/suite/sys_vars/t/key_cache_age_threshold_basic_32.test
mysql-test/suite/sys_vars/t/key_cache_age_threshold_basic_64.test
mysql-test/suite/sys_vars/t/key_cache_block_size_basic_32.test
mysql-test/suite/sys_vars/t/key_cache_block_size_basic_64.test
mysql-test/suite/sys_vars/t/key_cache_division_limit_basic_32.test
mysql-test/suite/sys_vars/t/key_cache_division_limit_basic_64.test
mysql-test/suite/sys_vars/t/log_warnings_basic_32.test
mysql-test/suite/sys_vars/t/log_warnings_basic_64.test
mysql-test/suite/sys_vars/t/max_binlog_cache_size_basic_32.test
mysql-test/suite/sys_vars/t/max_binlog_cache_size_basic_64.test
mysql-test/suite/sys_vars/t/max_connect_errors_basic_32.test
mysql-test/suite/sys_vars/t/max_connect_errors_basic_64.test
mysql-test/suite/sys_vars/t/max_heap_table_size_basic_32.test
mysql-test/suite/sys_vars/t/max_heap_table_size_basic_64.test
mysql-test/suite/sys_vars/t/max_seeks_for_key_basic_32.test
mysql-test/suite/sys_vars/t/max_seeks_for_key_basic_64.test
mysql-test/suite/sys_vars/t/max_tmp_tables_basic_32.test
mysql-test/suite/sys_vars/t/max_tmp_tables_basic_64.test
mysql-test/suite/sys_vars/t/max_write_lock_count_basic_32.test
mysql-test/suite/sys_vars/t/max_write_lock_count_basic_64.test
mysql-test/suite/sys_vars/t/min_examined_row_limit_basic_32.test
mysql-test/suite/sys_vars/t/min_examined_row_limit_basic_64.test
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/myisam_max_sort_file_size_basic_32.test
mysql-test/suite/sys_vars/t/myisam_max_sort_file_size_basic_64.test
mysql-test/suite/sys_vars/t/myisam_repair_threads_basic_32.test
mysql-test/suite/sys_vars/t/myisam_repair_threads_basic_64.test
mysql-test/suite/sys_vars/t/myisam_sort_buffer_size_basic_32.test
mysql-test/suite/sys_vars/t/myisam_sort_buffer_size_basic_64.test
mysql-test/suite/sys_vars/t/net_retry_count_basic_32.test
mysql-test/suite/sys_vars/t/net_retry_count_basic_64.test
mysql-test/suite/sys_vars/t/query_alloc_block_size_basic_32.test
mysql-test/suite/sys_vars/t/query_alloc_block_size_basic_64.test
mysql-test/suite/sys_vars/t/query_cache_limit_basic_32.test
mysql-test/suite/sys_vars/t/query_cache_limit_basic_64.test
mysql-test/suite/sys_vars/t/query_cache_min_res_unit_basic_32.test
mysql-test/suite/sys_vars/t/query_cache_min_res_unit_basic_64.test
mysql-test/suite/sys_vars/t/query_cache_size_basic_32.test
mysql-test/suite/sys_vars/t/query_cache_size_basic_64.test
mysql-test/suite/sys_vars/t/query_prealloc_size_basic_32.test
mysql-test/suite/sys_vars/t/query_prealloc_size_basic_64.test
mysql-test/suite/sys_vars/t/range_alloc_block_size_basic_32.test
mysql-test/suite/sys_vars/t/range_alloc_block_size_basic_64.test
mysql-test/suite/sys_vars/t/rpl_recovery_rank_basic_32.test
mysql-test/suite/sys_vars/t/rpl_recovery_rank_basic_64.test
mysql-test/suite/sys_vars/t/server_id_basic_32.test
mysql-test/suite/sys_vars/t/server_id_basic_64.test
mysql-test/suite/sys_vars/t/slave_transaction_retries_basic_32.test
mysql-test/suite/sys_vars/t/slave_transaction_retries_basic_64.test
mysql-test/suite/sys_vars/t/sort_buffer_size_basic_32.test
mysql-test/suite/sys_vars/t/sort_buffer_size_basic_64.test
mysql-test/suite/sys_vars/t/sync_binlog_basic_32.test
mysql-test/suite/sys_vars/t/sync_binlog_basic_64.test
mysql-test/suite/sys_vars/t/timestamp_basic_32.test
mysql-test/suite/sys_vars/t/timestamp_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/suite/sys_vars/t/transaction_alloc_block_size_basic_32.test
mysql-test/suite/sys_vars/t/transaction_alloc_block_size_basic_64.test
mysql-test/suite/sys_vars/t/transaction_prealloc_size_basic_32.test
mysql-test/suite/sys_vars/t/transaction_prealloc_size_basic_64.test
mysql-test/suite/sys_vars/t/wait_timeout_basic_32.test
mysql-test/suite/sys_vars/t/wait_timeout_basic_64.test
mysql-test/t/concurrent_innodb_safelog-master.opt
mysql-test/t/concurrent_innodb_safelog.test
mysql-test/t/concurrent_innodb_unsafelog-master.opt
mysql-test/t/concurrent_innodb_unsafelog.test
mysql-test/t/innodb-autoinc-optimize.test
mysql-test/t/innodb-autoinc.test
mysql-test/t/innodb_bug34300.test
mysql-test/t/innodb_bug35220.test
mysql-test/t/mysqlbinlog_row.test
mysql-test/t/mysqlbinlog_row_big.test
mysql-test/t/mysqlbinlog_row_innodb.test
mysql-test/t/mysqlbinlog_row_myisam.test
mysql-test/t/mysqlbinlog_row_trans.test
modified:
.bzrignore
BUILD/check-cpu
Makefile.am
client/Makefile.am
client/mysql_upgrade.c
client/mysqlbinlog.cc
config/ac-macros/character_sets.m4
include/my_sys.h
libmysqld/lib_sql.cc
mysql-test/Makefile.am
mysql-test/extra/binlog_tests/binlog_insert_delayed.test
mysql-test/extra/rpl_tests/rpl_row_basic.test
mysql-test/include/concurrent.inc
mysql-test/include/have_lowercase0.inc
mysql-test/include/show_binlog_events.inc
mysql-test/lib/mtr_report.pl
mysql-test/r/csv.result
mysql-test/r/federated.result
mysql-test/r/func_if.result
mysql-test/r/func_regexp.result
mysql-test/r/handler_innodb.result
mysql-test/r/innodb.result
mysql-test/r/innodb_mysql.result
mysql-test/r/join.result
mysql-test/r/lowercase0.require
mysql-test/r/metadata.result
mysql-test/r/partition.result
mysql-test/r/ps_1general.result
mysql-test/r/ps_2myisam.result
mysql-test/r/ps_3innodb.result
mysql-test/r/ps_4heap.result
mysql-test/r/ps_5merge.result
mysql-test/r/ps_ddl.result
mysql-test/r/show_check.result
mysql-test/r/sp.result
mysql-test/r/subselect.result
mysql-test/r/subselect3.result
mysql-test/r/trigger-trans.result
mysql-test/r/type_newdecimal.result
mysql-test/suite/binlog/r/binlog_killed_simulate.result
mysql-test/suite/binlog/r/binlog_row_binlog.result
mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result
mysql-test/suite/binlog/r/binlog_statement_insert_delayed.result
mysql-test/suite/binlog/r/binlog_stm_binlog.result
mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result
mysql-test/suite/funcs_1/datadict/processlist_val.inc
mysql-test/suite/funcs_1/r/processlist_val_no_prot.result
mysql-test/suite/funcs_1/r/processlist_val_ps.result
mysql-test/suite/funcs_1/triggers/triggers_03.inc
mysql-test/suite/funcs_1/triggers/triggers_08.inc
mysql-test/suite/funcs_1/triggers/triggers_1011ext.inc
mysql-test/suite/ndb/r/ndb_partition_key.result
mysql-test/suite/ndb/r/ps_7ndb.result
mysql-test/suite/ndb/t/ndb_partition_key.test
mysql-test/suite/parts/inc/partition_alter4.inc
mysql-test/suite/parts/r/partition_alter1_1_2_innodb.result
mysql-test/suite/parts/r/partition_alter1_1_2_myisam.result
mysql-test/suite/parts/r/partition_alter1_1_innodb.result
mysql-test/suite/parts/r/partition_alter1_1_myisam.result
mysql-test/suite/parts/r/partition_alter1_2_innodb.result
mysql-test/suite/parts/r/partition_alter1_2_myisam.result
mysql-test/suite/parts/r/partition_alter2_innodb.result
mysql-test/suite/parts/r/partition_alter2_myisam.result
mysql-test/suite/parts/r/partition_alter4_innodb.result
mysql-test/suite/parts/r/partition_alter4_myisam.result
mysql-test/suite/parts/r/partition_basic_innodb.result
mysql-test/suite/parts/r/partition_basic_myisam.result
mysql-test/suite/parts/r/partition_basic_symlink_myisam.result
mysql-test/suite/parts/r/partition_engine_innodb.result
mysql-test/suite/parts/r/partition_engine_myisam.result
mysql-test/suite/parts/r/partition_special_innodb.result
mysql-test/suite/parts/t/disabled.def
mysql-test/suite/parts/t/partition_special_innodb.test
mysql-test/suite/rpl/r/rpl_failed_optimize.result
mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result
mysql-test/suite/rpl/r/rpl_loaddata_map.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_stm_log.result
mysql-test/suite/rpl/r/rpl_variables.result
mysql-test/suite/rpl/t/disabled.def
mysql-test/suite/rpl/t/rpl_incident.test
mysql-test/suite/rpl/t/rpl_loaddata_map.test
mysql-test/suite/rpl/t/rpl_trunc_temp.test
mysql-test/suite/rpl/t/rpl_truncate_7ndb_2.test
mysql-test/suite/rpl/t/rpl_variables.test
mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result
mysql-test/suite/rpl_ndb/t/disabled.def
mysql-test/t/csv.test
mysql-test/t/disabled.def
mysql-test/t/federated.test
mysql-test/t/func_if.test
mysql-test/t/func_regexp.test
mysql-test/t/innodb.test
mysql-test/t/join.test
mysql-test/t/lowercase_table3.test
mysql-test/t/partition.test
mysql-test/t/ps_ddl.test
mysql-test/t/show_check.test
mysql-test/t/sp.test
mysql-test/t/subselect.test
mysql-test/t/subselect3.test
mysql-test/t/type_newdecimal.test
mysys/mf_pack.c
mysys/my_static.c
mysys/my_static.h
mysys/safemalloc.c
netware/BUILD/compile-linux-tools
netware/BUILD/nwbootstrap
netware/Makefile.am
netware/mysql_install_db.c
sql/field.h
sql/ha_partition.cc
sql/ha_partition.h
sql/handler.cc
sql/handler.h
sql/item.cc
sql/item.h
sql/item_cmpfunc.cc
sql/item_func.cc
sql/log_event.cc
sql/log_event.h
sql/mysql_priv.h
sql/protocol.cc
sql/rpl_tblmap.cc
sql/rpl_tblmap.h
sql/rpl_utility.h
sql/share/errmsg.txt
sql/sp_head.cc
sql/sql_acl.cc
sql/sql_base.cc
sql/sql_binlog.cc
sql/sql_class.cc
sql/sql_cursor.cc
sql/sql_lex.h
sql/sql_list.h
sql/sql_parse.cc
sql/sql_partition.cc
sql/sql_plugin.cc
sql/sql_select.cc
sql/sql_show.cc
sql/sql_string.h
sql/sql_table.cc
sql/sql_yacc.yy
sql/table.cc
sql/table.h
sql/thr_malloc.cc
storage/csv/ha_tina.cc
storage/federated/ha_federated.cc
storage/innobase/buf/buf0buf.c
storage/innobase/ha/ha0ha.c
storage/innobase/handler/ha_innodb.cc
storage/innobase/include/buf0buf.h
storage/innobase/include/mach0data.h
storage/innobase/include/mach0data.ic
storage/innobase/include/srv0srv.h
storage/innobase/lock/lock0lock.c
storage/innobase/row/row0sel.c
storage/innobase/srv/srv0srv.c
storage/myisam/mi_check.c
strings/decimal.c
support-files/build-tags
tests/mysql_client_test.c
=== modified file 'configure.in'
=== modified file 'configure.in'
--- a/configure.in 2008-08-13 10:45:56 +0000
+++ b/configure.in 2008-08-28 14:51:00 +0000
@@ -10,7 +10,7 @@
#
# When changing major version number please also check switch statement
# in mysqlbinlog::check_master_version().
-AM_INIT_AUTOMAKE(mysql, 5.1.28)
+AM_INIT_AUTOMAKE(mysql, 5.1.30)
AM_CONFIG_HEADER([include/config.h:config.h.in])
PROTOCOL_VERSION=10
=== modified file 'include/my_sys.h'
--- a/include/my_sys.h 2008-08-21 05:06:09 +0000
+++ b/include/my_sys.h 2008-08-23 02:47:43 +0000
@@ -577,6 +577,7 @@
extern File my_dup(File file, myf MyFlags);
extern int my_mkdir(const char *dir, int Flags, myf MyFlags);
extern int my_readlink(char *to, const char *filename, myf MyFlags);
+extern int my_is_symlink(const char *filename);
extern int my_realpath(char *to, const char *filename, myf MyFlags);
extern File my_create_with_symlink(const char *linkname, const char *filename,
int createflags, int access_flags,
=== modified file 'include/myisam.h'
--- a/include/myisam.h 2007-10-11 15:07:40 +0000
+++ b/include/myisam.h 2008-08-23 02:47:43 +0000
@@ -256,6 +256,10 @@
extern my_off_t myisam_max_temp_length;
extern ulong myisam_bulk_insert_tree_size, myisam_data_pointer_size;
+/* usually used to check if a symlink points into the mysql data home */
+/* which is normally forbidden */
+extern int (*myisam_test_invalid_symlink)(const char *filename);
+
/* Prototypes for myisam-functions */
extern int mi_close(struct st_myisam_info *file);
=== modified file 'mysql-test/extra/binlog_tests/database.test'
--- a/mysql-test/extra/binlog_tests/database.test 2007-11-16 14:55:22 +0000
+++ b/mysql-test/extra/binlog_tests/database.test 2008-08-27 08:40:11 +0000
@@ -13,3 +13,18 @@
create procedure sp1 (a int) insert into t1 values(a);
drop database testing_1;
source include/show_binlog_events.inc;
+
+# BUG#38773: DROP DATABASE cause switch to stmt-mode when there are
+# temporary tables open
+
+use test;
+reset master;
+create temporary table tt1 (a int);
+create table t1 (a int);
+insert into t1 values (1);
+disable_warnings;
+drop database if exists mysqltest1;
+enable_warnings;
+insert into t1 values (1);
+drop table tt1, t1;
+source include/show_binlog_events.inc;
=== added file 'mysql-test/include/wait_for_slave_sql_error_and_skip.inc'
--- a/mysql-test/include/wait_for_slave_sql_error_and_skip.inc 1970-01-01 00:00:00 +0000
+++ b/mysql-test/include/wait_for_slave_sql_error_and_skip.inc 2008-08-26 12:11:56 +0000
@@ -0,0 +1,24 @@
+# ==== Purpose ====
+#
+# Wait for slave SQL error, skip the erroneous statement and restart
+# slave
+#
+# ==== Usage ====
+#
+# let show_sql_error=0|1;
+# source include/wait_for_slave_sql_error_and_skip.inc;
+
+echo --source include/wait_for_slave_sql_error_and_skip.inc;
+connection slave;
+source include/wait_for_slave_sql_error.inc;
+if ($show_sql_error)
+{
+ let $error= query_get_value("SHOW SLAVE STATUS", Last_SQL_Error, 1);
+ echo Last_SQL_Error = $error;
+}
+
+# skip the erroneous statement
+set global sql_slave_skip_counter=1;
+start slave;
+source include/wait_for_slave_to_start.inc;
+connection master;
=== modified file 'mysql-test/r/group_min_max.result'
--- a/mysql-test/r/group_min_max.result 2008-08-19 12:21:18 +0000
+++ b/mysql-test/r/group_min_max.result 2008-08-28 09:54:50 +0000
@@ -2372,3 +2372,79 @@
2 1 3 2.0000
1 1 3 2.0000
DROP TABLE t1;
+create table t1 (a int, b int, primary key (a,b), key `index` (a,b)) engine=MyISAM;
+insert into t1 (a,b) values
+(0,0),(0,1),(0,2),(0,3),(0,4),(0,5),(0,6),
+(0,7),(0,8),(0,9),(0,10),(0,11),(0,12),(0,13),
+(1,0),(1,1),(1,2),(1,3),(1,4),(1,5),(1,6),
+(1,7),(1,8),(1,9),(1,10),(1,11),(1,12),(1,13),
+(2,0),(2,1),(2,2),(2,3),(2,4),(2,5),(2,6),
+(2,7),(2,8),(2,9),(2,10),(2,11),(2,12),(2,13),
+(3,0),(3,1),(3,2),(3,3),(3,4),(3,5),(3,6),
+(3,7),(3,8),(3,9),(3,10),(3,11),(3,12),(3,13);
+insert into t1 (a,b) select a, max(b)+1 from t1 where a = 0 group by a;
+select * from t1;
+a b
+0 0
+0 1
+0 2
+0 3
+0 4
+0 5
+0 6
+0 7
+0 8
+0 9
+0 10
+0 11
+0 12
+0 13
+0 14
+1 0
+1 1
+1 2
+1 3
+1 4
+1 5
+1 6
+1 7
+1 8
+1 9
+1 10
+1 11
+1 12
+1 13
+2 0
+2 1
+2 2
+2 3
+2 4
+2 5
+2 6
+2 7
+2 8
+2 9
+2 10
+2 11
+2 12
+2 13
+3 0
+3 1
+3 2
+3 3
+3 4
+3 5
+3 6
+3 7
+3 8
+3 9
+3 10
+3 11
+3 12
+3 13
+explain extended select sql_buffer_result a, max(b)+1 from t1 where a = 0 group by a;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 range PRIMARY,index PRIMARY 4 NULL 3 100.00 Using where; Using index for group-by; Using temporary
+Warnings:
+Note 1003 select sql_buffer_result `test`.`t1`.`a` AS `a`,(max(`test`.`t1`.`b`) + 1) AS `max(b)+1` from `test`.`t1` where (`test`.`t1`.`a` = 0) group by `test`.`t1`.`a`
+drop table t1;
=== modified file 'mysql-test/r/multi_update.result'
--- a/mysql-test/r/multi_update.result 2008-03-29 13:00:12 +0000
+++ b/mysql-test/r/multi_update.result 2008-08-26 10:07:56 +0000
@@ -627,7 +627,7 @@
4 4
show master status /* there must be the UPDATE query event */;
File Position Binlog_Do_DB Binlog_Ignore_DB
-master-bin.000001 197
+master-bin.000001 206
delete from t1;
delete from t2;
insert into t1 values (1,2),(3,4),(4,4);
@@ -637,7 +637,7 @@
ERROR 23000: Duplicate entry '4' for key 'PRIMARY'
show master status /* there must be the UPDATE query event */;
File Position Binlog_Do_DB Binlog_Ignore_DB
-master-bin.000001 212
+master-bin.000001 221
drop table t1, t2;
set @@session.binlog_format= @sav_binlog_format;
drop table if exists t1, t2, t3;
=== modified file 'mysql-test/r/myisam.result'
--- a/mysql-test/r/myisam.result 2008-05-13 12:01:02 +0000
+++ b/mysql-test/r/myisam.result 2008-08-26 13:53:22 +0000
@@ -1831,6 +1831,28 @@
3 2
4 5
DROP TABLE t1, t2;
+CREATE TABLE t1 (a INT) ENGINE=MyISAM CHECKSUM=1 ROW_FORMAT=DYNAMIC;
+INSERT INTO t1 VALUES (0);
+UPDATE t1 SET a=1;
+SELECT a FROM t1;
+a
+1
+CHECK TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+INSERT INTO t1 VALUES (0), (5), (4), (2);
+UPDATE t1 SET a=2;
+SELECT a FROM t1;
+a
+2
+2
+2
+2
+2
+CHECK TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+DROP TABLE t1;
End of 5.0 tests
create table t1 (a int not null, key `a` (a) key_block_size=1024);
show create table t1;
=== modified file 'mysql-test/r/partition_symlink.result'
--- a/mysql-test/r/partition_symlink.result 2008-03-20 11:22:02 +0000
+++ b/mysql-test/r/partition_symlink.result 2008-08-26 14:31:30 +0000
@@ -113,9 +113,9 @@
create table t1 (a int)
partition by key (a)
(partition p0 DATA DIRECTORY 'part-data' INDEX DIRECTORY 'part-data');
-ERROR 42000: Incorrect table name 'part-data'
+Got one of the listed errors
create table t1 (a int)
partition by key (a)
(partition p0,
partition p1 DATA DIRECTORY 'part-data' INDEX DIRECTORY 'part-data');
-ERROR 42000: Incorrect table name 'part-data'
+Got one of the listed errors
=== modified file 'mysql-test/r/subselect.result'
--- a/mysql-test/r/subselect.result 2008-07-31 09:50:24 +0000
+++ b/mysql-test/r/subselect.result 2008-08-27 15:39:09 +0000
@@ -4409,4 +4409,43 @@
3 30
2 20
DROP TABLE t1,t2;
+CREATE TABLE t1 (a int, b int, PRIMARY KEY (a), KEY b (b));
+INSERT INTO t1 VALUES (1,NULL), (9,NULL);
+CREATE TABLE t2 (
+a int,
+b int,
+c int,
+d int,
+PRIMARY KEY (a),
+UNIQUE KEY b (b,c,d),
+KEY b_2 (b),
+KEY c (c),
+KEY d (d)
+);
+INSERT INTO t2 VALUES
+(43, 2, 11 ,30),
+(44, 2, 12 ,30),
+(45, 1, 1 ,10000),
+(46, 1, 2 ,10000),
+(556,1, 32 ,10000);
+CREATE TABLE t3 (
+a int,
+b int,
+c int,
+PRIMARY KEY (a),
+UNIQUE KEY b (b,c),
+KEY c (c),
+KEY b_2 (b)
+);
+INSERT INTO t3 VALUES (1,1,1), (2,32,1);
+explain
+SELECT t1.a, (SELECT 1 FROM t2 WHERE t2.b=t3.c AND t2.c=t1.a ORDER BY t2.d LIMIT 1) AS incorrect FROM t1, t3 WHERE t3.b=t1.a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t3 index b,b_2 b 10 NULL 2 Using index
+1 PRIMARY t1 eq_ref PRIMARY PRIMARY 4 test.t3.b 1 Using index
+2 DEPENDENT SUBQUERY t2 index b,b_2,c d 5 NULL 1 Using where
+SELECT t1.a, (SELECT 1 FROM t2 WHERE t2.b=t3.c AND t2.c=t1.a ORDER BY t2.d LIMIT 1) AS incorrect FROM t1, t3 WHERE t3.b=t1.a;
+a incorrect
+1 1
+DROP TABLE t1,t2,t3;
End of 5.1 tests.
=== modified file 'mysql-test/r/symlink.result'
--- a/mysql-test/r/symlink.result 2008-03-20 11:22:02 +0000
+++ b/mysql-test/r/symlink.result 2008-08-26 09:50:32 +0000
@@ -55,13 +55,9 @@
`d` int(11) NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=MyISAM AUTO_INCREMENT=16725 DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/tmp/' INDEX DIRECTORY='MYSQLTEST_VARDIR/run/'
-create table t1 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam data directory="tmp";
-Got one of the listed errors
create database mysqltest;
create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam index directory="/this-dir-does-not-exist";
Got one of the listed errors
-create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam index directory="not-hard-path";
-Got one of the listed errors
create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam index directory="MYSQLTEST_VARDIR/run";
Got one of the listed errors
create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam data directory="MYSQLTEST_VARDIR/tmp";
=== modified file 'mysql-test/r/type_bit.result'
--- a/mysql-test/r/type_bit.result 2007-12-07 14:15:58 +0000
+++ b/mysql-test/r/type_bit.result 2008-08-28 09:54:50 +0000
@@ -684,6 +684,30 @@
1
1
DROP TABLE t1;
+CREATE TABLE t1 (b BIT NOT NULL, i2 INTEGER NOT NULL, s VARCHAR(255) NOT NULL);
+INSERT INTO t1 VALUES(0x01,100,''), (0x00,300,''), (0x01,200,''), (0x00,100,'');
+SELECT HEX(b), i2 FROM t1 WHERE (i2>=100 AND i2<201) AND b=TRUE;
+HEX(b) i2
+1 100
+1 200
+CREATE TABLE t2 (b1 BIT NOT NULL, b2 BIT NOT NULL, i2 INTEGER NOT NULL,
+s VARCHAR(255) NOT NULL);
+INSERT INTO t2 VALUES (0x01,0x00,100,''), (0x00,0x01,300,''),
+(0x01,0x00,200,''), (0x00,0x01,100,'');
+SELECT HEX(b1), i2 FROM t2 WHERE (i2>=100 AND i2<201) AND b1=TRUE;
+HEX(b1) i2
+1 100
+1 200
+SELECT HEX(b2), i2 FROM t2 WHERE (i2>=100 AND i2<201) AND b2=FALSE;
+HEX(b2) i2
+0 100
+0 200
+SELECT HEX(b1), HEX(b2), i2 FROM t2
+WHERE (i2>=100 AND i2<201) AND b1=TRUE AND b2=FALSE;
+HEX(b1) HEX(b2) i2
+1 0 100
+1 0 200
+DROP TABLE t1, t2;
End of 5.0 tests
create table t1(a bit(7));
insert into t1 values(0x40);
=== modified file 'mysql-test/suite/binlog/r/binlog_database.result'
--- a/mysql-test/suite/binlog/r/binlog_database.result 2008-05-16 15:35:15 +0000
+++ b/mysql-test/suite/binlog/r/binlog_database.result 2008-08-27 08:40:11 +0000
@@ -17,6 +17,22 @@
master-bin.000001 # Query # # use `testing_1`; CREATE DEFINER=`root`@`localhost` PROCEDURE `sp1`(a int)
insert into t1 values(a)
master-bin.000001 # Query # # drop database testing_1
+use test;
+reset master;
+create temporary table tt1 (a int);
+create table t1 (a int);
+insert into t1 values (1);
+drop database if exists mysqltest1;
+insert into t1 values (1);
+drop table tt1, t1;
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # use `test`; create temporary table tt1 (a int)
+master-bin.000001 # Query # # use `test`; create table t1 (a int)
+master-bin.000001 # Query # # use `test`; insert into t1 values (1)
+master-bin.000001 # Query # # drop database if exists mysqltest1
+master-bin.000001 # Query # # use `test`; insert into t1 values (1)
+master-bin.000001 # Query # # use `test`; drop table tt1, t1
set binlog_format=mixed;
reset master;
create database testing_1;
@@ -36,6 +52,22 @@
master-bin.000001 # Query # # use `testing_1`; CREATE DEFINER=`root`@`localhost` PROCEDURE `sp1`(a int)
insert into t1 values(a)
master-bin.000001 # Query # # drop database testing_1
+use test;
+reset master;
+create temporary table tt1 (a int);
+create table t1 (a int);
+insert into t1 values (1);
+drop database if exists mysqltest1;
+insert into t1 values (1);
+drop table tt1, t1;
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # use `test`; create temporary table tt1 (a int)
+master-bin.000001 # Query # # use `test`; create table t1 (a int)
+master-bin.000001 # Query # # use `test`; insert into t1 values (1)
+master-bin.000001 # Query # # drop database if exists mysqltest1
+master-bin.000001 # Query # # use `test`; insert into t1 values (1)
+master-bin.000001 # Query # # use `test`; drop table tt1, t1
set binlog_format=row;
reset master;
create database testing_1;
@@ -55,6 +87,27 @@
master-bin.000001 # Query # # use `testing_1`; CREATE DEFINER=`root`@`localhost` PROCEDURE `sp1`(a int)
insert into t1 values(a)
master-bin.000001 # Query # # drop database testing_1
+use test;
+reset master;
+create temporary table tt1 (a int);
+create table t1 (a int);
+insert into t1 values (1);
+drop database if exists mysqltest1;
+insert into t1 values (1);
+drop table tt1, t1;
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # use `test`; create table t1 (a int)
+master-bin.000001 # Query # # use `test`; BEGIN
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # use `test`; COMMIT
+master-bin.000001 # Query # # drop database if exists mysqltest1
+master-bin.000001 # Query # # use `test`; BEGIN
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # use `test`; COMMIT
+master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
show databases;
Database
information_schema
=== modified file 'mysql-test/suite/binlog/r/binlog_innodb.result'
--- a/mysql-test/suite/binlog/r/binlog_innodb.result 2007-12-14 13:40:45 +0000
+++ b/mysql-test/suite/binlog/r/binlog_innodb.result 2008-08-27 14:17:55 +0000
@@ -115,14 +115,14 @@
DROP TABLE t1;
show status like "binlog_cache_use";
Variable_name Value
-Binlog_cache_use 13
+Binlog_cache_use 15
show status like "binlog_cache_disk_use";
Variable_name Value
Binlog_cache_disk_use 0
create table t1 (a int) engine=innodb;
show status like "binlog_cache_use";
Variable_name Value
-Binlog_cache_use 14
+Binlog_cache_use 16
show status like "binlog_cache_disk_use";
Variable_name Value
Binlog_cache_disk_use 1
@@ -131,7 +131,7 @@
commit;
show status like "binlog_cache_use";
Variable_name Value
-Binlog_cache_use 15
+Binlog_cache_use 17
show status like "binlog_cache_disk_use";
Variable_name Value
Binlog_cache_disk_use 1
=== modified file 'mysql-test/suite/jp/std_data/jisx0208_sjis2.dat'
--- a/mysql-test/suite/jp/std_data/jisx0208_sjis2.dat 2005-01-07 12:32:05 +0000
+++ b/mysql-test/suite/jp/std_data/jisx0208_sjis2.dat 2008-07-29 05:43:57 +0000
@@ -1,2 +1,1 @@
â\Å\ò\ù\ì\ë\Ä\É\ô\ö\û\ÿ\æ\Æ\Ö\Ü\¢\£\¥\₧\
-
=== modified file 'mysql-test/suite/jp/t/disabled.def'
--- a/mysql-test/suite/jp/t/disabled.def 2008-05-15 16:01:13 +0000
+++ b/mysql-test/suite/jp/t/disabled.def 2008-07-29 05:43:57 +0000
@@ -9,5 +9,3 @@
# Do not use any TAB characters for whitespace.
#
##############################################################################
-jp_convert_sjis : Bug#36597 Testsuite "jp": Suspicious results for some tests
-jp_select_sjis : Bug#36597 Testsuite "jp": Suspicious results for some tests
=== added file 'mysql-test/suite/rpl/r/rpl_filter_tables_not_exist.result'
--- a/mysql-test/suite/rpl/r/rpl_filter_tables_not_exist.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/rpl/r/rpl_filter_tables_not_exist.result 2008-08-26 12:11:56 +0000
@@ -0,0 +1,151 @@
+stop slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+start slave;
+CREATE TABLE t1 (id int, a int);
+CREATE TABLE t2 (id int, b int);
+CREATE TABLE t3 (id int, c int);
+CREATE TABLE t4 (id int, d int);
+CREATE TABLE t5 (id int, e int);
+CREATE TABLE t6 (id int, f int);
+CREATE TABLE t7 (id int, g int);
+CREATE TABLE t8 (id int, h int);
+CREATE TABLE t9 (id int, i int);
+INSERT INTO t1 VALUES (1, 1), (2, 2), (3, 3);
+INSERT INTO t2 VALUES (1, 1), (2, 2), (3, 3);
+INSERT INTO t3 VALUES (1, 1), (2, 2), (3, 3);
+INSERT INTO t4 VALUES (1, 1), (2, 2), (3, 3);
+INSERT INTO t5 VALUES (1, 1), (2, 2), (3, 3);
+INSERT INTO t6 VALUES (1, 1), (2, 2), (3, 3);
+INSERT INTO t7 VALUES (1, 1), (2, 2), (3, 3);
+INSERT INTO t8 VALUES (1, 1), (2, 2), (3, 3);
+INSERT INTO t9 VALUES (1, 1), (2, 2), (3, 3);
+[on slave]
+SHOW TABLES LIKE 't%';
+Tables_in_test (t%)
+t1
+t2
+t3
+[on master]
+UPDATE t7 LEFT JOIN t4 ON (t4.id=t7.id) SET d=0, g=0 where t7.id=1;
+UPDATE t7 LEFT JOIN (t4, t5, t6) ON (t7.id=t4.id and t7.id=t5.id and t7.id=t6.id) SET d=0, e=0, f=0, g=0 where t7.id=1;
+UPDATE t4 LEFT JOIN (t7, t8, t9) ON (t4.id=t7.id and t4.id=t8.id and t4.id=t9.id) SET d=0, g=0, h=0, i=0 where t4.id=1;
+UPDATE t7 LEFT JOIN (t8, t9) ON (t7.id=t8.id and t7.id=t9.id) SET g=0, h=0, i=0 where t7.id=1;
+UPDATE t1 LEFT JOIN t4 ON (t1.id=t4.id) SET d=0 where t1.id=1;
+UPDATE t1 LEFT JOIN t7 ON (t1.id=t7.id) SET g=0 where t1.id=1;
+UPDATE t1 LEFT JOIN (t4, t5, t6) ON (t1.id=t4.id and t1.id=t5.id and t1.id=t6.id) SET d=0, e=0, f=0 where t1.id=1;
+UPDATE t1 LEFT JOIN (t4, t5, t8) ON (t1.id=t4.id and t1.id=t5.id and t1.id=t8.id) SET d=0, e=0, h=0 where t1.id=1;
+UPDATE t1 LEFT JOIN (t7, t8, t5) ON (t1.id=t7.id and t1.id=t8.id and t1.id=t5.id) SET g=0, h=0, e=0 where t1.id=1;
+UPDATE t1 LEFT JOIN (t2, t3, t5) ON (t1.id=t2.id and t1.id=t3.id and t1.id=t5.id) SET e=0 where t1.id=1;
+UPDATE t4 LEFT JOIN t1 ON (t1.id=t4.id) SET a=0, d=0 where t4.id=1;
+UPDATE t4 LEFT JOIN (t1, t7) ON (t4.id=t1.id and t7.id=t4.id) SET a = 0, d=0, g=0 where t4.id=1;
+UPDATE t4 LEFT JOIN (t1, t2, t3) ON (t1.id=t4.id and t2.id=t4.id and t3.id=t4.id) SET a=0, b=0, c=0, d=0 where t4.id=1;
+UPDATE t4 LEFT JOIN (t1, t2, t5) ON (t1.id=t4.id and t2.id=t4.id and t5.id=t4.id) SET a=0, b=0, e=0, d=0 where t4.id=1;
+UPDATE t4 LEFT JOIN (t1, t6, t7) ON (t4.id=t1.id and t4.id=t6.id and t4.id=t7.id) SET a=0, d=0, f=0, g=0 where t4.id=1;
+UPDATE t7 LEFT JOIN (t4, t1, t2) ON (t7.id=t4.id and t7.id=t1.id and t7.id=t2.id) SET a=0, b=0, d=0, g=0 where t7.id=1;
+UPDATE t7 LEFT JOIN (t8, t4, t1) ON (t7.id=t8.id and t7.id=t4.id and t7.id=t1.id) SET a=0, d=0, g=0, h=0 where t7.id=1;
+UPDATE t1 LEFT JOIN t4 ON (t1.id=t4.id) SET a=0 where t1.id=1;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN t4 ON (t1.id=t4.id) SET a=0 where t1.id=1'
+set global sql_slave_skip_counter=1;
+start slave;
+UPDATE t1 LEFT JOIN (t4, t7) ON (t1.id=t4.id and t1.id=t7.id) SET a=0 where t1.id=1;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t4, t7) ON (t1.id=t4.id and t1.id=t7.id) SET a=0 where t1.id=1'
+set global sql_slave_skip_counter=1;
+start slave;
+UPDATE t1 LEFT JOIN (t2, t4, t7) ON (t1.id=t2.id and t1.id=t4.id and t1.id=t7.id) SET a=0, b=0 where t1.id=1;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t2, t4, t7) ON (t1.id=t2.id and t1.id=t4.id and t1.id=t7.id) SET a=0, b=0 where t1.id=1'
+set global sql_slave_skip_counter=1;
+start slave;
+UPDATE t1 LEFT JOIN (t2, t3, t7) ON (t1.id=t2.id and t1.id=t3.id and t1.id=t7.id) SET a=0, b=0, c=0 where t1.id=1;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t2, t3, t7) ON (t1.id=t2.id and t1.id=t3.id and t1.id=t7.id) SET a=0, b=0, c=0 where t1.id=1'
+set global sql_slave_skip_counter=1;
+start slave;
+UPDATE t1 LEFT JOIN t7 ON (t1.id=t7.id) SET a=0, g=0 where t1.id=1;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN t7 ON (t1.id=t7.id) SET a=0, g=0 where t1.id=1'
+set global sql_slave_skip_counter=1;
+start slave;
+UPDATE t7 LEFT JOIN t1 ON (t1.id=t7.id) SET a=0, g=0 where t7.id=1;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t7 LEFT JOIN t1 ON (t1.id=t7.id) SET a=0, g=0 where t7.id=1'
+set global sql_slave_skip_counter=1;
+start slave;
+UPDATE t1 LEFT JOIN (t4, t5, t7) ON (t1.id=t4.id and t1.id=t5.id and t1.id=t7.id) SET a=0, g=0 where t1.id=1;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t4, t5, t7) ON (t1.id=t4.id and t1.id=t5.id and t1.id=t7.id) SET a=0, g=0 where t1.id=1'
+set global sql_slave_skip_counter=1;
+start slave;
+UPDATE t1 LEFT JOIN (t4, t7, t8) ON (t1.id=t4.id and t1.id=t7.id and t1.id=t8.id) SET a=0, g=0 where t1.id=1;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t4, t7, t8) ON (t1.id=t4.id and t1.id=t7.id and t1.id=t8.id) SET a=0, g=0 where t1.id=1'
+set global sql_slave_skip_counter=1;
+start slave;
+UPDATE t1 LEFT JOIN (t7, t8, t9) ON (t1.id=t7.id and t1.id=t8.id and t1.id=t9.id) SET a=0, g=0, h=0, i=0 where t1.id=1;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t7, t8, t9) ON (t1.id=t7.id and t1.id=t8.id and t1.id=t9.id) SET a=0, g=0, h=0, i=0 where t1.id=1'
+set global sql_slave_skip_counter=1;
+start slave;
+UPDATE t7 LEFT JOIN (t1, t2, t3) ON (t7.id=t1.id and t7.id=t2.id and t7.id=t3.id) SET g=0, a=0, b=0, c=0 where t7.id=1;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t7 LEFT JOIN (t1, t2, t3) ON (t7.id=t1.id and t7.id=t2.id and t7.id=t3.id) SET g=0, a=0, b=0, c=0 where t7.id=1'
+set global sql_slave_skip_counter=1;
+start slave;
+UPDATE t7 LEFT JOIN (t4, t5, t3) ON (t7.id=t4.id and t7.id=t5.id and t7.id=t3.id) SET g=0, c=0 where t7.id=1;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t7 LEFT JOIN (t4, t5, t3) ON (t7.id=t4.id and t7.id=t5.id and t7.id=t3.id) SET g=0, c=0 where t7.id=1'
+set global sql_slave_skip_counter=1;
+start slave;
+UPDATE t7 LEFT JOIN (t8, t9, t3) ON (t7.id=t8.id and t7.id=t9.id and t7.id=t3.id) SET g=0, h=0, i=0, c=0 where t7.id=1;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t7 LEFT JOIN (t8, t9, t3) ON (t7.id=t8.id and t7.id=t9.id and t7.id=t3.id) SET g=0, h=0, i=0, c=0 where t7.id=1'
+set global sql_slave_skip_counter=1;
+start slave;
+UPDATE t1 LEFT JOIN t4 ON (t1.id=t4.id) SET a=0, d=0 where t1.id=1;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN t4 ON (t1.id=t4.id) SET a=0, d=0 where t1.id=1'
+set global sql_slave_skip_counter=1;
+start slave;
+UPDATE t1 LEFT JOIN (t4, t5, t6) ON (t1.id=t4.id and t1.id=t5.id and t1.id=t6.id) SET a=0, d=0, e=0, f=0 where t1.id=1;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t4, t5, t6) ON (t1.id=t4.id and t1.id=t5.id and t1.id=t6.id) SET a=0, d=0, e=0, f=0 where t1.id=1'
+set global sql_slave_skip_counter=1;
+start slave;
+UPDATE t4 LEFT JOIN (t1, t5, t6) ON (t4.id=t1.id and t4.id=t5.id and t4.id=t6.id) SET a=0, e=0, f=0 where t4.id=1;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t4 LEFT JOIN (t1, t5, t6) ON (t4.id=t1.id and t4.id=t5.id and t4.id=t6.id) SET a=0, e=0, f=0 where t4.id=1'
+set global sql_slave_skip_counter=1;
+start slave;
+UPDATE t7 LEFT JOIN (t1, t4, t2) ON (t7.id=t1.id and t7.id=t4.id and t7.id=t2.id) SET a=0, b=0, d=0, g=0 where t7.id=1;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t7 LEFT JOIN (t1, t4, t2) ON (t7.id=t1.id and t7.id=t4.id and t7.id=t2.id) SET a=0, b=0, d=0, g=0 where t7.id=1'
+set global sql_slave_skip_counter=1;
+start slave;
+[on slave]
+show tables like 't%';
+Tables_in_test (t%)
+t1
+t2
+t3
+SELECT * FROM t1;
+id a
+1 1
+2 2
+3 3
+SELECT * FROM t2;
+id b
+1 1
+2 2
+3 3
+SELECT * FROM t3;
+id c
+1 1
+2 2
+3 3
+[on master]
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
=== added file 'mysql-test/suite/rpl/t/rpl_filter_tables_not_exist-slave.opt'
--- a/mysql-test/suite/rpl/t/rpl_filter_tables_not_exist-slave.opt 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/rpl/t/rpl_filter_tables_not_exist-slave.opt 2008-08-26 10:01:49 +0000
@@ -0,0 +1,1 @@
+--replicate-do-table=test.t1 --replicate-do-table=test.t2 --replicate-do-table=test.t3 --replicate-ignore-table=test.t4 --replicate-ignore-table=test.t5 --replicate-ignore-table=test.t6
=== added file 'mysql-test/suite/rpl/t/rpl_filter_tables_not_exist.test'
--- a/mysql-test/suite/rpl/t/rpl_filter_tables_not_exist.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/rpl/t/rpl_filter_tables_not_exist.test 2008-08-26 10:01:49 +0000
@@ -0,0 +1,205 @@
+# Test evaluation of replication table filter rules
+#
+# ==== Purpose ====
+#
+# Test if replication table filter rules are properly evaluated when
+# some of the tables referenced by the multiple-table update do not
+# exist on slave.
+#
+# ==== Method ====
+#
+# Master creates tables t1, t2, t3, t4, t5, t6, t7, t8, t9 and the
+# slave is started with the following replication table filter rules:
+#
+# --replicate-do-table=t1
+# --replicate-do-table=t2
+# --replicate-do-table=t3
+#
+# and
+#
+# --replicate-ignore-table=t4
+# --replicate-ignore-table=t5
+# --replicate-ignore-table=t6
+#
+# So the slave only replicate changes to tables t1, t2 and t3 and only
+# these tables exist on slave.
+#
+# From now on, tables t1, t2, and t3 are referenced as do tables,
+# tables t4, t5, t6 are referenced as ignore tables, and tables t7,
+# t8, t9 are referenced as other tables.
+#
+# All multi-table update tests reference tables that are not do
+# tables, which do not exist on slave. And the following situations
+# of multi-table update will be tested:
+#
+# 1. Do tables are not referenced at all
+# 2. Do tables are not referenced for update
+# 3. Ignore tables are referenced for update before do tables
+# 4. Only do tables are referenced for update
+# 5. Do tables and other tables are referenced for update
+# 6. Do tables are referenced for update before ignore tables
+#
+# For 1, 2 and 3, the statement should be ignored by slave, for 4, 5
+# and 6 the statement should be accepted by slave and cause an error
+# because of non-exist tables.
+#
+# ==== Related bugs ====
+#
+# BUG#37051 Replication rules not evaluated correctly
+
+
+source include/have_binlog_format_statement.inc;
+source include/master-slave.inc;
+
+# These tables are mentioned in do-table rules
+CREATE TABLE t1 (id int, a int);
+CREATE TABLE t2 (id int, b int);
+CREATE TABLE t3 (id int, c int);
+
+# These tables are mentioned in ignore-table rules
+CREATE TABLE t4 (id int, d int);
+CREATE TABLE t5 (id int, e int);
+CREATE TABLE t6 (id int, f int);
+
+# These tables are not mentioned in do-table or ignore-table rules
+CREATE TABLE t7 (id int, g int);
+CREATE TABLE t8 (id int, h int);
+CREATE TABLE t9 (id int, i int);
+
+INSERT INTO t1 VALUES (1, 1), (2, 2), (3, 3);
+INSERT INTO t2 VALUES (1, 1), (2, 2), (3, 3);
+INSERT INTO t3 VALUES (1, 1), (2, 2), (3, 3);
+
+INSERT INTO t4 VALUES (1, 1), (2, 2), (3, 3);
+INSERT INTO t5 VALUES (1, 1), (2, 2), (3, 3);
+INSERT INTO t6 VALUES (1, 1), (2, 2), (3, 3);
+
+INSERT INTO t7 VALUES (1, 1), (2, 2), (3, 3);
+INSERT INTO t8 VALUES (1, 1), (2, 2), (3, 3);
+INSERT INTO t9 VALUES (1, 1), (2, 2), (3, 3);
+
+# Only t1, t2, t3 should be replicated to slave
+sync_slave_with_master;
+echo [on slave];
+SHOW TABLES LIKE 't%';
+
+connection master;
+echo [on master];
+
+#
+# Do tables are not referenced, these statements should be ignored by
+# slave.
+#
+UPDATE t7 LEFT JOIN t4 ON (t4.id=t7.id) SET d=0, g=0 where t7.id=1;
+UPDATE t7 LEFT JOIN (t4, t5, t6) ON (t7.id=t4.id and t7.id=t5.id and t7.id=t6.id) SET d=0, e=0, f=0, g=0 where t7.id=1;
+UPDATE t4 LEFT JOIN (t7, t8, t9) ON (t4.id=t7.id and t4.id=t8.id and t4.id=t9.id) SET d=0, g=0, h=0, i=0 where t4.id=1;
+UPDATE t7 LEFT JOIN (t8, t9) ON (t7.id=t8.id and t7.id=t9.id) SET g=0, h=0, i=0 where t7.id=1;
+
+#
+# Do tables are not referenced for update, these statements should be
+# ignored by slave.
+#
+UPDATE t1 LEFT JOIN t4 ON (t1.id=t4.id) SET d=0 where t1.id=1;
+UPDATE t1 LEFT JOIN t7 ON (t1.id=t7.id) SET g=0 where t1.id=1;
+UPDATE t1 LEFT JOIN (t4, t5, t6) ON (t1.id=t4.id and t1.id=t5.id and t1.id=t6.id) SET d=0, e=0, f=0 where t1.id=1;
+UPDATE t1 LEFT JOIN (t4, t5, t8) ON (t1.id=t4.id and t1.id=t5.id and t1.id=t8.id) SET d=0, e=0, h=0 where t1.id=1;
+UPDATE t1 LEFT JOIN (t7, t8, t5) ON (t1.id=t7.id and t1.id=t8.id and t1.id=t5.id) SET g=0, h=0, e=0 where t1.id=1;
+UPDATE t1 LEFT JOIN (t2, t3, t5) ON (t1.id=t2.id and t1.id=t3.id and t1.id=t5.id) SET e=0 where t1.id=1;
+
+#
+# Ignore tables are referenced for update before do tables, these
+# statements should be ignore by slave.
+#
+UPDATE t4 LEFT JOIN t1 ON (t1.id=t4.id) SET a=0, d=0 where t4.id=1;
+UPDATE t4 LEFT JOIN (t1, t7) ON (t4.id=t1.id and t7.id=t4.id) SET a = 0, d=0, g=0 where t4.id=1;
+UPDATE t4 LEFT JOIN (t1, t2, t3) ON (t1.id=t4.id and t2.id=t4.id and t3.id=t4.id) SET a=0, b=0, c=0, d=0 where t4.id=1;
+UPDATE t4 LEFT JOIN (t1, t2, t5) ON (t1.id=t4.id and t2.id=t4.id and t5.id=t4.id) SET a=0, b=0, e=0, d=0 where t4.id=1;
+UPDATE t4 LEFT JOIN (t1, t6, t7) ON (t4.id=t1.id and t4.id=t6.id and t4.id=t7.id) SET a=0, d=0, f=0, g=0 where t4.id=1;
+UPDATE t7 LEFT JOIN (t4, t1, t2) ON (t7.id=t4.id and t7.id=t1.id and t7.id=t2.id) SET a=0, b=0, d=0, g=0 where t7.id=1;
+UPDATE t7 LEFT JOIN (t8, t4, t1) ON (t7.id=t8.id and t7.id=t4.id and t7.id=t1.id) SET a=0, d=0, g=0, h=0 where t7.id=1;
+
+# Sync slave to make sure all above statements are correctly ignored,
+# if any of the above statement are not ignored, it would cause error
+# and stop slave sql thread.
+sync_slave_with_master;
+connection master;
+
+# Parameter for include/wait_for_slave_sql_error_and_skip.inc, ask it
+# to show SQL error message
+let show_sql_error=1;
+
+#
+# Only do tables are referenced for update, these statements should
+# cause error on slave
+#
+UPDATE t1 LEFT JOIN t4 ON (t1.id=t4.id) SET a=0 where t1.id=1;
+source include/wait_for_slave_sql_error_and_skip.inc;
+
+UPDATE t1 LEFT JOIN (t4, t7) ON (t1.id=t4.id and t1.id=t7.id) SET a=0 where t1.id=1;
+source include/wait_for_slave_sql_error_and_skip.inc;
+
+UPDATE t1 LEFT JOIN (t2, t4, t7) ON (t1.id=t2.id and t1.id=t4.id and t1.id=t7.id) SET a=0, b=0 where t1.id=1;
+source include/wait_for_slave_sql_error_and_skip.inc;
+
+UPDATE t1 LEFT JOIN (t2, t3, t7) ON (t1.id=t2.id and t1.id=t3.id and t1.id=t7.id) SET a=0, b=0, c=0 where t1.id=1;
+source include/wait_for_slave_sql_error_and_skip.inc;
+
+#
+# Do tables and other tables are referenced for update, these
+# statements should cause error on slave
+#
+UPDATE t1 LEFT JOIN t7 ON (t1.id=t7.id) SET a=0, g=0 where t1.id=1;
+source include/wait_for_slave_sql_error_and_skip.inc;
+
+UPDATE t7 LEFT JOIN t1 ON (t1.id=t7.id) SET a=0, g=0 where t7.id=1;
+source include/wait_for_slave_sql_error_and_skip.inc;
+
+UPDATE t1 LEFT JOIN (t4, t5, t7) ON (t1.id=t4.id and t1.id=t5.id and t1.id=t7.id) SET a=0, g=0 where t1.id=1;
+source include/wait_for_slave_sql_error_and_skip.inc;
+
+UPDATE t1 LEFT JOIN (t4, t7, t8) ON (t1.id=t4.id and t1.id=t7.id and t1.id=t8.id) SET a=0, g=0 where t1.id=1;
+source include/wait_for_slave_sql_error_and_skip.inc;
+
+UPDATE t1 LEFT JOIN (t7, t8, t9) ON (t1.id=t7.id and t1.id=t8.id and t1.id=t9.id) SET a=0, g=0, h=0, i=0 where t1.id=1;
+source include/wait_for_slave_sql_error_and_skip.inc;
+
+UPDATE t7 LEFT JOIN (t1, t2, t3) ON (t7.id=t1.id and t7.id=t2.id and t7.id=t3.id) SET g=0, a=0, b=0, c=0 where t7.id=1;
+source include/wait_for_slave_sql_error_and_skip.inc;
+
+UPDATE t7 LEFT JOIN (t4, t5, t3) ON (t7.id=t4.id and t7.id=t5.id and t7.id=t3.id) SET g=0, c=0 where t7.id=1;
+source include/wait_for_slave_sql_error_and_skip.inc;
+
+UPDATE t7 LEFT JOIN (t8, t9, t3) ON (t7.id=t8.id and t7.id=t9.id and t7.id=t3.id) SET g=0, h=0, i=0, c=0 where t7.id=1;
+source include/wait_for_slave_sql_error_and_skip.inc;
+
+#
+# Do tables are referenced for update before ignore tables
+#
+UPDATE t1 LEFT JOIN t4 ON (t1.id=t4.id) SET a=0, d=0 where t1.id=1;
+source include/wait_for_slave_sql_error_and_skip.inc;
+
+UPDATE t1 LEFT JOIN (t4, t5, t6) ON (t1.id=t4.id and t1.id=t5.id and t1.id=t6.id) SET a=0, d=0, e=0, f=0 where t1.id=1;
+source include/wait_for_slave_sql_error_and_skip.inc;
+
+UPDATE t4 LEFT JOIN (t1, t5, t6) ON (t4.id=t1.id and t4.id=t5.id and t4.id=t6.id) SET a=0, e=0, f=0 where t4.id=1;
+source include/wait_for_slave_sql_error_and_skip.inc;
+
+UPDATE t7 LEFT JOIN (t1, t4, t2) ON (t7.id=t1.id and t7.id=t4.id and t7.id=t2.id) SET a=0, b=0, d=0, g=0 where t7.id=1;
+source include/wait_for_slave_sql_error_and_skip.inc;
+
+sync_slave_with_master;
+echo [on slave];
+
+# We should only have tables t1, t2, t3 on slave
+show tables like 't%';
+
+# The rows in these tables should remain untouched
+SELECT * FROM t1;
+SELECT * FROM t2;
+SELECT * FROM t3;
+
+# Clean up
+connection master;
+echo [on master];
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+source include/master-slave-end.inc;
=== modified file 'mysql-test/t/group_min_max.test'
--- a/mysql-test/t/group_min_max.test 2008-08-19 12:21:18 +0000
+++ b/mysql-test/t/group_min_max.test 2008-08-28 09:54:50 +0000
@@ -942,3 +942,22 @@
SELECT a, MIN(b), MAX(b), AVG(b) FROM t1 GROUP BY a ORDER BY a DESC;
DROP TABLE t1;
+
+#
+# Bug#38195: Incorrect handling of aggregate functions when loose index scan is
+# used causes server crash.
+#
+create table t1 (a int, b int, primary key (a,b), key `index` (a,b)) engine=MyISAM;
+insert into t1 (a,b) values
+(0,0),(0,1),(0,2),(0,3),(0,4),(0,5),(0,6),
+ (0,7),(0,8),(0,9),(0,10),(0,11),(0,12),(0,13),
+(1,0),(1,1),(1,2),(1,3),(1,4),(1,5),(1,6),
+ (1,7),(1,8),(1,9),(1,10),(1,11),(1,12),(1,13),
+(2,0),(2,1),(2,2),(2,3),(2,4),(2,5),(2,6),
+ (2,7),(2,8),(2,9),(2,10),(2,11),(2,12),(2,13),
+(3,0),(3,1),(3,2),(3,3),(3,4),(3,5),(3,6),
+ (3,7),(3,8),(3,9),(3,10),(3,11),(3,12),(3,13);
+insert into t1 (a,b) select a, max(b)+1 from t1 where a = 0 group by a;
+select * from t1;
+explain extended select sql_buffer_result a, max(b)+1 from t1 where a = 0 group by a;
+drop table t1;
=== modified file 'mysql-test/t/myisam.test'
--- a/mysql-test/t/myisam.test 2008-01-24 17:56:42 +0000
+++ b/mysql-test/t/myisam.test 2008-08-26 13:53:22 +0000
@@ -1169,6 +1169,21 @@
DROP TABLE t1, t2;
+
+#
+# Bug#37310: 'on update CURRENT_TIMESTAMP' option crashes the table
+#
+CREATE TABLE t1 (a INT) ENGINE=MyISAM CHECKSUM=1 ROW_FORMAT=DYNAMIC;
+INSERT INTO t1 VALUES (0);
+UPDATE t1 SET a=1;
+SELECT a FROM t1;
+CHECK TABLE t1;
+INSERT INTO t1 VALUES (0), (5), (4), (2);
+UPDATE t1 SET a=2;
+SELECT a FROM t1;
+CHECK TABLE t1;
+DROP TABLE t1;
+
--echo End of 5.0 tests
=== modified file 'mysql-test/t/partition_symlink.test'
--- a/mysql-test/t/partition_symlink.test 2008-03-20 11:22:02 +0000
+++ b/mysql-test/t/partition_symlink.test 2008-08-26 14:31:30 +0000
@@ -154,7 +154,8 @@
#
# Bug 21350: Data Directory problems
#
--- error ER_WRONG_TABLE_NAME
+# Added ER_WRONG_TABLE_NAME and reported bug#39045
+-- error ER_WRONG_ARGUMENTS, ER_WRONG_TABLE_NAME
create table t1 (a int)
partition by key (a)
(partition p0 DATA DIRECTORY 'part-data' INDEX DIRECTORY 'part-data');
@@ -163,7 +164,8 @@
# Insert a test that manages to create the first partition and fails with
# the second, ensure that we clean up afterwards in a proper manner.
#
---error ER_WRONG_TABLE_NAME
+# Added ER_WRONG_TABLE_NAME and reported bug#39045
+--error ER_WRONG_ARGUMENTS, ER_WRONG_TABLE_NAME
create table t1 (a int)
partition by key (a)
(partition p0,
=== modified file 'mysql-test/t/subselect.test'
--- a/mysql-test/t/subselect.test 2008-07-31 09:50:24 +0000
+++ b/mysql-test/t/subselect.test 2008-08-27 15:39:09 +0000
@@ -3311,4 +3311,48 @@
WHERE EXISTS (SELECT DISTINCT a FROM t2 WHERE t1.a < t2.a ORDER BY b);
DROP TABLE t1,t2;
+#
+# Bug #37548: result value erronously reported being NULL in certain subqueries
+#
+
+CREATE TABLE t1 (a int, b int, PRIMARY KEY (a), KEY b (b));
+
+INSERT INTO t1 VALUES (1,NULL), (9,NULL);
+
+CREATE TABLE t2 (
+ a int,
+ b int,
+ c int,
+ d int,
+ PRIMARY KEY (a),
+ UNIQUE KEY b (b,c,d),
+ KEY b_2 (b),
+ KEY c (c),
+ KEY d (d)
+);
+
+INSERT INTO t2 VALUES
+ (43, 2, 11 ,30),
+ (44, 2, 12 ,30),
+ (45, 1, 1 ,10000),
+ (46, 1, 2 ,10000),
+ (556,1, 32 ,10000);
+
+CREATE TABLE t3 (
+ a int,
+ b int,
+ c int,
+ PRIMARY KEY (a),
+ UNIQUE KEY b (b,c),
+ KEY c (c),
+ KEY b_2 (b)
+);
+
+INSERT INTO t3 VALUES (1,1,1), (2,32,1);
+
+explain
+SELECT t1.a, (SELECT 1 FROM t2 WHERE t2.b=t3.c AND t2.c=t1.a ORDER BY t2.d LIMIT 1) AS incorrect FROM t1, t3 WHERE t3.b=t1.a;
+SELECT t1.a, (SELECT 1 FROM t2 WHERE t2.b=t3.c AND t2.c=t1.a ORDER BY t2.d LIMIT 1) AS incorrect FROM t1, t3 WHERE t3.b=t1.a;
+
+DROP TABLE t1,t2,t3;
--echo End of 5.1 tests.
=== modified file 'mysql-test/t/symlink.test'
--- a/mysql-test/t/symlink.test 2008-03-20 11:22:02 +0000
+++ b/mysql-test/t/symlink.test 2008-08-26 09:50:32 +0000
@@ -65,8 +65,6 @@
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
SHOW CREATE TABLE t9;
---error 1103,1103
-create table t1 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam data directory="tmp";
# Check that we cannot link over a table from another database.
@@ -75,8 +73,9 @@
--error 1,1
create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam index directory="/this-dir-does-not-exist";
---error 1103,1103
-create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam index directory="not-hard-path";
+# temporarily disabled as it returns different result in the embedded server
+# --error 1210, 1210
+# create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam index directory="not-hard-path";
# Should fail becasue the file t9.MYI already exist in 'run'
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
=== modified file 'mysql-test/t/type_bit.test'
--- a/mysql-test/t/type_bit.test 2007-11-23 10:26:19 +0000
+++ b/mysql-test/t/type_bit.test 2008-08-28 09:54:50 +0000
@@ -333,6 +333,25 @@
DROP TABLE t1;
+#
+# Bug#37799 SELECT with a BIT column in WHERE clause returns unexpected result
+#
+
+CREATE TABLE t1 (b BIT NOT NULL, i2 INTEGER NOT NULL, s VARCHAR(255) NOT NULL);
+INSERT INTO t1 VALUES(0x01,100,''), (0x00,300,''), (0x01,200,''), (0x00,100,'');
+SELECT HEX(b), i2 FROM t1 WHERE (i2>=100 AND i2<201) AND b=TRUE;
+
+CREATE TABLE t2 (b1 BIT NOT NULL, b2 BIT NOT NULL, i2 INTEGER NOT NULL,
+ s VARCHAR(255) NOT NULL);
+INSERT INTO t2 VALUES (0x01,0x00,100,''), (0x00,0x01,300,''),
+ (0x01,0x00,200,''), (0x00,0x01,100,'');
+SELECT HEX(b1), i2 FROM t2 WHERE (i2>=100 AND i2<201) AND b1=TRUE;
+SELECT HEX(b2), i2 FROM t2 WHERE (i2>=100 AND i2<201) AND b2=FALSE;
+SELECT HEX(b1), HEX(b2), i2 FROM t2
+ WHERE (i2>=100 AND i2<201) AND b1=TRUE AND b2=FALSE;
+
+DROP TABLE t1, t2;
+
--echo End of 5.0 tests
#
=== modified file 'mysys/my_symlink.c'
--- a/mysys/my_symlink.c 2007-10-11 15:07:40 +0000
+++ b/mysys/my_symlink.c 2008-08-26 09:31:17 +0000
@@ -108,38 +108,47 @@
#define BUFF_LEN FN_LEN
#endif
+
+int my_is_symlink(const char *filename __attribute__((unused)))
+{
+#if defined (HAVE_LSTAT) && defined (S_ISLNK)
+ struct stat stat_buff;
+ return !lstat(filename, &stat_buff) && S_ISLNK(stat_buff.st_mode);
+#elif defined (_WIN32)
+ DWORD dwAttr = GetFileAttributes(filename);
+ return (dwAttr != INVALID_FILE_ATTRIBUTES) &&
+ (dwAttr & FILE_ATTRIBUTE_REPARSE_POINT);
+#else /* No symlinks */
+ return 0;
+#endif
+}
+
+
int my_realpath(char *to, const char *filename,
myf MyFlags __attribute__((unused)))
{
#if defined(HAVE_REALPATH) && !defined(HAVE_purify) && !defined(HAVE_BROKEN_REALPATH)
int result=0;
char buff[BUFF_LEN];
- struct stat stat_buff;
+ char *ptr;
DBUG_ENTER("my_realpath");
- if (!(MyFlags & MY_RESOLVE_LINK) ||
- (!lstat(filename,&stat_buff) && S_ISLNK(stat_buff.st_mode)))
- {
- char *ptr;
- DBUG_PRINT("info",("executing realpath"));
- if ((ptr=realpath(filename,buff)))
- {
+ DBUG_PRINT("info",("executing realpath"));
+ if ((ptr=realpath(filename,buff)))
strmake(to,ptr,FN_REFLEN-1);
- }
- else
- {
- /*
- Realpath didn't work; Use my_load_path() which is a poor substitute
- original name but will at least be able to resolve paths that starts
- with '.'.
- */
- DBUG_PRINT("error",("realpath failed with errno: %d", errno));
- my_errno=errno;
- if (MyFlags & MY_WME)
- my_error(EE_REALPATH, MYF(0), filename, my_errno);
- my_load_path(to, filename, NullS);
- result= -1;
- }
+ else
+ {
+ /*
+ Realpath didn't work; Use my_load_path() which is a poor substitute
+ original name but will at least be able to resolve paths that starts
+ with '.'.
+ */
+ DBUG_PRINT("error",("realpath failed with errno: %d", errno));
+ my_errno=errno;
+ if (MyFlags & MY_WME)
+ my_error(EE_REALPATH, MYF(0), filename, my_errno);
+ my_load_path(to, filename, NullS);
+ result= -1;
}
DBUG_RETURN(result);
#else
=== modified file 'mysys/thr_lock.c'
--- a/mysys/thr_lock.c 2008-04-09 00:56:49 +0000
+++ b/mysys/thr_lock.c 2008-09-05 15:03:27 +0000
@@ -333,10 +333,10 @@
void thr_lock_delete(THR_LOCK *lock)
{
DBUG_ENTER("thr_lock_delete");
+ pthread_mutex_lock(&THR_LOCK_lock);
+ thr_lock_thread_list=list_delete(thr_lock_thread_list,&lock->list);
+ pthread_mutex_unlock(&THR_LOCK_lock);
pthread_mutex_destroy(&lock->mutex);
- pthread_mutex_lock(&THR_LOCK_lock);
- thr_lock_thread_list=list_delete(thr_lock_thread_list,&lock->list);
- pthread_mutex_unlock(&THR_LOCK_lock);
DBUG_VOID_RETURN;
}
=== modified file 'sql/field.h'
--- a/sql/field.h 2008-08-11 22:44:13 +0000
+++ b/sql/field.h 2008-08-28 09:54:50 +0000
@@ -147,7 +147,7 @@
virtual bool eq(Field *field)
{
return (ptr == field->ptr && null_ptr == field->null_ptr &&
- null_bit == field->null_bit);
+ null_bit == field->null_bit && field->type() == type());
}
virtual bool eq_def(Field *field);
@@ -1960,7 +1960,6 @@
bool eq(Field *field)
{
return (Field::eq(field) &&
- field->type() == type() &&
bit_ptr == ((Field_bit *)field)->bit_ptr &&
bit_ofs == ((Field_bit *)field)->bit_ofs);
}
=== modified file 'sql/log_event.cc'
--- a/sql/log_event.cc 2008-08-26 16:40:51 +0000
+++ b/sql/log_event.cc 2008-09-05 15:03:27 +0000
@@ -2047,6 +2047,11 @@
static void write_str_with_code_and_len(char **dst, const char *src,
int len, uint code)
{
+ /*
+ only 1 byte to store the length of catalog, so it should not
+ surpass 255
+ */
+ DBUG_ASSERT(len <= 255);
DBUG_ASSERT(src);
*((*dst)++)= code;
*((*dst)++)= (uchar) len;
@@ -2066,21 +2071,8 @@
bool Query_log_event::write(IO_CACHE* file)
{
- /**
- @todo if catalog can be of length FN_REFLEN==512, then we are not
- replicating it correctly, since the length is stored in a byte
- /sven
- */
- uchar buf[QUERY_HEADER_LEN+
- 1+4+ // code of flags2 and flags2
- 1+8+ // code of sql_mode and sql_mode
- 1+1+FN_REFLEN+ // code of catalog and catalog length and catalog
- 1+4+ // code of autoinc and the 2 autoinc variables
- 1+6+ // code of charset and charset
- 1+1+MAX_TIME_ZONE_NAME_LENGTH+ // code of tz and tz length and tz name
- 1+2+ // code of lc_time_names and lc_time_names_number
- 1+2 // code of charset_database and charset_database_number
- ], *start, *start_of_status;
+ uchar buf[QUERY_HEADER_LEN + MAX_SIZE_LOG_EVENT_STATUS];
+ uchar *start, *start_of_status;
ulong event_length;
if (!query)
@@ -2186,10 +2178,8 @@
{
/* In the TZ sys table, column Name is of length 64 so this should be ok */
DBUG_ASSERT(time_zone_len <= MAX_TIME_ZONE_NAME_LENGTH);
- *start++= Q_TIME_ZONE_CODE;
- *start++= time_zone_len;
- memcpy(start, time_zone_str, time_zone_len);
- start+= time_zone_len;
+ write_str_with_code_and_len((char **)(&start),
+ time_zone_str, time_zone_len, Q_TIME_ZONE_CODE);
}
if (lc_time_names_number)
{
@@ -2205,7 +2195,17 @@
int2store(start, charset_database_number);
start+= 2;
}
+ if (table_map_for_update)
+ {
+ *start++= Q_TABLE_MAP_FOR_UPDATE_CODE;
+ int8store(start, table_map_for_update);
+ start+= 8;
+ }
/*
+ NOTE: When adding new status vars, please don't forget to update
+ the MAX_SIZE_LOG_EVENT_STATUS in log_event.h and update function
+ code_name in this file.
+
Here there could be code like
if (command-line-option-which-says-"log_this_variable" && inited)
{
@@ -2282,7 +2282,8 @@
auto_increment_increment(thd_arg->variables.auto_increment_increment),
auto_increment_offset(thd_arg->variables.auto_increment_offset),
lc_time_names_number(thd_arg->variables.lc_time_names->number),
- charset_database_number(0)
+ charset_database_number(0),
+ table_map_for_update((ulonglong)thd_arg->table_map_for_update)
{
time_t end_time;
@@ -2411,6 +2412,7 @@
case Q_CATALOG_NZ_CODE: return "Q_CATALOG_NZ_CODE";
case Q_LC_TIME_NAMES_CODE: return "Q_LC_TIME_NAMES_CODE";
case Q_CHARSET_DATABASE_CODE: return "Q_CHARSET_DATABASE_CODE";
+ case Q_TABLE_MAP_FOR_UPDATE_CODE: return "Q_TABLE_MAP_FOR_UPDATE_CODE";
}
sprintf(buf, "CODE#%d", code);
return buf;
@@ -2447,7 +2449,8 @@
db(NullS), catalog_len(0), status_vars_len(0),
flags2_inited(0), sql_mode_inited(0), charset_inited(0),
auto_increment_increment(1), auto_increment_offset(1),
- time_zone_len(0), lc_time_names_number(0), charset_database_number(0)
+ time_zone_len(0), lc_time_names_number(0), charset_database_number(0),
+ table_map_for_update(0)
{
ulong data_len;
uint32 tmp;
@@ -2589,6 +2592,11 @@
charset_database_number= uint2korr(pos);
pos+= 2;
break;
+ case Q_TABLE_MAP_FOR_UPDATE_CODE:
+ CHECK_SPACE(pos, end, 8);
+ table_map_for_update= uint8korr(pos);
+ pos+= 8;
+ break;
default:
/* That's why you must write status vars in growing order of code */
DBUG_PRINT("info",("Query_log_event has unknown status vars (first has\
@@ -2996,6 +3004,8 @@
else
thd->variables.collation_database= thd->db_charset;
+ thd->table_map_for_update= (table_map)table_map_for_update;
+
/* Execute the query (note that we bypass dispatch_command()) */
const char* found_semicolon= NULL;
mysql_parse(thd, thd->query, thd->query_length, &found_semicolon);
=== modified file 'sql/log_event.h'
--- a/sql/log_event.h 2008-08-21 11:47:23 +0000
+++ b/sql/log_event.h 2008-08-27 18:52:44 +0000
@@ -245,12 +245,15 @@
packet (i.e. a query) sent from client to master;
First, an auxiliary log_event status vars estimation:
*/
-#define MAX_SIZE_LOG_EVENT_STATUS (4 /* flags2 */ + \
- 8 /* sql mode */ + \
- 1 + 1 + 255 /* catalog */ + \
- 4 /* autoinc */ + \
- 6 /* charset */ + \
- MAX_TIME_ZONE_NAME_LENGTH)
+#define MAX_SIZE_LOG_EVENT_STATUS (1 + 4 /* type, flags2 */ + \
+ 1 + 8 /* type, sql_mode */ + \
+ 1 + 1 + 255 /* type, length, catalog */ + \
+ 1 + 4 /* type, auto_increment */ + \
+ 1 + 6 /* type, charset */ + \
+ 1 + 1 + 255 /* type, length, time_zone */ + \
+ 1 + 2 /* type, lc_time_names_number */ + \
+ 1 + 2 /* type, charset_database_number */ + \
+ 1 + 8 /* type, table_map_for_update */)
#define MAX_LOG_EVENT_HEADER ( /* in order of Query_log_event::write */ \
LOG_EVENT_HEADER_LEN + /* write_header */ \
QUERY_HEADER_LEN + /* write_data */ \
@@ -314,6 +317,8 @@
#define Q_LC_TIME_NAMES_CODE 7
#define Q_CHARSET_DATABASE_CODE 8
+
+#define Q_TABLE_MAP_FOR_UPDATE_CODE 9
/* Intvar event post-header */
#define I_TYPE_OFFSET 0
@@ -1469,6 +1474,22 @@
This field is written if it is not 0.
</td>
</tr>
+ <tr>
+ <td>table_map_for_update</td>
+ <td>Q_TABLE_MAP_FOR_UPDATE_CODE == 9</td>
+ <td>8 byte integer</td>
+
+ <td>The value of the table map that is to be updated by the
+ multi-table update query statement. Every bit of this variable
+ represents a table, and is set to 1 if the corresponding table is
+ to be updated by this statement.
+
+ The value of this variable is set when executing a multi-table update
+ statement and used by slave to apply filter rules without opening
+ all the tables on slave. This is required because some tables may
+ not exist on slave because of the filter rules.
+ </td>
+ </tr>
</table>
@subsection Query_log_event_notes_on_previous_versions Notes on Previous Versions
@@ -1485,6 +1506,9 @@
* See Q_CHARSET_DATABASE_CODE in the table above.
+ * When adding new status vars, please don't forget to update the
+ MAX_SIZE_LOG_EVENT_STATUS, and update function code_name
+
*/
class Query_log_event: public Log_event
{
@@ -1562,6 +1586,11 @@
const char *time_zone_str;
uint lc_time_names_number; /* 0 means en_US */
uint charset_database_number;
+ /*
+ map for tables that will be updated for a multi-table update query
+ statement, for other query statements, this will be zero.
+ */
+ ulonglong table_map_for_update;
#ifndef MYSQL_CLIENT
=== modified file 'sql/mysql_priv.h'
--- a/sql/mysql_priv.h 2008-08-26 06:55:30 +0000
+++ b/sql/mysql_priv.h 2008-08-26 18:38:17 +0000
@@ -803,7 +803,6 @@
bool check_string_char_length(LEX_STRING *str, const char *err_msg,
uint max_char_length, CHARSET_INFO *cs,
bool no_error);
-bool test_if_data_home_dir(const char *dir);
bool parse_sql(THD *thd,
Parser_state *parser_state,
@@ -1862,6 +1861,7 @@
#ifdef MYSQL_SERVER
extern char *opt_mysql_tmpdir, mysql_charsets_dir[],
def_ft_boolean_syntax[sizeof(ft_boolean_syntax)];
+extern int mysql_unpacked_real_data_home_len;
#define mysql_tmpdir (my_tmpdir(&mysql_tmpdir_list))
extern MY_TMPDIR mysql_tmpdir_list;
extern const LEX_STRING command_name[];
@@ -2473,6 +2473,8 @@
CHARSET_INFO **cl);
#endif /* MYSQL_SERVER */
+extern "C" int test_if_data_home_dir(const char *dir);
+
#endif /* MYSQL_CLIENT */
#endif /* MYSQL_PRIV_H */
=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc 2008-08-05 10:26:30 +0000
+++ b/sql/mysqld.cc 2008-09-05 15:03:27 +0000
@@ -520,6 +520,7 @@
*opt_init_file, *opt_tc_log_file,
def_ft_boolean_syntax[sizeof(ft_boolean_syntax)];
char mysql_unpacked_real_data_home[FN_REFLEN];
+int mysql_unpacked_real_data_home_len;
uint reg_ext_length;
const key_map key_map_empty(0);
key_map key_map_full(0); // Will be initialized later
@@ -7408,6 +7409,7 @@
/* Things reset to zero */
opt_skip_slave_start= opt_reckless_slave = 0;
mysql_home[0]= pidfile_name[0]= log_error_file[0]= 0;
+ myisam_test_invalid_symlink= test_if_data_home_dir;
opt_log= opt_slow_log= 0;
opt_update_log= 0;
log_output_options= find_bit_type(log_output_str, &log_output_typelib);
@@ -8360,9 +8362,12 @@
pos[1]= 0;
}
convert_dirname(mysql_real_data_home,mysql_real_data_home,NullS);
- (void) fn_format(buff, mysql_real_data_home, "", "",
- (MY_RETURN_REAL_PATH|MY_RESOLVE_SYMLINKS));
- (void) unpack_dirname(mysql_unpacked_real_data_home, buff);
+ my_realpath(mysql_unpacked_real_data_home, mysql_real_data_home, MYF(0));
+ mysql_unpacked_real_data_home_len= strlen(mysql_unpacked_real_data_home);
+ if (mysql_unpacked_real_data_home[mysql_unpacked_real_data_home_len-1] == FN_LIBCHAR)
+ --mysql_unpacked_real_data_home_len;
+
+
convert_dirname(language,language,NullS);
(void) my_load_path(mysql_home,mysql_home,""); // Resolve current dir
(void) my_load_path(mysql_real_data_home,mysql_real_data_home,mysql_home);
=== modified file 'sql/opt_range.cc'
--- a/sql/opt_range.cc 2008-07-25 15:12:47 +0000
+++ b/sql/opt_range.cc 2008-08-25 17:18:22 +0000
@@ -8564,6 +8564,13 @@
used_key_parts (used_key_parts_arg)
{
QUICK_RANGE *r;
+ /*
+ Use default MRR implementation for reverse scans. No table engine
+ currently can do an MRR scan with output in reverse index order.
+ */
+ multi_range_length= 0;
+ multi_range= NULL;
+ multi_range_buff= NULL;
QUICK_RANGE **pr= (QUICK_RANGE**)ranges.buffer;
QUICK_RANGE **end_range= pr + ranges.elements;
=== modified file 'sql/opt_range.h'
--- a/sql/opt_range.h 2008-08-26 16:40:51 +0000
+++ b/sql/opt_range.h 2008-09-05 15:03:27 +0000
@@ -345,14 +345,7 @@
void dbug_dump(int indent, bool verbose);
#endif
private:
- /* Used only by QUICK_SELECT_DESC */
- QUICK_RANGE_SELECT(const QUICK_RANGE_SELECT& org) : QUICK_SELECT_I()
- {
- bcopy(&org, this, sizeof(*this));
- multi_range_length= 0;
- multi_range= NULL;
- multi_range_buff= NULL;
- }
+ /* Default copy ctor used by QUICK_SELECT_DESC */
};
=== modified file 'sql/sql_class.cc'
--- a/sql/sql_class.cc 2008-08-19 13:15:29 +0000
+++ b/sql/sql_class.cc 2008-08-26 10:07:56 +0000
@@ -514,6 +514,7 @@
lock_id(&main_lock_id),
user_time(0), in_sub_stmt(0),
binlog_table_maps(0), binlog_flags(0UL),
+ table_map_for_update(0),
arg_of_last_insert_id_function(FALSE),
first_successful_insert_id_in_prev_stmt(0),
first_successful_insert_id_in_prev_stmt_for_binlog(0),
@@ -1113,6 +1114,8 @@
free_items();
/* Reset where. */
where= THD::DEFAULT_WHERE;
+ /* reset table map for multi-table update */
+ table_map_for_update= 0;
}
=== modified file 'sql/sql_class.h'
--- a/sql/sql_class.h 2008-07-15 01:43:12 +0000
+++ b/sql/sql_class.h 2008-08-26 10:01:49 +0000
@@ -396,7 +396,6 @@
DATE_TIME_FORMAT *datetime_format;
DATE_TIME_FORMAT *time_format;
my_bool sysdate_is_now;
-
};
@@ -1446,6 +1445,13 @@
Note: in the parser, stmt_arena == thd, even for PS/SP.
*/
Query_arena *stmt_arena;
+
+ /*
+ map for tables that will be updated for a multi-table update query
+ statement, for other query statements, this will be zero.
+ */
+ table_map table_map_for_update;
+
/* Tells if LAST_INSERT_ID(#) was called for the current statement */
bool arg_of_last_insert_id_function;
/*
=== modified file 'sql/sql_db.cc'
--- a/sql/sql_db.cc 2008-08-05 10:26:30 +0000
+++ b/sql/sql_db.cc 2008-09-05 15:03:27 +0000
@@ -883,13 +883,6 @@
pthread_mutex_lock(&LOCK_mysql_create_db);
- /*
- This statement will be replicated as a statement, even when using
- row-based replication. The flag will be reset at the end of the
- statement.
- */
- thd->clear_current_stmt_binlog_row_based();
-
length= build_table_filename(path, sizeof(path), db, "", "", 0);
strmov(path+length, MY_DB_OPT_FILE); // Append db option file name
del_dbopt(path); // Remove dboption hash entry
@@ -916,16 +909,36 @@
error= -1;
+ /*
+ We temporarily disable the binary log while dropping the objects
+ in the database. Since the DROP DATABASE statement is always
+ replicated as a statement, execution of it will drop all objects
+ in the database on the slave as well, so there is no need to
+ replicate the removal of the individual objects in the database
+ as well.
+
+ This is more of a safety precaution, since normally no objects
+ should be dropped while the database is being cleaned, but in
+ the event that a change in the code to remove other objects is
+ made, these drops should still not be logged.
+
+ Notice that the binary log have to be enabled over the call to
+ ha_drop_database(), since NDB otherwise detects the binary log
+ as disabled and will not log the drop database statement on any
+ other connected server.
+ */
if ((deleted= mysql_rm_known_files(thd, dirp, db, path, 0,
&dropped_tables)) >= 0)
{
ha_drop_database(path);
+ tmp_disable_binlog(thd);
query_cache_invalidate1(db);
(void) sp_drop_db_routines(thd, db); /* @todo Do not ignore errors */
#ifdef HAVE_EVENT_SCHEDULER
Events::drop_schema_events(thd, db);
#endif
error = 0;
+ reenable_binlog(thd);
}
}
if (!silent && deleted>=0)
=== modified file 'sql/sql_parse.cc'
--- a/sql/sql_parse.cc 2008-08-26 16:40:51 +0000
+++ b/sql/sql_parse.cc 2008-09-05 15:03:27 +0000
@@ -1902,6 +1902,10 @@
TABLE_LIST *all_tables;
/* most outer SELECT_LEX_UNIT of query */
SELECT_LEX_UNIT *unit= &lex->unit;
+#ifdef HAVE_REPLICATION
+ /* have table map for update for multi-update statement (BUG#37051) */
+ bool have_table_map_for_update= FALSE;
+#endif
/* Saved variable value */
DBUG_ENTER("mysql_execute_command");
#ifdef WITH_PARTITION_STORAGE_ENGINE
@@ -1967,6 +1971,48 @@
// force searching in slave.cc:tables_ok()
all_tables->updating= 1;
}
+
+ /*
+ For fix of BUG#37051, the master stores the table map for update
+ in the Query_log_event, and the value is assigned to
+ thd->variables.table_map_for_update before executing the update
+ query.
+
+ If thd->variables.table_map_for_update is set, then we are
+ replicating from a new master, we can use this value to apply
+ filter rules without opening all the tables. However If
+ thd->variables.table_map_for_update is not set, then we are
+ replicating from an old master, so we just skip this and
+ continue with the old method. And of course, the bug would still
+ exist for old masters.
+ */
+ if (lex->sql_command == SQLCOM_UPDATE_MULTI &&
+ thd->table_map_for_update)
+ {
+ have_table_map_for_update= TRUE;
+ table_map table_map_for_update= thd->table_map_for_update;
+ uint nr= 0;
+ TABLE_LIST *table;
+ for (table=all_tables; table; table=table->next_global, nr++)
+ {
+ if (table_map_for_update & ((table_map)1 << nr))
+ table->updating= TRUE;
+ else
+ table->updating= FALSE;
+ }
+
+ if (all_tables_not_ok(thd, all_tables))
+ {
+ /* we warn the slave SQL thread */
+ my_message(ER_SLAVE_IGNORED_TABLE, ER(ER_SLAVE_IGNORED_TABLE), MYF(0));
+ if (thd->one_shot_set)
+ reset_one_shot_variables(thd);
+ DBUG_RETURN(0);
+ }
+
+ for (table=all_tables; table; table=table->next_global)
+ table->updating= TRUE;
+ }
/*
Check if statment should be skipped because of slave filtering
@@ -2881,7 +2927,7 @@
#ifdef HAVE_REPLICATION
/* Check slave filtering rules */
- if (unlikely(thd->slave_thread))
+ if (unlikely(thd->slave_thread && !have_table_map_for_update))
{
if (all_tables_not_ok(thd, all_tables))
{
@@ -7413,11 +7459,12 @@
0 ok
1 error
*/
+C_MODE_START
-bool test_if_data_home_dir(const char *dir)
+int test_if_data_home_dir(const char *dir)
{
- char path[FN_REFLEN], conv_path[FN_REFLEN];
- uint dir_len, home_dir_len= strlen(mysql_unpacked_real_data_home);
+ char path[FN_REFLEN];
+ int dir_len;
DBUG_ENTER("test_if_data_home_dir");
if (!dir)
@@ -7425,24 +7472,30 @@
(void) fn_format(path, dir, "", "",
(MY_RETURN_REAL_PATH|MY_RESOLVE_SYMLINKS));
- dir_len= unpack_dirname(conv_path, dir);
+ dir_len= strlen(path);
+ if (mysql_unpacked_real_data_home_len<= dir_len)
+ {
+ if (dir_len > mysql_unpacked_real_data_home_len &&
+ path[mysql_unpacked_real_data_home_len] != FN_LIBCHAR)
+ DBUG_RETURN(0);
- if (home_dir_len < dir_len)
- {
if (lower_case_file_system)
{
- if (!my_strnncoll(character_set_filesystem,
- (const uchar*) conv_path, home_dir_len,
+ if (!my_strnncoll(default_charset_info, (const uchar*) path,
+ mysql_unpacked_real_data_home_len,
(const uchar*) mysql_unpacked_real_data_home,
- home_dir_len))
+ mysql_unpacked_real_data_home_len))
DBUG_RETURN(1);
}
- else if (!memcmp(conv_path, mysql_unpacked_real_data_home, home_dir_len))
+ else if (!memcmp(path, mysql_unpacked_real_data_home,
+ mysql_unpacked_real_data_home_len))
DBUG_RETURN(1);
}
DBUG_RETURN(0);
}
+C_MODE_END
+
extern int MYSQLparse(void *thd); // from sql_yacc.cc
=== modified file 'sql/sql_select.cc'
--- a/sql/sql_select.cc 2008-08-26 16:40:51 +0000
+++ b/sql/sql_select.cc 2008-09-05 15:03:27 +0000
@@ -1794,7 +1794,8 @@
if (!items1)
{
items1= items0 + all_fields.elements;
- if (sort_and_group || curr_tmp_table->group)
+ if (sort_and_group || curr_tmp_table->group ||
+ tmp_table_param.precomputed_group_by)
{
if (change_to_use_tmp_fields(thd, items1,
tmp_fields_list1, tmp_all_fields1,
@@ -9628,6 +9629,8 @@
MI_COLUMNDEF *recinfo;
uint total_uneven_bit_length= 0;
bool force_copy_fields= param->force_copy_fields;
+ /* Treat sum functions as normal ones when loose index scan is used. */
+ save_sum_fields|= param->precomputed_group_by;
DBUG_ENTER("create_tmp_table");
DBUG_PRINT("enter",
("distinct: %d save_sum_fields: %d rows_limit: %lu group: %d",
@@ -13182,6 +13185,16 @@
table->key_read=1;
table->file->extra(HA_EXTRA_KEYREAD);
}
+ else if (table->key_read)
+ {
+ /*
+ Clear the covering key read flags that might have been
+ previously set for some key other than the current best_key.
+ */
+ table->key_read= 0;
+ table->file->extra(HA_EXTRA_NO_KEYREAD);
+ }
+
table->file->ha_index_or_rnd_end();
if (join->select_options & SELECT_DESCRIBE)
{
=== modified file 'sql/sql_update.cc'
--- a/sql/sql_update.cc 2008-08-05 10:26:30 +0000
+++ b/sql/sql_update.cc 2008-09-05 15:03:27 +0000
@@ -1000,7 +1000,7 @@
DBUG_RETURN(TRUE);
}
- tables_for_update= get_table_map(fields);
+ thd->table_map_for_update= tables_for_update= get_table_map(fields);
/*
Setup timestamp handling and locking mode
=== modified file 'storage/myisam/mi_check.c'
--- a/storage/myisam/mi_check.c 2008-08-26 16:40:51 +0000
+++ b/storage/myisam/mi_check.c 2008-09-05 15:03:27 +0000
@@ -1736,7 +1736,7 @@
DATA_TMP_EXT, share->base.raid_chunks,
(param->testflag & T_BACKUP_DATA ?
MYF(MY_REDEL_MAKE_BACKUP): MYF(0))) ||
- mi_open_datafile(info,share,-1))
+ mi_open_datafile(info,share,name,-1))
got_error=1;
}
}
@@ -2549,7 +2549,7 @@
DATA_TMP_EXT, share->base.raid_chunks,
(param->testflag & T_BACKUP_DATA ?
MYF(MY_REDEL_MAKE_BACKUP): MYF(0))) ||
- mi_open_datafile(info,share,-1))
+ mi_open_datafile(info,share,name,-1))
got_error=1;
}
}
@@ -3081,7 +3081,7 @@
DATA_TMP_EXT, share->base.raid_chunks,
(param->testflag & T_BACKUP_DATA ?
MYF(MY_REDEL_MAKE_BACKUP): MYF(0))) ||
- mi_open_datafile(info,share,-1))
+ mi_open_datafile(info,share,name,-1))
got_error=1;
}
}
=== modified file 'storage/myisam/mi_create.c'
--- a/storage/myisam/mi_create.c 2008-08-05 10:26:30 +0000
+++ b/storage/myisam/mi_create.c 2008-09-05 15:03:27 +0000
@@ -196,7 +196,7 @@
packed=(packed+7)/8;
if (pack_reclength != INT_MAX32)
pack_reclength+= reclength+packed +
- test(test_all_bits(options, HA_OPTION_CHECKSUM | HA_PACK_RECORD));
+ test(test_all_bits(options, HA_OPTION_CHECKSUM | HA_OPTION_PACK_RECORD));
min_pack_length+=packed;
if (!ci->data_file_length && ci->max_rows)
=== modified file 'storage/myisam/mi_open.c'
--- a/storage/myisam/mi_open.c 2008-04-09 13:10:52 +0000
+++ b/storage/myisam/mi_open.c 2008-09-05 15:03:27 +0000
@@ -74,7 +74,7 @@
MI_INFO *mi_open(const char *name, int mode, uint open_flags)
{
- int lock_error,kfile,open_mode,save_errno,have_rtree=0;
+ int lock_error,kfile,open_mode,save_errno,have_rtree=0, realpath_err;
uint i,j,len,errpos,head_length,base_pos,offset,info_length,keys,
key_parts,unique_key_parts,fulltext_keys,uniques;
char name_buff[FN_REFLEN], org_name[FN_REFLEN], index_name[FN_REFLEN],
@@ -94,8 +94,15 @@
head_length=sizeof(share_buff.state.header);
bzero((uchar*) &info,sizeof(info));
- my_realpath(name_buff, fn_format(org_name,name,"",MI_NAME_IEXT,
- MY_UNPACK_FILENAME),MYF(0));
+ realpath_err= my_realpath(name_buff,
+ fn_format(org_name,name,"",MI_NAME_IEXT,4),MYF(0));
+ if (my_is_symlink(org_name) &&
+ (realpath_err || (*myisam_test_invalid_symlink)(name_buff)))
+ {
+ my_errno= HA_WRONG_CREATE_OPTION;
+ DBUG_RETURN (NULL);
+ }
+
pthread_mutex_lock(&THR_LOCK_myisam);
if (!(old_info=test_if_reopen(name_buff)))
{
@@ -476,7 +483,7 @@
lock_error=1; /* Database unlocked */
}
- if (mi_open_datafile(&info, share, -1))
+ if (mi_open_datafile(&info, share, name, -1))
goto err;
errpos=5;
@@ -556,7 +563,7 @@
my_errno=EACCES; /* Can't open in write mode */
goto err;
}
- if (mi_open_datafile(&info, share, old_info->dfile))
+ if (mi_open_datafile(&info, share, name, old_info->dfile))
goto err;
errpos=5;
have_rtree= old_info->rtree_recursion_state != NULL;
@@ -1217,13 +1224,30 @@
exist a dup()-like call that would give us two different file descriptors.
*************************************************************************/
-int mi_open_datafile(MI_INFO *info, MYISAM_SHARE *share,
+int mi_open_datafile(MI_INFO *info, MYISAM_SHARE *share, const char *org_name,
File file_to_dup __attribute__((unused)))
{
+ char *data_name= share->data_file_name;
+ char real_data_name[FN_REFLEN];
+
+ if (org_name)
+ {
+ fn_format(real_data_name,org_name,"",MI_NAME_DEXT,4);
+ if (my_is_symlink(real_data_name))
+ {
+ if (my_realpath(real_data_name, real_data_name, MYF(0)) ||
+ (*myisam_test_invalid_symlink)(real_data_name))
+ {
+ my_errno= HA_WRONG_CREATE_OPTION;
+ return 1;
+ }
+ data_name= real_data_name;
+ }
+ }
#ifdef USE_RAID
if (share->base.raid_type)
{
- info->dfile=my_raid_open(share->data_file_name,
+ info->dfile=my_raid_open(data_name,
share->mode | O_SHARE,
share->base.raid_type,
share->base.raid_chunks,
@@ -1232,8 +1256,7 @@
}
else
#endif
- info->dfile=my_open(share->data_file_name, share->mode | O_SHARE,
- MYF(MY_WME));
+ info->dfile=my_open(data_name, share->mode | O_SHARE, MYF(MY_WME));
return info->dfile >= 0 ? 0 : 1;
}
=== modified file 'storage/myisam/mi_static.c'
--- a/storage/myisam/mi_static.c 2007-05-10 09:59:39 +0000
+++ b/storage/myisam/mi_static.c 2008-08-26 09:31:17 +0000
@@ -41,6 +41,15 @@
ulong myisam_bulk_insert_tree_size=8192*1024;
ulong myisam_data_pointer_size=4;
+
+static int always_valid(const char *filename __attribute__((unused)))
+{
+ return 0;
+}
+
+int (*myisam_test_invalid_symlink)(const char *filename)= always_valid;
+
+
/*
read_vec[] is used for converting between P_READ_KEY.. and SEARCH_
Position is , == , >= , <= , > , <
=== modified file 'storage/myisam/myisamchk.c'
--- a/storage/myisam/myisamchk.c 2008-04-09 13:10:52 +0000
+++ b/storage/myisam/myisamchk.c 2008-09-05 15:03:27 +0000
@@ -1033,7 +1033,7 @@
error|=change_to_newfile(filename,MI_NAME_DEXT,DATA_TMP_EXT,
raid_chunks,
MYF(0));
- if (mi_open_datafile(info,info->s, -1))
+ if (mi_open_datafile(info,info->s, NULL, -1))
error=1;
param->out_flag&= ~O_NEW_DATA; /* We are using new datafile */
param->read_cache.file=info->dfile;
=== modified file 'storage/myisam/myisamdef.h'
--- a/storage/myisam/myisamdef.h 2008-02-27 14:46:32 +0000
+++ b/storage/myisam/myisamdef.h 2008-08-23 02:47:43 +0000
@@ -756,7 +756,9 @@
extern MI_INFO *test_if_reopen(char *filename);
my_bool check_table_is_closed(const char *name, const char *where);
-int mi_open_datafile(MI_INFO *info, MYISAM_SHARE *share, File file_to_dup);
+int mi_open_datafile(MI_INFO *info, MYISAM_SHARE *share, const char *orn_name,
+ File file_to_dup);
+
int mi_open_keyfile(MYISAM_SHARE *share);
void mi_setup_functions(register MYISAM_SHARE *share);
my_bool mi_dynmap_file(MI_INFO *info, my_off_t size);
=== modified file 'storage/myisam/rt_index.c'
--- a/storage/myisam/rt_index.c 2007-10-05 10:43:15 +0000
+++ b/storage/myisam/rt_index.c 2008-08-26 13:53:22 +0000
@@ -389,7 +389,7 @@
info->rtree_recursion_depth = -1;
info->buff_used = 1;
- return rtree_get_req(info, &keyinfo[keynr], key_length, root, 0);
+ return rtree_get_req(info, keyinfo, key_length, root, 0);
}
@@ -436,7 +436,7 @@
return -1;
}
- return rtree_get_req(info, &keyinfo[keynr], key_length, root, 0);
+ return rtree_get_req(info, keyinfo, key_length, root, 0);
}
}
| Thread |
|---|
| • bzr push into mysql-5.1 branch (reggie:2613 to 2614) | Reggie Burnett | 5 Sep |