Merge lp:~laurynas-biveinis/percona-server/5.6-merge-1 into lp:percona-server/5.6

Proposed by Laurynas Biveinis on 2013-05-20
Status: Merged
Approved by: Alexey Kopytov on 2013-05-21
Approved revision: 325
Merged at revision: 349
Proposed branch: lp:~laurynas-biveinis/percona-server/5.6-merge-1
Merge into: lp:percona-server/5.6
Diff against target: 60833 lines (+35068/-6890)
650 files modified
.bzrignore (+0/-1)
COPYING.innodb-deadlock-count-patch (+0/-30)
COPYING.show_temp_51 (+0/-13)
Makefile (+0/-78)
Percona-Server/CMakeLists.txt (+7/-0)
Percona-Server/client/CMakeLists.txt (+2/-1)
Percona-Server/client/client_priv.h (+3/-0)
Percona-Server/client/mysql.cc (+55/-1)
Percona-Server/client/mysqldump.c (+7/-3)
Percona-Server/client/sql_string.cc (+44/-0)
Percona-Server/client/sql_string.h (+10/-0)
Percona-Server/cmake/dtrace.cmake (+1/-1)
Percona-Server/cmake/install_layout.cmake (+2/-2)
Percona-Server/config.h.cmake (+1/-1)
Percona-Server/extra/comp_err.c (+130/-49)
Percona-Server/extra/innochecksum.cc (+76/-2)
Percona-Server/include/atomic/x86-gcc.h (+12/-16)
Percona-Server/include/heap.h (+69/-12)
Percona-Server/include/m_string.h (+40/-0)
Percona-Server/include/my_getopt.h (+18/-0)
Percona-Server/include/my_sys.h (+11/-9)
Percona-Server/include/mysql/plugin.h (+22/-0)
Percona-Server/include/mysql/plugin_audit.h.pp (+13/-0)
Percona-Server/include/mysql/plugin_auth.h.pp (+13/-0)
Percona-Server/include/mysql/plugin_ftparser.h.pp (+13/-0)
Percona-Server/include/mysql_com.h (+15/-0)
Percona-Server/include/violite.h (+1/-1)
Percona-Server/internal/mysql-test/suite/i_innodb/r/dummy.result (+1/-0)
Percona-Server/internal/mysql-test/suite/i_innodb/t/dummy.test (+3/-0)
Percona-Server/internal/mysql-test/suite/i_main/r/dummy.result (+1/-0)
Percona-Server/internal/mysql-test/suite/i_main/r/update.result (+17/-0)
Percona-Server/internal/mysql-test/suite/i_main/t/dummy.test (+2/-0)
Percona-Server/internal/mysql-test/suite/i_main/t/update.test (+21/-0)
Percona-Server/man/mysqld.8 (+69/-0)
Percona-Server/mysql-test/include/have_64_keys.inc (+12/-0)
Percona-Server/mysql-test/include/log_cleanup.inc (+1/-0)
Percona-Server/mysql-test/include/log_grep.inc (+41/-0)
Percona-Server/mysql-test/include/log_start.inc (+11/-0)
Percona-Server/mysql-test/include/log_stop.inc (+7/-0)
Percona-Server/mysql-test/include/percona_processlist_row_stats_show.inc (+7/-0)
Percona-Server/mysql-test/include/percona_query_cache_with_comments.inc (+95/-0)
Percona-Server/mysql-test/include/percona_query_cache_with_comments_begin.inc (+12/-0)
Percona-Server/mysql-test/include/percona_query_cache_with_comments_clear.inc (+5/-0)
Percona-Server/mysql-test/include/percona_query_cache_with_comments_end.inc (+3/-0)
Percona-Server/mysql-test/include/percona_query_cache_with_comments_eval.inc (+7/-0)
Percona-Server/mysql-test/include/percona_query_cache_with_comments_show.inc (+8/-0)
Percona-Server/mysql-test/include/percona_show_slave_status_nolock.inc (+56/-0)
Percona-Server/mysql-test/include/percona_slow_log_verbosity_grep.inc (+26/-0)
Percona-Server/mysql-test/include/percona_slow_query_log_rate.inc (+37/-0)
Percona-Server/mysql-test/r/connect.result (+2/-0)
Percona-Server/mysql-test/r/create.result (+6/-5)
Percona-Server/mysql-test/r/ctype_utf8mb4_heap.result (+4/-0)
Percona-Server/mysql-test/r/derived.result (+1/-1)
Percona-Server/mysql-test/r/disabled_replication.result (+2/-1)
Percona-Server/mysql-test/r/group_commit_crash.result (+101/-0)
Percona-Server/mysql-test/r/have_64_keys.require (+14/-0)
Percona-Server/mysql-test/r/information_schema.result (+30/-2)
Percona-Server/mysql-test/r/information_schema_db.result (+7/-0)
Percona-Server/mysql-test/r/mysqld--help-notwin.result (+84/-4)
Percona-Server/mysql-test/r/mysqld--help-win.result (+28/-2)
Percona-Server/mysql-test/r/mysqlshow.result (+14/-2)
Percona-Server/mysql-test/r/percona_bug1008278.result (+11/-0)
Percona-Server/mysql-test/r/percona_bug1008609.result (+1/-0)
Percona-Server/mysql-test/r/percona_bug1017192.result (+10/-0)
Percona-Server/mysql-test/r/percona_bug1035225.result (+32/-0)
Percona-Server/mysql-test/r/percona_bug45702.result (+21/-0)
Percona-Server/mysql-test/r/percona_bug643149.result (+21/-0)
Percona-Server/mysql-test/r/percona_bug856404.result (+8/-0)
Percona-Server/mysql-test/r/percona_enforce_storage_engine.result (+36/-0)
Percona-Server/mysql-test/r/percona_enhanced_options_modifiers.result (+142/-0)
Percona-Server/mysql-test/r/percona_expand_fast_index_creation.result (+64/-0)
Percona-Server/mysql-test/r/percona_heap_blob.result (+918/-0)
Percona-Server/mysql-test/r/percona_heap_bug783366.result (+14/-0)
Percona-Server/mysql-test/r/percona_heap_bug783451.result (+124/-0)
Percona-Server/mysql-test/r/percona_heap_bug784464.result (+58/-0)
Percona-Server/mysql-test/r/percona_heap_bug784464_32bit.result (+12/-0)
Percona-Server/mysql-test/r/percona_heap_bug784464_64bit.result (+12/-0)
Percona-Server/mysql-test/r/percona_heap_bug784468.result (+15/-0)
Percona-Server/mysql-test/r/percona_heap_bug788544.result (+9/-0)
Percona-Server/mysql-test/r/percona_heap_bug788576.result (+19/-0)
Percona-Server/mysql-test/r/percona_heap_bug788722.result (+18/-0)
Percona-Server/mysql-test/r/percona_heap_bug789131.result (+7/-0)
Percona-Server/mysql-test/r/percona_heap_var.result (+194/-0)
Percona-Server/mysql-test/r/percona_innodb_deadlock_count.result (+28/-0)
Percona-Server/mysql-test/r/percona_innodb_fake_changes.result (+119/-0)
Percona-Server/mysql-test/r/percona_innodb_fake_changes_bug_898306.result (+43/-0)
Percona-Server/mysql-test/r/percona_innodb_fake_changes_bug_917942.result (+151/-0)
Percona-Server/mysql-test/r/percona_innodb_fake_changes_locks.result (+83/-0)
Percona-Server/mysql-test/r/percona_innodb_version.result (+3/-0)
Percona-Server/mysql-test/r/percona_log_connection_error.result (+16/-0)
Percona-Server/mysql-test/r/percona_log_slow_admin_statements-config.result (+6/-0)
Percona-Server/mysql-test/r/percona_log_slow_admin_statements-config_false.result (+6/-0)
Percona-Server/mysql-test/r/percona_log_slow_admin_statements-config_foo.result (+7/-0)
Percona-Server/mysql-test/r/percona_log_slow_admin_statements-config_true.result (+6/-0)
Percona-Server/mysql-test/r/percona_log_slow_admin_statements.result (+20/-0)
Percona-Server/mysql-test/r/percona_log_slow_filter-cl.result (+6/-0)
Percona-Server/mysql-test/r/percona_log_slow_innodb.result (+42/-0)
Percona-Server/mysql-test/r/percona_log_slow_query_plan.result (+268/-0)
Percona-Server/mysql-test/r/percona_log_slow_query_plan_qc.result (+46/-0)
Percona-Server/mysql-test/r/percona_log_slow_slave_statements-cl.result (+6/-0)
Percona-Server/mysql-test/r/percona_log_slow_slave_statements-innodb.result (+31/-0)
Percona-Server/mysql-test/r/percona_log_slow_slave_statements.result (+33/-0)
Percona-Server/mysql-test/r/percona_log_slow_sp_statements-cl.result (+6/-0)
Percona-Server/mysql-test/r/percona_log_slow_sp_statements.result (+27/-0)
Percona-Server/mysql-test/r/percona_log_slow_verbosity-cl.result (+6/-0)
Percona-Server/mysql-test/r/percona_log_slow_verbosity.result (+118/-0)
Percona-Server/mysql-test/r/percona_log_warnings_suppress.result (+31/-0)
Percona-Server/mysql-test/r/percona_long_query_time.result (+35/-0)
Percona-Server/mysql-test/r/percona_min_examined_row_limit.result (+35/-0)
Percona-Server/mysql-test/r/percona_mysqldump_innodb_optimize_keys.result (+0/-443)
Percona-Server/mysql-test/r/percona_processlist_row_stats.result (+70/-0)
Percona-Server/mysql-test/r/percona_query_cache_with_comments.result (+866/-0)
Percona-Server/mysql-test/r/percona_query_cache_with_comments_crash.result (+21/-0)
Percona-Server/mysql-test/r/percona_query_cache_with_comments_disable.result (+865/-0)
Percona-Server/mysql-test/r/percona_query_cache_with_comments_prepared_statements.result (+396/-0)
Percona-Server/mysql-test/r/percona_secure_file_priv_noarg.result (+13/-0)
Percona-Server/mysql-test/r/percona_show_slave_status_nolock.result (+72/-0)
Percona-Server/mysql-test/r/percona_signal_handling.result (+3/-0)
Percona-Server/mysql-test/r/percona_slow_extended_error_on_quit.result (+27/-0)
Percona-Server/mysql-test/r/percona_slow_extended_log_error.result (+17/-0)
Percona-Server/mysql-test/r/percona_slow_query_log_rate.result (+54/-0)
Percona-Server/mysql-test/r/percona_slow_query_log_timestamp_always-cl.result (+6/-0)
Percona-Server/mysql-test/r/percona_slow_query_log_timestamp_always.result (+16/-0)
Percona-Server/mysql-test/r/percona_slow_query_log_timestamp_precision-cl.result (+6/-0)
Percona-Server/mysql-test/r/percona_slow_query_log_timestamp_precision.result (+24/-0)
Percona-Server/mysql-test/r/percona_slow_query_log_use_global_control-cl.result (+6/-0)
Percona-Server/mysql-test/r/percona_slow_query_log_use_global_control.result (+20/-0)
Percona-Server/mysql-test/r/percona_ssl_connections_count.result (+21/-0)
Percona-Server/mysql-test/r/percona_status_wait_query_cache_mutex.result (+20/-0)
Percona-Server/mysql-test/r/percona_utility_user.result (+91/-0)
Percona-Server/mysql-test/r/percona_xtradb_bug317074.result (+5/-0)
Percona-Server/mysql-test/r/rpl_mysqldump_slave.result (+1/-1)
Percona-Server/mysql-test/r/show_check.result (+6/-6)
Percona-Server/mysql-test/r/sp-threads.result (+5/-5)
Percona-Server/mysql-test/r/userstat_bug602047.result (+19/-0)
Percona-Server/mysql-test/r/xa_binlog.result (+32/-0)
Percona-Server/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result (+2/-2)
Percona-Server/mysql-test/suite/binlog/r/percona_binlog_max_nr.result (+30/-0)
Percona-Server/mysql-test/suite/binlog/t/percona_binlog_max_nr-master.opt (+2/-0)
Percona-Server/mysql-test/suite/binlog/t/percona_binlog_max_nr.test (+65/-0)
Percona-Server/mysql-test/suite/funcs_1/datadict/processlist_priv.inc (+1/-1)
Percona-Server/mysql-test/suite/funcs_1/r/is_columns_is.result (+154/-0)
Percona-Server/mysql-test/suite/funcs_1/r/is_engines_innodb.result (+1/-1)
Percona-Server/mysql-test/suite/funcs_1/r/is_tables_is.result (+230/-0)
Percona-Server/mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result (+150/-146)
Percona-Server/mysql-test/suite/funcs_1/r/processlist_val_no_prot.result (+47/-45)
Percona-Server/mysql-test/suite/innodb/include/percona_innodb_kill_idle_trx_show.inc (+2/-0)
Percona-Server/mysql-test/suite/innodb/r/bug54330.result (+13/-0)
Percona-Server/mysql-test/suite/innodb/r/innodb_wl6347_comp_indx_stat.result (+3/-3)
Percona-Server/mysql-test/suite/innodb/r/percona_bug_1133926.result (+0/-4)
Percona-Server/mysql-test/suite/innodb/r/percona_bug_951588.result (+12/-0)
Percona-Server/mysql-test/suite/innodb/r/percona_bug_999147.result (+0/-17)
Percona-Server/mysql-test/suite/innodb/r/percona_changed_page_bmp.result (+67/-0)
Percona-Server/mysql-test/suite/innodb/r/percona_changed_page_bmp_1105726.result (+3/-0)
Percona-Server/mysql-test/suite/innodb/r/percona_changed_page_bmp_crash.result (+36/-0)
Percona-Server/mysql-test/suite/innodb/r/percona_changed_page_bmp_debug.result (+25/-0)
Percona-Server/mysql-test/suite/innodb/r/percona_changed_page_bmp_flush.result (+21/-0)
Percona-Server/mysql-test/suite/innodb/r/percona_changed_page_bmp_log_block_size.result (+7/-0)
Percona-Server/mysql-test/suite/innodb/r/percona_changed_page_bmp_requests.result (+76/-0)
Percona-Server/mysql-test/suite/innodb/r/percona_changed_page_bmp_requests_no_innodb.result (+4/-0)
Percona-Server/mysql-test/suite/innodb/r/percona_changed_pages.result (+153/-0)
Percona-Server/mysql-test/suite/innodb/r/percona_changed_pages_empty.result (+2/-0)
Percona-Server/mysql-test/suite/innodb/r/percona_innodb_kill_idle_trx.result (+39/-0)
Percona-Server/mysql-test/suite/innodb/r/percona_innodb_kill_idle_trx_locks.result (+45/-0)
Percona-Server/mysql-test/suite/innodb/r/percona_log_block_size.result (+11/-0)
Percona-Server/mysql-test/suite/innodb/r/percona_skip_innodb_i_s.result (+38/-0)
Percona-Server/mysql-test/suite/innodb/t/bug54330.test (+38/-0)
Percona-Server/mysql-test/suite/innodb/t/percona_bug_1133926.test (+0/-19)
Percona-Server/mysql-test/suite/innodb/t/percona_bug_951588.test (+29/-0)
Percona-Server/mysql-test/suite/innodb/t/percona_bug_999147-master.opt (+0/-1)
Percona-Server/mysql-test/suite/innodb/t/percona_bug_999147.test (+0/-29)
Percona-Server/mysql-test/suite/innodb/t/percona_changed_page_bmp-master.opt (+1/-0)
Percona-Server/mysql-test/suite/innodb/t/percona_changed_page_bmp.test (+253/-0)
Percona-Server/mysql-test/suite/innodb/t/percona_changed_page_bmp_1105726-master.opt (+1/-0)
Percona-Server/mysql-test/suite/innodb/t/percona_changed_page_bmp_1105726.test (+5/-0)
Percona-Server/mysql-test/suite/innodb/t/percona_changed_page_bmp_crash-master.opt (+1/-0)
Percona-Server/mysql-test/suite/innodb/t/percona_changed_page_bmp_crash.test (+87/-0)
Percona-Server/mysql-test/suite/innodb/t/percona_changed_page_bmp_debug-master.opt (+1/-0)
Percona-Server/mysql-test/suite/innodb/t/percona_changed_page_bmp_debug.test (+58/-0)
Percona-Server/mysql-test/suite/innodb/t/percona_changed_page_bmp_flush.test (+96/-0)
Percona-Server/mysql-test/suite/innodb/t/percona_changed_page_bmp_log_block_size.test (+37/-0)
Percona-Server/mysql-test/suite/innodb/t/percona_changed_page_bmp_requests-master.opt (+1/-0)
Percona-Server/mysql-test/suite/innodb/t/percona_changed_page_bmp_requests.test (+200/-0)
Percona-Server/mysql-test/suite/innodb/t/percona_changed_page_bmp_requests_no_innodb-master.opt (+1/-0)
Percona-Server/mysql-test/suite/innodb/t/percona_changed_page_bmp_requests_no_innodb.test (+10/-0)
Percona-Server/mysql-test/suite/innodb/t/percona_changed_pages-master.opt (+1/-0)
Percona-Server/mysql-test/suite/innodb/t/percona_changed_pages.test (+262/-0)
Percona-Server/mysql-test/suite/innodb/t/percona_changed_pages_empty.test (+8/-0)
Percona-Server/mysql-test/suite/innodb/t/percona_innodb_kill_idle_trx.test (+27/-0)
Percona-Server/mysql-test/suite/innodb/t/percona_innodb_kill_idle_trx_locks.test (+31/-0)
Percona-Server/mysql-test/suite/innodb/t/percona_log_block_size-master.opt (+1/-0)
Percona-Server/mysql-test/suite/innodb/t/percona_log_block_size.test (+40/-0)
Percona-Server/mysql-test/suite/innodb/t/percona_skip_innodb_i_s-master.opt (+1/-0)
Percona-Server/mysql-test/suite/innodb/t/percona_skip_innodb_i_s.test (+6/-0)
Percona-Server/mysql-test/suite/rpl/r/percona_bug860910.result (+23/-0)
Percona-Server/mysql-test/suite/rpl/r/rpl_mdev382.result (+331/-0)
Percona-Server/mysql-test/suite/rpl/r/rpl_percona_crash_resistant_rpl.result (+55/-0)
Percona-Server/mysql-test/suite/rpl/r/rpl_trigger_bug67504.result (+31/-0)
Percona-Server/mysql-test/suite/rpl/t/percona_bug860910.cnf (+8/-0)
Percona-Server/mysql-test/suite/rpl/t/percona_bug860910.test (+38/-0)
Percona-Server/mysql-test/suite/rpl/t/rpl_mdev382.test (+256/-0)
Percona-Server/mysql-test/suite/rpl/t/rpl_percona_crash_resistant_rpl-slave.opt (+1/-0)
Percona-Server/mysql-test/suite/rpl/t/rpl_percona_crash_resistant_rpl.test (+108/-0)
Percona-Server/mysql-test/suite/rpl/t/rpl_trigger_bug67504-slave.opt (+1/-0)
Percona-Server/mysql-test/suite/rpl/t/rpl_trigger_bug67504.test (+49/-0)
Percona-Server/mysql-test/suite/sys_vars/r/all_vars.result (+8/-2)
Percona-Server/mysql-test/suite/sys_vars/r/enforce_storage_engine_basic.result (+3/-0)
Percona-Server/mysql-test/suite/sys_vars/r/expand_fast_index_creation_basic.result (+0/-6)
Percona-Server/mysql-test/suite/sys_vars/r/innodb_buffer_pool_populate_basic.result (+12/-0)
Percona-Server/mysql-test/suite/sys_vars/r/innodb_corrupt_table_action_basic.result (+0/-29)
Percona-Server/mysql-test/suite/sys_vars/r/innodb_flush_log_at_trx_commit_basic.result (+0/-1)
Percona-Server/mysql-test/suite/sys_vars/r/innodb_locking_fake_changes_basic.result (+52/-0)
Percona-Server/mysql-test/suite/sys_vars/r/innodb_log_block_size_basic.result (+3/-0)
Percona-Server/mysql-test/suite/sys_vars/r/innodb_max_bitmap_file_size_basic.result (+84/-0)
Percona-Server/mysql-test/suite/sys_vars/r/innodb_page_size_basic.result (+0/-8)
Percona-Server/mysql-test/suite/sys_vars/r/innodb_show_locks_held_basic.result (+3/-0)
Percona-Server/mysql-test/suite/sys_vars/r/innodb_show_verbose_locks_basic.result (+3/-0)
Percona-Server/mysql-test/suite/sys_vars/r/innodb_track_changed_pages_basic.result (+21/-0)
Percona-Server/mysql-test/suite/sys_vars/r/innodb_use_global_flush_log_at_trx_commit_basic.result (+3/-0)
Percona-Server/mysql-test/suite/sys_vars/r/log_slow_admin_statements_basic.result (+3/-0)
Percona-Server/mysql-test/suite/sys_vars/r/log_slow_filter_basic.result (+3/-0)
Percona-Server/mysql-test/suite/sys_vars/r/log_slow_rate_limit_basic.result (+3/-0)
Percona-Server/mysql-test/suite/sys_vars/r/log_slow_rate_type_basic.result (+3/-0)
Percona-Server/mysql-test/suite/sys_vars/r/log_slow_slave_statements_basic.result (+3/-0)
Percona-Server/mysql-test/suite/sys_vars/r/log_slow_sp_statements_basic.result (+3/-0)
Percona-Server/mysql-test/suite/sys_vars/r/log_slow_verbosity_basic.result (+3/-0)
Percona-Server/mysql-test/suite/sys_vars/r/log_warnings_suppress_basic.result (+3/-0)
Percona-Server/mysql-test/suite/sys_vars/r/max_binlog_files_basic.result (+134/-0)
Percona-Server/mysql-test/suite/sys_vars/r/query_cache_strip_comments_basic.result (+3/-0)
Percona-Server/mysql-test/suite/sys_vars/r/query_exec_id_basic.result (+2/-0)
Percona-Server/mysql-test/suite/sys_vars/r/query_exec_time_basic.result (+2/-0)
Percona-Server/mysql-test/suite/sys_vars/r/slow_query_log_timestamp_always_basic.result (+3/-0)
Percona-Server/mysql-test/suite/sys_vars/r/slow_query_log_timestamp_precision_basic.result (+3/-0)
Percona-Server/mysql-test/suite/sys_vars/r/slow_query_log_use_global_control_basic.result (+3/-0)
Percona-Server/mysql-test/suite/sys_vars/r/thread_statistics_basic.result (+6/-0)
Percona-Server/mysql-test/suite/sys_vars/r/userstat_basic.result (+3/-0)
Percona-Server/mysql-test/suite/sys_vars/t/all_vars.test (+2/-2)
Percona-Server/mysql-test/suite/sys_vars/t/enforce_storage_engine_basic.test (+1/-0)
Percona-Server/mysql-test/suite/sys_vars/t/expand_fast_index_creation_basic.test (+0/-2)
Percona-Server/mysql-test/suite/sys_vars/t/innodb_buffer_pool_populate_basic-master.opt (+1/-0)
Percona-Server/mysql-test/suite/sys_vars/t/innodb_buffer_pool_populate_basic.test (+16/-0)
Percona-Server/mysql-test/suite/sys_vars/t/innodb_corrupt_table_action_basic.test (+0/-23)
Percona-Server/mysql-test/suite/sys_vars/t/innodb_flush_log_at_trx_commit_basic.test (+1/-1)
Percona-Server/mysql-test/suite/sys_vars/t/innodb_locking_fake_changes_basic.test (+44/-0)
Percona-Server/mysql-test/suite/sys_vars/t/innodb_log_block_size_basic.test (+1/-0)
Percona-Server/mysql-test/suite/sys_vars/t/innodb_max_bitmap_file_size_basic.test (+62/-0)
Percona-Server/mysql-test/suite/sys_vars/t/innodb_page_size_basic.test (+0/-16)
Percona-Server/mysql-test/suite/sys_vars/t/innodb_show_locks_held_basic.test (+1/-0)
Percona-Server/mysql-test/suite/sys_vars/t/innodb_show_verbose_locks_basic.test (+1/-0)
Percona-Server/mysql-test/suite/sys_vars/t/innodb_track_changed_pages_basic.test (+21/-0)
Percona-Server/mysql-test/suite/sys_vars/t/innodb_use_global_flush_log_at_trx_commit_basic.test (+1/-0)
Percona-Server/mysql-test/suite/sys_vars/t/log_slow_admin_statements_basic.test (+1/-0)
Percona-Server/mysql-test/suite/sys_vars/t/log_slow_filter_basic.test (+1/-0)
Percona-Server/mysql-test/suite/sys_vars/t/log_slow_rate_limit_basic.test (+1/-0)
Percona-Server/mysql-test/suite/sys_vars/t/log_slow_rate_type_basic.test (+1/-0)
Percona-Server/mysql-test/suite/sys_vars/t/log_slow_slave_statements_basic.test (+1/-0)
Percona-Server/mysql-test/suite/sys_vars/t/log_slow_sp_statements_basic.test (+1/-0)
Percona-Server/mysql-test/suite/sys_vars/t/log_slow_verbosity_basic.test (+1/-0)
Percona-Server/mysql-test/suite/sys_vars/t/log_warnings_suppress_basic.test (+1/-0)
Percona-Server/mysql-test/suite/sys_vars/t/max_binlog_files_basic.test (+147/-0)
Percona-Server/mysql-test/suite/sys_vars/t/query_cache_strip_comments_basic.test (+1/-0)
Percona-Server/mysql-test/suite/sys_vars/t/query_exec_id_basic.test (+4/-0)
Percona-Server/mysql-test/suite/sys_vars/t/query_exec_time_basic.test (+4/-0)
Percona-Server/mysql-test/suite/sys_vars/t/slow_query_log_timestamp_always_basic.test (+1/-0)
Percona-Server/mysql-test/suite/sys_vars/t/slow_query_log_timestamp_precision_basic.test (+1/-0)
Percona-Server/mysql-test/suite/sys_vars/t/slow_query_log_use_global_control_basic.test (+1/-0)
Percona-Server/mysql-test/suite/sys_vars/t/thread_statistics_basic.test (+4/-0)
Percona-Server/mysql-test/suite/sys_vars/t/userstat_basic.test (+1/-0)
Percona-Server/mysql-test/t/connect.test (+3/-0)
Percona-Server/mysql-test/t/create.test (+6/-1)
Percona-Server/mysql-test/t/file_contents.test (+5/-2)
Percona-Server/mysql-test/t/group_commit_crash-master.opt (+1/-0)
Percona-Server/mysql-test/t/group_commit_crash.test (+82/-0)
Percona-Server/mysql-test/t/information_schema.test (+8/-0)
Percona-Server/mysql-test/t/percona_bug1008278-slave.opt (+1/-0)
Percona-Server/mysql-test/t/percona_bug1008278.test (+23/-0)
Percona-Server/mysql-test/t/percona_bug1008609.test (+23/-0)
Percona-Server/mysql-test/t/percona_bug1017192.test (+40/-0)
Percona-Server/mysql-test/t/percona_bug1035225.test (+47/-0)
Percona-Server/mysql-test/t/percona_bug45702.test (+34/-0)
Percona-Server/mysql-test/t/percona_bug643149.test (+50/-0)
Percona-Server/mysql-test/t/percona_bug856404-master.opt (+1/-0)
Percona-Server/mysql-test/t/percona_bug856404.test (+15/-0)
Percona-Server/mysql-test/t/percona_enforce_storage_engine-master.opt (+1/-0)
Percona-Server/mysql-test/t/percona_enforce_storage_engine.test (+27/-0)
Percona-Server/mysql-test/t/percona_enhanced_options_modifiers.test (+167/-0)
Percona-Server/mysql-test/t/percona_expand_fast_index_creation.test (+46/-0)
Percona-Server/mysql-test/t/percona_heap_blob.test (+631/-0)
Percona-Server/mysql-test/t/percona_heap_bug783366.test (+19/-0)
Percona-Server/mysql-test/t/percona_heap_bug783451.test (+16/-0)
Percona-Server/mysql-test/t/percona_heap_bug784464.test (+66/-0)
Percona-Server/mysql-test/t/percona_heap_bug784464_32bit.test (+15/-0)
Percona-Server/mysql-test/t/percona_heap_bug784464_64bit.test (+15/-0)
Percona-Server/mysql-test/t/percona_heap_bug784468.test (+19/-0)
Percona-Server/mysql-test/t/percona_heap_bug788544.test (+15/-0)
Percona-Server/mysql-test/t/percona_heap_bug788576.test (+19/-0)
Percona-Server/mysql-test/t/percona_heap_bug788722.test (+20/-0)
Percona-Server/mysql-test/t/percona_heap_bug789131.test (+14/-0)
Percona-Server/mysql-test/t/percona_heap_var.test (+85/-0)
Percona-Server/mysql-test/t/percona_innodb_deadlock_count.test (+61/-0)
Percona-Server/mysql-test/t/percona_innodb_fake_changes.test (+145/-0)
Percona-Server/mysql-test/t/percona_innodb_fake_changes_bug_898306.test (+59/-0)
Percona-Server/mysql-test/t/percona_innodb_fake_changes_bug_917942-master.opt (+1/-0)
Percona-Server/mysql-test/t/percona_innodb_fake_changes_bug_917942.test (+103/-0)
Percona-Server/mysql-test/t/percona_innodb_fake_changes_locks.test (+121/-0)
Percona-Server/mysql-test/t/percona_innodb_version.test (+8/-0)
Percona-Server/mysql-test/t/percona_log_connection_error-master.opt (+1/-0)
Percona-Server/mysql-test/t/percona_log_connection_error.test (+54/-0)
Percona-Server/mysql-test/t/percona_log_slow_admin_statements-config.cnf (+4/-0)
Percona-Server/mysql-test/t/percona_log_slow_admin_statements-config.test (+2/-0)
Percona-Server/mysql-test/t/percona_log_slow_admin_statements-config_false.cnf (+4/-0)
Percona-Server/mysql-test/t/percona_log_slow_admin_statements-config_false.test (+2/-0)
Percona-Server/mysql-test/t/percona_log_slow_admin_statements-config_foo.cnf (+4/-0)
Percona-Server/mysql-test/t/percona_log_slow_admin_statements-config_foo.test (+3/-0)
Percona-Server/mysql-test/t/percona_log_slow_admin_statements-config_true.cnf (+4/-0)
Percona-Server/mysql-test/t/percona_log_slow_admin_statements-config_true.test (+2/-0)
Percona-Server/mysql-test/t/percona_log_slow_admin_statements.test (+41/-0)
Percona-Server/mysql-test/t/percona_log_slow_filter-cl-master.opt (+1/-0)
Percona-Server/mysql-test/t/percona_log_slow_filter-cl.test (+2/-0)
Percona-Server/mysql-test/t/percona_log_slow_innodb.test (+82/-0)
Percona-Server/mysql-test/t/percona_log_slow_query_plan.test (+302/-0)
Percona-Server/mysql-test/t/percona_log_slow_query_plan_qc-master.opt (+1/-0)
Percona-Server/mysql-test/t/percona_log_slow_query_plan_qc.test (+71/-0)
Percona-Server/mysql-test/t/percona_log_slow_slave_statements-cl-master.opt (+1/-0)
Percona-Server/mysql-test/t/percona_log_slow_slave_statements-cl.test (+3/-0)
Percona-Server/mysql-test/t/percona_log_slow_slave_statements-innodb.test (+48/-0)
Percona-Server/mysql-test/t/percona_log_slow_slave_statements.test (+68/-0)
Percona-Server/mysql-test/t/percona_log_slow_sp_statements-cl-master.opt (+1/-0)
Percona-Server/mysql-test/t/percona_log_slow_sp_statements-cl.test (+2/-0)
Percona-Server/mysql-test/t/percona_log_slow_sp_statements.test (+39/-0)
Percona-Server/mysql-test/t/percona_log_slow_verbosity-cl-master.opt (+1/-0)
Percona-Server/mysql-test/t/percona_log_slow_verbosity-cl.test (+2/-0)
Percona-Server/mysql-test/t/percona_log_slow_verbosity.test (+75/-0)
Percona-Server/mysql-test/t/percona_log_warnings_suppress-master.opt (+1/-0)
Percona-Server/mysql-test/t/percona_log_warnings_suppress.test (+47/-0)
Percona-Server/mysql-test/t/percona_long_query_time.test (+29/-0)
Percona-Server/mysql-test/t/percona_min_examined_row_limit.test (+36/-0)
Percona-Server/mysql-test/t/percona_mysqldump_innodb_optimize_keys.test (+0/-227)
Percona-Server/mysql-test/t/percona_processlist_row_stats.test (+79/-0)
Percona-Server/mysql-test/t/percona_query_cache_with_comments-master.opt (+1/-0)
Percona-Server/mysql-test/t/percona_query_cache_with_comments.test (+5/-0)
Percona-Server/mysql-test/t/percona_query_cache_with_comments_crash.test (+22/-0)
Percona-Server/mysql-test/t/percona_query_cache_with_comments_disable-master.opt (+1/-0)
Percona-Server/mysql-test/t/percona_query_cache_with_comments_disable.test (+3/-0)
Percona-Server/mysql-test/t/percona_query_cache_with_comments_prepared_statements-master.opt (+1/-0)
Percona-Server/mysql-test/t/percona_query_cache_with_comments_prepared_statements.test (+208/-0)
Percona-Server/mysql-test/t/percona_secure_file_priv_noarg-master.opt (+1/-0)
Percona-Server/mysql-test/t/percona_secure_file_priv_noarg.test (+27/-0)
Percona-Server/mysql-test/t/percona_show_slave_status_nolock.test (+90/-0)
Percona-Server/mysql-test/t/percona_signal_handling.test (+11/-0)
Percona-Server/mysql-test/t/percona_slow_extended_error_on_quit.test (+71/-0)
Percona-Server/mysql-test/t/percona_slow_extended_log_error.test (+31/-0)
Percona-Server/mysql-test/t/percona_slow_query_log_rate.test (+23/-0)
Percona-Server/mysql-test/t/percona_slow_query_log_timestamp_always-cl-master.opt (+1/-0)
Percona-Server/mysql-test/t/percona_slow_query_log_timestamp_always-cl.test (+2/-0)
Percona-Server/mysql-test/t/percona_slow_query_log_timestamp_always.test (+21/-0)
Percona-Server/mysql-test/t/percona_slow_query_log_timestamp_precision-cl-master.opt (+1/-0)
Percona-Server/mysql-test/t/percona_slow_query_log_timestamp_precision-cl.test (+2/-0)
Percona-Server/mysql-test/t/percona_slow_query_log_timestamp_precision-master.opt (+1/-0)
Percona-Server/mysql-test/t/percona_slow_query_log_timestamp_precision.test (+37/-0)
Percona-Server/mysql-test/t/percona_slow_query_log_use_global_control-cl-master.opt (+1/-0)
Percona-Server/mysql-test/t/percona_slow_query_log_use_global_control-cl.test (+2/-0)
Percona-Server/mysql-test/t/percona_slow_query_log_use_global_control.test (+31/-0)
Percona-Server/mysql-test/t/percona_ssl_connections_count.test (+79/-0)
Percona-Server/mysql-test/t/percona_status_wait_query_cache_mutex-master.opt (+1/-0)
Percona-Server/mysql-test/t/percona_status_wait_query_cache_mutex.test (+35/-0)
Percona-Server/mysql-test/t/percona_utility_user-master.opt (+1/-0)
Percona-Server/mysql-test/t/percona_utility_user.test (+143/-0)
Percona-Server/mysql-test/t/percona_xtradb_bug317074.test (+47/-0)
Percona-Server/mysql-test/t/ps_1general.test (+5/-0)
Percona-Server/mysql-test/t/ps_2myisam.test (+5/-0)
Percona-Server/mysql-test/t/ps_3innodb.test (+5/-0)
Percona-Server/mysql-test/t/ps_4heap.test (+5/-0)
Percona-Server/mysql-test/t/ps_5merge.test (+5/-0)
Percona-Server/mysql-test/t/show_check.test (+2/-2)
Percona-Server/mysql-test/t/sp-threads.test (+1/-1)
Percona-Server/mysql-test/t/userstat_bug602047.test (+16/-0)
Percona-Server/mysql-test/t/xa_binlog.test (+32/-0)
Percona-Server/mysql-test/valgrind.supp (+9/-0)
Percona-Server/mysys/array.c (+35/-10)
Percona-Server/mysys/mf_cache.c (+18/-0)
Percona-Server/mysys/my_bitmap.c (+1/-1)
Percona-Server/mysys/my_pread.c (+24/-1)
Percona-Server/mysys/waiting_threads.c (+1/-1)
Percona-Server/mysys_ssl/my_getopt.cc (+308/-36)
Percona-Server/patch_info/microsec_process.info (+0/-8)
Percona-Server/plugin/percona-pam-for-mysql/.bzrignore (+21/-0)
Percona-Server/plugin/percona-pam-for-mysql/CMakeLists.txt (+34/-0)
Percona-Server/plugin/percona-pam-for-mysql/LICENSE (+339/-0)
Percona-Server/plugin/percona-pam-for-mysql/Makefile.am (+19/-0)
Percona-Server/plugin/percona-pam-for-mysql/README (+40/-0)
Percona-Server/plugin/percona-pam-for-mysql/bootstrap (+18/-0)
Percona-Server/plugin/percona-pam-for-mysql/build/build-binary.sh.in (+122/-0)
Percona-Server/plugin/percona-pam-for-mysql/build/percona-pam-plugin.spec.in (+66/-0)
Percona-Server/plugin/percona-pam-for-mysql/configure.ac (+95/-0)
Percona-Server/plugin/percona-pam-for-mysql/doc/Makefile (+130/-0)
Percona-Server/plugin/percona-pam-for-mysql/doc/make.bat (+170/-0)
Percona-Server/plugin/percona-pam-for-mysql/doc/source/conf.py (+245/-0)
Percona-Server/plugin/percona-pam-for-mysql/doc/source/faq.rst (+51/-0)
Percona-Server/plugin/percona-pam-for-mysql/doc/source/glossary.rst (+8/-0)
Percona-Server/plugin/percona-pam-for-mysql/doc/source/index.rst (+51/-0)
Percona-Server/plugin/percona-pam-for-mysql/doc/source/installation.rst (+50/-0)
Percona-Server/plugin/percona-pam-for-mysql/doc/source/intro.rst (+23/-0)
Percona-Server/plugin/percona-pam-for-mysql/doc/source/manual.rst (+38/-0)
Percona-Server/plugin/percona-pam-for-mysql/doc/source/percona-theme/layout.html (+499/-0)
Percona-Server/plugin/percona-pam-for-mysql/doc/source/percona-theme/searchbox.html (+22/-0)
Percona-Server/plugin/percona-pam-for-mysql/doc/source/percona-theme/static/default.css_t (+469/-0)
Percona-Server/plugin/percona-pam-for-mysql/doc/source/percona-theme/static/jquery.min.js (+154/-0)
Percona-Server/plugin/percona-pam-for-mysql/doc/source/percona-theme/static/percona.com.css (+271/-0)
Percona-Server/plugin/percona-pam-for-mysql/doc/source/percona-theme/static/percona.com.js (+269/-0)
Percona-Server/plugin/percona-pam-for-mysql/doc/source/percona-theme/static/sidebar.js (+151/-0)
Percona-Server/plugin/percona-pam-for-mysql/doc/source/percona-theme/theme.conf (+32/-0)
Percona-Server/plugin/percona-pam-for-mysql/doc/source/release-notes.rst (+8/-0)
Percona-Server/plugin/percona-pam-for-mysql/src/Makefile.am (+37/-0)
Percona-Server/plugin/percona-pam-for-mysql/src/auth_mapping.c (+249/-0)
Percona-Server/plugin/percona-pam-for-mysql/src/auth_mapping.h (+74/-0)
Percona-Server/plugin/percona-pam-for-mysql/src/auth_pam.c (+175/-0)
Percona-Server/plugin/percona-pam-for-mysql/src/auth_pam_common.c (+190/-0)
Percona-Server/plugin/percona-pam-for-mysql/src/auth_pam_common.h (+71/-0)
Percona-Server/plugin/percona-pam-for-mysql/src/auth_pam_compat.c (+131/-0)
Percona-Server/plugin/percona-pam-for-mysql/src/dialog.c (+351/-0)
Percona-Server/plugin/percona-pam-for-mysql/src/lib_auth_pam_client.c (+80/-0)
Percona-Server/plugin/percona-pam-for-mysql/src/lib_auth_pam_client.h (+80/-0)
Percona-Server/plugin/percona-pam-for-mysql/src/test_auth_pam_client.c (+82/-0)
Percona-Server/scripts/mysql_install_db.sh (+3/-0)
Percona-Server/scripts/mysqld_multi.sh (+12/-12)
Percona-Server/scripts/mysqld_safe.sh (+68/-0)
Percona-Server/scripts/mysqldumpslow.sh (+2/-2)
Percona-Server/sql/binlog.cc (+108/-15)
Percona-Server/sql/binlog.h (+2/-1)
Percona-Server/sql/filesort.cc (+8/-3)
Percona-Server/sql/ha_ndbcluster_binlog.cc (+17/-31)
Percona-Server/sql/handler.cc (+195/-0)
Percona-Server/sql/handler.h (+33/-3)
Percona-Server/sql/item.cc (+16/-0)
Percona-Server/sql/item.h (+4/-0)
Percona-Server/sql/item_func.cc (+2/-2)
Percona-Server/sql/item_func.h (+1/-1)
Percona-Server/sql/lex.h (+7/-0)
Percona-Server/sql/log.cc (+148/-24)
Percona-Server/sql/log.h (+5/-4)
Percona-Server/sql/log_event.cc (+308/-227)
Percona-Server/sql/log_event.h (+33/-26)
Percona-Server/sql/log_event_old.cc (+1/-1)
Percona-Server/sql/log_event_old.h (+1/-1)
Percona-Server/sql/mysqld.cc (+159/-8)
Percona-Server/sql/mysqld.h (+42/-3)
Percona-Server/sql/opt_range.cc (+1/-1)
Percona-Server/sql/query_strip_comments.h (+37/-0)
Percona-Server/sql/rpl_slave.cc (+12/-4)
Percona-Server/sql/rpl_utility.cc (+1/-0)
Percona-Server/sql/set_var.cc (+10/-1)
Percona-Server/sql/set_var.h (+9/-1)
Percona-Server/sql/signal_handler.cc (+6/-4)
Percona-Server/sql/sp_head.cc (+1/-1)
Percona-Server/sql/sp_instr.cc (+17/-0)
Percona-Server/sql/sql_acl.cc (+263/-5)
Percona-Server/sql/sql_acl.h (+4/-0)
Percona-Server/sql/sql_base.cc (+50/-15)
Percona-Server/sql/sql_bitmap.h (+7/-3)
Percona-Server/sql/sql_cache.cc (+311/-15)
Percona-Server/sql/sql_class.cc (+281/-4)
Percona-Server/sql/sql_class.h (+211/-2)
Percona-Server/sql/sql_cmd.h (+7/-0)
Percona-Server/sql/sql_connect.cc (+642/-1)
Percona-Server/sql/sql_db.cc (+21/-42)
Percona-Server/sql/sql_delete.cc (+4/-0)
Percona-Server/sql/sql_insert.cc (+63/-6)
Percona-Server/sql/sql_lex.cc (+6/-0)
Percona-Server/sql/sql_load.cc (+29/-31)
Percona-Server/sql/sql_parse.cc (+287/-10)
Percona-Server/sql/sql_plugin.cc (+44/-1)
Percona-Server/sql/sql_prepare.cc (+309/-6)
Percona-Server/sql/sql_profile.cc (+140/-3)
Percona-Server/sql/sql_profile.h (+16/-10)
Percona-Server/sql/sql_reload.cc (+54/-3)
Percona-Server/sql/sql_select.cc (+12/-2)
Percona-Server/sql/sql_show.cc (+452/-53)
Percona-Server/sql/sql_show.h (+1/-1)
Percona-Server/sql/sql_string.cc (+61/-10)
Percona-Server/sql/sql_string.h (+10/-0)
Percona-Server/sql/sql_table.cc (+24/-4)
Percona-Server/sql/sql_tmp_table.cc (+11/-6)
Percona-Server/sql/sql_truncate.cc (+15/-14)
Percona-Server/sql/sql_update.cc (+8/-4)
Percona-Server/sql/sql_yacc.yy (+77/-3)
Percona-Server/sql/structs.h (+170/-0)
Percona-Server/sql/sys_vars.cc (+204/-3)
Percona-Server/sql/sys_vars.h (+49/-3)
Percona-Server/sql/table.h (+5/-0)
Percona-Server/storage/federated/ha_federated.cc (+6/-0)
Percona-Server/storage/heap/CMakeLists.txt (+1/-0)
Percona-Server/storage/heap/_check.c (+38/-14)
Percona-Server/storage/heap/_rectest.c (+3/-1)
Percona-Server/storage/heap/ha_heap.cc (+158/-11)
Percona-Server/storage/heap/ha_heap.h (+5/-5)
Percona-Server/storage/heap/heapdef.h (+33/-2)
Percona-Server/storage/heap/hp_clear.c (+3/-8)
Percona-Server/storage/heap/hp_close.c (+4/-0)
Percona-Server/storage/heap/hp_create.c (+201/-43)
Percona-Server/storage/heap/hp_delete.c (+5/-5)
Percona-Server/storage/heap/hp_dspace.c (+440/-0)
Percona-Server/storage/heap/hp_extra.c (+0/-1)
Percona-Server/storage/heap/hp_hash.c (+107/-28)
Percona-Server/storage/heap/hp_info.c (+17/-4)
Percona-Server/storage/heap/hp_open.c (+3/-3)
Percona-Server/storage/heap/hp_record.c (+498/-0)
Percona-Server/storage/heap/hp_rfirst.c (+4/-1)
Percona-Server/storage/heap/hp_rkey.c (+4/-1)
Percona-Server/storage/heap/hp_rlast.c (+4/-1)
Percona-Server/storage/heap/hp_rnext.c (+4/-1)
Percona-Server/storage/heap/hp_rprev.c (+4/-1)
Percona-Server/storage/heap/hp_rrnd.c (+17/-8)
Percona-Server/storage/heap/hp_rsame.c (+9/-2)
Percona-Server/storage/heap/hp_scan.c (+16/-23)
Percona-Server/storage/heap/hp_test1.c (+16/-1)
Percona-Server/storage/heap/hp_test2.c (+25/-2)
Percona-Server/storage/heap/hp_update.c (+40/-11)
Percona-Server/storage/heap/hp_write.c (+19/-45)
Percona-Server/storage/innobase/CMakeLists.txt (+1/-0)
Percona-Server/storage/innobase/btr/btr0btr.cc (+26/-2)
Percona-Server/storage/innobase/btr/btr0cur.cc (+125/-18)
Percona-Server/storage/innobase/btr/btr0pcur.cc (+1/-0)
Percona-Server/storage/innobase/buf/buf0buf.cc (+172/-14)
Percona-Server/storage/innobase/buf/buf0flu.cc (+4/-4)
Percona-Server/storage/innobase/buf/buf0rea.cc (+24/-20)
Percona-Server/storage/innobase/dict/dict0dict.cc (+38/-0)
Percona-Server/storage/innobase/dict/dict0mem.cc (+3/-0)
Percona-Server/storage/innobase/fil/fil0fil.cc (+88/-9)
Percona-Server/storage/innobase/fsp/fsp0fsp.cc (+16/-2)
Percona-Server/storage/innobase/handler/ha_innodb.cc (+591/-31)
Percona-Server/storage/innobase/handler/ha_innodb.h (+3/-0)
Percona-Server/storage/innobase/handler/handler0alter.cc (+10/-0)
Percona-Server/storage/innobase/handler/i_s.cc (+372/-0)
Percona-Server/storage/innobase/handler/i_s.h (+1/-0)
Percona-Server/storage/innobase/ibuf/ibuf0ibuf.cc (+42/-1)
Percona-Server/storage/innobase/include/btr0btr.h (+4/-1)
Percona-Server/storage/innobase/include/btr0cur.h (+3/-2)
Percona-Server/storage/innobase/include/buf0buf.h (+4/-0)
Percona-Server/storage/innobase/include/buf0rea.h (+6/-3)
Percona-Server/storage/innobase/include/dict0dict.h (+8/-0)
Percona-Server/storage/innobase/include/dict0mem.h (+10/-0)
Percona-Server/storage/innobase/include/fil0fil.h (+22/-4)
Percona-Server/storage/innobase/include/ha_prototypes.h (+7/-0)
Percona-Server/storage/innobase/include/ibuf0ibuf.h (+16/-0)
Percona-Server/storage/innobase/include/lock0lock.h (+3/-0)
Percona-Server/storage/innobase/include/log0log.h (+8/-0)
Percona-Server/storage/innobase/include/log0online.h (+190/-0)
Percona-Server/storage/innobase/include/log0recv.h (+37/-0)
Percona-Server/storage/innobase/include/mach0data.ic (+13/-13)
Percona-Server/storage/innobase/include/os0file.h (+47/-14)
Percona-Server/storage/innobase/include/os0file.ic (+5/-2)
Percona-Server/storage/innobase/include/os0proc.h (+2/-1)
Percona-Server/storage/innobase/include/read0read.h (+2/-1)
Percona-Server/storage/innobase/include/srv0srv.h (+90/-1)
Percona-Server/storage/innobase/include/sync0rw.h (+15/-14)
Percona-Server/storage/innobase/include/sync0rw.ic (+6/-6)
Percona-Server/storage/innobase/include/sync0sync.h (+29/-14)
Percona-Server/storage/innobase/include/sync0sync.ic (+6/-6)
Percona-Server/storage/innobase/include/trx0trx.h (+14/-0)
Percona-Server/storage/innobase/include/univ.i (+6/-1)
Percona-Server/storage/innobase/include/ut0rbt.h (+22/-0)
Percona-Server/storage/innobase/lock/lock0lock.cc (+73/-11)
Percona-Server/storage/innobase/log/log0log.cc (+141/-13)
Percona-Server/storage/innobase/log/log0online.cc (+1695/-0)
Percona-Server/storage/innobase/log/log0recv.cc (+27/-6)
Percona-Server/storage/innobase/os/os0file.cc (+135/-19)
Percona-Server/storage/innobase/os/os0proc.cc (+55/-3)
Percona-Server/storage/innobase/que/que0que.cc (+16/-0)
Percona-Server/storage/innobase/read/read0read.cc (+9/-8)
Percona-Server/storage/innobase/row/row0ins.cc (+31/-4)
Percona-Server/storage/innobase/row/row0log.cc (+1/-1)
Percona-Server/storage/innobase/row/row0merge.cc (+7/-2)
Percona-Server/storage/innobase/row/row0mysql.cc (+26/-10)
Percona-Server/storage/innobase/row/row0sel.cc (+11/-2)
Percona-Server/storage/innobase/row/row0upd.cc (+16/-5)
Percona-Server/storage/innobase/srv/srv0conc.cc (+20/-0)
Percona-Server/storage/innobase/srv/srv0srv.cc (+347/-14)
Percona-Server/storage/innobase/srv/srv0start.cc (+32/-2)
Percona-Server/storage/innobase/sync/sync0arr.cc (+5/-7)
Percona-Server/storage/innobase/sync/sync0rw.cc (+42/-10)
Percona-Server/storage/innobase/sync/sync0sync.cc (+29/-10)
Percona-Server/storage/innobase/trx/trx0trx.cc (+64/-4)
Percona-Server/storage/innobase/ut/ut0rbt.cc (+26/-1)
Percona-Server/storage/myisam/ha_myisam.cc (+81/-4)
Percona-Server/storage/myisam/mi_check.c (+1/-1)
Percona-Server/storage/myisam/myisamdef.h (+4/-4)
Percona-Server/storage/myisam/sort.c (+76/-75)
Percona-Server/strings/ctype-simple.c (+3/-12)
Percona-Server/support-files/mysql.server.sh (+15/-15)
build/build-binary.sh (+2/-1)
build/build-shared-compat-rpm.sh (+157/-0)
build/debian/libmysqlclient-dev.install (+1/-0)
build/debian/percona-server-server-5.6.install (+1/-0)
build/debian/rules (+35/-16)
build/percona-server.spec (+7/-0)
build/percona-shared-compat.spec (+93/-0)
doc/Makefile (+0/-145)
doc/make.bat (+0/-170)
doc/source/conf.py (+0/-270)
doc/source/diagnostics/index_info_schema_tables.rst (+0/-15)
doc/source/diagnostics/innodb_deadlock_count.rst (+57/-0)
doc/source/diagnostics/innodb_show_lock_names.rst (+24/-0)
doc/source/diagnostics/innodb_show_status.rst (+475/-0)
doc/source/diagnostics/mysql_syslog.rst (+43/-0)
doc/source/diagnostics/show_engines.rst (+40/-0)
doc/source/diagnostics/slow_extended_55.rst (+377/-0)
doc/source/diagnostics/thread_based_profiling.rst (+17/-0)
doc/source/diagnostics/user_stats.rst (+242/-0)
doc/source/flexibility/buff_read_ahead_area.rst (+36/-0)
doc/source/flexibility/improved_memory_engine.rst (+190/-0)
doc/source/flexibility/innodb_files_extend.rst (+25/-0)
doc/source/flexibility/log_warnings_suppress.rst (+53/-0)
doc/source/flexibility/max_binlog_files.rst (+47/-0)
doc/source/flexibility/mysqldump_ignore_create_error.rst (+0/-22)
doc/source/index.rst (+20/-0)
doc/source/index_info_schema_tables.rst (+58/-0)
doc/source/installation.rst (+4/-0)
doc/source/installation/apt_repo.rst (+0/-65)
doc/source/installation/yum_repo.rst (+0/-81)
doc/source/management/changed_page_tracking.rst (+85/-0)
doc/source/management/enforce_engine.rst (+36/-0)
doc/source/management/expanded_program_option_modifiers.rst (+137/-0)
doc/source/management/innodb_fake_changes.rst (+70/-0)
doc/source/management/innodb_fast_index_creation.rst (+63/-0)
doc/source/management/innodb_kill_idle_trx.rst (+25/-0)
doc/source/management/pam_plugin.rst (+72/-0)
doc/source/management/secure_file_priv_extended.rst (+27/-0)
doc/source/management/udf_maatkit.rst (+49/-0)
doc/source/management/utility_user.rst (+86/-0)
doc/source/percona-theme/layout.html (+0/-368)
doc/source/percona-theme/searchbox.html (+0/-22)
doc/source/percona-theme/static/default.css_t (+0/-433)
doc/source/percona-theme/static/jquery.min.js (+0/-154)
doc/source/percona-theme/static/percona.com.css (+0/-1850)
doc/source/percona-theme/static/percona.com.js (+0/-269)
doc/source/percona-theme/static/sidebar.js (+0/-151)
doc/source/percona-theme/theme.conf (+0/-32)
doc/source/performance/innodb_numa_support.rst (+66/-0)
doc/source/performance/query_cache_enhance.rst (+123/-0)
doc/source/release-notes/Percona-Server-5.6.5-60.0.rst (+0/-26)
doc/source/release-notes/Percona-Server-5.6.6-60.1.rst (+0/-18)
doc/source/release-notes/release-notes_index.rst (+0/-11)
doc/source/reliability/error_pad.rst (+55/-0)
doc/source/reliability/log_connection_error.rst (+14/-0)
doc/source/reliability/show_slave_status_nolock.rst (+23/-0)
doc/source/upstream-bug-fixes.rst (+0/-19)
lrusort.py (+0/-38)
subunit2junitxml (+0/-65)
uninstall_tests.sh (+0/-24)
To merge this branch: bzr merge lp:~laurynas-biveinis/percona-server/5.6-merge-1
Reviewer Review Type Date Requested Status
Alexey Kopytov (community) 2013-05-20 Approve on 2013-05-21
Percona core 2013-05-20 Pending
Review via email: mp+164736@code.launchpad.net

This proposal supersedes a proposal from 2013-05-11.

Description of the Change

The contents of the 2nd MP are identical to the 1st one. Resubmitting because the follow-up branch that fixes the "Needs Fixing" items has been submitted at https://code.launchpad.net/~laurynas-biveinis/percona-server/5.6-merge-1-fixes/+merge/164735.

Merge Percona Server 5.5 as of revision 460 to Percona Server 5.6. This adds all the features mentioned at https://blueprints.launchpad.net/percona-server/+spec/merge-percona-server-5.5-to-mysql-5.6 to the current 5.6 and null-merges the rest.

The commits. The number of commits was determined by wanting to null-merge some specific revisions (i.e. thread pool in 5.5) and the fact that bzr uncommit / bzr shelve/ bzr unshelve stopped working with some of the bigger revisions.

5.5 merge:

318: merge lp:percona-server/5.5 rev 397.
319: fixes to 318.
320: merge lp:percona-server/5.5 rev 444.
321: subunit2junitxml fix.
322: null-merge lp:percona-server/5.5 rev 446 (already present in 5.6: threadpool and clang fixes).
323: merge lp:percona-server/5.5 rev 460.

5.6 trunk reconciliation:

324: null-merge lp:percona-server/5.6 rev 318 (the revision that null-merged 5.5 to 5.6 originally).
325: merge lp:percona-server/5.6 rev 343.

Jenkins at http://jenkins.percona.com/job/percona-server-5.6-param/89/.

For this MP review, please set to Needs Fixing only if you see absolutely critical issues. For other issues, please review as usual and I will convert to bug reports and address them post-merge.

To post a comment you must log in.
Laurynas Biveinis (laurynas-biveinis) wrote : Posted in a previous version of this proposal

Two issues I have noticed myself after submitting the MP:

1) A small part of the XtraDB status vars have been either ported, either null-merged incorrectly. Vars that only exist as struct export_var_t declarations:
 ulint innodb_adaptive_hash_cells;
 ulint innodb_adaptive_hash_heap_buffers;
Vars that exists as struct export_var_t and are exported but apparently are not set:
 ulint innodb_dict_tables.

2) Null-merging the 5.5 threadpool-introducing revision was not entirely correct. A better course of action would have been reverting the contents of the merge and resolving the 5.6 threadpool file-ids instead. Now these differ, and will have to be resolved in a separate commit later.

I don't see neither issue as critical and warranting resubmission.

Alexey Kopytov (akopytov) wrote : Posted in a previous version of this proposal
Download full text (5.7 KiB)

Hi Laurynas. Time is a precious resource these days, I only did a
superficial review, but here goes. I've broken comments/questions into
multiple sections for convenience.

Needs fixing:
=============

These do not necessarily block the MP and can be fixed
either in this MP or subsequent ones, as you like. I would just like to
have these fixed before the code lands in trunk:

   - many spurious copyright changes in the upstream code. Most of them
     look like merge oversights in upstream, but I don't think we should
     fix their copyrights for them :) Something like this should give
     you the list:

: bzr diff -c318 | egrep '^-.*Oracle'

   - as changes in disabled_replication.result show, we deviate from
     upstream behavior when SHOW SLAVE STATUS is run on a non-slave
     server. Upstream sends an empty row with no warnings, PS 5.6 sends
     no column metadata and a warning. Which looks like a very minor
     difference, but 1) some monitoring scripts may stop working if
     their authors are cautious about warnings and 2) there's really no
     reason to change that in PS 5.6, it looks more like an incorrect
     merge of show_slave_status_nolock

   - debug fprintf()s in sys_vars.h:

@@ -192,6 +193,9 @@
       if (SIGNED)
       {
         longlong max_val= *max_var_ptr();
+ fprintf(stderr, "v = %lld, max_val = %lld\n", v, max_val);
+ fprintf(stderr, "save_result = %lld\n",
+ (longlong)(var->save_result.ulonglong_value));

    (and a couple of more occurrences later)

   - rows_read have been removed from PROCESSLIST, but not from the slow
     query log. Which means
     https://blueprints.launchpad.net/percona-server/+spec/obsolete-rows-read-in-56
     is only partially implemented

   - incorrect PERCONA_INNODB_VERSION:

--- Percona-Server/storage/innobase/include/univ.i 2012-12-04 08:24:59 +0000
+++ Percona-Server/storage/innobase/include/univ.i 2013-05-06 15:43:51 +0000
@@ -46,6 +46,11 @@
 #define INNODB_VERSION_MINOR 2
 #define INNODB_VERSION_BUGFIX MYSQL_VERSION_PATCH

+#ifndef PERCONA_INNODB_VERSION
+#define PERCONA_INNODB_VERSION 29.3
+#endif
+

     And it is the same in 5.6-merge-3.

   - all UNIV_SRV_PRINT_LATCH_WAITS code has been removed upstream, but
     we are reintroducing it for no apparent reasons

Needs information:
==================

   - can you explain the following change?

--- Percona-Server/mysql-test/r/derived.result 2013-02-12 07:47:19 +0000
+++ Percona-Server/mysql-test/r/derived.result 2013-05-06 15:43:51 +0000
@@ -1530,7 +1530,7 @@
 heap to myisam.
 show status like 'Handler_write';
 Variable_name Value
-Handler_write 1021
+Handler_write 1011
 set @@max_heap_table_size= @save_heap_size;
 drop table t1;
 #

   - can you explain changes in
     mysql-test/suite/innodb/r/innodb_wl6347_comp_indx_stat.result ?

   - what's the story with the top-level 'internal' directory? it is
     currently missing in both 5.5 upstream and 5.6 upstream, and the
     only useful test it contains is the one for
     http://bugs.mysql.com/bug.php?id=65745.
     Was it removed in previous upstream releases, but we decided to
     keep it? Do we actually run it in MTR/Jenkins?

Nice to ha...

Read more...

review: Needs Information
Laurynas Biveinis (laurynas-biveinis) wrote : Posted in a previous version of this proposal
Download full text (8.7 KiB)

...2013/5/19 Alexey Kopytov <email address hidden>:
> Review: Needs Information
>
> Hi Laurynas. Time is a precious resource these days, I only did a
> superficial review, but here goes.

Thank you for your time.

> Needs fixing:
> =============
>
> These do not necessarily block the MP and can be fixed
> either in this MP or subsequent ones, as you like. I would just like to
> have these fixed before the code lands in trunk:

I am pushing lp:~laurynas-biveinis/percona-server/5.6-merge-1-fixes
with these items. From commit messages:

> - many spurious copyright changes in the upstream code. Most of them
> look like merge oversights in upstream, but I don't think we should
> fix their copyrights for them :) Something like this should give
> you the list:
>
> : bzr diff -c318 | egrep '^-.*Oracle'

Post-review fixes for the lp:percona-server/5.5 rev 397 merge to
lp:percona-server/5.6.

- Revert the spurious copyright comment changes, so that they match
  the ones at the current lp:mysql-server/5.6. Do not touch the ones
  that are fixed in the subsequent 5.6.11 merge.

> - as changes in disabled_replication.result show, we deviate from
> upstream behavior when SHOW SLAVE STATUS is run on a non-slave
> server. Upstream sends an empty row with no warnings, PS 5.6 sends
> no column metadata and a warning. Which looks like a very minor
> difference, but 1) some monitoring scripts may stop working if
> their authors are cautious about warnings and 2) there's really no
> reason to change that in PS 5.6, it looks more like an incorrect
> merge of show_slave_status_nolock

This one I did on purpose in fact. WARN_NO_MASTER_INFO seemed like the
most logical thing to return when slave is not running. Reverted.

Post-review fixes for the lp:percona-server/5.5 rev 397 merge to
lp:percona-server/5.6.

- Revert the change introduced at the porting where SHOW SLAVE STATUS
  would check whether the slave is running, and returning
  WARN_NO_MASTER_INFO warning if it's not. Re-record
  disabled_replication test to match.

> - debug fprintf()s in sys_vars.h:
> - incorrect PERCONA_INNODB_VERSION:
> - all UNIV_SRV_PRINT_LATCH_WAITS code has been removed upstream, but
> we are reintroducing it for no apparent reasons

Post-review fixes for the lp:percona-server/5.5 rev 397 merge to
lp:percona-server/5.6.

- Remove introduced-by-mistake debugging printf()s in sys_vars.h.

- Fix Percona InnoDB version in univ.i.

- Remove obsolete UNIV_SRV_PRINT_LATCH_WAITS code.

> - can you explain the following change?
>
> --- Percona-Server/mysql-test/r/derived.result 2013-02-12 07:47:19 +0000
> +++ Percona-Server/mysql-test/r/derived.result 2013-05-06 15:43:51 +0000
> @@ -1530,7 +1530,7 @@
> heap to myisam.
> show status like 'Handler_write';
> Variable_name Value
> -Handler_write 1021
> +Handler_write 1011

I didn't track it down completely, but I did track it to the MEMORY
VARCHAR support. I guess the query optimizer sees the VARCHAR support
in a temp table even without full BLOB temp table support in the
optimizer. The relevant test snippet is

--echo #
--echo # Bug#12799731 - CRASH IN END_...

Read more...

Somehow I missed this comment

   - rows_read have been removed from PROCESSLIST, but not from the slow
     query log. Which means
     https://blueprints.launchpad.net/percona-server/+spec/obsolete-rows-read-in-56
     is only partially implemented

Yet the blueprint is still there, so there was no risk to miss it for the release. OK to implement on trunk?

Alexey Kopytov (akopytov) wrote : Posted in a previous version of this proposal

Hi Laurynas,

On Mon, 20 May 2013 14:01:44 -0000, Laurynas Biveinis wrote:

> To summarize:
> - the "Needs Fixing" issues are being addressed in a follow-up branch.
> Then the merge order becomes: merge-1, merge-1-fixes, 5.6.11, merge-3.
> As soon as merge-1-fixes is approved, I will push the branches to
> trunk in this order as they are being approved;
> - the "Needs Information" issues need your OK or additional converting
> to bug reports;
> - the rest have been converted to bug db.
>

Thanks!

Alexey Kopytov (akopytov) : Posted in a previous version of this proposal
review: Approve
Alexey Kopytov (akopytov) :
review: Approve
Alexey Kopytov (akopytov) wrote :

Hi Laurynas,

On Tue, 21 May 2013 08:22:28 -0000, Laurynas Biveinis wrote:
> Somehow I missed this comment
>
> - rows_read have been removed from PROCESSLIST, but not from the slow
> query log. Which means
> https://blueprints.launchpad.net/percona-server/+spec/obsolete-rows-read-in-56
> is only partially implemented
>
> Yet the blueprint is still there, so there was no risk to miss it for the release. OK to implement on trunk?
>

Yes.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file '.bzrignore'
2--- .bzrignore 1970-01-01 00:00:00 +0000
3+++ .bzrignore 2013-05-20 14:30:50 +0000
4@@ -0,0 +1,1 @@
5+build
6
7=== removed file '.bzrignore'
8--- .bzrignore 2013-04-05 20:40:25 +0000
9+++ .bzrignore 1970-01-01 00:00:00 +0000
10@@ -1,1 +0,0 @@
11-build
12
13=== added file 'COPYING.innodb-deadlock-count-patch'
14--- COPYING.innodb-deadlock-count-patch 1970-01-01 00:00:00 +0000
15+++ COPYING.innodb-deadlock-count-patch 2013-05-20 14:30:50 +0000
16@@ -0,0 +1,30 @@
17+Portions of this software contain modifications contributed by Eric Bergen.
18+These contributions are used with the following license:
19+
20+Copyright (c) 2010, Eric Bergen. All rights reserved.
21+
22+Redistribution and use in source and binary forms, with or without
23+modification, are permitted provided that the following conditions
24+are met:
25+ * Redistributions of source code must retain the above copyright
26+ notice, this list of conditions and the following disclaimer.
27+ * Redistributions in binary form must reproduce the above
28+ copyright notice, this list of conditions and the following
29+ disclaimer in the documentation and/or other materials
30+ provided with the distribution.
31+ * Neither the name of the Eric Bergen. nor the names of its
32+ contributors may be used to endorse or promote products
33+ derived from this software without specific prior written
34+ permission.
35+
36+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
37+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
38+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
39+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
40+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
41+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
42+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
43+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
44+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
45+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
46+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
47
48=== removed file 'COPYING.innodb-deadlock-count-patch'
49--- COPYING.innodb-deadlock-count-patch 2010-12-09 18:30:58 +0000
50+++ COPYING.innodb-deadlock-count-patch 1970-01-01 00:00:00 +0000
51@@ -1,30 +0,0 @@
52-Portions of this software contain modifications contributed by Eric Bergen.
53-These contributions are used with the following license:
54-
55-Copyright (c) 2010, Eric Bergen. All rights reserved.
56-
57-Redistribution and use in source and binary forms, with or without
58-modification, are permitted provided that the following conditions
59-are met:
60- * Redistributions of source code must retain the above copyright
61- notice, this list of conditions and the following disclaimer.
62- * Redistributions in binary form must reproduce the above
63- copyright notice, this list of conditions and the following
64- disclaimer in the documentation and/or other materials
65- provided with the distribution.
66- * Neither the name of the Eric Bergen. nor the names of its
67- contributors may be used to endorse or promote products
68- derived from this software without specific prior written
69- permission.
70-
71-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
72-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
73-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
74-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
75-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
76-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
77-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
78-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
79-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
80-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
81-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
82
83=== added file 'COPYING.show_temp_51'
84--- COPYING.show_temp_51 1970-01-01 00:00:00 +0000
85+++ COPYING.show_temp_51 2013-05-20 14:30:50 +0000
86@@ -0,0 +1,13 @@
87+Portions of this software contain modifications contributed by Venu Anuganti.
88+These contributions are used with the following license:
89+
90+Copyright (c) 2010, Venu Anuganti, http://venublog.com/
91+All rights reserved.
92+
93+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
94+
95+ * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
96+ * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
97+ * Neither the name of the <ORGANIZATION> nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
98+
99+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
100
101=== removed file 'COPYING.show_temp_51'
102--- COPYING.show_temp_51 2010-12-09 18:30:58 +0000
103+++ COPYING.show_temp_51 1970-01-01 00:00:00 +0000
104@@ -1,13 +0,0 @@
105-Portions of this software contain modifications contributed by Venu Anuganti.
106-These contributions are used with the following license:
107-
108-Copyright (c) 2010, Venu Anuganti, http://venublog.com/
109-All rights reserved.
110-
111-Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
112-
113- * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
114- * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
115- * Neither the name of the <ORGANIZATION> nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
116-
117-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
118
119=== added file 'Makefile'
120--- Makefile 1970-01-01 00:00:00 +0000
121+++ Makefile 2013-05-20 14:30:50 +0000
122@@ -0,0 +1,74 @@
123+MYSQL_VERSION=5.6.10
124+PERCONA_SERVER_VERSION=alpha60.2
125+PERCONA_SERVER ?=Percona-Server-$(MYSQL_VERSION)-$(PERCONA_SERVER_VERSION)
126+PERCONA_SERVER_SHORT_1 ?=Percona-Server-$(MYSQL_VERSION)
127+PERCONA_SERVER_SHORT_2 ?=Percona-Server
128+DEBUG_DIR ?= $(PERCONA_SERVER)-debug
129+RELEASE_DIR ?= $(PERCONA_SERVER)-release
130+SERIES ?=series
131+
132+CFLAGS=-fPIC -Wall -O3 -g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing
133+CXXFLAGS=-fno-exceptions -fPIC -Wall -Wno-unused-parameter -fno-implicit-templates -fno-exceptions -fno-rtti -O3 -g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing
134+
135+CFLAGS_RELEASE=$(CFLAGS) -DDBUG_OFF -DMY_PTHREAD_FASTMUTEX=1
136+CXXFLAGS_RELEASE=$(CXXFLAGS) -DDBUG_OFF -DMY_PTHREAD_FASTMUTEX=1
137+
138+CMAKE=CC=gcc CXX=gcc cmake $(ADDITIONAL)
139+ADDITIONAL ?=
140+CONFIGURE=CFLAGS="-O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2" CXXFLAGS="-O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2" LIBS=-lrt ./configure --prefix=/usr/local/$(PERCONA_SERVER)-$(MYSQL_VERSION) --with-plugin-innobase --with-plugin-partition
141+
142+REVS = $(shell bzr log | grep rev | head -1 )
143+REV = $(word 2, $(REVS) )
144+
145+all: main maatkit-udf install-lic
146+ @echo ""
147+ @echo "Percona Server source code is ready"
148+ @echo "Now change directory to $(PERCONA_SERVER) define variables as show below"
149+ @echo ""
150+ export CFLAGS="-O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2"
151+ export CXXFLAGS="-O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2"
152+ export LIBS=-lrt
153+ @echo ""
154+ @echo "and run cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_CONFIG=mysql_release -DFEATURE_SET=community -DWITH_EMBEDDED_SERVER=OFF && make all install"
155+ @echo ""
156+
157+maatkit-udf:
158+ cp -R UDF "$(PERCONA_SERVER)"
159+ cd "$(PERCONA_SERVER)"/UDF && autoreconf --install
160+
161+configure: all
162+ (cd $(PERCONA_SERVER); bash BUILD/autorun.sh; $(CONFIGURE))
163+
164+cmake: cmake_release cmake_debug
165+
166+cmake_release:
167+ rm -rf $(RELEASE_DIR)
168+ (mkdir -p $(RELEASE_DIR); cd $(RELEASE_DIR); CFLAGS="$(CFLAGS_RELEASE)" CXXFLAGS="$(CXXFLAGS_RELEASE)" $(CMAKE) -G "Unix Makefiles" ../$(PERCONA_SERVER))
169+
170+cmake_debug:
171+ rm -rf $(DEBUG_DIR)
172+ (mkdir -p $(DEBUG_DIR); cd $(DEBUG_DIR); CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" $(CMAKE) -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug -DWITH_DEBUG=ON -DMYSQL_MAINTAINER_MODE=OFF ../$(PERCONA_SERVER))
173+
174+binary:
175+ (cd $(PERCONA_SERVER); CFLAGS="$(CFLAGS_RELEASE)" CXXFLAGS="$(CXXFLAGS_RELEASE)" ${CMAKE} . -DBUILD_CONFIG=mysql_release \
176+ -DCMAKE_BUILD_TYPE=RelWithDebInfo \
177+ -DCMAKE_INSTALL_PREFIX="/usr/local/$(PERCONA_SERVER)-$(MYSQL_VERSION)-$(REV)" \
178+ -DFEATURE_SET="community" \
179+ -DWITH_EMBEDDED_SERVER=OFF \
180+ -DCOMPILATION_COMMENT="Percona-Server" \
181+ -DMYSQL_SERVER_SUFFIX="-$(REV)" )
182+
183+install-lic:
184+ @echo "Installing license files"
185+ install -m 644 COPYING.* $(PERCONA_SERVER)
186+
187+prepare:
188+ @echo "Prepare Percona Server sources"
189+ rm -rf $(PERCONA_SERVER) $(PERCONA_SERVER_SHORT_1)
190+ ln -s $(PERCONA_SERVER_SHORT_2) $(PERCONA_SERVER)
191+ ln -s $(PERCONA_SERVER_SHORT_2) $(PERCONA_SERVER_SHORT_1)
192+
193+main: prepare
194+
195+clean:
196+ rm -rf $(RELEASE_DIR) $(DEBUG_DIR)
197
198=== removed file 'Makefile'
199--- Makefile 2013-04-10 04:47:26 +0000
200+++ Makefile 1970-01-01 00:00:00 +0000
201@@ -1,78 +0,0 @@
202-MYSQL_VERSION=5.6.10
203-PERCONA_SERVER_VERSION=alpha60.2
204-PERCONA_SERVER ?=Percona-Server-$(MYSQL_VERSION)-$(PERCONA_SERVER_VERSION)
205-PERCONA_SERVER_SHORT_1 ?=Percona-Server-$(MYSQL_VERSION)
206-PERCONA_SERVER_SHORT_2 ?=Percona-Server
207-DEBUG_DIR ?= $(PERCONA_SERVER)-debug
208-RELEASE_DIR ?= $(PERCONA_SERVER)-release
209-SERIES ?=series
210-
211-CFLAGS=-fPIC -Wall -O3 -g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing
212-CXXFLAGS=-fno-exceptions -fPIC -Wall -Wno-unused-parameter -fno-implicit-templates -fno-exceptions -fno-rtti -O3 -g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing
213-
214-CFLAGS_RELEASE=$(CFLAGS) -DDBUG_OFF -DMY_PTHREAD_FASTMUTEX=1
215-CXXFLAGS_RELEASE=$(CXXFLAGS) -DDBUG_OFF -DMY_PTHREAD_FASTMUTEX=1
216-
217-CMAKE=CC=gcc CXX=gcc cmake $(ADDITIONAL)
218-ADDITIONAL ?=
219-CONFIGURE=CFLAGS="-O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2" CXXFLAGS="-O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2" LIBS=-lrt ./configure --prefix=/usr/local/$(PERCONA_SERVER)-$(MYSQL_VERSION) --with-plugin-innobase --with-plugin-partition
220-
221-REVS = $(shell bzr log | grep rev | head -1 )
222-REV = $(word 2, $(REVS) )
223-
224-all: main maatkit-udf install-lic misc
225- @echo ""
226- @echo "Percona Server source code is ready"
227- @echo "Now change directory to $(PERCONA_SERVER) define variables as show below"
228- @echo ""
229- export CFLAGS="-O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2"
230- export CXXFLAGS="-O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2"
231- export LIBS=-lrt
232- @echo ""
233- @echo "and run cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_CONFIG=mysql_release -DFEATURE_SET=community -DWITH_EMBEDDED_SERVER=OFF && make all install"
234- @echo ""
235-
236-maatkit-udf:
237- cp -R UDF "$(PERCONA_SERVER)"
238- cd "$(PERCONA_SERVER)"/UDF && autoreconf --install
239-
240-configure: all
241- (cd $(PERCONA_SERVER); bash BUILD/autorun.sh; $(CONFIGURE))
242-
243-cmake: cmake_release cmake_debug
244-
245-cmake_release:
246- rm -rf $(RELEASE_DIR)
247- (mkdir -p $(RELEASE_DIR); cd $(RELEASE_DIR); CFLAGS="$(CFLAGS_RELEASE)" CXXFLAGS="$(CXXFLAGS_RELEASE)" $(CMAKE) -G "Unix Makefiles" ../$(PERCONA_SERVER))
248-
249-cmake_debug:
250- rm -rf $(DEBUG_DIR)
251- (mkdir -p $(DEBUG_DIR); cd $(DEBUG_DIR); CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" $(CMAKE) -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug -DWITH_DEBUG=ON -DMYSQL_MAINTAINER_MODE=OFF ../$(PERCONA_SERVER))
252-
253-binary:
254- (cd $(PERCONA_SERVER); CFLAGS="$(CFLAGS_RELEASE)" CXXFLAGS="$(CXXFLAGS_RELEASE)" ${CMAKE} . -DBUILD_CONFIG=mysql_release \
255- -DCMAKE_BUILD_TYPE=RelWithDebInfo \
256- -DCMAKE_INSTALL_PREFIX="/usr/local/$(PERCONA_SERVER)-$(MYSQL_VERSION)-$(REV)" \
257- -DFEATURE_SET="community" \
258- -DWITH_EMBEDDED_SERVER=OFF \
259- -DCOMPILATION_COMMENT="Percona-Server" \
260- -DMYSQL_SERVER_SUFFIX="-$(REV)" )
261-
262-install-lic:
263- @echo "Installing license files"
264- install -m 644 COPYING.* $(PERCONA_SERVER)
265-
266-prepare:
267- @echo "Prepare Percona Server sources"
268- rm -rf $(PERCONA_SERVER) $(PERCONA_SERVER_SHORT_1)
269- ln -s $(PERCONA_SERVER_SHORT_2) $(PERCONA_SERVER)
270- ln -s $(PERCONA_SERVER_SHORT_2) $(PERCONA_SERVER_SHORT_1)
271-
272-main: prepare
273-
274-misc:
275- @echo "Installing other files"
276- install -m 644 lrusort.py $(PERCONA_SERVER)/scripts
277-
278-clean:
279- rm -rf $(RELEASE_DIR) $(DEBUG_DIR)
280
281=== modified file 'Percona-Server/CMakeLists.txt'
282--- Percona-Server/CMakeLists.txt 2013-03-05 12:46:43 +0000
283+++ Percona-Server/CMakeLists.txt 2013-05-20 14:30:50 +0000
284@@ -50,6 +50,8 @@
285 MARK_AS_ADVANCED(MANUFACTURER)
286 ENDIF()
287
288+#PAM build Handling
289+OPTION(WITH_PAM "Build with Percona PAM plugin" OFF)
290 # We choose to provide WITH_DEBUG as alias to standard CMAKE_BUILD_TYPE=Debug
291 # which turns out to be not trivial, as this involves synchronization
292 # between CMAKE_BUILD_TYPE and WITH_DEBUG. Besides, we have to deal with cases
293@@ -254,6 +256,11 @@
294 OPTION(INNODB_COMPILER_HINTS "Compile InnoDB with compiler hints" ON)
295 MARK_AS_ADVANCED(INNODB_COMPILER_HINTS)
296
297+IF (NOT MAX_INDEXES)
298+ SET(MAX_INDEXES 64)
299+ENDIF()
300+SET(MAX_INDEXES ${MAX_INDEXES} CACHE STRING "Sets the maximum number of indexes per table, default 64")
301+
302 # Set DBUG_OFF and other optional release-only flags for non-debug project types
303 FOREACH(BUILD_TYPE RELEASE RELWITHDEBINFO MINSIZEREL)
304 FOREACH(LANG C CXX)
305
306=== modified file 'Percona-Server/client/CMakeLists.txt'
307--- Percona-Server/client/CMakeLists.txt 2013-03-05 12:46:43 +0000
308+++ Percona-Server/client/CMakeLists.txt 2013-05-20 14:30:50 +0000
309@@ -1,4 +1,5 @@
310 # Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
311+# Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
312 #
313 # This program is free software; you can redistribute it and/or modify
314 # it under the terms of the GNU General Public License as published by
315@@ -63,7 +64,7 @@
316 MYSQL_ADD_EXECUTABLE(mysql_plugin mysql_plugin.c)
317 TARGET_LINK_LIBRARIES(mysql_plugin mysqlclient)
318
319-MYSQL_ADD_EXECUTABLE(mysqlbinlog mysqlbinlog.cc)
320+MYSQL_ADD_EXECUTABLE(mysqlbinlog mysqlbinlog.cc sql_string.cc)
321 TARGET_LINK_LIBRARIES(mysqlbinlog mysqlclient)
322
323 MYSQL_ADD_EXECUTABLE(mysqladmin mysqladmin.cc)
324
325=== modified file 'Percona-Server/client/client_priv.h'
326--- Percona-Server/client/client_priv.h 2013-03-05 12:46:43 +0000
327+++ Percona-Server/client/client_priv.h 2013-05-20 14:30:50 +0000
328@@ -85,6 +85,9 @@
329 OPT_DEBUG_INFO, OPT_DEBUG_CHECK, OPT_COLUMN_TYPES, OPT_ERROR_LOG_FILE,
330 OPT_WRITE_BINLOG, OPT_DUMP_DATE,
331 OPT_INIT_COMMAND,
332+#ifndef __WIN__
333+ OPT_SYSLOG,
334+#endif
335 OPT_PLUGIN_DIR,
336 OPT_DEFAULT_AUTH,
337 OPT_DEFAULT_PLUGIN,
338
339=== modified file 'Percona-Server/client/mysql.cc'
340--- Percona-Server/client/mysql.cc 2013-04-04 09:37:28 +0000
341+++ Percona-Server/client/mysql.cc 2013-05-20 14:30:50 +0000
342@@ -41,6 +41,11 @@
343 #include "my_readline.h"
344 #include <signal.h>
345 #include <violite.h>
346+#ifndef __WIN__
347+#include "syslog.h"
348+#endif
349+
350+#define MAX_SYSLOG_MESSAGE 900
351
352 #include <algorithm>
353
354@@ -151,7 +156,7 @@
355 default_pager_set= 0, opt_sigint_ignore= 0,
356 auto_vertical_output= 0,
357 show_warnings= 0, executing_query= 0, interrupted_query= 0,
358- ignore_spaces= 0;
359+ ignore_spaces= 0, opt_syslog= 0;
360 static my_bool debug_info_flag, debug_check_flag;
361 static my_bool column_types_flag;
362 static my_bool preserve_comments= 0;
363@@ -254,6 +259,7 @@
364 void tee_fputs(const char *s, FILE *file);
365 void tee_puts(const char *s, FILE *file);
366 void tee_putc(int c, FILE *file);
367+void write_syslog(String *buffer);
368 static void tee_print_sized_data(const char *, unsigned int, unsigned int, bool);
369 /* The names of functions that actually do the manipulation. */
370 static int get_options(int argc,char **argv);
371@@ -1736,6 +1742,10 @@
372 {"show-warnings", OPT_SHOW_WARNINGS, "Show warnings after every statement.",
373 &show_warnings, &show_warnings, 0, GET_BOOL, NO_ARG,
374 0, 0, 0, 0, 0, 0},
375+#ifndef __WIN__
376+ {"syslog", OPT_SYSLOG, "Logs all queries to syslog", 0, 0, 0, GET_NO_ARG,
377+ NO_ARG, 0, 0, 0, 0, 0, 0},
378+#endif
379 {"plugin_dir", OPT_PLUGIN_DIR, "Directory for client-side plugins.",
380 &opt_plugin_dir, &opt_plugin_dir, 0,
381 GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
382@@ -1860,6 +1870,11 @@
383 opt->name);
384 #endif
385 break;
386+#ifndef __WIN__
387+ case OPT_SYSLOG:
388+ opt_syslog = 1;
389+ break;
390+#endif
391 case OPT_SERVER_ARG:
392 #ifdef EMBEDDED_LIBRARY
393 /*
394@@ -2297,6 +2312,40 @@
395 DBUG_RETURN((COMMANDS *) 0);
396 }
397
398+void write_syslog(String *line){
399+#ifndef __WIN__
400+ uint length= line->length();
401+ uint chunk_len= MY_MIN(MAX_SYSLOG_MESSAGE, length);
402+ char *ptr= line->c_ptr_safe();
403+ char buff[MAX_SYSLOG_MESSAGE + 1];
404+
405+ for (;
406+ length;
407+ length-= chunk_len, ptr+= chunk_len,
408+ chunk_len= MY_MIN(MAX_SYSLOG_MESSAGE, length))
409+ {
410+ char *str;
411+ if (length == chunk_len)
412+ str= ptr; // last chunk => skip copy
413+ else
414+ {
415+ memcpy(buff, ptr, chunk_len);
416+ buff[chunk_len]= '\0';
417+ str= buff;
418+ }
419+ syslog(LOG_INFO,
420+ "SYSTEM_USER:'%s', MYSQL_USER:'%s', CONNECTION_ID:%lu, "
421+ "DB_SERVER:'%s', DB:'%s', QUERY:'%s'",
422+ getenv("SUDO_USER") ? getenv("SUDO_USER") :
423+ getenv("USER") ? getenv("USER") : "--",
424+ current_user ? current_user : "--",
425+ mysql_thread_id(&mysql),
426+ current_host ? current_host : "--",
427+ current_db ? current_db : "--",
428+ str);
429+ }
430+#endif
431+}
432
433 static bool add_line(String &buffer, char *line, ulong line_length,
434 char *in_string, bool *ml_comment, bool truncated)
435@@ -3371,6 +3420,11 @@
436 fix_history(buffer);
437 }
438 #endif
439+#ifndef __WIN__
440+ if (opt_syslog && buffer->length() && connect_flag == CLIENT_INTERACTIVE){
441+ write_syslog(buffer);
442+ }
443+#endif
444
445 buffer->length(0);
446
447
448=== modified file 'Percona-Server/client/mysqldump.c'
449--- Percona-Server/client/mysqldump.c 2013-03-05 12:46:43 +0000
450+++ Percona-Server/client/mysqldump.c 2013-05-20 14:30:50 +0000
451@@ -1927,7 +1927,9 @@
452 const char *str_create)
453 {
454 uint i;
455+#ifndef DBUG_OFF
456 my_bool body_found= 0;
457+#endif
458 char *create_stmt_ptr= NULL;
459 ulong create_stmt_len= 0;
460 MYSQL_FIELD *field;
461@@ -1945,7 +1947,9 @@
462 {
463 create_stmt_ptr= (*row)[i];
464 create_stmt_len= lengths[i];
465+#ifndef DBUG_OFF
466 body_found= 1;
467+#endif
468 }
469 else
470 {
471@@ -2388,10 +2392,10 @@
472 {
473 if (opt_xml)
474 {
475- if (i) // Procedures.
476+ if (i) /* Procedures. */
477 print_xml_row(sql_file, "routine", routine_res, &row,
478 "Create Procedure");
479- else // Functions.
480+ else /* Functions. */
481 print_xml_row(sql_file, "routine", routine_res, &row,
482 "Create Function");
483 continue;
484@@ -5162,7 +5166,7 @@
485 if (row[1])
486 fprintf(md_result_file, "MASTER_HOST='%s', ", row[1]);
487 if (row[3])
488- fprintf(md_result_file, "MASTER_PORT='%s', ", row[3]);
489+ fprintf(md_result_file, "MASTER_PORT=%s, ", row[3]);
490 }
491 fprintf(md_result_file,
492 "MASTER_LOG_FILE='%s', MASTER_LOG_POS=%s;\n", row[9], row[21]);
493
494=== modified file 'Percona-Server/client/sql_string.cc'
495--- Percona-Server/client/sql_string.cc 2013-03-05 12:46:43 +0000
496+++ Percona-Server/client/sql_string.cc 2013-05-20 14:30:50 +0000
497@@ -479,6 +479,50 @@
498 return FALSE;
499 }
500
501+bool String::append_identifier(const char *name,
502+ uint length,
503+ const CHARSET_INFO *ci,
504+ int quote_char)
505+{
506+ const char *name_end;
507+ char q= (char)quote_char;
508+ const CHARSET_INFO *lci = ci ? ci : charset();
509+
510+ if (quote_char == EOF)
511+ return append(name, length, charset());
512+
513+ /*
514+ The identifier must be quoted as it includes a quote character or
515+ it's a keyword
516+ */
517+
518+ (void)reserve(length*2 + 2);
519+ if (append(&q, 1, lci))
520+ return true;
521+
522+ for (name_end= name+length ; name < name_end ; name+= length)
523+ {
524+ uchar chr= (uchar) *name;
525+ length= my_mbcharlen(lci, chr);
526+ /*
527+ my_mbcharlen can return 0 on a wrong multibyte
528+ sequence. It is possible when upgrading from 4.0,
529+ and identifier contains some accented characters.
530+ The manual says it does not work. So we'll just
531+ change length to 1 not to hang in the endless loop.
532+ */
533+ if (!length)
534+ length= 1;
535+ if (length == 1 && chr == (uchar) q &&
536+ append(&q, 1, lci))
537+ return true;
538+ if (append(name, length, lci))
539+ return true;
540+ }
541+ return append(&q, 1, lci);
542+}
543+
544+
545 uint32 String::numchars() const
546 {
547 return str_charset->cset->numchars(str_charset, Ptr, Ptr+str_length);
548
549=== modified file 'Percona-Server/client/sql_string.h'
550--- Percona-Server/client/sql_string.h 2013-03-05 12:46:43 +0000
551+++ Percona-Server/client/sql_string.h 2013-05-20 14:30:50 +0000
552@@ -21,6 +21,12 @@
553 #include "m_ctype.h"
554 #include "my_sys.h"
555
556+#define QUOTED_IDENTIFIER(str_name, buf_size, q, cs, id_name, id_size) \
557+ char buf_##str_name[(buf_size)]; \
558+ String str_name((buf_##str_name), (buf_size), (cs)); \
559+ str_name.length(0); \
560+ str_name.append_identifier((id_name), (id_size), (cs), (q));
561+
562 class String;
563 int sortcmp(const String *a,const String *b, const CHARSET_INFO *cs);
564 String *copy_if_not_alloced(String *a,String *b,uint32 arg_length);
565@@ -256,6 +262,10 @@
566 bool append(IO_CACHE* file, uint32 arg_length);
567 bool append_with_prefill(const char *s, uint32 arg_length,
568 uint32 full_length, char fill_char);
569+ bool append_identifier(const char *name,
570+ uint length,
571+ const CHARSET_INFO *ci,
572+ int quote_char);
573 int strstr(const String &search,uint32 offset=0); // Returns offset to substring or -1
574 int strrstr(const String &search,uint32 offset=0); // Returns offset to substring or -1
575 bool replace(uint32 offset,uint32 arg_length,const char *to,uint32 length);
576
577=== modified file 'Percona-Server/cmake/dtrace.cmake'
578--- Percona-Server/cmake/dtrace.cmake 2013-03-05 12:46:43 +0000
579+++ Percona-Server/cmake/dtrace.cmake 2013-05-20 14:30:50 +0000
580@@ -158,7 +158,7 @@
581 FOREACH(lib ${libs})
582 GET_TARGET_PROPERTY(libtype ${lib} TYPE)
583 IF(libtype MATCHES STATIC_LIBRARY)
584- SET(static_libs ${static_lics} ${lib})
585+ SET(static_libs ${static_libs} ${lib})
586 ENDIF()
587 ENDFOREACH()
588
589
590=== modified file 'Percona-Server/cmake/install_layout.cmake'
591--- Percona-Server/cmake/install_layout.cmake 2013-03-05 12:46:43 +0000
592+++ Percona-Server/cmake/install_layout.cmake 2013-05-20 14:30:50 +0000
593@@ -117,7 +117,7 @@
594 SET(INSTALL_SCRIPTDIR_STANDALONE "scripts")
595 #
596 SET(INSTALL_LIBDIR_STANDALONE "lib")
597-SET(INSTALL_PLUGINDIR_STANDALONE "lib/plugin")
598+SET(INSTALL_PLUGINDIR_STANDALONE "lib/mysql/plugin")
599 #
600 SET(INSTALL_INCLUDEDIR_STANDALONE "include")
601 #
602@@ -178,7 +178,7 @@
603 SET(INSTALL_SCRIPTDIR_DEB "scripts")
604 #
605 SET(INSTALL_LIBDIR_DEB "lib")
606-SET(INSTALL_PLUGINDIR_DEB "lib/plugin")
607+SET(INSTALL_PLUGINDIR_DEB "lib/mysql/plugin")
608 #
609 SET(INSTALL_INCLUDEDIR_DEB "include")
610 #
611
612=== modified file 'Percona-Server/config.h.cmake'
613--- Percona-Server/config.h.cmake 2013-03-05 12:46:43 +0000
614+++ Percona-Server/config.h.cmake 2013-05-20 14:30:50 +0000
615@@ -400,7 +400,7 @@
616
617 #cmakedefine HAVE_MBSTATE_T
618
619-#define MAX_INDEXES 64U
620+#cmakedefine MAX_INDEXES @MAX_INDEXES@
621
622 #cmakedefine QSORT_TYPE_IS_VOID 1
623 #cmakedefine RETQSORTTYPE @RETQSORTTYPE@
624
625=== modified file 'Percona-Server/extra/comp_err.c'
626--- Percona-Server/extra/comp_err.c 2013-03-05 12:46:43 +0000
627+++ Percona-Server/extra/comp_err.c 2013-05-20 14:30:50 +0000
628@@ -32,12 +32,13 @@
629 #include <assert.h>
630 #include <my_dir.h>
631
632-#define MAX_ROWS 1000
633+#define MAX_ROWS 5000
634 #define HEADER_LENGTH 32 /* Length of header in errmsg.sys */
635 #define ERRMSG_VERSION 3 /* Version number of errmsg.sys */
636 #define DEFAULT_CHARSET_DIR "../sql/share/charsets"
637 #define ER_PREFIX "ER_"
638 #define WARN_PREFIX "WARN_"
639+#define PADD_PREFIX "PADD_"
640 static char *OUTFILE= (char*) "errmsg.sys";
641 static char *HEADERFILE= (char*) "mysqld_error.h";
642 static char *NAMEFILE= (char*) "mysqld_ername.h";
643@@ -98,6 +99,7 @@
644 const char *sql_code1; /* sql state */
645 const char *sql_code2; /* ODBC state */
646 struct errors *next_error; /* Pointer to next error */
647+ my_bool is_padding; /* If true - padd this er_name while er_code != d_code*/
648 DYNAMIC_ARRAY msg; /* All language texts for this error */
649 };
650
651@@ -136,6 +138,7 @@
652
653
654 static struct languages *parse_charset_string(char *str);
655+static struct errors *parse_padd_string(char *ptr, int er_count);
656 static struct errors *parse_error_string(char *ptr, int er_count);
657 static struct message *parse_message_string(struct message *new_message,
658 char *str);
659@@ -260,6 +263,11 @@
660
661 for (tmp_error= error_head; tmp_error; tmp_error= tmp_error->next_error)
662 {
663+ if (tmp_error->is_padding)
664+ {
665+ er_last= tmp_error->d_code;
666+ continue;
667+ }
668 /*
669 generating mysqld_error.h
670 fprintf() will automatically add \r on windows
671@@ -352,12 +360,29 @@
672 "language\n", tmp_error->er_name, tmp_lang->lang_short_name);
673 goto err;
674 }
675- if (copy_rows(to, tmp->text, row_nr, start_pos))
676- {
677- fprintf(stderr, "Failed to copy rows to %s\n", outfile);
678- goto err;
679- }
680- row_nr++;
681+ if (tmp_error->is_padding)
682+ {
683+ uint padd_to= tmp_error->d_code;
684+ char* padd_message= tmp->text;
685+ while ((row_nr+er_offset) < padd_to)
686+ {
687+ if (copy_rows(to, padd_message,row_nr,start_pos))
688+ {
689+ fprintf(stderr, "Failed to copy rows to %s\n", outfile);
690+ goto err;
691+ }
692+ row_nr++;
693+ }
694+ }
695+ else
696+ {
697+ if (copy_rows(to, tmp->text, row_nr, start_pos))
698+ {
699+ fprintf(stderr, "Failed to copy rows to %s\n", outfile);
700+ goto err;
701+ }
702+ row_nr++;
703+ }
704 }
705
706 /* continue with header of the errmsg.sys file */
707@@ -508,14 +533,26 @@
708 DBUG_RETURN(0);
709 continue;
710 }
711- if (is_prefix(str, ER_PREFIX) || is_prefix(str, WARN_PREFIX))
712+ if (is_prefix(str, ER_PREFIX) || is_prefix(str, WARN_PREFIX) || is_prefix(str, PADD_PREFIX))
713 {
714- if (!(current_error= parse_error_string(str, rcount)))
715- {
716- fprintf(stderr, "Failed to parse the error name string\n");
717- DBUG_RETURN(0);
718- }
719- rcount++; /* Count number of unique errors */
720+ if (is_prefix(str, PADD_PREFIX))
721+ {
722+ if (!(current_error= parse_padd_string(str, rcount)))
723+ {
724+ fprintf(stderr, "Failed to parse the error pad string\n");
725+ DBUG_RETURN(0);
726+ }
727+ rcount= current_error->d_code - er_offset; /* Count number of unique errors */
728+ }
729+ else
730+ {
731+ if (!(current_error= parse_error_string(str, rcount)))
732+ {
733+ fprintf(stderr, "Failed to parse the error name string\n");
734+ DBUG_RETURN(0);
735+ }
736+ rcount++; /* Count number of unique errors */
737+ }
738
739 /* add error to the list */
740 *tail_error= current_error;
741@@ -856,78 +893,122 @@
742 DBUG_RETURN(new_message);
743 }
744
745-
746-/*
747- Parsing the string with error name and codes; returns the pointer to
748- the errors struct
749-*/
750-
751-static struct errors *parse_error_string(char *str, int er_count)
752+static struct errors* create_new_error(my_bool is_padding, char *er_name, int d_code, const char *sql_code1, const char *sql_code2)
753 {
754 struct errors *new_error;
755- DBUG_ENTER("parse_error_string");
756- DBUG_PRINT("enter", ("str: %s", str));
757-
758+ DBUG_ENTER("create_new_error");
759 /* create a new element */
760 new_error= (struct errors *) my_malloc(sizeof(*new_error), MYF(MY_WME));
761-
762 if (my_init_dynamic_array(&new_error->msg, sizeof(struct message), 0, 0))
763 DBUG_RETURN(0); /* OOM: Fatal error */
764-
765- /* getting the error name */
766- str= skip_delimiters(str);
767-
768- if (!(new_error->er_name= get_word(&str)))
769- DBUG_RETURN(0); /* OOM: Fatal error */
770- DBUG_PRINT("info", ("er_name: %s", new_error->er_name));
771+ new_error->is_padding= is_padding;
772+ DBUG_PRINT("info", ("is_padding: %s", (is_padding ? "true" : "false")));
773+ new_error->er_name= er_name;
774+ DBUG_PRINT("info", ("er_name: %s", er_name));
775+ new_error->d_code= d_code;
776+ DBUG_PRINT("info", ("d_code: %d", d_code));
777+ new_error->sql_code1= sql_code1;
778+ DBUG_PRINT("info", ("sql_code1: %s", sql_code1));
779+ new_error->sql_code2= sql_code2;
780+ DBUG_PRINT("info", ("sql_code2: %s", sql_code2));
781+ DBUG_RETURN(new_error);
782+}
783+
784+/*
785+ Parsing the string with padd syntax (name + error to pad); returns the pointer to
786+ the errors struct
787+*/
788+
789+static struct errors *parse_padd_string(char* str, int er_count)
790+{
791+ char *er_name;
792+ uint d_code;
793+ char *start;
794+ DBUG_ENTER("parse_error_string");
795+ DBUG_PRINT("enter", ("str: %s", str));
796+
797+ start= str;
798+ str= skip_delimiters(str);
799+
800+ /* getting the error name */
801+
802+ if (!(er_name= get_word(&str)))
803+ DBUG_RETURN(0); /* OOM: Fatal error */
804+
805+ str= skip_delimiters(str);
806+
807+ if (!(d_code= parse_error_offset(start)))
808+ {
809+ fprintf(stderr, "Failed to parse the error pad string '%s' '%s' (d_code doesn't parse)!\n",er_name,str);
810+ DBUG_RETURN(0);
811+ }
812+ if (d_code < (uint)(er_offset + er_count))
813+ {
814+ fprintf(stderr, "Error to padding less current error number!\n");
815+ DBUG_RETURN(0);
816+ }
817+ DBUG_RETURN(create_new_error(TRUE,er_name,d_code,empty_string,empty_string));
818+}
819+
820+/*
821+ Parsing the string with error name and codes; returns the pointer to
822+ the errors struct
823+*/
824+
825+static struct errors *parse_error_string(char *str, int er_count)
826+{
827+ char *er_name;
828+ int d_code;
829+ const char *sql_code1= empty_string;
830+ const char *sql_code2= empty_string;
831+ DBUG_ENTER("parse_error_string");
832+ DBUG_PRINT("enter", ("str: %s", str));
833+
834+ str= skip_delimiters(str);
835+
836+ /* getting the error name */
837+
838+ if (!(er_name= get_word(&str)))
839+ DBUG_RETURN(0); /* OOM: Fatal error */
840
841 str= skip_delimiters(str);
842
843 /* getting the code1 */
844-
845- new_error->d_code= er_offset + er_count;
846- DBUG_PRINT("info", ("d_code: %d", new_error->d_code));
847+ d_code= er_offset + er_count;
848
849 str= skip_delimiters(str);
850
851 /* if we reached EOL => no more codes, but this can happen */
852 if (!*str)
853 {
854- new_error->sql_code1= empty_string;
855- new_error->sql_code2= empty_string;
856 DBUG_PRINT("info", ("str: %s", str));
857- DBUG_RETURN(new_error);
858+ goto complete_create;
859 }
860-
861 /* getting the sql_code 1 */
862-
863- if (!(new_error->sql_code1= get_word(&str)))
864+ if (!(sql_code1= get_word(&str)))
865 DBUG_RETURN(0); /* OOM: Fatal error */
866- DBUG_PRINT("info", ("sql_code1: %s", new_error->sql_code1));
867
868 str= skip_delimiters(str);
869
870 /* if we reached EOL => no more codes, but this can happen */
871 if (!*str)
872 {
873- new_error->sql_code2= empty_string;
874 DBUG_PRINT("info", ("str: %s", str));
875- DBUG_RETURN(new_error);
876+ goto complete_create;
877 }
878-
879 /* getting the sql_code 2 */
880- if (!(new_error->sql_code2= get_word(&str)))
881+ if (!(sql_code2= get_word(&str)))
882 DBUG_RETURN(0); /* OOM: Fatal error */
883- DBUG_PRINT("info", ("sql_code2: %s", new_error->sql_code2));
884
885 str= skip_delimiters(str);
886+
887 if (*str)
888 {
889 fprintf(stderr, "The error line did not end with sql/odbc code!");
890 DBUG_RETURN(0);
891 }
892-
893- DBUG_RETURN(new_error);
894+complete_create:
895+ DBUG_RETURN(create_new_error(FALSE,er_name,d_code,sql_code1,sql_code2));
896 }
897
898
899
900=== modified file 'Percona-Server/extra/innochecksum.cc'
901--- Percona-Server/extra/innochecksum.cc 2013-03-05 12:46:43 +0000
902+++ Percona-Server/extra/innochecksum.cc 2013-05-20 14:30:50 +0000
903@@ -44,12 +44,24 @@
904 #include "univ.i" /* include all of this */
905
906 #include "buf0checksum.h" /* buf_calc_page_*() */
907+#include "dict0mem.h" /* DICT_TF_BITS et al */
908 #include "fil0fil.h" /* FIL_* */
909 #include "fsp0fsp.h" /* fsp_flags_get_page_size() &
910 fsp_flags_get_zip_size() */
911 #include "mach0data.h" /* mach_read_from_4() */
912 #include "ut0crc32.h" /* ut_crc32_init() */
913
914+/** Smallest compressed page size */
915+#define PAGE_ZIP_MIN_SIZE (1 << 10)
916+
917+#define DICT_TF_FORMAT_SHIFT 5 /* file format */
918+#define DICT_TF_FORMAT_MASK \
919+ ((~(~0 << (DICT_TF_BITS - DICT_TF_FORMAT_SHIFT))) << DICT_TF_FORMAT_SHIFT)
920+#define DICT_TF_FORMAT_51 0 /*!< InnoDB/MySQL up to 5.1 */
921+#define DICT_TF_FORMAT_ZIP 1 /*!< InnoDB plugin for 5.1:
922+ compressed tables,
923+ new BLOB treatment */
924+
925 #ifdef UNIV_NONINL
926 # include "fsp0fsp.ic"
927 # include "mach0data.ic"
928@@ -65,6 +77,7 @@
929 static ulong do_page;
930 static my_bool use_end_page;
931 static my_bool do_one_page;
932+static my_bool display_format;
933 ulong srv_page_size; /* replaces declaration in srv0srv.c */
934 static ulong physical_page_size; /* Page size in bytes on disk. */
935 static ulong logical_page_size; /* Page size when uncompressed. */
936@@ -130,6 +143,8 @@
937 &debug, &debug, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
938 {"count", 'c', "Print the count of pages in the file.",
939 &just_count, &just_count, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
940+ {"format_info", 'f', "Display information about the file format and exit",
941+ 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
942 {"start_page", 's', "Start on this page number (0 based).",
943 &start_page, &start_page, 0, GET_ULONG, REQUIRED_ARG,
944 0, 0, (longlong) 2L*1024L*1024L*1024L, 0, 1, 0},
945@@ -174,6 +189,9 @@
946 case 'e':
947 use_end_page= 1;
948 break;
949+ case 'f':
950+ display_format= 1;
951+ break;
952 case 'p':
953 end_page= start_page= do_page;
954 use_end_page= 1;
955@@ -211,6 +229,54 @@
956 return 0;
957 } /* get_options */
958
959+static
960+void
961+display_format_info(uchar *page)
962+{
963+ ulint page_type;
964+ ulint flags;
965+
966+ /* Read page type. Pre-5.1.7 InnoDB always have zero in FIL_PAGE_TYPE for the
967+ first page, later versions initialize it to FIL_PAGE_TYPE_FSP_HDR. */
968+ page_type= mach_read_from_2(page + FIL_PAGE_TYPE);
969+
970+ /* Read FSP flags from the page header. */
971+ flags = mach_read_from_4(page + FSP_HEADER_OFFSET + FSP_SPACE_FLAGS);
972+
973+ if (!page_type)
974+ {
975+ printf("Detected file format: Antelope (pre-5.1.7).\n");
976+ if (flags != 0) {
977+ printf("But FSP_SPACE_FLAGS is non-zero: %lu. Corrupted tablespace?\n",
978+ flags);
979+ }
980+ }
981+ else if (page_type == FIL_PAGE_TYPE_FSP_HDR)
982+ {
983+ ulint format = flags & DICT_TF_FORMAT_MASK >> DICT_TF_FORMAT_SHIFT;
984+ ulint zip_size = fsp_flags_get_zip_size(flags);
985+
986+ if (!flags)
987+ {
988+ printf("Detected file format: Antelope (5.1.7 or newer).\n");
989+ }
990+ else if (format == DICT_TF_FORMAT_ZIP)
991+ {
992+ printf("Detected file format: Barracuda ");
993+ if (!zip_size)
994+ printf("(not compressed).\n");
995+ else
996+ printf("(compressed with KEY_BLOCK_SIZE=%lu).\n", zip_size);
997+ }
998+ else
999+ printf("Unknown file format: %lu\n", format);
1000+ }
1001+ else
1002+ {
1003+ printf("Bogus FIL_PAGE_TYPE value: %lu. Cannot detect the file format.\n",
1004+ page_type);
1005+ }
1006+}
1007
1008 int main(int argc, char **argv)
1009 {
1010@@ -296,8 +362,9 @@
1011 printf("InnoChecksum; checking pages in range %lu to %lu\n", start_page, use_end_page ? end_page : (pages - 1));
1012 }
1013
1014- /* seek to the necessary position */
1015- if (start_page)
1016+ /* seek to the necessary position, ignore with -f as we only need to read the
1017+ first page */
1018+ if (start_page && !display_format)
1019 {
1020 fd= fileno(f);
1021 if (!fd)
1022@@ -336,6 +403,13 @@
1023 return 1;
1024 }
1025
1026+ if (display_format)
1027+ {
1028+ /* for -f, analyze only the first page and exit */
1029+ display_format_info(buf);
1030+ return 0;
1031+ }
1032+
1033 /* check the "stored log sequence numbers" */
1034 logseq= mach_read_from_4(buf + FIL_PAGE_LSN + 4);
1035 logseqfield= mach_read_from_4(buf + logical_page_size - FIL_PAGE_END_LSN_OLD_CHKSUM + 4);
1036
1037=== modified file 'Percona-Server/include/atomic/x86-gcc.h'
1038--- Percona-Server/include/atomic/x86-gcc.h 2013-03-05 12:46:43 +0000
1039+++ Percona-Server/include/atomic/x86-gcc.h 2013-05-20 14:30:50 +0000
1040@@ -108,27 +108,23 @@
1041 v=tmp;
1042
1043 /*
1044- On some platforms (e.g. Mac OS X and Solaris) the ebx register
1045- is held as a pointer to the global offset table. Thus we're not
1046- allowed to use the b-register on those platforms when compiling
1047- PIC code, to avoid this we push ebx and pop ebx. The new value
1048- is copied directly from memory to avoid problems with a implicit
1049- manipulation of the stack pointer by the push.
1050-
1051 cmpxchg8b works on both 32-bit platforms and 64-bit platforms but
1052 the code here is only used on 32-bit platforms, on 64-bit
1053 platforms the much simpler make_atomic_cas_body32 will work
1054 fine.
1055 */
1056-#define make_atomic_cas_body64 \
1057- asm volatile ("push %%ebx;" \
1058- "movl (%%ecx), %%ebx;" \
1059- "movl 4(%%ecx), %%ecx;" \
1060- LOCK_prefix "; cmpxchg8b %0;" \
1061- "setz %2; pop %%ebx" \
1062- : "=m" (*a), "+A" (*cmp), "=c" (ret) \
1063- : "c" (&set), "m" (*a) \
1064- : "memory", "esp")
1065+#define make_atomic_cas_body64 \
1066+ asm volatile ("movl %%edi, -4(%%esp);" \
1067+ "leal %0, %%edi;" \
1068+ "xchgl %%ebx, %%esi;" \
1069+ LOCK_prefix "; cmpxchg8b (%%edi);" \
1070+ "movl %%esi, %%ebx;" \
1071+ "movl -4(%%esp), %%edi;" \
1072+ "setz %1;" \
1073+ : "+m" (*a), "=q" (ret), "+A" (*cmp) \
1074+ : "S" ((int32)(set & 0xFFFFFFFF)), \
1075+ "c" ((int32)(set >> 32)) \
1076+ : "memory", "flags")
1077 #endif
1078
1079 /*
1080
1081=== modified file 'Percona-Server/include/heap.h'
1082--- Percona-Server/include/heap.h 2013-03-05 12:46:43 +0000
1083+++ Percona-Server/include/heap.h 2013-05-20 14:30:50 +0000
1084@@ -34,7 +34,17 @@
1085 #include "my_compare.h"
1086 #include "my_tree.h"
1087
1088- /* defines used by heap-funktions */
1089+/* Define index limits to be identical to MyISAM ones for compatibility. */
1090+
1091+#if MAX_INDEXES > HA_MAX_POSSIBLE_KEY
1092+#define HP_MAX_KEY HA_MAX_POSSIBLE_KEY /* Max allowed keys */
1093+#else
1094+#define HP_MAX_KEY MAX_INDEXES /* Max allowed keys */
1095+#endif
1096+
1097+#define HP_MAX_KEY_LENGTH 1000 /* Max length in bytes */
1098+
1099+/* defines used by heap-funktions */
1100
1101 #define HP_MAX_LEVELS 4 /* 128^5 records is enough */
1102 #define HP_PTRS_IN_NOD 128
1103@@ -131,22 +141,58 @@
1104 uint (*get_key_length)(struct st_hp_keydef *keydef, const uchar *key);
1105 } HP_KEYDEF;
1106
1107+typedef struct st_heap_columndef /* column information */
1108+{
1109+ int16 type; /* en_fieldtype */
1110+ uint32 length; /* length of field */
1111+ uint32 offset; /* Offset to position in row */
1112+ uint8 null_bit; /* If column may be 0 */
1113+ uint16 null_pos; /* position for null marker */
1114+ uint8 length_bytes; /* length of the size, 1 o 2 bytes */
1115+} HP_COLUMNDEF;
1116+
1117+typedef struct st_heap_dataspace /* control data for data space */
1118+{
1119+ HP_BLOCK block;
1120+ /* Total chunks ever allocated in this dataspace */
1121+ uint chunk_count;
1122+ uint del_chunk_count; /* Deleted chunks count */
1123+ uchar *del_link; /* Link to last deleted chunk */
1124+ uint chunk_length; /* Total length of one chunk */
1125+ /* Length of payload that will be placed into one chunk */
1126+ uint chunk_dataspace_length;
1127+ /* Offset of the status flag relative to the chunk start */
1128+ uint offset_status;
1129+ /* Offset of the linking pointer relative to the chunk start */
1130+ uint offset_link;
1131+ /* Test whether records have variable size and so "next" pointer */
1132+ uint is_variable_size;
1133+ /* Total size allocated within this data space */
1134+ ulonglong total_data_length;
1135+} HP_DATASPACE;
1136+
1137 typedef struct st_heap_share
1138 {
1139- HP_BLOCK block;
1140 HP_KEYDEF *keydef;
1141+ HP_COLUMNDEF *column_defs;
1142+ /* Describes "block", which contains actual records */
1143+ HP_DATASPACE recordspace;
1144 ulong min_records,max_records; /* Params to open */
1145- ulonglong data_length,index_length,max_table_size;
1146+ ulonglong index_length, max_table_size;
1147 uint key_stat_version; /* version to indicate insert/delete */
1148- uint records; /* records */
1149- uint blength; /* records rounded up to 2^n */
1150- uint deleted; /* Deleted records in database */
1151- uint reclength; /* Length of one record */
1152+ uint records; /* Actual record (row) count */
1153+ uint blength; /* used_chunk_count rounded up to 2^n */
1154+ /*
1155+ Length of record's fixed part, which contains keys and always fits into the
1156+ first chunk.
1157+ */
1158+ uint fixed_data_length;
1159+ uint fixed_column_count; /* Number of columns stored in fixed_data_length */
1160 uint changed;
1161 uint keys,max_key_length;
1162+ uint column_count;
1163 uint currently_disabled_keys; /* saved value from "keys" when disabled */
1164 uint open_count;
1165- uchar *del_link; /* Link to next block with del. rec */
1166 char * name; /* Name of "memory-file" */
1167 time_t create_time;
1168 THR_LOCK lock;
1169@@ -156,6 +202,7 @@
1170 uint auto_key;
1171 uint auto_key_type; /* real type of the auto key segment */
1172 ulonglong auto_increment;
1173+ uint blobs; /* Number of blobs in table */
1174 } HP_SHARE;
1175
1176 struct st_hp_hash_info;
1177@@ -165,7 +212,7 @@
1178 HP_SHARE *s;
1179 uchar *current_ptr;
1180 struct st_hp_hash_info *current_hash_ptr;
1181- ulong current_record,next_block;
1182+ ulong current_record;
1183 int lastinx,errkey;
1184 int mode; /* Mode of file (READONLY..) */
1185 uint opt_flag,update;
1186@@ -178,6 +225,9 @@
1187 my_bool implicit_emptied;
1188 THR_LOCK_DATA lock;
1189 LIST open_list;
1190+ uchar *blob_buffer; /* Temporary buffer used to return BLOB values */
1191+ uint blob_size; /* Current blob_buffer size */
1192+ uint blob_offset; /* Current offset in blob_buffer */
1193 } HP_INFO;
1194
1195
1196@@ -199,6 +249,14 @@
1197 open_count to 1. Is only looked at if not internal_table.
1198 */
1199 my_bool pin_share;
1200+ uint columns;
1201+ HP_COLUMNDEF *columndef;
1202+ uint fixed_key_fieldnr;
1203+ uint fixed_data_size;
1204+ uint keys_memory_size;
1205+ uint max_chunk_size;
1206+ uint is_dynamic;
1207+ uint blobs;
1208 } HP_CREATE_INFO;
1209
1210 /* Prototypes for heap-functions */
1211@@ -215,9 +273,8 @@
1212 extern int heap_scan(register HP_INFO *info, uchar *record);
1213 extern int heap_delete(HP_INFO *info,const uchar *buff);
1214 extern int heap_info(HP_INFO *info,HEAPINFO *x,int flag);
1215-extern int heap_create(const char *name,
1216- HP_CREATE_INFO *create_info, HP_SHARE **share,
1217- my_bool *created_new_share);
1218+extern int heap_create(const char *name, HP_CREATE_INFO *create_info,
1219+ HP_SHARE **res, my_bool *created_new_share);
1220 extern int heap_delete_table(const char *name);
1221 extern void heap_drop_table(HP_INFO *info);
1222 extern int heap_extra(HP_INFO *info,enum ha_extra_function function);
1223
1224=== modified file 'Percona-Server/include/m_string.h'
1225--- Percona-Server/include/m_string.h 2013-03-05 12:46:43 +0000
1226+++ Percona-Server/include/m_string.h 2013-05-20 14:30:50 +0000
1227@@ -251,6 +251,45 @@
1228 @return the last non-space character
1229 */
1230
1231+#ifdef __x86_64__
1232+
1233+#if SIZEOF_LONG != 8
1234+# error "SIZEOF_LONG != 8"
1235+#endif
1236+
1237+/* Modern x86_64 CPUs do not have penalties for unaligned access */
1238+
1239+static inline const uchar *skip_trailing_space(const uchar *ptr, size_t len)
1240+{
1241+ const uchar *begin;
1242+ ulong UNINIT_VAR(val);
1243+
1244+ if (unlikely(ptr == NULL))
1245+ return NULL;
1246+
1247+ begin= ptr;
1248+ ptr= ptr + len - 8;
1249+
1250+ while (ptr >= begin && (val= (*(ulong *) ptr) ^ 0x2020202020202020) == 0)
1251+ ptr-= 8;
1252+
1253+ if (likely(ptr >= begin))
1254+ {
1255+ do {
1256+ ptr++;
1257+ } while (val>>= 8);
1258+
1259+ return ptr;
1260+ }
1261+
1262+ for (ptr= ptr + 8; ptr > begin && ptr[-1] == 0x20; ptr--)
1263+ /* empty */;
1264+
1265+ return ptr;
1266+}
1267+
1268+#else
1269+
1270 static inline const uchar *skip_trailing_space(const uchar *ptr,size_t len)
1271 {
1272 const uchar *end= ptr + len;
1273@@ -276,6 +315,7 @@
1274 end--;
1275 return (end);
1276 }
1277+#endif
1278
1279 static inline void lex_string_set(LEX_STRING *lex_str, const char *c_str)
1280 {
1281
1282=== modified file 'Percona-Server/include/my_getopt.h'
1283--- Percona-Server/include/my_getopt.h 2013-03-05 12:46:43 +0000
1284+++ Percona-Server/include/my_getopt.h 2013-05-20 14:30:50 +0000
1285@@ -128,6 +128,24 @@
1286 my_bool getopt_compare_strings(const char *s, const char *t, uint length);
1287 ulonglong max_of_int_range(int var_type);
1288
1289+/* Get the specific range constraint for the value named. If you do not
1290+ have the name length availa ble, specify 0. Specify 0 for 'create' to
1291+ simply obtain the existong value or specify a size value to have the
1292+ storage allocated if it does not yet exist. */
1293+extern const void* getopt_constraint_get_max_value(const char *name,
1294+ size_t length,
1295+ size_t create);
1296+extern const void* getopt_constraint_get_min_value(const char *name,
1297+ size_t length,
1298+ size_t create);
1299+extern const my_bool* getopt_constraint_get_hidden_value(const char *name,
1300+ size_t length,
1301+ my_bool create);
1302+extern const my_bool* getopt_constraint_get_readonly_value(const char *name,
1303+ size_t length,
1304+ my_bool create);
1305+
1306+
1307 C_MODE_END
1308
1309 #endif /* _my_getopt_h */
1310
1311=== modified file 'Percona-Server/include/my_sys.h'
1312--- Percona-Server/include/my_sys.h 2013-03-05 12:46:43 +0000
1313+++ Percona-Server/include/my_sys.h 2013-05-20 14:30:50 +0000
1314@@ -346,8 +346,8 @@
1315 typedef struct st_dynamic_array
1316 {
1317 uchar *buffer;
1318- uint elements,max_element;
1319- uint alloc_increment;
1320+ ulong elements, max_element;
1321+ ulong alloc_increment;
1322 uint size_of_element;
1323 } DYNAMIC_ARRAY;
1324
1325@@ -788,6 +788,7 @@
1326 const char *prefix, size_t cache_size,
1327 myf cache_myflags);
1328 extern my_bool real_open_cached_file(IO_CACHE *cache);
1329+extern my_bool truncate_cached_file(IO_CACHE *cache, my_off_t pos);
1330 extern void close_cached_file(IO_CACHE *cache);
1331 File create_temp_file(char *to, const char *dir, const char *pfx,
1332 int mode, myf MyFlags);
1333@@ -796,22 +797,23 @@
1334 #define my_init_dynamic_array2(A,B,C,D,E) init_dynamic_array2(A,B,C,D,E)
1335 #define my_init_dynamic_array2_ci(A,B,C,D,E) init_dynamic_array2(A,B,C,D,E)
1336 extern my_bool init_dynamic_array2(DYNAMIC_ARRAY *array, uint element_size,
1337- void *init_buffer, uint init_alloc,
1338- uint alloc_increment);
1339+ void *init_buffer, ulong init_alloc,
1340+ ulong alloc_increment);
1341 /* init_dynamic_array() function is deprecated */
1342 extern my_bool init_dynamic_array(DYNAMIC_ARRAY *array, uint element_size,
1343- uint init_alloc, uint alloc_increment);
1344+ ulong init_alloc, ulong alloc_increment);
1345 extern my_bool insert_dynamic(DYNAMIC_ARRAY *array, const void *element);
1346 extern void *alloc_dynamic(DYNAMIC_ARRAY *array);
1347 extern void *pop_dynamic(DYNAMIC_ARRAY*);
1348 extern my_bool set_dynamic(DYNAMIC_ARRAY *array, const void *element,
1349- uint array_index);
1350-extern my_bool allocate_dynamic(DYNAMIC_ARRAY *array, uint max_elements);
1351+ ulong idx);
1352+extern my_bool allocate_dynamic(DYNAMIC_ARRAY *array, ulong max_elements);
1353 extern void get_dynamic(DYNAMIC_ARRAY *array, void *element,
1354- uint array_index);
1355+ ulong idx);
1356 extern void delete_dynamic(DYNAMIC_ARRAY *array);
1357-extern void delete_dynamic_element(DYNAMIC_ARRAY *array, uint array_index);
1358+extern void delete_dynamic_element(DYNAMIC_ARRAY *array, ulong array_index);
1359 extern void freeze_size(DYNAMIC_ARRAY *array);
1360+extern long get_index_dynamic(DYNAMIC_ARRAY *array, const void *element);
1361 #define dynamic_array_ptr(array,array_index) ((array)->buffer+(array_index)*(array)->size_of_element)
1362 #define dynamic_element(array,array_index,type) ((type)((array)->buffer) +(array_index))
1363 #define push_dynamic(A,B) insert_dynamic((A),(B))
1364
1365=== modified file 'Percona-Server/include/mysql/plugin.h'
1366--- Percona-Server/include/mysql/plugin.h 2013-03-05 12:46:43 +0000
1367+++ Percona-Server/include/mysql/plugin.h 2013-05-20 14:30:50 +0000
1368@@ -552,6 +552,22 @@
1369 /* Increments the row counter, see THD::row_count */
1370 void thd_inc_row_count(MYSQL_THD thd);
1371
1372+void increment_thd_innodb_stats(MYSQL_THD thd,
1373+ unsigned long long trx_id,
1374+ long io_reads,
1375+ long long io_read,
1376+ long io_reads_wait_timer,
1377+ long lock_que_wait_timer,
1378+ long que_wait_timer,
1379+ long page_access);
1380+unsigned long thd_log_slow_verbosity(const MYSQL_THD thd);
1381+int thd_opt_slow_log();
1382+#define EXTENDED_SLOWLOG
1383+
1384+#define EXTENDED_FOR_USERSTAT
1385+
1386+#define EXTENDED_FOR_COMMIT_ORDERED
1387+
1388 /**
1389 Create a temporary file.
1390
1391@@ -656,6 +672,12 @@
1392 */
1393 void thd_set_ha_data(MYSQL_THD thd, const struct handlerton *hton,
1394 const void *ha_data);
1395+
1396+int thd_command(const MYSQL_THD thd);
1397+long long thd_start_time(const MYSQL_THD thd);
1398+void thd_kill(unsigned long id);
1399+#define EXTENDED_FOR_KILLIDLE
1400+
1401 #ifdef __cplusplus
1402 }
1403 #endif
1404
1405=== modified file 'Percona-Server/include/mysql/plugin_audit.h.pp'
1406--- Percona-Server/include/mysql/plugin_audit.h.pp 2013-03-05 12:46:43 +0000
1407+++ Percona-Server/include/mysql/plugin_audit.h.pp 2013-05-20 14:30:50 +0000
1408@@ -233,6 +233,16 @@
1409 char *thd_security_context(void* thd, char *buffer, unsigned int length,
1410 unsigned int max_query_len);
1411 void thd_inc_row_count(void* thd);
1412+void increment_thd_innodb_stats(void* thd,
1413+ unsigned long long trx_id,
1414+ long io_reads,
1415+ long long io_read,
1416+ long io_reads_wait_timer,
1417+ long lock_que_wait_timer,
1418+ long que_wait_timer,
1419+ long page_access);
1420+unsigned long thd_log_slow_verbosity(const void* thd);
1421+int thd_opt_slow_log();
1422 int mysql_tmpfile(const char *prefix);
1423 int thd_killed(const void* thd);
1424 void thd_binlog_pos(const void* thd,
1425@@ -246,6 +256,9 @@
1426 void *thd_get_ha_data(const void* thd, const struct handlerton *hton);
1427 void thd_set_ha_data(void* thd, const struct handlerton *hton,
1428 const void *ha_data);
1429+int thd_command(const void* thd);
1430+long long thd_start_time(const void* thd);
1431+void thd_kill(unsigned long id);
1432 struct mysql_event_general
1433 {
1434 unsigned int event_subclass;
1435
1436=== modified file 'Percona-Server/include/mysql/plugin_auth.h.pp'
1437--- Percona-Server/include/mysql/plugin_auth.h.pp 2013-03-05 12:46:43 +0000
1438+++ Percona-Server/include/mysql/plugin_auth.h.pp 2013-05-20 14:30:50 +0000
1439@@ -233,6 +233,16 @@
1440 char *thd_security_context(void* thd, char *buffer, unsigned int length,
1441 unsigned int max_query_len);
1442 void thd_inc_row_count(void* thd);
1443+void increment_thd_innodb_stats(void* thd,
1444+ unsigned long long trx_id,
1445+ long io_reads,
1446+ long long io_read,
1447+ long io_reads_wait_timer,
1448+ long lock_que_wait_timer,
1449+ long que_wait_timer,
1450+ long page_access);
1451+unsigned long thd_log_slow_verbosity(const void* thd);
1452+int thd_opt_slow_log();
1453 int mysql_tmpfile(const char *prefix);
1454 int thd_killed(const void* thd);
1455 void thd_binlog_pos(const void* thd,
1456@@ -246,6 +256,9 @@
1457 void *thd_get_ha_data(const void* thd, const struct handlerton *hton);
1458 void thd_set_ha_data(void* thd, const struct handlerton *hton,
1459 const void *ha_data);
1460+int thd_command(const void* thd);
1461+long long thd_start_time(const void* thd);
1462+void thd_kill(unsigned long id);
1463 #include <mysql/plugin_auth_common.h>
1464 typedef struct st_plugin_vio_info
1465 {
1466
1467=== modified file 'Percona-Server/include/mysql/plugin_ftparser.h.pp'
1468--- Percona-Server/include/mysql/plugin_ftparser.h.pp 2013-03-05 12:46:43 +0000
1469+++ Percona-Server/include/mysql/plugin_ftparser.h.pp 2013-05-20 14:30:50 +0000
1470@@ -186,6 +186,16 @@
1471 char *thd_security_context(void* thd, char *buffer, unsigned int length,
1472 unsigned int max_query_len);
1473 void thd_inc_row_count(void* thd);
1474+void increment_thd_innodb_stats(void* thd,
1475+ unsigned long long trx_id,
1476+ long io_reads,
1477+ long long io_read,
1478+ long io_reads_wait_timer,
1479+ long lock_que_wait_timer,
1480+ long que_wait_timer,
1481+ long page_access);
1482+unsigned long thd_log_slow_verbosity(const void* thd);
1483+int thd_opt_slow_log();
1484 int mysql_tmpfile(const char *prefix);
1485 int thd_killed(const void* thd);
1486 void thd_binlog_pos(const void* thd,
1487@@ -199,6 +209,9 @@
1488 void *thd_get_ha_data(const void* thd, const struct handlerton *hton);
1489 void thd_set_ha_data(void* thd, const struct handlerton *hton,
1490 const void *ha_data);
1491+int thd_command(const void* thd);
1492+long long thd_start_time(const void* thd);
1493+void thd_kill(unsigned long id);
1494 enum enum_ftparser_mode
1495 {
1496 MYSQL_FTPARSER_SIMPLE_MODE= 0,
1497
1498=== modified file 'Percona-Server/include/mysql_com.h'
1499--- Percona-Server/include/mysql_com.h 2013-03-05 12:46:43 +0000
1500+++ Percona-Server/include/mysql_com.h 2013-05-20 14:30:50 +0000
1501@@ -31,6 +31,7 @@
1502
1503 #define SERVER_VERSION_LENGTH 60
1504 #define SQLSTATE_LENGTH 5
1505+#define LIST_PROCESS_HOST_LEN 64
1506
1507 /*
1508 Maximum length of comments
1509@@ -153,6 +154,20 @@
1510 #define REFRESH_DES_KEY_FILE 0x40000L
1511 #define REFRESH_USER_RESOURCES 0x80000L
1512 #define REFRESH_FOR_EXPORT 0x100000L /* FLUSH TABLES ... FOR EXPORT */
1513+#define REFRESH_TABLE_STATS 0x200000L /* Refresh table stats my_hash
1514+ table */
1515+#define REFRESH_INDEX_STATS 0x400000L /* Refresh index stats my_hash
1516+ table */
1517+#define REFRESH_USER_STATS 0x800000L /* Refresh user stats my_hash
1518+ table */
1519+#define REFRESH_CLIENT_STATS 0x1000000L /* Refresh client stats my_hash
1520+ table */
1521+#define REFRESH_THREAD_STATS 0x2000000L /* Refresh thread stats my_hash
1522+ table */
1523+#define REFRESH_FLUSH_PAGE_BITMAPS 0x400000L
1524+#define REFRESH_RESET_PAGE_BITMAPS 0x800000L
1525+
1526+#define PURGE_BITMAPS_TO_LSN 1
1527
1528 #define CLIENT_LONG_PASSWORD 1 /* new more secure passwords */
1529 #define CLIENT_FOUND_ROWS 2 /* Found instead of affected rows */
1530
1531=== modified file 'Percona-Server/include/violite.h'
1532--- Percona-Server/include/violite.h 2013-03-05 12:46:43 +0000
1533+++ Percona-Server/include/violite.h 2013-05-20 14:30:50 +0000
1534@@ -252,7 +252,7 @@
1535 my_bool (*was_timeout)(Vio*);
1536 int (*vioclose)(Vio*);
1537 my_bool (*is_connected)(Vio*);
1538- int (*shutdown)(Vio *, int);
1539+ int (*shutdown)(Vio *, int);
1540 my_bool (*has_data) (Vio*);
1541 int (*io_wait)(Vio*, enum enum_vio_io_event, int);
1542 my_bool (*connect)(Vio*, struct sockaddr *, socklen_t, int);
1543
1544=== added directory 'Percona-Server/internal'
1545=== added directory 'Percona-Server/internal/mysql-test'
1546=== added directory 'Percona-Server/internal/mysql-test/suite'
1547=== added directory 'Percona-Server/internal/mysql-test/suite/i_innodb'
1548=== added directory 'Percona-Server/internal/mysql-test/suite/i_innodb/r'
1549=== added file 'Percona-Server/internal/mysql-test/suite/i_innodb/r/dummy.result'
1550--- Percona-Server/internal/mysql-test/suite/i_innodb/r/dummy.result 1970-01-01 00:00:00 +0000
1551+++ Percona-Server/internal/mysql-test/suite/i_innodb/r/dummy.result 2013-05-20 14:30:50 +0000
1552@@ -0,0 +1,1 @@
1553+Dummy innodb test
1554
1555=== added directory 'Percona-Server/internal/mysql-test/suite/i_innodb/t'
1556=== added file 'Percona-Server/internal/mysql-test/suite/i_innodb/t/dummy.test'
1557--- Percona-Server/internal/mysql-test/suite/i_innodb/t/dummy.test 1970-01-01 00:00:00 +0000
1558+++ Percona-Server/internal/mysql-test/suite/i_innodb/t/dummy.test 2013-05-20 14:30:50 +0000
1559@@ -0,0 +1,3 @@
1560+# This is a dummy test for innodb, feel free to rename and reuse for real test
1561+--source include/have_innodb.inc
1562+--echo Dummy innodb test
1563
1564=== added directory 'Percona-Server/internal/mysql-test/suite/i_main'
1565=== added directory 'Percona-Server/internal/mysql-test/suite/i_main/r'
1566=== added file 'Percona-Server/internal/mysql-test/suite/i_main/r/dummy.result'
1567--- Percona-Server/internal/mysql-test/suite/i_main/r/dummy.result 1970-01-01 00:00:00 +0000
1568+++ Percona-Server/internal/mysql-test/suite/i_main/r/dummy.result 2013-05-20 14:30:50 +0000
1569@@ -0,0 +1,1 @@
1570+This is a dummy
1571
1572=== added file 'Percona-Server/internal/mysql-test/suite/i_main/r/update.result'
1573--- Percona-Server/internal/mysql-test/suite/i_main/r/update.result 1970-01-01 00:00:00 +0000
1574+++ Percona-Server/internal/mysql-test/suite/i_main/r/update.result 2013-05-20 14:30:50 +0000
1575@@ -0,0 +1,17 @@
1576+#
1577+# 65745: UPDATE ON INNODB TABLE ENTERS RECURSION
1578+#
1579+CREATE TABLE t1 (
1580+id1 int NOT NULL,
1581+id2 int NOT NULL,
1582+a int,
1583+b int,
1584+PRIMARY KEY (id1,id2),
1585+KEY (id1, a)
1586+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
1587+INSERT INTO `t1` VALUES (1,1,NULL,1);
1588+INSERT INTO `t1` VALUES (2,2,1,NULL);
1589+INSERT INTO `t1` VALUES (2,6,NULL,2);
1590+UPDATE t1 SET id2 = id2 + 1, b = null WHERE a is null and id1 = 2;
1591+DROP TABLE t1;
1592+#
1593
1594=== added directory 'Percona-Server/internal/mysql-test/suite/i_main/t'
1595=== added file 'Percona-Server/internal/mysql-test/suite/i_main/t/dummy.test'
1596--- Percona-Server/internal/mysql-test/suite/i_main/t/dummy.test 1970-01-01 00:00:00 +0000
1597+++ Percona-Server/internal/mysql-test/suite/i_main/t/dummy.test 2013-05-20 14:30:50 +0000
1598@@ -0,0 +1,2 @@
1599+# Dummy test testing testing of internal
1600+echo This is a dummy;
1601
1602=== added file 'Percona-Server/internal/mysql-test/suite/i_main/t/update.test'
1603--- Percona-Server/internal/mysql-test/suite/i_main/t/update.test 1970-01-01 00:00:00 +0000
1604+++ Percona-Server/internal/mysql-test/suite/i_main/t/update.test 2013-05-20 14:30:50 +0000
1605@@ -0,0 +1,21 @@
1606+--echo #
1607+--echo # 65745: UPDATE ON INNODB TABLE ENTERS RECURSION
1608+--echo #
1609+CREATE TABLE t1 (
1610+ id1 int NOT NULL,
1611+ id2 int NOT NULL,
1612+ a int,
1613+ b int,
1614+ PRIMARY KEY (id1,id2),
1615+ KEY (id1, a)
1616+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
1617+
1618+INSERT INTO `t1` VALUES (1,1,NULL,1);
1619+INSERT INTO `t1` VALUES (2,2,1,NULL);
1620+INSERT INTO `t1` VALUES (2,6,NULL,2);
1621+# should not hang
1622+UPDATE t1 SET id2 = id2 + 1, b = null WHERE a is null and id1 = 2;
1623+
1624+DROP TABLE t1;
1625+--echo #
1626+
1627
1628=== added file 'Percona-Server/man/mysqld.8'
1629--- Percona-Server/man/mysqld.8 1970-01-01 00:00:00 +0000
1630+++ Percona-Server/man/mysqld.8 2013-05-20 14:30:50 +0000
1631@@ -0,0 +1,69 @@
1632+'\" t
1633+.\" Title: \fBmysqld\fR
1634+.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
1635+.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
1636+.\" Date: 03/02/2012
1637+.\" Manual: MySQL Database System
1638+.\" Source: MySQL 5.5
1639+.\" Language: English
1640+.\"
1641+.TH "\FBMYSQLD\FR" "8" "03/02/2012" "MySQL 5\&.5" "MySQL Database System"
1642+.\" -----------------------------------------------------------------
1643+.\" * set default formatting
1644+.\" -----------------------------------------------------------------
1645+.\" disable hyphenation
1646+.nh
1647+.\" disable justification (adjust text to left margin only)
1648+.ad l
1649+.\" -----------------------------------------------------------------
1650+.\" * MAIN CONTENT STARTS HERE *
1651+.\" -----------------------------------------------------------------
1652+.\" mysqld: MySQL server
1653+.\" MySQL server: mysqld
1654+.SH "NAME"
1655+mysqld \- the MySQL server
1656+.SH "SYNOPSIS"
1657+.HP \w'\fBmysqld\ [\fR\fB\fIoptions\fR\fR\fB]\fR\ 'u
1658+\fBmysqld [\fR\fB\fIoptions\fR\fR\fB]\fR
1659+.SH "DESCRIPTION"
1660+.PP
1661+\fBmysqld\fR, also known as MySQL Server, is the main program that does most of the work in a MySQL installation\&. MySQL Server manages access to the MySQL data directory that contains databases and tables\&. The data directory is also the default location for other information such as log files and status files\&.
1662+.PP
1663+When MySQL server starts, it listens for network connections from client programs and manages access to databases on behalf of those clients\&.
1664+.PP
1665+The
1666+\fBmysqld\fR
1667+program has many options that can be specified at startup\&. For a complete list of options, run this command:
1668+.sp
1669+.if n \{\
1670+.RS 4
1671+.\}
1672+.nf
1673+shell> \fBmysqld \-\-verbose \-\-help\fR
1674+.fi
1675+.if n \{\
1676+.RE
1677+.\}
1678+.PP
1679+MySQL Server also has a set of system variables that affect its operation as it runs\&. System variables can be set at server startup, and many of them can be changed at runtime to effect dynamic server reconfiguration\&. MySQL Server also has a set of status variables that provide information about its operation\&. You can monitor these status variables to access runtime performance characteristics\&.
1680+.PP
1681+For a full description of MySQL Server command options, system variables, and status variables, see
1682+Section\ \&5.1, \(lqThe MySQL Server\(rq\&. For information about installing MySQL and setting up the initial configuration, see
1683+Chapter\ \&2, Installing and Upgrading MySQL\&.
1684+.SH "COPYRIGHT"
1685+.br
1686+.PP
1687+Copyright \(co 1997, 2012, Oracle and/or its affiliates. All rights reserved.
1688+.PP
1689+This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
1690+.PP
1691+This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
1692+.PP
1693+You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
1694+.sp
1695+.SH "SEE ALSO"
1696+For more information, please refer to the MySQL Reference Manual,
1697+which may already be installed locally and which is also available
1698+online at http://dev.mysql.com/doc/.
1699+.SH AUTHOR
1700+Oracle Corporation (http://dev.mysql.com/).
1701
1702=== added file 'Percona-Server/mysql-test/include/have_64_keys.inc'
1703--- Percona-Server/mysql-test/include/have_64_keys.inc 1970-01-01 00:00:00 +0000
1704+++ Percona-Server/mysql-test/include/have_64_keys.inc 2013-05-20 14:30:50 +0000
1705@@ -0,0 +1,12 @@
1706+# Check that we have MAX_INDEXES=64
1707+
1708+--require r/have_64_keys.require
1709+
1710+# Check that maximum length of possible_keys and key_len fields is 4096
1711+# They are defined in THD::send_explain_fields as NAME_CHAR_LEN*MAX_KEY
1712+# where NAME_CHAR_LEN is always 64 (mysql_com.h) and MAX_KEY is
1713+# a synonym of MAX_INDEXES
1714+
1715+--enable_metadata
1716+EXPLAIN SELECT 1;
1717+--disable_metadata
1718
1719=== added file 'Percona-Server/mysql-test/include/log_cleanup.inc'
1720--- Percona-Server/mysql-test/include/log_cleanup.inc 1970-01-01 00:00:00 +0000
1721+++ Percona-Server/mysql-test/include/log_cleanup.inc 2013-05-20 14:30:50 +0000
1722@@ -0,0 +1,1 @@
1723+--remove_files_wildcard $MYSQLTEST_VARDIR *.slog
1724
1725=== added file 'Percona-Server/mysql-test/include/log_grep.inc'
1726--- Percona-Server/mysql-test/include/log_grep.inc 1970-01-01 00:00:00 +0000
1727+++ Percona-Server/mysql-test/include/log_grep.inc 2013-05-20 14:30:50 +0000
1728@@ -0,0 +1,41 @@
1729+--echo [log_grep.inc] file: $log_file pattern: $grep_pattern
1730+perl;
1731+ $log_file= $ENV{'log_file'};
1732+ $log_file_full_path= $ENV{'log_file_full_path'};
1733+ $log_slow_rate_test= $ENV{'log_slow_rate_test'};
1734+ open(FILE, "$log_file_full_path")
1735+ or die("Cannot open file $log_file_full_path: $!\n");
1736+
1737+ if ($log_slow_rate_test) {
1738+ $one= 0;
1739+ $two= 0;
1740+ $three= 0;
1741+ while(<FILE>) {
1742+ $one++ if(/'connection_one'/);
1743+ $two++ if(/'connection_two'/);
1744+ $three++ if(/'connection_three'/);
1745+ }
1746+ $sum= $one + $two + $three;
1747+ $zero= 0;
1748+ if ($one == 0) {
1749+ $zero++;
1750+ }
1751+ if ($two == 0) {
1752+ $zero++;
1753+ }
1754+ if ($three == 0) {
1755+ $zero++;
1756+ }
1757+ print "[log_grep.inc] sum: $sum\n";
1758+ print "[log_grep.inc] zero: $zero\n";
1759+ }
1760+ else {
1761+ $grep_pattern= $ENV{'grep_pattern'};
1762+ $lines= 0;
1763+ while(<FILE>) {
1764+ $lines++ if (/$grep_pattern/);
1765+ }
1766+ print "[log_grep.inc] lines: $lines\n";
1767+ }
1768+ close(FILE);
1769+EOF
1770
1771=== added file 'Percona-Server/mysql-test/include/log_start.inc'
1772--- Percona-Server/mysql-test/include/log_start.inc 1970-01-01 00:00:00 +0000
1773+++ Percona-Server/mysql-test/include/log_start.inc 2013-05-20 14:30:50 +0000
1774@@ -0,0 +1,11 @@
1775+--let slow_query_log_file_old=`SELECT Variable_value FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE Variable_name = 'slow_query_log_file';`
1776+--let slow_query_log_old=`SELECT Variable_value FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE Variable_name = 'slow_query_log';`
1777+--let log_output_old=`SELECT Variable_value FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE Variable_name = 'log_output';`
1778+--disable_query_log
1779+--let log_file_full_path = $MYSQLTEST_VARDIR/$log_file.slog
1780+SET GLOBAL slow_query_log=0;
1781+SET GLOBAL log_output=FILE;
1782+--echo [log_start.inc] $log_file
1783+EVAL SET GLOBAL slow_query_log_file="$log_file_full_path";
1784+SET GLOBAL slow_query_log=1;
1785+--enable_query_log
1786
1787=== added file 'Percona-Server/mysql-test/include/log_stop.inc'
1788--- Percona-Server/mysql-test/include/log_stop.inc 1970-01-01 00:00:00 +0000
1789+++ Percona-Server/mysql-test/include/log_stop.inc 2013-05-20 14:30:50 +0000
1790@@ -0,0 +1,7 @@
1791+--disable_query_log
1792+SET GLOBAL slow_query_log=0;
1793+--echo [log_stop.inc] $log_file
1794+EVAL SET GLOBAL log_output= $log_output_old;
1795+EVAL SET GLOBAL slow_query_log_file= "$slow_query_log_file_old";
1796+EVAL SET GLOBAL slow_query_log= $slow_query_log_old;
1797+--enable_query_log
1798
1799=== added file 'Percona-Server/mysql-test/include/percona_processlist_row_stats_show.inc'
1800--- Percona-Server/mysql-test/include/percona_processlist_row_stats_show.inc 1970-01-01 00:00:00 +0000
1801+++ Percona-Server/mysql-test/include/percona_processlist_row_stats_show.inc 2013-05-20 14:30:50 +0000
1802@@ -0,0 +1,7 @@
1803+--replace_column 1 ### 3 ### 6 ### 7 ###
1804+SHOW PROCESSLIST;
1805+
1806+--replace_column 1 ###
1807+SELECT id, info, rows_sent, rows_examined FROM INFORMATION_SCHEMA.PROCESSLIST ORDER BY id;
1808+
1809+SET DEBUG_SYNC= 'now SIGNAL threads_dumped';
1810
1811=== added file 'Percona-Server/mysql-test/include/percona_query_cache_with_comments.inc'
1812--- Percona-Server/mysql-test/include/percona_query_cache_with_comments.inc 1970-01-01 00:00:00 +0000
1813+++ Percona-Server/mysql-test/include/percona_query_cache_with_comments.inc 2013-05-20 14:30:50 +0000
1814@@ -0,0 +1,95 @@
1815+--source include/percona_query_cache_with_comments_clear.inc
1816+let $query=/* with comment first */select * from t1;
1817+eval $query;
1818+--source include/percona_query_cache_with_comments_eval.inc
1819+
1820+let $query=# with comment first
1821+select * from t1;
1822+--source include/percona_query_cache_with_comments_eval.inc
1823+
1824+let $query=-- with comment first
1825+select * from t1;
1826+--source include/percona_query_cache_with_comments_eval.inc
1827+
1828+let $query=/* with comment first and "quote" */select * from t1;
1829+--source include/percona_query_cache_with_comments_eval.inc
1830+
1831+let $query=# with comment first and "quote"
1832+select * from t1;
1833+--source include/percona_query_cache_with_comments_eval.inc
1834+
1835+let $query=-- with comment first and "quote"
1836+select * from t1;
1837+--source include/percona_query_cache_with_comments_eval.inc
1838+
1839+let $query=
1840+ /* with comment and whitespaces first */select * from t1;
1841+--source include/percona_query_cache_with_comments_eval.inc
1842+
1843+let $query=
1844+ # with comment and whitespaces first
1845+select * from t1;
1846+--source include/percona_query_cache_with_comments_eval.inc
1847+
1848+let $query=
1849+ -- with comment and whitespaces first
1850+select * from t1;
1851+--source include/percona_query_cache_with_comments_eval.inc
1852+
1853+let $internal=* internal comment *;
1854+
1855+let $query=select * /$internal/ from t1;
1856+--source include/percona_query_cache_with_comments_eval.inc
1857+let $query=select */$internal/ from t1;
1858+--source include/percona_query_cache_with_comments_eval.inc
1859+let $query=select */$internal/from t1;
1860+--source include/percona_query_cache_with_comments_eval.inc
1861+
1862+let $internal=* internal comment with "quote" *;
1863+
1864+let $query=select * /$internal/ from t1;
1865+--source include/percona_query_cache_with_comments_eval.inc
1866+let $query=select */$internal/ from t1;
1867+--source include/percona_query_cache_with_comments_eval.inc
1868+let $query=select */$internal/from t1;
1869+--source include/percona_query_cache_with_comments_eval.inc
1870+
1871+let $query=select * from t1
1872+;
1873+--source include/percona_query_cache_with_comments_eval.inc
1874+
1875+let $query=select * from t1 ;
1876+--source include/percona_query_cache_with_comments_eval.inc
1877+
1878+let $query=select * from t1 ;
1879+--source include/percona_query_cache_with_comments_eval.inc
1880+
1881+let $query=select * from t1
1882+/* comment in the end */;
1883+--source include/percona_query_cache_with_comments_eval.inc
1884+
1885+let $query=select * from t1
1886+/* *\/ */;
1887+--source include/percona_query_cache_with_comments_eval.inc
1888+
1889+let $query=select * from t1
1890+/* comment in the end */
1891+;
1892+--source include/percona_query_cache_with_comments_eval.inc
1893+
1894+let $query=select * from t1 #comment in the end;
1895+--source include/percona_query_cache_with_comments_eval.inc
1896+
1897+let $query=select * from t1 #comment in the end
1898+;
1899+--source include/percona_query_cache_with_comments_eval.inc
1900+
1901+let $query=select * from t1 -- comment in the end;
1902+--source include/percona_query_cache_with_comments_eval.inc
1903+
1904+let $query=select * from t1 -- comment in the end
1905+;
1906+--source include/percona_query_cache_with_comments_eval.inc
1907+
1908+let $query=select ' \' ' from t1;
1909+--source include/percona_query_cache_with_comments_eval.inc
1910
1911=== added file 'Percona-Server/mysql-test/include/percona_query_cache_with_comments_begin.inc'
1912--- Percona-Server/mysql-test/include/percona_query_cache_with_comments_begin.inc 1970-01-01 00:00:00 +0000
1913+++ Percona-Server/mysql-test/include/percona_query_cache_with_comments_begin.inc 2013-05-20 14:30:50 +0000
1914@@ -0,0 +1,12 @@
1915+-- source include/have_query_cache.inc
1916+
1917+set GLOBAL query_cache_size=1355776;
1918+
1919+--disable_warnings
1920+drop table if exists t1;
1921+--enable_warnings
1922+
1923+create table t1 (a int not null);
1924+insert into t1 values (1),(2),(3);
1925+
1926+--source include/percona_query_cache_with_comments_clear.inc
1927
1928=== added file 'Percona-Server/mysql-test/include/percona_query_cache_with_comments_clear.inc'
1929--- Percona-Server/mysql-test/include/percona_query_cache_with_comments_clear.inc 1970-01-01 00:00:00 +0000
1930+++ Percona-Server/mysql-test/include/percona_query_cache_with_comments_clear.inc 2013-05-20 14:30:50 +0000
1931@@ -0,0 +1,5 @@
1932+# Reset query cache variables.
1933+flush query cache; # This crashed in some versions
1934+flush query cache; # This crashed in some versions
1935+reset query cache;
1936+flush status;
1937
1938=== added file 'Percona-Server/mysql-test/include/percona_query_cache_with_comments_end.inc'
1939--- Percona-Server/mysql-test/include/percona_query_cache_with_comments_end.inc 1970-01-01 00:00:00 +0000
1940+++ Percona-Server/mysql-test/include/percona_query_cache_with_comments_end.inc 2013-05-20 14:30:50 +0000
1941@@ -0,0 +1,3 @@
1942+DROP TABLE t1;
1943+SET GLOBAL query_cache_size=default;
1944+set global query_cache_strip_comments=OFF;
1945
1946=== added file 'Percona-Server/mysql-test/include/percona_query_cache_with_comments_eval.inc'
1947--- Percona-Server/mysql-test/include/percona_query_cache_with_comments_eval.inc 1970-01-01 00:00:00 +0000
1948+++ Percona-Server/mysql-test/include/percona_query_cache_with_comments_eval.inc 2013-05-20 14:30:50 +0000
1949@@ -0,0 +1,7 @@
1950+echo -----------------------------------------------------;
1951+echo $query;
1952+echo -----------------------------------------------------;
1953+--source include/percona_query_cache_with_comments_show.inc
1954+eval $query;
1955+eval $query;
1956+--source include/percona_query_cache_with_comments_show.inc
1957
1958=== added file 'Percona-Server/mysql-test/include/percona_query_cache_with_comments_show.inc'
1959--- Percona-Server/mysql-test/include/percona_query_cache_with_comments_show.inc 1970-01-01 00:00:00 +0000
1960+++ Percona-Server/mysql-test/include/percona_query_cache_with_comments_show.inc 2013-05-20 14:30:50 +0000
1961@@ -0,0 +1,8 @@
1962+let $show=show status like "Qcache_queries_in_cache";
1963+eval $show;
1964+let $show=show status like "Qcache_inserts";
1965+eval $show;
1966+let $show=show status like "Qcache_hits";
1967+eval $show;
1968+
1969+
1970
1971=== added file 'Percona-Server/mysql-test/include/percona_show_slave_status_nolock.inc'
1972--- Percona-Server/mysql-test/include/percona_show_slave_status_nolock.inc 1970-01-01 00:00:00 +0000
1973+++ Percona-Server/mysql-test/include/percona_show_slave_status_nolock.inc 2013-05-20 14:30:50 +0000
1974@@ -0,0 +1,56 @@
1975+--echo
1976+--disable_result_log
1977+connection slave_lock;
1978+--echo [slave_lock]
1979+send SHOW SLAVE STATUS;
1980+
1981+connection slave;
1982+--let $condition= 'SHOW SLAVE STATUS'
1983+--source include/wait_show_condition.inc
1984+
1985+--disable_warnings
1986+SET DEBUG_SYNC='now WAIT_FOR signal.after_show_slave_status TIMEOUT 1';
1987+--enable_warnings
1988+
1989+--let current=`SELECT SUBSTR(Variable_value FROM 22) FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE Variable_name = 'DEBUG_SYNC'`
1990+--echo SIGNAL after SHOW SLAVE STATUS is $current
1991+
1992+connection slave;
1993+--echo [slave]
1994+SET DEBUG_SYNC='now SIGNAL signal.empty';
1995+
1996+connection slave_nolock;
1997+--echo [slave_nolock]
1998+send SHOW SLAVE STATUS NOLOCK;
1999+
2000+connection slave;
2001+--let $condition= 'SHOW SLAVE STATUS NOLOCK'
2002+--source include/wait_show_condition.inc
2003+
2004+--disable_warnings
2005+SET DEBUG_SYNC='now WAIT_FOR signal.after_show_slave_status TIMEOUT 1';
2006+--enable_warnings
2007+
2008+--echo # should be 'signal.after_show_slave_status'
2009+--let current=`SELECT SUBSTR(Variable_value FROM 22) FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE Variable_name = 'DEBUG_SYNC'`
2010+--echo SIGNAL after SHOW SLAVE STATUS NOLOCK is $current
2011+
2012+connection slave;
2013+--echo [slave]
2014+SET DEBUG_SYNC='now SIGNAL signal.continue';
2015+
2016+connection slave_lock;
2017+--disable_result_log
2018+reap;
2019+--enable_result_log
2020+
2021+connection slave_nolock;
2022+--disable_result_log
2023+reap;
2024+--enable_result_log
2025+
2026+connection slave;
2027+--echo [slave]
2028+SET DEBUG_SYNC='now SIGNAL signal.empty';
2029+--enable_result_log
2030+--echo
2031
2032=== added file 'Percona-Server/mysql-test/include/percona_slow_log_verbosity_grep.inc'
2033--- Percona-Server/mysql-test/include/percona_slow_log_verbosity_grep.inc 1970-01-01 00:00:00 +0000
2034+++ Percona-Server/mysql-test/include/percona_slow_log_verbosity_grep.inc 2013-05-20 14:30:50 +0000
2035@@ -0,0 +1,26 @@
2036+# Common extensions to the slow query log
2037+--let grep_pattern = ^# Schema: .+ Last_errno: \d+ Killed: \d+\$
2038+--source include/log_grep.inc
2039+--let grep_pattern = ^#.*Rows_affected: \d+ Rows_read: \d+\$
2040+--source include/log_grep.inc
2041+--let grep_pattern = ^# Bytes_sent: \d+.*\$
2042+--source include/log_grep.inc
2043+# InnoDB
2044+--let grep_pattern = ^# InnoDB_trx_id: \w+\$
2045+--source include/log_grep.inc
2046+# Query plan
2047+--let grep_pattern = ^# Bytes_sent: \d+ Tmp_tables: \d+ Tmp_disk_tables: \d+ Tmp_table_sizes: \d+\$
2048+--source include/log_grep.inc
2049+--let grep_pattern = ^# QC_Hit: (Yes|No) Full_scan: (Yes|No) Full_join: (Yes|No) Tmp_table: (Yes|No) Tmp_table_on_disk: (Yes|No)\$
2050+--source include/log_grep.inc
2051+--let grep_pattern = ^# Filesort: (Yes|No) Filesort_on_disk: (Yes|No) Merge_passes: \d+\$
2052+--source include/log_grep.inc
2053+# InnoDB
2054+--let grep_pattern = ^# InnoDB_IO_r_ops: \d+ InnoDB_IO_r_bytes: \d+ InnoDB_IO_r_wait: \d*\.\d*\$
2055+--source include/log_grep.inc
2056+--let grep_pattern = ^# InnoDB_rec_lock_wait: \d*\.\d* InnoDB_queue_wait: \d*\.\d*\$
2057+--source include/log_grep.inc
2058+--let grep_pattern = ^# InnoDB_pages_distinct: \d+\$
2059+--source include/log_grep.inc
2060+--let grep_pattern = ^# No InnoDB statistics available for this query\$
2061+--source include/log_grep.inc
2062
2063=== added file 'Percona-Server/mysql-test/include/percona_slow_query_log_rate.inc'
2064--- Percona-Server/mysql-test/include/percona_slow_query_log_rate.inc 1970-01-01 00:00:00 +0000
2065+++ Percona-Server/mysql-test/include/percona_slow_query_log_rate.inc 2013-05-20 14:30:50 +0000
2066@@ -0,0 +1,37 @@
2067+--connection default
2068+
2069+--source include/count_sessions.inc
2070+--connect (connection_one,localhost,root,,)
2071+--connect (connection_two,localhost,root,,)
2072+--connect (connection_three,localhost,root,,)
2073+
2074+--source include/log_start.inc
2075+
2076+--let i=2
2077+--let k=1
2078+
2079+while($i)
2080+{
2081+--connection connection_one
2082+inc $k;
2083+SELECT 'connection_one';
2084+
2085+--connection connection_two
2086+inc $k;
2087+SELECT 'connection_two';
2088+
2089+--connection connection_three
2090+inc $k;
2091+SELECT 'connection_three';
2092+
2093+dec $i;
2094+}
2095+
2096+--connection default
2097+--source include/log_stop.inc
2098+--disconnect connection_one
2099+--disconnect connection_two
2100+--disconnect connection_three
2101+--source include/wait_until_count_sessions.inc
2102+--let log_slow_rate_test=1
2103+--source include/log_grep.inc
2104
2105=== modified file 'Percona-Server/mysql-test/r/connect.result'
2106--- Percona-Server/mysql-test/r/connect.result 2013-03-05 12:46:43 +0000
2107+++ Percona-Server/mysql-test/r/connect.result 2013-05-20 14:30:50 +0000
2108@@ -1,3 +1,4 @@
2109+set global log_warnings=0;
2110 drop table if exists t1,t2;
2111 show tables;
2112 Tables_in_mysql
2113@@ -411,3 +412,4 @@
2114 # ------------------------------------------------------------------
2115 # -- End of 5.6 tests
2116 # ------------------------------------------------------------------
2117+set global log_warnings=1;
2118
2119=== modified file 'Percona-Server/mysql-test/r/create.result'
2120--- Percona-Server/mysql-test/r/create.result 2013-03-05 12:46:43 +0000
2121+++ Percona-Server/mysql-test/r/create.result 2013-05-20 14:30:50 +0000
2122@@ -33,10 +33,7 @@
2123 create table t1 (b char(0) not null, index(b));
2124 ERROR 42000: The used storage engine can't index column 'b'
2125 create table t1 (a int not null,b text) engine=heap;
2126-ERROR 42000: The used table type doesn't support BLOB/TEXT columns
2127 drop table if exists t1;
2128-Warnings:
2129-Note 1051 Unknown table 'test.t1'
2130 create table t1 (ordid int(8) not null auto_increment, ord varchar(50) not null, primary key (ord,ordid)) engine=heap;
2131 ERROR 42000: Incorrect table definition; there can be only one auto column and it must be defined as a key
2132 create table not_existing_database.test (a int);
2133@@ -1897,7 +1894,9 @@
2134 `TIME` int(7) NOT NULL DEFAULT '0',
2135 `STATE` varchar(64) DEFAULT NULL,
2136 `INFO` longtext,
2137- `TIME_MS` bigint(21) NOT NULL DEFAULT '0'
2138+ `TIME_MS` bigint(21) NOT NULL DEFAULT '0',
2139+ `ROWS_SENT` bigint(21) unsigned NOT NULL DEFAULT '0',
2140+ `ROWS_EXAMINED` bigint(21) unsigned NOT NULL DEFAULT '0'
2141 ) ENGINE=MyISAM DEFAULT CHARSET=utf8
2142 drop table t1;
2143 create temporary table t1 like information_schema.processlist;
2144@@ -1912,7 +1911,9 @@
2145 `TIME` int(7) NOT NULL DEFAULT '0',
2146 `STATE` varchar(64) DEFAULT NULL,
2147 `INFO` longtext,
2148- `TIME_MS` bigint(21) NOT NULL DEFAULT '0'
2149+ `TIME_MS` bigint(21) NOT NULL DEFAULT '0',
2150+ `ROWS_SENT` bigint(21) unsigned NOT NULL DEFAULT '0',
2151+ `ROWS_EXAMINED` bigint(21) unsigned NOT NULL DEFAULT '0'
2152 ) ENGINE=MyISAM DEFAULT CHARSET=utf8
2153 drop table t1;
2154 create table t1 like information_schema.character_sets;
2155
2156=== modified file 'Percona-Server/mysql-test/r/ctype_utf8mb4_heap.result'
2157--- Percona-Server/mysql-test/r/ctype_utf8mb4_heap.result 2013-03-05 12:46:43 +0000
2158+++ Percona-Server/mysql-test/r/ctype_utf8mb4_heap.result 2013-05-20 14:30:50 +0000
2159@@ -1180,6 +1180,8 @@
2160 a varchar(255) NOT NULL default '',
2161 KEY a (a)
2162 ) ENGINE=heap DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_general_ci;
2163+Warnings:
2164+Warning 1071 Specified key was too long; max key length is 1000 bytes
2165 insert into t1 values (_utf8mb4 0xe880bd);
2166 insert into t1 values (_utf8mb4 0x5b);
2167 select hex(a) from t1;
2168@@ -1218,6 +1220,8 @@
2169 Warnings:
2170 Note 1051 Unknown table 'test.t1'
2171 CREATE TABLE t1(a VARCHAR(255), KEY(a)) ENGINE=heap DEFAULT CHARSET=utf8mb4;
2172+Warnings:
2173+Warning 1071 Specified key was too long; max key length is 1000 bytes
2174 INSERT INTO t1 VALUES('uuABCDEFGHIGKLMNOPRSTUVWXYZ╠łbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb');
2175 INSERT INTO t1 VALUES('uu');
2176 check table t1;
2177
2178=== modified file 'Percona-Server/mysql-test/r/derived.result'
2179--- Percona-Server/mysql-test/r/derived.result 2013-02-12 07:47:19 +0000
2180+++ Percona-Server/mysql-test/r/derived.result 2013-05-20 14:30:50 +0000
2181@@ -1530,7 +1530,7 @@
2182 heap to myisam.
2183 show status like 'Handler_write';
2184 Variable_name Value
2185-Handler_write 1021
2186+Handler_write 1011
2187 set @@max_heap_table_size= @save_heap_size;
2188 drop table t1;
2189 #
2190
2191=== modified file 'Percona-Server/mysql-test/r/disabled_replication.result'
2192--- Percona-Server/mysql-test/r/disabled_replication.result 2012-12-14 15:02:07 +0000
2193+++ Percona-Server/mysql-test/r/disabled_replication.result 2013-05-20 14:30:50 +0000
2194@@ -1,5 +1,6 @@
2195 SHOW SLAVE STATUS;
2196-Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Master_UUID Master_Info_File SQL_Delay SQL_Remaining_Delay Slave_SQL_Running_State Master_Retry_Count Master_Bind Last_IO_Error_Timestamp Last_SQL_Error_Timestamp Master_SSL_Crl Master_SSL_Crlpath Retrieved_Gtid_Set Executed_Gtid_Set Auto_Position
2197+Warnings:
2198+Warning 1617 The master info structure does not exist
2199 RESET SLAVE;
2200 ERROR HY000: Slave is not configured or failed to initialize properly. You must at least set --server-id to enable either a master or a slave. Additional error messages can be found in the MySQL error log.
2201 SHOW RELAYLOG EVENTS;
2202
2203=== added file 'Percona-Server/mysql-test/r/group_commit_crash.result'
2204--- Percona-Server/mysql-test/r/group_commit_crash.result 1970-01-01 00:00:00 +0000
2205+++ Percona-Server/mysql-test/r/group_commit_crash.result 2013-05-20 14:30:50 +0000
2206@@ -0,0 +1,101 @@
2207+call mtr.add_suppression('Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT.');
2208+CREATE TABLE t1(a CHAR(255),
2209+b CHAR(255),
2210+c CHAR(255),
2211+d CHAR(255),
2212+id INT AUTO_INCREMENT,
2213+PRIMARY KEY(id)) ENGINE=InnoDB;
2214+create table t2 like t1;
2215+create procedure setcrash(IN i INT)
2216+begin
2217+CASE i
2218+WHEN 1 THEN SET SESSION debug="d,crash_commit_after_prepare";
2219+WHEN 2 THEN SET SESSION debug="d,crash_commit_after_prepare";
2220+WHEN 3 THEN SET SESSION debug="d,crash_commit_after_prepare";
2221+WHEN 4 THEN SET SESSION debug="d,crash_commit_after_prepare";
2222+# WHEN 2 THEN SET SESSION debug="d,crash_commit_after_log";
2223+# WHEN 3 THEN SET SESSION debug="d,crash_before_writing_xid";
2224+# WHEN 4 THEN SET SESSION debug="d,crash_commit_after";
2225+WHEN 5 THEN SET SESSION debug="d,crash_commit_before";
2226+ELSE BEGIN END;
2227+END CASE;
2228+end //
2229+FLUSH TABLES;
2230+INSERT INTO t2(a, b, c, d) VALUES ('a', 'b', 'c', 'd');
2231+INSERT INTO t2(a, b, c, d) VALUES ('a', 'b', 'c', 'd');
2232+INSERT INTO t2(a, b, c, d) VALUES ('a', 'b', 'c', 'd');
2233+INSERT INTO t2(a, b, c, d) VALUES ('a', 'b', 'c', 'd');
2234+INSERT INTO t2(a, b, c, d) VALUES ('a', 'b', 'c', 'd');
2235+INSERT INTO t2(a, b, c, d) VALUES ('a', 'b', 'c', 'd');
2236+INSERT INTO t2(a, b, c, d) VALUES ('a', 'b', 'c', 'd');
2237+INSERT INTO t2(a, b, c, d) VALUES ('a', 'b', 'c', 'd');
2238+INSERT INTO t2(a, b, c, d) VALUES ('a', 'b', 'c', 'd');
2239+INSERT INTO t2(a, b, c, d) VALUES ('a', 'b', 'c', 'd');
2240+RESET MASTER;
2241+START TRANSACTION;
2242+insert into t1 select * from t2;
2243+Warnings:
2244+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statements writing to a table with an auto-increment column after selecting from another table are unsafe because the order in which rows are retrieved determines what (if any) rows will be written. This order cannot be predicted and may differ on master and the slave.
2245+call setcrash(5);
2246+COMMIT;
2247+Got one of the listed errors
2248+SELECT * FROM t1 ORDER BY id;
2249+a b c d id
2250+SHOW BINLOG EVENTS LIMIT 2,1;
2251+Log_name Pos Event_type Server_id End_log_pos Info
2252+delete from t1;
2253+RESET MASTER;
2254+START TRANSACTION;
2255+insert into t1 select * from t2;
2256+Warnings:
2257+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statements writing to a table with an auto-increment column after selecting from another table are unsafe because the order in which rows are retrieved determines what (if any) rows will be written. This order cannot be predicted and may differ on master and the slave.
2258+call setcrash(4);
2259+COMMIT;
2260+Got one of the listed errors
2261+SELECT * FROM t1 ORDER BY id;
2262+a b c d id
2263+SHOW BINLOG EVENTS LIMIT 2,1;
2264+Log_name Pos Event_type Server_id End_log_pos Info
2265+delete from t1;
2266+RESET MASTER;
2267+START TRANSACTION;
2268+insert into t1 select * from t2;
2269+Warnings:
2270+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statements writing to a table with an auto-increment column after selecting from another table are unsafe because the order in which rows are retrieved determines what (if any) rows will be written. This order cannot be predicted and may differ on master and the slave.
2271+call setcrash(3);
2272+COMMIT;
2273+Got one of the listed errors
2274+SELECT * FROM t1 ORDER BY id;
2275+a b c d id
2276+SHOW BINLOG EVENTS LIMIT 2,1;
2277+Log_name Pos Event_type Server_id End_log_pos Info
2278+delete from t1;
2279+RESET MASTER;
2280+START TRANSACTION;
2281+insert into t1 select * from t2;
2282+Warnings:
2283+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statements writing to a table with an auto-increment column after selecting from another table are unsafe because the order in which rows are retrieved determines what (if any) rows will be written. This order cannot be predicted and may differ on master and the slave.
2284+call setcrash(2);
2285+COMMIT;
2286+Got one of the listed errors
2287+SELECT * FROM t1 ORDER BY id;
2288+a b c d id
2289+SHOW BINLOG EVENTS LIMIT 2,1;
2290+Log_name Pos Event_type Server_id End_log_pos Info
2291+delete from t1;
2292+RESET MASTER;
2293+START TRANSACTION;
2294+insert into t1 select * from t2;
2295+Warnings:
2296+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statements writing to a table with an auto-increment column after selecting from another table are unsafe because the order in which rows are retrieved determines what (if any) rows will be written. This order cannot be predicted and may differ on master and the slave.
2297+call setcrash(1);
2298+COMMIT;
2299+Got one of the listed errors
2300+SELECT * FROM t1 ORDER BY id;
2301+a b c d id
2302+SHOW BINLOG EVENTS LIMIT 2,1;
2303+Log_name Pos Event_type Server_id End_log_pos Info
2304+delete from t1;
2305+DROP TABLE t1;
2306+DROP TABLE t2;
2307+DROP PROCEDURE setcrash;
2308
2309=== added file 'Percona-Server/mysql-test/r/have_64_keys.require'
2310--- Percona-Server/mysql-test/r/have_64_keys.require 1970-01-01 00:00:00 +0000
2311+++ Percona-Server/mysql-test/r/have_64_keys.require 2013-05-20 14:30:50 +0000
2312@@ -0,0 +1,14 @@
2313+EXPLAIN SELECT 1;
2314+Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
2315+def id 8 3 1 N 32929 0 63
2316+def select_type 253 19 6 N 1 31 8
2317+def table 253 64 0 Y 0 31 8
2318+def type 253 10 0 Y 0 31 8
2319+def possible_keys 253 4096 0 Y 0 31 8
2320+def key 253 64 0 Y 0 31 8
2321+def key_len 253 4096 0 Y 0 31 8
2322+def ref 253 1024 0 Y 0 31 8
2323+def rows 8 10 0 Y 32928 0 63
2324+def Extra 253 255 14 N 1 31 8
2325+id select_type table type possible_keys key key_len ref rows Extra
2326+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used
2327
2328=== modified file 'Percona-Server/mysql-test/r/information_schema.result'
2329--- Percona-Server/mysql-test/r/information_schema.result 2013-03-05 12:46:43 +0000
2330+++ Percona-Server/mysql-test/r/information_schema.result 2013-05-20 14:30:50 +0000
2331@@ -54,10 +54,12 @@
2332 select * from v1;
2333 c
2334 CHARACTER_SETS
2335+CLIENT_STATISTICS
2336 COLLATIONS
2337 COLLATION_CHARACTER_SET_APPLICABILITY
2338 COLUMNS
2339 COLUMN_PRIVILEGES
2340+INDEX_STATISTICS
2341 ENGINES
2342 EVENTS
2343 FILES
2344@@ -82,9 +84,12 @@
2345 TABLESPACES
2346 TABLE_CONSTRAINTS
2347 TABLE_PRIVILEGES
2348+TABLE_STATISTICS
2349 TEMPORARY_TABLES
2350+THREAD_STATISTICS
2351 TRIGGERS
2352 USER_PRIVILEGES
2353+USER_STATISTICS
2354 VIEWS
2355 XTRADB_INTERNAL_HASH_TABLES
2356 XTRADB_RSEG
2357@@ -128,7 +133,9 @@
2358 TABLESPACES TABLESPACES
2359 TABLE_CONSTRAINTS TABLE_CONSTRAINTS
2360 TABLE_PRIVILEGES TABLE_PRIVILEGES
2361+TABLE_STATISTICS TABLE_STATISTICS
2362 TEMPORARY_TABLES TEMPORARY_TABLES
2363+THREAD_STATISTICS THREAD_STATISTICS
2364 TRIGGERS TRIGGERS
2365 tables_priv tables_priv
2366 time_zone time_zone
2367@@ -149,7 +156,9 @@
2368 TABLESPACES TABLESPACES
2369 TABLE_CONSTRAINTS TABLE_CONSTRAINTS
2370 TABLE_PRIVILEGES TABLE_PRIVILEGES
2371+TABLE_STATISTICS TABLE_STATISTICS
2372 TEMPORARY_TABLES TEMPORARY_TABLES
2373+THREAD_STATISTICS THREAD_STATISTICS
2374 TRIGGERS TRIGGERS
2375 tables_priv tables_priv
2376 time_zone time_zone
2377@@ -170,7 +179,9 @@
2378 TABLESPACES TABLESPACES
2379 TABLE_CONSTRAINTS TABLE_CONSTRAINTS
2380 TABLE_PRIVILEGES TABLE_PRIVILEGES
2381+TABLE_STATISTICS TABLE_STATISTICS
2382 TEMPORARY_TABLES TEMPORARY_TABLES
2383+THREAD_STATISTICS THREAD_STATISTICS
2384 TRIGGERS TRIGGERS
2385 tables_priv tables_priv
2386 time_zone time_zone
2387@@ -657,14 +668,16 @@
2388 where table_schema='information_schema' limit 2;
2389 TABLE_NAME TABLE_TYPE ENGINE
2390 CHARACTER_SETS SYSTEM VIEW MEMORY
2391-COLLATIONS SYSTEM VIEW MEMORY
2392+CLIENT_STATISTICS SYSTEM VIEW MEMORY
2393 show tables from information_schema like "T%";
2394 Tables_in_information_schema (T%)
2395 TABLES
2396 TABLESPACES
2397 TABLE_CONSTRAINTS
2398 TABLE_PRIVILEGES
2399+TABLE_STATISTICS
2400 TEMPORARY_TABLES
2401+THREAD_STATISTICS
2402 TRIGGERS
2403 create database information_schema;
2404 ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
2405@@ -675,7 +688,9 @@
2406 TABLESPACES SYSTEM VIEW
2407 TABLE_CONSTRAINTS SYSTEM VIEW
2408 TABLE_PRIVILEGES SYSTEM VIEW
2409+TABLE_STATISTICS SYSTEM VIEW
2410 TEMPORARY_TABLES SYSTEM VIEW
2411+THREAD_STATISTICS SYSTEM VIEW
2412 TRIGGERS SYSTEM VIEW
2413 create table t1(a int);
2414 ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
2415@@ -689,7 +704,9 @@
2416 TABLESPACES
2417 TABLE_CONSTRAINTS
2418 TABLE_PRIVILEGES
2419+TABLE_STATISTICS
2420 TEMPORARY_TABLES
2421+THREAD_STATISTICS
2422 TRIGGERS
2423 select table_name from tables where table_name='user';
2424 table_name
2425@@ -891,6 +908,7 @@
2426 COLUMN_PRIVILEGES TABLE_NAME select
2427 FILES TABLE_NAME select
2428 GLOBAL_TEMPORARY_TABLES TABLE_NAME select
2429+INDEX_STATISTICS TABLE_NAME select
2430 INNODB_BUFFER_PAGE TABLE_NAME select
2431 INNODB_BUFFER_PAGE_LRU TABLE_NAME select
2432 INNODB_CMP_PER_INDEX table_name select
2433@@ -902,6 +920,7 @@
2434 TABLES TABLE_NAME select
2435 TABLE_CONSTRAINTS TABLE_NAME select
2436 TABLE_PRIVILEGES TABLE_NAME select
2437+TABLE_STATISTICS TABLE_NAME select
2438 TEMPORARY_TABLES TABLE_NAME select
2439 VIEWS TABLE_NAME select
2440 delete from mysql.user where user='mysqltest_4';
2441@@ -912,7 +931,7 @@
2442 AND table_name not like 'ndb%' AND table_name not like 'innodb_%'
2443 GROUP BY TABLE_SCHEMA;
2444 table_schema count(*)
2445-information_schema 36
2446+information_schema 41
2447 mysql 25
2448 create table t1 (i int, j int);
2449 create trigger trg1 before insert on t1 for each row
2450@@ -1353,6 +1372,7 @@
2451 group by t.table_name order by num1, t.table_name;
2452 table_name group_concat(t.table_schema, '.', t.table_name) num1
2453 CHARACTER_SETS information_schema.CHARACTER_SETS 1
2454+CLIENT_STATISTICS information_schema.CLIENT_STATISTICS 1
2455 COLLATIONS information_schema.COLLATIONS 1
2456 COLLATION_CHARACTER_SET_APPLICABILITY information_schema.COLLATION_CHARACTER_SET_APPLICABILITY 1
2457 COLUMNS information_schema.COLUMNS 1
2458@@ -1363,6 +1383,7 @@
2459 GLOBAL_STATUS information_schema.GLOBAL_STATUS 1
2460 GLOBAL_TEMPORARY_TABLES information_schema.GLOBAL_TEMPORARY_TABLES 1
2461 GLOBAL_VARIABLES information_schema.GLOBAL_VARIABLES 1
2462+INDEX_STATISTICS information_schema.INDEX_STATISTICS 1
2463 KEY_COLUMN_USAGE information_schema.KEY_COLUMN_USAGE 1
2464 OPTIMIZER_TRACE information_schema.OPTIMIZER_TRACE 1
2465 PARAMETERS information_schema.PARAMETERS 1
2466@@ -1381,9 +1402,12 @@
2467 TABLESPACES information_schema.TABLESPACES 1
2468 TABLE_CONSTRAINTS information_schema.TABLE_CONSTRAINTS 1
2469 TABLE_PRIVILEGES information_schema.TABLE_PRIVILEGES 1
2470+TABLE_STATISTICS information_schema.TABLE_STATISTICS 1
2471 TEMPORARY_TABLES information_schema.TEMPORARY_TABLES 1
2472+THREAD_STATISTICS information_schema.THREAD_STATISTICS 1
2473 TRIGGERS information_schema.TRIGGERS 1
2474 USER_PRIVILEGES information_schema.USER_PRIVILEGES 1
2475+USER_STATISTICS information_schema.USER_STATISTICS 1
2476 VIEWS information_schema.VIEWS 1
2477 XTRADB_INTERNAL_HASH_TABLES information_schema.XTRADB_INTERNAL_HASH_TABLES 1
2478 XTRADB_READ_VIEW information_schema.XTRADB_READ_VIEW 1
2479@@ -1758,6 +1782,10 @@
2480 length(CAST(b AS CHAR))
2481 20
2482 DROP TABLE ubig;
2483+grant usage on *.* to mysqltest_1@localhost;
2484+select 1 from information_schema.tables where table_schema=repeat('a', 2000);
2485+1
2486+drop user mysqltest_1@localhost;
2487 End of 5.1 tests.
2488 create function f1 (p1 int, p2 datetime, p3 decimal(10,2))
2489 returns char(10) return null;
2490
2491=== modified file 'Percona-Server/mysql-test/r/information_schema_db.result'
2492--- Percona-Server/mysql-test/r/information_schema_db.result 2013-03-05 12:46:43 +0000
2493+++ Percona-Server/mysql-test/r/information_schema_db.result 2013-05-20 14:30:50 +0000
2494@@ -6,10 +6,12 @@
2495 show tables where Tables_in_information_schema NOT LIKE 'Innodb%';
2496 Tables_in_information_schema
2497 CHARACTER_SETS
2498+CLIENT_STATISTICS
2499 COLLATIONS
2500 COLLATION_CHARACTER_SET_APPLICABILITY
2501 COLUMNS
2502 COLUMN_PRIVILEGES
2503+INDEX_STATISTICS
2504 ENGINES
2505 EVENTS
2506 FILES
2507@@ -34,9 +36,12 @@
2508 TABLESPACES
2509 TABLE_CONSTRAINTS
2510 TABLE_PRIVILEGES
2511+TABLE_STATISTICS
2512 TEMPORARY_TABLES
2513+THREAD_STATISTICS
2514 TRIGGERS
2515 USER_PRIVILEGES
2516+USER_STATISTICS
2517 VIEWS
2518 XTRADB_INTERNAL_HASH_TABLES
2519 XTRADB_RSEG
2520@@ -47,7 +52,9 @@
2521 TABLESPACES
2522 TABLE_CONSTRAINTS
2523 TABLE_PRIVILEGES
2524+TABLE_STATISTICS
2525 TEMPORARY_TABLES
2526+THREAD_STATISTICS
2527 TRIGGERS
2528 create database `inf%`;
2529 create database mbase;
2530
2531=== modified file 'Percona-Server/mysql-test/r/mysqld--help-notwin.result'
2532--- Percona-Server/mysql-test/r/mysqld--help-notwin.result 2013-03-21 06:31:46 +0000
2533+++ Percona-Server/mysql-test/r/mysqld--help-notwin.result 2013-05-20 14:30:50 +0000
2534@@ -186,6 +186,8 @@
2535 disallowed statements include CREATE TEMPORARY TABLE
2536 inside transactions, all updates to non-transactional
2537 tables, and CREATE TABLE ... SELECT.
2538+ --enforce-storage-engine=name
2539+ Force the use of a storage engine for new tables
2540 --eq-range-index-dive-limit=#
2541 The optimizer will use existing index statistics instead
2542 of doing index dives for equality ranges if the number of
2543@@ -332,9 +334,32 @@
2544 --log-slow-admin-statements
2545 Log slow OPTIMIZE, ANALYZE, ALTER and other
2546 administrative statements to the slow log if it is open.
2547+ --log-slow-filter=name
2548+ Log only the queries that followed certain execution
2549+ plan. Multiple flags allowed in a comma-separated string.
2550+ [qc_miss, full_scan, full_join, tmp_table,
2551+ tmp_table_on_disk, filesort, filesort_on_disk]
2552+ --log-slow-rate-limit=#
2553+ Rate limit statement writes to slow log to only those
2554+ from every (1/log_slow_rate_limit) session.
2555+ --log-slow-rate-type=name
2556+ Choose the log_slow_rate_limit behavior: session or
2557+ query. When you choose 'session' - every
2558+ %log_slow_rate_limit connection will be processed to slow
2559+ query log. When you choose 'query' - every
2560+ %log_slow_rate_limit query will be processed to slow
2561+ query log. [session, query]
2562 --log-slow-slave-statements
2563- Log slow statements executed by slave thread to the slow
2564- log if it is open.
2565+ Log queries replayed be the slave SQL thread
2566+ --log-slow-sp-statements
2567+ Log slow statements executed by stored procedure to the
2568+ slow log if it is open.
2569+ (Defaults to on; use --skip-log-slow-sp-statements to disable.)
2570+ --log-slow-verbosity=name
2571+ Choose how verbose the messages to your slow log will be.
2572+ Multiple flags allowed in a comma-separated string.
2573+ [microtime, query_plan, innodb, profiling,
2574+ profiling_use_getrusage]
2575 --log-tc=name Path to transaction coordinator log (used for
2576 transactions that affect more than one storage engine,
2577 when binary log is disabled).
2578@@ -347,6 +372,9 @@
2579 --log_queries_not_using_indexes is set.
2580 -W, --log-warnings[=#]
2581 Log some not critical warnings to the log file
2582+ --log-warnings-suppress=name
2583+ disable logging of enumerated warnings: 1592: unsafe
2584+ statements for binary logging; possible values : [1592]
2585 --long-query-time=# Log all queries that have taken more than long_query_time
2586 seconds to execute to file. The argument will be treated
2587 as a decimal value with microsecond precision
2588@@ -378,6 +406,11 @@
2589 --max-binlog-dump-events=#
2590 Option used by mysql-test for debugging and testing of
2591 replication.
2592+ --max-binlog-files=#
2593+ Maximum number of binlog files. Used with
2594+ --max-binlog-size this can be used to limit the total
2595+ amount of disk space used for the binlog. Default is 0,
2596+ don't limit.
2597 --max-binlog-size=# Binary log will be rotated automatically when the size
2598 exceeds this value. Will also apply to relay logs if
2599 max_relay_log_size is 0
2600@@ -684,6 +717,10 @@
2601 The minimum size for blocks allocated by the query cache
2602 --query-cache-size=#
2603 The memory allocated to store results from old queries
2604+ --query-cache-strip-comments
2605+ Enable and disable optimisation "strip comment for query
2606+ cache" - optimisation strip all comments from query while
2607+ search query result in query cache
2608 --query-cache-type=name
2609 OFF = Don't cache or retrieve results. ON = Cache all
2610 results except SELECT SQL_NO_CACHE ... queries. DEMAND =
2611@@ -806,9 +843,10 @@
2612 --secure-auth Disallow authentication for accounts that have old
2613 (pre-4.1) passwords
2614 (Defaults to on; use --skip-secure-auth to disable.)
2615- --secure-file-priv=name
2616+ --secure-file-priv[=name]
2617 Limit LOAD DATA, SELECT ... OUTFILE, and LOAD_FILE() to
2618- files within specified directory
2619+ files within specified directory. If no argument is
2620+ specified disable loading files.
2621 --server-id=# Uniquely identifies the server instance in the community
2622 of replication partners
2623 --server-id-bits=# Set number of significant bits in server-id
2624@@ -900,6 +938,18 @@
2625 Log slow queries to given log file. Defaults logging to
2626 hostname-slow.log. Must be enabled to activate other slow
2627 log options
2628+ --slow-query-log-timestamp-always
2629+ Timestamp is printed for all records of the slow log even
2630+ if they are same time.
2631+ --slow-query-log-timestamp-precision=name
2632+ Select the timestamp precision for use in the slow query
2633+ log. [second, microsecond]
2634+ --slow-query-log-use-global-control=name
2635+ Choose flags, wich always use the global variables.
2636+ Multiple flags allowed in a comma-separated string.
2637+ [none, log_slow_filter, log_slow_rate_limit,
2638+ log_slow_verbosity, long_query_time,
2639+ min_examined_row_limit, all]
2640 --socket=name Socket file to use for connection
2641 --sort-buffer-size=#
2642 Each thread that needs to do a sort allocates a buffer of
2643@@ -947,6 +997,8 @@
2644 Define threads usage for handling queries, one of
2645 one-thread-per-connection, no-threads, pool-of-threads
2646 --thread-stack=# The stack size for each thread
2647+ --thread-statistics Control TABLE_STATISTICS running, when userstat is
2648+ enabled
2649 --time-format=name The TIME format (ignored)
2650 --timed-mutexes Specify whether to time mutexes (only InnoDB mutexes are
2651 currently supported)
2652@@ -975,8 +1027,19 @@
2653 of the underlying table and the query uses a LIMIT clause
2654 (usually get from GUI tools)
2655 -u, --user=name Run mysqld daemon as user.
2656+ --userstat Control USER_STATISTICS, CLIENT_STATISTICS,
2657+ THREAD_STATISTICS, INDEX_STATISTICS and TABLE_STATISTICS
2658+ running
2659+ --utility-user=name Specifies a MySQL user that will be added to the internal
2660+ list of users and recognized as the utility user.
2661+ --utility-user-password=name
2662+ Specifies the password required for the utility user.
2663+ --utility-user-schema-access=name
2664+ Specifies the schemas that the utility user has access to
2665+ in a comma delimited list.
2666 -v, --verbose Used with --help option for detailed help.
2667 -V, --version Output version information and exit.
2668+ -V, --version Output version information and exit.
2669 --wait-timeout=# The number of seconds the server waits for activity on a
2670 connection before closing it
2671 --xtradb-internal-hash-tables[=name]
2672@@ -1037,6 +1100,7 @@
2673 div-precision-increment 4
2674 end-markers-in-json FALSE
2675 enforce-gtid-consistency FALSE
2676+enforce-storage-engine (No default value)
2677 eq-range-index-dive-limit 10
2678 event-scheduler OFF
2679 expand-fast-index-creation FALSE
2680@@ -1088,11 +1152,17 @@
2681 log-short-format FALSE
2682 log-slave-updates FALSE
2683 log-slow-admin-statements FALSE
2684+log-slow-filter
2685+log-slow-rate-limit 1
2686+log-slow-rate-type session
2687 log-slow-slave-statements FALSE
2688+log-slow-sp-statements TRUE
2689+log-slow-verbosity
2690 log-tc tc.log
2691 log-tc-size 24576
2692 log-throttle-queries-not-using-indexes 0
2693 log-warnings 1
2694+log-warnings-suppress
2695 long-query-time 10
2696 low-priority-updates FALSE
2697 lower-case-table-names 1
2698@@ -1103,6 +1173,7 @@
2699 max-allowed-packet 4194304
2700 max-binlog-cache-size 18446744073709547520
2701 max-binlog-dump-events 0
2702+max-binlog-files 0
2703 max-binlog-size 1073741824
2704 max-binlog-stmt-cache-size 18446744073709547520
2705 max-connect-errors 100
2706@@ -1202,6 +1273,7 @@
2707 query-cache-limit 1048576
2708 query-cache-min-res-unit 4096
2709 query-cache-size 1048576
2710+query-cache-strip-comments FALSE
2711 query-cache-type OFF
2712 query-cache-wlock-invalidate FALSE
2713 query-prealloc-size 8192
2714@@ -1248,6 +1320,9 @@
2715 slave-type-conversions
2716 slow-launch-time 2
2717 slow-query-log FALSE
2718+slow-query-log-timestamp-always FALSE
2719+slow-query-log-timestamp-precision second
2720+slow-query-log-use-global-control
2721 sort-buffer-size 262144
2722 sporadic-binlog-dump-fail FALSE
2723 sql-mode NO_ENGINE_SUBSTITUTION
2724@@ -1264,6 +1339,7 @@
2725 thread-cache-size 9
2726 thread-handling one-thread-per-connection
2727 thread-stack 262144
2728+thread-statistics FALSE
2729 time-format %H:%i:%s
2730 timed-mutexes FALSE
2731 tmp-table-size 16777216
2732@@ -1272,6 +1348,10 @@
2733 transaction-prealloc-size 4096
2734 transaction-read-only FALSE
2735 updatable-views-with-limit YES
2736+userstat FALSE
2737+utility-user (No default value)
2738+utility-user-password (No default value)
2739+utility-user-schema-access (No default value)
2740 verbose TRUE
2741 wait-timeout 28800
2742 xtradb-internal-hash-tables ON
2743
2744=== modified file 'Percona-Server/mysql-test/r/mysqld--help-win.result'
2745--- Percona-Server/mysql-test/r/mysqld--help-win.result 2013-03-21 06:31:46 +0000
2746+++ Percona-Server/mysql-test/r/mysqld--help-win.result 2013-05-20 14:30:50 +0000
2747@@ -191,6 +191,12 @@
2748 of doing index dives for equality ranges if the number of
2749 equality ranges for the index is larger than or equal to
2750 this number. If set to 0, index dives are always used.
2751+ --enforce-storage-engine=name
2752+ Force the use of a storage engine for new tables
2753+ --engine-condition-pushdown
2754+ Push supported query conditions to the storage engine.
2755+ Deprecated, use --optimizer-switch instead.
2756+ (Defaults to on; use --skip-engine-condition-pushdown to disable.)
2757 --event-scheduler[=name]
2758 Enable the event scheduler. Possible values are ON, OFF,
2759 and DISABLED (keep the event scheduler completely
2760@@ -377,6 +383,11 @@
2761 --max-binlog-dump-events=#
2762 Option used by mysql-test for debugging and testing of
2763 replication.
2764+ --max-binlog-files=#
2765+ Maximum number of binlog files. Used with
2766+ --max-binlog-size this can be used to limit the total
2767+ amount of disk space used for the binlog. Default is 0,
2768+ don't limit.
2769 --max-binlog-size=# Binary log will be rotated automatically when the size
2770 exceeds this value. Will also apply to relay logs if
2771 max_relay_log_size is 0
2772@@ -801,14 +812,16 @@
2773 not sure, leave this option unset
2774 --report-user=name The account user name of the slave to be reported to the
2775 master during slave registration
2776+ --safe-mode Skip some optimize stages (for testing). Deprecated.
2777 --safe-user-create Don't allow new user creation by the user who has no
2778 write privileges to the mysql.user table.
2779 --secure-auth Disallow authentication for accounts that have old
2780 (pre-4.1) passwords
2781 (Defaults to on; use --skip-secure-auth to disable.)
2782- --secure-file-priv=name
2783+ --secure-file-priv[=name]
2784 Limit LOAD DATA, SELECT ... OUTFILE, and LOAD_FILE() to
2785- files within specified directory
2786+ files within specified directory. If no argument is
2787+ specified disable loading files.
2788 --server-id=# Uniquely identifies the server instance in the community
2789 of replication partners
2790 --server-id-bits=# Set number of significant bits in server-id
2791@@ -983,6 +996,13 @@
2792 of the underlying table and the query uses a LIMIT clause
2793 (usually get from GUI tools)
2794 -u, --user=name Run mysqld daemon as user.
2795+ --utility-user=name Specifies a MySQL user that will be added to the internal
2796+ list of users and recognized as the utility user.
2797+ --utility-user-password=name
2798+ Specifies the password required for the utility user.
2799+ --utility-user-schema-access=name
2800+ Specifies the schemas that the utility user has access to
2801+ in a comma delimited list.
2802 -v, --verbose Used with --help option for detailed help.
2803 -V, --version Output version information and exit.
2804 --wait-timeout=# The number of seconds the server waits for activity on a
2805@@ -1035,6 +1055,8 @@
2806 end-markers-in-json FALSE
2807 enforce-gtid-consistency FALSE
2808 eq-range-index-dive-limit 10
2809+enforce-storage-engine (No default value)
2810+engine-condition-pushdown TRUE
2811 event-scheduler OFF
2812 expand-fast-index-creation FALSE
2813 expire-logs-days 0
2814@@ -1099,6 +1121,7 @@
2815 max-allowed-packet 4194304
2816 max-binlog-cache-size 18446744073709547520
2817 max-binlog-dump-events 0
2818+max-binlog-files 0
2819 max-binlog-size 1073741824
2820 max-binlog-stmt-cache-size 18446744073709547520
2821 max-connect-errors 100
2822@@ -1272,6 +1295,9 @@
2823 transaction-prealloc-size 4096
2824 transaction-read-only FALSE
2825 updatable-views-with-limit YES
2826+utility-user (No default value)
2827+utility-user-password (No default value)
2828+utility-user-schema-access (No default value)
2829 verbose TRUE
2830 wait-timeout 28800
2831
2832
2833=== modified file 'Percona-Server/mysql-test/r/mysqlshow.result'
2834--- Percona-Server/mysql-test/r/mysqlshow.result 2013-03-05 12:46:43 +0000
2835+++ Percona-Server/mysql-test/r/mysqlshow.result 2013-05-20 14:30:50 +0000
2836@@ -80,10 +80,12 @@
2837 | Tables |
2838 +---------------------------------------+
2839 | CHARACTER_SETS |
2840+| CLIENT_STATISTICS |
2841 | COLLATIONS |
2842 | COLLATION_CHARACTER_SET_APPLICABILITY |
2843 | COLUMNS |
2844 | COLUMN_PRIVILEGES |
2845+| INDEX_STATISTICS |
2846 | ENGINES |
2847 | EVENTS |
2848 | FILES |
2849@@ -108,9 +110,12 @@
2850 | TABLESPACES |
2851 | TABLE_CONSTRAINTS |
2852 | TABLE_PRIVILEGES |
2853+| TABLE_STATISTICS |
2854 | TEMPORARY_TABLES |
2855+| THREAD_STATISTICS |
2856 | TRIGGERS |
2857 | USER_PRIVILEGES |
2858+| USER_STATISTICS |
2859 | VIEWS |
2860 | INNODB_CMP |
2861 | XTRADB_INTERNAL_HASH_TABLES |
2862@@ -130,7 +135,7 @@
2863 | INNODB_LOCK_WAITS |
2864 | INNODB_SYS_FIELDS |
2865 | INNODB_CMPMEM |
2866-| INNODB_BUFFER_PAGE |
2867+| INNODB_CHANGED_PAGES |
2868 | INNODB_SYS_COLUMNS |
2869 | INNODB_FT_INDEX_TABLE |
2870 | INNODB_CMP_PER_INDEX_RESET |
2871@@ -144,16 +149,19 @@
2872 | INNODB_SYS_TABLES |
2873 | INNODB_FT_DEFAULT_STOPWORD |
2874 | INNODB_FT_CONFIG |
2875+| INNODB_BUFFER_PAGE |
2876 +---------------------------------------+
2877 Database: INFORMATION_SCHEMA
2878 +---------------------------------------+
2879 | Tables |
2880 +---------------------------------------+
2881 | CHARACTER_SETS |
2882+| CLIENT_STATISTICS |
2883 | COLLATIONS |
2884 | COLLATION_CHARACTER_SET_APPLICABILITY |
2885 | COLUMNS |
2886 | COLUMN_PRIVILEGES |
2887+| INDEX_STATISTICS |
2888 | ENGINES |
2889 | EVENTS |
2890 | FILES |
2891@@ -178,9 +186,12 @@
2892 | TABLESPACES |
2893 | TABLE_CONSTRAINTS |
2894 | TABLE_PRIVILEGES |
2895+| TABLE_STATISTICS |
2896 | TEMPORARY_TABLES |
2897+| THREAD_STATISTICS |
2898 | TRIGGERS |
2899 | USER_PRIVILEGES |
2900+| USER_STATISTICS |
2901 | VIEWS |
2902 | INNODB_CMP |
2903 | XTRADB_INTERNAL_HASH_TABLES |
2904@@ -200,7 +211,7 @@
2905 | INNODB_LOCK_WAITS |
2906 | INNODB_SYS_FIELDS |
2907 | INNODB_CMPMEM |
2908-| INNODB_BUFFER_PAGE |
2909+| INNODB_CHANGED_PAGES |
2910 | INNODB_SYS_COLUMNS |
2911 | INNODB_FT_INDEX_TABLE |
2912 | INNODB_CMP_PER_INDEX_RESET |
2913@@ -214,6 +225,7 @@
2914 | INNODB_SYS_TABLES |
2915 | INNODB_FT_DEFAULT_STOPWORD |
2916 | INNODB_FT_CONFIG |
2917+| INNODB_BUFFER_PAGE |
2918 +---------------------------------------+
2919 Wildcard: inf_rmation_schema
2920 +--------------------+
2921
2922=== added file 'Percona-Server/mysql-test/r/percona_bug1008278.result'
2923--- Percona-Server/mysql-test/r/percona_bug1008278.result 1970-01-01 00:00:00 +0000
2924+++ Percona-Server/mysql-test/r/percona_bug1008278.result 2013-05-20 14:30:50 +0000
2925@@ -0,0 +1,11 @@
2926+include/master-slave.inc
2927+Warnings:
2928+Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
2929+Note #### Storing MySQL user name or password information in the master.info repository is not secure and is therefore not recommended. Please see the MySQL Manual for more about this issue and possible alternatives.
2930+[connection master]
2931+DROP TABLE IF EXISTS t;
2932+CREATE TABLE t(id INT,data CHAR(30));
2933+INSERT INTO t VALUES
2934+(1,"aaaaabbbbbcccccdddddeeeeefffff");
2935+DROP TABLE t;
2936+include/rpl_end.inc
2937
2938=== added file 'Percona-Server/mysql-test/r/percona_bug1008609.result'
2939--- Percona-Server/mysql-test/r/percona_bug1008609.result 1970-01-01 00:00:00 +0000
2940+++ Percona-Server/mysql-test/r/percona_bug1008609.result 2013-05-20 14:30:50 +0000
2941@@ -0,0 +1,1 @@
2942+OK
2943
2944=== added file 'Percona-Server/mysql-test/r/percona_bug1017192.result'
2945--- Percona-Server/mysql-test/r/percona_bug1017192.result 1970-01-01 00:00:00 +0000
2946+++ Percona-Server/mysql-test/r/percona_bug1017192.result 2013-05-20 14:30:50 +0000
2947@@ -0,0 +1,10 @@
2948+SET DEBUG_SYNC='reset';
2949+CREATE TABLE IF NOT EXISTS t1 (`a` INT) ENGINE=InnoDB;
2950+INSERT INTO t1 VALUES (1),(2),(3),(4);
2951+SET DEBUG_SYNC='after_copy_data_between_tables SIGNAL run_show_innodb_status
2952+ WAIT_FOR show_innodb_status_done';
2953+ALTER TABLE t1 PARTITION BY HASH (`a`) PARTITIONS 4 ;
2954+SET DEBUG_SYNC='now WAIT_FOR run_show_innodb_status';
2955+SHOW ENGINE INNODB STATUS;
2956+SET DEBUG_SYNC='now SIGNAL show_innodb_status_done';
2957+DROP TABLE t1;
2958
2959=== added file 'Percona-Server/mysql-test/r/percona_bug1035225.result'
2960--- Percona-Server/mysql-test/r/percona_bug1035225.result 1970-01-01 00:00:00 +0000
2961+++ Percona-Server/mysql-test/r/percona_bug1035225.result 2013-05-20 14:30:50 +0000
2962@@ -0,0 +1,32 @@
2963+CREATE TABLE t(
2964+id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
2965+k INT,
2966+c CHAR(1),
2967+UNIQUE KEY(k)) ENGINE=InnoDB;
2968+#
2969+# Connection 1
2970+#
2971+SET DEBUG_SYNC='ha_write_row_end SIGNAL continue2 WAIT_FOR continue1';
2972+affected rows: 0
2973+INSERT INTO t(k) VALUES (1), (2), (3) ON DUPLICATE KEY UPDATE c='1';
2974+#
2975+# Connection 2
2976+#
2977+SET DEBUG_SYNC='start_ha_write_row WAIT_FOR continue2';
2978+affected rows: 0
2979+SET DEBUG_SYNC='after_mysql_insert SIGNAL continue1';
2980+affected rows: 0
2981+INSERT INTO t(k) VALUES (2), (4), (5) ON DUPLICATE KEY UPDATE c='2';
2982+affected rows: 3
2983+info: Records: 3 Duplicates: 0 Warnings: 0
2984+affected rows: 4
2985+info: Records: 3 Duplicates: 1 Warnings: 0
2986+SET DEBUG_SYNC='RESET';
2987+SELECT * FROM t ORDER BY k;
2988+id k c
2989+1 1 NULL
2990+4 2 1
2991+2 3 NULL
2992+5 4 NULL
2993+6 5 NULL
2994+DROP TABLE t;
2995
2996=== added file 'Percona-Server/mysql-test/r/percona_bug45702.result'
2997--- Percona-Server/mysql-test/r/percona_bug45702.result 1970-01-01 00:00:00 +0000
2998+++ Percona-Server/mysql-test/r/percona_bug45702.result 2013-05-20 14:30:50 +0000
2999@@ -0,0 +1,21 @@
3000+CREATE TABLE t1 (a BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY) ENGINE=MyISAM;
3001+INSERT INTO t1 VALUES (), (), (), (), (), (), (), ();
3002+INSERT INTO t1 SELECT NULL FROM t1;
3003+INSERT INTO t1 SELECT NULL FROM t1;
3004+INSERT INTO t1 SELECT NULL FROM t1;
3005+INSERT INTO t1 SELECT NULL FROM t1;
3006+INSERT INTO t1 SELECT NULL FROM t1;
3007+INSERT INTO t1 SELECT NULL FROM t1;
3008+INSERT INTO t1 SELECT NULL FROM t1;
3009+INSERT INTO t1 SELECT NULL FROM t1;
3010+INSERT INTO t1 SELECT NULL FROM t1;
3011+SET @old_myisam_sort_buffer_size = @@myisam_sort_buffer_size;
3012+SET @@myisam_sort_buffer_size = 4 * 1024 * 1024 * 1024;
3013+REPAIR TABLE t1;
3014+Table Op Msg_type Msg_text
3015+test.t1 repair status OK
3016+- recovering (with sort) MyISAM-table 'MYSQLD_DATADIR/test/t1'
3017+Data records: 4096
3018+- Fixing index 1
3019+SET @@myisam_sort_buffer_size = @old_myisam_sort_buffer_size;
3020+DROP TABLE t1;
3021
3022=== added file 'Percona-Server/mysql-test/r/percona_bug643149.result'
3023--- Percona-Server/mysql-test/r/percona_bug643149.result 1970-01-01 00:00:00 +0000
3024+++ Percona-Server/mysql-test/r/percona_bug643149.result 2013-05-20 14:30:50 +0000
3025@@ -0,0 +1,21 @@
3026+SET @old_slow_query_log_file=@@global.slow_query_log_file;
3027+SET GLOBAL slow_query_log=on;
3028+SET LOCAL log_slow_verbosity='profiling';
3029+SET LOCAL long_query_time=0;
3030+SET GLOBAL slow_query_log_file='MYSQLTEST_VARDIR/percona_bug643149_slow.log';;
3031+SELECT 1;
3032+1
3033+1
3034+# User@Host: root[root] @ localhost [] Id: X
3035+# Schema: test Last_errno: X Killed: X
3036+# Query_time: X.X Lock_time: X.X Rows_sent: X Rows_examined: X Rows_affected: X Rows_read: X
3037+# Bytes_sent: X
3038+# Profile_starting: X.X Profile_starting_cpu: X.X Profile_Opening_tables: X.X Profile_Opening_tables_cpu: X.X Profile_query_end: X.X Profile_query_end_cpu: X.X Profile_closing_tables: X.X Profile_closing_tables_cpu: X.X Profile_freeing_items: X.X Profile_freeing_items_cpu: X.X Profile_logging_slow_query: X.X Profile_logging_slow_query_cpu: X.X
3039+# Profile_total: X.X Profile_total_cpu: X.X
3040+# User@Host: root[root] @ localhost [] Id: X
3041+# Schema: test Last_errno: X Killed: X
3042+# Query_time: X.X Lock_time: X.X Rows_sent: X Rows_examined: X Rows_affected: X Rows_read: X
3043+# Bytes_sent: X
3044+# Profile_starting: X.X Profile_starting_cpu: X.X Profile_checking_permissions: X.X Profile_checking_permissions_cpu: X.X Profile_Opening_tables: X.X Profile_Opening_tables_cpu: X.X Profile_init: X.X Profile_init_cpu: X.X Profile_optimizing: X.X Profile_optimizing_cpu: X.X Profile_executing: X.X Profile_executing_cpu: X.X Profile_end: X.X Profile_end_cpu: X.X Profile_query_end: X.X Profile_query_end_cpu: X.X Profile_closing_tables: X.X Profile_closing_tables_cpu: X.X Profile_freeing_items: X.X Profile_freeing_items_cpu: X.X Profile_logging_slow_query: X.X Profile_logging_slow_query_cpu: X.X
3045+# Profile_total: X.X Profile_total_cpu: X.X
3046+SET GLOBAL slow_query_log_file=@old_slow_query_log_file;
3047
3048=== added file 'Percona-Server/mysql-test/r/percona_bug856404.result'
3049--- Percona-Server/mysql-test/r/percona_bug856404.result 1970-01-01 00:00:00 +0000
3050+++ Percona-Server/mysql-test/r/percona_bug856404.result 2013-05-20 14:30:50 +0000
3051@@ -0,0 +1,8 @@
3052+DROP TABLE IF EXISTS table17_int;
3053+DROP TABLE IF EXISTS table30_int;
3054+CREATE TABLE `table17_int` (pk integer auto_increment primary key, `col_char_10_not_null_key` char(10), `col_enum_not_null_key` int);
3055+CREATE TABLE `table30_int` (pk integer auto_increment primary key, `col_enum_not_null_key` int);
3056+SELECT X . `pk` FROM `table17_int` AS X LEFT JOIN `table30_int` AS Y USING ( `col_enum_not_null_key` ) WHERE X . `col_char_10_not_null_key` != ' you need to translate Views labels into other languages, consider installing the <a href=\" !path\">Internationalization</a> package\'s Views translation module.' LIMIT 7 /*Generated by THREAD_ID 1*/;
3057+pk
3058+DROP TABLE table17_int;
3059+DROP TABLE table30_int;
3060
3061=== added file 'Percona-Server/mysql-test/r/percona_enforce_storage_engine.result'
3062--- Percona-Server/mysql-test/r/percona_enforce_storage_engine.result 1970-01-01 00:00:00 +0000
3063+++ Percona-Server/mysql-test/r/percona_enforce_storage_engine.result 2013-05-20 14:30:50 +0000
3064@@ -0,0 +1,36 @@
3065+drop table if exists t1;
3066+SET @old_sql_mode= @@session.sql_mode;
3067+CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=MyISAM;
3068+SHOW CREATE TABLE t1;
3069+Table Create Table
3070+t1 CREATE TABLE `t1` (
3071+ `c1` int(11) NOT NULL AUTO_INCREMENT,
3072+ `c2` varchar(10) DEFAULT NULL,
3073+ PRIMARY KEY (`c1`)
3074+) ENGINE=MyISAM DEFAULT CHARSET=latin1
3075+DROP TABLE t1;
3076+SET SESSION sql_mode='';
3077+CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
3078+Warnings:
3079+Note 1266 Using storage engine MyISAM for table 't1'
3080+SHOW CREATE TABLE t1;
3081+Table Create Table
3082+t1 CREATE TABLE `t1` (
3083+ `c1` int(11) NOT NULL AUTO_INCREMENT,
3084+ `c2` varchar(10) DEFAULT NULL,
3085+ PRIMARY KEY (`c1`)
3086+) ENGINE=MyISAM DEFAULT CHARSET=latin1
3087+DROP TABLE t1;
3088+SET SESSION sql_mode='NO_ENGINE_SUBSTITUTION';
3089+CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=MyISAM;
3090+SHOW CREATE TABLE t1;
3091+Table Create Table
3092+t1 CREATE TABLE `t1` (
3093+ `c1` int(11) NOT NULL AUTO_INCREMENT,
3094+ `c2` varchar(10) DEFAULT NULL,
3095+ PRIMARY KEY (`c1`)
3096+) ENGINE=MyISAM DEFAULT CHARSET=latin1
3097+DROP TABLE t1;
3098+CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
3099+ERROR 42000: Unknown storage engine 'InnoDB'
3100+SET SESSION sql_mode=@old_sql_mode;
3101
3102=== added file 'Percona-Server/mysql-test/r/percona_enhanced_options_modifiers.result'
3103--- Percona-Server/mysql-test/r/percona_enhanced_options_modifiers.result 1970-01-01 00:00:00 +0000
3104+++ Percona-Server/mysql-test/r/percona_enhanced_options_modifiers.result 2013-05-20 14:30:50 +0000
3105@@ -0,0 +1,142 @@
3106+SET @TEMP=@@GLOBAL.AUTO_INCREMENT_INCREMENT;
3107+SET @@GLOBAL.AUTO_INCREMENT_INCREMENT=1;
3108+SELECT @@GLOBAL.AUTO_INCREMENT_INCREMENT;
3109+@@GLOBAL.AUTO_INCREMENT_INCREMENT
3110+1
3111+SET @@GLOBAL.AUTO_INCREMENT_INCREMENT=2;
3112+SELECT @@GLOBAL.AUTO_INCREMENT_INCREMENT;
3113+@@GLOBAL.AUTO_INCREMENT_INCREMENT
3114+2
3115+SET @@GLOBAL.AUTO_INCREMENT_INCREMENT=15;
3116+SELECT @@GLOBAL.AUTO_INCREMENT_INCREMENT;
3117+@@GLOBAL.AUTO_INCREMENT_INCREMENT
3118+15
3119+SET @@GLOBAL.AUTO_INCREMENT_INCREMENT=@TEMP;
3120+SET @TEMP=@@LOCAL.AUTO_INCREMENT_INCREMENT;
3121+SET @@LOCAL.AUTO_INCREMENT_INCREMENT=1;
3122+SELECT @@LOCAL.AUTO_INCREMENT_INCREMENT;
3123+@@LOCAL.AUTO_INCREMENT_INCREMENT
3124+1
3125+SET @@LOCAL.AUTO_INCREMENT_INCREMENT=2;
3126+SELECT @@LOCAL.AUTO_INCREMENT_INCREMENT;
3127+@@LOCAL.AUTO_INCREMENT_INCREMENT
3128+2
3129+SET @@LOCAL.AUTO_INCREMENT_INCREMENT=15;
3130+SELECT @@LOCAL.AUTO_INCREMENT_INCREMENT;
3131+@@LOCAL.AUTO_INCREMENT_INCREMENT
3132+15
3133+SET @@LOCAL.AUTO_INCREMENT_INCREMENT=@TEMP;
3134+SET @@GLOBAL.AUTO_INCREMENT_OFFSET=5;
3135+SET @@LOCAL.AUTO_INCREMENT_OFFSET=5;
3136+SELECT @@GLOBAL.AUTOCOMMIT;
3137+@@GLOBAL.AUTOCOMMIT
3138+1
3139+SELECT @@LOCAL.AUTOCOMMIT;
3140+@@LOCAL.AUTOCOMMIT
3141+1
3142+SET @@GLOBAL.AUTOCOMMIT= TRUE;
3143+SET @@LOCAL.AUTOCOMMIT= TRUE;
3144+SET @TEMP=@@GLOBAL.INNODB_IO_CAPACITY;
3145+SET @@GLOBAL.INNODB_IO_CAPACITY=100;
3146+SELECT @@GLOBAL.INNODB_IO_CAPACITY;
3147+@@GLOBAL.INNODB_IO_CAPACITY
3148+100
3149+SET @@GLOBAL.INNODB_IO_CAPACITY=300;
3150+SELECT @@GLOBAL.INNODB_IO_CAPACITY;
3151+@@GLOBAL.INNODB_IO_CAPACITY
3152+300
3153+SET @@GLOBAL.INNODB_IO_CAPACITY=160;
3154+SELECT @@GLOBAL.INNODB_IO_CAPACITY;
3155+@@GLOBAL.INNODB_IO_CAPACITY
3156+160
3157+SET @@GLOBAL.INNODB_IO_CAPACITY=@TEMP;
3158+SET @@GLOBAL.INNODB_SPIN_WAIT_DELAY=10;
3159+SET @@GLOBAL.INNODB_READ_AHEAD_THRESHOLD=32;
3160+SET @TEMP=@@GLOBAL.AUTO_INCREMENT_INCREMENT;
3161+SET @@GLOBAL.AUTO_INCREMENT_INCREMENT=1;
3162+Warnings:
3163+Warning 1292 Truncated incorrect auto_increment_increment value: '1'
3164+SELECT @@GLOBAL.AUTO_INCREMENT_INCREMENT;
3165+@@GLOBAL.AUTO_INCREMENT_INCREMENT
3166+5
3167+SET @@GLOBAL.AUTO_INCREMENT_INCREMENT=2;
3168+Warnings:
3169+Warning 1292 Truncated incorrect auto_increment_increment value: '2'
3170+SELECT @@GLOBAL.AUTO_INCREMENT_INCREMENT;
3171+@@GLOBAL.AUTO_INCREMENT_INCREMENT
3172+5
3173+SET @@GLOBAL.AUTO_INCREMENT_INCREMENT=15;
3174+Warnings:
3175+Warning 1292 Truncated incorrect auto_increment_increment value: '15'
3176+SELECT @@GLOBAL.AUTO_INCREMENT_INCREMENT;
3177+@@GLOBAL.AUTO_INCREMENT_INCREMENT
3178+10
3179+SET @@GLOBAL.AUTO_INCREMENT_INCREMENT=@TEMP;
3180+SET @TEMP=@@LOCAL.AUTO_INCREMENT_INCREMENT;
3181+SET @@LOCAL.AUTO_INCREMENT_INCREMENT=1;
3182+Warnings:
3183+Warning 1292 Truncated incorrect auto_increment_increment value: '1'
3184+SELECT @@LOCAL.AUTO_INCREMENT_INCREMENT;
3185+@@LOCAL.AUTO_INCREMENT_INCREMENT
3186+5
3187+SET @@LOCAL.AUTO_INCREMENT_INCREMENT=2;
3188+Warnings:
3189+Warning 1292 Truncated incorrect auto_increment_increment value: '2'
3190+SELECT @@LOCAL.AUTO_INCREMENT_INCREMENT;
3191+@@LOCAL.AUTO_INCREMENT_INCREMENT
3192+5
3193+SET @@LOCAL.AUTO_INCREMENT_INCREMENT=15;
3194+Warnings:
3195+Warning 1292 Truncated incorrect auto_increment_increment value: '15'
3196+SELECT @@LOCAL.AUTO_INCREMENT_INCREMENT;
3197+@@LOCAL.AUTO_INCREMENT_INCREMENT
3198+10
3199+SET @@LOCAL.AUTO_INCREMENT_INCREMENT=@TEMP;
3200+SET @@GLOBAL.AUTO_INCREMENT_OFFSET=5;
3201+ERROR HY000: Variable 'auto_increment_offset' is a read only variable
3202+SET @@LOCAL.AUTO_INCREMENT_OFFSET=5;
3203+ERROR HY000: Variable 'auto_increment_offset' is a read only variable
3204+SELECT @@GLOBAL.AUTOCOMMIT;
3205+ERROR HY000: Unknown system variable 'AUTOCOMMIT'
3206+SELECT @@LOCAL.AUTOCOMMIT;
3207+ERROR HY000: Unknown system variable 'AUTOCOMMIT'
3208+SET @@GLOBAL.AUTOCOMMIT= TRUE;
3209+ERROR HY000: Unknown system variable 'AUTOCOMMIT'
3210+SET @@LOCAL.AUTOCOMMIT= TRUE;
3211+ERROR HY000: Unknown system variable 'AUTOCOMMIT'
3212+SET @TEMP=@@GLOBAL.INNODB_IO_CAPACITY;
3213+SET @@GLOBAL.INNODB_IO_CAPACITY=100;
3214+Warnings:
3215+Warning 1292 Truncated incorrect innodb_io_capacity value: '100'
3216+SELECT @@GLOBAL.INNODB_IO_CAPACITY;
3217+@@GLOBAL.INNODB_IO_CAPACITY
3218+150
3219+SET @@GLOBAL.INNODB_IO_CAPACITY=300;
3220+SELECT @@GLOBAL.INNODB_IO_CAPACITY;
3221+@@GLOBAL.INNODB_IO_CAPACITY
3222+300
3223+SET @@GLOBAL.INNODB_IO_CAPACITY=160;
3224+SELECT @@GLOBAL.INNODB_IO_CAPACITY;
3225+@@GLOBAL.INNODB_IO_CAPACITY
3226+160
3227+SET @@GLOBAL.INNODB_IO_CAPACITY=@TEMP;
3228+SET @@GLOBAL.INNODB_SPIN_WAIT_DELAY=10;
3229+ERROR HY000: Variable 'innodb_spin_wait_delay' is a read only variable
3230+SET @@GLOBAL.INNODB_READ_AHEAD_THRESHOLD=32;
3231+ERROR HY000: Unknown system variable 'INNODB_READ_AHEAD_THRESHOLD'
3232+SET @@GLOBAL.AUTO_INCREMENT_OFFSET=5;
3233+ERROR HY000: Variable 'auto_increment_offset' is a read only variable
3234+SET @@LOCAL.AUTO_INCREMENT_OFFSET=5;
3235+ERROR HY000: Variable 'auto_increment_offset' is a read only variable
3236+SELECT @@GLOBAL.AUTOCOMMIT;
3237+ERROR HY000: Unknown system variable 'AUTOCOMMIT'
3238+SELECT @@LOCAL.AUTOCOMMIT;
3239+ERROR HY000: Unknown system variable 'AUTOCOMMIT'
3240+SET @@GLOBAL.AUTOCOMMIT= TRUE;
3241+ERROR HY000: Unknown system variable 'AUTOCOMMIT'
3242+SET @@LOCAL.AUTOCOMMIT= TRUE;
3243+ERROR HY000: Unknown system variable 'AUTOCOMMIT'
3244+SET @@GLOBAL.INNODB_SPIN_WAIT_DELAY=10;
3245+ERROR HY000: Variable 'innodb_spin_wait_delay' is a read only variable
3246+SET @@GLOBAL.INNODB_READ_AHEAD_THRESHOLD=72;
3247+ERROR HY000: Unknown system variable 'INNODB_READ_AHEAD_THRESHOLD'
3248
3249=== modified file 'Percona-Server/mysql-test/r/percona_expand_fast_index_creation.result'
3250--- Percona-Server/mysql-test/r/percona_expand_fast_index_creation.result 2013-01-25 11:46:09 +0000
3251+++ Percona-Server/mysql-test/r/percona_expand_fast_index_creation.result 2013-05-20 14:30:50 +0000
3252@@ -76,3 +76,67 @@
3253 10
3254 DROP TABLE idx;
3255 DROP TABLE t;
3256+CREATE TABLE t1(
3257+id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
3258+a CHAR(1) NOT NULL,
3259+b CHAR(36) NOT NULL) ENGINE=InnoDB;
3260+INSERT INTO t1(a,b) VALUES ('a','b');
3261+INSERT INTO t1(a,b) SELECT a,b FROM t1;
3262+INSERT INTO t1(a,b) SELECT a,b FROM t1;
3263+INSERT INTO t1(a,b) SELECT a,b FROM t1;
3264+INSERT INTO t1(a,b) SELECT a,b FROM t1;
3265+ALTER TABLE t1 ADD KEY (a);
3266+affected rows: 0
3267+info: Records: 0 Duplicates: 0 Warnings: 0
3268+EXPLAIN SELECT COUNT(*) FROM t1, t1 t2 WHERE t1.a = t2.a AND t1.b = t2.b;
3269+id 1
3270+select_type SIMPLE
3271+table t1
3272+type ALL
3273+possible_keys a
3274+key NULL
3275+key_len NULL
3276+ref NULL
3277+rows 16
3278+Extra NULL
3279+id 1
3280+select_type SIMPLE
3281+table t2
3282+type ALL
3283+possible_keys a
3284+key NULL
3285+key_len NULL
3286+ref NULL
3287+rows 16
3288+Extra Using where; Using join buffer (Block Nested Loop)
3289+ALTER TABLE t1 DROP KEY a;
3290+SET expand_fast_index_creation = 1;
3291+SELECT @@expand_fast_index_creation;
3292+@@expand_fast_index_creation
3293+1
3294+ALTER TABLE t1 ADD KEY (a);
3295+affected rows: 0
3296+info: Records: 0 Duplicates: 0 Warnings: 0
3297+EXPLAIN SELECT COUNT(*) FROM t1, t1 t2 WHERE t1.a = t2.a AND t1.b = t2.b;
3298+id 1
3299+select_type SIMPLE
3300+table t1
3301+type ALL
3302+possible_keys a
3303+key NULL
3304+key_len NULL
3305+ref NULL
3306+rows 16
3307+Extra NULL
3308+id 1
3309+select_type SIMPLE
3310+table t2
3311+type ALL
3312+possible_keys a
3313+key NULL
3314+key_len NULL
3315+ref NULL
3316+rows 16
3317+Extra Using where; Using join buffer (Block Nested Loop)
3318+SET expand_fast_index_creation = 0;
3319+DROP TABLE t1;
3320
3321=== added file 'Percona-Server/mysql-test/r/percona_heap_blob.result'
3322--- Percona-Server/mysql-test/r/percona_heap_blob.result 1970-01-01 00:00:00 +0000
3323+++ Percona-Server/mysql-test/r/percona_heap_blob.result 2013-05-20 14:30:50 +0000
3324@@ -0,0 +1,918 @@
3325+SET @old_default_storage_engine=@@default_storage_engine;
3326+SET default_storage_engine=MEMORY;
3327+drop table if exists t1,t2,t3,t4,t5,t6,t7;
3328+CREATE TABLE t1 (a blob, b text, c blob(250), d text(70000), e text(70000000));
3329+show columns from t1;
3330+Field Type Null Key Default Extra
3331+a blob YES NULL
3332+b text YES NULL
3333+c tinyblob YES NULL
3334+d mediumtext YES NULL
3335+e longtext YES NULL
3336+CREATE TABLE t2 (a char(255), b varbinary(70000), c varchar(70000000));
3337+Warnings:
3338+Note 1246 Converting column 'b' from VARBINARY to BLOB
3339+Note 1246 Converting column 'c' from VARCHAR to TEXT
3340+CREATE TABLE t4 (c varchar(65530) character set utf8 not null);
3341+Warnings:
3342+Note 1246 Converting column 'c' from VARCHAR to TEXT
3343+show columns from t2;
3344+Field Type Null Key Default Extra
3345+a char(255) YES NULL
3346+b mediumblob YES NULL
3347+c longtext YES NULL
3348+create table t3 (a long, b long byte);
3349+show create TABLE t3;
3350+Table Create Table
3351+t3 CREATE TABLE `t3` (
3352+ `a` mediumtext,
3353+ `b` mediumblob
3354+) ENGINE=MEMORY DEFAULT CHARSET=latin1
3355+show create TABLE t4;
3356+Table Create Table
3357+t4 CREATE TABLE `t4` (
3358+ `c` mediumtext CHARACTER SET utf8 NOT NULL
3359+) ENGINE=MEMORY DEFAULT CHARSET=latin1
3360+drop table t1,t2,t3,t4;
3361+CREATE TABLE t1 (a char(257) default "hello");
3362+ERROR 42000: Column length too big for column 'a' (max = 255); use BLOB or TEXT instead
3363+CREATE TABLE t2 (a char(256));
3364+ERROR 42000: Column length too big for column 'a' (max = 255); use BLOB or TEXT instead
3365+CREATE TABLE t1 (a varchar(70000) default "hello");
3366+ERROR 42000: Column length too big for column 'a' (max = 65535); use BLOB or TEXT instead
3367+CREATE TABLE t2 (a blob default "hello");
3368+ERROR 42000: BLOB/TEXT column 'a' can't have a default value
3369+drop table if exists t1,t2;
3370+create table t1 (nr int(5) not null auto_increment,b blob,str char(10), primary key (nr));
3371+insert into t1 values (null,"a","A");
3372+insert into t1 values (null,"bbb","BBB");
3373+insert into t1 values (null,"ccc","CCC");
3374+select last_insert_id();
3375+last_insert_id()
3376+3
3377+select * from t1,t1 as t2;
3378+nr b str nr b str
3379+1 a A 1 a A
3380+2 bbb BBB 1 a A
3381+3 ccc CCC 1 a A
3382+1 a A 2 bbb BBB
3383+2 bbb BBB 2 bbb BBB
3384+3 ccc CCC 2 bbb BBB
3385+1 a A 3 ccc CCC
3386+2 bbb BBB 3 ccc CCC
3387+3 ccc CCC 3 ccc CCC
3388+drop table t1;
3389+create table t1 (a text);
3390+insert into t1 values ('where');
3391+update t1 set a='Where';
3392+select * from t1;
3393+a
3394+Where
3395+drop table t1;
3396+create table t1 (t text,c char(10),b blob, d varbinary(10)) collate latin1_general_cs;
3397+insert into t1 values (NULL,NULL,NULL,NULL);
3398+insert into t1 values ("","","","");
3399+insert into t1 values ("hello","hello","hello","hello");
3400+insert into t1 values ("HELLO","HELLO","HELLO","HELLO");
3401+insert into t1 values ("HELLO MY","HELLO MY","HELLO MY","HELLO MY");
3402+insert into t1 values ("a","a","a","a");
3403+insert into t1 values (1,1,1,1);
3404+insert into t1 values (NULL,NULL,NULL,NULL);
3405+update t1 set c="",b=null where c="1";
3406+lock tables t1 READ;
3407+show full fields from t1;
3408+Field Type Collation Null Key Default Extra Privileges Comment
3409+t text latin1_general_cs YES NULL #
3410+c char(10) latin1_general_cs YES NULL #
3411+b blob NULL YES NULL #
3412+d varbinary(10) NULL YES NULL #
3413+lock tables t1 WRITE;
3414+show full fields from t1;
3415+Field Type Collation Null Key Default Extra Privileges Comment
3416+t text latin1_general_cs YES NULL #
3417+c char(10) latin1_general_cs YES NULL #
3418+b blob NULL YES NULL #
3419+d varbinary(10) NULL YES NULL #
3420+unlock tables;
3421+select t from t1 where t like "hello";
3422+t
3423+hello
3424+select c from t1 where c like "hello";
3425+c
3426+hello
3427+select b from t1 where b like "hello";
3428+b
3429+hello
3430+select d from t1 where d like "hello";
3431+d
3432+hello
3433+select c from t1 having c like "hello";
3434+c
3435+hello
3436+select d from t1 having d like "hello";
3437+d
3438+hello
3439+select t from t1 where t like "%HELLO%";
3440+t
3441+HELLO
3442+HELLO MY
3443+select c from t1 where c like "%HELLO%";
3444+c
3445+HELLO
3446+HELLO MY
3447+select b from t1 where b like "%HELLO%";
3448+b
3449+HELLO
3450+HELLO MY
3451+select d from t1 where d like "%HELLO%";
3452+d
3453+HELLO
3454+HELLO MY
3455+select c from t1 having c like "%HELLO%";
3456+c
3457+HELLO
3458+HELLO MY
3459+select d from t1 having d like "%HELLO%";
3460+d
3461+HELLO
3462+HELLO MY
3463+select d from t1 having d like "%HE%LLO%";
3464+d
3465+HELLO
3466+HELLO MY
3467+select t from t1 order by t;
3468+t
3469+NULL
3470+NULL
3471+
3472+1
3473+a
3474+HELLO
3475+HELLO MY
3476+hello
3477+select c from t1 order by c;
3478+c
3479+NULL
3480+NULL
3481+
3482+
3483+a
3484+HELLO
3485+HELLO MY
3486+hello
3487+select b from t1 order by b;
3488+b
3489+NULL
3490+NULL
3491+NULL
3492+
3493+HELLO
3494+HELLO MY
3495+a
3496+hello
3497+select d from t1 order by d;
3498+d
3499+NULL
3500+NULL
3501+
3502+1
3503+HELLO
3504+HELLO MY
3505+a
3506+hello
3507+select distinct t from t1;
3508+t
3509+NULL
3510+
3511+hello
3512+HELLO
3513+HELLO MY
3514+a
3515+1
3516+select distinct b from t1;
3517+b
3518+NULL
3519+
3520+hello
3521+HELLO
3522+HELLO MY
3523+a
3524+select distinct t from t1 order by t;
3525+t
3526+NULL
3527+
3528+1
3529+a
3530+HELLO
3531+HELLO MY
3532+hello
3533+select distinct b from t1 order by b;
3534+b
3535+NULL
3536+
3537+HELLO
3538+HELLO MY
3539+a
3540+hello
3541+select t from t1 group by t;
3542+t
3543+NULL
3544+
3545+1
3546+a
3547+HELLO
3548+HELLO MY
3549+hello
3550+select b from t1 group by b;
3551+b
3552+NULL
3553+
3554+HELLO
3555+HELLO MY
3556+a
3557+hello
3558+select distinct c from t1;
3559+c
3560+NULL
3561+
3562+hello
3563+HELLO
3564+HELLO MY
3565+a
3566+select distinct d from t1;
3567+d
3568+NULL
3569+
3570+hello
3571+HELLO
3572+HELLO MY
3573+a
3574+1
3575+select distinct c from t1 order by c;
3576+c
3577+NULL
3578+
3579+a
3580+HELLO
3581+HELLO MY
3582+hello
3583+select distinct d from t1 order by d;
3584+d
3585+NULL
3586+
3587+1
3588+HELLO
3589+HELLO MY
3590+a
3591+hello
3592+select c from t1 group by c;
3593+c
3594+NULL
3595+
3596+a
3597+HELLO
3598+HELLO MY
3599+hello
3600+select d from t1 group by d;
3601+d
3602+NULL
3603+
3604+1
3605+HELLO
3606+HELLO MY
3607+a
3608+hello
3609+select distinct * from t1;
3610+t c b d
3611+NULL NULL NULL NULL
3612+
3613+hello hello hello hello
3614+HELLO HELLO HELLO HELLO
3615+HELLO MY HELLO MY HELLO MY HELLO MY
3616+a a a a
3617+1 NULL 1
3618+select t,count(*) from t1 group by t;
3619+t count(*)
3620+NULL 2
3621+ 1
3622+1 1
3623+a 1
3624+HELLO 1
3625+HELLO MY 1
3626+hello 1
3627+select b,count(*) from t1 group by b;
3628+b count(*)
3629+NULL 3
3630+ 1
3631+HELLO 1
3632+HELLO MY 1
3633+a 1
3634+hello 1
3635+select c,count(*) from t1 group by c;
3636+c count(*)
3637+NULL 2
3638+ 2
3639+a 1
3640+HELLO 1
3641+HELLO MY 1
3642+hello 1
3643+select d,count(*) from t1 group by d;
3644+d count(*)
3645+NULL 2
3646+ 1
3647+1 1
3648+HELLO 1
3649+HELLO MY 1
3650+a 1
3651+hello 1
3652+drop table t1;
3653+CREATE TABLE t1 (
3654+t1_id bigint(21) NOT NULL auto_increment,
3655+_field_72 varchar(128) DEFAULT '' NOT NULL,
3656+_field_95 varchar(32),
3657+_field_115 tinyint(4) DEFAULT '0' NOT NULL,
3658+_field_122 tinyint(4) DEFAULT '0' NOT NULL,
3659+_field_126 tinyint(4),
3660+_field_134 tinyint(4),
3661+PRIMARY KEY (t1_id),
3662+UNIQUE _field_72 (_field_72),
3663+KEY _field_115 (_field_115),
3664+KEY _field_122 (_field_122)
3665+);
3666+INSERT INTO t1 VALUES (1,'admin','21232f297a57a5a743894a0e4a801fc3',0,1,NULL,NULL);
3667+INSERT INTO t1 VALUES (2,'hroberts','7415275a8c95952901e42b13a6b78566',0,1,NULL,NULL);
3668+INSERT INTO t1 VALUES (3,'guest','d41d8cd98f00b204e9800998ecf8427e',1,0,NULL,NULL);
3669+CREATE TABLE t2 (
3670+seq_0_id bigint(21) DEFAULT '0' NOT NULL,
3671+seq_1_id bigint(21) DEFAULT '0' NOT NULL,
3672+PRIMARY KEY (seq_0_id,seq_1_id)
3673+);
3674+INSERT INTO t2 VALUES (1,1);
3675+INSERT INTO t2 VALUES (2,1);
3676+INSERT INTO t2 VALUES (2,2);
3677+CREATE TABLE t3 (
3678+t3_id bigint(21) NOT NULL auto_increment,
3679+_field_131 varchar(128),
3680+_field_133 tinyint(4) DEFAULT '0' NOT NULL,
3681+_field_135 datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
3682+_field_137 tinyint(4),
3683+_field_139 datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
3684+_field_140 blob,
3685+_field_142 tinyint(4) DEFAULT '0' NOT NULL,
3686+_field_145 tinyint(4) DEFAULT '0' NOT NULL,
3687+_field_148 tinyint(4) DEFAULT '0' NOT NULL,
3688+PRIMARY KEY (t3_id),
3689+KEY _field_133 (_field_133),
3690+KEY _field_135 (_field_135),
3691+KEY _field_139 (_field_139),
3692+KEY _field_142 (_field_142),
3693+KEY _field_145 (_field_145),
3694+KEY _field_148 (_field_148)
3695+);
3696+INSERT INTO t3 VALUES (1,'test job 1',0,'0000-00-00 00:00:00',0,'1999-02-25 22:43:32','test\r\njob\r\n1',0,0,0);
3697+INSERT INTO t3 VALUES (2,'test job 2',0,'0000-00-00 00:00:00',0,'1999-02-26 21:08:04','',0,0,0);
3698+CREATE TABLE t4 (
3699+seq_0_id bigint(21) DEFAULT '0' NOT NULL,
3700+seq_1_id bigint(21) DEFAULT '0' NOT NULL,
3701+PRIMARY KEY (seq_0_id,seq_1_id)
3702+);
3703+INSERT INTO t4 VALUES (1,1);
3704+INSERT INTO t4 VALUES (2,1);
3705+CREATE TABLE t5 (
3706+t5_id bigint(21) NOT NULL auto_increment,
3707+_field_149 tinyint(4),
3708+_field_156 varchar(128) DEFAULT '' NOT NULL,
3709+_field_157 varchar(128) DEFAULT '' NOT NULL,
3710+_field_158 varchar(128) DEFAULT '' NOT NULL,
3711+_field_159 varchar(128) DEFAULT '' NOT NULL,
3712+_field_160 varchar(128) DEFAULT '' NOT NULL,
3713+_field_161 varchar(128) DEFAULT '' NOT NULL,
3714+PRIMARY KEY (t5_id),
3715+KEY _field_156 (_field_156),
3716+KEY _field_157 (_field_157),
3717+KEY _field_158 (_field_158),
3718+KEY _field_159 (_field_159),
3719+KEY _field_160 (_field_160),
3720+KEY _field_161 (_field_161)
3721+);
3722+INSERT INTO t5 VALUES (1,0,'tomato','','','','','');
3723+INSERT INTO t5 VALUES (2,0,'cilantro','','','','','');
3724+CREATE TABLE t6 (
3725+seq_0_id bigint(21) DEFAULT '0' NOT NULL,
3726+seq_1_id bigint(21) DEFAULT '0' NOT NULL,
3727+PRIMARY KEY (seq_0_id,seq_1_id)
3728+);
3729+INSERT INTO t6 VALUES (1,1);
3730+INSERT INTO t6 VALUES (1,2);
3731+INSERT INTO t6 VALUES (2,2);
3732+CREATE TABLE t7 (
3733+t7_id bigint(21) NOT NULL auto_increment,
3734+_field_143 tinyint(4),
3735+_field_165 varchar(32),
3736+_field_166 smallint(6) DEFAULT '0' NOT NULL,
3737+PRIMARY KEY (t7_id),
3738+KEY _field_166 (_field_166)
3739+);
3740+INSERT INTO t7 VALUES (1,0,'High',1);
3741+INSERT INTO t7 VALUES (2,0,'Medium',2);
3742+INSERT INTO t7 VALUES (3,0,'Low',3);
3743+select replace(t3._field_140, "\r","^M"),t3_id,min(t3._field_131), min(t3._field_135), min(t3._field_139), min(t3._field_137), min(link_alias_142._field_165), min(link_alias_133._field_72), min(t3._field_145), min(link_alias_148._field_156), replace(min(t3._field_140), "\r","^M"),t3.t3_id from t3 left join t4 on t4.seq_0_id = t3.t3_id left join t7 link_alias_142 on t4.seq_1_id = link_alias_142.t7_id left join t6 on t6.seq_0_id = t3.t3_id left join t1 link_alias_133 on t6.seq_1_id = link_alias_133.t1_id left join t2 on t2.seq_0_id = t3.t3_id left join t5 link_alias_148 on t2.seq_1_id = link_alias_148.t5_id where t3.t3_id in (1) group by t3.t3_id order by link_alias_142._field_166, _field_139, link_alias_133._field_72, _field_135, link_alias_148._field_156;
3744+replace(t3._field_140, "\r","^M") t3_id min(t3._field_131) min(t3._field_135) min(t3._field_139) min(t3._field_137) min(link_alias_142._field_165) min(link_alias_133._field_72) min(t3._field_145) min(link_alias_148._field_156) replace(min(t3._field_140), "\r","^M") t3_id
3745+test^M
3746+job^M
3747+1 1 test job 1 0000-00-00 00:00:00 1999-02-25 22:43:32 0 High admin 0 tomato test^M
3748+job^M
3749+1 1
3750+drop table t1,t2,t3,t4,t5,t6,t7;
3751+create table t1 (a blob);
3752+insert into t1 values ("empty"),("");
3753+select a,reverse(a) from t1;
3754+a reverse(a)
3755+empty ytpme
3756+
3757+drop table t1;
3758+create table t1 (id integer auto_increment unique,imagem LONGBLOB not null default '');
3759+Warnings:
3760+Warning 1101 BLOB/TEXT column 'imagem' can't have a default value
3761+insert into t1 (id) values (1);
3762+select
3763+charset(load_file('../../std_data/words.dat')),
3764+collation(load_file('../../std_data/words.dat')),
3765+coercibility(load_file('../../std_data/words.dat'));
3766+charset(load_file('../../std_data/words.dat')) collation(load_file('../../std_data/words.dat')) coercibility(load_file('../../std_data/words.dat'))
3767+binary binary 4
3768+explain extended select
3769+charset(load_file('MYSQLTEST_VARDIR/std_data/words.dat')),
3770+collation(load_file('MYSQLTEST_VARDIR/std_data/words.dat')),
3771+coercibility(load_file('MYSQLTEST_VARDIR/std_data/words.dat'));
3772+id select_type table type possible_keys key key_len ref rows filtered Extra
3773+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
3774+Warnings:
3775+Note 1003 /* select#1 */ select charset(load_file('MYSQLTEST_VARDIR/std_data/words.dat')) AS `charset(load_file('MYSQLTEST_VARDIR/std_data/words.dat'))`,collation(load_file('MYSQLTEST_VARDIR/std_data/words.dat')) AS `collation(load_file('MYSQLTEST_VARDIR/std_data/words.dat'))`,coercibility(load_file('MYSQLTEST_VARDIR/std_data/words.dat')) AS `coercibility(load_file('MYSQLTEST_VARDIR/std_data/words.dat'))`
3776+update t1 set imagem=load_file('MYSQLTEST_VARDIR/std_data/words.dat') where id=1;
3777+select if(imagem is null, "ERROR", "OK"),length(imagem) from t1 where id = 1;
3778+if(imagem is null, "ERROR", "OK") length(imagem)
3779+OK 581
3780+drop table t1;
3781+create table t1 select load_file('MYSQLTEST_VARDIR/std_data/words.dat') l;
3782+show full fields from t1;
3783+Field Type Collation Null Key Default Extra Privileges Comment
3784+l longblob NULL YES NULL #
3785+drop table t1;
3786+create table t1 (id integer primary key auto_increment, txt text not null);
3787+insert into t1 (txt) values ('Chevy ');
3788+select * from t1 where txt='Chevy';
3789+id txt
3790+1 Chevy
3791+select * from t1 where txt='Chevy ';
3792+id txt
3793+1 Chevy
3794+select * from t1 where txt='Chevy ' or txt='Chevy';
3795+id txt
3796+1 Chevy
3797+select * from t1 where txt='Chevy' or txt='Chevy ';
3798+id txt
3799+1 Chevy
3800+select * from t1 where id='1' or id='2';
3801+id txt
3802+1 Chevy
3803+insert into t1 (txt) values('Ford');
3804+select * from t1 where txt='Chevy' or txt='Chevy ' or txt='Ford';
3805+id txt
3806+1 Chevy
3807+2 Ford
3808+select * from t1 where txt='Chevy' or txt='Chevy ';
3809+id txt
3810+1 Chevy
3811+select * from t1 where txt='Chevy' or txt='Chevy ' or txt=' Chevy';
3812+id txt
3813+1 Chevy
3814+select * from t1 where txt in ('Chevy ','Chevy');
3815+id txt
3816+1 Chevy
3817+select * from t1 where txt in ('Chevy');
3818+id txt
3819+1 Chevy
3820+select * from t1 where txt between 'Chevy' and 'Chevy';
3821+id txt
3822+1 Chevy
3823+select * from t1 where txt between 'Chevy' and 'Chevy' or txt='Chevy ';
3824+id txt
3825+1 Chevy
3826+select * from t1 where txt between 'Chevy' and 'Chevy ';
3827+id txt
3828+1 Chevy
3829+select * from t1 where txt < 'Chevy ';
3830+id txt
3831+select * from t1 where txt <= 'Chevy';
3832+id txt
3833+1 Chevy
3834+select * from t1 where txt > 'Chevy';
3835+id txt
3836+2 Ford
3837+select * from t1 where txt >= 'Chevy';
3838+id txt
3839+1 Chevy
3840+2 Ford
3841+drop table t1;
3842+create table t1 (id integer primary key auto_increment, txt text);
3843+insert into t1 (txt) values ('Chevy'), ('Chevy '), (NULL);
3844+select * from t1 where txt='Chevy' or txt is NULL;
3845+id txt
3846+1 Chevy
3847+2 Chevy
3848+3 NULL
3849+explain select * from t1 where txt='Chevy' or txt is NULL;
3850+id select_type table type possible_keys key key_len ref rows Extra
3851+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using where
3852+select * from t1 where txt='Chevy ';
3853+id txt
3854+1 Chevy
3855+2 Chevy
3856+select * from t1 where txt='Chevy ' or txt='Chevy';
3857+id txt
3858+1 Chevy
3859+2 Chevy
3860+select * from t1 where txt='Chevy' or txt='Chevy ';
3861+id txt
3862+1 Chevy
3863+2 Chevy
3864+select * from t1 where id='1' or id='2';
3865+id txt
3866+1 Chevy
3867+2 Chevy
3868+insert into t1 (txt) values('Ford');
3869+select * from t1 where txt='Chevy' or txt='Chevy ' or txt='Ford';
3870+id txt
3871+1 Chevy
3872+2 Chevy
3873+4 Ford
3874+select * from t1 where txt='Chevy' or txt='Chevy ';
3875+id txt
3876+1 Chevy
3877+2 Chevy
3878+select * from t1 where txt='Chevy' or txt='Chevy ' or txt=' Chevy';
3879+id txt
3880+1 Chevy
3881+2 Chevy
3882+select * from t1 where txt in ('Chevy ','Chevy');
3883+id txt
3884+1 Chevy
3885+2 Chevy
3886+select * from t1 where txt in ('Chevy');
3887+id txt
3888+1 Chevy
3889+2 Chevy
3890+select * from t1 where txt between 'Chevy' and 'Chevy';
3891+id txt
3892+1 Chevy
3893+2 Chevy
3894+select * from t1 where txt between 'Chevy' and 'Chevy' or txt='Chevy ';
3895+id txt
3896+1 Chevy
3897+2 Chevy
3898+select * from t1 where txt between 'Chevy' and 'Chevy ';
3899+id txt
3900+1 Chevy
3901+2 Chevy
3902+select * from t1 where txt < 'Chevy ';
3903+id txt
3904+select * from t1 where txt < 'Chevy ' or txt is NULL;
3905+id txt
3906+3 NULL
3907+select * from t1 where txt <= 'Chevy';
3908+id txt
3909+1 Chevy
3910+2 Chevy
3911+select * from t1 where txt > 'Chevy';
3912+id txt
3913+4 Ford
3914+select * from t1 where txt >= 'Chevy';
3915+id txt
3916+1 Chevy
3917+2 Chevy
3918+4 Ford
3919+alter table t1 modify column txt blob;
3920+explain select * from t1 where txt='Chevy' or txt is NULL;
3921+id select_type table type possible_keys key key_len ref rows Extra
3922+1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using where
3923+select * from t1 where txt='Chevy' or txt is NULL;
3924+id txt
3925+1 Chevy
3926+3 NULL
3927+explain select * from t1 where txt='Chevy' or txt is NULL order by txt;
3928+id select_type table type possible_keys key key_len ref rows Extra
3929+1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using where; Using filesort
3930+select * from t1 where txt='Chevy' or txt is NULL order by txt;
3931+id txt
3932+3 NULL
3933+1 Chevy
3934+drop table t1;
3935+CREATE TABLE t1 ( i int(11) NOT NULL default '0', c text NOT NULL, d varchar(1) NOT NULL DEFAULT ' ', PRIMARY KEY (i));
3936+INSERT t1 (i, c) VALUES (1,''),(2,''),(3,'asdfh'),(4,'');
3937+select max(i) from t1 where c = '';
3938+max(i)
3939+4
3940+drop table t1;
3941+CREATE table t1 (a blob);
3942+insert into t1 values ('b'),('a\0'),('a'),('a '),('aa'),(NULL);
3943+select hex(a) from t1 order by a;
3944+hex(a)
3945+NULL
3946+61
3947+6100
3948+6120
3949+6161
3950+62
3951+select hex(concat(a,'\0')) as b from t1 order by concat(a,'\0');
3952+b
3953+NULL
3954+6100
3955+610000
3956+612000
3957+616100
3958+6200
3959+alter table t1 modify a varbinary(5);
3960+select hex(a) from t1 order by a;
3961+hex(a)
3962+NULL
3963+61
3964+6100
3965+6120
3966+6161
3967+62
3968+select hex(concat(a,'\0')) as b from t1 order by concat(a,'\0');
3969+b
3970+NULL
3971+6100
3972+610000
3973+612000
3974+616100
3975+6200
3976+alter table t1 modify a char(5);
3977+select hex(a) from t1 order by a;
3978+hex(a)
3979+NULL
3980+6100
3981+61
3982+61
3983+6161
3984+62
3985+select hex(concat(a,'\0')) as b from t1 order by concat(a,'\0');
3986+b
3987+NULL
3988+610000
3989+6100
3990+6100
3991+616100
3992+6200
3993+alter table t1 modify a binary(5);
3994+select hex(a) from t1 order by a;
3995+hex(a)
3996+NULL
3997+6100000000
3998+6100000000
3999+6100000000
4000+6161000000
4001+6200000000
4002+select hex(concat(a,'\0')) as b from t1 order by concat(a,'\0');
4003+b
4004+NULL
4005+610000000000
4006+610000000000
4007+610000000000
4008+616100000000
4009+620000000000
4010+drop table t1;
4011+create table t1 (a text default '');
4012+Warnings:
4013+Warning 1101 BLOB/TEXT column 'a' can't have a default value
4014+show create table t1;
4015+Table Create Table
4016+t1 CREATE TABLE `t1` (
4017+ `a` text
4018+) ENGINE=MEMORY DEFAULT CHARSET=latin1
4019+insert into t1 values (default);
4020+select * from t1;
4021+a
4022+NULL
4023+drop table t1;
4024+set @@sql_mode='TRADITIONAL';
4025+create table t1 (a text default '');
4026+ERROR 42000: BLOB/TEXT column 'a' can't have a default value
4027+set @@sql_mode='';
4028+CREATE TABLE t (c TEXT CHARSET ASCII);
4029+INSERT INTO t (c) VALUES (REPEAT('1',65537));
4030+Warnings:
4031+Warning 1265 Data truncated for column 'c' at row 1
4032+INSERT INTO t (c) VALUES (REPEAT('2',65536));
4033+Warnings:
4034+Warning 1265 Data truncated for column 'c' at row 1
4035+INSERT INTO t (c) VALUES (REPEAT('3',65535));
4036+SELECT LENGTH(c), CHAR_LENGTH(c) FROM t;
4037+LENGTH(c) CHAR_LENGTH(c)
4038+65535 65535
4039+65535 65535
4040+65535 65535
4041+DROP TABLE t;
4042+drop table if exists b15776;
4043+create table b15776 (data blob(2147483647));
4044+drop table b15776;
4045+create table b15776 (data blob(-1));
4046+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-1))' at line 1
4047+create table b15776 (data blob(2147483648));
4048+drop table b15776;
4049+create table b15776 (data blob(4294967294));
4050+drop table b15776;
4051+create table b15776 (data blob(4294967295));
4052+drop table b15776;
4053+create table b15776 (data blob(4294967296));
4054+ERROR 42000: Display width out of range for column 'data' (max = 4294967295)
4055+CREATE TABLE b15776 (a blob(2147483647), b blob(2147483648), c blob(4294967295), a1 text(2147483647), b1 text(2147483648), c1 text(4294967295) );
4056+show columns from b15776;
4057+Field Type Null Key Default Extra
4058+a longblob YES NULL
4059+b longblob YES NULL
4060+c longblob YES NULL
4061+a1 longtext YES NULL
4062+b1 longtext YES NULL
4063+c1 longtext YES NULL
4064+drop table b15776;
4065+CREATE TABLE b15776 (a blob(4294967296));
4066+ERROR 42000: Display width out of range for column 'a' (max = 4294967295)
4067+CREATE TABLE b15776 (a text(4294967296));
4068+ERROR 42000: Display width out of range for column 'a' (max = 4294967295)
4069+CREATE TABLE b15776 (a blob(999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999));
4070+ERROR 42000: Display width out of range for column 'a' (max = 4294967295)
4071+CREATE TABLE b15776 (a text(999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999));
4072+ERROR 42000: Display width out of range for column 'a' (max = 4294967295)
4073+CREATE TABLE b15776 (a int(0));
4074+INSERT INTO b15776 values (NULL), (1), (42), (654);
4075+SELECT * from b15776 ORDER BY a;
4076+a
4077+NULL
4078+1
4079+42
4080+654
4081+DROP TABLE b15776;
4082+CREATE TABLE b15776 (a int(-1));
4083+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-1))' at line 1
4084+CREATE TABLE b15776 (a int(255));
4085+DROP TABLE b15776;
4086+CREATE TABLE b15776 (a int(256));
4087+ERROR 42000: Display width out of range for column 'a' (max = 255)
4088+CREATE TABLE b15776 (data blob(-1));
4089+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-1))' at line 1
4090+CREATE TABLE b15776 (a char(2147483647));
4091+ERROR 42000: Column length too big for column 'a' (max = 255); use BLOB or TEXT instead
4092+CREATE TABLE b15776 (a char(2147483648));
4093+ERROR 42000: Column length too big for column 'a' (max = 255); use BLOB or TEXT instead
4094+CREATE TABLE b15776 (a char(4294967295));
4095+ERROR 42000: Column length too big for column 'a' (max = 255); use BLOB or TEXT instead
4096+CREATE TABLE b15776 (a char(4294967296));
4097+ERROR 42000: Display width out of range for column 'a' (max = 4294967295)
4098+CREATE TABLE b15776 (a year(4));
4099+INSERT INTO b15776 VALUES (42);
4100+SELECT * FROM b15776;
4101+a
4102+2042
4103+DROP TABLE b15776;
4104+CREATE TABLE b15776 (a year(4294967296));
4105+ERROR 42000: Display width out of range for column 'a' (max = 4294967295)
4106+CREATE TABLE b15776 (a year(-2));
4107+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-2))' at line 1
4108+CREATE TABLE b15776 (a int(999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999));
4109+ERROR 42000: Display width out of range for column 'a' (max = 4294967295)
4110+CREATE TABLE b15776 (a char(999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999));
4111+ERROR 42000: Display width out of range for column 'a' (max = 4294967295)
4112+CREATE TABLE b15776 (a year(999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999));
4113+ERROR 42000: Display width out of range for column 'a' (max = 4294967295)
4114+CREATE TABLE b15776 select cast(null as char(4294967295));
4115+show columns from b15776;
4116+Field Type Null Key Default Extra
4117+cast(null as char(4294967295)) char(0) YES NULL
4118+drop table b15776;
4119+CREATE TABLE b15776 select cast(null as nchar(4294967295));
4120+show columns from b15776;
4121+Field Type Null Key Default Extra
4122+cast(null as nchar(4294967295)) char(0) YES NULL
4123+drop table b15776;
4124+CREATE TABLE b15776 select cast(null as binary(4294967295));
4125+show columns from b15776;
4126+Field Type Null Key Default Extra
4127+cast(null as binary(4294967295)) binary(0) YES NULL
4128+drop table b15776;
4129+explain select cast(1 as char(4294967295));
4130+id select_type table type possible_keys key key_len ref rows Extra
4131+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used
4132+explain select cast(1 as nchar(4294967295));
4133+id select_type table type possible_keys key key_len ref rows Extra
4134+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used
4135+explain select cast(1 as binary(4294967295));
4136+id select_type table type possible_keys key key_len ref rows Extra
4137+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used
4138+explain select cast(1 as char(4294967296));
4139+ERROR 42000: Display width out of range for column 'cast as char' (max = 4294967295)
4140+explain select cast(1 as nchar(4294967296));
4141+ERROR 42000: Display width out of range for column 'cast as char' (max = 4294967295)
4142+explain select cast(1 as binary(4294967296));
4143+ERROR 42000: Display width out of range for column 'cast as char' (max = 4294967295)
4144+explain select cast(1 as decimal(-1));
4145+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-1))' at line 1
4146+explain select cast(1 as decimal(64, 30));
4147+id select_type table type possible_keys key key_len ref rows Extra
4148+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used
4149+explain select cast(1 as decimal(64, 999999999999999999999999999999));
4150+Got one of the listed errors
4151+explain select cast(1 as decimal(4294967296));
4152+Got one of the listed errors
4153+explain select cast(1 as decimal(999999999999999999999999999999999999));
4154+Got one of the listed errors
4155+explain select convert(1, char(4294967295));
4156+id select_type table type possible_keys key key_len ref rows Extra
4157+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used
4158+explain select convert(1, char(4294967296));
4159+ERROR 42000: Display width out of range for column 'cast as char' (max = 4294967295)
4160+explain select convert(1, char(999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999));
4161+ERROR 42000: Display width out of range for column 'cast as char' (max = 4294967295)
4162+explain select convert(1, nchar(4294967295));
4163+id select_type table type possible_keys key key_len ref rows Extra
4164+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used
4165+explain select convert(1, nchar(4294967296));
4166+ERROR 42000: Display width out of range for column 'cast as char' (max = 4294967295)
4167+explain select convert(1, nchar(999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999));
4168+ERROR 42000: Display width out of range for column 'cast as char' (max = 4294967295)
4169+explain select convert(1, binary(4294967295));
4170+id select_type table type possible_keys key key_len ref rows Extra
4171+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used
4172+explain select convert(1, binary(4294967296));
4173+ERROR 42000: Display width out of range for column 'cast as char' (max = 4294967295)
4174+explain select convert(1, binary(999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999));
4175+ERROR 42000: Display width out of range for column 'cast as char' (max = 4294967295)
4176+End of 5.0 tests
4177+CREATE TABLE t1(id INT NOT NULL);
4178+CREATE TABLE t2(id INT NOT NULL, c TEXT NOT NULL);
4179+INSERT INTO t1 VALUES (1);
4180+INSERT INTO t2 VALUES (1, '');
4181+UPDATE t2 SET c = REPEAT('1', 70000);
4182+Warnings:
4183+Warning 1265 Data truncated for column 'c' at row 1
4184+SELECT LENGTH(c) FROM t2;
4185+LENGTH(c)
4186+65535
4187+UPDATE t1 LEFT JOIN t2 USING(id) SET t2.c = REPEAT('1', 70000) WHERE t1.id = 1;
4188+Warnings:
4189+Warning 1265 Data truncated for column 'c' at row 1
4190+SELECT LENGTH(c) FROM t2;
4191+LENGTH(c)
4192+65535
4193+DROP TABLE t1, t2;
4194+# Bug #52160: crash and inconsistent results when grouping
4195+# by a function and column
4196+CREATE FUNCTION f1() RETURNS TINYBLOB RETURN 1;
4197+CREATE TABLE t1(a CHAR(1));
4198+INSERT INTO t1 VALUES ('0'), ('0');
4199+SELECT COUNT(*) FROM t1 GROUP BY f1(), a;
4200+COUNT(*)
4201+2
4202+DROP FUNCTION f1;
4203+DROP TABLE t1;
4204+SET @old_max_heap_table_size = @@global.max_heap_table_size;
4205+SET @old_max_allowed_packet = @@global.max_allowed_packet;
4206+SET GLOBAL max_heap_table_size = 18 * 1024 * 1024;
4207+SET GLOBAL max_allowed_packet = 24 * 1024 * 1024;
4208+drop table if exists t1;
4209+CREATE TABLE t1 (data LONGBLOB);
4210+INSERT INTO t1 (data) VALUES (NULL);
4211+UPDATE t1 set data=repeat('a',18*1024*1024);
4212+select length(data) from t1;
4213+length(data)
4214+18874368
4215+delete from t1 where left(data,1)='a';
4216+truncate table t1;
4217+INSERT INTO t1 (data) VALUES (repeat('a',1*1024*1024));
4218+INSERT INTO t1 (data) VALUES (repeat('b',16*1024*1024-1024));
4219+delete from t1 where left(data,1)='b';
4220+UPDATE t1 set data=repeat('c',17*1024*1024);
4221+delete from t1 where left(data,1)='c';
4222+INSERT INTO t1 set data=repeat('a',18*1024*1024);
4223+select length(data) from t1;
4224+length(data)
4225+18874368
4226+alter table t1 modify data blob;
4227+select length(data) from t1;
4228+length(data)
4229+0
4230+drop table t1;
4231+CREATE TABLE t1 (data BLOB);
4232+INSERT INTO t1 (data) VALUES (NULL);
4233+UPDATE t1 set data=repeat('a',18*1024*1024);
4234+Warnings:
4235+Warning 1265 Data truncated for column 'data' at row 1
4236+select length(data) from t1;
4237+length(data)
4238+65535
4239+drop table t1;
4240+SET GLOBAL max_allowed_packet = @old_max_allowed_packet;
4241+SET GLOBAL max_heap_table_size = @old_max_heap_table_size;
4242+SET default_storage_engine=@old_default_storage_engine;
4243
4244=== added file 'Percona-Server/mysql-test/r/percona_heap_bug783366.result'
4245--- Percona-Server/mysql-test/r/percona_heap_bug783366.result 1970-01-01 00:00:00 +0000
4246+++ Percona-Server/mysql-test/r/percona_heap_bug783366.result 2013-05-20 14:30:50 +0000
4247@@ -0,0 +1,14 @@
4248+drop table if exists t1;
4249+CREATE TABLE t1 (
4250+f1 VARCHAR ( 128 ) ,
4251+f2 VARCHAR ( 32 ),
4252+PRIMARY KEY ( f2 ( 2 ) , f1 )
4253+)
4254+ENGINE=HEAP KEY_BLOCK_SIZE = 512;
4255+INSERT IGNORE INTO t1 VALUES ( 'te' , 'm') , ( NULL , 'think' );
4256+Warnings:
4257+Warning 1048 Column 'f1' cannot be null
4258+INSERT IGNORE INTO t1 VALUES ( 'te' , 'm') , ( NULL , 'think' );
4259+Warnings:
4260+Warning 1048 Column 'f1' cannot be null
4261+DROP TABLE t1;
4262
4263=== added file 'Percona-Server/mysql-test/r/percona_heap_bug783451.result'
4264--- Percona-Server/mysql-test/r/percona_heap_bug783451.result 1970-01-01 00:00:00 +0000
4265+++ Percona-Server/mysql-test/r/percona_heap_bug783451.result 2013-05-20 14:30:50 +0000
4266@@ -0,0 +1,124 @@
4267+DROP TABLE IF EXISTS local_1_1;
4268+CREATE TABLE IF NOT EXISTS local_1_1 ( f1 VARCHAR ( 32 ) NOT NULL , f2 VARCHAR ( 128 ) NOT NULL DEFAULT 'cboepfaobilcchabvglgjdbynog' , f3 VARCHAR ( 32 ) NOT NULL , f4 VARBINARY ( 32 ) NOT NULL , f5 VARBINARY ( 1024 ) DEFAULT 'ycboepfao' , KEY ( f1 /* ( 2 ) */ , f2 /* ( 2 ) */ ) ) ENGINE=HEAP KEY_BLOCK_SIZE = 512;
4269+INSERT IGNORE INTO local_1_1 VALUES ( REPEAT( 'ervydbimvmbqmsowdbsa' , 1 ) , 'v' , NULL , NULL , REPEAT( 'mervydbimvmbqms' , 5 ) ) , ( 'p' , 6 , 'n' , REPEAT( 'imervydbimvmbqmsowdbs' , 4 ) , 'do' ) , ( NULL , NULL , REPEAT( 'himervydbimvmbqmsowdbsaybudvwaamvhempuublmia' , 6 ) , REPEAT('X', POW(2, 20) * 2) , REPEAT('X', POW(2, 20) * 2) ) , ( REPEAT('X', POW(2, 20) * 2) , REPEAT( 'Y' , 763 ) , NULL , REPEAT('X', POW(2, 20) * 2) , NULL ) , ( REPEAT('X', POW(2, 20) * 2) , 'time' , 'how' , 2 , REPEAT( 'Y' , 107 ) ) , ( REPEAT( 'hyshimervydbimvmbqmsowdbsaybud' , 5 ) , 2 , 8 , NULL , REPEAT('X', POW(2, 20) * 2) ) , ( 'come' , NULL , 'i' , NULL , REPEAT('X', POW(2, 20) * 2) );
4270+Warnings:
4271+Warning 1048 Column 'f3' cannot be null
4272+Warning 1048 Column 'f4' cannot be null
4273+Warning 1265 Data truncated for column 'f4' at row 2
4274+Warning 1048 Column 'f1' cannot be null
4275+Warning 1048 Column 'f2' cannot be null
4276+Warning 1265 Data truncated for column 'f3' at row 3
4277+Warning 1265 Data truncated for column 'f4' at row 3
4278+Warning 1265 Data truncated for column 'f5' at row 3
4279+Warning 1265 Data truncated for column 'f1' at row 4
4280+Warning 1265 Data truncated for column 'f2' at row 4
4281+Warning 1048 Column 'f3' cannot be null
4282+Warning 1265 Data truncated for column 'f4' at row 4
4283+Warning 1265 Data truncated for column 'f1' at row 5
4284+Warning 1265 Data truncated for column 'f1' at row 6
4285+Warning 1048 Column 'f4' cannot be null
4286+Warning 1265 Data truncated for column 'f5' at row 6
4287+Warning 1048 Column 'f2' cannot be null
4288+Warning 1048 Column 'f4' cannot be null
4289+Warning 1265 Data truncated for column 'f5' at row 7
4290+INSERT IGNORE INTO local_1_1 VALUES ( 'ok' , NULL , REPEAT( 'Y' , 651 ) , 2 , 5 ) , ( REPEAT( 'zylcdzkfrqpihyshimervydbimvmbqmsowdbsaybu' , 3 ) , REPEAT( 'Y' , 282 ) , REPEAT( 'X' , 0 ) , REPEAT( 'Y' , 369 ) , 'g' ) , ( 'think' , REPEAT('X', POW(2, 20) * 2), NULL , NULL , REPEAT('X', POW(2, 20) * 2) ) , ( REPEAT( 'Y' , 468 ) , REPEAT( 'dfvbrzylcd' , 6 ) , REPEAT( 'Y' , 264 ) , NULL , 'c' ) , ( NULL , NULL , REPEAT( 'srdfvbrzylcdzkfrqpihyshimervydbimvmbqms' , 0 ) , REPEAT( 'Y' , 244 ) , 7 ) , ( REPEAT( 'Y' , 0 ) , 'how' , 'going' , 'q' , NULL );
4291+Warnings:
4292+Warning 1048 Column 'f2' cannot be null
4293+Warning 1265 Data truncated for column 'f3' at row 1
4294+Warning 1265 Data truncated for column 'f1' at row 2
4295+Warning 1265 Data truncated for column 'f2' at row 2
4296+Warning 1265 Data truncated for column 'f4' at row 2
4297+Warning 1265 Data truncated for column 'f2' at row 3
4298+Warning 1048 Column 'f3' cannot be null
4299+Warning 1048 Column 'f4' cannot be null
4300+Warning 1265 Data truncated for column 'f5' at row 3
4301+Warning 1265 Data truncated for column 'f1' at row 4
4302+Warning 1265 Data truncated for column 'f3' at row 4
4303+Warning 1048 Column 'f4' cannot be null
4304+Warning 1048 Column 'f1' cannot be null
4305+Warning 1048 Column 'f2' cannot be null
4306+Warning 1265 Data truncated for column 'f4' at row 5
4307+INSERT IGNORE INTO local_1_1 VALUES ( REPEAT('X', POW(2, 20) * 2) , NULL , NULL , NULL , REPEAT('X', POW(2, 20) * 2) ) , ( REPEAT('X', POW(2, 20) * 2) , NULL , REPEAT('X', POW(2, 20) * 2) , 'this' , 'e' ) , ( NULL , 'think' , NULL , 'were' , NULL ) , ( 9 , 'l' , 'c' , 3 , REPEAT( 'geysrdfvbrzylcdzkfrqpihyshimervydbi' , 5 ) ) , ( NULL , NULL , NULL , 'h' , 'w' );
4308+Warnings:
4309+Warning 1265 Data truncated for column 'f1' at row 1
4310+Warning 1048 Column 'f2' cannot be null
4311+Warning 1048 Column 'f3' cannot be null
4312+Warning 1048 Column 'f4' cannot be null
4313+Warning 1265 Data truncated for column 'f5' at row 1
4314+Warning 1265 Data truncated for column 'f1' at row 2
4315+Warning 1048 Column 'f2' cannot be null
4316+Warning 1265 Data truncated for column 'f3' at row 2
4317+Warning 1048 Column 'f1' cannot be null
4318+Warning 1048 Column 'f3' cannot be null
4319+Warning 1048 Column 'f1' cannot be null
4320+Warning 1048 Column 'f2' cannot be null
4321+Warning 1048 Column 'f3' cannot be null
4322+INSERT IGNORE INTO local_1_1 SELECT * FROM local_1_1;
4323+INSERT IGNORE INTO local_1_1 SELECT * FROM local_1_1;
4324+UPDATE local_1_1 SET f5 = REPEAT ('X', 215566);
4325+Warnings:
4326+Warning 1265 Data truncated for column 'f5' at row 1
4327+Warning 1265 Data truncated for column 'f5' at row 2
4328+Warning 1265 Data truncated for column 'f5' at row 3
4329+Warning 1265 Data truncated for column 'f5' at row 4
4330+Warning 1265 Data truncated for column 'f5' at row 5
4331+Warning 1265 Data truncated for column 'f5' at row 6
4332+Warning 1265 Data truncated for column 'f5' at row 7
4333+Warning 1265 Data truncated for column 'f5' at row 8
4334+Warning 1265 Data truncated for column 'f5' at row 9
4335+Warning 1265 Data truncated for column 'f5' at row 10
4336+Warning 1265 Data truncated for column 'f5' at row 11
4337+Warning 1265 Data truncated for column 'f5' at row 12
4338+Warning 1265 Data truncated for column 'f5' at row 13
4339+Warning 1265 Data truncated for column 'f5' at row 14
4340+Warning 1265 Data truncated for column 'f5' at row 15
4341+Warning 1265 Data truncated for column 'f5' at row 16
4342+Warning 1265 Data truncated for column 'f5' at row 17
4343+Warning 1265 Data truncated for column 'f5' at row 18
4344+Warning 1265 Data truncated for column 'f5' at row 19
4345+Warning 1265 Data truncated for column 'f5' at row 20
4346+Warning 1265 Data truncated for column 'f5' at row 21
4347+Warning 1265 Data truncated for column 'f5' at row 22
4348+Warning 1265 Data truncated for column 'f5' at row 23
4349+Warning 1265 Data truncated for column 'f5' at row 24
4350+Warning 1265 Data truncated for column 'f5' at row 25
4351+Warning 1265 Data truncated for column 'f5' at row 26
4352+Warning 1265 Data truncated for column 'f5' at row 27
4353+Warning 1265 Data truncated for column 'f5' at row 28
4354+Warning 1265 Data truncated for column 'f5' at row 29
4355+Warning 1265 Data truncated for column 'f5' at row 30
4356+Warning 1265 Data truncated for column 'f5' at row 31
4357+Warning 1265 Data truncated for column 'f5' at row 32
4358+Warning 1265 Data truncated for column 'f5' at row 33
4359+Warning 1265 Data truncated for column 'f5' at row 34
4360+Warning 1265 Data truncated for column 'f5' at row 35
4361+Warning 1265 Data truncated for column 'f5' at row 36
4362+Warning 1265 Data truncated for column 'f5' at row 37
4363+Warning 1265 Data truncated for column 'f5' at row 38
4364+Warning 1265 Data truncated for column 'f5' at row 39
4365+Warning 1265 Data truncated for column 'f5' at row 40
4366+Warning 1265 Data truncated for column 'f5' at row 41
4367+Warning 1265 Data truncated for column 'f5' at row 42
4368+Warning 1265 Data truncated for column 'f5' at row 43
4369+Warning 1265 Data truncated for column 'f5' at row 44
4370+Warning 1265 Data truncated for column 'f5' at row 45
4371+Warning 1265 Data truncated for column 'f5' at row 46
4372+Warning 1265 Data truncated for column 'f5' at row 47
4373+Warning 1265 Data truncated for column 'f5' at row 48
4374+Warning 1265 Data truncated for column 'f5' at row 49
4375+Warning 1265 Data truncated for column 'f5' at row 50
4376+Warning 1265 Data truncated for column 'f5' at row 51
4377+Warning 1265 Data truncated for column 'f5' at row 52
4378+Warning 1265 Data truncated for column 'f5' at row 53
4379+Warning 1265 Data truncated for column 'f5' at row 54
4380+Warning 1265 Data truncated for column 'f5' at row 55
4381+Warning 1265 Data truncated for column 'f5' at row 56
4382+Warning 1265 Data truncated for column 'f5' at row 57
4383+Warning 1265 Data truncated for column 'f5' at row 58
4384+Warning 1265 Data truncated for column 'f5' at row 59
4385+Warning 1265 Data truncated for column 'f5' at row 60
4386+Warning 1265 Data truncated for column 'f5' at row 61
4387+Warning 1265 Data truncated for column 'f5' at row 62
4388+Warning 1265 Data truncated for column 'f5' at row 63
4389+Warning 1265 Data truncated for column 'f5' at row 64
4390+DROP TABLE local_1_1;
4391
4392=== added file 'Percona-Server/mysql-test/r/percona_heap_bug784464.result'
4393--- Percona-Server/mysql-test/r/percona_heap_bug784464.result 1970-01-01 00:00:00 +0000
4394+++ Percona-Server/mysql-test/r/percona_heap_bug784464.result 2013-05-20 14:30:50 +0000
4395@@ -0,0 +1,58 @@
4396+CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(32), f3 VARCHAR(32), f4 VARCHAR(32),
4397+PRIMARY KEY (f1)) ENGINE=HEAP ROW_FORMAT=DYNAMIC;
4398+SHOW TABLE STATUS LIKE 't1';
4399+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
4400+t1 MEMORY 10 Fixed 0 X 0 X 0 0 NULL X X NULL latin1_swedish_ci NULL row_format=DYNAMIC
4401+DROP TABLE t1;
4402+CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(32), f3 VARCHAR(32), f4 VARCHAR(32),
4403+PRIMARY KEY (f1)) KEY_BLOCK_SIZE=33 ENGINE=HEAP ROW_FORMAT=DYNAMIC;
4404+ERROR 42000: Incorrect usage/placement of 'key_block_size'
4405+SHOW TABLE STATUS LIKE 't1';
4406+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
4407+CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(32), f3 VARCHAR(32), f4 VARCHAR(32),
4408+PRIMARY KEY (f1)) KEY_BLOCK_SIZE=34 ENGINE=HEAP ROW_FORMAT=DYNAMIC;
4409+SHOW TABLE STATUS LIKE 't1';
4410+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
4411+t1 MEMORY 10 Dynamic 0 X 0 X 0 0 NULL X X NULL latin1_swedish_ci NULL row_format=DYNAMIC KEY_BLOCK_SIZE=34
4412+DROP TABLE t1;
4413+CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(32), f3 VARCHAR(32), f4 VARCHAR(32),
4414+PRIMARY KEY (f1)) KEY_BLOCK_SIZE=123 ENGINE=HEAP ROW_FORMAT=DYNAMIC;
4415+SHOW TABLE STATUS LIKE 't1';
4416+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
4417+t1 MEMORY 10 Dynamic 0 X 0 X 0 0 NULL X X NULL latin1_swedish_ci NULL row_format=DYNAMIC KEY_BLOCK_SIZE=123
4418+DROP TABLE t1;
4419+CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(32), f3 VARCHAR(32), f4 VARCHAR(32),
4420+PRIMARY KEY (f1)) KEY_BLOCK_SIZE=1000 ENGINE=HEAP ROW_FORMAT=DYNAMIC;
4421+SHOW TABLE STATUS LIKE 't1';
4422+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
4423+t1 MEMORY 10 Fixed 0 X 0 X 0 0 NULL X X NULL latin1_swedish_ci NULL row_format=DYNAMIC KEY_BLOCK_SIZE=1000
4424+DROP TABLE t1;
4425+CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(96),
4426+PRIMARY KEY (f1)) ENGINE=HEAP ROW_FORMAT=DYNAMIC;
4427+SHOW TABLE STATUS LIKE 't1';
4428+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
4429+t1 MEMORY 10 Fixed 0 X 0 X 0 0 NULL X X NULL latin1_swedish_ci NULL row_format=DYNAMIC
4430+DROP TABLE t1;
4431+CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(96),
4432+PRIMARY KEY (f1)) KEY_BLOCK_SIZE=33 ENGINE=HEAP ROW_FORMAT=DYNAMIC;
4433+ERROR 42000: Incorrect usage/placement of 'key_block_size'
4434+SHOW TABLE STATUS LIKE 't1';
4435+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
4436+CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(96),
4437+PRIMARY KEY (f1)) KEY_BLOCK_SIZE=34 ENGINE=HEAP ROW_FORMAT=DYNAMIC;
4438+SHOW TABLE STATUS LIKE 't1';
4439+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
4440+t1 MEMORY 10 Dynamic 0 X 0 X 0 0 NULL X X NULL latin1_swedish_ci NULL row_format=DYNAMIC KEY_BLOCK_SIZE=34
4441+DROP TABLE t1;
4442+CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(96),
4443+PRIMARY KEY (f1)) KEY_BLOCK_SIZE=121 ENGINE=HEAP ROW_FORMAT=DYNAMIC;
4444+SHOW TABLE STATUS LIKE 't1';
4445+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
4446+t1 MEMORY 10 Dynamic 0 X 0 X 0 0 NULL X X NULL latin1_swedish_ci NULL row_format=DYNAMIC KEY_BLOCK_SIZE=121
4447+DROP TABLE t1;
4448+CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(96),
4449+PRIMARY KEY (f1)) KEY_BLOCK_SIZE=1000 ENGINE=HEAP ROW_FORMAT=DYNAMIC;
4450+SHOW TABLE STATUS LIKE 't1';
4451+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
4452+t1 MEMORY 10 Fixed 0 X 0 X 0 0 NULL X X NULL latin1_swedish_ci NULL row_format=DYNAMIC KEY_BLOCK_SIZE=1000
4453+DROP TABLE t1;
4454
4455=== added file 'Percona-Server/mysql-test/r/percona_heap_bug784464_32bit.result'
4456--- Percona-Server/mysql-test/r/percona_heap_bug784464_32bit.result 1970-01-01 00:00:00 +0000
4457+++ Percona-Server/mysql-test/r/percona_heap_bug784464_32bit.result 2013-05-20 14:30:50 +0000
4458@@ -0,0 +1,12 @@
4459+CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(32), f3 VARCHAR(32), f4 VARCHAR(32),
4460+PRIMARY KEY (f1)) KEY_BLOCK_SIZE=124 ENGINE=HEAP ROW_FORMAT=DYNAMIC;
4461+SHOW TABLE STATUS LIKE 't1';
4462+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
4463+t1 MEMORY 10 Dynamic 0 X 0 X 0 0 NULL X X NULL latin1_swedish_ci NULL row_format=DYNAMIC KEY_BLOCK_SIZE=124
4464+DROP TABLE t1;
4465+CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(96),
4466+PRIMARY KEY (f1)) KEY_BLOCK_SIZE=122 ENGINE=HEAP ROW_FORMAT=DYNAMIC;
4467+SHOW TABLE STATUS LIKE 't1';
4468+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
4469+t1 MEMORY 10 Dynamic 0 X 0 X 0 0 NULL X X NULL latin1_swedish_ci NULL row_format=DYNAMIC KEY_BLOCK_SIZE=122
4470+DROP TABLE t1;
4471
4472=== added file 'Percona-Server/mysql-test/r/percona_heap_bug784464_64bit.result'
4473--- Percona-Server/mysql-test/r/percona_heap_bug784464_64bit.result 1970-01-01 00:00:00 +0000
4474+++ Percona-Server/mysql-test/r/percona_heap_bug784464_64bit.result 2013-05-20 14:30:50 +0000
4475@@ -0,0 +1,12 @@
4476+CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(32), f3 VARCHAR(32), f4 VARCHAR(32),
4477+PRIMARY KEY (f1)) KEY_BLOCK_SIZE=124 ENGINE=HEAP ROW_FORMAT=DYNAMIC;
4478+SHOW TABLE STATUS LIKE 't1';
4479+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
4480+t1 MEMORY 10 Fixed 0 X 0 X 0 0 NULL X X NULL latin1_swedish_ci NULL row_format=DYNAMIC KEY_BLOCK_SIZE=124
4481+DROP TABLE t1;
4482+CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(96),
4483+PRIMARY KEY (f1)) KEY_BLOCK_SIZE=122 ENGINE=HEAP ROW_FORMAT=DYNAMIC;
4484+SHOW TABLE STATUS LIKE 't1';
4485+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
4486+t1 MEMORY 10 Fixed 0 X 0 X 0 0 NULL X X NULL latin1_swedish_ci NULL row_format=DYNAMIC KEY_BLOCK_SIZE=122
4487+DROP TABLE t1;
4488
4489=== added file 'Percona-Server/mysql-test/r/percona_heap_bug784468.result'
4490--- Percona-Server/mysql-test/r/percona_heap_bug784468.result 1970-01-01 00:00:00 +0000
4491+++ Percona-Server/mysql-test/r/percona_heap_bug784468.result 2013-05-20 14:30:50 +0000
4492@@ -0,0 +1,15 @@
4493+CREATE TABLE t1 ( f1 VARCHAR(30)) ENGINE=HEAP ROW_FORMAT=DYNAMIC;
4494+SHOW TABLE STATUS LIKE 't1';
4495+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
4496+t1 MEMORY 10 Fixed 0 32 0 X 0 0 NULL X X NULL latin1_swedish_ci NULL row_format=DYNAMIC
4497+DROP TABLE t1;
4498+CREATE TABLE t1 ( f1 VARCHAR(31)) ENGINE=HEAP ROW_FORMAT=DYNAMIC;
4499+SHOW TABLE STATUS LIKE 't1';
4500+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
4501+t1 MEMORY 10 Fixed 0 33 0 X 0 0 NULL X X NULL latin1_swedish_ci NULL row_format=DYNAMIC
4502+DROP TABLE t1;
4503+CREATE TABLE t1 ( f1 VARCHAR(32)) ENGINE=HEAP ROW_FORMAT=DYNAMIC;
4504+SHOW TABLE STATUS LIKE 't1';
4505+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
4506+t1 MEMORY 10 Fixed 0 34 0 X 0 0 NULL X X NULL latin1_swedish_ci NULL row_format=DYNAMIC
4507+DROP TABLE t1;
4508
4509=== added file 'Percona-Server/mysql-test/r/percona_heap_bug788544.result'
4510--- Percona-Server/mysql-test/r/percona_heap_bug788544.result 1970-01-01 00:00:00 +0000
4511+++ Percona-Server/mysql-test/r/percona_heap_bug788544.result 2013-05-20 14:30:50 +0000
4512@@ -0,0 +1,9 @@
4513+CREATE TABLE t1 (f2 VARCHAR (32), f4 LONGBLOB, f5 TEXT) ENGINE=HEAP;
4514+INSERT INTO t1 VALUES ('a', NULL, NULL),
4515+('b' , REPEAT('a' , 593338), REPEAT('a', 800));
4516+UPDATE t1 SET f2 = 'c' WHERE f4 = 'd';
4517+SELECT LENGTH(f2), LENGTH(f4), LENGTH(f5) FROM t1;
4518+LENGTH(f2) LENGTH(f4) LENGTH(f5)
4519+1 NULL NULL
4520+1 593338 800
4521+DROP TABLE t1;
4522
4523=== added file 'Percona-Server/mysql-test/r/percona_heap_bug788576.result'
4524--- Percona-Server/mysql-test/r/percona_heap_bug788576.result 1970-01-01 00:00:00 +0000
4525+++ Percona-Server/mysql-test/r/percona_heap_bug788576.result 2013-05-20 14:30:50 +0000
4526@@ -0,0 +1,19 @@
4527+CREATE TABLE t1 (f1 VARCHAR (32), f2 VARCHAR (128), f3 VARBINARY (128),
4528+f4 VARBINARY (512), f5 VARBINARY (1024),
4529+KEY (f2(1))) ENGINE=HEAP ROW_FORMAT=DYNAMIC;
4530+INSERT IGNORE INTO t1 VALUES (2, NULL, 6, REPEAT('glugcgqk', 5), 'look'),
4531+(REPEAT( 'kglugcgqkin', 6), 'if', 'was', NULL, NULL),
4532+(NULL, NULL, NULL, NULL, 7);
4533+Warnings:
4534+Warning 1265 Data truncated for column 'f1' at row 2
4535+SELECT * FROM t1;
4536+f1 f2 f3 f4 f5
4537+2 NULL 6 glugcgqkglugcgqkglugcgqkglugcgqkglugcgqk look
4538+kglugcgqkinkglugcgqkinkglugcgqki if was NULL NULL
4539+NULL NULL NULL NULL 7
4540+DELETE FROM t1 WHERE f5 <=> NULL;
4541+SELECT * FROM t1;
4542+f1 f2 f3 f4 f5
4543+2 NULL 6 glugcgqkglugcgqkglugcgqkglugcgqkglugcgqk look
4544+NULL NULL NULL NULL 7
4545+DROP TABLE t1;
4546
4547=== added file 'Percona-Server/mysql-test/r/percona_heap_bug788722.result'
4548--- Percona-Server/mysql-test/r/percona_heap_bug788722.result 1970-01-01 00:00:00 +0000
4549+++ Percona-Server/mysql-test/r/percona_heap_bug788722.result 2013-05-20 14:30:50 +0000
4550@@ -0,0 +1,18 @@
4551+CREATE TABLE IF NOT EXISTS local_1_1 (f1 VARCHAR (32) NOT NULL,
4552+f2 VARCHAR (128) NOT NULL,
4553+f3 BLOB NOT NULL,
4554+f4 TEXT,
4555+f5 BLOB (1024),
4556+PRIMARY KEY (f1),
4557+KEY (f1 , f2)
4558+) ENGINE=HEAP ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE = 2048;
4559+INSERT IGNORE INTO local_1_1 VALUES
4560+(REPEAT('egqeqfxwaejpqixuvvtentruyqadxiybjdfqjspfbyjdjczrrwjnagkzsoagatqookhsgtrvvbxacppljfzaseidqggxvuirm' , 5), NULL, NULL, NULL, REPEAT('hegqeqfxwaejpqixuvvtentruyqadxiy', 1)),
4561+('you', NULL, 0, REPEAT("X", 2048) , 0);
4562+Warnings:
4563+Warning 1265 Data truncated for column 'f1' at row 1
4564+Warning 1048 Column 'f2' cannot be null
4565+Warning 1048 Column 'f3' cannot be null
4566+Warning 1048 Column 'f2' cannot be null
4567+INSERT IGNORE INTO local_1_1 SELECT * FROM local_1_1;
4568+DROP TABLE local_1_1;
4569
4570=== added file 'Percona-Server/mysql-test/r/percona_heap_bug789131.result'
4571--- Percona-Server/mysql-test/r/percona_heap_bug789131.result 1970-01-01 00:00:00 +0000
4572+++ Percona-Server/mysql-test/r/percona_heap_bug789131.result 2013-05-20 14:30:50 +0000
4573@@ -0,0 +1,7 @@
4574+CREATE TABLE t1 (f1 VARCHAR (128), f2 VARCHAR (128), f3 VARBINARY (512),
4575+f4 TEXT (65525), f5 VARCHAR (128), KEY (f1(1))) ENGINE=HEAP;
4576+INSERT IGNORE INTO t1 VALUES
4577+( 'o' , "" , NULL , "" , 0 ) ,
4578+(NULL, "" , "" , "" , 'f' ) ;
4579+INSERT IGNORE INTO t1 SELECT * FROM t1;
4580+DROP TABLE t1;
4581
4582=== added file 'Percona-Server/mysql-test/r/percona_heap_var.result'
4583--- Percona-Server/mysql-test/r/percona_heap_var.result 1970-01-01 00:00:00 +0000
4584+++ Percona-Server/mysql-test/r/percona_heap_var.result 2013-05-20 14:30:50 +0000
4585@@ -0,0 +1,194 @@
4586+drop table if exists t1;
4587+set @@session.max_heap_table_size=16*1024*1024;
4588+create table t1 (a int not null, b varchar(400), c int, primary key (a), key (c)) engine=heap comment="testing heaps" key_block_size=128;
4589+ERROR 42000: Incorrect usage/placement of 'key_block_size'
4590+create table t1 (a int not null, b int, c varchar(400), primary key (a), key (b)) engine=heap comment="testing heaps" key_block_size=4;
4591+ERROR 42000: Incorrect usage/placement of 'key_block_size'
4592+create table t1 (a int not null, b int, c varchar(400), d varchar(400), primary key (a), key (b)) engine=heap comment="testing heaps" key_block_size=24;
4593+show table status like "t1";
4594+Name t1
4595+Engine MEMORY
4596+Version 10
4597+Row_format Dynamic
4598+Rows 0
4599+Avg_row_length X
4600+Data_length X
4601+Max_data_length X
4602+Index_length X
4603+Data_free X
4604+Auto_increment X
4605+Create_time X
4606+Update_time X
4607+Check_time X
4608+Collation latin1_swedish_ci
4609+Checksum NULL
4610+Create_options KEY_BLOCK_SIZE=24
4611+Comment testing heaps
4612+insert into t1 values (1,1,'012',NULL), (2,2,'0123456789',NULL), (3,3,'012345678901234567890123456789',NULL), (4,4,NULL,'0123456789012345678901234567890123456789012345678901234567890123456789');
4613+select * from t1;
4614+a b c d
4615+1 1 012 NULL
4616+2 2 0123456789 NULL
4617+3 3 012345678901234567890123456789 NULL
4618+4 4 NULL 0123456789012345678901234567890123456789012345678901234567890123456789
4619+delete from t1 where a = 3;
4620+select * from t1;
4621+a b c d
4622+1 1 012 NULL
4623+2 2 0123456789 NULL
4624+4 4 NULL 0123456789012345678901234567890123456789012345678901234567890123456789
4625+insert into t1 values (5,5,NULL,'0123'), (6,6,NULL,'0123');
4626+select * from t1;
4627+a b c d
4628+1 1 012 NULL
4629+2 2 0123456789 NULL
4630+6 6 NULL 0123
4631+5 5 NULL 0123
4632+4 4 NULL 0123456789012345678901234567890123456789012345678901234567890123456789
4633+update t1 set c = '012345678901234567890123456789' where a = 2;
4634+select * from t1;
4635+a b c d
4636+1 1 012 NULL
4637+2 2 012345678901234567890123456789 NULL
4638+6 6 NULL 0123
4639+5 5 NULL 0123
4640+4 4 NULL 0123456789012345678901234567890123456789012345678901234567890123456789
4641+update t1 set c = '0123456789' where a = 2;
4642+select * from t1;
4643+a b c d
4644+1 1 012 NULL
4645+2 2 0123456789 NULL
4646+6 6 NULL 0123
4647+5 5 NULL 0123
4648+4 4 NULL 0123456789012345678901234567890123456789012345678901234567890123456789
4649+insert into t1 values (7,7,'0123',NULL), (8,8,'0123',NULL);
4650+select * from t1;
4651+a b c d
4652+1 1 012 NULL
4653+2 2 0123456789 NULL
4654+6 6 NULL 0123
4655+5 5 NULL 0123
4656+4 4 NULL 0123456789012345678901234567890123456789012345678901234567890123456789
4657+7 7 0123 NULL
4658+8 8 0123 NULL
4659+show table status like "t1";
4660+Name t1
4661+Engine MEMORY
4662+Version 10
4663+Row_format Dynamic
4664+Rows 7
4665+Avg_row_length X
4666+Data_length X
4667+Max_data_length X
4668+Index_length X
4669+Data_free X
4670+Auto_increment X
4671+Create_time X
4672+Update_time X
4673+Check_time X
4674+Collation latin1_swedish_ci
4675+Checksum NULL
4676+Create_options KEY_BLOCK_SIZE=24
4677+Comment testing heaps
4678+alter table t1 key_block_size = 0;
4679+show table status like "t1";
4680+Name t1
4681+Engine MEMORY
4682+Version 10
4683+Row_format Dynamic
4684+Rows 7
4685+Avg_row_length X
4686+Data_length X
4687+Max_data_length X
4688+Index_length X
4689+Data_free X
4690+Auto_increment X
4691+Create_time X
4692+Update_time X
4693+Check_time X
4694+Collation latin1_swedish_ci
4695+Checksum NULL
4696+Create_options
4697+Comment testing heaps
4698+alter table t1 row_format = dynamic;
4699+show table status like "t1";
4700+Name t1
4701+Engine MEMORY
4702+Version 10
4703+Row_format Dynamic
4704+Rows 7
4705+Avg_row_length X
4706+Data_length X
4707+Max_data_length X
4708+Index_length X
4709+Data_free X
4710+Auto_increment X
4711+Create_time X
4712+Update_time X
4713+Check_time X
4714+Collation latin1_swedish_ci
4715+Checksum NULL
4716+Create_options row_format=DYNAMIC KEY_BLOCK_SIZE=X
4717+Comment testing heaps
4718+alter table t1 key_block_size = 128, max_rows = 10001;
4719+show table status like "t1";
4720+Name t1
4721+Engine MEMORY
4722+Version 10
4723+Row_format Dynamic
4724+Rows 7
4725+Avg_row_length X
4726+Data_length X
4727+Max_data_length X
4728+Index_length X
4729+Data_free X
4730+Auto_increment X
4731+Create_time X
4732+Update_time X
4733+Check_time X
4734+Collation latin1_swedish_ci
4735+Checksum NULL
4736+Create_options max_rows=10001 row_format=DYNAMIC KEY_BLOCK_SIZE=128
4737+Comment testing heaps
4738+select * from t1;
4739+a b c d
4740+1 1 012 NULL
4741+2 2 0123456789 NULL
4742+6 6 NULL 0123
4743+5 5 NULL 0123
4744+4 4 NULL 0123456789012345678901234567890123456789012345678901234567890123456789
4745+7 7 0123 NULL
4746+8 8 0123 NULL
4747+delete from t1;
4748+select * from t1;
4749+a b c d
4750+call mtr.add_suppression("The table 't1' is full");
4751+select count(*) from t1;
4752+count(*)
4753+10001
4754+insert into t1 values (100000,100000,NULL,'0123'), (100000,100000,NULL,'0123');
4755+ERROR HY000: The table 't1' is full
4756+show table status like "t1";
4757+Name t1
4758+Engine MEMORY
4759+Version 10
4760+Row_format Dynamic
4761+Rows 10001
4762+Avg_row_length X
4763+Data_length X
4764+Max_data_length X
4765+Index_length X
4766+Data_free X
4767+Auto_increment X
4768+Create_time X
4769+Update_time X
4770+Check_time X
4771+Collation latin1_swedish_ci
4772+Checksum NULL
4773+Create_options max_rows=10001 row_format=DYNAMIC KEY_BLOCK_SIZE=128
4774+Comment testing heaps
4775+select count(*) from t1;
4776+count(*)
4777+10001
4778+set @@session.max_heap_table_size=default;
4779+drop table t1;
4780
4781=== added file 'Percona-Server/mysql-test/r/percona_innodb_deadlock_count.result'
4782--- Percona-Server/mysql-test/r/percona_innodb_deadlock_count.result 1970-01-01 00:00:00 +0000
4783+++ Percona-Server/mysql-test/r/percona_innodb_deadlock_count.result 2013-05-20 14:30:50 +0000
4784@@ -0,0 +1,28 @@
4785+# Establish connection con1 (user=root)
4786+# Establish connection con2 (user=root)
4787+# Establish connection con3 (user=root)
4788+# Drop test table
4789+drop table if exists t;
4790+# Create test table
4791+create table t(a INT PRIMARY KEY, b INT) engine=InnoDB;
4792+# Insert two rows to test table
4793+insert into t values(2,1);
4794+insert into t values(1,2);
4795+# Switch to connection con1
4796+BEGIN;
4797+SELECT b FROM t WHERE a=1 FOR UPDATE;
4798+# Switch to connection con2
4799+BEGIN;
4800+SELECT b FROM t WHERE a=2 FOR UPDATE;
4801+# Switch to connection con1
4802+SELECT b FROM t WHERE a=2 FOR UPDATE;
4803+# Switch to connection con2
4804+SELECT b FROM t WHERE a=1 FOR UPDATE;
4805+# Switch to connection con1
4806+ROLLBACK;
4807+# Switch to connection con2
4808+ROLLBACK;
4809+# Switch to connection con3
4810+Deadlocks: 1
4811+# Drop test table
4812+drop table t;
4813
4814=== added file 'Percona-Server/mysql-test/r/percona_innodb_fake_changes.result'
4815--- Percona-Server/mysql-test/r/percona_innodb_fake_changes.result 1970-01-01 00:00:00 +0000
4816+++ Percona-Server/mysql-test/r/percona_innodb_fake_changes.result 2013-05-20 14:30:50 +0000
4817@@ -0,0 +1,119 @@
4818+DROP TABLE IF EXISTS t1, t2, t3;
4819+# Checking variables
4820+SHOW VARIABLES LIKE 'innodb_fake_changes';
4821+Variable_name Value
4822+innodb_fake_changes OFF
4823+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='innodb_fake_changes';
4824+VARIABLE_VALUE
4825+OFF
4826+SET innodb_fake_changes=1;
4827+SHOW VARIABLES LIKE 'innodb_fake_changes';
4828+Variable_name Value
4829+innodb_fake_changes ON
4830+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='innodb_fake_changes';
4831+VARIABLE_VALUE
4832+ON
4833+SET innodb_fake_changes=default;
4834+SHOW VARIABLES LIKE 'innodb_fake_changes';
4835+Variable_name Value
4836+innodb_fake_changes OFF
4837+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='innodb_fake_changes';
4838+VARIABLE_VALUE
4839+OFF
4840+# Explicit COMMIT should fail when innodb_fake_changes is enabled
4841+# DML should be fine
4842+SET @@GLOBAL.userstat= TRUE;
4843+CREATE TABLE t1 (a INT) ENGINE=InnoDB;
4844+INSERT INTO t1 VALUES (1);
4845+SET autocommit=0;
4846+SET innodb_fake_changes=1;
4847+BEGIN;
4848+INSERT INTO t1 VALUES (2);
4849+UPDATE t1 SET a=0;
4850+DELETE FROM t1 LIMIT 1;
4851+SELECT * FROM t1;
4852+a
4853+1
4854+COMMIT;
4855+ERROR HY000: Got error 131 during COMMIT
4856+SET innodb_fake_changes=default;
4857+# Verify that the fake changes to t1 did not leak through
4858+CHECK TABLE t1;
4859+Table Op Msg_type Msg_text
4860+test.t1 check status OK
4861+should_be_1
4862+1
4863+should_be_0
4864+0
4865+should_be_0
4866+0
4867+should_be_0
4868+0
4869+should_be_0
4870+0
4871+should_be_0
4872+0
4873+should_be_0
4874+0
4875+should_be_0
4876+0
4877+DROP TABLE t1;
4878+# DDL must result in error
4879+CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
4880+SET autocommit=0;
4881+SET innodb_fake_changes=1;
4882+BEGIN;
4883+CREATE TABLE t2 (a INT) ENGINE=InnoDB;
4884+ERROR HY000: Table storage engine for 't2' doesn't have this option
4885+DROP TABLE t1;
4886+ERROR 42S02: Unknown table 'test.t1'
4887+TRUNCATE TABLE t1;
4888+ERROR HY000: Got error 131 during COMMIT
4889+ALTER TABLE t1 ENGINE=MyISAM;
4890+ERROR HY000: Got error 131 during COMMIT
4891+ROLLBACK;
4892+SET innodb_fake_changes=0;
4893+INSERT INTO t1 VALUES (1), (2);
4894+COMMIT;
4895+CREATE TABLE t2 (a INT PRIMARY KEY, b INT, INDEX b_ind (b),
4896+FOREIGN KEY (b) REFERENCES t1(a) ON DELETE CASCADE ON UPDATE CASCADE) ENGINE=InnoDB;
4897+INSERT INTO t2 VALUES (1, 1);
4898+INSERT INTO t2 VALUES (2, 2);
4899+COMMIT;
4900+SET innodb_fake_changes=1;
4901+DELETE FROM t1 WHERE a=1;
4902+UPDATE t1 SET a=3 WHERE a=2;
4903+COMMIT;
4904+ERROR HY000: Got error 131 during COMMIT
4905+should_be_1
4906+1
4907+should_be_0
4908+0
4909+should_be_0
4910+0
4911+should_be_0
4912+0
4913+should_be_0
4914+0
4915+should_be_0
4916+0
4917+should_be_0
4918+0
4919+SET innodb_fake_changes=0;
4920+DROP TABLE t2;
4921+CREATE TABLE t3 (a INT primary key, b text) ENGINE=InnoDB;
4922+INSERT INTO t3 VALUES (1,'');
4923+COMMIT;
4924+SET innodb_fake_changes=1;
4925+UPDATE t3 set b=lpad('b',11000,'c') where a=1;
4926+COMMIT;
4927+ERROR HY000: Got error 131 during COMMIT
4928+SET innodb_fake_changes=default;
4929+# Verify that the fake changes to t3 did not leak through
4930+CHECK TABLE t3;
4931+Table Op Msg_type Msg_text
4932+test.t3 check status OK
4933+should_be_1
4934+1
4935+DROP TABLE t1, t3;
4936+SET @@GLOBAL.userstat= default;
4937
4938=== added file 'Percona-Server/mysql-test/r/percona_innodb_fake_changes_bug_898306.result'
4939--- Percona-Server/mysql-test/r/percona_innodb_fake_changes_bug_898306.result 1970-01-01 00:00:00 +0000
4940+++ Percona-Server/mysql-test/r/percona_innodb_fake_changes_bug_898306.result 2013-05-20 14:30:50 +0000
4941@@ -0,0 +1,43 @@
4942+DROP TABLE IF EXISTS t1;
4943+CREATE TABLE t1 (a INT primary key, b int, unique key (b)) ENGINE=InnoDB;
4944+INSERT INTO t1 VALUES (1,1);
4945+SET autocommit=1;
4946+SET innodb_fake_changes=1;
4947+# Confirm that duplicate key errors on REPLACE works
4948+REPLACE INTO t1 VALUES (1,1);
4949+ERROR HY000: Got error 131 during COMMIT
4950+REPLACE INTO t1 VALUES (1,2);
4951+ERROR HY000: Got error 131 during COMMIT
4952+# Confirm that duplicate key errors are OK
4953+BEGIN;
4954+REPLACE INTO t1 VALUES (1,2);
4955+SELECT * from t1;
4956+a b
4957+1 1
4958+REPLACE INTO t1 VALUES (1,1);
4959+SELECT * from t1;
4960+a b
4961+1 1
4962+ROLLBACK;
4963+BEGIN;
4964+REPLACE INTO t1 VALUES (2,1);
4965+ERROR 23000: Duplicate entry '1' for key 'b'
4966+INSERT INTO t1 VALUES (1,1);
4967+ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
4968+INSERT INTO t1 VALUES (1,2);
4969+ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
4970+INSERT INTO t1 VALUES (2,1);
4971+ERROR 23000: Duplicate entry '1' for key 'b'
4972+ROLLBACK;
4973+INSERT INTO t1 VALUES (1,1) ON DUPLICATE KEY UPDATE b=b+10;
4974+ERROR HY000: Got error 131 during COMMIT
4975+INSERT INTO t1 VALUES (1,2) ON DUPLICATE KEY UPDATE b=b+10;
4976+ERROR HY000: Got error 131 during COMMIT
4977+SET innodb_fake_changes=0;
4978+SELECT * from t1;
4979+a b
4980+1 1
4981+CHECK TABLE t1;
4982+Table Op Msg_type Msg_text
4983+test.t1 check status OK
4984+DROP TABLE t1;
4985
4986=== added file 'Percona-Server/mysql-test/r/percona_innodb_fake_changes_bug_917942.result'
4987--- Percona-Server/mysql-test/r/percona_innodb_fake_changes_bug_917942.result 1970-01-01 00:00:00 +0000
4988+++ Percona-Server/mysql-test/r/percona_innodb_fake_changes_bug_917942.result 2013-05-20 14:30:50 +0000
4989@@ -0,0 +1,151 @@
4990+DROP TABLE IF EXISTS t1;
4991+Test compressed
4992+CREATE TABLE t1 (id INT PRIMARY KEY AUTO_INCREMENT, v VARCHAR(200), t TEXT) ENGINE=INNODB KEY_BLOCK_SIZE=8;
4993+INSERT INTO t1 VALUES(NULL, LPAD("v", 2, "b"), LPAD("a", 100, "b"));
4994+SET innodb_fake_changes=1;
4995+INSERT INTO t1 VALUES(1, "foo", LPAD("a", 4600, "b")) ON DUPLICATE KEY UPDATE T = VALUES(T);
4996+ERROR HY000: Got error 131 during COMMIT
4997+UPDATE t1 SET T = LPAD("A", 4600, "b");
4998+ERROR HY000: Got error 131 during COMMIT
4999+SET innodb_fake_changes=0;
5000+CHECK TABLE t1;
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches