From 90ee43b3d0f1e60fd7d7008aec3245620fe5cf0f Mon Sep 17 00:00:00 2001 From: Ivan Suzdal Date: Fri, 16 Sep 2016 17:39:32 +0300 Subject: [PATCH] Bump mysql-wsrep to 5.6.33 Change-Id: Icd7e2099d1179cac38f0ab29ff7663ee74abc6e0 Related-Bug: #1622767 --- debian/changelog | 10 + mysql-wsrep-5.6/CMakeLists.txt | 16 +- mysql-wsrep-5.6/CONTRIBUTORS.txt | 25 + mysql-wsrep-5.6/CONTRIBUTOR_AGREEMENT.txt | 197 ++++ mysql-wsrep-5.6/VERSION | 2 +- mysql-wsrep-5.6/client/client_priv.h | 2 +- mysql-wsrep-5.6/client/mysql.cc | 72 +- mysql-wsrep-5.6/client/mysql_config_editor.cc | 12 +- mysql-wsrep-5.6/client/mysql_plugin.c | 6 +- mysql-wsrep-5.6/client/mysqladmin.cc | 12 +- mysql-wsrep-5.6/client/mysqlbinlog.cc | 10 +- mysql-wsrep-5.6/client/mysqlcheck.c | 44 +- mysql-wsrep-5.6/client/mysqldump.c | 60 +- mysql-wsrep-5.6/client/mysqlimport.c | 60 +- mysql-wsrep-5.6/client/mysqlshow.c | 44 +- mysql-wsrep-5.6/client/mysqlslap.c | 2 +- mysql-wsrep-5.6/client/mysqltest.cc | 18 +- .../compiler_options.cmake | 10 +- mysql-wsrep-5.6/cmake/wsrep.cmake | 2 +- mysql-wsrep-5.6/configure.cmake | 33 +- mysql-wsrep-5.6/dbug/tests.c | 2 +- mysql-wsrep-5.6/extra/comp_err.c | 6 +- mysql-wsrep-5.6/extra/innochecksum.cc | 6 +- mysql-wsrep-5.6/extra/my_print_defaults.c | 8 +- mysql-wsrep-5.6/extra/mysql_waitpid.c | 6 +- mysql-wsrep-5.6/extra/perror.c | 6 +- mysql-wsrep-5.6/extra/resolve_stack_dump.cc | 8 +- mysql-wsrep-5.6/extra/resolveip.c | 6 +- mysql-wsrep-5.6/extra/yassl/src/log.cpp | 3 +- .../extra/yassl/taocrypt/CMakeLists.txt | 12 +- mysql-wsrep-5.6/include/atomic/nolock.h | 4 +- mysql-wsrep-5.6/include/lf.h | 4 +- mysql-wsrep-5.6/include/m_ctype.h | 6 +- mysql-wsrep-5.6/include/my_atomic.h | 6 +- mysql-wsrep-5.6/include/my_attribute.h | 33 +- mysql-wsrep-5.6/include/my_default.h | 10 +- mysql-wsrep-5.6/include/my_global.h | 6 +- mysql-wsrep-5.6/include/my_pthread.h | 2 +- mysql-wsrep-5.6/include/my_sys.h | 3 +- mysql-wsrep-5.6/include/my_tree.h | 4 +- mysql-wsrep-5.6/include/myisam.h | 11 +- .../include/mysql/psi/mysql_file.h | 8 +- .../include/mysql/psi/mysql_socket.h | 10 +- .../include/mysql/psi/mysql_thread.h | 26 +- mysql-wsrep-5.6/libmysql/CMakeLists.txt | 6 +- mysql-wsrep-5.6/libmysql/libmysql.c | 662 +++++++++++- mysql-wsrep-5.6/libmysql/libmysql.ver.in | 15 + mysql-wsrep-5.6/libmysql/libmysql.ver16.in | 151 +++ mysql-wsrep-5.6/libmysqld/lib_sql.cc | 8 +- mysql-wsrep-5.6/man/comp_err.1 | 33 +- mysql-wsrep-5.6/man/innochecksum.1 | 7 +- mysql-wsrep-5.6/man/msql2mysql.1 | 7 +- mysql-wsrep-5.6/man/my_print_defaults.1 | 30 +- mysql-wsrep-5.6/man/myisam_ftdump.1 | 19 +- mysql-wsrep-5.6/man/myisamchk.1 | 118 +-- mysql-wsrep-5.6/man/myisamlog.1 | 7 +- mysql-wsrep-5.6/man/myisampack.1 | 35 +- mysql-wsrep-5.6/man/mysql-stress-test.pl.1 | 59 +- mysql-wsrep-5.6/man/mysql-test-run.pl.1 | 438 +++----- mysql-wsrep-5.6/man/mysql.1 | 274 +---- mysql-wsrep-5.6/man/mysql.server.1 | 16 +- mysql-wsrep-5.6/man/mysql_client_test.1 | 38 +- .../man/mysql_client_test_embedded.1 | 2 +- mysql-wsrep-5.6/man/mysql_config.1 | 32 +- mysql-wsrep-5.6/man/mysql_config_editor.1 | 20 +- .../man/mysql_convert_table_format.1 | 27 +- mysql-wsrep-5.6/man/mysql_find_rows.1 | 17 +- mysql-wsrep-5.6/man/mysql_fix_extensions.1 | 7 +- mysql-wsrep-5.6/man/mysql_install_db.1 | 41 +- mysql-wsrep-5.6/man/mysql_plugin.1 | 35 +- .../man/mysql_secure_installation.1 | 7 +- mysql-wsrep-5.6/man/mysql_setpermission.1 | 19 +- mysql-wsrep-5.6/man/mysql_tzinfo_to_sql.1 | 8 +- mysql-wsrep-5.6/man/mysql_upgrade.1 | 80 +- mysql-wsrep-5.6/man/mysql_waitpid.1 | 13 +- mysql-wsrep-5.6/man/mysql_zap.1 | 7 +- mysql-wsrep-5.6/man/mysqlaccess.1 | 47 +- mysql-wsrep-5.6/man/mysqladmin.1 | 124 +-- mysql-wsrep-5.6/man/mysqlbinlog.1 | 139 +-- mysql-wsrep-5.6/man/mysqlbug.1 | 7 +- mysql-wsrep-5.6/man/mysqlcheck.1 | 134 +-- mysql-wsrep-5.6/man/mysqld.8 | 8 +- mysql-wsrep-5.6/man/mysqld_multi.1 | 44 +- mysql-wsrep-5.6/man/mysqld_safe.1 | 88 +- mysql-wsrep-5.6/man/mysqldump.1 | 225 +--- mysql-wsrep-5.6/man/mysqldumpslow.1 | 15 +- mysql-wsrep-5.6/man/mysqlhotcopy.1 | 59 +- mysql-wsrep-5.6/man/mysqlimport.1 | 122 +-- mysql-wsrep-5.6/man/mysqlshow.1 | 99 +- mysql-wsrep-5.6/man/mysqlslap.1 | 145 +-- mysql-wsrep-5.6/man/mysqltest.1 | 98 +- mysql-wsrep-5.6/man/mysqltest_embedded.1 | 2 +- mysql-wsrep-5.6/man/perror.1 | 20 +- mysql-wsrep-5.6/man/replace.1 | 8 +- mysql-wsrep-5.6/man/resolve_stack_dump.1 | 15 +- mysql-wsrep-5.6/man/resolveip.1 | 13 +- .../mix_innodb_myisam_binlog.test | 2 +- .../extra/rpl_tests/rpl_generate_mts_gap.test | 47 + .../rpl_tests/rpl_mts_relay_log_recovery.test | 95 ++ .../mysql-test/include/explain_utils.inc | 20 +- .../mysql-test/include/galera_wait_ready.inc | 1 - .../mysql-test/include/mtr_warnings.sql | 10 +- .../mysql-test/include/plugin.defs | 1 + .../mysql-test/include/python_with_json.inc | 25 - .../mysql-test/include/subquery_sj.inc | 77 ++ .../mysql-test/include/wait_condition.inc | 2 +- mysql-wsrep-5.6/mysql-test/lib/My/SysInfo.pm | 40 +- mysql-wsrep-5.6/mysql-test/mysql-test-run.pl | 22 +- mysql-wsrep-5.6/mysql-test/r/func_str.result | 10 + mysql-wsrep-5.6/mysql-test/r/insert.result | 15 + mysql-wsrep-5.6/mysql-test/r/loaddata.result | 26 +- .../r/mysql_client_test_qcache.result | 14 + .../mysql-test/r/mysql_plugin.result | 2 +- .../mysql-test/r/mysqlbinlog.result | 5 +- .../mysql-test/r/mysqld--help-notwin.result | 4 +- .../mysql-test/r/sp-prelocking.result | 31 + mysql-wsrep-5.6/mysql-test/r/ssl_ca.result | 24 + mysql-wsrep-5.6/mysql-test/r/ssl_crl.result | 12 + .../mysql-test/r/subquery_sj_all.result | 97 ++ .../mysql-test/r/subquery_sj_all_bka.result | 97 ++ .../r/subquery_sj_all_bka_nixbnl.result | 97 ++ .../r/subquery_sj_all_bkaunique.result | 97 ++ .../mysql-test/r/subquery_sj_dupsweed.result | 96 ++ .../r/subquery_sj_dupsweed_bka.result | 96 ++ .../r/subquery_sj_dupsweed_bka_nixbnl.result | 96 ++ .../r/subquery_sj_dupsweed_bkaunique.result | 96 ++ .../r/subquery_sj_firstmatch.result | 96 ++ .../r/subquery_sj_firstmatch_bka.result | 96 ++ .../subquery_sj_firstmatch_bka_nixbnl.result | 96 ++ .../r/subquery_sj_firstmatch_bkaunique.result | 96 ++ .../mysql-test/r/subquery_sj_loosescan.result | 96 ++ .../r/subquery_sj_loosescan_bka.result | 96 ++ .../r/subquery_sj_loosescan_bka_nixbnl.result | 96 ++ .../r/subquery_sj_loosescan_bkaunique.result | 96 ++ .../mysql-test/r/subquery_sj_mat.result | 97 ++ .../mysql-test/r/subquery_sj_mat_bka.result | 97 ++ .../r/subquery_sj_mat_bka_nixbnl.result | 97 ++ .../r/subquery_sj_mat_bkaunique.result | 97 ++ .../mysql-test/r/subquery_sj_mat_nosj.result | 97 ++ .../mysql-test/r/subquery_sj_none.result | 97 ++ .../mysql-test/r/subquery_sj_none_bka.result | 97 ++ .../r/subquery_sj_none_bka_nixbnl.result | 97 ++ .../r/subquery_sj_none_bkaunique.result | 97 ++ .../mysql-test/r/udf_services.result | 15 + .../r/validate_password_plugin.result | 12 + .../mysql-test/r/variables-win.result | 11 + .../std_data/bug20683959loaddata.txt | 1 + .../binlog_dmls_on_tmp_tables_readonly.result | 58 ++ .../suite/binlog/r/binlog_index.result | 60 ++ .../suite/binlog/r/binlog_killed.result | 10 +- .../binlog/r/binlog_killed_simulate.result | 10 +- .../suite/binlog/r/binlog_sql_mode.result | 5 +- .../r/binlog_stm_mix_innodb_myisam.result | 5 +- .../t/binlog_dmls_on_tmp_tables_readonly.test | 90 ++ .../suite/binlog/t/binlog_index.test | 57 +- .../suite/binlog/t/binlog_killed.test | 4 +- .../binlog/t/binlog_killed_simulate.test | 4 +- .../suite/binlog/t/binlog_sql_mode.test | 2 +- .../mysql-test/suite/galera/galera_2nodes.cnf | 4 +- .../galera/galera_2nodes_as_master_slave.cnf | 83 ++ ...lera_2nodes_as_master_with_repl_filter.cnf | 87 ++ .../mysql-test/suite/galera/r/GAL-401.result | 21 + .../mysql-test/suite/galera/r/MW-284.result | 15 + .../mysql-test/suite/galera/r/MW-285.result | 19 + .../mysql-test/suite/galera/r/MW-286.result | 13 + .../mysql-test/suite/galera/r/MW-292.result | 30 + .../mysql-test/suite/galera/r/ev51914.result | 162 +++ .../suite/galera/r/galera#414.result | 5 + .../suite/galera/r/galera_admin.result | 43 + .../r/galera_bf_abort_flush_for_export.result | 1 + .../suite/galera/r/galera_defaults.result | 6 +- .../galera/r/galera_desync_overlapped.result | 45 + .../suite/galera/r/galera_kill_ddl.result | 3 - .../galera/r/galera_parallel_simple.result | 7 +- .../galera/r/galera_repl_max_ws_size.result | 6 +- .../r/galera_restart_on_unknown_option.result | 40 + .../suite/galera/r/galera_ssl_upgrade.result | 9 - .../galera/r/galera_toi_ddl_fk_update.result | 23 + .../galera/r/galera_toi_ddl_online.result | 27 + .../galera/r/galera_toi_drop_database.result | 22 + .../suite/galera/r/galera_toi_truncate.result | 17 + .../galera/r/galera_var_max_ws_rows.result | 115 +++ .../galera/r/galera_var_max_ws_size.result | 9 + ...alera_wsrep_provider_options_syntax.result | 5 + .../suite/galera/r/lp1376747-2.result | 19 + .../suite/galera/r/lp1376747-3.result | 21 + .../suite/galera/r/lp1376747-4.result | 36 + .../suite/galera/r/lp1376747.result | 19 + .../mysql-test/suite/galera/r/pxc-421.result | 35 + .../mysql-test/suite/galera/t/GAL-401.test | 49 + .../mysql-test/suite/galera/t/MW-284.cnf | 1 + .../mysql-test/suite/galera/t/MW-284.test | 57 ++ .../mysql-test/suite/galera/t/MW-285.test | 31 + .../mysql-test/suite/galera/t/MW-286.test | 32 + .../mysql-test/suite/galera/t/MW-292.test | 79 ++ .../mysql-test/suite/galera/t/ev51914.test | 214 ++++ .../mysql-test/suite/galera/t/galera#414.cnf | 8 + .../mysql-test/suite/galera/t/galera#414.test | 32 + .../suite/galera/t/galera_admin.test | 86 ++ .../t/galera_bf_abort_flush_for_export.test | 1 + .../galera/t/galera_desync_overlapped.test | 59 ++ .../suite/galera/t/galera_flush_local.opt | 2 +- .../suite/galera/t/galera_kill_ddl.test | 7 +- .../galera/t/galera_parallel_simple.test | 13 +- .../galera/t/galera_repl_max_ws_size.test | 6 +- .../galera/t/galera_restart_nochanges.test | 4 + .../t/galera_restart_on_unknown_option.test | 150 +++ .../suite/galera/t/galera_ssl_upgrade.test | 9 +- .../galera/t/galera_toi_ddl_fk_update.test | 49 + .../suite/galera/t/galera_toi_ddl_online.test | 53 + .../galera/t/galera_toi_drop_database.test | 54 + .../suite/galera/t/galera_toi_truncate.test | 77 ++ .../galera/t/galera_var_max_ws_rows.test | 154 +++ .../galera/t/galera_var_max_ws_size.test | 23 + .../galera_wsrep_provider_options_syntax.test | 20 + .../suite/galera/t/lp1376747-2.test | 22 + .../suite/galera/t/lp1376747-3.test | 28 + .../suite/galera/t/lp1376747-4.test | 53 + .../mysql-test/suite/galera/t/lp1376747.test | 24 + .../mysql-test/suite/galera/t/pxc-421.test | 60 ++ .../suite/galera_3nodes/galera_3nodes.cnf | 6 +- .../r/galera_pc_bootstrap.result | 3 - .../galera_3nodes/r/galera_pc_weight.result | 2 + .../galera_3nodes/t/galera_pc_bootstrap.cnf | 5 + .../galera_3nodes/t/galera_pc_bootstrap.test | 3 +- .../galera_3nodes/t/galera_pc_weight.cnf | 5 + .../galera_3nodes/t/galera_pc_weight.test | 7 +- .../t/galera_var_dirty_reads2.test | 4 + .../innodb/r/alter_rename_existing.result | 0 .../suite/innodb/r/flush-hang.result | 36 + .../suite/innodb/r/import_update_stats.result | 69 ++ .../r/innodb-index-online-norebuild.result | 26 + .../suite/innodb/r/innodb_bug54044.result | 3 +- .../r/innodb_deadlock_with_autoinc.result | 12 + .../mysql-test/suite/innodb/r/monitor.result | 49 + .../suite/innodb/t/alter_rename_existing.test | 0 .../mysql-test/suite/innodb/t/flush-hang.test | 50 + .../mysql-test/suite/innodb/t/galera.skip | 2 + .../suite/innodb/t/import_update_stats.test | 78 ++ .../t/innodb-index-online-norebuild.test | 68 ++ .../suite/innodb/t/innodb_bug54044.test | 7 +- .../t/innodb_deadlock_with_autoinc-master.opt | 1 + .../t/innodb_deadlock_with_autoinc.test | 47 + .../mysql-test/suite/innodb/t/monitor.test | 53 + .../innodb_fts/r/innodb-fts-basic.result | 28 + .../mysql-test/suite/innodb_fts/r/sync.result | 30 + .../suite/innodb_fts/t/innodb-fts-basic.test | 27 + .../mysql-test/suite/innodb_fts/t/sync.test | 32 +- .../suite/opt_trace/validate_json.pl | 159 +++ .../suite/opt_trace/validate_json.py | 123 --- .../suite/perfschema/r/aggregate.result | 118 --- .../suite/perfschema/t/aggregate.test | 191 ---- .../suite/rpl/r/rpl_autoinc_lock_style.result | 15 + .../rpl/r/rpl_gtid_stress_failover.result | 19 - ...l_mts_relay_log_post_crash_recovery.result | 82 ++ ...rpl_mts_relay_log_recovery_on_error.result | 60 ++ .../rpl/r/rpl_parallel_change_master.result | 2 +- .../suite/rpl/r/rpl_row_img_sanity.result | 67 ++ .../rpl/r/rpl_row_slave_skip_error_all.result | 46 + .../suite/rpl/r/rpl_server_uuid.result | 2 +- .../suite/rpl/r/rpl_sql_thread_error.result | 17 + .../rpl/r/rpl_zombie_dump_threads.result | 16 + .../mysql-test/suite/rpl/t/disabled.def | 1 - .../suite/rpl/t/rpl_autoinc_lock_style.test | 46 + .../suite/rpl/t/rpl_gtid_stress_failover.cnf | 61 -- .../suite/rpl/t/rpl_gtid_stress_failover.test | 444 -------- ...ts_relay_log_post_crash_recovery-slave.opt | 1 + ...rpl_mts_relay_log_post_crash_recovery.test | 40 + ..._mts_relay_log_recovery_on_error-slave.opt | 1 + .../rpl_mts_relay_log_recovery_on_error.test | 115 +++ .../rpl/t/rpl_parallel_change_master.test | 2 +- .../suite/rpl/t/rpl_row_img_sanity.test | 65 +- .../t/rpl_row_slave_skip_error_all-slave.opt | 1 + .../rpl/t/rpl_row_slave_skip_error_all.test | 80 ++ .../suite/rpl/t/rpl_server_uuid.test | 4 +- .../suite/rpl/t/rpl_sql_thread_error.test | 53 + .../suite/rpl/t/rpl_zombie_dump_threads.test | 59 ++ mysql-wsrep-5.6/mysql-test/t/func_str.test | 9 + .../t/innodb_explain_json_non_select_all.test | 6 +- .../innodb_explain_json_non_select_none.test | 4 +- .../t/innodb_explain_non_select_all.test | 3 +- .../t/innodb_explain_non_select_none.test | 1 - mysql-wsrep-5.6/mysql-test/t/insert.test | 22 + mysql-wsrep-5.6/mysql-test/t/loaddata.test | 25 +- .../t/myisam_explain_json_non_select_all.test | 4 +- .../myisam_explain_json_non_select_none.test | 4 +- .../t/myisam_explain_non_select_all.test | 1 - .../t/myisam_explain_non_select_none.test | 1 - .../t/mysql_client_test_qcache-master.opt | 1 + .../t/mysql_client_test_qcache.test | 21 + mysql-wsrep-5.6/mysql-test/t/mysqlbinlog.test | 2 +- .../mysql-test/t/sp-prelocking.test | 38 + .../mysql-test/t/ssl_ca-master.opt | 3 + mysql-wsrep-5.6/mysql-test/t/ssl_ca.test | 32 + mysql-wsrep-5.6/mysql-test/t/ssl_crl.test | 17 + .../mysql-test/t/udf_services-master.opt | 1 + .../mysql-test/t/udf_services.test | 25 + .../t/validate_password_plugin.test | 17 + .../mysql-test/t/variables-win.test | 15 + .../mysql-test/t/wl6443_deprecation.test | 3 + mysql-wsrep-5.6/mysql-test/valgrind.supp | 110 -- mysql-wsrep-5.6/mysys/charset-def.c | 4 +- mysql-wsrep-5.6/mysys/charset.c | 25 +- mysql-wsrep-5.6/mysys/errors.c | 2 +- mysql-wsrep-5.6/mysys/mf_cache.c | 4 +- mysql-wsrep-5.6/mysys/mf_iocache.c | 8 +- mysql-wsrep-5.6/mysys/mf_keycache.c | 16 +- mysql-wsrep-5.6/mysys/mf_keycaches.c | 4 +- mysql-wsrep-5.6/mysys/mf_tempfile.c | 6 +- mysql-wsrep-5.6/mysys/mf_unixpath.c | 4 +- mysql-wsrep-5.6/mysys/my_access.c | 8 +- mysql-wsrep-5.6/mysys/my_alarm.c | 7 +- mysql-wsrep-5.6/mysys/my_alloc.c | 6 +- mysql-wsrep-5.6/mysys/my_bitmap.c | 8 +- mysql-wsrep-5.6/mysys/my_fopen.c | 4 +- mysql-wsrep-5.6/mysys/my_fstream.c | 6 +- mysql-wsrep-5.6/mysys/my_gethwaddr.c | 6 +- mysql-wsrep-5.6/mysys/my_getsystime.c | 4 +- mysql-wsrep-5.6/mysys/my_lib.c | 4 +- mysql-wsrep-5.6/mysys/my_mess.c | 4 +- mysql-wsrep-5.6/mysys/my_redel.c | 12 +- mysql-wsrep-5.6/mysys/my_static.c | 14 +- mysql-wsrep-5.6/mysys/my_symlink.c | 4 +- mysql-wsrep-5.6/mysys/my_sync.c | 10 +- mysql-wsrep-5.6/mysys/my_write.c | 2 +- mysql-wsrep-5.6/mysys/psi_noop.c | 10 +- mysql-wsrep-5.6/mysys/ptr_cmp.c | 10 +- mysql-wsrep-5.6/mysys/stacktrace.c | 12 +- mysql-wsrep-5.6/mysys/testhash.c | 4 +- mysql-wsrep-5.6/mysys/thr_alarm.c | 22 +- mysql-wsrep-5.6/mysys/thr_lock.c | 16 +- mysql-wsrep-5.6/mysys/thr_mutex.c | 6 +- mysql-wsrep-5.6/mysys/tree.c | 6 +- mysql-wsrep-5.6/mysys/waiting_threads.c | 8 +- mysql-wsrep-5.6/mysys_ssl/my_default.cc | 90 +- mysql-wsrep-5.6/mysys_ssl/my_getopt.cc | 4 +- .../packaging/WiX/mysql_server.wxs.in | 8 +- .../deb-jessie/source/include-binaries | 3 +- .../deb-precise/source/include-binaries | 3 +- .../deb-trusty/source/include-binaries | 3 +- .../deb-utopic/source/include-binaries | 3 +- .../deb-vivid/source/include-binaries | 3 +- .../deb-wheezy/source/include-binaries | 3 +- .../deb-wily/source/include-binaries | 3 +- .../packaging/deb-xenial/changelog | 143 +++ mysql-wsrep-5.6/packaging/deb-xenial/compat | 1 + mysql-wsrep-5.6/packaging/deb-xenial/control | 192 ++++ .../packaging/deb-xenial/copyright | 41 + .../deb-xenial/extra/apparmor-profile | 47 + .../deb-xenial/extra/my.cnf.fallback | 25 + .../deb-xenial/extra/mysql-systemd-start | 84 ++ .../packaging/deb-xenial/extra/mysql.cnf | 26 + .../packaging/deb-xenial/extra/mysql.conf.cnf | 22 + .../deb-xenial/extra/mysql_embedded.1 | 1 + .../packaging/deb-xenial/extra/mysqld.cnf | 48 + .../deb-xenial/libmysqlclient-dev.install | 29 + .../libmysqlclient-dev.lintian-overrides | 21 + .../deb-xenial/libmysqlclient18.install | 19 + .../libmysqlclient18.lintian-overrides | 21 + .../deb-xenial/libmysqld-dev.install | 20 + .../libmysqld-dev.lintian-overrides | 19 + .../packaging/deb-xenial/mysql-client.install | 18 + .../deb-xenial/mysql-client.lintian-overrides | 19 + .../packaging/deb-xenial/mysql-common.dirs | 16 + .../packaging/deb-xenial/mysql-common.install | 32 + .../deb-xenial/mysql-common.lintian-overrides | 19 + .../deb-xenial/mysql-common.postinst | 25 + .../packaging/deb-xenial/mysql-common.postrm | 25 + .../deb-xenial/mysql-community-bench.install | 19 + .../mysql-community-bench.lintian-overrides | 19 + .../deb-xenial/mysql-community-client.install | 56 + .../mysql-community-client.lintian-overrides | 21 + .../deb-xenial/mysql-community-server.config | 88 ++ .../deb-xenial/mysql-community-server.dirs | 19 + .../deb-xenial/mysql-community-server.install | 94 ++ .../mysql-community-server.lintian-overrides | 23 + .../mysql-community-server.mysql.init | 192 ++++ .../mysql-community-server.mysql.service | 33 + .../mysql-community-server.postinst | 95 ++ .../deb-xenial/mysql-community-server.postrm | 155 +++ .../deb-xenial/mysql-community-server.preinst | 123 +++ .../deb-xenial/mysql-community-server.prerm | 24 + .../mysql-community-server.templates | 33 + .../deb-xenial/mysql-community-source.install | 21 + .../mysql-community-source.lintian-overrides | 19 + .../deb-xenial/mysql-community-test.install | 20 + .../deb-xenial/mysql-community-test.links | 17 + .../mysql-community-test.lintian-overrides | 19 + .../packaging/deb-xenial/mysql-server.install | 18 + .../deb-xenial/mysql-server.lintian-overrides | 19 + .../deb-xenial/mysql-testsuite.install | 18 + .../mysql-testsuite.lintian-overrides | 19 + .../patches/fix-man-page-links.patch | 14 + .../patches/fix-mtr-search-paths.patch | 13 + .../patches/fix-mysql_install_db.patch | 43 + .../packaging/deb-xenial/patches/series | 18 + mysql-wsrep-5.6/packaging/deb-xenial/rules | 137 +++ .../packaging/deb-xenial/source/format | 1 + .../deb-xenial/source/include-binaries | 34 + mysql-wsrep-5.6/packaging/deb-xenial/watch | 2 + .../packaging/rpm-docker/mysql.spec.in | 8 +- .../packaging/rpm-fedora/CMakeLists.txt | 4 +- .../mysql-5.6-libmysqlclient-symbols.patch | 960 ------------------ .../packaging/rpm-fedora/mysql.spec.in | 54 +- .../packaging/rpm-oel/CMakeLists.txt | 5 +- .../mysql-5.6-libmysqlclient-symbols.patch | 960 ------------------ mysql-wsrep-5.6/packaging/rpm-oel/mysql.init | 2 +- .../packaging/rpm-oel/mysql.spec.in | 69 +- mysql-wsrep-5.6/packaging/rpm-sles/mysql.init | 2 +- .../packaging/rpm-sles/mysql.spec.in | 51 +- .../plugin/audit_null/audit_null.c | 12 +- mysql-wsrep-5.6/plugin/auth/dialog.c | 14 +- mysql-wsrep-5.6/plugin/auth/mysql_no_login.c | 6 +- .../plugin/daemon_example/daemon_example.cc | 8 +- .../plugin/fulltext/plugin_example.c | 14 +- .../utilities/engine_loader.c | 6 + .../innodb_memcache/src/innodb_engine.c | 5 +- .../password_validation/validate_password.cc | 18 +- .../plugin/udf_services/CMakeLists.txt | 16 + .../plugin/udf_services/test_udf_services.cc | 101 ++ mysql-wsrep-5.6/regex/regcomp.c | 10 +- mysql-wsrep-5.6/regex/split.c | 8 + mysql-wsrep-5.6/scripts/mysqld_multi.sh | 8 +- mysql-wsrep-5.6/scripts/mysqld_safe.sh | 79 +- mysql-wsrep-5.6/sql-common/client.c | 219 +++- mysql-wsrep-5.6/sql/binlog.cc | 104 +- mysql-wsrep-5.6/sql/binlog.h | 6 +- mysql-wsrep-5.6/sql/field.cc | 86 +- mysql-wsrep-5.6/sql/field.h | 18 +- mysql-wsrep-5.6/sql/field_conv.cc | 2 +- mysql-wsrep-5.6/sql/filesort.cc | 4 +- mysql-wsrep-5.6/sql/ha_ndb_index_stat.cc | 4 +- mysql-wsrep-5.6/sql/ha_ndbcluster.cc | 12 +- mysql-wsrep-5.6/sql/ha_ndbcluster_binlog.cc | 4 +- mysql-wsrep-5.6/sql/ha_partition.cc | 10 +- mysql-wsrep-5.6/sql/handler.cc | 37 +- mysql-wsrep-5.6/sql/handler.h | 12 +- mysql-wsrep-5.6/sql/hostname.cc | 4 +- mysql-wsrep-5.6/sql/init.h | 4 +- mysql-wsrep-5.6/sql/item.cc | 58 +- mysql-wsrep-5.6/sql/item.h | 55 +- mysql-wsrep-5.6/sql/item_func.cc | 14 +- mysql-wsrep-5.6/sql/item_geofunc.cc | 4 +- mysql-wsrep-5.6/sql/item_geofunc.h | 16 +- mysql-wsrep-5.6/sql/item_sum.cc | 4 +- mysql-wsrep-5.6/sql/item_sum.h | 6 +- mysql-wsrep-5.6/sql/item_timefunc.cc | 8 +- mysql-wsrep-5.6/sql/log.cc | 86 +- mysql-wsrep-5.6/sql/log.h | 12 +- mysql-wsrep-5.6/sql/log_event.cc | 182 +++- mysql-wsrep-5.6/sql/log_event.h | 12 +- mysql-wsrep-5.6/sql/log_event_old.cc | 52 +- mysql-wsrep-5.6/sql/log_event_old.h | 6 +- mysql-wsrep-5.6/sql/mdl.cc | 6 +- mysql-wsrep-5.6/sql/mf_iocache.cc | 4 +- mysql-wsrep-5.6/sql/mysqld.cc | 67 +- mysql-wsrep-5.6/sql/mysqld.h | 8 +- mysql-wsrep-5.6/sql/net_serv.cc | 30 +- mysql-wsrep-5.6/sql/opt_range.cc | 11 +- mysql-wsrep-5.6/sql/partition_info.cc | 4 +- mysql-wsrep-5.6/sql/password.c | 17 +- mysql-wsrep-5.6/sql/rpl_filter.cc | 4 +- mysql-wsrep-5.6/sql/rpl_info_dummy.cc | 74 +- mysql-wsrep-5.6/sql/rpl_info_file.cc | 4 +- mysql-wsrep-5.6/sql/rpl_info_table.cc | 6 +- mysql-wsrep-5.6/sql/rpl_master.cc | 84 +- mysql-wsrep-5.6/sql/rpl_master.h | 4 +- mysql-wsrep-5.6/sql/rpl_mi.cc | 4 +- mysql-wsrep-5.6/sql/rpl_rli.cc | 17 +- mysql-wsrep-5.6/sql/rpl_rli.h | 18 +- mysql-wsrep-5.6/sql/rpl_rli_pdb.cc | 6 +- mysql-wsrep-5.6/sql/rpl_slave.cc | 279 +++-- mysql-wsrep-5.6/sql/rpl_utility.cc | 47 +- mysql-wsrep-5.6/sql/sp.cc | 7 +- mysql-wsrep-5.6/sql/sql_acl.cc | 55 +- mysql-wsrep-5.6/sql/sql_analyse.cc | 26 +- mysql-wsrep-5.6/sql/sql_analyse.h | 18 +- mysql-wsrep-5.6/sql/sql_audit.cc | 4 +- mysql-wsrep-5.6/sql/sql_audit.h | 4 +- mysql-wsrep-5.6/sql/sql_base.cc | 14 +- mysql-wsrep-5.6/sql/sql_cache.cc | 4 +- mysql-wsrep-5.6/sql/sql_class.cc | 22 +- mysql-wsrep-5.6/sql/sql_class.h | 22 +- mysql-wsrep-5.6/sql/sql_connect.cc | 4 +- mysql-wsrep-5.6/sql/sql_cursor.cc | 6 +- mysql-wsrep-5.6/sql/sql_db.cc | 4 +- mysql-wsrep-5.6/sql/sql_executor.cc | 10 +- mysql-wsrep-5.6/sql/sql_executor.h | 4 +- mysql-wsrep-5.6/sql/sql_handler.cc | 4 +- mysql-wsrep-5.6/sql/sql_insert.cc | 23 +- mysql-wsrep-5.6/sql/sql_lex.cc | 3 + mysql-wsrep-5.6/sql/sql_load.cc | 79 +- mysql-wsrep-5.6/sql/sql_manager.cc | 4 +- mysql-wsrep-5.6/sql/sql_optimizer.cc | 6 +- mysql-wsrep-5.6/sql/sql_parse.cc | 64 +- mysql-wsrep-5.6/sql/sql_parse.h | 1 + mysql-wsrep-5.6/sql/sql_planner.cc | 2 +- mysql-wsrep-5.6/sql/sql_plugin.cc | 17 +- mysql-wsrep-5.6/sql/sql_prepare.cc | 13 +- mysql-wsrep-5.6/sql/sql_select.cc | 4 +- mysql-wsrep-5.6/sql/sql_servers.cc | 4 +- mysql-wsrep-5.6/sql/sql_show.cc | 8 +- mysql-wsrep-5.6/sql/sql_string.cc | 7 +- mysql-wsrep-5.6/sql/sql_table.cc | 2 +- mysql-wsrep-5.6/sql/sql_time.cc | 8 +- mysql-wsrep-5.6/sql/sql_tmp_table.cc | 3 +- mysql-wsrep-5.6/sql/sql_udf.cc | 4 +- mysql-wsrep-5.6/sql/sql_update.cc | 8 +- mysql-wsrep-5.6/sql/sql_yacc.yy | 13 +- mysql-wsrep-5.6/sql/sys_vars.cc | 32 +- mysql-wsrep-5.6/sql/table.cc | 27 +- mysql-wsrep-5.6/sql/table.h | 4 +- mysql-wsrep-5.6/sql/table_cache.cc | 4 +- mysql-wsrep-5.6/sql/tztime.cc | 6 +- mysql-wsrep-5.6/sql/udf_example.cc | 76 +- mysql-wsrep-5.6/sql/wsrep_applier.cc | 7 - mysql-wsrep-5.6/sql/wsrep_binlog.h | 2 +- mysql-wsrep-5.6/sql/wsrep_hton.cc | 8 +- mysql-wsrep-5.6/sql/wsrep_mysqld.cc | 11 +- mysql-wsrep-5.6/sql/wsrep_mysqld.h | 6 +- mysql-wsrep-5.6/sql/wsrep_thd.cc | 3 + mysql-wsrep-5.6/sql/wsrep_var.cc | 49 +- mysql-wsrep-5.6/sql/wsrep_var.h | 2 + .../storage/archive/archive_reader.c | 9 +- .../storage/blackhole/ha_blackhole.cc | 4 +- mysql-wsrep-5.6/storage/csv/ha_tina.cc | 4 +- mysql-wsrep-5.6/storage/example/ha_example.cc | 6 +- .../storage/federated/ha_federated.cc | 4 +- mysql-wsrep-5.6/storage/heap/hp_hash.c | 4 +- mysql-wsrep-5.6/storage/heap/hp_test2.c | 4 +- .../storage/innobase/btr/btr0btr.cc | 20 +- .../storage/innobase/btr/btr0cur.cc | 16 +- .../storage/innobase/btr/btr0sea.cc | 4 +- .../storage/innobase/buf/buf0buddy.cc | 6 +- .../storage/innobase/buf/buf0buf.cc | 4 +- .../storage/innobase/buf/buf0dump.cc | 8 +- .../storage/innobase/buf/buf0flu.cc | 4 +- .../storage/innobase/buf/buf0lru.cc | 18 +- .../storage/innobase/data/data0data.cc | 7 +- .../storage/innobase/dict/dict0crea.cc | 12 +- .../storage/innobase/dict/dict0dict.cc | 14 +- .../storage/innobase/dict/dict0load.cc | 26 +- .../storage/innobase/dict/dict0mem.cc | 4 +- .../storage/innobase/dict/dict0stats_bg.cc | 4 +- .../storage/innobase/fil/fil0fil.cc | 6 +- .../storage/innobase/fsp/fsp0fsp.cc | 39 +- .../storage/innobase/fts/fts0blex.cc | 26 +- .../storage/innobase/fts/fts0fts.cc | 162 ++- .../storage/innobase/fts/fts0opt.cc | 54 +- .../storage/innobase/fts/fts0que.cc | 28 +- .../storage/innobase/fts/fts0tlex.cc | 26 +- .../storage/innobase/fts/make_parser.sh | 28 +- .../storage/innobase/handler/ha_innodb.cc | 95 +- .../storage/innobase/handler/ha_innodb.h | 20 +- .../storage/innobase/handler/handler0alter.cc | 83 +- .../storage/innobase/handler/i_s.cc | 41 +- .../storage/innobase/ibuf/ibuf0ibuf.cc | 138 +-- .../storage/innobase/include/api0api.h | 4 +- .../storage/innobase/include/btr0btr.h | 84 +- .../storage/innobase/include/btr0btr.ic | 18 +- .../storage/innobase/include/btr0cur.h | 36 +- .../storage/innobase/include/btr0pcur.h | 4 +- .../storage/innobase/include/btr0sea.h | 4 +- .../storage/innobase/include/btr0types.h | 18 +- .../storage/innobase/include/buf0buddy.h | 6 +- .../storage/innobase/include/buf0buddy.ic | 6 +- .../storage/innobase/include/buf0buf.h | 68 +- .../storage/innobase/include/buf0flu.h | 6 +- .../storage/innobase/include/buf0lru.h | 10 +- .../storage/innobase/include/data0data.h | 84 +- .../storage/innobase/include/data0data.ic | 8 +- .../storage/innobase/include/dict0boot.h | 8 +- .../storage/innobase/include/dict0crea.h | 8 +- .../storage/innobase/include/dict0crea.ic | 4 +- .../storage/innobase/include/dict0dict.h | 260 ++--- .../storage/innobase/include/dict0dict.ic | 7 +- .../storage/innobase/include/dict0load.h | 4 +- .../storage/innobase/include/dict0mem.h | 16 +- .../storage/innobase/include/dict0stats.h | 10 +- .../storage/innobase/include/dict0stats_bg.h | 4 +- .../storage/innobase/include/dyn0dyn.h | 22 +- .../storage/innobase/include/dyn0dyn.ic | 4 +- .../storage/innobase/include/fil0fil.h | 20 +- .../storage/innobase/include/fsp0fsp.h | 18 +- .../storage/innobase/include/fts0ast.h | 10 +- .../storage/innobase/include/fts0fts.h | 60 +- .../storage/innobase/include/fts0priv.h | 88 +- .../storage/innobase/include/fts0priv.ic | 8 +- .../storage/innobase/include/ha_prototypes.h | 22 +- .../storage/innobase/include/handler0alter.h | 10 +- .../storage/innobase/include/ibuf0ibuf.h | 44 +- .../storage/innobase/include/lock0lock.h | 36 +- .../storage/innobase/include/lock0priv.h | 4 +- .../storage/innobase/include/log0recv.h | 4 +- .../storage/innobase/include/mach0data.h | 38 +- .../storage/innobase/include/mem0mem.h | 4 +- .../storage/innobase/include/mem0mem.ic | 6 +- .../storage/innobase/include/mtr0mtr.h | 10 +- .../storage/innobase/include/mtr0mtr.ic | 4 +- .../storage/innobase/include/os0file.h | 16 +- .../storage/innobase/include/os0thread.h | 4 +- .../storage/innobase/include/page0cur.h | 8 +- .../storage/innobase/include/page0page.h | 56 +- .../storage/innobase/include/page0types.h | 10 +- .../storage/innobase/include/page0zip.h | 50 +- .../storage/innobase/include/pars0pars.h | 6 +- .../storage/innobase/include/read0read.h | 4 +- .../storage/innobase/include/rem0cmp.h | 6 +- .../storage/innobase/include/rem0rec.h | 152 +-- .../storage/innobase/include/rem0rec.ic | 5 +- .../storage/innobase/include/row0ftsort.h | 6 +- .../storage/innobase/include/row0import.h | 8 +- .../storage/innobase/include/row0ins.h | 14 +- .../storage/innobase/include/row0log.h | 32 +- .../storage/innobase/include/row0merge.h | 38 +- .../storage/innobase/include/row0mysql.h | 44 +- .../storage/innobase/include/row0purge.h | 8 +- .../storage/innobase/include/row0quiesce.h | 8 +- .../storage/innobase/include/row0row.h | 30 +- .../storage/innobase/include/row0sel.h | 6 +- .../storage/innobase/include/row0uins.h | 4 +- .../storage/innobase/include/row0umod.h | 4 +- .../storage/innobase/include/row0upd.h | 18 +- .../storage/innobase/include/row0vers.h | 6 +- .../storage/innobase/include/srv0srv.h | 6 +- .../storage/innobase/include/srv0start.h | 6 +- .../storage/innobase/include/sync0arr.h | 4 +- .../storage/innobase/include/sync0rw.h | 6 +- .../storage/innobase/include/sync0rw.ic | 4 +- .../storage/innobase/include/sync0sync.h | 10 +- .../storage/innobase/include/trx0rec.h | 14 +- .../storage/innobase/include/trx0roll.h | 16 +- .../storage/innobase/include/trx0sys.h | 6 +- .../storage/innobase/include/trx0trx.h | 24 +- .../storage/innobase/include/trx0undo.h | 14 +- .../storage/innobase/include/univ.i | 8 +- .../storage/innobase/include/ut0byte.h | 8 +- .../storage/innobase/include/ut0dbg.h | 4 +- .../storage/innobase/include/ut0mem.h | 4 +- .../storage/innobase/include/ut0rnd.h | 12 +- .../storage/innobase/include/ut0ut.h | 8 +- .../storage/innobase/lock/lock0lock.cc | 111 +- .../storage/innobase/lock/lock0wait.cc | 4 +- .../storage/innobase/log/log0log.cc | 6 +- .../storage/innobase/log/log0recv.cc | 6 +- .../storage/innobase/mem/mem0dbg.cc | 6 +- .../storage/innobase/mtr/mtr0mtr.cc | 8 +- .../storage/innobase/os/os0file.cc | 12 +- .../storage/innobase/page/page0page.cc | 4 +- .../storage/innobase/page/page0zip.cc | 11 +- .../storage/innobase/pars/lexyy.cc | 10 +- .../storage/innobase/pars/make_flex.sh | 12 +- .../storage/innobase/pars/pars0pars.cc | 8 +- .../storage/innobase/rem/rem0cmp.cc | 19 +- .../storage/innobase/rem/rem0rec.cc | 12 +- .../storage/innobase/row/row0ftsort.cc | 18 +- .../storage/innobase/row/row0import.cc | 24 +- .../storage/innobase/row/row0ins.cc | 30 +- .../storage/innobase/row/row0log.cc | 48 +- .../storage/innobase/row/row0merge.cc | 30 +- .../storage/innobase/row/row0mysql.cc | 57 +- .../storage/innobase/row/row0purge.cc | 24 +- .../storage/innobase/row/row0quiesce.cc | 16 +- .../storage/innobase/row/row0row.cc | 18 +- .../storage/innobase/row/row0sel.cc | 20 +- .../storage/innobase/row/row0uins.cc | 10 +- .../storage/innobase/row/row0umod.cc | 27 +- .../storage/innobase/row/row0undo.cc | 7 +- .../storage/innobase/row/row0upd.cc | 29 +- .../storage/innobase/srv/srv0mon.cc | 7 +- .../storage/innobase/srv/srv0srv.cc | 16 +- .../storage/innobase/srv/srv0start.cc | 10 +- .../storage/innobase/sync/sync0sync.cc | 6 +- .../storage/innobase/trx/trx0purge.cc | 4 +- .../storage/innobase/trx/trx0rec.cc | 10 +- .../storage/innobase/trx/trx0roll.cc | 6 +- .../storage/innobase/trx/trx0trx.cc | 14 +- .../storage/innobase/trx/trx0undo.cc | 14 +- .../storage/myisam/ft_boolean_search.c | 6 +- .../storage/myisam/ft_nlq_search.c | 14 +- mysql-wsrep-5.6/storage/myisam/ft_parser.c | 4 +- mysql-wsrep-5.6/storage/myisam/ft_stopwords.c | 6 +- mysql-wsrep-5.6/storage/myisam/ha_myisam.cc | 30 +- mysql-wsrep-5.6/storage/myisam/mi_check.c | 43 +- mysql-wsrep-5.6/storage/myisam/mi_extrafunc.h | 11 +- mysql-wsrep-5.6/storage/myisam/mi_keycache.c | 5 +- mysql-wsrep-5.6/storage/myisam/mi_open.c | 4 +- mysql-wsrep-5.6/storage/myisam/mi_packrec.c | 14 +- mysql-wsrep-5.6/storage/myisam/mi_search.c | 22 +- mysql-wsrep-5.6/storage/myisam/mi_static.c | 4 +- mysql-wsrep-5.6/storage/myisam/mi_test1.c | 6 +- .../storage/myisam/myisam_ftdump.c | 6 +- mysql-wsrep-5.6/storage/myisam/myisamchk.c | 22 +- mysql-wsrep-5.6/storage/myisam/myisamlog.c | 8 +- mysql-wsrep-5.6/storage/myisam/myisampack.c | 15 +- mysql-wsrep-5.6/storage/myisam/rt_test.c | 8 +- mysql-wsrep-5.6/storage/myisam/sort.c | 4 +- mysql-wsrep-5.6/storage/myisam/sp_key.c | 4 +- mysql-wsrep-5.6/storage/myisam/sp_test.c | 6 +- .../storage/myisammrg/ha_myisammrg.cc | 8 +- .../storage/ndb/include/ndb_global.h | 10 +- .../storage/ndb/include/util/ndb_opts.h | 4 +- .../storage/ndb/src/common/util/ndb_opts.c | 6 +- .../storage/ndb/src/cw/cpcd/main.cpp | 4 +- .../ndb/tools/restore/restore_main.cpp | 4 +- .../perfschema/table_events_statements.cc | 16 +- mysql-wsrep-5.6/strings/conf_to_src.c | 10 +- mysql-wsrep-5.6/strings/ctype-big5.c | 16 +- mysql-wsrep-5.6/strings/ctype-bin.c | 50 +- mysql-wsrep-5.6/strings/ctype-cp932.c | 20 +- mysql-wsrep-5.6/strings/ctype-czech.c | 14 +- mysql-wsrep-5.6/strings/ctype-euc_kr.c | 12 +- mysql-wsrep-5.6/strings/ctype-eucjpms.c | 14 +- mysql-wsrep-5.6/strings/ctype-gb2312.c | 12 +- mysql-wsrep-5.6/strings/ctype-gbk.c | 16 +- mysql-wsrep-5.6/strings/ctype-latin1.c | 16 +- mysql-wsrep-5.6/strings/ctype-mb.c | 24 +- mysql-wsrep-5.6/strings/ctype-simple.c | 58 +- mysql-wsrep-5.6/strings/ctype-sjis.c | 18 +- mysql-wsrep-5.6/strings/ctype-tis620.c | 14 +- mysql-wsrep-5.6/strings/ctype-ucs2.c | 126 +-- mysql-wsrep-5.6/strings/ctype-ujis.c | 16 +- mysql-wsrep-5.6/strings/ctype-utf8.c | 34 +- mysql-wsrep-5.6/strings/ctype-win1250ch.c | 12 +- .../support-files/MacOSX/ReadMe.txt | 7 - mysql-wsrep-5.6/support-files/mysql.server.sh | 2 +- mysql-wsrep-5.6/support-files/mysql.spec.sh | 37 +- mysql-wsrep-5.6/tests/mysql_client_fw.c | 4 +- mysql-wsrep-5.6/tests/mysql_client_test.c | 72 ++ mysql-wsrep-5.6/tests/thread_test.c | 8 +- mysql-wsrep-5.6/unittest/CMakeLists.txt | 6 +- mysql-wsrep-5.6/unittest/README.txt | 52 - .../unittest/gunit/rpl_group_set-t.cc | 14 +- .../unittest/gunit/yassl/CMakeLists.txt | 3 +- mysql-wsrep-5.6/unittest/mytap/tap.h | 14 +- mysql-wsrep-5.6/unittest/unit.pl | 136 --- mysql-wsrep-5.6/vio/test-sslclient.c | 4 +- mysql-wsrep-5.6/vio/test-sslserver.c | 4 +- mysql-wsrep-5.6/vio/vio.c | 12 +- mysql-wsrep-5.6/vio/viosocket.c | 12 +- mysql-wsrep-5.6/vio/viosslfactories.c | 4 +- mysql-wsrep-5.6/wsrep/wsrep_dummy.c | 2 +- mysql-wsrep-5.6/wsrep/wsrep_loader.c | 37 +- 743 files changed, 16182 insertions(+), 9050 deletions(-) create mode 100644 mysql-wsrep-5.6/CONTRIBUTORS.txt create mode 100644 mysql-wsrep-5.6/CONTRIBUTOR_AGREEMENT.txt create mode 100644 mysql-wsrep-5.6/libmysql/libmysql.ver16.in create mode 100644 mysql-wsrep-5.6/mysql-test/extra/rpl_tests/rpl_generate_mts_gap.test create mode 100644 mysql-wsrep-5.6/mysql-test/extra/rpl_tests/rpl_mts_relay_log_recovery.test delete mode 100644 mysql-wsrep-5.6/mysql-test/include/python_with_json.inc create mode 100644 mysql-wsrep-5.6/mysql-test/r/mysql_client_test_qcache.result create mode 100644 mysql-wsrep-5.6/mysql-test/r/ssl_ca.result create mode 100644 mysql-wsrep-5.6/mysql-test/r/udf_services.result create mode 100644 mysql-wsrep-5.6/mysql-test/r/variables-win.result create mode 100644 mysql-wsrep-5.6/mysql-test/std_data/bug20683959loaddata.txt create mode 100644 mysql-wsrep-5.6/mysql-test/suite/binlog/r/binlog_dmls_on_tmp_tables_readonly.result create mode 100644 mysql-wsrep-5.6/mysql-test/suite/binlog/t/binlog_dmls_on_tmp_tables_readonly.test create mode 100644 mysql-wsrep-5.6/mysql-test/suite/galera/galera_2nodes_as_master_slave.cnf create mode 100644 mysql-wsrep-5.6/mysql-test/suite/galera/galera_2nodes_as_master_with_repl_filter.cnf create mode 100644 mysql-wsrep-5.6/mysql-test/suite/galera/r/GAL-401.result create mode 100644 mysql-wsrep-5.6/mysql-test/suite/galera/r/MW-284.result create mode 100644 mysql-wsrep-5.6/mysql-test/suite/galera/r/MW-285.result create mode 100644 mysql-wsrep-5.6/mysql-test/suite/galera/r/MW-286.result create mode 100644 mysql-wsrep-5.6/mysql-test/suite/galera/r/MW-292.result create mode 100644 mysql-wsrep-5.6/mysql-test/suite/galera/r/ev51914.result create mode 100644 mysql-wsrep-5.6/mysql-test/suite/galera/r/galera#414.result create mode 100644 mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_admin.result create mode 100644 mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_desync_overlapped.result create mode 100644 mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_restart_on_unknown_option.result create mode 100644 mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_toi_ddl_fk_update.result create mode 100644 mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_toi_ddl_online.result create mode 100644 mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_toi_drop_database.result create mode 100644 mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_toi_truncate.result create mode 100644 mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_var_max_ws_rows.result create mode 100644 mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_wsrep_provider_options_syntax.result create mode 100644 mysql-wsrep-5.6/mysql-test/suite/galera/r/lp1376747-2.result create mode 100644 mysql-wsrep-5.6/mysql-test/suite/galera/r/lp1376747-3.result create mode 100644 mysql-wsrep-5.6/mysql-test/suite/galera/r/lp1376747-4.result create mode 100644 mysql-wsrep-5.6/mysql-test/suite/galera/r/lp1376747.result create mode 100644 mysql-wsrep-5.6/mysql-test/suite/galera/r/pxc-421.result create mode 100644 mysql-wsrep-5.6/mysql-test/suite/galera/t/GAL-401.test create mode 100644 mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-284.cnf create mode 100644 mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-284.test create mode 100644 mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-285.test create mode 100644 mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-286.test create mode 100644 mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-292.test create mode 100644 mysql-wsrep-5.6/mysql-test/suite/galera/t/ev51914.test create mode 100644 mysql-wsrep-5.6/mysql-test/suite/galera/t/galera#414.cnf create mode 100644 mysql-wsrep-5.6/mysql-test/suite/galera/t/galera#414.test create mode 100644 mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_admin.test create mode 100644 mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_desync_overlapped.test create mode 100644 mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_restart_on_unknown_option.test create mode 100644 mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_toi_ddl_fk_update.test create mode 100644 mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_toi_ddl_online.test create mode 100644 mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_toi_drop_database.test create mode 100644 mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_toi_truncate.test create mode 100644 mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_var_max_ws_rows.test create mode 100644 mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_wsrep_provider_options_syntax.test create mode 100644 mysql-wsrep-5.6/mysql-test/suite/galera/t/lp1376747-2.test create mode 100644 mysql-wsrep-5.6/mysql-test/suite/galera/t/lp1376747-3.test create mode 100644 mysql-wsrep-5.6/mysql-test/suite/galera/t/lp1376747-4.test create mode 100644 mysql-wsrep-5.6/mysql-test/suite/galera/t/lp1376747.test create mode 100644 mysql-wsrep-5.6/mysql-test/suite/galera/t/pxc-421.test create mode 100644 mysql-wsrep-5.6/mysql-test/suite/galera_3nodes/t/galera_pc_bootstrap.cnf create mode 100644 mysql-wsrep-5.6/mysql-test/suite/galera_3nodes/t/galera_pc_weight.cnf mode change 100755 => 100644 mysql-wsrep-5.6/mysql-test/suite/innodb/r/alter_rename_existing.result create mode 100644 mysql-wsrep-5.6/mysql-test/suite/innodb/r/flush-hang.result create mode 100644 mysql-wsrep-5.6/mysql-test/suite/innodb/r/import_update_stats.result create mode 100644 mysql-wsrep-5.6/mysql-test/suite/innodb/r/innodb-index-online-norebuild.result create mode 100644 mysql-wsrep-5.6/mysql-test/suite/innodb/r/innodb_deadlock_with_autoinc.result mode change 100755 => 100644 mysql-wsrep-5.6/mysql-test/suite/innodb/t/alter_rename_existing.test create mode 100644 mysql-wsrep-5.6/mysql-test/suite/innodb/t/flush-hang.test create mode 100644 mysql-wsrep-5.6/mysql-test/suite/innodb/t/import_update_stats.test create mode 100644 mysql-wsrep-5.6/mysql-test/suite/innodb/t/innodb-index-online-norebuild.test create mode 100644 mysql-wsrep-5.6/mysql-test/suite/innodb/t/innodb_deadlock_with_autoinc-master.opt create mode 100644 mysql-wsrep-5.6/mysql-test/suite/innodb/t/innodb_deadlock_with_autoinc.test create mode 100755 mysql-wsrep-5.6/mysql-test/suite/opt_trace/validate_json.pl delete mode 100755 mysql-wsrep-5.6/mysql-test/suite/opt_trace/validate_json.py delete mode 100644 mysql-wsrep-5.6/mysql-test/suite/perfschema/r/aggregate.result delete mode 100644 mysql-wsrep-5.6/mysql-test/suite/perfschema/t/aggregate.test create mode 100644 mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_autoinc_lock_style.result delete mode 100644 mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_gtid_stress_failover.result create mode 100644 mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_mts_relay_log_post_crash_recovery.result create mode 100644 mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_mts_relay_log_recovery_on_error.result create mode 100644 mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_row_slave_skip_error_all.result create mode 100644 mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_sql_thread_error.result create mode 100644 mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_zombie_dump_threads.result create mode 100644 mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_autoinc_lock_style.test delete mode 100644 mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_gtid_stress_failover.cnf delete mode 100644 mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_gtid_stress_failover.test create mode 100644 mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_mts_relay_log_post_crash_recovery-slave.opt create mode 100644 mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_mts_relay_log_post_crash_recovery.test create mode 100644 mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_mts_relay_log_recovery_on_error-slave.opt create mode 100644 mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_mts_relay_log_recovery_on_error.test create mode 100644 mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_row_slave_skip_error_all-slave.opt create mode 100644 mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_row_slave_skip_error_all.test create mode 100644 mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_sql_thread_error.test create mode 100644 mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_zombie_dump_threads.test create mode 100644 mysql-wsrep-5.6/mysql-test/t/mysql_client_test_qcache-master.opt create mode 100644 mysql-wsrep-5.6/mysql-test/t/mysql_client_test_qcache.test create mode 100644 mysql-wsrep-5.6/mysql-test/t/ssl_ca-master.opt create mode 100644 mysql-wsrep-5.6/mysql-test/t/ssl_ca.test create mode 100644 mysql-wsrep-5.6/mysql-test/t/udf_services-master.opt create mode 100644 mysql-wsrep-5.6/mysql-test/t/udf_services.test create mode 100644 mysql-wsrep-5.6/mysql-test/t/variables-win.test create mode 100644 mysql-wsrep-5.6/packaging/deb-xenial/changelog create mode 100644 mysql-wsrep-5.6/packaging/deb-xenial/compat create mode 100644 mysql-wsrep-5.6/packaging/deb-xenial/control create mode 100644 mysql-wsrep-5.6/packaging/deb-xenial/copyright create mode 100644 mysql-wsrep-5.6/packaging/deb-xenial/extra/apparmor-profile create mode 100644 mysql-wsrep-5.6/packaging/deb-xenial/extra/my.cnf.fallback create mode 100644 mysql-wsrep-5.6/packaging/deb-xenial/extra/mysql-systemd-start create mode 100644 mysql-wsrep-5.6/packaging/deb-xenial/extra/mysql.cnf create mode 100644 mysql-wsrep-5.6/packaging/deb-xenial/extra/mysql.conf.cnf create mode 100644 mysql-wsrep-5.6/packaging/deb-xenial/extra/mysql_embedded.1 create mode 100644 mysql-wsrep-5.6/packaging/deb-xenial/extra/mysqld.cnf create mode 100644 mysql-wsrep-5.6/packaging/deb-xenial/libmysqlclient-dev.install create mode 100644 mysql-wsrep-5.6/packaging/deb-xenial/libmysqlclient-dev.lintian-overrides create mode 100644 mysql-wsrep-5.6/packaging/deb-xenial/libmysqlclient18.install create mode 100644 mysql-wsrep-5.6/packaging/deb-xenial/libmysqlclient18.lintian-overrides create mode 100644 mysql-wsrep-5.6/packaging/deb-xenial/libmysqld-dev.install create mode 100644 mysql-wsrep-5.6/packaging/deb-xenial/libmysqld-dev.lintian-overrides create mode 100644 mysql-wsrep-5.6/packaging/deb-xenial/mysql-client.install create mode 100644 mysql-wsrep-5.6/packaging/deb-xenial/mysql-client.lintian-overrides create mode 100644 mysql-wsrep-5.6/packaging/deb-xenial/mysql-common.dirs create mode 100644 mysql-wsrep-5.6/packaging/deb-xenial/mysql-common.install create mode 100644 mysql-wsrep-5.6/packaging/deb-xenial/mysql-common.lintian-overrides create mode 100644 mysql-wsrep-5.6/packaging/deb-xenial/mysql-common.postinst create mode 100644 mysql-wsrep-5.6/packaging/deb-xenial/mysql-common.postrm create mode 100644 mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-bench.install create mode 100644 mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-bench.lintian-overrides create mode 100644 mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-client.install create mode 100644 mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-client.lintian-overrides create mode 100755 mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.config create mode 100644 mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.dirs create mode 100644 mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.install create mode 100644 mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.lintian-overrides create mode 100755 mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.mysql.init create mode 100644 mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.mysql.service create mode 100755 mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.postinst create mode 100755 mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.postrm create mode 100755 mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.preinst create mode 100755 mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.prerm create mode 100644 mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.templates create mode 100644 mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-source.install create mode 100644 mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-source.lintian-overrides create mode 100644 mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-test.install create mode 100644 mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-test.links create mode 100644 mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-test.lintian-overrides create mode 100644 mysql-wsrep-5.6/packaging/deb-xenial/mysql-server.install create mode 100644 mysql-wsrep-5.6/packaging/deb-xenial/mysql-server.lintian-overrides create mode 100644 mysql-wsrep-5.6/packaging/deb-xenial/mysql-testsuite.install create mode 100644 mysql-wsrep-5.6/packaging/deb-xenial/mysql-testsuite.lintian-overrides create mode 100644 mysql-wsrep-5.6/packaging/deb-xenial/patches/fix-man-page-links.patch create mode 100644 mysql-wsrep-5.6/packaging/deb-xenial/patches/fix-mtr-search-paths.patch create mode 100644 mysql-wsrep-5.6/packaging/deb-xenial/patches/fix-mysql_install_db.patch create mode 100644 mysql-wsrep-5.6/packaging/deb-xenial/patches/series create mode 100755 mysql-wsrep-5.6/packaging/deb-xenial/rules create mode 100644 mysql-wsrep-5.6/packaging/deb-xenial/source/format create mode 100644 mysql-wsrep-5.6/packaging/deb-xenial/source/include-binaries create mode 100644 mysql-wsrep-5.6/packaging/deb-xenial/watch delete mode 100644 mysql-wsrep-5.6/packaging/rpm-fedora/mysql-5.6-libmysqlclient-symbols.patch delete mode 100644 mysql-wsrep-5.6/packaging/rpm-oel/mysql-5.6-libmysqlclient-symbols.patch create mode 100644 mysql-wsrep-5.6/plugin/udf_services/CMakeLists.txt create mode 100644 mysql-wsrep-5.6/plugin/udf_services/test_udf_services.cc delete mode 100644 mysql-wsrep-5.6/support-files/MacOSX/ReadMe.txt delete mode 100644 mysql-wsrep-5.6/unittest/README.txt delete mode 100644 mysql-wsrep-5.6/unittest/unit.pl diff --git a/debian/changelog b/debian/changelog index e86798b7..879dfd21 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +mysql-wsrep-5.6 (5.6.33-0~u14.04+mos1) mos; urgency=low + + * Rebuilt for MOS + * Galera 25.17 + * MySQL-wsrep from [0] + + [0] https://github.com/codership/mysql-wsrep/tree/wsrep_5.6.33-25.17 + + -- Ivan Suzdal Fri, 16 Sep 2016 14:34:04 +0000 + mysql-wsrep-5.6 (5.6.30-0~u14.04+mos1) mos; urgency=high * SECURITY UPDATE: Update to 5.6.30 to fix security issues (LP: #1572559) diff --git a/mysql-wsrep-5.6/CMakeLists.txt b/mysql-wsrep-5.6/CMakeLists.txt index ae62d194..617815c5 100644 --- a/mysql-wsrep-5.6/CMakeLists.txt +++ b/mysql-wsrep-5.6/CMakeLists.txt @@ -446,6 +446,13 @@ IF(WITH_UNIT_TESTS) ENABLE_TESTING() ENDIF() +OPTION(WITH_SYMVER16 + "Export libmysqlclient_16 and libmysqlclient_18 symbol versions" OFF) + +IF(WITH_SYMVER16) + ADD_DEFINITIONS(-DEXPORT_SYMVER16) +ENDIF() + IF(NOT WITHOUT_SERVER) SET (MYSQLD_STATIC_PLUGIN_LIBS "" CACHE INTERNAL "") # Add storage engines and plugins. @@ -468,10 +475,6 @@ ADD_SUBDIRECTORY(wsrep) ENDIF() IF(WITH_UNIT_TESTS) - ADD_SUBDIRECTORY(unittest) - ADD_SUBDIRECTORY(unittest/examples) - ADD_SUBDIRECTORY(unittest/mytap) - ADD_SUBDIRECTORY(unittest/mytap/t) # Visual Studio 11 needs this extra flag in order to compile gmock. IF(WIN32) ADD_DEFINITIONS( /D _VARIADIC_MAX=10 ) @@ -480,7 +483,10 @@ IF(WITH_UNIT_TESTS) IF(HAVE_LLVM_LIBCPP) ADD_DEFINITIONS(-DGTEST_USE_OWN_TR1_TUPLE=1) ENDIF() - ADD_SUBDIRECTORY(unittest/gunit) + ADD_SUBDIRECTORY(unittest) + ADD_SUBDIRECTORY(unittest/examples) + ADD_SUBDIRECTORY(unittest/mytap) + ADD_SUBDIRECTORY(unittest/mytap/t) ENDIF() ADD_SUBDIRECTORY(extra) diff --git a/mysql-wsrep-5.6/CONTRIBUTORS.txt b/mysql-wsrep-5.6/CONTRIBUTORS.txt new file mode 100644 index 00000000..1b0f7ee5 --- /dev/null +++ b/mysql-wsrep-5.6/CONTRIBUTORS.txt @@ -0,0 +1,25 @@ +All contributors are required to add their name and [Github username/email] +to this file in connection with their first contribution. If you are making +a contribution on behalf of a company, you should add the said company name. + +By adding your name and [Github username/email] to this file you agree that +your contribution is a contribution under a contributior agreement between +you and Codership Oy. To the extent that you are an employee of a company and +contribute in that role, you confirm that your contribution is a contribution +under the contribution license agreement between your employer and Codership +Oy; and that you have the authorization to give such confirmation. You confirm +that you have read, understood and signed the contributor license agreement +applicable to you. + +For the individual contributor agreement see file CONTRIBUTOR_AGREEMENT.txt +in the same directory as this file. + +Authors from Codership Oy: + + * + [Codership employees, add name and email/username above this line, but leave this line intact] + +Other contributors: + + * + [add name and email/username above this line, but leave this line intact] diff --git a/mysql-wsrep-5.6/CONTRIBUTOR_AGREEMENT.txt b/mysql-wsrep-5.6/CONTRIBUTOR_AGREEMENT.txt new file mode 100644 index 00000000..d8024dd9 --- /dev/null +++ b/mysql-wsrep-5.6/CONTRIBUTOR_AGREEMENT.txt @@ -0,0 +1,197 @@ +Codership Individual Contributor License Agreement + +Thank you for your interest in contributing to Galera Cluster, a project +managed by Codership Oy, a legal entity established under Finnish laws, with +its principal address at Pohjolankatu 64 A, 00600 Helsinki Finland (“We”, “Us” +or “Our”). + +This contributor agreement (“Agreement”) documents the rights granted by +contributors to Us. To make this document effective, please either accept it +in an electronic service such as clahub.com or sign and scan it and send it +to Us by email. This is a legally binding document, so please read it +carefully before agreeing to it. This Agreement covers the Galera Cluster +project: the Galera library, the Wsrep patch for MySQL and other eventual +patches to MySQL or other technologies. + +(1) Definitions + +“You” means the individual who Submits a Contribution to Us. + +“Contribution” means any work of authorship that is Submitted by You to Us in +which You own or assert ownership of the Copyright. If You do not own the +Copyright in the entire work of authorship, you need to have a separate +permission from Us. + +“Copyright” means all rights protecting works of authorship owned or +controlled by You, including copyright, moral and neighboring rights, +as appropriate, for the full term of their existence including any extensions +by You. + +“Material” means the work of authorship which is made available by Us to third +parties, i.e. the Galera library, the Wsrep patch for MySQL; other eventual +patches to MySQL; other eventual patches to other database technologies; all +these together with a database technology, such as MySQL, or its derivatives. +After You Submit the Contribution, it may be included in the Material. + +“Submit” means any form of electronic, verbal, or written communication sent +to Us or our representatives, including but not limited to electronic mailing +lists, source code control systems, and issue tracking systems that are +managed by, or on behalf of, Us for the purpose of discussing and improving +the Material, provided that such communication is (i) conspicuously marked or +otherwise designated in writing by You or Your employee as a “Contribution” or +(ii) submitted in source code control system pursuant to Section 3 (e). + +“Submission Date” means the date on which You Submit a Contribution to Us. + +“Effective Date” means the date You execute this Agreement or the date You +first Submit a Contribution to Us, whichever is earlier. + +“Media” means any portion of a Contribution which is not software. + +(2) Grant of Rights + +2.1 Copyright License + +(a) You retain ownership of the Copyright in Your Contribution and have the +same rights to use or license the Contribution which You would have had +without entering into the Agreement. In case we have in writing permitted +submitting a sublicense to licensed rights, You will not transfer the original +license, but grant us a sublicense in accordance with this Agreement. + +(b) To the maximum extent permitted by the relevant law, You grant to Us +a perpetual, worldwide, non-exclusive, transferable, royalty-free, irrevocable +license under the Copyright covering the Contribution, with the right +to sublicense such rights through multiple tiers of sublicensees, to reproduce, +modify, display, perform and distribute the Contribution as part +of the Material; provided that this license is conditioned upon compliance +with Section 2.3. + +2.2 Patent License + +For patent claims including, without limitation, method, process, and +apparatus claims which You own, control or have the right to grant, now or +in the future, You grant to Us a perpetual, worldwide, non-exclusive, +transferable, royalty-free, irrevocable patent license, with the right +to sublicense these rights to multiple tiers of sublicensees, to make, have +made, use, sell, offer for sale, import and otherwise transfer +the Contribution and the Contribution in combination with the Material +(and portions of such combination). This license is granted only to the extent + that the exercise of the licensed rights infringes such patent claims; +and provided that this license is conditioned upon compliance with Section 2.3. + +2.3 Outbound License + +As a condition on the grant of rights in Sections 2.1 and 2.2, to the extent +we include Your Contribution or a part of it in a Material, we agree to +license the Contribution only under the terms of the license or licenses which +We are using on the Submission Date for the Material or any licenses which are +approved by the Open Source Initiative (“OSI”) on or after the Effective Date, +including both permissive and copyleft licenses, whether or not such licenses +are subsequently disapproved (including any right to adopt any future version +of a license if approved by the OSI). In addition to above defined licenses, +We may use the following licenses for Media in the Contribution: Creative +Commons BY 3.0 or Creative Commons BY-SA 3.0 (including the right to adopt any +future version of a license). + +2.4 Moral Rights. + +If moral rights apply to the Contribution, to the maximum extent permitted by +law, You waive and agree not to assert such moral rights against Us or our +successors in interest, or any of our licensees, either direct or indirect. + +2.5 Enforcement. + +You, as a copyright holder to Your Contribution, hereby authorize us +to enforce the OSI approved license applied by Us to a Material, but only +to the extent Your Contribution has been included in a Material and always +subject to Our free discretion on whether such enforcement is necessary or not. + +2.6 Our Rights. + +You acknowledge that We are not obligated to use Your Contribution as part of +the Material and may decide to include any Contribution We consider +appropriate. + +2.7 Reservation of Rights. + +Any rights not expressly licensed under this section are expressly reserved +by You. + +(3) Agreement + +You confirm that: + +(a) You have the legal authority to enter into this Agreement. + +(b) You own the Copyright and patent claims covering the Contribution which + are required to grant the rights under Section 2. + +(c) The grant of rights under Section 2 does not violate any grant of rights + which You have made to third parties, including Your employer. If You are + an employee, You have had Your employer approve this Agreement or sign the + Entity version of this document. If You are less than eighteen years old, + please have Your parents or guardian sign the Agreement. + +(d) You have not Submitted any Code You do not own without written permission + from US. + +(e) All pull or merge requests issued under usernames confirmed by You + in writing are issued by You; and all such pull or merge requests contain + Your Contributions under this Agreement. You will notify Us in writing + in the event of You no longer control such usernames. + +(4) Disclaimer + +EXCEPT FOR THE EXPRESS WARRANTIES IN SECTION 3, THE CONTRIBUTION IS PROVIDED +“AS IS”. MORE PARTICULARLY, ALL EXPRESS OR IMPLIED WARRANTIES INCLUDING, +WITHOUT LIMITATION, ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE EXPRESSLY DISCLAIMED BY YOU TO US. TO THE EXTENT THAT ANY SUCH WARRANTIES CANNOT BE DISCLAIMED, SUCH WARRANTY IS LIMITED IN DURATION TO THE MINIMUM PERIOD PERMITTED BY LAW. + +(5) Consequential Damage Waiver + +TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT WILL YOU BE +LIABLE FOR ANY LOSS OF PROFITS, LOSS OF ANTICIPATED SAVINGS, LOSS OF DATA, +INDIRECT, SPECIAL, INCIDENTAL, CONSEQUENTIAL AND EXEMPLARY DAMAGES ARISING +OUT OF THIS AGREEMENT REGARDLESS OF THE LEGAL OR EQUITABLE THEORY (CONTRACT, +TORT OR OTHERWISE) UPON WHICH THE CLAIM IS BASED. THIS WAIVER DOES NOT APPLY +TO GROSS NEGLIGENT OR MALICIOUS ACTS OR FRAUD. + +(6) Miscellaneous + +6.1 This Agreement will be governed by and construed in accordance with the +laws of Finland excluding its conflicts of law provisions. Under certain +circumstances, the governing law in this section might be superseded by the +United Nations Convention on Contracts for the International Sale of Goods +(“UN Convention”) and the parties intend to avoid the application of the +UN Convention to this Agreement and, thus, exclude the application of the +UN Convention in its entirety to this Agreement. + +6.2 Any and all Submissions done by You prior to execution of this Agreement +shall be nonetheless covered by this Agreement. + +6.3 This Agreement sets out the entire agreement between You and Us for Your +Contributions to Us and overrides all other agreements or understandings. + +6.4 If You or We assign the rights or obligations received through this +Agreement to a third party, as a condition of the assignment, that third party +must agree in writing to abide by all the rights and obligations in the +Agreement. + +6.5 The failure of either party to require performance by the other party of +any provision of this Agreement in one situation shall not affect the right +of a party to require such performance at any time in the future. A waiver of +performance under a provision in one situation shall not be considered a +waiver of the performance of the provision in the future or a waiver of the +provision in its entirety. + +6.6 If any provision of this Agreement is found void and unenforceable, such +provision will be replaced to the extent possible with a provision that comes +closest to the meaning of the original provision and which is enforceable. +The terms and conditions set forth in this Agreement shall apply +notwithstanding any failure of essential purpose of this Agreement or any +limited remedy to the maximum extent possible under law. + +This document has been drafted based on Harmony Inividual Contributor License +Agreement (HA-CLA-I) Version 1.0 July 4, 2011. HA- CLA-I is available from +harmonyagreements.org and is licensed by under Creative Commons Attribution +3.0 Unported License. diff --git a/mysql-wsrep-5.6/VERSION b/mysql-wsrep-5.6/VERSION index 373e0b2d..62e9977f 100644 --- a/mysql-wsrep-5.6/VERSION +++ b/mysql-wsrep-5.6/VERSION @@ -1,4 +1,4 @@ MYSQL_VERSION_MAJOR=5 MYSQL_VERSION_MINOR=6 -MYSQL_VERSION_PATCH=30 +MYSQL_VERSION_PATCH=33 MYSQL_VERSION_EXTRA= diff --git a/mysql-wsrep-5.6/client/client_priv.h b/mysql-wsrep-5.6/client/client_priv.h index fbe60f4f..cf63ae94 100644 --- a/mysql-wsrep-5.6/client/client_priv.h +++ b/mysql-wsrep-5.6/client/client_priv.h @@ -139,7 +139,7 @@ MYSQL *mysql_connect_ssl_check(MYSQL *mysql_arg, const char *host, const char *user, const char *passwd, const char *db, uint port, const char *unix_socket, ulong client_flag, - my_bool ssl_required __attribute__((unused))) + my_bool ssl_required MY_ATTRIBUTE((unused))) { MYSQL *mysql= mysql_real_connect(mysql_arg, host, user, passwd, db, port, unix_socket, client_flag); diff --git a/mysql-wsrep-5.6/client/mysql.cc b/mysql-wsrep-5.6/client/mysql.cc index af0af9d1..7ab706fb 100644 --- a/mysql-wsrep-5.6/client/mysql.cc +++ b/mysql-wsrep-5.6/client/mysql.cc @@ -1819,7 +1819,7 @@ static void usage(int version) my_bool -get_one_option(int optid, const struct my_option *opt __attribute__((unused)), +get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)), char *argument) { switch(optid) { @@ -2755,8 +2755,8 @@ static void initialize_readline (char *name) */ static char **new_mysql_completion(const char *text, - int start __attribute__((unused)), - int end __attribute__((unused))) + int start MY_ATTRIBUTE((unused)), + int end MY_ATTRIBUTE((unused))) { if (!status.batch && !quick) #if defined(USE_NEW_READLINE_INTERFACE) @@ -3166,8 +3166,8 @@ static void print_help_item(MYSQL_ROW *cur, int num_name, int num_cat, char *las } -static int com_server_help(String *buffer __attribute__((unused)), - char *line __attribute__((unused)), char *help_arg) +static int com_server_help(String *buffer MY_ATTRIBUTE((unused)), + char *line MY_ATTRIBUTE((unused)), char *help_arg) { MYSQL_ROW cur; const char *server_cmd; @@ -3273,8 +3273,8 @@ err: } static int -com_help(String *buffer __attribute__((unused)), - char *line __attribute__((unused))) +com_help(String *buffer MY_ATTRIBUTE((unused)), + char *line MY_ATTRIBUTE((unused))) { reg1 int i, j; char * help_arg= strchr(line,' '), buff[32], *end; @@ -3313,7 +3313,7 @@ com_help(String *buffer __attribute__((unused)), /* ARGSUSED */ static int -com_clear(String *buffer,char *line __attribute__((unused))) +com_clear(String *buffer,char *line MY_ATTRIBUTE((unused))) { #ifdef HAVE_READLINE if (status.add_to_history) @@ -3325,7 +3325,7 @@ com_clear(String *buffer,char *line __attribute__((unused))) /* ARGSUSED */ static int -com_charset(String *buffer __attribute__((unused)), char *line) +com_charset(String *buffer MY_ATTRIBUTE((unused)), char *line) { char buff[256], *param; const CHARSET_INFO *new_cs; @@ -3357,7 +3357,7 @@ com_charset(String *buffer __attribute__((unused)), char *line) static int -com_go(String *buffer,char *line __attribute__((unused))) +com_go(String *buffer,char *line MY_ATTRIBUTE((unused))) { char buff[200]; /* about 110 chars used so far */ char time_buff[52+3+1]; /* time max + space&parens + NUL */ @@ -4118,8 +4118,8 @@ print_tab_data(MYSQL_RES *result) } static int -com_tee(String *buffer __attribute__((unused)), - char *line __attribute__((unused))) +com_tee(String *buffer MY_ATTRIBUTE((unused)), + char *line MY_ATTRIBUTE((unused))) { char file_name[FN_REFLEN], *end, *param; @@ -4161,8 +4161,8 @@ com_tee(String *buffer __attribute__((unused)), static int -com_notee(String *buffer __attribute__((unused)), - char *line __attribute__((unused))) +com_notee(String *buffer MY_ATTRIBUTE((unused)), + char *line MY_ATTRIBUTE((unused))) { if (opt_outfile) end_tee(); @@ -4176,8 +4176,8 @@ com_notee(String *buffer __attribute__((unused)), #ifdef USE_POPEN static int -com_pager(String *buffer __attribute__((unused)), - char *line __attribute__((unused))) +com_pager(String *buffer MY_ATTRIBUTE((unused)), + char *line MY_ATTRIBUTE((unused))) { char pager_name[FN_REFLEN], *end, *param; @@ -4220,8 +4220,8 @@ com_pager(String *buffer __attribute__((unused)), static int -com_nopager(String *buffer __attribute__((unused)), - char *line __attribute__((unused))) +com_nopager(String *buffer MY_ATTRIBUTE((unused)), + char *line MY_ATTRIBUTE((unused))) { strmov(pager, "stdout"); opt_nopager=1; @@ -4238,7 +4238,7 @@ com_nopager(String *buffer __attribute__((unused)), #ifdef USE_POPEN static int -com_edit(String *buffer,char *line __attribute__((unused))) +com_edit(String *buffer,char *line MY_ATTRIBUTE((unused))) { char filename[FN_REFLEN],buff[160]; int fd,tmp; @@ -4282,16 +4282,16 @@ err: /* If arg is given, exit without errors. This happens on command 'quit' */ static int -com_quit(String *buffer __attribute__((unused)), - char *line __attribute__((unused))) +com_quit(String *buffer MY_ATTRIBUTE((unused)), + char *line MY_ATTRIBUTE((unused))) { status.exit_status=0; return 1; } static int -com_rehash(String *buffer __attribute__((unused)), - char *line __attribute__((unused))) +com_rehash(String *buffer MY_ATTRIBUTE((unused)), + char *line MY_ATTRIBUTE((unused))) { #ifdef HAVE_READLINE build_completion_hash(1, 0); @@ -4302,8 +4302,8 @@ com_rehash(String *buffer __attribute__((unused)), #ifdef USE_POPEN static int -com_shell(String *buffer __attribute__((unused)), - char *line __attribute__((unused))) +com_shell(String *buffer MY_ATTRIBUTE((unused)), + char *line MY_ATTRIBUTE((unused))) { char *shell_cmd; @@ -4330,7 +4330,7 @@ com_shell(String *buffer __attribute__((unused)), static int -com_print(String *buffer,char *line __attribute__((unused))) +com_print(String *buffer,char *line MY_ATTRIBUTE((unused))) { tee_puts("--------------", stdout); (void) tee_fputs(buffer->c_ptr(), stdout); @@ -4395,7 +4395,7 @@ com_connect(String *buffer, char *line) } -static int com_source(String *buffer __attribute__((unused)), +static int com_source(String *buffer MY_ATTRIBUTE((unused)), char *line) { char source_name[FN_REFLEN], *end, *param; @@ -4450,7 +4450,7 @@ static int com_source(String *buffer __attribute__((unused)), /* ARGSUSED */ static int -com_delimiter(String *buffer __attribute__((unused)), char *line) +com_delimiter(String *buffer MY_ATTRIBUTE((unused)), char *line) { char buff[256], *tmp; @@ -4479,7 +4479,7 @@ com_delimiter(String *buffer __attribute__((unused)), char *line) /* ARGSUSED */ static int -com_use(String *buffer __attribute__((unused)), char *line) +com_use(String *buffer MY_ATTRIBUTE((unused)), char *line) { char *tmp, buff[FN_REFLEN + 1]; int select_db; @@ -4624,8 +4624,8 @@ normalize_dbname(const char *line, char *buff, uint buff_size) } static int -com_warnings(String *buffer __attribute__((unused)), - char *line __attribute__((unused))) +com_warnings(String *buffer MY_ATTRIBUTE((unused)), + char *line MY_ATTRIBUTE((unused))) { show_warnings = 1; put_info("Show warnings enabled.",INFO_INFO); @@ -4633,8 +4633,8 @@ com_warnings(String *buffer __attribute__((unused)), } static int -com_nowarnings(String *buffer __attribute__((unused)), - char *line __attribute__((unused))) +com_nowarnings(String *buffer MY_ATTRIBUTE((unused)), + char *line MY_ATTRIBUTE((unused))) { show_warnings = 0; put_info("Show warnings disabled.",INFO_INFO); @@ -4914,8 +4914,8 @@ sql_connect(char *host,char *database,char *user,char *password,uint silent) static int -com_status(String *buffer __attribute__((unused)), - char *line __attribute__((unused))) +com_status(String *buffer MY_ATTRIBUTE((unused)), + char *line MY_ATTRIBUTE((unused))) { const char *status_str; char buff[40]; @@ -5555,7 +5555,7 @@ static void init_username() } } -static int com_prompt(String *buffer __attribute__((unused)), +static int com_prompt(String *buffer MY_ATTRIBUTE((unused)), char *line) { char *ptr=strchr(line, ' '); diff --git a/mysql-wsrep-5.6/client/mysql_config_editor.cc b/mysql-wsrep-5.6/client/mysql_config_editor.cc index 51a4d09c..6b7bef61 100644 --- a/mysql-wsrep-5.6/client/mysql_config_editor.cc +++ b/mysql-wsrep-5.6/client/mysql_config_editor.cc @@ -1,5 +1,5 @@ /* - Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -209,7 +209,7 @@ static struct my_option my_help_command_options[]= my_bool my_program_get_one_option(int optid, - const struct my_option *opt __attribute__((unused)), + const struct my_option *opt MY_ATTRIBUTE((unused)), char *argument) { switch(optid) { @@ -230,7 +230,7 @@ my_program_get_one_option(int optid, my_bool my_set_command_get_one_option(int optid, - const struct my_option *opt __attribute__((unused)), + const struct my_option *opt MY_ATTRIBUTE((unused)), char *argument) { switch(optid) { @@ -257,7 +257,7 @@ my_set_command_get_one_option(int optid, my_bool my_remove_command_get_one_option(int optid, - const struct my_option *opt __attribute__((unused)), + const struct my_option *opt MY_ATTRIBUTE((unused)), char *argument) { switch(optid) { @@ -281,7 +281,7 @@ my_remove_command_get_one_option(int optid, my_bool my_print_command_get_one_option(int optid, - const struct my_option *opt __attribute__((unused)), + const struct my_option *opt MY_ATTRIBUTE((unused)), char *argument) { switch(optid) { @@ -305,7 +305,7 @@ my_print_command_get_one_option(int optid, my_bool my_reset_command_get_one_option(int optid, - const struct my_option *opt __attribute__((unused)), + const struct my_option *opt MY_ATTRIBUTE((unused)), char *argument) { switch(optid) { diff --git a/mysql-wsrep-5.6/client/mysql_plugin.c b/mysql-wsrep-5.6/client/mysql_plugin.c index ab7ee098..6ff6d974 100644 --- a/mysql-wsrep-5.6/client/mysql_plugin.c +++ b/mysql-wsrep-5.6/client/mysql_plugin.c @@ -1,5 +1,5 @@ /* - Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -406,7 +406,7 @@ exit: static void usage(void) { PRINT_VERSION; - puts("Copyright (c) 2011, 2015, Oracle and/or its affiliates. " + puts("Copyright (c) 2011, 2016, Oracle and/or its affiliates. " "All rights reserved.\n"); puts("Enable or disable plugins."); printf("\nUsage: %s [options] ENABLE|DISABLE\n\nOptions:\n", @@ -471,7 +471,7 @@ static void print_default_values(void) static my_bool get_one_option(int optid, - const struct my_option *opt __attribute__((unused)), + const struct my_option *opt MY_ATTRIBUTE((unused)), char *argument) { switch(optid) { diff --git a/mysql-wsrep-5.6/client/mysqladmin.cc b/mysql-wsrep-5.6/client/mysqladmin.cc index ab959c71..9623014d 100644 --- a/mysql-wsrep-5.6/client/mysqladmin.cc +++ b/mysql-wsrep-5.6/client/mysqladmin.cc @@ -237,7 +237,7 @@ static struct my_option my_long_options[] = static const char *load_default_groups[]= { "mysqladmin","client",0 }; my_bool -get_one_option(int optid, const struct my_option *opt __attribute__((unused)), +get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)), char *argument) { int error = 0; @@ -528,7 +528,7 @@ int main(int argc,char *argv[]) } -sig_handler endprog(int signal_number __attribute__((unused))) +sig_handler endprog(int signal_number MY_ATTRIBUTE((unused))) { interrupted=1; } @@ -1106,7 +1106,7 @@ retry: int offset= sprintf(buffer, "ALTER USER USER() IDENTIFIED BY '"); int length= (int)mysql_real_escape_string(mysql, buffer + offset, - typed_password, + typed_password, (ulong) strlen(typed_password)); if (length == -1) { @@ -1416,7 +1416,7 @@ static void print_top(MYSQL_RES *result) /* 3.rd argument, uint row, is not in use. Don't remove! */ static void print_row(MYSQL_RES *result, MYSQL_ROW cur, - uint row __attribute__((unused))) + uint row MY_ATTRIBUTE((unused))) { uint i,length; MYSQL_FIELD *field; @@ -1451,9 +1451,9 @@ static void print_relative_row(MYSQL_RES *result, MYSQL_ROW cur, uint row) } -static void print_relative_row_vert(MYSQL_RES *result __attribute__((unused)), +static void print_relative_row_vert(MYSQL_RES *result MY_ATTRIBUTE((unused)), MYSQL_ROW cur, - uint row __attribute__((unused))) + uint row MY_ATTRIBUTE((unused))) { uint length; ulonglong tmp; diff --git a/mysql-wsrep-5.6/client/mysqlbinlog.cc b/mysql-wsrep-5.6/client/mysqlbinlog.cc index e305de00..9cbd4cf5 100644 --- a/mysql-wsrep-5.6/client/mysqlbinlog.cc +++ b/mysql-wsrep-5.6/client/mysqlbinlog.cc @@ -1,5 +1,5 @@ /* - Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1819,7 +1819,7 @@ static my_time_t convert_str_to_timestamp(const char* str) extern "C" my_bool -get_one_option(int optid, const struct my_option *opt __attribute__((unused)), +get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)), char *argument) { bool tty_password=0; @@ -1917,6 +1917,12 @@ static int parse_args(int *argc, char*** argv) */ static Exit_status safe_connect() { + /* + A possible old connection's resources are reclaimed now + at new connect attempt. The final safe_connect resources + are mysql_closed at the end of program, explicitly. + */ + mysql_close(mysql); mysql= mysql_init(NULL); if (!mysql) diff --git a/mysql-wsrep-5.6/client/mysqlcheck.c b/mysql-wsrep-5.6/client/mysqlcheck.c index 6c3f4064..258ea475 100644 --- a/mysql-wsrep-5.6/client/mysqlcheck.c +++ b/mysql-wsrep-5.6/client/mysqlcheck.c @@ -225,13 +225,13 @@ static int process_selected_tables(char *db, char **table_names, int tables); static int process_all_tables_in_db(char *database); static int process_one_db(char *database); static int use_db(char *database); -static int handle_request_for_tables(char *tables, uint length); +static int handle_request_for_tables(char *tables, size_t length); static int dbConnect(char *host, char *user,char *passwd); static void dbDisconnect(char *host); static void DBerror(MYSQL *mysql, const char *when); static void safe_exit(int error); static void print_result(); -static uint fixed_name_length(const char *name); +static size_t fixed_name_length(const char *name); static char *fix_table_name(char *dest, char *src); int what_to_do = 0; @@ -270,7 +270,7 @@ static void usage(void) static my_bool -get_one_option(int optid, const struct my_option *opt __attribute__((unused)), +get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)), char *argument) { int orig_what_to_do= what_to_do; @@ -501,7 +501,7 @@ static int process_selected_tables(char *db, char **table_names, int tables) *end++= ','; } *--end = 0; - handle_request_for_tables(table_names_comma_sep + 1, (uint) (tot_length - 1)); + handle_request_for_tables(table_names_comma_sep + 1, tot_length - 1); my_free(table_names_comma_sep); } else @@ -511,10 +511,10 @@ static int process_selected_tables(char *db, char **table_names, int tables) } /* process_selected_tables */ -static uint fixed_name_length(const char *name) +static size_t fixed_name_length(const char *name) { const char *p; - uint extra_length= 2; /* count the first/last backticks */ + size_t extra_length= 2; /* count the first/last backticks */ for (p= name; *p; p++) { @@ -523,7 +523,7 @@ static uint fixed_name_length(const char *name) else if (*p == '.') extra_length+= 2; } - return (uint) ((p - name) + extra_length); + return (size_t) ((p - name) + extra_length); } @@ -579,7 +579,7 @@ static int process_all_tables_in_db(char *database) */ char *tables, *end; - uint tot_length = 0; + size_t tot_length = 0; while ((row = mysql_fetch_row(res))) tot_length+= fixed_name_length(row[0]) + 2; @@ -637,7 +637,9 @@ static int fix_table_storage_name(const char *name) int rc= 0; if (strncmp(name, "#mysql50#", 9)) return 1; - sprintf(qbuf, "RENAME TABLE `%s` TO `%s`", name, name + 9); + my_snprintf(qbuf, sizeof(qbuf), "RENAME TABLE `%s` TO `%s`", + name, name + 9); + rc= run_query(qbuf); if (verbose) printf("%-50s %s\n", name, rc ? "FAILED" : "OK"); @@ -650,7 +652,8 @@ static int fix_database_storage_name(const char *name) int rc= 0; if (strncmp(name, "#mysql50#", 9)) return 1; - sprintf(qbuf, "ALTER DATABASE `%s` UPGRADE DATA DIRECTORY NAME", name); + my_snprintf(qbuf, sizeof(qbuf), "ALTER DATABASE `%s` UPGRADE DATA DIRECTORY " + "NAME", name); rc= run_query(qbuf); if (verbose) printf("%-50s %s\n", name, rc ? "FAILED" : "OK"); @@ -668,7 +671,7 @@ static int rebuild_table(char *name) ptr= strmov(query, "ALTER TABLE "); ptr= fix_table_name(ptr, name); ptr= strxmov(ptr, " FORCE", NullS); - if (mysql_real_query(sock, query, (uint)(ptr - query))) + if (mysql_real_query(sock, query, (ulong)(ptr - query))) { fprintf(stderr, "Failed to %s\n", query); fprintf(stderr, "Error: %s\n", mysql_error(sock)); @@ -721,10 +724,10 @@ static int disable_binlog() return run_query(stmt); } -static int handle_request_for_tables(char *tables, uint length) +static int handle_request_for_tables(char *tables, size_t length) { char *query, *end, options[100], message[100]; - uint query_length= 0; + size_t query_length= 0, query_size= sizeof(char)*(length+110); const char *op = 0; options[0] = 0; @@ -755,10 +758,14 @@ static int handle_request_for_tables(char *tables, uint length) return fix_table_storage_name(tables); } - if (!(query =(char *) my_malloc((sizeof(char)*(length+110)), MYF(MY_WME)))) + if (!(query =(char *) my_malloc(query_size, MYF(MY_WME)))) + { return 1; + } if (opt_all_in_1) { + DBUG_ASSERT(strlen(op)+strlen(tables)+strlen(options)+8+1 <= query_size); + /* No backticks here as we added them before */ query_length= sprintf(query, "%s TABLE %s %s", op, tables, options); } @@ -769,7 +776,7 @@ static int handle_request_for_tables(char *tables, uint length) ptr= strmov(strmov(query, op), " TABLE "); ptr= fix_table_name(ptr, tables); ptr= strxmov(ptr, " ", options, NullS); - query_length= (uint) (ptr - query); + query_length= (size_t) (ptr - query); } if (mysql_real_query(sock, query, query_length)) { @@ -853,7 +860,10 @@ static void print_result() prev_alter[0]= 0; } else - strcpy(prev_alter, alter_txt); + { + strncpy(prev_alter, alter_txt, MAX_ALTER_STR_SIZE-1); + prev_alter[MAX_ALTER_STR_SIZE-1]= 0; + } } } } @@ -1008,7 +1018,7 @@ int main(int argc, char **argv) process_databases(argv); if (opt_auto_repair) { - uint i; + size_t i; if (!opt_silent && (tables4repair.elements || tables4rebuild.elements)) puts("\nRepairing tables"); diff --git a/mysql-wsrep-5.6/client/mysqldump.c b/mysql-wsrep-5.6/client/mysqldump.c index f7d72412..17637e4e 100644 --- a/mysql-wsrep-5.6/client/mysqldump.c +++ b/mysql-wsrep-5.6/client/mysqldump.c @@ -87,7 +87,7 @@ static void add_load_option(DYNAMIC_STRING *str, const char *option, const char *option_value); -static ulong find_set(TYPELIB *lib, const char *x, uint length, +static ulong find_set(TYPELIB *lib, const char *x, size_t length, char **err_pos, uint *err_len); static char *alloc_query_str(ulong size); @@ -762,7 +762,7 @@ static void write_footer(FILE *sql_file) uchar* get_table_key(const char *entry, size_t *length, - my_bool not_used __attribute__((unused))) + my_bool not_used MY_ATTRIBUTE((unused))) { *length= strlen(entry); return (uchar*) entry; @@ -770,7 +770,7 @@ uchar* get_table_key(const char *entry, size_t *length, static my_bool -get_one_option(int optid, const struct my_option *opt __attribute__((unused)), +get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)), char *argument) { switch (optid) { @@ -885,7 +885,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), opt_set_charset= 0; opt_compatible_mode_str= argument; opt_compatible_mode= find_set(&compatible_mode_typelib, - argument, (uint) strlen(argument), + argument, strlen(argument), &err_ptr, &err_len); if (err_len) { @@ -895,7 +895,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), } #if !defined(DBUG_OFF) { - uint size_for_sql_mode= 0; + size_t size_for_sql_mode= 0; const char **ptr; for (ptr= compatible_mode_names; *ptr; ptr++) size_for_sql_mode+= strlen(*ptr); @@ -1182,8 +1182,8 @@ static int fetch_db_collation(const char *db_name, break; } - strncpy(db_cl_name, db_cl_row[0], db_cl_size); - db_cl_name[db_cl_size - 1]= 0; /* just in case. */ + strncpy(db_cl_name, db_cl_row[0], db_cl_size-1); + db_cl_name[db_cl_size - 1]= 0; } while (FALSE); @@ -1194,7 +1194,7 @@ static int fetch_db_collation(const char *db_name, static char *my_case_str(const char *str, - uint str_len, + size_t str_len, const char *token, uint token_len) { @@ -1410,7 +1410,7 @@ static int switch_character_set_results(MYSQL *mysql, const char *cs_name) */ static char *cover_definer_clause(const char *stmt_str, - uint stmt_length, + size_t stmt_length, const char *definer_version_str, uint definer_version_length, const char *stmt_version_str, @@ -1603,14 +1603,14 @@ static void dbDisconnect(char *host) } /* dbDisconnect */ -static void unescape(FILE *file,char *pos,uint length) +static void unescape(FILE *file,char *pos, size_t length) { char *tmp; DBUG_ENTER("unescape"); if (!(tmp=(char*) my_malloc(length*2+1, MYF(MY_WME)))) die(EX_MYSQLERR, "Couldn't allocate memory"); - mysql_real_escape_string(&mysql_connection, tmp, pos, length); + mysql_real_escape_string(&mysql_connection, tmp, pos, (ulong)length); fputc('\'', file); fputs(tmp, file); fputc('\'', file); @@ -1724,7 +1724,7 @@ static char *quote_for_like(const char *name, char *buff) Quote '<' '>' '&' '\"' chars and print a string to the xml_file. */ -static void print_quoted_xml(FILE *xml_file, const char *str, ulong len, +static void print_quoted_xml(FILE *xml_file, const char *str, size_t len, my_bool is_attribute_name) { const char *end; @@ -1921,7 +1921,7 @@ static void print_xml_row(FILE *xml_file, const char *row_name, const char *str_create) { uint i; - my_bool body_found __attribute__((unused)) = 0; + my_bool body_found MY_ATTRIBUTE((unused)) = 0; char *create_stmt_ptr= NULL; ulong create_stmt_len= 0; MYSQL_FIELD *field; @@ -1983,7 +1983,7 @@ static void print_xml_row(FILE *xml_file, const char *row_name, squeezed to a single hyphen. */ -static void print_xml_comment(FILE *xml_file, ulong len, +static void print_xml_comment(FILE *xml_file, size_t len, const char *comment_string) { const char* end; @@ -2100,7 +2100,7 @@ static uint dump_events_for_db(char *db) DBUG_ENTER("dump_events_for_db"); DBUG_PRINT("enter", ("db: '%s'", db)); - mysql_real_escape_string(mysql, db_name_buff, db, strlen(db)); + mysql_real_escape_string(mysql, db_name_buff, db, (ulong)strlen(db)); /* nice comments */ print_comment(sql_file, 0, @@ -2219,6 +2219,11 @@ static uint dump_events_for_db(char *db) (const char *) (query_str != NULL ? query_str : row[3]), (const char *) delimiter); + if(query_str) + { + my_free(query_str); + query_str= NULL; + } restore_time_zone(sql_file, delimiter); restore_sql_mode(sql_file, delimiter); @@ -2312,7 +2317,7 @@ static uint dump_routines_for_db(char *db) DBUG_ENTER("dump_routines_for_db"); DBUG_PRINT("enter", ("db: '%s'", db)); - mysql_real_escape_string(mysql, db_name_buff, db, strlen(db)); + mysql_real_escape_string(mysql, db_name_buff, db, (ulong)strlen(db)); /* nice comments */ print_comment(sql_file, 0, @@ -2366,9 +2371,9 @@ static uint dump_routines_for_db(char *db) if the user has EXECUTE privilege he see routine names, but NOT the routine body of other routines that are not the creator of! */ - DBUG_PRINT("info",("length of body for %s row[2] '%s' is %d", + DBUG_PRINT("info",("length of body for %s row[2] '%s' is %zu", routine_name, row[2] ? row[2] : "(null)", - row[2] ? (int) strlen(row[2]) : 0)); + row[2] ? strlen(row[2]) : 0)); if (row[2] == NULL) { print_comment(sql_file, 1, "\n-- insufficient privileges to %s\n", @@ -3915,7 +3920,7 @@ static int dump_tablespaces_for_tables(char *db, char **table_names, int tables) int i; char name_buff[NAME_LEN*2+3]; - mysql_real_escape_string(mysql, name_buff, db, strlen(db)); + mysql_real_escape_string(mysql, name_buff, db, (ulong)strlen(db)); init_dynamic_string_checked(&where, " AND TABLESPACE_NAME IN (" "SELECT DISTINCT TABLESPACE_NAME FROM" @@ -3928,7 +3933,7 @@ static int dump_tablespaces_for_tables(char *db, char **table_names, int tables) for (i=0 ; imax_length) length=field->max_length; @@ -523,7 +524,8 @@ static int list_tables(MYSQL *mysql,const char *db,const char *table) { const char *header; - uint head_length, counter = 0; + size_t head_length; + uint counter = 0; char query[NAME_LEN + 100], rows[NAME_LEN], fields[16]; MYSQL_FIELD *field; MYSQL_RES *result; @@ -560,7 +562,7 @@ list_tables(MYSQL *mysql,const char *db,const char *table) putchar('\n'); header="Tables"; - head_length=(uint) strlen(header); + head_length= strlen(header); field=mysql_fetch_field(result); if (head_length < field->max_length) head_length=field->max_length; @@ -678,7 +680,7 @@ list_table_status(MYSQL *mysql,const char *db,const char *wild) len= sizeof(query); len-= my_snprintf(query, len, "show table status from `%s`", db); if (wild && wild[0] && len) - strxnmov(query + strlen(query), len, " like '", wild, "'", NullS); + strxnmov(query + strlen(query), len - 1, " like '", wild, "'", NullS); if (mysql_query(mysql,query) || !(result=mysql_store_result(mysql))) { fprintf(stderr,"%s: Cannot get status for db: %s, table: %s: %s\n", @@ -711,7 +713,7 @@ list_fields(MYSQL *mysql,const char *db,const char *table, const char *wild) { char query[NAME_LEN + 100]; - int len; + size_t len; MYSQL_RES *result; MYSQL_ROW row; ulong UNINIT_VAR(rows); @@ -741,7 +743,7 @@ list_fields(MYSQL *mysql,const char *db,const char *table, len-= my_snprintf(query, len, "show /*!32332 FULL */ columns from `%s`", table); if (wild && wild[0] && len) - strxnmov(query + strlen(query), len, " like '", wild, "'", NullS); + strxnmov(query + strlen(query), len - 1, " like '", wild, "'", NullS); if (mysql_query(mysql,query) || !(result=mysql_store_result(mysql))) { fprintf(stderr,"%s: Cannot list columns in db: %s, table: %s: %s\n", @@ -789,10 +791,10 @@ list_fields(MYSQL *mysql,const char *db,const char *table, *****************************************************************************/ static void -print_header(const char *header,uint head_length,...) +print_header(const char *header,size_t head_length,...) { va_list args; - uint length,i,str_length,pre_space; + size_t length,i,str_length,pre_space; const char *field; va_start(args,head_length); @@ -815,10 +817,10 @@ print_header(const char *header,uint head_length,...) putchar('|'); for (;;) { - str_length=(uint) strlen(field); + str_length= strlen(field); if (str_length > length) str_length=length+1; - pre_space=(uint) (((int) length-(int) str_length)/2)+1; + pre_space= ((length- str_length)/2)+1; for (i=0 ; i < pre_space ; i++) putchar(' '); for (i = 0 ; i < str_length ; i++) @@ -852,11 +854,11 @@ print_header(const char *header,uint head_length,...) static void -print_row(const char *header,uint head_length,...) +print_row(const char *header,size_t head_length,...) { va_list args; const char *field; - uint i,length,field_length; + size_t i,length,field_length; va_start(args,head_length); field=header; length=head_length; @@ -865,7 +867,7 @@ print_row(const char *header,uint head_length,...) putchar('|'); putchar(' '); fputs(field,stdout); - field_length=(uint) strlen(field); + field_length= strlen(field); for (i=field_length ; i <= length ; i++) putchar(' '); if (!(field=va_arg(args,char *))) @@ -879,10 +881,10 @@ print_row(const char *header,uint head_length,...) static void -print_trailer(uint head_length,...) +print_trailer(size_t head_length,...) { va_list args; - uint length,i; + size_t length,i; va_start(args,head_length); length=head_length; @@ -925,7 +927,7 @@ static void print_res_top(MYSQL_RES *result) mysql_field_seek(result,0); while((field = mysql_fetch_field(result))) { - if ((length=(uint) strlen(field->name)) > field->max_length) + if ((length= strlen(field->name)) > field->max_length) field->max_length=length; else length=field->max_length; diff --git a/mysql-wsrep-5.6/client/mysqlslap.c b/mysql-wsrep-5.6/client/mysqlslap.c index 6ef47367..ad0bb965 100644 --- a/mysql-wsrep-5.6/client/mysqlslap.c +++ b/mysql-wsrep-5.6/client/mysqlslap.c @@ -736,7 +736,7 @@ static void usage(void) static my_bool -get_one_option(int optid, const struct my_option *opt __attribute__((unused)), +get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)), char *argument) { DBUG_ENTER("get_one_option"); diff --git a/mysql-wsrep-5.6/client/mysqltest.cc b/mysql-wsrep-5.6/client/mysqltest.cc index 0ac93bb0..1e133b31 100644 --- a/mysql-wsrep-5.6/client/mysqltest.cc +++ b/mysql-wsrep-5.6/client/mysqltest.cc @@ -547,12 +547,12 @@ struct st_replace *glob_replace= 0; void replace_strings_append(struct st_replace *rep, DYNAMIC_STRING* ds, const char *from, int len); -static void cleanup_and_exit(int exit_code) __attribute__((noreturn)); +static void cleanup_and_exit(int exit_code) MY_ATTRIBUTE((noreturn)); void die(const char *fmt, ...) - ATTRIBUTE_FORMAT(printf, 1, 2) __attribute__((noreturn)); + ATTRIBUTE_FORMAT(printf, 1, 2) MY_ATTRIBUTE((noreturn)); void abort_not_supported_test(const char *fmt, ...) - ATTRIBUTE_FORMAT(printf, 1, 2) __attribute__((noreturn)); + ATTRIBUTE_FORMAT(printf, 1, 2) MY_ATTRIBUTE((noreturn)); void verbose_msg(const char *fmt, ...) ATTRIBUTE_FORMAT(printf, 1, 2); void log_msg(const char *fmt, ...) @@ -2121,7 +2121,7 @@ static void strip_parentheses(struct st_command *command) C_MODE_START static uchar *get_var_key(const uchar* var, size_t *len, - my_bool __attribute__((unused)) t) + my_bool MY_ATTRIBUTE((unused)) t) { register char* key; key = ((VAR*)var)->name; @@ -2449,7 +2449,7 @@ void var_query_set(VAR *var, const char *query, const char** query_end) init_dynamic_string(&ds_query, 0, (end - query) + 32, 256); do_eval(&ds_query, query, end, FALSE); - if (mysql_real_query(mysql, ds_query.str, ds_query.length)) + if (mysql_real_query(mysql, ds_query.str, ds_query.length) || !(res= mysql_store_result(mysql))) { handle_error (curr_command, mysql_errno(mysql), mysql_error(mysql), mysql_sqlstate(mysql), &ds_res); @@ -2459,8 +2459,6 @@ void var_query_set(VAR *var, const char *query, const char** query_end) DBUG_VOID_RETURN; } - if (!(res= mysql_store_result(mysql))) - die("Query '%s' didn't return a result set", ds_query.str); dynstr_free(&ds_query); if ((row= mysql_fetch_row(res)) && row[0]) @@ -4320,7 +4318,7 @@ int do_echo(struct st_command *command) } -void do_wait_for_slave_to_stop(struct st_command *c __attribute__((unused))) +void do_wait_for_slave_to_stop(struct st_command *c MY_ATTRIBUTE((unused))) { static int SLAVE_POLL_INTERVAL= 300000; MYSQL* mysql = &cur_con->mysql; @@ -8418,7 +8416,7 @@ void update_expected_errors(struct st_command* command) */ -void mark_progress(struct st_command* command __attribute__((unused)), +void mark_progress(struct st_command* command MY_ATTRIBUTE((unused)), int line) { static ulonglong progress_start= 0; // < Beware @@ -9465,7 +9463,7 @@ typedef struct st_replace_found { void replace_strings_append(REPLACE *rep, DYNAMIC_STRING* ds, const char *str, - int len __attribute__((unused))) + int len MY_ATTRIBUTE((unused))) { reg1 REPLACE *rep_pos; reg2 REPLACE_STRING *rep_str; diff --git a/mysql-wsrep-5.6/cmake/build_configurations/compiler_options.cmake b/mysql-wsrep-5.6/cmake/build_configurations/compiler_options.cmake index a27ff7ac..d28da106 100644 --- a/mysql-wsrep-5.6/cmake/build_configurations/compiler_options.cmake +++ b/mysql-wsrep-5.6/cmake/build_configurations/compiler_options.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -66,11 +66,9 @@ IF(UNIX) SET(SUNPRO_CXX_LIBRARY "stlport4" CACHE STRING "What C++ library to use. The server needs stlport4. It is possible to build the client libraries with -DWITHOUT_SERVER=1 -DSUNPRO_CXX_LIBRARY=Cstd") - MESSAGE(STATUS "SUNPRO_CXX_LIBRARY ${SUNPRO_CXX_LIBRARY}") - IF(CMAKE_SYSTEM_PROCESSOR MATCHES "i386") SET(COMMON_C_FLAGS "-g -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -xlibmil -xlibmopt -xtarget=generic") - SET(COMMON_CXX_FLAGS "-g0 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -xlibmil -xlibmopt -xtarget=generic -library=${SUNPRO_CXX_LIBRARY}") + SET(COMMON_CXX_FLAGS "-g0 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -xlibmil -xlibmopt -xtarget=generic") # We have to specify "-xO1" for DEBUG flags here, # see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6879978 SET(CMAKE_C_FLAGS_DEBUG "-xO1 ${COMMON_C_FLAGS}") @@ -84,8 +82,8 @@ IF(UNIX) ENDIF() ELSE() # Assume !x86 is SPARC - SET(COMMON_C_FLAGS "-g -Xa -xstrconst -mt") - SET(COMMON_CXX_FLAGS "-g0 -mt -library=${SUNPRO_CXX_LIBRARY}") + SET(COMMON_C_FLAGS "-g -xstrconst -mt") + SET(COMMON_CXX_FLAGS "-g0 -mt") IF(32BIT) SET(COMMON_C_FLAGS "${COMMON_C_FLAGS} -xarch=sparc") SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} -xarch=sparc") diff --git a/mysql-wsrep-5.6/cmake/wsrep.cmake b/mysql-wsrep-5.6/cmake/wsrep.cmake index 1f5eebb4..c293c2f6 100644 --- a/mysql-wsrep-5.6/cmake/wsrep.cmake +++ b/mysql-wsrep-5.6/cmake/wsrep.cmake @@ -17,7 +17,7 @@ # so WSREP_VERSION is produced regardless # Set the patch version -SET(WSREP_PATCH_VERSION "15") +SET(WSREP_PATCH_VERSION "17") # Obtain patch revision number SET(WSREP_REVISION $ENV{WSREP_REV}) diff --git a/mysql-wsrep-5.6/configure.cmake b/mysql-wsrep-5.6/configure.cmake index f94b0000..3ecbadf6 100644 --- a/mysql-wsrep-5.6/configure.cmake +++ b/mysql-wsrep-5.6/configure.cmake @@ -67,17 +67,27 @@ SET(SIGNAL_WITH_VIO_SHUTDOWN 1) # The default C++ library for SunPro is really old, and not standards compliant. # http://www.oracle.com/technetwork/server-storage/solaris10/cmp-stlport-libcstd-142559.html -# Use stlport rather than Rogue Wave. +# Use stlport rather than Rogue Wave, +# unless otherwise specified on command line. IF(CMAKE_SYSTEM_NAME MATCHES "SunOS") IF(CMAKE_CXX_COMPILER_ID MATCHES "SunPro") - IF(SUNPRO_CXX_LIBRARY) - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -library=${SUNPRO_CXX_LIBRARY}") - IF(SUNPRO_CXX_LIBRARY STREQUAL "stdcxx4") - ADD_DEFINITIONS(-D__MATHERR_RENAME_EXCEPTION) - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -template=extdef") - ENDIF() + IF(CMAKE_CXX_FLAGS MATCHES "-std=") + ADD_DEFINITIONS(-D__MATHERR_RENAME_EXCEPTION) + SET(CMAKE_SHARED_LIBRARY_C_FLAGS + "${CMAKE_SHARED_LIBRARY_C_FLAGS} -lc") + SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS + "${CMAKE_SHARED_LIBRARY_CXX_FLAGS} -lstdc++ -lgcc_s -lCrunG3 -lc") + SET(QUOTED_CMAKE_CXX_LINK_FLAGS "-lstdc++ -lgcc_s -lCrunG3 -lc") ELSE() - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -library=stlport4") + IF(SUNPRO_CXX_LIBRARY) + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -library=${SUNPRO_CXX_LIBRARY}") + IF(SUNPRO_CXX_LIBRARY STREQUAL "stdcxx4") + ADD_DEFINITIONS(-D__MATHERR_RENAME_EXCEPTION) + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -template=extdef") + ENDIF() + ELSE() + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -library=stlport4") + ENDIF() ENDIF() ENDIF() ENDIF() @@ -143,6 +153,7 @@ IF(CMAKE_SYSTEM_NAME MATCHES "SunOS" AND GET_FILENAME_COMPONENT(CXX_REALPATH ${CMAKE_CXX_COMPILER} REALPATH) # CC -V yields + # CC: Studio 12.5 Sun C++ 5.14 SunOS_sparc Dodona 2016/04/04 # CC: Sun C++ 5.13 SunOS_sparc Beta 2014/03/11 # CC: Sun C++ 5.11 SunOS_sparc 2010/08/13 @@ -157,9 +168,13 @@ IF(CMAKE_SYSTEM_NAME MATCHES "SunOS" AND ENDIF() STRING(REGEX MATCH "CC: Sun C\\+\\+ 5\\.([0-9]+)" VERSION_STRING ${stderr}) + IF (NOT CMAKE_MATCH_1 OR CMAKE_MATCH_1 STREQUAL "") + STRING(REGEX MATCH "CC: Studio 12\\.5 Sun C\\+\\+ 5\\.([0-9]+)" + VERSION_STRING ${stderr}) + ENDIF() SET(CC_MINOR_VERSION ${CMAKE_MATCH_1}) - IF(${CC_MINOR_VERSION} EQUAL 13) + IF(${CC_MINOR_VERSION} GREATER 12) SET(STLPORT_SUFFIX "lib/compilers/stlport4") IF(SIZEOF_VOIDP EQUAL 8 AND CMAKE_SYSTEM_PROCESSOR MATCHES "sparc") SET(STLPORT_SUFFIX "lib/compilers/stlport4/sparcv9") diff --git a/mysql-wsrep-5.6/dbug/tests.c b/mysql-wsrep-5.6/dbug/tests.c index 5fb84d48..c8ccb9b2 100644 --- a/mysql-wsrep-5.6/dbug/tests.c +++ b/mysql-wsrep-5.6/dbug/tests.c @@ -73,7 +73,7 @@ int main (int argc, char *argv[]) DBUG_EVALUATE_IF("evaluate_if", "ON", "OFF")); DBUG_EXECUTE_IF("pop", DBUG_POP(); ); { - char s[1000] __attribute__((unused)); + char s[1000] MY_ATTRIBUTE((unused)); DBUG_EXPLAIN(s, sizeof(s)-1); DBUG_PRINT("explain", ("dbug explained: %s", s)); } diff --git a/mysql-wsrep-5.6/extra/comp_err.c b/mysql-wsrep-5.6/extra/comp_err.c index fdeb72f0..ac5d113c 100644 --- a/mysql-wsrep-5.6/extra/comp_err.c +++ b/mysql-wsrep-5.6/extra/comp_err.c @@ -1,5 +1,5 @@ /* - Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1023,8 +1023,8 @@ static void print_version(void) static my_bool -get_one_option(int optid, const struct my_option *opt __attribute__ ((unused)), - char *argument __attribute__ ((unused))) +get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE ((unused)), + char *argument MY_ATTRIBUTE ((unused))) { DBUG_ENTER("get_one_option"); switch (optid) { diff --git a/mysql-wsrep-5.6/extra/innochecksum.cc b/mysql-wsrep-5.6/extra/innochecksum.cc index 7116e4f3..9c6ca996 100644 --- a/mysql-wsrep-5.6/extra/innochecksum.cc +++ b/mysql-wsrep-5.6/extra/innochecksum.cc @@ -1,5 +1,5 @@ /* - Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -235,8 +235,8 @@ extern "C" my_bool innochecksum_get_one_option( /*========================*/ int optid, - const struct my_option *opt __attribute__((unused)), - char *argument __attribute__((unused))) + const struct my_option *opt MY_ATTRIBUTE((unused)), + char *argument MY_ATTRIBUTE((unused))) { switch (optid) { case 'd': diff --git a/mysql-wsrep-5.6/extra/my_print_defaults.c b/mysql-wsrep-5.6/extra/my_print_defaults.c index 9587077d..6ccb08f7 100644 --- a/mysql-wsrep-5.6/extra/my_print_defaults.c +++ b/mysql-wsrep-5.6/extra/my_print_defaults.c @@ -1,6 +1,6 @@ /* - Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -118,8 +118,8 @@ static void usage(my_bool version) static my_bool -get_one_option(int optid, const struct my_option *opt __attribute__((unused)), - char *argument __attribute__((unused))) +get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)), + char *argument MY_ATTRIBUTE((unused))) { switch (optid) { case 'c': @@ -172,7 +172,7 @@ int main(int argc, char **argv) org_argv= argv; args_used= get_defaults_options(argc, argv, &defaults, &extra_defaults, - &group_suffix, &login_path); + &group_suffix, &login_path, FALSE); /* Copy defaults-xxx arguments & program name */ count=args_used+1; diff --git a/mysql-wsrep-5.6/extra/mysql_waitpid.c b/mysql-wsrep-5.6/extra/mysql_waitpid.c index 9e0c76e0..bf4147d7 100644 --- a/mysql-wsrep-5.6/extra/mysql_waitpid.c +++ b/mysql-wsrep-5.6/extra/mysql_waitpid.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -43,8 +43,8 @@ static struct my_option my_long_options[] = }; static my_bool -get_one_option(int optid, const struct my_option *opt __attribute__((unused)), - char *argument __attribute__((unused))) +get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)), + char *argument MY_ATTRIBUTE((unused))) { switch(optid) { case 'V': diff --git a/mysql-wsrep-5.6/extra/perror.c b/mysql-wsrep-5.6/extra/perror.c index 3bb3388e..427aeb83 100644 --- a/mysql-wsrep-5.6/extra/perror.c +++ b/mysql-wsrep-5.6/extra/perror.c @@ -1,5 +1,5 @@ /* - Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -94,8 +94,8 @@ static void usage(void) static my_bool -get_one_option(int optid, const struct my_option *opt __attribute__((unused)), - char *argument __attribute__((unused))) +get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)), + char *argument MY_ATTRIBUTE((unused))) { switch (optid) { case 's': diff --git a/mysql-wsrep-5.6/extra/resolve_stack_dump.cc b/mysql-wsrep-5.6/extra/resolve_stack_dump.cc index c94a1bbe..05ca4ea2 100644 --- a/mysql-wsrep-5.6/extra/resolve_stack_dump.cc +++ b/mysql-wsrep-5.6/extra/resolve_stack_dump.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -51,7 +51,7 @@ static char* dump_fname = 0, *sym_fname = 0; static std::vector sym_table; static FILE* fp_dump, *fp_sym = 0, *fp_out; static void die(const char* fmt, ...) - __attribute__((noreturn)) __attribute__((format(printf, 1, 2))); + MY_ATTRIBUTE((noreturn)) MY_ATTRIBUTE((format(printf, 1, 2))); static struct my_option my_long_options[] = { @@ -107,8 +107,8 @@ static void die(const char* fmt, ...) static my_bool -get_one_option(int optid, const struct my_option *opt __attribute__((unused)), - char *argument __attribute__((unused))) +get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)), + char *argument MY_ATTRIBUTE((unused))) { switch(optid) { case 'V': diff --git a/mysql-wsrep-5.6/extra/resolveip.c b/mysql-wsrep-5.6/extra/resolveip.c index f69aa7fe..66debab6 100644 --- a/mysql-wsrep-5.6/extra/resolveip.c +++ b/mysql-wsrep-5.6/extra/resolveip.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -72,8 +72,8 @@ static void usage(void) static my_bool -get_one_option(int optid, const struct my_option *opt __attribute__((unused)), - char *argument __attribute__((unused))) +get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)), + char *argument MY_ATTRIBUTE((unused))) { switch (optid) { case 'V': print_version(); exit(0); diff --git a/mysql-wsrep-5.6/extra/yassl/src/log.cpp b/mysql-wsrep-5.6/extra/yassl/src/log.cpp index c6cb8e6e..2f112ac3 100644 --- a/mysql-wsrep-5.6/extra/yassl/src/log.cpp +++ b/mysql-wsrep-5.6/extra/yassl/src/log.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -60,6 +60,7 @@ namespace yaSSL { time_t clicks = time(0); char timeStr[32]; + memset(timeStr, 0, sizeof(timeStr)); // get rid of newline strncpy(timeStr, ctime(&clicks), sizeof(timeStr)); unsigned int len = strlen(timeStr); diff --git a/mysql-wsrep-5.6/extra/yassl/taocrypt/CMakeLists.txt b/mysql-wsrep-5.6/extra/yassl/taocrypt/CMakeLists.txt index 267030ea..a00fa8a1 100644 --- a/mysql-wsrep-5.6/extra/yassl/taocrypt/CMakeLists.txt +++ b/mysql-wsrep-5.6/extra/yassl/taocrypt/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -13,6 +13,8 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +INCLUDE(${MYSQL_CMAKE_SCRIPT_DIR}/compile_flags.cmake) + INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/extra/yassl/taocrypt/mySTL ${CMAKE_SOURCE_DIR}/extra/yassl/taocrypt/include) @@ -29,6 +31,14 @@ SET(TAOCRYPT_SOURCES src/aes.cpp src/aestables.cpp src/algebra.cpp src/arc4.cpp include/random.hpp include/ripemd.hpp include/rsa.hpp include/sha.hpp include/rabbit.hpp include/hc128.hpp) +# Segfaults with SIGILL at high optimization levels in: +# ModularArithmetic::SimultaneousExponentiate +IF(CMAKE_CXX_COMPILER_ID MATCHES "SunPro") + IF(CMAKE_CXX_FLAGS MATCHES "-std=") + ADD_COMPILE_FLAGS(src/integer.cpp COMPILE_FLAGS "-xO1") + ENDIF() +ENDIF() + IF(HAVE_EXPLICIT_TEMPLATE_INSTANTIATION) SET(TAOCRYPT_SOURCES ${TAOCRYPT_SOURCES} src/template_instnt.cpp) ENDIF() diff --git a/mysql-wsrep-5.6/include/atomic/nolock.h b/mysql-wsrep-5.6/include/atomic/nolock.h index 190901a2..23a5b7af 100644 --- a/mysql-wsrep-5.6/include/atomic/nolock.h +++ b/mysql-wsrep-5.6/include/atomic/nolock.h @@ -1,7 +1,7 @@ #ifndef ATOMIC_NOLOCK_INCLUDED #define ATOMIC_NOLOCK_INCLUDED -/* Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved. reserved. +/* Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved. reserved. reserved. This program is free software; you can redistribute it and/or modify @@ -44,7 +44,7 @@ Type not used so minimal size (emptry struct has different size between C and C++, zero-length array is gcc-specific). */ -typedef char my_atomic_rwlock_t __attribute__ ((unused)); +typedef char my_atomic_rwlock_t MY_ATTRIBUTE ((unused)); #define my_atomic_rwlock_destroy(name) #define my_atomic_rwlock_init(name) #define my_atomic_rwlock_rdlock(name) diff --git a/mysql-wsrep-5.6/include/lf.h b/mysql-wsrep-5.6/include/lf.h index d807b216..d55717a8 100644 --- a/mysql-wsrep-5.6/include/lf.h +++ b/mysql-wsrep-5.6/include/lf.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -138,7 +138,7 @@ typedef struct { #if defined(__GNUC__) && defined(MY_LF_EXTRA_DEBUG) #define LF_REQUIRE_PINS(N) \ static const char require_pins[LF_PINBOX_PINS-N] \ - __attribute__ ((unused)); \ + MY_ATTRIBUTE ((unused)); \ static const int LF_NUM_PINS_IN_THIS_FILE= N; #define _lf_pin(PINS, PIN, ADDR) \ ( \ diff --git a/mysql-wsrep-5.6/include/m_ctype.h b/mysql-wsrep-5.6/include/m_ctype.h index 2c9c5f75..f6933edd 100644 --- a/mysql-wsrep-5.6/include/m_ctype.h +++ b/mysql-wsrep-5.6/include/m_ctype.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -658,10 +658,10 @@ int my_wildcmp_mb_bin(const CHARSET_INFO *cs, const char *wildstr,const char *wildend, int escape, int w_one, int w_many); -int my_strcasecmp_mb_bin(const CHARSET_INFO * cs __attribute__((unused)), +int my_strcasecmp_mb_bin(const CHARSET_INFO * cs MY_ATTRIBUTE((unused)), const char *s, const char *t); -void my_hash_sort_mb_bin(const CHARSET_INFO *cs __attribute__((unused)), +void my_hash_sort_mb_bin(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const uchar *key, size_t len,ulong *nr1, ulong *nr2); size_t my_strnxfrm_mb(const CHARSET_INFO *, diff --git a/mysql-wsrep-5.6/include/my_atomic.h b/mysql-wsrep-5.6/include/my_atomic.h index 705f531e..1539d1eb 100644 --- a/mysql-wsrep-5.6/include/my_atomic.h +++ b/mysql-wsrep-5.6/include/my_atomic.h @@ -1,7 +1,7 @@ #ifndef MY_ATOMIC_INCLUDED #define MY_ATOMIC_INCLUDED -/* Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -121,11 +121,11 @@ typedef union { \ int ## S i; \ uint ## S u; \ - } U_ ## S __attribute__ ((transparent_union)); \ + } U_ ## S MY_ATTRIBUTE ((transparent_union)); \ typedef union { \ int ## S volatile *i; \ uint ## S volatile *u; \ - } Uv_ ## S __attribute__ ((transparent_union)); + } Uv_ ## S MY_ATTRIBUTE ((transparent_union)); #define uintptr intptr make_transparent_unions(8) make_transparent_unions(16) diff --git a/mysql-wsrep-5.6/include/my_attribute.h b/mysql-wsrep-5.6/include/my_attribute.h index 78999f25..5ee4eb16 100644 --- a/mysql-wsrep-5.6/include/my_attribute.h +++ b/mysql-wsrep-5.6/include/my_attribute.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -28,41 +28,30 @@ #endif /* - Disable __attribute__() on gcc < 2.7, g++ < 3.4, and non-gcc compilers. + Disable MY_ATTRIBUTE() on g++ < 3.4, and non-gcc compilers. Some forms of __attribute__ are actually supported in earlier versions of g++, but we just disable them all because we only use them to generate compilation warnings. */ -#ifndef __attribute__ -# if !defined(__GNUC__) -# define __attribute__(A) -# elif GCC_VERSION < 2008 -# define __attribute__(A) -# elif defined(__cplusplus) && GCC_VERSION < 3004 -# define __attribute__(A) -# endif +#ifndef MY_ATTRIBUTE +#if defined(__GNUC__) && GCC_VERSION > 3003 +# define MY_ATTRIBUTE(A) __attribute__(A) +#else +# define MY_ATTRIBUTE(A) +#endif #endif /* - __attribute__((format(...))) is only supported in gcc >= 2.8 and g++ >= 3.4 - But that's already covered by the __attribute__ tests above, so this is + __attribute__((format(...))) is only supported in g++ >= 3.4 + But that's already covered by the MY_ATTRIBUTE tests above, so this is just a convenience macro. */ #ifndef ATTRIBUTE_FORMAT -# define ATTRIBUTE_FORMAT(style, m, n) __attribute__((format(style, m, n))) +# define ATTRIBUTE_FORMAT(style, m, n) MY_ATTRIBUTE((format(style, m, n))) #endif -/* - - __attribute__((format(...))) on a function pointer is not supported - until gcc 3.1 -*/ #ifndef ATTRIBUTE_FORMAT_FPTR -# if (GCC_VERSION >= 3001) # define ATTRIBUTE_FORMAT_FPTR(style, m, n) ATTRIBUTE_FORMAT(style, m, n) -# else -# define ATTRIBUTE_FORMAT_FPTR(style, m, n) -# endif /* GNUC >= 3.1 */ #endif diff --git a/mysql-wsrep-5.6/include/my_default.h b/mysql-wsrep-5.6/include/my_default.h index 1c217d45..2feaa69f 100644 --- a/mysql-wsrep-5.6/include/my_default.h +++ b/mysql-wsrep-5.6/include/my_default.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -33,16 +33,18 @@ typedef int (*Process_option_func)(void *ctx, const char *group_name, my_bool my_getopt_is_args_separator(const char* arg); int get_defaults_options(int argc, char **argv, char **defaults, char **extra_defaults, - char **group_suffix, char **login_path); + char **group_suffix, char **login_path, + my_bool found_no_defaults); int my_load_defaults(const char *conf_file, const char **groups, int *argc, char ***argv, const char ***); -int check_file_permissions(const char *file_name); +int check_file_permissions(const char *file_name, my_bool is_login_file); int load_defaults(const char *conf_file, const char **groups, int *argc, char ***argv); int my_search_option_files(const char *conf_file, int *argc, char ***argv, uint *args_used, Process_option_func func, void *func_ctx, - const char **default_directories); + const char **default_directories, + my_bool is_login_file, my_bool found_no_defaults); void free_defaults(char **argv); void my_print_default_files(const char *conf_file); void print_defaults(const char *conf_file, const char **groups); diff --git a/mysql-wsrep-5.6/include/my_global.h b/mysql-wsrep-5.6/include/my_global.h index aadaffe5..5f716d4e 100644 --- a/mysql-wsrep-5.6/include/my_global.h +++ b/mysql-wsrep-5.6/include/my_global.h @@ -1,5 +1,5 @@ /* - Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -184,7 +184,7 @@ other reason to use them is for documentation */ -#if !defined(__GNUC__) || (__GNUC__ == 2 && __GNUC_MINOR__ < 96) +#if !defined(__builtin_expect) #define __builtin_expect(x, expected_value) (x) #endif @@ -374,7 +374,7 @@ C_MODE_END #define compile_time_assert(X) \ do \ { \ - typedef char compile_time_assert[(X) ? 1 : -1] __attribute__((unused)); \ + typedef char compile_time_assert[(X) ? 1 : -1] MY_ATTRIBUTE((unused)); \ } while(0) #endif diff --git a/mysql-wsrep-5.6/include/my_pthread.h b/mysql-wsrep-5.6/include/my_pthread.h index 6463ceea..956221aa 100644 --- a/mysql-wsrep-5.6/include/my_pthread.h +++ b/mysql-wsrep-5.6/include/my_pthread.h @@ -860,7 +860,7 @@ struct st_my_thread_var #endif }; -extern struct st_my_thread_var *_my_thread_var(void) __attribute__ ((const)); +extern struct st_my_thread_var *_my_thread_var(void) MY_ATTRIBUTE ((const)); extern int set_mysys_var(struct st_my_thread_var *mysys_var); extern void **my_thread_var_dbug(); extern uint my_thread_end_wait_time; diff --git a/mysql-wsrep-5.6/include/my_sys.h b/mysql-wsrep-5.6/include/my_sys.h index 76f0be71..75e516b5 100644 --- a/mysql-wsrep-5.6/include/my_sys.h +++ b/mysql-wsrep-5.6/include/my_sys.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -84,6 +84,7 @@ typedef struct my_aio_result { #define MY_RESOLVE_LINK 128 /* my_realpath(); Only resolve links */ #define MY_HOLD_ORIGINAL_MODES 128 /* my_copy() holds to file modes */ #define MY_REDEL_MAKE_BACKUP 256 +#define MY_REDEL_NO_COPY_STAT 512 /* my_redel() doesn't call my_copystat() */ #define MY_SEEK_NOT_DONE 32 /* my_lock may have to do a seek */ #define MY_DONT_WAIT 64 /* my_lock() don't wait if can't lock */ #define MY_ZEROFILL 32 /* my_malloc(), fill array with zero */ diff --git a/mysql-wsrep-5.6/include/my_tree.h b/mysql-wsrep-5.6/include/my_tree.h index c86e48b0..3db7b390 100644 --- a/mysql-wsrep-5.6/include/my_tree.h +++ b/mysql-wsrep-5.6/include/my_tree.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -62,7 +62,7 @@ typedef struct st_tree { } TREE; /* Functions on whole tree */ -void init_tree(TREE *tree, ulong default_alloc_size, ulong memory_limit, +void init_tree(TREE *tree, size_t default_alloc_size, ulong memory_limit, int size, qsort_cmp2 compare, my_bool with_delete, tree_element_free free_element, const void *custom_arg); void delete_tree(TREE*); diff --git a/mysql-wsrep-5.6/include/myisam.h b/mysql-wsrep-5.6/include/myisam.h index 770bb726..63248097 100644 --- a/mysql-wsrep-5.6/include/myisam.h +++ b/mysql-wsrep-5.6/include/myisam.h @@ -1,5 +1,5 @@ /* - Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -426,12 +426,13 @@ int chk_size(MI_CHECK *param, MI_INFO *info); int chk_key(MI_CHECK *param, MI_INFO *info); int chk_data_link(MI_CHECK *param, MI_INFO *info,int extend); int mi_repair(MI_CHECK *param, register MI_INFO *info, - char * name, int rep_quick); -int mi_sort_index(MI_CHECK *param, register MI_INFO *info, char * name); + char * name, int rep_quick, my_bool no_copy_stat); +int mi_sort_index(MI_CHECK *param, register MI_INFO *info, char * name, + my_bool no_copy_stat); int mi_repair_by_sort(MI_CHECK *param, register MI_INFO *info, - const char * name, int rep_quick); + const char * name, int rep_quick, my_bool no_copy_stat); int mi_repair_parallel(MI_CHECK *param, register MI_INFO *info, - const char * name, int rep_quick); + const char * name, int rep_quick, my_bool no_copy_stat); int change_to_newfile(const char * filename, const char * old_ext, const char * new_ext, myf myflags); int lock_file(MI_CHECK *param, File file, my_off_t start, int lock_type, diff --git a/mysql-wsrep-5.6/include/mysql/psi/mysql_file.h b/mysql-wsrep-5.6/include/mysql/psi/mysql_file.h index c839b2b0..a83e2ef8 100644 --- a/mysql-wsrep-5.6/include/mysql/psi/mysql_file.h +++ b/mysql-wsrep-5.6/include/mysql/psi/mysql_file.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -511,9 +511,9 @@ static inline void inline_mysql_file_register( PSI_file_info *info, int count #else - const char *category __attribute__ ((unused)), - void *info __attribute__ ((unused)), - int count __attribute__ ((unused)) + const char *category MY_ATTRIBUTE ((unused)), + void *info MY_ATTRIBUTE ((unused)), + int count MY_ATTRIBUTE ((unused)) #endif ) { diff --git a/mysql-wsrep-5.6/include/mysql/psi/mysql_socket.h b/mysql-wsrep-5.6/include/mysql/psi/mysql_socket.h index e1d56539..209f113f 100644 --- a/mysql-wsrep-5.6/include/mysql/psi/mysql_socket.h +++ b/mysql-wsrep-5.6/include/mysql/psi/mysql_socket.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -114,9 +114,9 @@ mysql_socket_set_address( const struct sockaddr *addr, socklen_t addr_len #else - MYSQL_SOCKET socket __attribute__ ((unused)), - const struct sockaddr *addr __attribute__ ((unused)), - socklen_t addr_len __attribute__ ((unused)) + MYSQL_SOCKET socket MY_ATTRIBUTE ((unused)), + const struct sockaddr *addr MY_ATTRIBUTE ((unused)), + socklen_t addr_len MY_ATTRIBUTE ((unused)) #endif ) { @@ -136,7 +136,7 @@ mysql_socket_set_thread_owner( #ifdef HAVE_PSI_SOCKET_INTERFACE MYSQL_SOCKET socket #else -MYSQL_SOCKET socket __attribute__ ((unused)) +MYSQL_SOCKET socket MY_ATTRIBUTE ((unused)) #endif ) { diff --git a/mysql-wsrep-5.6/include/mysql/psi/mysql_thread.h b/mysql-wsrep-5.6/include/mysql/psi/mysql_thread.h index 99fcd348..ee2693d2 100644 --- a/mysql-wsrep-5.6/include/mysql/psi/mysql_thread.h +++ b/mysql-wsrep-5.6/include/mysql/psi/mysql_thread.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -587,9 +587,9 @@ static inline void inline_mysql_mutex_register( PSI_mutex_info *info, int count #else - const char *category __attribute__ ((unused)), - void *info __attribute__ ((unused)), - int count __attribute__ ((unused)) + const char *category MY_ATTRIBUTE ((unused)), + void *info MY_ATTRIBUTE ((unused)), + int count MY_ATTRIBUTE ((unused)) #endif ) { @@ -771,9 +771,9 @@ static inline void inline_mysql_rwlock_register( PSI_rwlock_info *info, int count #else - const char *category __attribute__ ((unused)), - void *info __attribute__ ((unused)), - int count __attribute__ ((unused)) + const char *category MY_ATTRIBUTE ((unused)), + void *info MY_ATTRIBUTE ((unused)), + int count MY_ATTRIBUTE ((unused)) #endif ) { @@ -1089,9 +1089,9 @@ static inline void inline_mysql_cond_register( PSI_cond_info *info, int count #else - const char *category __attribute__ ((unused)), - void *info __attribute__ ((unused)), - int count __attribute__ ((unused)) + const char *category MY_ATTRIBUTE ((unused)), + void *info MY_ATTRIBUTE ((unused)), + int count MY_ATTRIBUTE ((unused)) #endif ) { @@ -1231,9 +1231,9 @@ static inline void inline_mysql_thread_register( PSI_thread_info *info, int count #else - const char *category __attribute__ ((unused)), - void *info __attribute__ ((unused)), - int count __attribute__ ((unused)) + const char *category MY_ATTRIBUTE ((unused)), + void *info MY_ATTRIBUTE ((unused)), + int count MY_ATTRIBUTE ((unused)) #endif ) { diff --git a/mysql-wsrep-5.6/libmysql/CMakeLists.txt b/mysql-wsrep-5.6/libmysql/CMakeLists.txt index 790888b5..7b9c7626 100644 --- a/mysql-wsrep-5.6/libmysql/CMakeLists.txt +++ b/mysql-wsrep-5.6/libmysql/CMakeLists.txt @@ -234,7 +234,11 @@ IF(NOT DISABLE_SHARED) OUTPUT_NAME mysqlclient VERSION "${OS_SHARED_LIB_VERSION}" SOVERSION "${SHARED_LIB_MAJOR_VERSION}") - CONFIGURE_FILE(libmysql.ver.in ${CMAKE_CURRENT_BINARY_DIR}/libmysql.ver) + IF(WITH_SYMVER16) + CONFIGURE_FILE(libmysql.ver16.in ${CMAKE_CURRENT_BINARY_DIR}/libmysql.ver) + ELSE() + CONFIGURE_FILE(libmysql.ver.in ${CMAKE_CURRENT_BINARY_DIR}/libmysql.ver) + ENDIF() GET_TARGET_PROPERTY(libmysql_link_flags libmysql LINK_FLAGS) IF(NOT libmysql_link_flag) diff --git a/mysql-wsrep-5.6/libmysql/libmysql.c b/mysql-wsrep-5.6/libmysql/libmysql.c index af8f3d6f..e57d95a0 100644 --- a/mysql-wsrep-5.6/libmysql/libmysql.c +++ b/mysql-wsrep-5.6/libmysql/libmysql.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -111,9 +111,9 @@ typedef struct st_mysql_stmt_extension 1 could not initialize environment (out of memory or thread keys) */ -int STDCALL mysql_server_init(int argc __attribute__((unused)), - char **argv __attribute__((unused)), - char **groups __attribute__((unused))) +int STDCALL mysql_server_init(int argc MY_ATTRIBUTE((unused)), + char **argv MY_ATTRIBUTE((unused)), + char **groups MY_ATTRIBUTE((unused))) { int result= 0; if (!mysql_client_init) @@ -128,7 +128,7 @@ int STDCALL mysql_server_init(int argc __attribute__((unused)), if (!mysql_port) { char *env; - struct servent *serv_ptr __attribute__((unused)); + struct servent *serv_ptr MY_ATTRIBUTE((unused)); mysql_port = MYSQL_PORT; @@ -264,7 +264,7 @@ append_wild(char *to, char *end, const char *wild) **************************************************************************/ void STDCALL -mysql_debug(const char *debug __attribute__((unused))) +mysql_debug(const char *debug MY_ATTRIBUTE((unused))) { #ifndef DBUG_OFF char *env; @@ -299,7 +299,7 @@ mysql_debug(const char *debug __attribute__((unused))) **************************************************************************/ sig_handler -my_pipe_sig_handler(int sig __attribute__((unused))) +my_pipe_sig_handler(int sig MY_ATTRIBUTE((unused))) { DBUG_PRINT("info",("Hit by signal %d",sig)); #ifdef SIGNAL_HANDLER_RESET_ON_DELIVERY @@ -559,7 +559,7 @@ typedef struct st_default_local_infile */ static int default_local_infile_init(void **ptr, const char *filename, - void *userdata __attribute__ ((unused))) + void *userdata MY_ATTRIBUTE ((unused))) { default_local_infile_data *data; char tmp_name[FN_REFLEN]; @@ -2341,15 +2341,15 @@ stmt_read_row_from_cursor(MYSQL_STMT *stmt, unsigned char **row) */ static int -stmt_read_row_no_data(MYSQL_STMT *stmt __attribute__((unused)), - unsigned char **row __attribute__((unused))) +stmt_read_row_no_data(MYSQL_STMT *stmt MY_ATTRIBUTE((unused)), + unsigned char **row MY_ATTRIBUTE((unused))) { return MYSQL_NO_DATA; } static int -stmt_read_row_no_result_set(MYSQL_STMT *stmt __attribute__((unused)), - unsigned char **row __attribute__((unused))) +stmt_read_row_no_result_set(MYSQL_STMT *stmt MY_ATTRIBUTE((unused)), + unsigned char **row MY_ATTRIBUTE((unused))) { set_stmt_error(stmt, CR_NO_RESULT_SET, unknown_sqlstate, NULL); return 1; @@ -3708,7 +3708,7 @@ static void fetch_result_short(MYSQL_BIND *param, MYSQL_FIELD *field, } static void fetch_result_int32(MYSQL_BIND *param, - MYSQL_FIELD *field __attribute__((unused)), + MYSQL_FIELD *field MY_ATTRIBUTE((unused)), uchar **row) { my_bool field_is_unsigned= MY_TEST(field->flags & UNSIGNED_FLAG); @@ -3719,7 +3719,7 @@ static void fetch_result_int32(MYSQL_BIND *param, } static void fetch_result_int64(MYSQL_BIND *param, - MYSQL_FIELD *field __attribute__((unused)), + MYSQL_FIELD *field MY_ATTRIBUTE((unused)), uchar **row) { my_bool field_is_unsigned= MY_TEST(field->flags & UNSIGNED_FLAG); @@ -3730,7 +3730,7 @@ static void fetch_result_int64(MYSQL_BIND *param, } static void fetch_result_float(MYSQL_BIND *param, - MYSQL_FIELD *field __attribute__((unused)), + MYSQL_FIELD *field MY_ATTRIBUTE((unused)), uchar **row) { float value; @@ -3740,7 +3740,7 @@ static void fetch_result_float(MYSQL_BIND *param, } static void fetch_result_double(MYSQL_BIND *param, - MYSQL_FIELD *field __attribute__((unused)), + MYSQL_FIELD *field MY_ATTRIBUTE((unused)), uchar **row) { double value; @@ -3750,7 +3750,7 @@ static void fetch_result_double(MYSQL_BIND *param, } static void fetch_result_time(MYSQL_BIND *param, - MYSQL_FIELD *field __attribute__((unused)), + MYSQL_FIELD *field MY_ATTRIBUTE((unused)), uchar **row) { MYSQL_TIME *tm= (MYSQL_TIME *)param->buffer; @@ -3758,7 +3758,7 @@ static void fetch_result_time(MYSQL_BIND *param, } static void fetch_result_date(MYSQL_BIND *param, - MYSQL_FIELD *field __attribute__((unused)), + MYSQL_FIELD *field MY_ATTRIBUTE((unused)), uchar **row) { MYSQL_TIME *tm= (MYSQL_TIME *)param->buffer; @@ -3766,7 +3766,7 @@ static void fetch_result_date(MYSQL_BIND *param, } static void fetch_result_datetime(MYSQL_BIND *param, - MYSQL_FIELD *field __attribute__((unused)), + MYSQL_FIELD *field MY_ATTRIBUTE((unused)), uchar **row) { MYSQL_TIME *tm= (MYSQL_TIME *)param->buffer; @@ -3774,7 +3774,7 @@ static void fetch_result_datetime(MYSQL_BIND *param, } static void fetch_result_bin(MYSQL_BIND *param, - MYSQL_FIELD *field __attribute__((unused)), + MYSQL_FIELD *field MY_ATTRIBUTE((unused)), uchar **row) { ulong length= net_field_length(row); @@ -3786,7 +3786,7 @@ static void fetch_result_bin(MYSQL_BIND *param, } static void fetch_result_str(MYSQL_BIND *param, - MYSQL_FIELD *field __attribute__((unused)), + MYSQL_FIELD *field MY_ATTRIBUTE((unused)), uchar **row) { ulong length= net_field_length(row); @@ -3807,7 +3807,7 @@ static void fetch_result_str(MYSQL_BIND *param, */ static void skip_result_fixed(MYSQL_BIND *param, - MYSQL_FIELD *field __attribute__((unused)), + MYSQL_FIELD *field MY_ATTRIBUTE((unused)), uchar **row) { @@ -3815,8 +3815,8 @@ static void skip_result_fixed(MYSQL_BIND *param, } -static void skip_result_with_length(MYSQL_BIND *param __attribute__((unused)), - MYSQL_FIELD *field __attribute__((unused)), +static void skip_result_with_length(MYSQL_BIND *param MY_ATTRIBUTE((unused)), + MYSQL_FIELD *field MY_ATTRIBUTE((unused)), uchar **row) { @@ -3825,7 +3825,7 @@ static void skip_result_with_length(MYSQL_BIND *param __attribute__((unused)), } -static void skip_result_string(MYSQL_BIND *param __attribute__((unused)), +static void skip_result_string(MYSQL_BIND *param MY_ATTRIBUTE((unused)), MYSQL_FIELD *field, uchar **row) @@ -4922,3 +4922,615 @@ my_bool STDCALL mysql_read_query_result(MYSQL *mysql) return (*mysql->methods->read_query_result)(mysql); } +#if defined(EXPORT_SYMVER16) +#ifndef EMBEDDED_LIBRARY + +// Hack to provide both libmysqlclient_16 and libmysqlclient_18 symbol versions + +#define SYM_16(_exportedsym) __asm__(".symver symver16_" #_exportedsym "," #_exportedsym "@libmysqlclient_16") + +void STDCALL symver16_myodbc_remove_escape(MYSQL *mysql,char *name) +{ + return myodbc_remove_escape(mysql, name); +} +SYM_16(myodbc_remove_escape); + + +my_ulonglong STDCALL symver16_mysql_affected_rows(MYSQL *mysql) +{ + return mysql_affected_rows(mysql); +} +SYM_16(mysql_affected_rows); + + +my_bool STDCALL symver16_mysql_autocommit(MYSQL * mysql, my_bool auto_mode) +{ + return mysql_autocommit(mysql, auto_mode); +} +SYM_16(mysql_autocommit); + + +my_bool STDCALL symver16_mysql_change_user(MYSQL *mysql, const char *user, const char *passwd, const char *db) +{ + return mysql_change_user(mysql, user, passwd, db); +} +SYM_16(mysql_change_user); + + +const char * STDCALL symver16_mysql_character_set_name(MYSQL *mysql) +{ + return mysql_character_set_name(mysql); +} +SYM_16(mysql_character_set_name); + + +my_bool STDCALL symver16_mysql_commit(MYSQL * mysql) +{ + return mysql_commit(mysql); +} +SYM_16(mysql_commit); + + +void STDCALL symver16_mysql_data_seek(MYSQL_RES *result, my_ulonglong row) +{ + return mysql_data_seek(result, row); +} +SYM_16(mysql_data_seek); + + +void STDCALL symver16_mysql_debug(const char *debug __attribute__((unused))) +{ + return mysql_debug(debug); +} +SYM_16(mysql_debug); + + +int STDCALL symver16_mysql_dump_debug_info(MYSQL *mysql) +{ + return mysql_dump_debug_info(mysql); +} +SYM_16(mysql_dump_debug_info); + + +my_bool STDCALL symver16_mysql_embedded(void) +{ + return mysql_embedded(); +} +SYM_16(mysql_embedded); + + +my_bool STDCALL symver16_mysql_eof(MYSQL_RES *res) +{ + return mysql_eof(res); +} +SYM_16(mysql_eof); + + +ulong STDCALL symver16_mysql_escape_string(char *to,const char *from,ulong length) +{ + return mysql_escape_string(to, from, length); +} +SYM_16(mysql_escape_string); + + +MYSQL_FIELD * STDCALL symver16_mysql_fetch_field(MYSQL_RES *result) +{ + return mysql_fetch_field(result); +} +SYM_16(mysql_fetch_field); + + +MYSQL_FIELD * STDCALL symver16_mysql_fetch_field_direct(MYSQL_RES *res,uint fieldnr) +{ + return mysql_fetch_field_direct(res, fieldnr); +} +SYM_16(mysql_fetch_field_direct); + + +MYSQL_FIELD * STDCALL symver16_mysql_fetch_fields(MYSQL_RES *res) +{ + return mysql_fetch_fields(res); +} +SYM_16(mysql_fetch_fields); + + +unsigned int STDCALL symver16_mysql_field_count(MYSQL *mysql) +{ + return mysql_field_count(mysql); +} +SYM_16(mysql_field_count); + + +MYSQL_FIELD_OFFSET STDCALL symver16_mysql_field_seek(MYSQL_RES *result, MYSQL_FIELD_OFFSET field_offset) +{ + return mysql_field_seek(result, field_offset); +} +SYM_16(mysql_field_seek); + + +MYSQL_FIELD_OFFSET STDCALL symver16_mysql_field_tell(MYSQL_RES *res) +{ + return mysql_field_tell(res); +} +SYM_16(mysql_field_tell); + + +void STDCALL symver16_mysql_get_character_set_info(MYSQL *mysql, MY_CHARSET_INFO *csinfo) +{ + return mysql_get_character_set_info(mysql, csinfo); +} +SYM_16(mysql_get_character_set_info); + + +const char * STDCALL symver16_mysql_get_client_info(void) +{ + return mysql_get_client_info(); +} +SYM_16(mysql_get_client_info); + +ulong STDCALL symver16_mysql_get_client_version(void) +{ + return mysql_get_client_version(); +} +SYM_16(mysql_get_client_version); + + +const char * STDCALL symver16_mysql_get_host_info(MYSQL *mysql) +{ + return mysql_get_host_info(mysql); +} +SYM_16(mysql_get_host_info); + + +MYSQL_PARAMETERS *STDCALL symver16_mysql_get_parameters(void) +{ + return mysql_get_parameters(); +} +SYM_16(mysql_get_parameters); + + +uint STDCALL symver16_mysql_get_proto_info(MYSQL *mysql) +{ + return mysql_get_proto_info(mysql); +} +SYM_16(mysql_get_proto_info); + + +const char * STDCALL symver16_mysql_get_server_info(MYSQL *mysql) +{ + return mysql_get_server_info(mysql); +} +SYM_16(mysql_get_server_info); + + +ulong STDCALL symver16_mysql_hex_string(char *to, const char *from, ulong length) +{ + return mysql_hex_string(to, from, length); +} +SYM_16(mysql_hex_string); + + +const char *STDCALL symver16_mysql_info(MYSQL *mysql) +{ + return mysql_info(mysql); +} +SYM_16(mysql_info); + + +my_ulonglong STDCALL symver16_mysql_insert_id(MYSQL *mysql) +{ + return mysql_insert_id(mysql); +} +SYM_16(mysql_insert_id); + + +int STDCALL symver16_mysql_kill(MYSQL *mysql,ulong pid) +{ + return mysql_kill(mysql, pid); +} +SYM_16(mysql_kill); + + +MYSQL_RES * STDCALL symver16_mysql_list_dbs(MYSQL *mysql, const char *wild) +{ + return mysql_list_dbs(mysql, wild); +} +SYM_16(mysql_list_dbs); + + +MYSQL_RES * STDCALL symver16_mysql_list_fields(MYSQL *mysql, const char *table, const char *wild) +{ + return mysql_list_fields(mysql, table, wild); +} +SYM_16(mysql_list_fields); + + +MYSQL_RES * STDCALL symver16_mysql_list_processes(MYSQL *mysql) +{ + return mysql_list_processes(mysql); +} +SYM_16(mysql_list_processes); + + +MYSQL_RES * STDCALL symver16_mysql_list_tables(MYSQL *mysql, const char *wild) +{ + return mysql_list_tables(mysql, wild); +} +SYM_16(mysql_list_tables); + + +my_bool STDCALL symver16_mysql_more_results(MYSQL *mysql) +{ + return mysql_more_results(mysql); +} +SYM_16(mysql_more_results); + + +int STDCALL symver16_mysql_next_result(MYSQL *mysql) +{ + return mysql_next_result(mysql); +} +SYM_16(mysql_next_result); + + +int STDCALL symver16_mysql_ping(MYSQL *mysql) +{ + return mysql_ping(mysql); +} +SYM_16(mysql_ping); + + +int STDCALL symver16_mysql_query(MYSQL *mysql, const char *query) +{ + return mysql_query(mysql, query); +} +SYM_16(mysql_query); + + +my_bool STDCALL symver16_mysql_read_query_result(MYSQL *mysql) +{ + return mysql_read_query_result(mysql); +} +SYM_16(mysql_read_query_result); + + +ulong STDCALL symver16_mysql_real_escape_string(MYSQL *mysql, char *to,const char *from, ulong length) +{ + return mysql_real_escape_string(mysql, to, from, length); +} +SYM_16(mysql_real_escape_string); + + +int STDCALL symver16_mysql_refresh(MYSQL *mysql,uint options) +{ + return mysql_refresh(mysql, options); +} +SYM_16(mysql_refresh); + + +my_bool STDCALL symver16_mysql_rollback(MYSQL * mysql) +{ + return mysql_rollback(mysql); +} +SYM_16(mysql_rollback); + + +MYSQL_ROW_OFFSET STDCALL symver16_mysql_row_seek(MYSQL_RES *result, MYSQL_ROW_OFFSET row) +{ + return mysql_row_seek(result, row); +} +SYM_16(mysql_row_seek); + + +MYSQL_ROW_OFFSET STDCALL symver16_mysql_row_tell(MYSQL_RES *res) +{ + return mysql_row_tell(res); +} +SYM_16(mysql_row_tell); + + +void STDCALL symver16_mysql_server_end() +{ + return mysql_server_end(); +} +SYM_16(mysql_server_end); + + +int STDCALL symver16_mysql_server_init(int argc __attribute__((unused)), char **argv __attribute__((unused)), char **groups __attribute__((unused))) +{ + return mysql_server_init(argc, argv, groups); +} +SYM_16(mysql_server_init); + + +void symver16_mysql_set_local_infile_default(MYSQL *mysql) +{ + return mysql_set_local_infile_default(mysql); +} +SYM_16(mysql_set_local_infile_default); + + +void symver16_mysql_set_local_infile_handler(MYSQL *mysql, int (*local_infile_init)(void **, const char *, void *), int (*local_infile_read)(void *, char *, uint), void (*local_infile_end)(void *), int (*local_infile_error)(void *, char *, uint), void *userdata) +{ + return mysql_set_local_infile_handler(mysql, local_infile_init, local_infile_read, local_infile_end, local_infile_error, userdata); +} +SYM_16(mysql_set_local_infile_handler); + + +int STDCALL symver16_mysql_set_server_option(MYSQL *mysql, enum enum_mysql_set_option option) +{ + return mysql_set_server_option(mysql, option); +} +SYM_16(mysql_set_server_option); + + +int STDCALL symver16_mysql_shutdown(MYSQL *mysql, enum mysql_enum_shutdown_level shutdown_level) +{ + return mysql_shutdown(mysql, shutdown_level); +} +SYM_16(mysql_shutdown); + + +const char *STDCALL symver16_mysql_sqlstate(MYSQL *mysql) +{ + return mysql_sqlstate(mysql); +} +SYM_16(mysql_sqlstate); + + +const char * STDCALL symver16_mysql_stat(MYSQL *mysql) +{ + return mysql_stat(mysql); +} +SYM_16(mysql_stat); + + +my_ulonglong STDCALL symver16_mysql_stmt_affected_rows(MYSQL_STMT *stmt) +{ + return mysql_stmt_affected_rows(stmt); +} +SYM_16(mysql_stmt_affected_rows); + + +my_bool STDCALL symver16_mysql_stmt_attr_get(MYSQL_STMT *stmt, enum enum_stmt_attr_type attr_type, void *value) +{ + return mysql_stmt_attr_get(stmt, attr_type, value); +} +SYM_16(mysql_stmt_attr_get); + + +my_bool STDCALL symver16_mysql_stmt_attr_set(MYSQL_STMT *stmt, enum enum_stmt_attr_type attr_type, const void *value) +{ + return mysql_stmt_attr_set(stmt, attr_type, value); +} +SYM_16(mysql_stmt_attr_set); + + +my_bool STDCALL symver16_mysql_stmt_bind_param(MYSQL_STMT *stmt, MYSQL_BIND *my_bind) +{ + return mysql_stmt_bind_param(stmt, my_bind); +} +SYM_16(mysql_stmt_bind_param); + + +my_bool STDCALL symver16_mysql_stmt_bind_result(MYSQL_STMT *stmt, MYSQL_BIND *my_bind) +{ + return mysql_stmt_bind_result(stmt, my_bind); +} +SYM_16(mysql_stmt_bind_result); + + +my_bool STDCALL symver16_mysql_stmt_close(MYSQL_STMT *stmt) +{ + return mysql_stmt_close(stmt); +} +SYM_16(mysql_stmt_close); + + +void STDCALL symver16_mysql_stmt_data_seek(MYSQL_STMT *stmt, my_ulonglong row) +{ + return mysql_stmt_data_seek(stmt, row); +} +SYM_16(mysql_stmt_data_seek); + + +uint STDCALL symver16_mysql_stmt_errno(MYSQL_STMT * stmt) +{ + return mysql_stmt_errno(stmt); +} +SYM_16(mysql_stmt_errno); + + +const char *STDCALL symver16_mysql_stmt_error(MYSQL_STMT * stmt) +{ + return mysql_stmt_error(stmt); +} +SYM_16(mysql_stmt_error); + + +int STDCALL symver16_mysql_stmt_execute(MYSQL_STMT *stmt) +{ + return mysql_stmt_execute(stmt); +} +SYM_16(mysql_stmt_execute); + + +int STDCALL symver16_mysql_stmt_fetch(MYSQL_STMT *stmt) +{ + return mysql_stmt_fetch(stmt); +} +SYM_16(mysql_stmt_fetch); + + +int STDCALL symver16_mysql_stmt_fetch_column(MYSQL_STMT *stmt, MYSQL_BIND *my_bind, uint column, ulong offset) +{ + return mysql_stmt_fetch_column(stmt, my_bind, column, offset); +} +SYM_16(mysql_stmt_fetch_column); + + +unsigned int STDCALL symver16_mysql_stmt_field_count(MYSQL_STMT *stmt) +{ + return mysql_stmt_field_count(stmt); +} +SYM_16(mysql_stmt_field_count); + + +my_bool STDCALL symver16_mysql_stmt_free_result(MYSQL_STMT *stmt) +{ + return mysql_stmt_free_result(stmt); +} +SYM_16(mysql_stmt_free_result); + + +MYSQL_STMT * STDCALL symver16_mysql_stmt_init(MYSQL *mysql) +{ + return mysql_stmt_init(mysql); +} +SYM_16(mysql_stmt_init); + + +my_ulonglong STDCALL symver16_mysql_stmt_insert_id(MYSQL_STMT *stmt) +{ + return mysql_stmt_insert_id(stmt); +} +SYM_16(mysql_stmt_insert_id); + + +my_ulonglong STDCALL symver16_mysql_stmt_num_rows(MYSQL_STMT *stmt) +{ + return mysql_stmt_num_rows(stmt); +} +SYM_16(mysql_stmt_num_rows); + + +ulong STDCALL symver16_mysql_stmt_param_count(MYSQL_STMT * stmt) +{ + return mysql_stmt_param_count(stmt); +} +SYM_16(mysql_stmt_param_count); + + +MYSQL_RES * STDCALL symver16_mysql_stmt_param_metadata(MYSQL_STMT *stmt) +{ + return mysql_stmt_param_metadata(stmt); +} +SYM_16(mysql_stmt_param_metadata); + + +int STDCALL symver16_mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query, ulong length) +{ + return mysql_stmt_prepare(stmt, query, length); +} +SYM_16(mysql_stmt_prepare); + + +my_bool STDCALL symver16_mysql_stmt_reset(MYSQL_STMT *stmt) +{ + return mysql_stmt_reset(stmt); +} +SYM_16(mysql_stmt_reset); + + +MYSQL_RES * STDCALL symver16_mysql_stmt_result_metadata(MYSQL_STMT *stmt) +{ + return mysql_stmt_result_metadata(stmt); +} +SYM_16(mysql_stmt_result_metadata); + + +MYSQL_ROW_OFFSET STDCALL symver16_mysql_stmt_row_seek(MYSQL_STMT *stmt, MYSQL_ROW_OFFSET row) +{ + return mysql_stmt_row_seek(stmt, row); +} +SYM_16(mysql_stmt_row_seek); + + +MYSQL_ROW_OFFSET STDCALL symver16_mysql_stmt_row_tell(MYSQL_STMT *stmt) +{ + return mysql_stmt_row_tell(stmt); +} +SYM_16(mysql_stmt_row_tell); + + +my_bool STDCALL symver16_mysql_stmt_send_long_data(MYSQL_STMT *stmt, uint param_number, const char *data, ulong length) +{ + return mysql_stmt_send_long_data(stmt, param_number, data, length); +} +SYM_16(mysql_stmt_send_long_data); + + +const char *STDCALL symver16_mysql_stmt_sqlstate(MYSQL_STMT * stmt) +{ + return mysql_stmt_sqlstate(stmt); +} +SYM_16(mysql_stmt_sqlstate); + + +int STDCALL symver16_mysql_stmt_store_result(MYSQL_STMT *stmt) +{ + return mysql_stmt_store_result(stmt); +} +SYM_16(mysql_stmt_store_result); + + +void STDCALL symver16_mysql_thread_end() +{ + return mysql_thread_end(); +} +SYM_16(mysql_thread_end); + + +ulong STDCALL symver16_mysql_thread_id(MYSQL *mysql) +{ + return mysql_thread_id(mysql); +} +SYM_16(mysql_thread_id); + + +my_bool STDCALL symver16_mysql_thread_init() +{ + return mysql_thread_init(); +} +SYM_16(mysql_thread_init); + + +uint STDCALL symver16_mysql_thread_safe(void) +{ + return mysql_thread_safe(); +} +SYM_16(mysql_thread_safe); + + +MYSQL_RES * STDCALL symver16_mysql_use_result(MYSQL *mysql) +{ + return mysql_use_result(mysql); +} +SYM_16(mysql_use_result); + + +uint STDCALL symver16_mysql_warning_count(MYSQL *mysql) +{ + return mysql_warning_count(mysql); +} +SYM_16(mysql_warning_count); + +/*****/ + +MYSQL * STDCALL symver16_mysql_real_connect(MYSQL *mysql,const char *host, const char *user, const char *passwd, const char *db, uint port, const char *unix_socket,ulong client_flag) +{ + return mysql_real_connect(mysql, host, user, passwd, db, port, unix_socket, client_flag); +} +SYM_16(mysql_real_connect); + +/*****/ + +my_bool symver16_my_init(void) +{ + return my_init(); +} +SYM_16(my_init); + + +#endif +#endif /* EXPORT_SYMVER16 */ diff --git a/mysql-wsrep-5.6/libmysql/libmysql.ver.in b/mysql-wsrep-5.6/libmysql/libmysql.ver.in index 20eb0fd4..98dbfe2d 100644 --- a/mysql-wsrep-5.6/libmysql/libmysql.ver.in +++ b/mysql-wsrep-5.6/libmysql/libmysql.ver.in @@ -1 +1,16 @@ +/* Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ + libmysqlclient_@SHARED_LIB_MAJOR_VERSION@ { global: *; }; diff --git a/mysql-wsrep-5.6/libmysql/libmysql.ver16.in b/mysql-wsrep-5.6/libmysql/libmysql.ver16.in new file mode 100644 index 00000000..7b0cab44 --- /dev/null +++ b/mysql-wsrep-5.6/libmysql/libmysql.ver16.in @@ -0,0 +1,151 @@ +/* Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ + +libmysqlclient_16 +{ + local: + symver16_*; +}; + +libmysqlclient_18 +{ + global: + my_init; + myodbc_remove_escape; + mysql_affected_rows; + mysql_autocommit; + mysql_change_user; + mysql_character_set_name; + mysql_close; + mysql_commit; + mysql_data_seek; + mysql_debug; + mysql_dump_debug_info; + mysql_embedded; + mysql_eof; + mysql_errno; + mysql_error; + mysql_escape_string; + mysql_fetch_field; + mysql_fetch_field_direct; + mysql_fetch_fields; + mysql_fetch_lengths; + mysql_fetch_row; + mysql_field_count; + mysql_field_seek; + mysql_field_tell; + mysql_free_result; + mysql_get_character_set_info; + mysql_get_client_info; + mysql_get_client_version; + mysql_get_host_info; + mysql_get_parameters; + mysql_get_proto_info; + mysql_get_server_info; + mysql_get_server_version; + mysql_get_ssl_cipher; + mysql_hex_string; + mysql_info; + mysql_init; + mysql_insert_id; + mysql_kill; + mysql_list_dbs; + mysql_list_fields; + mysql_list_processes; + mysql_list_tables; + mysql_more_results; + mysql_next_result; + mysql_num_fields; + mysql_num_rows; + mysql_options; + mysql_ping; + mysql_query; + mysql_read_query_result; + mysql_real_connect; + mysql_real_escape_string; + mysql_real_query; + mysql_refresh; + mysql_rollback; + mysql_row_seek; + mysql_row_tell; + mysql_select_db; + mysql_send_query; + mysql_server_end; + mysql_server_init; + mysql_set_character_set; + mysql_set_local_infile_default; + mysql_set_local_infile_handler; + mysql_set_server_option; + mysql_shutdown; + mysql_sqlstate; + mysql_ssl_set; + mysql_stat; + mysql_stmt_affected_rows; + mysql_stmt_attr_get; + mysql_stmt_attr_set; + mysql_stmt_bind_param; + mysql_stmt_bind_result; + mysql_stmt_close; + mysql_stmt_data_seek; + mysql_stmt_errno; + mysql_stmt_error; + mysql_stmt_execute; + mysql_stmt_fetch; + mysql_stmt_fetch_column; + mysql_stmt_field_count; + mysql_stmt_free_result; + mysql_stmt_init; + mysql_stmt_insert_id; + mysql_stmt_num_rows; + mysql_stmt_param_count; + mysql_stmt_param_metadata; + mysql_stmt_prepare; + mysql_stmt_reset; + mysql_stmt_result_metadata; + mysql_stmt_row_seek; + mysql_stmt_row_tell; + mysql_stmt_send_long_data; + mysql_stmt_sqlstate; + mysql_stmt_store_result; + mysql_store_result; + mysql_thread_end; + mysql_thread_id; + mysql_thread_init; + mysql_thread_safe; + mysql_use_result; + mysql_warning_count; + + free_defaults; + handle_options; + load_defaults; + my_print_help; + + #my_make_scrambled_password; + THR_KEY_mysys; + + mysql_client_find_plugin; + mysql_client_register_plugin; + mysql_load_plugin; + mysql_load_plugin_v; + mysql_plugin_options; + mysql_stmt_next_result; + + #mysql_default_charset_info; + mysql_get_charset; + mysql_get_charset_by_csname; + mysql_net_realloc; + #mysql_client_errors; + *; +} libmysqlclient_16; diff --git a/mysql-wsrep-5.6/libmysqld/lib_sql.cc b/mysql-wsrep-5.6/libmysqld/lib_sql.cc index 4cdb5ec9..f1794d9c 100644 --- a/mysql-wsrep-5.6/libmysqld/lib_sql.cc +++ b/mysql-wsrep-5.6/libmysqld/lib_sql.cc @@ -2,7 +2,7 @@ * Copyright (c) 2000 * SWsoft company * - * Modifications copyright (c) 2001, 2015. Oracle and/or its affiliates. + * Modifications copyright (c) 2001, 2016. Oracle and/or its affiliates. * All rights reserved. * * This material is provided "as is", with absolutely no warranty expressed @@ -213,8 +213,8 @@ static void emb_flush_use_result(MYSQL *mysql, my_bool) */ static MYSQL_DATA * -emb_read_rows(MYSQL *mysql, MYSQL_FIELD *mysql_fields __attribute__((unused)), - unsigned int fields __attribute__((unused))) +emb_read_rows(MYSQL *mysql, MYSQL_FIELD *mysql_fields MY_ATTRIBUTE((unused)), + unsigned int fields MY_ATTRIBUTE((unused))) { MYSQL_DATA *result= ((THD*)mysql->thd)->cur_data; ((THD*)mysql->thd)->cur_data= 0; @@ -1426,7 +1426,7 @@ bool Protocol::net_store_data(const uchar *from, size_t length) #define vsnprintf _vsnprintf #endif -int vprint_msg_to_log(enum loglevel level __attribute__((unused)), +int vprint_msg_to_log(enum loglevel level MY_ATTRIBUTE((unused)), const char *format, va_list argsi) { my_vsnprintf(mysql_server_last_error, sizeof(mysql_server_last_error), diff --git a/mysql-wsrep-5.6/man/comp_err.1 b/mysql-wsrep-5.6/man/comp_err.1 index be76ce5b..35f2caee 100644 --- a/mysql-wsrep-5.6/man/comp_err.1 +++ b/mysql-wsrep-5.6/man/comp_err.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBcomp_err\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/02/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBCOMP_ERR\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBCOMP_ERR\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" comp_err .SH "NAME" comp_err \- compile MySQL error message file .SH "SYNOPSIS" @@ -45,7 +44,7 @@ to determine the error messages to display for different error codes\&. normally is run automatically when MySQL is built\&. It compiles the errmsg\&.sys file from the text file located at -sql/share/errmsg\&.txt +sql/share/errmsg\-utf8\&.txt in MySQL source distributions\&. .PP \fBcomp_err\fR @@ -83,8 +82,6 @@ supports the following options\&. .sp -1 .IP \(bu 2.3 .\} -.\" comp_err: help option -.\" help option: comp_err \fB\-\-help\fR, \fB\-?\fR .sp @@ -99,8 +96,6 @@ Display a help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" comp_err: charset option -.\" charset option: comp_err \fB\-\-charset=\fR\fB\fIdir_name\fR\fR, \fB\-C \fR\fB\fIdir_name\fR\fR .sp @@ -116,8 +111,6 @@ The character set directory\&. The default is .sp -1 .IP \(bu 2.3 .\} -.\" comp_err: debug option -.\" debug option: comp_err \fB\-\-debug=\fR\fB\fIdebug_options\fR\fR, \fB\-# \fR\fB\fIdebug_options\fR\fR .sp @@ -136,8 +129,6 @@ d:t:O,/tmp/comp_err\&.trace\&. .sp -1 .IP \(bu 2.3 .\} -.\" comp_err: debug-info option -.\" debug-info option: comp_err \fB\-\-debug\-info\fR, \fB\-T\fR .sp @@ -152,8 +143,6 @@ Print some debugging information when the program exits\&. .sp -1 .IP \(bu 2.3 .\} -.\" comp_err: header_file option -.\" header_file option: comp_err \fB\-\-header_file=\fR\fB\fIfile_name\fR\fR, \fB\-H \fR\fB\fIfile_name\fR\fR .sp @@ -169,13 +158,11 @@ mysqld_error\&.h\&. .sp -1 .IP \(bu 2.3 .\} -.\" comp_err: in_file option -.\" in_file option: comp_err \fB\-\-in_file=\fR\fB\fIfile_name\fR\fR, \fB\-F \fR\fB\fIfile_name\fR\fR .sp The name of the input file\&. The default is -\&.\&./sql/share/errmsg\&.txt\&. +\&.\&./sql/share/errmsg\-utf8\&.txt\&. .RE .sp .RS 4 @@ -186,8 +173,6 @@ The name of the input file\&. The default is .sp -1 .IP \(bu 2.3 .\} -.\" comp_err: name_file option -.\" name_file option: comp_err \fB\-\-name_file=\fR\fB\fIfile_name\fR\fR, \fB\-N \fR\fB\fIfile_name\fR\fR .sp @@ -203,8 +188,6 @@ mysqld_ername\&.h\&. .sp -1 .IP \(bu 2.3 .\} -.\" comp_err: out_dir option -.\" out_dir option: comp_err \fB\-\-out_dir=\fR\fB\fIdir_name\fR\fR, \fB\-D \fR\fB\fIdir_name\fR\fR .sp @@ -220,8 +203,6 @@ The name of the output base directory\&. The default is .sp -1 .IP \(bu 2.3 .\} -.\" comp_err: out_file option -.\" out_file option: comp_err \fB\-\-out_file=\fR\fB\fIfile_name\fR\fR, \fB\-O \fR\fB\fIfile_name\fR\fR .sp @@ -237,8 +218,6 @@ errmsg\&.sys\&. .sp -1 .IP \(bu 2.3 .\} -.\" comp_err: statefile option -.\" statefile option: comp_err \fB\-\-statefile=\fR\fB\fIfile_name\fR\fR, \fB\-S \fR\fB\fIfile_name\fR\fR .sp @@ -254,8 +233,6 @@ sql_state\&.h\&. .sp -1 .IP \(bu 2.3 .\} -.\" comp_err: version option -.\" version option: comp_err \fB\-\-version\fR, \fB\-V\fR .sp diff --git a/mysql-wsrep-5.6/man/innochecksum.1 b/mysql-wsrep-5.6/man/innochecksum.1 index 91804062..26dee3e6 100644 --- a/mysql-wsrep-5.6/man/innochecksum.1 +++ b/mysql-wsrep-5.6/man/innochecksum.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBinnochecksum\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/02/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBINNOCHECKSUM\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBINNOCHECKSUM\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" innochecksum .SH "NAME" innochecksum \- offline InnoDB file checksum utility .SH "SYNOPSIS" diff --git a/mysql-wsrep-5.6/man/msql2mysql.1 b/mysql-wsrep-5.6/man/msql2mysql.1 index 8fcf9554..d2c1c5be 100644 --- a/mysql-wsrep-5.6/man/msql2mysql.1 +++ b/mysql-wsrep-5.6/man/msql2mysql.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmsql2mysql\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/02/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMSQL2MYSQL\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMSQL2MYSQL\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" msql2mysql .SH "NAME" msql2mysql \- convert mSQL programs for use with MySQL .SH "SYNOPSIS" diff --git a/mysql-wsrep-5.6/man/my_print_defaults.1 b/mysql-wsrep-5.6/man/my_print_defaults.1 index f1ab6e5a..b083cbba 100644 --- a/mysql-wsrep-5.6/man/my_print_defaults.1 +++ b/mysql-wsrep-5.6/man/my_print_defaults.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmy_print_defaults\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/02/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMY_PRINT_DEFAULTS" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMY_PRINT_DEFAULTS" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" my_print_defaults .SH "NAME" my_print_defaults \- display options from option files .SH "SYNOPSIS" @@ -72,8 +71,6 @@ supports the following options\&. .sp -1 .IP \(bu 2.3 .\} -.\" my_print_defaults: help option -.\" help option: my_print_defaults \fB\-\-help\fR, \fB\-?\fR .sp @@ -88,11 +85,7 @@ Display a help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" my_print_defaults: config-file option -.\" config-file option: my_print_defaults \fB\-\-config\-file=\fR\fB\fIfile_name\fR\fR, -.\" my_print_defaults: defaults-file option -.\" defaults-file option: my_print_defaults \fB\-\-defaults\-file=\fR\fB\fIfile_name\fR\fR, \fB\-c \fR\fB\fIfile_name\fR\fR .sp @@ -107,8 +100,6 @@ Read only the given option file\&. .sp -1 .IP \(bu 2.3 .\} -.\" my_print_defaults: debug option -.\" debug option: my_print_defaults \fB\-\-debug=\fR\fB\fIdebug_options\fR\fR, \fB\-# \fR\fB\fIdebug_options\fR\fR .sp @@ -127,11 +118,7 @@ d:t:o,/tmp/my_print_defaults\&.trace\&. .sp -1 .IP \(bu 2.3 .\} -.\" my_print_defaults: defaults-extra-file option -.\" defaults-extra-file option: my_print_defaults \fB\-\-defaults\-extra\-file=\fR\fB\fIfile_name\fR\fR, -.\" my_print_defaults: extra-file option -.\" extra-file option: my_print_defaults \fB\-\-extra\-file=\fR\fB\fIfile_name\fR\fR, \fB\-e \fR\fB\fIfile_name\fR\fR .sp @@ -146,8 +133,6 @@ Read this option file after the global option file but (on Unix) before the user .sp -1 .IP \(bu 2.3 .\} -.\" my_print_defaults: defaults-group-suffix option -.\" defaults-group-suffix option: my_print_defaults \fB\-\-defaults\-group\-suffix=\fR\fB\fIsuffix\fR\fR, \fB\-g \fR\fB\fIsuffix\fR\fR .sp @@ -162,7 +147,6 @@ In addition to the groups named on the command line, read groups that have the g .sp -1 .IP \(bu 2.3 .\} -.\" login-path option \fB\-\-login\-path=\fR\fB\fIname\fR\fR, \fB\-l \fR\fB\fIname\fR\fR .sp @@ -184,8 +168,6 @@ utility\&. See .sp -1 .IP \(bu 2.3 .\} -.\" my_print_defaults: no-defaults option -.\" no-defaults option: my_print_defaults \fB\-\-no\-defaults\fR, \fB\-n\fR .sp @@ -200,8 +182,6 @@ Return an empty string\&. .sp -1 .IP \(bu 2.3 .\} -.\" my_print_defaults: show option -.\" show option: my_print_defaults \fB\-\-show\fR, \fB\-s\fR .sp @@ -218,8 +198,6 @@ masks passwords by default\&. Use this option to display passwords in cleartext\ .sp -1 .IP \(bu 2.3 .\} -.\" my_print_defaults: verbose option -.\" verbose option: my_print_defaults \fB\-\-verbose\fR, \fB\-v\fR .sp @@ -234,8 +212,6 @@ Verbose mode\&. Print more information about what the program does\&. .sp -1 .IP \(bu 2.3 .\} -.\" my_print_defaults: version option -.\" version option: my_print_defaults \fB\-\-version\fR, \fB\-V\fR .sp diff --git a/mysql-wsrep-5.6/man/myisam_ftdump.1 b/mysql-wsrep-5.6/man/myisam_ftdump.1 index 5bfada68..5c129d58 100644 --- a/mysql-wsrep-5.6/man/myisam_ftdump.1 +++ b/mysql-wsrep-5.6/man/myisam_ftdump.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmyisam_ftdump\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/02/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYISAM_FTDUMP\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYISAM_FTDUMP\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" myisam_ftdump .SH "NAME" myisam_ftdump \- display full\-text index information .SH "SYNOPSIS" @@ -160,8 +159,6 @@ supports the following options: .sp -1 .IP \(bu 2.3 .\} -.\" myisam_ftdump: help option -.\" help option: myisam_ftdump \fB\-\-help\fR, \fB\-h\fR \fB\-?\fR @@ -177,8 +174,6 @@ Display a help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisam_ftdump: count option -.\" count option: myisam_ftdump \fB\-\-count\fR, \fB\-c\fR .sp @@ -193,8 +188,6 @@ Calculate per\-word statistics (counts and global weights)\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisam_ftdump: dump option -.\" dump option: myisam_ftdump \fB\-\-dump\fR, \fB\-d\fR .sp @@ -209,8 +202,6 @@ Dump the index, including data offsets and word weights\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisam_ftdump: length option -.\" length option: myisam_ftdump \fB\-\-length\fR, \fB\-l\fR .sp @@ -225,8 +216,6 @@ Report the length distribution\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisam_ftdump: stats option -.\" stats option: myisam_ftdump \fB\-\-stats\fR, \fB\-s\fR .sp @@ -241,8 +230,6 @@ Report global index statistics\&. This is the default operation if no other oper .sp -1 .IP \(bu 2.3 .\} -.\" myisam_ftdump: verbose option -.\" verbose option: myisam_ftdump \fB\-\-verbose\fR, \fB\-v\fR .sp diff --git a/mysql-wsrep-5.6/man/myisamchk.1 b/mysql-wsrep-5.6/man/myisamchk.1 index b7fa9bd6..5ed1b291 100644 --- a/mysql-wsrep-5.6/man/myisamchk.1 +++ b/mysql-wsrep-5.6/man/myisamchk.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmyisamchk\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/02/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYISAMCHK\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYISAMCHK\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" myisamchk .SH "NAME" myisamchk \- MyISAM table\-maintenance utility .SH "SYNOPSIS" @@ -252,8 +251,6 @@ supports the following options, which can be specified on the command line or in group of an option file\&. For information about option files used by MySQL programs, see Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. .SH "MYISAMCHK GENERAL OPTIONS" -.\" options: myisamchk -.\" myisamchk: options .PP The options described in this section can be used for any type of table maintenance operation performed by \fBmyisamchk\fR\&. The sections following this one describe options that pertain only to specific operations, such as table checking or repairing\&. @@ -266,8 +263,6 @@ The options described in this section can be used for any type of table maintena .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: help option -.\" help option: myisamchk \fB\-\-help\fR, \fB\-?\fR .sp @@ -282,8 +277,6 @@ Display a help message and exit\&. Options are grouped by type of operation\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: HELP option -.\" HELP option: myisamchk \fB\-\-HELP\fR, \fB\-H\fR .sp @@ -298,8 +291,6 @@ Display a help message and exit\&. Options are presented in a single list\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: debug option -.\" debug option: myisamchk \fB\-\-debug=\fR\fB\fIdebug_options\fR\fR, \fB\-# \fR\fB\fIdebug_options\fR\fR .sp @@ -318,8 +309,6 @@ d:t:o,/tmp/myisamchk\&.trace\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: defaults-extra-file option -.\" defaults-extra-file option: myisamchk \fB\-\-defaults\-extra\-file=\fR\fB\fIfile_name\fR\fR .sp Read this option file after the global option file but (on Unix) before the user option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. @@ -335,8 +324,6 @@ is interpreted relative to the current directory if given as a relative path nam .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: defaults-file option -.\" defaults-file option: myisamchk \fB\-\-defaults\-file=\fR\fB\fIfile_name\fR\fR .sp Use only the given option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. @@ -352,8 +339,6 @@ is interpreted relative to the current directory if given as a relative path nam .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: defaults-group-suffix option -.\" defaults-group-suffix option: myisamchk \fB\-\-defaults\-group\-suffix=\fR\fB\fIstr\fR\fR .sp Read not only the usual option groups, but also groups with the usual names and a suffix of @@ -378,8 +363,6 @@ group\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: no-defaults option -.\" no-defaults option: myisamchk \fB\-\-no\-defaults\fR .sp Do not read any option files\&. If program startup fails due to reading unknown options from an option file, @@ -405,8 +388,6 @@ utility\&. See .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: print-defaults option -.\" print-defaults option: myisamchk \fB\-\-print\-defaults\fR .sp Print the program name and all options that it gets from option files\&. @@ -420,8 +401,6 @@ Print the program name and all options that it gets from option files\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: silent option -.\" silent option: myisamchk \fB\-\-silent\fR, \fB\-s\fR .sp @@ -440,8 +419,6 @@ very silent\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: verbose option -.\" verbose option: myisamchk \fB\-\-verbose\fR, \fB\-v\fR .sp @@ -462,8 +439,6 @@ multiple times (\fB\-vv\fR, .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: version option -.\" version option: myisamchk \fB\-\-version\fR, \fB\-V\fR .sp @@ -478,8 +453,6 @@ Display version information and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: wait option -.\" wait option: myisamchk \fB\-\-wait\fR, \fB\-w\fR .sp @@ -493,18 +466,6 @@ command\&. You can also set the following variables by using \fB\-\-\fR\fB\fIvar_name\fR\fR\fB=\fR\fB\fIvalue\fR\fR syntax: -.\" decode_bits myisamchk variable -.\" ft_max_word_len myisamchk variable -.\" ft_min_word_len myisamchk variable -.\" ft_stopword_file myisamchk variable -.\" key_buffer_size myisamchk variable -.\" myisam_block_size myisamchk variable -.\" read_buffer_size myisamchk variable -.\" sort_buffer_size myisamchk variable -.\" myisam_sort_buffer_size myisamchk variable -.\" sort_key_blocks myisamchk variable -.\" stats_method myisamchk variable -.\" write_buffer_size myisamchk variable .TS allbox tab(:); lB lB. @@ -738,8 +699,6 @@ ANALYZE TABLE, OPTIMIZE TABLE, or ALTER TABLE\&. These statements are performed by the server, which knows the proper full\-text parameter values to use\&. .SH "MYISAMCHK CHECK OPTIONS" -.\" check options: myisamchk -.\" tables: checking .PP \fBmyisamchk\fR supports the following options for table checking operations: @@ -752,8 +711,6 @@ supports the following options for table checking operations: .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: check option -.\" check option: myisamchk \fB\-\-check\fR, \fB\-c\fR .sp @@ -768,8 +725,6 @@ Check the table for errors\&. This is the default operation if you specify no op .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: check-only-changed option -.\" check-only-changed option: myisamchk \fB\-\-check\-only\-changed\fR, \fB\-C\fR .sp @@ -784,8 +739,6 @@ Check only tables that have changed since the last check\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: extend-check option -.\" extend-check option: myisamchk \fB\-\-extend\-check\fR, \fB\-e\fR .sp @@ -815,8 +768,6 @@ the section called \(lqOBTAINING TABLE INFORMATION WITH MYISAMCHK\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: fast option -.\" fast option: myisamchk \fB\-\-fast\fR, \fB\-F\fR .sp @@ -831,8 +782,6 @@ Check only tables that haven\*(Aqt been closed properly\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: force option -.\" force option: myisamchk \fB\-\-force\fR, \fB\-f\fR .sp @@ -853,8 +802,6 @@ option\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: information option -.\" information option: myisamchk \fB\-\-information\fR, \fB\-i\fR .sp @@ -869,8 +816,6 @@ Print informational statistics about the table that is checked\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: medium-check option -.\" medium-check option: myisamchk \fB\-\-medium\-check\fR, \fB\-m\fR .sp @@ -887,8 +832,6 @@ operation\&. This finds only 99\&.99% of all errors, which should be good enough .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: read-only option -.\" read-only option: myisamchk \fB\-\-read\-only\fR, \fB\-T\fR .sp @@ -907,8 +850,6 @@ when run with external locking disabled\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: update-state option -.\" update-state option: myisamchk \fB\-\-update\-state\fR, \fB\-U\fR .sp @@ -921,8 +862,6 @@ option, but you shouldn\*(Aqt use this option if the server is using the table and you are running it with external locking disabled\&. .RE .SH "MYISAMCHK REPAIR OPTIONS" -.\" repair options: myisamchk -.\" files: repairing .PP \fBmyisamchk\fR supports the following options for table repair operations (operations performed when an option such as @@ -939,8 +878,6 @@ is given): .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: backup option -.\" backup option: myisamchk \fB\-\-backup\fR, \fB\-B\fR .sp @@ -958,8 +895,6 @@ file as .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: character-sets-dir option -.\" character-sets-dir option: myisamchk \fB\-\-character\-sets\-dir=\fR\fB\fIdir_name\fR\fR .sp The directory where character sets are installed\&. See @@ -974,8 +909,6 @@ Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: correct-checksum option -.\" correct-checksum option: myisamchk \fB\-\-correct\-checksum\fR .sp Correct the checksum information for the table\&. @@ -989,8 +922,6 @@ Correct the checksum information for the table\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: data-file-length option -.\" data-file-length option: myisamchk \fB\-\-data\-file\-length=\fR\fB\fIlen\fR\fR, \fB\-D \fR\fB\fIlen\fR\fR .sp @@ -1006,8 +937,6 @@ The maximum length of the data file (when re\-creating data file when it is .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: extend-check option -.\" extend-check option: myisamchk \fB\-\-extend\-check\fR, \fB\-e\fR .sp @@ -1027,8 +956,6 @@ the section called \(lqOBTAINING TABLE INFORMATION WITH MYISAMCHK\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: force option -.\" force option: myisamchk \fB\-\-force\fR, \fB\-f\fR .sp @@ -1044,8 +971,6 @@ Overwrite old intermediate files (files with names like .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: keys-used option -.\" keys-used option: myisamchk \fB\-\-keys\-used=\fR\fB\fIval\fR\fR, \fB\-k \fR\fB\fIval\fR\fR .sp @@ -1062,8 +987,6 @@ For .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: no-symlinks option -.\" no-symlinks option: myisamchk \fB\-\-no\-symlinks\fR, \fB\-l\fR .sp @@ -1080,8 +1003,6 @@ repairs the table that a symlink points to\&. This option does not exist as of M .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: max-record-length option -.\" max-record-length option: myisamchk \fB\-\-max\-record\-length=\fR\fB\fIlen\fR\fR .sp Skip rows larger than the given length if @@ -1097,8 +1018,6 @@ cannot allocate memory to hold them\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: parallel-recover option -.\" parallel-recover option: myisamchk \fB\-\-parallel\-recover\fR, \fB\-p\fR .sp @@ -1117,8 +1036,6 @@ and .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: quick option -.\" quick option: myisamchk \fB\-\-quick\fR, \fB\-q\fR .sp @@ -1135,8 +1052,6 @@ to modify the original data file in case of duplicate keys\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: recover option -.\" recover option: myisamchk \fB\-\-recover\fR, \fB\-r\fR .sp @@ -1163,8 +1078,6 @@ myisam_sort_buffer_size\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: safe-recover option -.\" safe-recover option: myisamchk \fB\-\-safe\-recover\fR, \fB\-o\fR .sp @@ -1191,8 +1104,6 @@ key_buffer_size\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: set-collation option -.\" set-collation option: myisamchk \fB\-\-set\-collation=\fR\fB\fIname\fR\fR .sp Specify the collation to use for sorting table indexes\&. The character set name is implied by the first part of the collation name\&. @@ -1206,8 +1117,6 @@ Specify the collation to use for sorting table indexes\&. The character set name .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: sort-recover option -.\" sort-recover option: myisamchk \fB\-\-sort\-recover\fR, \fB\-n\fR .sp @@ -1224,8 +1133,6 @@ to use sorting to resolve the keys even if the temporary files would be very lar .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: tmpdir option -.\" tmpdir option: myisamchk \fB\-\-tmpdir=\fR\fB\fIdir_name\fR\fR, \fB\-t \fR\fB\fIdir_name\fR\fR .sp @@ -1246,8 +1153,6 @@ can be set to a list of directory paths that are used successively in round\-rob .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: unpack option -.\" unpack option: myisamchk \fB\-\-unpack\fR, \fB\-u\fR .sp @@ -1267,8 +1172,6 @@ supports the following options for actions other than table checks and repairs: .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: analyze option -.\" analyze option: myisamchk \fB\-\-analyze\fR, \fB\-a\fR .sp @@ -1287,8 +1190,6 @@ statement\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: block-search option -.\" block-search option: myisamchk \fB\-\-block\-search=\fR\fB\fIoffset\fR\fR, \fB\-b \fR\fB\fIoffset\fR\fR .sp @@ -1303,8 +1204,6 @@ Find the record that a block at the given offset belongs to\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: description option -.\" description option: myisamchk \fB\-\-description\fR, \fB\-d\fR .sp @@ -1322,8 +1221,6 @@ the section called \(lqOBTAINING TABLE INFORMATION WITH MYISAMCHK\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: set-auto-increment[ option -.\" set-auto-increment[ option: myisamchk \fB\-\-set\-auto\-increment[=\fR\fB\fIvalue\fR\fR\fB]\fR, \fB\-A[\fR\fB\fIvalue\fR\fR\fB]\fR .sp @@ -1346,8 +1243,6 @@ numbers for new records begin with the largest value currently in the table, plu .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: sort-index option -.\" sort-index option: myisamchk \fB\-\-sort\-index\fR, \fB\-S\fR .sp @@ -1362,8 +1257,6 @@ Sort the index tree blocks in high\-low order\&. This optimizes seeks and makes .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: sort-records option -.\" sort-records option: myisamchk \fB\-\-sort\-records=\fR\fB\fIN\fR\fR, \fB\-R \fR\fB\fIN\fR\fR .sp @@ -1383,10 +1276,6 @@ sorts and moves records, it just overwrites record offsets in the index\&. If ke must unpack key blocks first, then re\-create indexes and pack the key blocks again\&. (In this case, re\-creating indexes is faster than updating offsets for each index\&.) .RE .SH "OBTAINING TABLE INFORMATION WITH MYISAMCHK" -.\" table description: myisamchk -.\" tables: information -.\" examples: myisamchk output -.\" myisamchk: example output .PP To obtain a description of a MyISAM @@ -2449,7 +2338,6 @@ Linkdata is the sum of the amount of storage used by all such pointers\&. .RE .SH "MYISAMCHK MEMORY USAGE" -.\" memory usage: myisamchk .PP Memory allocation is important when you run \fBmyisamchk\fR\&. diff --git a/mysql-wsrep-5.6/man/myisamlog.1 b/mysql-wsrep-5.6/man/myisamlog.1 index d8d223ed..dbc7b278 100644 --- a/mysql-wsrep-5.6/man/myisamlog.1 +++ b/mysql-wsrep-5.6/man/myisamlog.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmyisamlog\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/02/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYISAMLOG\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYISAMLOG\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" myisamlog .SH "NAME" myisamlog \- display MyISAM log file contents .SH "SYNOPSIS" diff --git a/mysql-wsrep-5.6/man/myisampack.1 b/mysql-wsrep-5.6/man/myisampack.1 index 294e20ee..6a86a127 100644 --- a/mysql-wsrep-5.6/man/myisampack.1 +++ b/mysql-wsrep-5.6/man/myisampack.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmyisampack\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/02/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYISAMPACK\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYISAMPACK\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,10 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" myisampack -.\" compressed tables -.\" tables: compressed -.\" MyISAM: compressed tables .SH "NAME" myisampack \- generate compressed, read\-only MyISAM tables .SH "SYNOPSIS" @@ -132,8 +128,6 @@ Section\ \&4.2.7, \(lqCommand-Line Options that Affect Option-File Handling\(rq\ .sp -1 .IP \(bu 2.3 .\} -.\" myisampack: help option -.\" help option: myisampack \fB\-\-help\fR, \fB\-?\fR .sp @@ -148,8 +142,6 @@ Display a help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisampack: backup option -.\" backup option: myisampack \fB\-\-backup\fR, \fB\-b\fR .sp @@ -165,8 +157,6 @@ Make a backup of each table\*(Aqs data file using the name .sp -1 .IP \(bu 2.3 .\} -.\" myisampack: character-sets-dir option -.\" character-sets-dir option: myisampack \fB\-\-character\-sets\-dir=\fR\fB\fIdir_name\fR\fR .sp The directory where character sets are installed\&. See @@ -181,8 +171,6 @@ Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisampack: debug option -.\" debug option: myisampack \fB\-\-debug[=\fR\fB\fIdebug_options\fR\fR\fB]\fR, \fB\-# [\fR\fB\fIdebug_options\fR\fR\fB]\fR .sp @@ -201,8 +189,6 @@ d:t:o\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisampack: force option -.\" force option: myisampack \fB\-\-force\fR, \fB\-f\fR .sp @@ -232,8 +218,6 @@ packs the table anyway\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisampack: join option -.\" join option: myisampack \fB\-\-join=\fR\fB\fIbig_tbl_name\fR\fR, \fB\-j \fR\fB\fIbig_tbl_name\fR\fR .sp @@ -256,8 +240,6 @@ must exist\&. The source tables are read for the join operation but not modified .sp -1 .IP \(bu 2.3 .\} -.\" myisampack: silent option -.\" silent option: myisampack \fB\-\-silent\fR, \fB\-s\fR .sp @@ -272,8 +254,6 @@ Silent mode\&. Write output only when errors occur\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisampack: test option -.\" test option: myisampack \fB\-\-test\fR, \fB\-t\fR .sp @@ -288,8 +268,6 @@ Do not actually pack the table, just test packing it\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisampack: tmpdir option -.\" tmpdir option: myisampack \fB\-\-tmpdir=\fR\fB\fIdir_name\fR\fR, \fB\-T \fR\fB\fIdir_name\fR\fR .sp @@ -306,8 +284,6 @@ creates temporary files\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisampack: verbose option -.\" verbose option: myisampack \fB\-\-verbose\fR, \fB\-v\fR .sp @@ -322,8 +298,6 @@ Verbose mode\&. Write information about the progress of the packing operation an .sp -1 .IP \(bu 2.3 .\} -.\" myisampack: version option -.\" version option: myisampack \fB\-\-version\fR, \fB\-V\fR .sp @@ -338,8 +312,6 @@ Display version information and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisampack: wait option -.\" wait option: myisampack \fB\-\-wait\fR, \fB\-w\fR .sp @@ -349,7 +321,6 @@ server was invoked with external locking disabled, it is not a good idea to invo \fBmyisampack\fR if the table might be updated by the server during the packing process\&. .RE -.\" examples: compressed tables .PP The following sequence of commands illustrates a typical table compression session: .sp diff --git a/mysql-wsrep-5.6/man/mysql-stress-test.pl.1 b/mysql-wsrep-5.6/man/mysql-stress-test.pl.1 index 029040dd..9b1116b8 100644 --- a/mysql-wsrep-5.6/man/mysql-stress-test.pl.1 +++ b/mysql-wsrep-5.6/man/mysql-stress-test.pl.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysql-stress-test.pl\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/02/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL .\" Language: English .\" -.TH "\FBMYSQL\-STRESS\-TE" "1" "03/02/2016" "MySQL" "MySQL Database System" +.TH "\FBMYSQL\-STRESS\-TE" "1" "08/25/2016" "MySQL" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysql-stress-test.pl .SH "NAME" mysql-stress-test.pl \- server stress test program .SH "SYNOPSIS" @@ -67,8 +66,6 @@ supports the following options: .sp -1 .IP \(bu 2.3 .\} -.\" mysql-stress-test.pl: help option -.\" help option: mysql-stress-test.pl \fB\-\-help\fR .sp Display a help message and exit\&. @@ -82,8 +79,6 @@ Display a help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-stress-test.pl: abort-on-error option -.\" abort-on-error option: mysql-stress-test.pl \fB\-\-abort\-on\-error=\fR\fB\fIN\fR\fR .sp Causes the program to abort if an error with severity less than or equal to N was encountered\&. Set to 1 to abort on any error\&. @@ -97,8 +92,6 @@ Causes the program to abort if an error with severity less than or equal to N wa .sp -1 .IP \(bu 2.3 .\} -.\" mysql-stress-test.pl: check-tests-file option -.\" check-tests-file option: mysql-stress-test.pl \fB\-\-check\-tests\-file\fR .sp Periodically check the file that lists the tests to be run\&. If it has been modified, reread the file\&. This can be useful if you update the list of tests to be run during a stress test\&. @@ -112,8 +105,6 @@ Periodically check the file that lists the tests to be run\&. If it has been mod .sp -1 .IP \(bu 2.3 .\} -.\" mysql-stress-test.pl: cleanup option -.\" cleanup option: mysql-stress-test.pl \fB\-\-cleanup\fR .sp Force cleanup of the working directory\&. @@ -127,8 +118,6 @@ Force cleanup of the working directory\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-stress-test.pl: log-error-details option -.\" log-error-details option: mysql-stress-test.pl \fB\-\-log\-error\-details\fR .sp Log error details in the global error log file\&. @@ -142,8 +131,6 @@ Log error details in the global error log file\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-stress-test.pl: loop-count option -.\" loop-count option: mysql-stress-test.pl \fB\-\-loop\-count=\fR\fB\fIN\fR\fR .sp In sequential test mode, the number of loops to execute before exiting\&. @@ -157,8 +144,6 @@ In sequential test mode, the number of loops to execute before exiting\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-stress-test.pl: mysqltest option -.\" mysqltest option: mysql-stress-test.pl \fB\-\-mysqltest=\fR\fB\fIpath\fR\fR .sp The path name to the @@ -174,8 +159,6 @@ program\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-stress-test.pl: server-database option -.\" server-database option: mysql-stress-test.pl \fB\-\-server\-database=\fR\fB\fIdb_name\fR\fR .sp The database to use for the tests\&. The default is @@ -190,8 +173,6 @@ test\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-stress-test.pl: server-host option -.\" server-host option: mysql-stress-test.pl \fB\-\-server\-host=\fR\fB\fIhost_name\fR\fR .sp The host name of the local host to use for making a TCP/IP connection to the local server\&. By default, the connection is made to @@ -207,8 +188,6 @@ using a Unix socket file\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-stress-test.pl: server-logs-dir option -.\" server-logs-dir option: mysql-stress-test.pl \fB\-\-server\-logs\-dir=\fR\fB\fIpath\fR\fR .sp This option is required\&. @@ -224,8 +203,6 @@ is the directory where all client session logs will be stored\&. Usually this is .sp -1 .IP \(bu 2.3 .\} -.\" mysql-stress-test.pl: server-password option -.\" server-password option: mysql-stress-test.pl \fB\-\-server\-password=\fR\fB\fIpassword\fR\fR .sp The password to use when connecting to the server\&. @@ -239,8 +216,6 @@ The password to use when connecting to the server\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-stress-test.pl: server-port option -.\" server-port option: mysql-stress-test.pl \fB\-\-server\-port=\fR\fB\fIport_num\fR\fR .sp The TCP/IP port number to use for connecting to the server\&. The default is 3306\&. @@ -254,8 +229,6 @@ The TCP/IP port number to use for connecting to the server\&. The default is 330 .sp -1 .IP \(bu 2.3 .\} -.\" mysql-stress-test.pl: server-socket option -.\" server-socket option: mysql-stress-test.pl \fB\-\-server\-socket=\fR\fB\fIfile_name\fR\fR .sp For connections to @@ -271,8 +244,6 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi .sp -1 .IP \(bu 2.3 .\} -.\" mysql-stress-test.pl: server-user option -.\" server-user option: mysql-stress-test.pl \fB\-\-server\-user=\fR\fB\fIuser_name\fR\fR .sp The MySQL user name to use when connecting to the server\&. The default is @@ -287,8 +258,6 @@ root\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-stress-test.pl: sleep-time option -.\" sleep-time option: mysql-stress-test.pl \fB\-\-sleep\-time=\fR\fB\fIN\fR\fR .sp The delay in seconds between test executions\&. @@ -302,8 +271,6 @@ The delay in seconds between test executions\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-stress-test.pl: stress-basedir option -.\" stress-basedir option: mysql-stress-test.pl \fB\-\-stress\-basedir=\fR\fB\fIpath\fR\fR .sp This option is required\&. @@ -319,8 +286,6 @@ is the working directory for the test run\&. It is used as the temporary locatio .sp -1 .IP \(bu 2.3 .\} -.\" mysql-stress-test.pl: stress-datadir option -.\" stress-datadir option: mysql-stress-test.pl \fB\-\-stress\-datadir=\fR\fB\fIpath\fR\fR .sp The directory of data files to be used during testing\&. The default location is the @@ -338,8 +303,6 @@ option\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-stress-test.pl: stress-init-file option -.\" stress-init-file option: mysql-stress-test.pl \fB\-\-stress\-init\-file[=\fR\fB\fIpath\fR\fR\fB]\fR .sp \fIfile_name\fR @@ -356,8 +319,6 @@ in the test suite directory\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-stress-test.pl: stress-mode option -.\" stress-mode option: mysql-stress-test.pl \fB\-\-stress\-mode=\fR\fB\fImode\fR\fR .sp This option indicates the test order in stress\-test mode\&. The @@ -378,8 +339,6 @@ random\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-stress-test.pl: stress-suite-basedir option -.\" stress-suite-basedir option: mysql-stress-test.pl \fB\-\-stress\-suite\-basedir=\fR\fB\fIpath\fR\fR .sp This option is required\&. @@ -403,8 +362,6 @@ option\&.) .sp -1 .IP \(bu 2.3 .\} -.\" mysql-stress-test.pl: stress-tests-file option -.\" stress-tests-file option: mysql-stress-test.pl \fB\-\-stress\-tests\-file[=\fR\fB\fIfile_name\fR\fR\fB]\fR .sp Use this option to run the stress tests\&. @@ -425,8 +382,6 @@ in the stress suite directory\&. (See .sp -1 .IP \(bu 2.3 .\} -.\" mysql-stress-test.pl: suite option -.\" suite option: mysql-stress-test.pl \fB\-\-suite=\fR\fB\fIsuite_name\fR\fR .sp Run the named test suite\&. The default name is @@ -444,8 +399,6 @@ directory)\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-stress-test.pl: test-count option -.\" test-count option: mysql-stress-test.pl \fB\-\-test\-count=\fR\fB\fIN\fR\fR .sp The number of tests to execute before exiting\&. @@ -459,8 +412,6 @@ The number of tests to execute before exiting\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-stress-test.pl: test-duration option -.\" test-duration option: mysql-stress-test.pl \fB\-\-test\-duration=\fR\fB\fIN\fR\fR .sp The duration of stress testing in seconds\&. @@ -474,8 +425,6 @@ The duration of stress testing in seconds\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-stress-test.pl: threads option -.\" threads option: mysql-stress-test.pl \fB\-\-threads=\fR\fB\fIN\fR\fR .sp The number of threads\&. The default is 1\&. @@ -489,8 +438,6 @@ The number of threads\&. The default is 1\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-stress-test.pl: verbose option -.\" verbose option: mysql-stress-test.pl \fB\-\-verbose\fR .sp Verbose mode\&. Print more information about what the program does\&. diff --git a/mysql-wsrep-5.6/man/mysql-test-run.pl.1 b/mysql-wsrep-5.6/man/mysql-test-run.pl.1 index 856c0a66..553fa257 100644 --- a/mysql-wsrep-5.6/man/mysql-test-run.pl.1 +++ b/mysql-wsrep-5.6/man/mysql-test-run.pl.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysql-test-run.pl\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/02/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL .\" Language: English .\" -.TH "\FBMYSQL\-TEST\-RUN\" "1" "03/02/2016" "MySQL" "MySQL Database System" +.TH "\FBMYSQL\-TEST\-RUN\" "1" "08/25/2016" "MySQL" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysql-test-run.pl .SH "NAME" mysql-test-run.pl \- run MySQL test suite .SH "SYNOPSIS" @@ -167,7 +166,7 @@ testa with anything in between\&. In the latter case, the pattern match is not anchored to the beginning of the test name, so it also matches names such as xmainytesta\&. .PP -From MySQL 5\&.7 it is possible to put a list of test names in a file and have +As of MySQL 5\&.7, it is possible to put a list of test names in a file and have \fBmysql\-test\-run\&.pl\fR run those tests, using the option \fB\-\-do\-test\-list=\fR\fB\fIfile\fR\fR\&. The tests should be listed one per line in the file, using the fully qualified name @@ -175,6 +174,14 @@ run those tests, using the option # indicates a comment and is ignored\&. .PP +As of MySQL 8\&.0, +\fBmysql\-test\-run\&.pl\fR +supports a +\fB\-\-do\-suite\fR +option, which is similar to +\fB\-\-do\-test\fR +but permits specifying entire suites of tests to run\&. +.PP To perform setup prior to running tests, \fBmysql\-test\-run\&.pl\fR needs to invoke @@ -231,44 +238,6 @@ uses several environment variables\&. Some of them are listed in the following t \fBmysql\-test\-run\&.pl\fR, others are set by \fBmysql\-test\-run\&.pl\fR instead, and may be referred to in tests\&. -.\" MTR_MEM environment variable -.\" environment variable: MTR_MEM -.\" MTR_PARALLEL environment variable -.\" environment variable: MTR_PARALLEL -.\" MTR_BUILD_THREAD environment variable -.\" environment variable: MTR_BUILD_THREAD -.\" MTR_PORT_BASE environment variable -.\" environment variable: MTR_PORT_BASE -.\" MTR_TESTCASE_TIMEOUT environment variable -.\" environment variable: MTR_TESTCASE_TIMEOUT -.\" MTR_SUITE_TIMEOUT environment variable -.\" environment variable: MTR_SUITE_TIMEOUT -.\" MTR_START_TIMEOUT environment variable -.\" environment variable: MTR_START_TIMEOUT -.\" MTR_SHUTDOWN_TIMEOUT environment variable -.\" environment variable: MTR_SHUTDOWN_TIMEOUT -.\" MTR_CTEST_TIMEOUT environment variable -.\" environment variable: MTR_CTEST_TIMEOUT -.\" MYSQL_CONFIG_EDITOR environment variable -.\" environment variable: MYSQL_CONFIG_EDITOR -.\" MYSQL_TEST environment variable -.\" environment variable: MYSQL_TEST -.\" MYSQL_TEST_LOGIN_FILE environment variable -.\" environment variable: MYSQL_TEST_LOGIN_FILE -.\" MYSQLD_BOOTSTRAP environment variable -.\" environment variable: MYSQLD_BOOTSTRAP -.\" MYSQLD_BOOTSTRAP_CMD environment variable -.\" environment variable: MYSQLD_BOOTSTRAP_CMD -.\" MYSQLD environment variable -.\" environment variable: MYSQLD -.\" MYSQLD_CMD environment variable -.\" environment variable: MYSQLD_CMD -.\" MYSQLTEST_VARDIR environment variable -.\" environment variable: MYSQLTEST_VARDIR -.\" MYSQL_TEST_DIR environment variable -.\" environment variable: MYSQL_TEST_DIR -.\" MYSQL_TMP_DIR environment variable -.\" environment variable: MYSQL_TMP_DIR .TS allbox tab(:); lB lB. @@ -292,8 +261,14 @@ l l l l l l l l +l l l l. T{ +MTR_BUILD_THREAD +T}:T{ +If set, defines which port number range is used for the server +T} +T{ MTR_MEM T}:T{ If set to anything, will run tests with files in "memory" using tmpfs or @@ -301,20 +276,10 @@ If set to anything, will run tests with files in "memory" using tmpfs or \fB\-\-mem\fR option T} T{ -MTR_PARALLEL -T}:T{ -If set, defines number of parallel threads executing tests\&. Same as - \fB\-\-parallel\fR option -T} -T{ -MTR_BUILD_THREAD -T}:T{ -If set, defines which port number range is used for the server -T} -T{ -MTR_PORT_BASE +MTR_MAX_PARALLEL T}:T{ -If set, defines which port number range is used for the server +If set, defines maximum number of parallel threads if + \fB\-\-parallel=auto\fR is given T} T{ MTR_\fINAME\fR_TIMEOUT @@ -331,6 +296,17 @@ Setting of a timeout in minutes or seconds, corresponding to command MySQL 5\&.8\&.0\&. T} T{ +MTR_PARALLEL +T}:T{ +If set, defines number of parallel threads executing tests\&. Same as + \fB\-\-parallel\fR option +T} +T{ +MTR_PORT_BASE +T}:T{ +If set, defines which port number range is used for the server +T} +T{ MYSQL_CONFIG_EDITOR T}:T{ Path name to \fBmysql_config_editor\fR binary\&. Supported as @@ -342,6 +318,12 @@ T}:T{ Path name to \fBmysqltest\fR binary T} T{ +MYSQL_TEST_DIR +T}:T{ +Full path to the mysql\-test directory where tests + are being run from +T} +T{ MYSQL_TEST_LOGIN_FILE T}:T{ Path name to login file used by \fBmysql_config_editor\fR\&. @@ -351,6 +333,17 @@ Path name to login file used by \fBmysql_config_editor\fR\&. Windows\&. Supported as of MySQL 5\&.6\&.6\&. T} T{ +MYSQL_TMP_DIR +T}:T{ +Path to temp directory used for temporary files during tests +T} +T{ +MYSQLD +T}:T{ +Full path to server executable used in tests\&. Supported as of MySQL + 5\&.5\&.17\&. +T} +T{ MYSQLD_BOOTSTRAP T}:T{ Full path name to \fBmysqld\fR that has all options enabled @@ -361,12 +354,6 @@ T}:T{ Full command line used for initial database setup for this test batch T} T{ -MYSQLD -T}:T{ -Full path to server executable used in tests\&. Supported as of MySQL - 5\&.5\&.17\&. -T} -T{ MYSQLD_CMD T}:T{ Command line for starting server as used in tests, with the minimum set @@ -378,17 +365,6 @@ T}:T{ Path name to the var directory that is used for logs, temporary files, and so forth T} -T{ -MYSQL_TEST_DIR -T}:T{ -Full path to the mysql\-test directory where tests - are being run from -T} -T{ -MYSQL_TMP_DIR -T}:T{ -Path to temp directory used for temporary files during tests -T} .TE .sp 1 .PP @@ -430,8 +406,6 @@ not to process any following arguments as options\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: help option -.\" help option: mysql-test-run.pl \fB\-\-help\fR, \fB\-h\fR .sp @@ -446,8 +420,6 @@ Display a help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: big-test option -.\" big-test option: mysql-test-run.pl \fB\-\-big\-test\fR .sp Allow tests marked as "big" to run\&. Tests can be thus marked by including the line @@ -466,8 +438,6 @@ This is typically done for tests that take very long to run, or that use very mu .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: boot-dbx option -.\" boot-dbx option: mysql-test-run.pl \fB\-\-boot\-dbx\fR .sp Run the @@ -485,8 +455,6 @@ debugger\&. This option is available from MySQL 5\&.5\&.17\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: boot-ddd option -.\" boot-ddd option: mysql-test-run.pl \fB\-\-boot\-ddd\fR .sp Run the @@ -504,8 +472,6 @@ debugger\&. This option is available from MySQL 5\&.5\&.17\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: boot-gdb option -.\" boot-gdb option: mysql-test-run.pl \fB\-\-boot\-gdb\fR .sp Run the @@ -513,6 +479,10 @@ Run the server used for bootstrapping the database through the \fBgdb\fR debugger\&. This option is available from MySQL 5\&.5\&.17\&. +.sp +See also the +\fB\-\-manual\-boot\-gdb\fR +option\&. .RE .sp .RS 4 @@ -523,8 +493,6 @@ debugger\&. This option is available from MySQL 5\&.5\&.17\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: build-thread option -.\" build-thread option: mysql-test-run.pl \fB\-\-build\-thread=\fR\fB\fInumber\fR\fR .sp Specify a number to calculate port numbers from\&. The formula is 10 * @@ -552,8 +520,6 @@ is recommended instead\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: callgrind option -.\" callgrind option: mysql-test-run.pl \fB\-\-callgrind\fR .sp Instructs @@ -570,8 +536,6 @@ to use .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: check-testcases option -.\" check-testcases option: mysql-test-run.pl \fB\-\-check\-testcases\fR .sp Check test cases for side effects\&. This is done by checking system state before and after each test case; if there is any difference, a warning to that effect will be written, but the test case will not be marked as failed because of it\&. This check is enabled by default\&. @@ -585,8 +549,6 @@ Check test cases for side effects\&. This is done by checking system state befor .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: clean-vardir option -.\" clean-vardir option: mysql-test-run.pl \fB\-\-clean\-vardir\fR .sp Clean up the @@ -603,8 +565,6 @@ directory with logs and test results etc\&. after the test run, but only if ther .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: client-bindir option -.\" client-bindir option: mysql-test-run.pl \fB\-\-client\-bindir=\fR\fB\fIpath\fR\fR .sp The path to the directory where client binaries are located\&. @@ -618,8 +578,6 @@ The path to the directory where client binaries are located\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: client-dbx option -.\" client-dbx option: mysql-test-run.pl \fB\-\-client\-dbx\fR .sp Start @@ -637,8 +595,6 @@ debugger\&. Support for dbx is available from MySQL 5\&.5\&.12\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: client-ddd option -.\" client-ddd option: mysql-test-run.pl \fB\-\-client\-ddd\fR .sp Start @@ -656,8 +612,6 @@ debugger\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: client-debugger option -.\" client-debugger option: mysql-test-run.pl \fB\-\-client\-debugger=\fR\fB\fIdebugger\fR\fR .sp Start @@ -673,8 +627,6 @@ in the named debugger\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: client-gdb option -.\" client-gdb option: mysql-test-run.pl \fB\-\-client\-gdb\fR .sp Start @@ -692,8 +644,6 @@ debugger\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: client-libdir option -.\" client-libdir option: mysql-test-run.pl \fB\-\-client\-libdir=\fR\fB\fIpath\fR\fR .sp The path to the directory where client libraries are located\&. @@ -707,8 +657,6 @@ The path to the directory where client libraries are located\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: combination option -.\" combination option: mysql-test-run.pl \fB\-\-combination=\fR\fB\fIvalue\fR\fR .sp Extra option to pass to @@ -738,8 +686,6 @@ Section\ \&4.9, \(lqPassing Options from mysql-test-run.pl to mysqld or mysqltes .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: comment option -.\" comment option: mysql-test-run.pl \fB\-\-comment=\fR\fB\fIstr\fR\fR .sp Write @@ -756,8 +702,6 @@ to the output within lines filled with .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: compress option -.\" compress option: mysql-test-run.pl \fB\-\-compress\fR .sp Compress all information sent between the client and the server if both support compression\&. @@ -771,8 +715,6 @@ Compress all information sent between the client and the server if both support .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: cursor-protocol option -.\" cursor-protocol option: mysql-test-run.pl \fB\-\-cursor\-protocol\fR .sp Pass the @@ -791,8 +733,6 @@ option to .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: dbx option -.\" gdb option: mysql-test-run.pl \fB\-\-dbx\fR .sp Start @@ -810,8 +750,6 @@ debugger\&. Support for dbx is available from MySQL 5\&.5\&.12\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: ddd option -.\" ddd option: mysql-test-run.pl \fB\-\-ddd\fR .sp Start @@ -829,8 +767,6 @@ debugger\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: debug option -.\" debug option: mysql-test-run.pl \fB\-\-debug\fR .sp Dump trace output for all clients and servers\&. @@ -844,8 +780,6 @@ Dump trace output for all clients and servers\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: debugger option -.\" debugger option: mysql-test-run.pl \fB\-\-debugger=\fR\fB\fIdebugger\fR\fR .sp Start @@ -861,8 +795,6 @@ using the named debugger\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: debug-common option -.\" debug-common option: mysql-test-run.pl \fB\-\-debug\-common\fR .sp This option works similar to @@ -880,8 +812,6 @@ which are considered the most commonly used\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: debug-server option -.\" debug-server option: mysql-test-run.pl \fB\-\-debug\-server\fR .sp Runs @@ -904,8 +834,6 @@ option\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: debug-sync-timeout option -.\" debug-sync-timeout option: mysql-test-run.pl \fB\-\-debug\-sync\-timeout=\fR\fB\fIseconds\fR\fR .sp Controls whether the Debug Sync facility for testing and debugging is enabled\&. The option value is a timeout in seconds\&. The default value is 300\&. A value of 0 disables Debug Sync\&. The value of this option also becomes the default timeout for individual synchronization points\&. @@ -932,8 +860,6 @@ Section\ \&4.14, \(lqThread Synchronization in Test Cases\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: default-myisam option -.\" default-myisam option: mysql-test-run.pl \fB\-\-default\-myisam\fR .sp Use MyISAM as default engine for all except InnoDB\-specific tests\&. This option is on by default in MySQL 5\&.5 and 5\&.6 but it off by default from MySQL 5\&.7\&. See also @@ -948,8 +874,6 @@ Use MyISAM as default engine for all except InnoDB\-specific tests\&. This optio .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: defaults-file option -.\" default-file option: mysql-test-run.pl \fB\-\-defaults\-file=\fR\fB\fIfile_name\fR\fR .sp Use the named file as fixed config file template for all tests\&. @@ -963,8 +887,6 @@ Use the named file as fixed config file template for all tests\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: defaults_extra_file option -.\" default_extra_file option: mysql-test-run.pl \fB\-\-defaults_extra_file=\fR\fB\fIfile_name\fR\fR .sp Add setting from the named file to all generated configs\&. @@ -978,17 +900,42 @@ Add setting from the named file to all generated configs\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: do-test option -.\" do-test option: mysql-test-run.pl -\fB\-\-do\-test=\fR\fB\fIprefix\fR\fR +\fB\-\-do\-suite=\fR\fB\fIprefix or regex\fR\fR +.sp +Run all test cases from suites having a name that begins with the given +\fIprefix\fR +value or matches the regular expression\&. If the argument matches no existing suites, +\fBmysql\-test\-run\&.pl\fR +aborts\&. +.sp +The argument for the +\fB\-\-do\-suite\fR +option allows more flexible specification of which tests to perform\&. See the description of the +\fB\-\-do\-test\fR +option for details\&. +.sp +The +\fB\-\-do\-suite\fR +option was added in MySQL 8\&.0\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-do\-test=\fR\fB\fIprefix or regex\fR\fR .sp Run all test cases having a name that begins with the given \fIprefix\fR -value\&. This option provides a convenient way to run a family of similarly named tests\&. +value or matches the regular expression\&. This option provides a convenient way to run a family of similarly named tests\&. .sp The argument for the \fB\-\-do\-test\fR -option also allows more flexible specification of which tests to perform\&. If the argument contains a pattern metacharacter other than a lone period, it is interpreted as a Perl regular expression and applies to test names that match the pattern\&. If the argument contains a lone period or does not contain any pattern metacharacters, it is interpreted the same way as previously and matches test names that begin with the argument value\&. For example, +option allows more flexible specification of which tests to perform\&. If the argument contains a pattern metacharacter other than a lone period, it is interpreted as a Perl regular expression and applies to test names that match the pattern\&. If the argument contains a lone period or does not contain any pattern metacharacters, it is interpreted the same way as previously and matches test names that begin with the argument value\&. For example, \fB\-\-do\-test=testa\fR matches tests that begin with testa, @@ -1014,8 +961,6 @@ xmainytestz\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: do-test-list option -.\" do-test-list option: mysql-test-run.pl \fB\-\-do\-testlist=\fR\fB\fIfile\fR\fR .sp Run all tests listed in the file @@ -1038,8 +983,6 @@ option is available from MySQL 5\&.7\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: embedded-server option -.\" embedded-server option: mysql-test-run.pl \fB\-\-embedded\-server\fR .sp Use a version of @@ -1055,8 +998,6 @@ built with the embedded server\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: enable-disabled option -.\" enable-disabled option: mysql-test-run.pl \fB\-\-enable\-disabled\fR .sp Ignore any @@ -1072,8 +1013,6 @@ file, and run also tests marked as disbaled\&. Success or failure of those tests .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: experimental option -.\" experimental option: mysql-test-run.pl \fB\-\-experimental=\fR\fB\fIfile_name\fR\fR .sp Specify a file that contains a list of test cases that should be displayed with the @@ -1097,8 +1036,6 @@ It is also possible to supply more than one .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: explain-protocol option -.\" explain-protocol option: mysql-test-run.pl \fB\-\-explain\-protocol\fR, .sp Run @@ -1114,8 +1051,6 @@ on all SELECT, INSERT, REPLACE, UPDATE and DELETE queries\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: extern option -.\" extern option: mysql-test-run.pl \fB\-\-extern\fR \fIoption\fR=\fIvalue\fR .sp @@ -1150,8 +1085,6 @@ file that requires the server to be restarted with specific options, the file wi .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: fast option -.\" fast option: mysql-test-run.pl \fB\-\-fast\fR .sp Do not perform controlled shutdown when servers need to be restarted or at the end of the test run\&. This is equivalent to using @@ -1166,8 +1099,6 @@ Do not perform controlled shutdown when servers need to be restarted or at the e .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: force option -.\" force option: mysql-test-run.pl \fB\-\-force\fR .sp Normally, @@ -1185,8 +1116,6 @@ causes execution to continue regardless of test case failure\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: force-restart option -.\" force-restart option: mysql-test-run.pl \fB\-\-force\-restart\fR .sp Always restart the server(s) between each tast case, whether it\*(Aqs needed or not\&. Will also restart between repeated runs of the same test case\&. This may be useful e\&.g\&. when looking for the source of a memory leak, as there will only have been one test run before the server exits\&. @@ -1200,8 +1129,6 @@ Always restart the server(s) between each tast case, whether it\*(Aqs needed or .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: gcov option -.\" gcov option: mysql-test-run.pl \fB\-\-gcov\fR .sp Run tests with the @@ -1217,8 +1144,6 @@ test coverage tool\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: gdb option -.\" gdb option: mysql-test-run.pl \fB\-\-gdb\fR .sp Start @@ -1236,8 +1161,6 @@ debugger\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: gprof option -.\" gprof option: mysql-test-run.pl \fB\-\-gprof\fR .sp Run tests with the @@ -1253,11 +1176,7 @@ profiling tool\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: include-ndbcluster option -.\" include-ndbcluster option: mysql-test-run.pl \fB\-\-include\-ndbcluster\fR, -.\" mysql-test-run.pl: include-ndb option -.\" include-ndb option: mysql-test-run.pl \fB\-\-include\-ndb\fR .sp Run also tests that need Cluster\&. @@ -1271,8 +1190,6 @@ Run also tests that need Cluster\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: json-explain-protocol option -.\" json-explain-protocol option: mysql-test-run.pl \fB\-\-json\-explain\-protocol\fR, .sp Run @@ -1290,8 +1207,21 @@ option is available from MySQL 5\&.6\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: manual-dbx option -.\" manual-dbx option: mysql-test-run.pl +\fB\-\-manual\-boot\-gdb\fR +.sp +This option is similar to +\fB\-\-boot\-gdb\fR +but attaches the debugger to the server during the bootstrapping process, permitting the use of a remote debugger\&. This option is available from MySQL 5\&.7\&.14\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} \fB\-\-manual\-dbx\fR .sp Use a server that has already been started by the user in the @@ -1307,8 +1237,6 @@ debugger\&. Support for dbx is available from MySQL 5\&.5\&.12\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: manual-ddd option -.\" manual-ddd option: mysql-test-run.pl \fB\-\-manual\-ddd\fR .sp Use a server that has already been started by the user in the @@ -1324,8 +1252,6 @@ debugger\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: manual-debug option -.\" manual-debug option: mysql-test-run.pl \fB\-\-manual\-debug\fR .sp Use a server that has already been started by the user in a debugger\&. @@ -1339,8 +1265,6 @@ Use a server that has already been started by the user in a debugger\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: manual-gdb option -.\" manual-gdb option: mysql-test-run.pl \fB\-\-manual\-gdb\fR .sp Use a server that has already been started by the user in the @@ -1356,8 +1280,6 @@ debugger\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: mark-progress option -.\" mark-progress option: mysql-test-run.pl \fB\-\-mark\-progress\fR .sp Marks progress with timing (in milliseconds) and line number in @@ -1372,8 +1294,6 @@ var/log/\fItestname\fR\&.progress\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: max-connections option -.\" max-connections option: mysql-test-run.pl \fB\-\-max\-connections=\fR\fB\fInum\fR\fR .sp The maximum number of simultaneous server connections that may be used per test\&. If not set, the maximum is 128\&. Minimum allowed limit is 8, maximum is 5120\&. Corresponds to the same option for @@ -1388,8 +1308,6 @@ The maximum number of simultaneous server connections that may be used per test\ .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: max-save-core option -.\" max-save-core option: mysql-test-run.pl \fB\-\-max\-save\-core=\fR\fB\fIN\fR\fR .sp Limit the number of core files saved, to avoid filling up disks in case of a frequently crashing server\&. Defaults to 5, set to 0 for no limit\&. May also be set with the environment variable @@ -1404,8 +1322,6 @@ MTR_MAX_SAVE_CORE .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: max-save-datadir option -.\" max-save-datadir option: mysql-test-run.pl \fB\-\-max\-save\-datadir=\fR\fB\fIN\fR\fR .sp Limit the number of data directories saved after failed tests, to avoid filling up disks in case of frequent failures\&. Defaults to 20, set to 0 for no limit\&. May also be set with the environment variable @@ -1420,8 +1336,6 @@ MTR_MAX_SAVE_DATADIR .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: max-test-fail option -.\" max-test-fail option: mysql-test-run.pl \fB\-\-max\-test\-fail=\fR\fB\fIN\fR\fR .sp Stop execution after the specified number of tests have failed, to avoid using up resources (and time) in case of massive failures\&. retries are noe counted, nor are failures of tests marked experimental\&. Defaults to 10, set to 0 for no limit\&. May also be set with the environment variable @@ -1436,8 +1350,6 @@ MTR_MAX_TEST_FAIL .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: mem option -.\" mem option: mysql-test-run.pl \fB\-\-mem\fR .sp This option is not supported on Windows\&. @@ -1473,8 +1385,6 @@ option next time\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: mysqld option -.\" mysqld option: mysql-test-run.pl \fB\-\-mysqld=\fR\fB\fIvalue\fR\fR .sp Extra option to pass to @@ -1493,8 +1403,6 @@ Section\ \&4.9, \(lqPassing Options from mysql-test-run.pl to mysqld or mysqltes .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: mysqld-env option -.\" mysqld-env option: mysql-test-run.pl \fB\-\-mysqld\-env=\fR\fB\fIvariable\fR\fR\fB=\fR\fB\fIvalue\fR\fR .sp Sets (or changes) an environment variable before starting @@ -1514,8 +1422,6 @@ options to set more than one variable\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: mysqltest option -.\" mysqltest option: mysql-test-run.pl \fB\-\-mysqltest=\fR\fB\fIoptions\fR\fR .sp Extra options to pass to @@ -1532,8 +1438,6 @@ This option was added in MySQL 5\&.8\&.0\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: ndb-connectstring option -.\" ndb-connectstring option: mysql-test-run.pl \fB\-\-ndb\-connectstring=\fR\fB\fIstr\fR\fR .sp Pass @@ -1551,8 +1455,6 @@ from starting a cluster\&. It is assumed that there is already a cluster running .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: nocheck-testcases option -.\" nocheck-testcases option: mysql-test-run.pl \fB\-\-nocheck\-testcases\fR .sp Disable the check for test case side effects; see @@ -1568,8 +1470,6 @@ for a description\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: nodefault-myisam option -.\" nodefault-myisam option: mysql-test-run.pl \fB\-\-nodefault\-myisam\fR .sp For MySQL 5\&.5 or 5\&.6, do not override the build\-in default engine to use MyISAM instead for non\-InnoDB tests\&. Since the existing collection of tests were originally adapted for MyISAM as default, many tests will fail when this option is used, because the test behaves differently or produces different output when the engine switches to InnoDB\&. @@ -1585,8 +1485,6 @@ From MySQL 5\&.7, the default engine for tests has been changed to InnoDB and th .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: noreorder option -.\" noreorder option: mysql-test-run.pl \fB\-\-noreorder\fR .sp Do not reorder tests to reduce number of restarts, but run them in exactly the order given\&. If a whole suite is to be run, the tests are run in alphabetic order, though similiar combinations will be grouped together\&. If more than one suite is listed, the tests are run one suite at a time, in the order listed\&. @@ -1600,8 +1498,6 @@ Do not reorder tests to reduce number of restarts, but run them in exactly the o .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: notimer option -.\" notimer option: mysql-test-run.pl \fB\-\-notimer\fR .sp Cause @@ -1617,8 +1513,6 @@ not to generate a timing file\&. The effect of this is that the report from each .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: nounit-tests option -.\" nounit-tests option: mysql-test-run.pl \fB\-\-nounit\-tests\fR .sp Do not run unit tests, overriding default behavior or setting of the @@ -1636,8 +1530,6 @@ Running of unit tests was enabled from MySQL 5\&.5\&.11\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: nowarnings option -.\" nowarnings option: mysql-test-run.pl \fB\-\-nowarnings\fR .sp Do not look for and report errors and warning in the server logs\&. @@ -1651,16 +1543,32 @@ Do not look for and report errors and warning in the server logs\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: parallel option -.\" parallel option: mysql-test-run.pl \fB\-\-parallel={\fR\fB\fIN\fR\fR\fB|auto}\fR .sp Run tests using \fIN\fR parallel threads\&. By default, 1 thread is used\&. Use \fB\-\-parallel=auto\fR -for auto\-setting of -\fIN\fR\&. +to set +\fIN\fR +automatically\&. +.sp +Setting the +MTR_PARALLEL +environment variable to +\fIN\fR +has the same effect as specifying +\fB\-\-parallel=\fR\fB\fIN\fR\fR\&. +.sp +The +MTR_MAX_PARALLEL +environment variable, if set, specifies the maximum number of parallel workers that can be spawned when the +\fB\-\-parallel=auto\fR +option is specified\&. If +\fB\-\-parallel=auto\fR +is not specified, +MTR_MAX_PARALLEL +variable has no effect\&. .RE .sp .RS 4 @@ -1671,8 +1579,6 @@ for auto\-setting of .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: port-base option -.\" port-base option: mysql-test-run.pl \fB\-\-port\-base=\fR\fB\fIP\fR\fR .sp Specify base of port numbers to be used; a block of 10 will be allocated\&. @@ -1699,8 +1605,6 @@ takes precedence\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: print-testcases option -.\" print-testcases option: mysql-test-run.pl \fB\-\-print\-testcases\fR .sp Do not run any tests, but print details about all tests, in the order they would have been run\&. @@ -1714,8 +1618,6 @@ Do not run any tests, but print details about all tests, in the order they would .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: ps-protocol option -.\" ps-protocol option: mysql-test-run.pl \fB\-\-ps\-protocol\fR .sp Pass the @@ -1732,8 +1634,6 @@ option to .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: record option -.\" record option: mysql-test-run.pl \fB\-\-record\fR .sp Pass the @@ -1750,8 +1650,6 @@ option to .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: reorder option -.\" reorder option: mysql-test-run.pl \fB\-\-reorder\fR .sp Reorder tests to minimize the number of server restarts needed\&. This is the default behavior\&. There is no guarantee that a particular set of tests will always end up in the same order\&. @@ -1765,8 +1663,6 @@ Reorder tests to minimize the number of server restarts needed\&. This is the de .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: repeat option -.\" repeat option: mysql-test-run.pl \fB\-\-repeat=\fR\fB\fIN\fR\fR .sp Run each test @@ -1782,8 +1678,6 @@ number of times\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: report-features option -.\" report-features option: mysql-test-run.pl \fB\-\-report\-features\fR .sp Display the output of @@ -1800,8 +1694,6 @@ SHOW VARIABLES\&. This can be used to verify that binaries are built with all re .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: report-times option -.\" report-times option: mysql-test-run.pl \fB\-\-report\-times\fR .sp At the end of the test run, write a summary of how much time was spent in various phases of execution\&. If you run with @@ -1824,8 +1716,6 @@ is available from MySQL 5\&.5\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: retry option -.\" retry option: mysql-test-run.pl \fB\-\-retry=\fR\fB\fIN\fR\fR .sp If a test fails, it is retried up to a maximum of @@ -1851,8 +1741,6 @@ may fail in total, as each repetition is considered a new test case, which may i .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: retry-failure option -.\" retry-failure option: mysql-test-run.pl \fB\-\-retry\-failure=\fR\fB\fIN\fR\fR .sp Allow a failed and retried test to fail more than the default 2 times before giving it up\&. Setting it to 0 or 1 effectively turns off retries @@ -1866,8 +1754,6 @@ Allow a failed and retried test to fail more than the default 2 times before giv .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: shutdown-timeout option -.\" shutdown-timeout option: mysql-test-run.pl \fB\-\-shutdown\-timeout=\fR\fB\fIseconds\fR\fR .sp Max number of seconds to wait for servers to do controlled shutdown before killing them\&. Default is 10\&. @@ -1881,8 +1767,6 @@ Max number of seconds to wait for servers to do controlled shutdown before killi .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: skip-combinations option -.\" skip-combinations option: mysql-test-run.pl \fB\-\-skip\-combinations\fR .sp Do not apply combinations; ignore combinations file or option\&. @@ -1896,11 +1780,7 @@ Do not apply combinations; ignore combinations file or option\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: skip-ndbcluster option -.\" skip-ndbcluster option: mysql-test-run.pl \fB\-\-skip\-ndbcluster\fR, -.\" mysql-test-run.pl: skip-ndb option -.\" skip-ndb option: mysql-test-run.pl \fB\-\-skip\-ndb\fR .sp Do not start NDB Cluster; skip Cluster test cases\&. This option only has effect if you do have NDB, if not it will have no effect as it cannot run those tests anyway\&. @@ -1914,11 +1794,7 @@ Do not start NDB Cluster; skip Cluster test cases\&. This option only has effect .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: skip-ndbcluster-slave option -.\" skip-ndbcluster-slave option: mysql-test-run.pl \fB\-\-skip\-ndbcluster\-slave\fR, -.\" mysql-test-run.pl: skip-ndb-slave option -.\" skip-ndb-slave option: mysql-test-run.pl \fB\-\-skip\-ndb\-slave\fR .sp Do not start an NDB Cluster slave\&. @@ -1932,8 +1808,6 @@ Do not start an NDB Cluster slave\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: skip-rpl option -.\" skip-rpl option: mysql-test-run.pl \fB\-\-skip\-rpl\fR .sp Skip replication test cases\&. @@ -1947,8 +1821,6 @@ Skip replication test cases\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: skip-ssl option -.\" skip-ssl option: mysql-test-run.pl \fB\-\-skip\-ssl\fR .sp Do not start @@ -1964,8 +1836,6 @@ with support for SSL connections\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: skip-test option -.\" skip-test option: mysql-test-run.pl \fB\-\-skip\-test=\fR\fB\fIregex\fR\fR .sp Specify a regular expression to be applied to test case names\&. Cases with names that match the expression are skipped\&. tests to skip\&. @@ -1985,8 +1855,6 @@ option for details\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: skip-test-list option -.\" skip-test-list option: mysql-test-run.pl \fB\-\-skip\-test\-list=\fR\fB\fIfile\fR\fR .sp Specify a file listing tests that should be skipped (disabled)\&. @@ -2022,8 +1890,6 @@ are passed to the master server\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: sleep option -.\" sleep option: mysql-test-run.pl \fB\-\-sleep=\fR\fB\fIN\fR\fR .sp Pass @@ -2040,8 +1906,6 @@ to .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: sp-protocol option -.\" sp-protocol option: mysql-test-run.pl \fB\-\-sp\-protocol\fR .sp Pass the @@ -2058,8 +1922,6 @@ option to .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: ssl option -.\" ssl option: mysql-test-run.pl \fB\-\-ssl\fR .sp If @@ -2082,8 +1944,6 @@ Couldn\*(Aqt find support for SSL .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: start option -.\" start option: mysql-test-run.pl \fB\-\-start\fR .sp Initialize and start servers with the startup settings for the specified test case\&. You can use this option to start a server to which you can connect later\&. For example, after building a source distribution you can start a server and connect to it with the @@ -2118,8 +1978,6 @@ will stop once the server has been started, but will terminate if the server die .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: start-and-exit option -.\" start-and-exit option: mysql-test-run.pl \fB\-\-start\-and\-exit\fR .sp This is similar to @@ -2136,8 +1994,6 @@ terminates once the server has been started, leaving just the server process run .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: start-dirty option -.\" start-dirty option: mysql-test-run.pl \fB\-\-start\-dirty\fR .sp This is similar to @@ -2152,8 +2008,6 @@ This is similar to .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: start-from option -.\" start-from option: mysql-test-run.pl \fB\-\-start\-from=\fR\fB\fItest_name\fR\fR .sp \fBmysql\-test\-run\&.pl\fR @@ -2169,8 +2023,6 @@ sorts the list of names of the test cases to be run, and then begins with .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: strace-client option -.\" strace-client option: mysql-test-run.pl \fB\-\-strace\-client\fR .sp Create @@ -2194,8 +2046,6 @@ option is functional from MySQL 5\&.5\&.20, and only supported on Linux\&. The o .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: strace-server option -.\" strace-server option: mysql-test-run.pl \fB\-\-strace\-server\fR .sp Create @@ -2218,8 +2068,6 @@ option is available from MySQL 5\&.5\&.20, on Linux only\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: stress option -.\" stress option: mysql-test-run.pl \fB\-\-stress=\fR\fB\fIstress options\fR\fR .sp Start a server, but instead of running a test, run @@ -2242,8 +2090,6 @@ option was added in MySQL 5\&.5\&.17, it is not a direct replacement for the opt .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: suite option -.\" suite option: mysql-test-run.pl \fB\-\-suite=\fR\fB\fIsuite_name\fR\fR .sp Run the named test suite\&. The default name is @@ -2261,8 +2107,6 @@ directory)\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: suite-timeout option -.\" suite-timeout option: mysql-test-run.pl \fB\-\-suite\-timeout=\fR\fB\fIminutes\fR\fR .sp Specify the maximum test suite runtime in minutes\&. @@ -2276,8 +2120,6 @@ Specify the maximum test suite runtime in minutes\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: testcase-timeout option -.\" testcase-timeout option: mysql-test-run.pl \fB\-\-testcase\-timeout=\fR\fB\fIminutes\fR\fR .sp Specify the maximum test case runtime in minutes\&. @@ -2291,8 +2133,6 @@ Specify the maximum test case runtime in minutes\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: timediff option -.\" timediff option: mysql-test-run.pl \fB\-\-timediff\fR .sp Adds to each test report for a test case, the total time in sconds and milliseconds passed since the preceding test ended\&. This option can only be used together with @@ -2307,8 +2147,6 @@ Adds to each test report for a test case, the total time in sconds and milliseco .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: timer option -.\" timer option: mysql-test-run.pl \fB\-\-timer\fR .sp Cause @@ -2325,8 +2163,6 @@ to generate a timing file\&. The default file is named .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: timestamp option -.\" timestamp option: mysql-test-run.pl \fB\-\-timestamp\fR .sp Prints a timestamp before the test case name in each test report line, showing when the test ended\&. @@ -2340,8 +2176,6 @@ Prints a timestamp before the test case name in each test report line, showing w .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: tmpdir option -.\" tmpdir option: mysql-test-run.pl \fB\-\-tmpdir=\fR\fB\fIpath\fR\fR .sp The directory where temporary file are stored\&. The default location is @@ -2358,8 +2192,6 @@ will be set to the path for this directory, whether it has the default value or .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: unit-tests option -.\" unit-tests option: mysql-test-run.pl \fB\-\-unit\-tests\fR .sp Force running of unit tests, overriding default behavior or setting of the @@ -2377,8 +2209,6 @@ Running of unit tests was enabled from MySQL 5\&.5\&.11\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: unit-tests-report option -.\" unit-tests-report option: mysql-test-run.pl \fB\-\-unit\-tests\-report\fR .sp Extend the unit test run by also outputting the log from the test run, independently of whether it succeeded or not\&. This option implies @@ -2396,8 +2226,6 @@ option is available in MySQL 5\&.5 from version 5\&.5\&.44, in 5\&.6 from versio .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: user option -.\" user option: mysql-test-run.pl \fB\-\-user=\fR\fB\fIuser_name\fR\fR .sp The MySQL user name to use when connecting to the server\&. @@ -2411,8 +2239,6 @@ The MySQL user name to use when connecting to the server\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: user-args option -.\" user-args option: mysql-test-run.pl \fB\-\-user\-args\fR .sp Drops all non\-essential command line arguments to the @@ -2434,8 +2260,6 @@ or .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: valgrind option -.\" valgrind option: mysql-test-run.pl \fB\-\-valgrind\fR .sp Run @@ -2464,8 +2288,6 @@ is added to the list of tests when the server is run in valgrind\&. This test is .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: valgrind-clients option -.\" valgrind-clients option: mysql-test-run.pl \fB\-\-valgrind\-clients\fR .sp Run all clients started by @@ -2487,8 +2309,6 @@ was added in MySQL 5\&.7\&.9\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: valgrind-mysqld option -.\" valgrind-mysqld option: mysql-test-run.pl \fB\-\-valgrind\-mysqld\fR .sp Run the @@ -2505,8 +2325,6 @@ server with .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: valgrind-mysqltest option -.\" valgrind-mysqltest option: mysql-test-run.pl \fB\-\-valgrind\-mysqltest\fR .sp Run @@ -2523,8 +2341,6 @@ with .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: valgrind-options option -.\" valgrind-options option: mysql-test-run.pl \fB\-\-valgrind\-option=\fR\fB\fIstr\fR\fR .sp Extra options to pass to @@ -2539,8 +2355,6 @@ Extra options to pass to .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: valgrind-path option -.\" valgrind-path option: mysql-test-run.pl \fB\-\-valgrind\-path=\fR\fB\fIpath\fR\fR .sp Specify the path name to the @@ -2556,8 +2370,6 @@ executable\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: vardir option -.\" vardir option: mysql-test-run.pl \fB\-\-vardir=\fR\fB\fIpath\fR\fR .sp Specify the path where files generated during the test run are stored\&. The default location is @@ -2574,8 +2386,6 @@ will be set to the path for this directory, whether it has the default value or .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: verbose option -.\" verbose option: mysql-test-run.pl \fB\-\-verbose\fR .sp Give more verbose output regarding test execution\&. Use the option twice to get even more output\&. Note that the output generated within each test case is not affected\&. @@ -2589,8 +2399,6 @@ Give more verbose output regarding test execution\&. Use the option twice to get .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: verbose-restart option -.\" verbose-restart option: mysql-test-run.pl \fB\-\-verbose\-restart\fR .sp Write when and why servers are restarted between test cases\&. @@ -2604,8 +2412,6 @@ Write when and why servers are restarted between test cases\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: view-protocol option -.\" view-protocol option: mysql-test-run.pl \fB\-\-view\-protocol\fR .sp Pass the @@ -2622,8 +2428,6 @@ option to .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: vs-config option -.\" vs-config option: mysql-test-run.pl \fB\-\-vs\-config=\fR\fB\fIconfig_val\fR\fR .sp Specify the configuration used to build MySQL (for example, @@ -2639,8 +2443,6 @@ Specify the configuration used to build MySQL (for example, .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: wait-all option -.\" wait-all option: mysql-test-run.pl \fB\-\-wait\-all\fR .sp If @@ -2658,8 +2460,6 @@ is used, wait for all servers to exit before termination\&. Otherise, it will te .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: warnings option -.\" warnings option: mysql-test-run.pl \fB\-\-warnings\fR .sp Search the server log for errors or warning after each test and report any suspicious ones; if any are found, the test will be marked as failed\&. This is the default behavior, it may be turned off with @@ -2674,8 +2474,6 @@ Search the server log for errors or warning after each test and report any suspi .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: with-ndbcluster-only option -.\" with-ndbcluster-only option: mysql-test-run.pl \fB\-\-with\-ndbcluster\-only\fR .sp Run only test cases that have diff --git a/mysql-wsrep-5.6/man/mysql.1 b/mysql-wsrep-5.6/man/mysql.1 index 9c253951..f3c703b1 100644 --- a/mysql-wsrep-5.6/man/mysql.1 +++ b/mysql-wsrep-5.6/man/mysql.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysql\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/02/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQL\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQL\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,12 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysql -.\" command-line tool -.\" tools: command-line -.\" scripts: SQL -.\" SQL scripts -.\" batch SQL files .SH "NAME" mysql \- the MySQL command\-line tool .SH "SYNOPSIS" @@ -111,10 +105,6 @@ On Unix, the client logs statements executed interactively to a history file\&. See the section called \(lqMYSQL LOGGING\(rq\&. .SH "MYSQL OPTIONS" -.\" mysql command options -.\" command options: mysql -.\" options: command-line: mysql -.\" startup parameters: mysql .PP \fBmysql\fR supports the following options, which can be specified on the command line or in the @@ -132,8 +122,6 @@ Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: help option -.\" help option: mysql \fB\-\-help\fR, \fB\-?\fR .sp @@ -148,8 +136,6 @@ Display a help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: auto-rehash option -.\" auto-rehash option: mysql \fB\-\-auto\-rehash\fR .sp Enable automatic rehashing\&. This option is on by default, which enables database, table, and column name completion\&. Use @@ -194,8 +180,6 @@ library is not available on Windows\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: auto-vertical-output option -.\" auto-vertical-output option: mysql \fB\-\-auto\-vertical\-output\fR .sp Cause result sets to be displayed vertically if they are too wide for the current window, and using normal tabular format otherwise\&. (This applies to statements terminated by @@ -212,8 +196,6 @@ or .sp -1 .IP \(bu 2.3 .\} -.\" mysql: batch option -.\" batch option: mysql \fB\-\-batch\fR, \fB\-B\fR .sp @@ -234,8 +216,6 @@ option\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: binary-mode option -.\" binary-mode option: mysql \fB\-\-binary\-mode\fR .sp This option helps when processing @@ -275,8 +255,6 @@ This option was added in MySQL 5\&.6\&.3\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: bind-address option -.\" bind-address option: mysql \fB\-\-bind\-address=\fR\fB\fIip_address\fR\fR .sp On a computer having multiple network interfaces, use this option to select which interface to use for connecting to the MySQL server\&. @@ -292,8 +270,6 @@ This option is supported beginning with MySQL 5\&.6\&.1\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: character-sets-dir option -.\" character-sets-dir option: mysql \fB\-\-character\-sets\-dir=\fR\fB\fIdir_name\fR\fR .sp The directory where character sets are installed\&. See @@ -308,8 +284,6 @@ Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: column-names option -.\" column-names option: mysql \fB\-\-column\-names\fR .sp Write column names in results\&. @@ -323,8 +297,6 @@ Write column names in results\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: column-type-info option -.\" column-type-info option: mysql \fB\-\-column\-type\-info\fR .sp Display result set metadata\&. @@ -338,8 +310,6 @@ Display result set metadata\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: comments option -.\" comments option: mysql \fB\-\-comments\fR, \fB\-c\fR .sp @@ -354,8 +324,6 @@ Whether to preserve comments in statements sent to the server\&. The default is .sp -1 .IP \(bu 2.3 .\} -.\" mysql: compress option -.\" compress option: mysql \fB\-\-compress\fR, \fB\-C\fR .sp @@ -370,8 +338,6 @@ Compress all information sent between the client and the server if both support .sp -1 .IP \(bu 2.3 .\} -.\" mysql: connect-expired-password option -.\" connect-expired-password option: mysql \fB\-\-connect\-expired\-password\fR .sp Indicate to the server that the client can handle sandbox mode if the account used to connect has an expired password\&. This can be useful for noninteractive invocations of @@ -388,8 +354,6 @@ Section\ \&6.3.6, \(lqPassword Expiration and Sandbox Mode\(rq\&.) This option w .sp -1 .IP \(bu 2.3 .\} -.\" mysql: database option -.\" database option: mysql \fB\-\-database=\fR\fB\fIdb_name\fR\fR, \fB\-D \fR\fB\fIdb_name\fR\fR .sp @@ -404,8 +368,6 @@ The database to use\&. This is useful primarily in an option file\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: debug option -.\" debug option: mysql \fB\-\-debug[=\fR\fB\fIdebug_options\fR\fR\fB]\fR, \fB\-# [\fR\fB\fIdebug_options\fR\fR\fB]\fR .sp @@ -429,8 +391,6 @@ built using this option\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: debug-check option -.\" debug-check option: mysql \fB\-\-debug\-check\fR .sp Print some debugging information when the program exits\&. @@ -444,8 +404,6 @@ Print some debugging information when the program exits\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: debug-info option -.\" debug-info option: mysql \fB\-\-debug\-info\fR, \fB\-T\fR .sp @@ -460,8 +418,6 @@ Print debugging information and memory and CPU usage statistics when the program .sp -1 .IP \(bu 2.3 .\} -.\" mysql: default-auth option -.\" default-auth option: mysql \fB\-\-default\-auth=\fR\fB\fIplugin\fR\fR .sp A hint about the client\-side authentication plugin to use\&. See @@ -476,24 +432,19 @@ Section\ \&6.3.7, \(lqPluggable Authentication\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: default-character-set option -.\" default-character-set option: mysql \fB\-\-default\-character\-set=\fR\fB\fIcharset_name\fR\fR .sp Use \fIcharset_name\fR as the default character set for the client and connection\&. .sp -A common issue that can occur when the operating system uses -utf8 -or another multibyte character set is that output from the +This option can be useful if the operating system uses one character set and the \fBmysql\fR -client is formatted incorrectly, due to the fact that the MySQL client uses the -latin1 -character set by default\&. You can usually fix such issues by using this option to force the client to use the system character set instead\&. +client by default uses another\&. In this case, output may be formatted incorrectly\&. You can usually fix such issues by using this option to force the client to use the system character set instead\&. .sp -See -Section\ \&10.5, \(lqCharacter Set Configuration\(rq, for more information\&. +For more information, see +Section\ \&10.1.5, \(lqConnection Character Sets and Collations\(rq, and +Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. .RE .sp .RS 4 @@ -504,8 +455,6 @@ Section\ \&10.5, \(lqCharacter Set Configuration\(rq, for more information\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: defaults-extra-file option -.\" defaults-extra-file option: mysql \fB\-\-defaults\-extra\-file=\fR\fB\fIfile_name\fR\fR .sp Read this option file after the global option file but (on Unix) before the user option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. @@ -521,8 +470,6 @@ is interpreted relative to the current directory if given as a relative path nam .sp -1 .IP \(bu 2.3 .\} -.\" mysql: defaults-file option -.\" defaults-file option: mysql \fB\-\-defaults\-file=\fR\fB\fIfile_name\fR\fR .sp Use only the given option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. @@ -538,8 +485,6 @@ is interpreted relative to the current directory if given as a relative path nam .sp -1 .IP \(bu 2.3 .\} -.\" mysql: defaults-group-suffix option -.\" defaults-group-suffix option: mysql \fB\-\-defaults\-group\-suffix=\fR\fB\fIstr\fR\fR .sp Read not only the usual option groups, but also groups with the usual names and a suffix of @@ -568,8 +513,6 @@ groups\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: delimiter option -.\" delimiter option: mysql \fB\-\-delimiter=\fR\fB\fIstr\fR\fR .sp Set the statement delimiter\&. The default is the semicolon character (\(lq;\(rq)\&. @@ -583,8 +526,6 @@ Set the statement delimiter\&. The default is the semicolon character (\(lq;\(rq .sp -1 .IP \(bu 2.3 .\} -.\" mysql: disable named commands -.\" disable named command: mysql \fB\-\-disable\-named\-commands\fR .sp Disable named commands\&. Use the @@ -605,14 +546,12 @@ the section called \(lqMYSQL COMMANDS\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: enable-cleartext-plugin option -.\" enable-cleartext-plugin option: mysql \fB\-\-enable\-cleartext\-plugin\fR .sp Enable the mysql_clear_password cleartext authentication plugin\&. (See -Section\ \&6.4.1.7, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) This option was added in MySQL 5\&.6\&.7\&. +Section\ \&6.5.1.7, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) This option was added in MySQL 5\&.6\&.7\&. .RE .sp .RS 4 @@ -623,8 +562,6 @@ Section\ \&6.4.1.7, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) .sp -1 .IP \(bu 2.3 .\} -.\" mysql: execute option -.\" execute option: mysql \fB\-\-execute=\fR\fB\fIstatement\fR\fR, \fB\-e \fR\fB\fIstatement\fR\fR .sp @@ -643,8 +580,6 @@ does not use the history file\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: force option -.\" force option: mysql \fB\-\-force\fR, \fB\-f\fR .sp @@ -659,8 +594,6 @@ Continue even if an SQL error occurs\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: histignore option -.\" histignore option: mysql \fB\-\-histignore\fR .sp A colon\-separated list of one or more patterns specifying statements to ignore for logging purposes\&. These patterns are added to the default pattern list ("*IDENTIFIED*:*PASSWORD*")\&. The value specified for this option affects logging of statements written to the history file\&. For more information, see @@ -675,8 +608,6 @@ the section called \(lqMYSQL LOGGING\(rq\&. This option was added in MySQL 5\&.6 .sp -1 .IP \(bu 2.3 .\} -.\" mysql: host option -.\" host option: mysql \fB\-\-host=\fR\fB\fIhost_name\fR\fR, \fB\-h \fR\fB\fIhost_name\fR\fR .sp @@ -691,8 +622,6 @@ Connect to the MySQL server on the given host\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: html option -.\" html option: mysql \fB\-\-html\fR, \fB\-H\fR .sp @@ -707,8 +636,6 @@ Produce HTML output\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: ignore-spaces option -.\" ignore-spaces option: mysql \fB\-\-ignore\-spaces\fR, \fB\-i\fR .sp @@ -726,8 +653,6 @@ Section\ \&5.1.7, \(lqServer SQL Modes\(rq)\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: init-command option -.\" init-command option: mysql \fB\-\-init\-command=str\fR .sp SQL statement to execute after connecting to the server\&. If auto\-reconnect is enabled, the statement is executed again after reconnection occurs\&. @@ -741,8 +666,6 @@ SQL statement to execute after connecting to the server\&. If auto\-reconnect is .sp -1 .IP \(bu 2.3 .\} -.\" mysql: line-numbers option -.\" line-numbers option: mysql \fB\-\-line\-numbers\fR .sp Write line numbers for errors\&. Disable this with @@ -757,8 +680,6 @@ Write line numbers for errors\&. Disable this with .sp -1 .IP \(bu 2.3 .\} -.\" mysql: local-infile option -.\" local-infile option: mysql \fB\-\-local\-infile[={0|1}]\fR .sp Enable or disable @@ -783,8 +704,6 @@ has no effect if the server does not also support it\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: login-path option -.\" login-path option: mysql \fB\-\-login\-path=\fR\fB\fIname\fR\fR .sp Read options from the named login path in the @@ -805,8 +724,6 @@ utility\&. See .sp -1 .IP \(bu 2.3 .\} -.\" mysql: named-commands option -.\" named-commands option: mysql \fB\-\-named\-commands\fR, \fB\-G\fR .sp @@ -830,8 +747,6 @@ the section called \(lqMYSQL COMMANDS\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: no-auto-rehash option -.\" no-auto-rehash option: mysql \fB\-\-no\-auto\-rehash\fR, \fB\-A\fR .sp @@ -848,8 +763,6 @@ This has the same effect as .sp -1 .IP \(bu 2.3 .\} -.\" mysql: no-beep option -.\" no-beep option: mysql \fB\-\-no\-beep\fR, \fB\-b\fR .sp @@ -864,8 +777,6 @@ Do not beep when errors occur\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: no-defaults option -.\" no-defaults option: mysql \fB\-\-no\-defaults\fR .sp Do not read any option files\&. If program startup fails due to reading unknown options from an option file, @@ -891,8 +802,6 @@ utility\&. See .sp -1 .IP \(bu 2.3 .\} -.\" mysql: one-database option -.\" one-database option: mysql \fB\-\-one\-database\fR, \fB\-o\fR .sp @@ -995,8 +904,6 @@ statement names a table in a different database\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: pager option -.\" pager option: mysql \fB\-\-pager[=\fR\fB\fIcommand\fR\fR\fB]\fR .sp Use the given command for paging query output\&. If the command is omitted, the default pager is the value of your @@ -1017,8 +924,6 @@ the section called \(lqMYSQL COMMANDS\(rq, discusses output paging further\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: password option -.\" password option: mysql \fB\-\-password[=\fR\fB\fIpassword\fR\fR\fB]\fR, \fB\-p[\fR\fB\fIpassword\fR\fR\fB]\fR .sp @@ -1046,8 +951,6 @@ Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can .sp -1 .IP \(bu 2.3 .\} -.\" mysql: pipe option -.\" pipe option: mysql \fB\-\-pipe\fR, \fB\-W\fR .sp @@ -1062,8 +965,6 @@ On Windows, connect to the server using a named pipe\&. This option applies only .sp -1 .IP \(bu 2.3 .\} -.\" mysql: plugin-dir option -.\" plugin-dir option: mysql \fB\-\-plugin\-dir=\fR\fB\fIdir_name\fR\fR .sp The directory in which to look for plugins\&. Specify this option if the @@ -1082,9 +983,6 @@ Section\ \&6.3.7, \(lqPluggable Authentication\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: port option -.\" port option: mysql -.\" TCP/IP \fB\-\-port=\fR\fB\fIport_num\fR\fR, \fB\-P \fR\fB\fIport_num\fR\fR .sp @@ -1099,8 +997,6 @@ The TCP/IP port number to use for the connection\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: print-defaults option -.\" print-defaults option: mysql \fB\-\-print\-defaults\fR .sp Print the program name and all options that it gets from option files\&. @@ -1114,8 +1010,6 @@ Print the program name and all options that it gets from option files\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: prompt option -.\" prompt option: mysql \fB\-\-prompt=\fR\fB\fIformat_str\fR\fR .sp Set the prompt to the specified format\&. The default is @@ -1131,8 +1025,6 @@ the section called \(lqMYSQL COMMANDS\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: protocol option -.\" protocol option: mysql \fB\-\-protocol={TCP|SOCKET|PIPE|MEMORY}\fR .sp The connection protocol to use for connecting to the server\&. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\&. For details on the permissible values, see @@ -1147,8 +1039,6 @@ Section\ \&4.2.2, \(lqConnecting to the MySQL Server\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: quick option -.\" quick option: mysql \fB\-\-quick\fR, \fB\-q\fR .sp @@ -1165,8 +1055,6 @@ does not use the history file\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: raw option -.\" raw option: mysql \fB\-\-raw\fR, \fB\-r\fR .sp @@ -1220,8 +1108,6 @@ CHAR(92) .sp -1 .IP \(bu 2.3 .\} -.\" mysql: reconnect option -.\" reconnect option: mysql \fB\-\-reconnect\fR .sp If the connection to the server is lost, automatically try to reconnect\&. A single reconnect attempt is made each time the connection is lost\&. To suppress reconnection behavior, use @@ -1236,10 +1122,6 @@ If the connection to the server is lost, automatically try to reconnect\&. A sin .sp -1 .IP \(bu 2.3 .\} -.\" mysql: safe-updates option -.\" safe-updates option: mysql -.\" mysql: i-am-a-dummy option -.\" i-am-a-dummy option: mysql \fB\-\-safe\-updates\fR, \fB\-\-i\-am\-a\-dummy\fR, \fB\-U\fR @@ -1262,8 +1144,6 @@ the section called \(lqMYSQL TIPS\(rq, for more information about this option\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: secure-auth option -.\" secure-auth option: mysql \fB\-\-secure\-auth\fR .sp Do not send passwords to the server in old (pre\-4\&.1) format\&. This prevents connections except for servers that use the newer password format\&. As of MySQL 5\&.6\&.7, this option is enabled by default; use @@ -1282,7 +1162,22 @@ to disable it\&. .ps -1 .br Passwords that use the pre\-4\&.1 hashing method are less secure than passwords that use the native password hashing method and should be avoided\&. Pre\-4\&.1 passwords are deprecated and support for them will be removed in a future MySQL release\&. For account upgrade instructions, see -Section\ \&6.4.1.3, \(lqMigrating Away from Pre-4.1 Password Hashing and the mysql_old_password Plugin\(rq\&. +Section\ \&6.5.1.3, \(lqMigrating Away from Pre-4.1 Password Hashing and the mysql_old_password Plugin\(rq\&. +.sp .5v +.RE +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +This option is deprecated and will be removed in a future release\&. As of MySQL 5\&.7\&.5, it is always enabled and attempting to disable it produces an error\&. .sp .5v .RE .RE @@ -1295,8 +1190,6 @@ Section\ \&6.4.1.3, \(lqMigrating Away from Pre-4.1 Password Hashing and the mys .sp -1 .IP \(bu 2.3 .\} -.\" mysql: server-public-key-path option -.\" server-public-key-path option: mysql \fB\-\-server\-public\-key\-path=\fR\fBfile_name\fR .sp The path name to a file containing the server RSA public key\&. The file must be in PEM format\&. The public key is used for RSA encryption of the client password for connections to the server made using accounts that authenticate with the @@ -1308,7 +1201,7 @@ The server sends the public key to the client as needed, so it is not necessary For additional discussion regarding use of the sha256_password plugin, including how to get the RSA public key, see -Section\ \&6.4.1.4, \(lqThe SHA-256 Authentication Plugin\(rq\&. +Section\ \&6.5.1.4, \(lqThe SHA-256 Authentication Plugin\(rq\&. .sp This option is available only if MySQL was built using OpenSSL\&. It was added in MySQL 5\&.6\&.6 under the name \fB\-\-server\-public\-key\fR @@ -1324,8 +1217,6 @@ and renamed in 5\&.6\&.7 to .sp -1 .IP \(bu 2.3 .\} -.\" mysql: shared-memory-base-name option -.\" shared-memory-base-name option: mysql \fB\-\-shared\-memory\-base\-name=\fR\fB\fIname\fR\fR .sp On Windows, the shared\-memory name to use, for connections made using shared memory to a local server\&. The default value is @@ -1344,8 +1235,6 @@ option to enable shared\-memory connections\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: show-warnings option -.\" show-warnings option: mysql \fB\-\-show\-warnings\fR .sp Cause warnings to be shown after each statement if there are any\&. This option applies to interactive and batch mode\&. @@ -1359,8 +1248,6 @@ Cause warnings to be shown after each statement if there are any\&. This option .sp -1 .IP \(bu 2.3 .\} -.\" mysql: sigint-ignore option -.\" sigint-ignore option: mysql \fB\-\-sigint\-ignore\fR .sp Ignore @@ -1377,8 +1264,6 @@ Control+C)\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: silent option -.\" silent option: mysql \fB\-\-silent\fR, \fB\-s\fR .sp @@ -1397,8 +1282,6 @@ option\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: skip-column-names option -.\" skip-column-names option: mysql \fB\-\-skip\-column\-names\fR, \fB\-N\fR .sp @@ -1413,8 +1296,6 @@ Do not write column names in results\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: skip-line-numbers option -.\" skip-line-numbers option: mysql \fB\-\-skip\-line\-numbers\fR, \fB\-L\fR .sp @@ -1429,8 +1310,6 @@ Do not write line numbers for errors\&. Useful when you want to compare result f .sp -1 .IP \(bu 2.3 .\} -.\" mysql: socket option -.\" socket option: mysql \fB\-\-socket=\fR\fB\fIpath\fR\fR, \fB\-S \fR\fB\fIpath\fR\fR .sp @@ -1446,14 +1325,12 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi .sp -1 .IP \(bu 2.3 .\} -.\" mysql: SSL options -.\" SSL options: mysql \fB\-\-ssl*\fR .sp Options that begin with \fB\-\-ssl\fR specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See -Section\ \&6.3.9.5, \(lqCommand Options for Secure Connections\(rq\&. +Section\ \&6.4.5, \(lqCommand Options for Secure Connections\(rq\&. .RE .sp .RS 4 @@ -1464,8 +1341,6 @@ Section\ \&6.3.9.5, \(lqCommand Options for Secure Connections\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: table option -.\" table option: mysql \fB\-\-table\fR, \fB\-t\fR .sp @@ -1480,8 +1355,6 @@ Display output in table format\&. This is the default for interactive use, but c .sp -1 .IP \(bu 2.3 .\} -.\" mysql: tee option -.\" tee option: mysql \fB\-\-tee=\fR\fB\fIfile_name\fR\fR .sp Append a copy of output to the given file\&. This option works only in interactive mode\&. @@ -1496,8 +1369,6 @@ the section called \(lqMYSQL COMMANDS\(rq, discusses tee files further\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: unbuffered option -.\" unbuffered option: mysql \fB\-\-unbuffered\fR, \fB\-n\fR .sp @@ -1512,8 +1383,6 @@ Flush the buffer after each query\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: user option -.\" user option: mysql \fB\-\-user=\fR\fB\fIuser_name\fR\fR, \fB\-u \fR\fB\fIuser_name\fR\fR .sp @@ -1528,8 +1397,6 @@ The MySQL user name to use when connecting to the server\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: verbose option -.\" verbose option: mysql \fB\-\-verbose\fR, \fB\-v\fR .sp @@ -1546,8 +1413,6 @@ produces table output format even in batch mode\&.) .sp -1 .IP \(bu 2.3 .\} -.\" mysql: version option -.\" version option: mysql \fB\-\-version\fR, \fB\-V\fR .sp @@ -1562,8 +1427,6 @@ Display version information and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: vertical option -.\" vertical option: mysql \fB\-\-vertical\fR, \fB\-E\fR .sp @@ -1579,8 +1442,6 @@ Print query output rows vertically (one line per column value)\&. Without this o .sp -1 .IP \(bu 2.3 .\} -.\" mysql: wait option -.\" wait option: mysql \fB\-\-wait\fR, \fB\-w\fR .sp @@ -1595,8 +1456,6 @@ If the connection cannot be established, wait and retry instead of aborting\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: xml option -.\" xml option: mysql \fB\-\-xml\fR, \fB\-X\fR .sp @@ -1666,8 +1525,6 @@ You can also set the following variables by using .sp -1 .IP \(bu 2.3 .\} -.\" timeout: connect_timeout variable -.\" connect_timeout variable connect_timeout .sp The number of seconds before connection timeout\&. (Default value is @@ -1682,7 +1539,6 @@ The number of seconds before connection timeout\&. (Default value is .sp -1 .IP \(bu 2.3 .\} -.\" max_allowed_packet variable max_allowed_packet .sp The maximum size of the buffer for client/server communication\&. The default is 16MB, the maximum is 1GB\&. @@ -1696,7 +1552,6 @@ The maximum size of the buffer for client/server communication\&. The default is .sp -1 .IP \(bu 2.3 .\} -.\" max_join_size variable max_join_size .sp The automatic limit for rows in a join when using @@ -1711,7 +1566,6 @@ The automatic limit for rows in a join when using .sp -1 .IP \(bu 2.3 .\} -.\" net_buffer_length variable net_buffer_length .sp The buffer size for TCP/IP and socket communication\&. (Default value is 16KB\&.) @@ -1725,7 +1579,6 @@ The buffer size for TCP/IP and socket communication\&. (Default value is 16KB\&. .sp -1 .IP \(bu 2.3 .\} -.\" select_limit variable select_limit .sp The automatic limit for @@ -1745,7 +1598,6 @@ or at the mysql> prompt: -.\" mysql commands: list of .sp .if n \{\ .RS 4 @@ -1816,8 +1668,6 @@ comments is not supported\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: help command -.\" help command: mysql help [\fIarg\fR], \eh [\fIarg\fR], \e? [\fIarg\fR], @@ -1832,7 +1682,7 @@ help command, \fBmysql\fR uses it as a search string to access server\-side help from the contents of the MySQL Reference Manual\&. For more information, see -the section called \(lqMYSQL SERVER-SIDE HELP\(rq\&. +the section called \(lqMYSQL SERVER\-SIDE HELP\(rq\&. .RE .sp .RS 4 @@ -1843,8 +1693,6 @@ the section called \(lqMYSQL SERVER-SIDE HELP\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: charset command -.\" charset command: mysql charset \fIcharset_name\fR, \eC \fIcharset_name\fR .sp @@ -1863,8 +1711,6 @@ is run with auto\-reconnect enabled (which is not recommended), because the spec .sp -1 .IP \(bu 2.3 .\} -.\" mysql: clear command -.\" clear command: mysql clear, \ec .sp @@ -1879,8 +1725,6 @@ Clear the current input\&. Use this if you change your mind about executing the .sp -1 .IP \(bu 2.3 .\} -.\" mysql: connect command -.\" connect command: mysql connect [\fIdb_name\fR \fIhost_name\fR]], \er [\fIdb_name\fR \fIhost_name\fR]] .sp @@ -1895,8 +1739,6 @@ Reconnect to the server\&. The optional database name and host name arguments ma .sp -1 .IP \(bu 2.3 .\} -.\" mysql: delimiter command -.\" delimiter command: mysql delimiter \fIstr\fR, \ed \fIstr\fR .sp @@ -1937,8 +1779,6 @@ Section\ \&20.1, \(lqDefining Stored Programs\(rq)\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: edit command -.\" edit command: mysql edit, \ee .sp @@ -1965,8 +1805,6 @@ command works only in Unix\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: ego command -.\" ego command: mysql ego, \eG .sp @@ -1981,8 +1819,6 @@ Send the current statement to the server to be executed and display the result u .sp -1 .IP \(bu 2.3 .\} -.\" mysql: exit command -.\" exit command: mysql exit, \eq .sp @@ -1998,8 +1834,6 @@ Exit .sp -1 .IP \(bu 2.3 .\} -.\" mysql: go command -.\" go command: mysql go, \eg .sp @@ -2014,8 +1848,6 @@ Send the current statement to the server to be executed\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: nopager command -.\" nopager command: mysql nopager, \en .sp @@ -2035,8 +1867,6 @@ command works only in Unix\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: notee command -.\" notee command: mysql notee, \et .sp @@ -2052,8 +1882,6 @@ tee\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: nowarning command -.\" nowarning command: mysql nowarning, \ew .sp @@ -2068,8 +1896,6 @@ Disable display of warnings after each statement\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: pager command -.\" pager command: mysql pager [\fIcommand\fR], \eP [\fIcommand\fR] .sp @@ -2108,8 +1934,6 @@ for browsing output in some situations\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: print command -.\" print command: mysql print, \ep .sp @@ -2124,8 +1948,6 @@ Print the current input statement without executing it\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: prompt command -.\" prompt command: mysql prompt [\fIstr\fR], \eR [\fIstr\fR] .sp @@ -2149,8 +1971,6 @@ mysql>\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: quit command -.\" quit command: mysql quit, \eq .sp @@ -2166,8 +1986,6 @@ Exit .sp -1 .IP \(bu 2.3 .\} -.\" mysql: rehash command -.\" rehash command: mysql rehash, \e# .sp @@ -2184,8 +2002,6 @@ option\&.) .sp -1 .IP \(bu 2.3 .\} -.\" mysql: source command -.\" source command: mysql source \fIfile_name\fR, \e\&. \fIfile_name\fR .sp @@ -2203,8 +2019,6 @@ or .sp -1 .IP \(bu 2.3 .\} -.\" mysql: status command -.\" status command: mysql status, \es .sp @@ -2225,8 +2039,6 @@ variables that affect your queries\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: system command -.\" system command: mysql system \fIcommand\fR, \e! \fIcommand\fR .sp @@ -2245,8 +2057,6 @@ command works only in Unix\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: tee command -.\" tee command: mysql tee [\fIfile_name\fR], \eT [\fIfile_name\fR] .sp @@ -2276,8 +2086,6 @@ again re\-enables logging\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: use command -.\" use command: mysql use \fIdb_name\fR, \eu \fIdb_name\fR .sp @@ -2294,8 +2102,6 @@ as the default database\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: warnings command -.\" warnings command: mysql warnings, \eW .sp @@ -2460,7 +2266,6 @@ does not log quite that much\&. Additionally, tee file logging can be turned on and off interactively from within \fBmysql\fR\&. This is useful when you want to log some queries to a file, but not others\&. -.\" mysql prompt command .PP The prompt @@ -2786,15 +2591,6 @@ mysql> .\} .RE .SH "MYSQL LOGGING" -.\" MYSQL_HISTFILE environment variable -.\" environment variable: MYSQL_HISTFILE -.\" MYSQL_HISTIGNORE environment variable -.\" environment variable: MYSQL_HISTIGNORE -.\" HOME environment variable -.\" environment variable: HOME -.\" mysql history file -.\" command-line history: mysql -.\" .mysql_history file .PP On Unix, the \fBmysql\fR @@ -3005,7 +2801,7 @@ shell> \fBln \-s /dev/null $HOME/\&.mysql_history\fR .RE .\} .RE -.SH "MYSQL SERVER-SIDE HELP" +.SH "MYSQL SERVER\-SIDE HELP" .sp .if n \{\ .RS 4 @@ -3024,7 +2820,7 @@ command, uses it as a search string to access server\-side help from the contents of the MySQL Reference Manual\&. The proper operation of this command requires that the help tables in the mysql database be initialized with help topic information (see -Section\ \&5.1.10, \(lqServer-Side Help\(rq)\&. +Section\ \&5.1.9, \(lqServer-Side Help\(rq)\&. .PP If there is no match for the search string, the search fails: .sp @@ -3149,15 +2945,6 @@ topics: .RE .\} .SH "EXECUTING SQL STATEMENTS FROM A TEXT FILE" -.\" executing SQL statements from text files -.\" importing: data -.\" data: importing -.\" files: text -.\" text files: importing -.\" source (mysql client command) -.\" \. (mysql client command) -.\" mysql source (command for reading from text files) -.\" mysql \. (command for reading from text files) .PP The \fBmysql\fR @@ -3445,7 +3232,6 @@ Monty .RE .\} .SS "Using the \-\-safe\-updates Option" -.\" safe-updates option .PP For beginners, a useful startup option is \fB\-\-safe\-updates\fR diff --git a/mysql-wsrep-5.6/man/mysql.server.1 b/mysql-wsrep-5.6/man/mysql.server.1 index a31ebd9d..ee23019f 100644 --- a/mysql-wsrep-5.6/man/mysql.server.1 +++ b/mysql-wsrep-5.6/man/mysql.server.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysql.server\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/02/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQL\&.SERVER\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQL\&.SERVER\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysql.server .SH "NAME" mysql.server \- MySQL server startup script .SH "SYNOPSIS" @@ -212,7 +211,6 @@ sections of option files\&. For backward compatibility, it also reads [mysql_server] sections, but to be current you should rename such sections to [mysql\&.server]\&. -.\" changing: socket location .PP You can add options for \fBmysql\&.server\fR @@ -258,8 +256,6 @@ as command\-line arguments\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql.server: basedir option -.\" basedir option: mysql.server \fB\-\-basedir=\fR\fB\fIdir_name\fR\fR .sp The path to the MySQL installation directory\&. @@ -273,8 +269,6 @@ The path to the MySQL installation directory\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql.server: datadir option -.\" datadir option: mysql.server \fB\-\-datadir=\fR\fB\fIdir_name\fR\fR .sp The path to the MySQL data directory\&. @@ -288,8 +282,6 @@ The path to the MySQL data directory\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql.server: pid-file option -.\" pid-file option: mysql.server \fB\-\-pid\-file=\fR\fB\fIfile_name\fR\fR .sp The path name of the file in which the server should write its process ID\&. @@ -328,8 +320,6 @@ groups\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql.server: service-startup-timeout option -.\" service-startup-timeout option: mysql.server \fB\-\-service\-startup\-timeout=\fR\fB\fIseconds\fR\fR .sp How long in seconds to wait for confirmation of server startup\&. If the server does not start within this time, diff --git a/mysql-wsrep-5.6/man/mysql_client_test.1 b/mysql-wsrep-5.6/man/mysql_client_test.1 index 1c6a0288..25fa050e 100644 --- a/mysql-wsrep-5.6/man/mysql_client_test.1 +++ b/mysql-wsrep-5.6/man/mysql_client_test.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysql_client_test\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/02/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL .\" Language: English .\" -.TH "\FBMYSQL_CLIENT_TEST" "1" "03/02/2016" "MySQL" "MySQL Database System" +.TH "\FBMYSQL_CLIENT_TEST" "1" "08/25/2016" "MySQL" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,8 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysql_client_test -.\" mysql_client_test_embedded .SH "NAME" mysql_client_test \- test client API .br @@ -68,8 +66,6 @@ supports the following options: .sp -1 .IP \(bu 2.3 .\} -.\" mysql_client_test: help option -.\" help option: mysql_client_test \fB\-\-help\fR, \fB\-?\fR .sp @@ -85,8 +81,6 @@ Display a help message and exit\&. .IP \(bu 2.3 .\} \fB\-\-basedir=\fR\fB\fIdir_name\fR\fR, -.\" mysql_client_test: basedir option -.\" basedir option: mysql_client_test \fB\-b \fR\fB\fIdir_name\fR\fR .sp The base directory for the tests\&. @@ -101,8 +95,6 @@ The base directory for the tests\&. .IP \(bu 2.3 .\} \fB\-\-count=\fR\fB\fIcount\fR\fR, -.\" mysql_client_test: count option -.\" count option: mysql_client_test \fB\-t \fR\fB\fIcount\fR\fR .sp The number of times to execute the tests\&. @@ -116,8 +108,6 @@ The number of times to execute the tests\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_client_test: database option -.\" database option: mysql_client_test \fB\-\-database=\fR\fB\fIdb_name\fR\fR, \fB\-D \fR\fB\fIdb_name\fR\fR .sp @@ -132,8 +122,6 @@ The database to use\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_client_test: debug option -.\" debug option: mysql_client_test \fB\-\-debug[=\fR\fB\fIdebug_options\fR\fR\fB]\fR, \fB\-#[\fR\fB\fIdebug_options\fR\fR\fB]\fR .sp @@ -152,8 +140,6 @@ value is .IP \(bu 2.3 .\} \fB\-\-getopt\-ll\-test=\fR\fB\fIoption\fR\fR, -.\" mysql_client_test: getopt-ll-test option -.\" getopt-ll-test option: mysql_client_test \fB\-g \fR\fB\fIoption\fR\fR .sp Option to use for testing bugs in the @@ -169,8 +155,6 @@ library\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_client_test: host option -.\" host option: mysql_client_test \fB\-\-host=\fR\fB\fIhost_name\fR\fR, \fB\-h \fR\fB\fIhost_name\fR\fR .sp @@ -185,8 +169,6 @@ Connect to the MySQL server on the given host\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_client_test: password option -.\" password option: mysql_client_test \fB\-\-password[=\fR\fB\fIpassword\fR\fR\fB]\fR, \fB\-p[\fR\fB\fIpassword\fR\fR\fB]\fR .sp @@ -195,8 +177,6 @@ The password to use when connecting to the server\&. If you use the short option have a space between the option and the password\&. If you omit the \fIpassword\fR value following the -.\" mysql_client_test: password option -.\" password option: mysql_client_test \fB\-\-password\fR or \fB\-p\fR @@ -211,8 +191,6 @@ option on the command line, you are prompted for one\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_client_test: port option -.\" port option: mysql_client_test \fB\-\-port=\fR\fB\fIport_num\fR\fR, \fB\-P \fR\fB\fIport_num\fR\fR .sp @@ -228,8 +206,6 @@ The TCP/IP port number to use for the connection\&. .IP \(bu 2.3 .\} \fB\-\-server\-arg=\fR\fB\fIarg\fR\fR, -.\" mysql_client_test: server-arg option -.\" server-arg option: mysql_client_test \fB\-A \fR\fB\fIarg\fR\fR .sp Argument to send to the embedded server\&. @@ -257,8 +233,6 @@ Show all test names\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_client_test: silent option -.\" silent option: mysql_client_test \fB\-\-silent\fR, \fB\-s\fR .sp @@ -273,8 +247,6 @@ Be more silent\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_client_test: socket option -.\" socket option: mysql_client_test \fB\-\-socket=\fR\fB\fIpath\fR\fR, \fB\-S \fR\fB\fIpath\fR\fR .sp @@ -308,8 +280,6 @@ may optionally behave in a different way than if called manually, for example by .sp -1 .IP \(bu 2.3 .\} -.\" mysql_client_test: user option -.\" user option: mysql_client_test \fB\-\-user=\fR\fB\fIuser_name\fR\fR, \fB\-u \fR\fB\fIuser_name\fR\fR .sp @@ -325,8 +295,6 @@ The MySQL user name to use when connecting to the server\&. .IP \(bu 2.3 .\} \fB\-v \fR\fB\fIdir_name\fR\fR, -.\" mysql_client_test: vardir option -.\" vardir option: mysql_client_test \fB\-\-vardir=\fR\fB\fIdir_name\fR\fR .sp The data directory for tests\&. The default is diff --git a/mysql-wsrep-5.6/man/mysql_client_test_embedded.1 b/mysql-wsrep-5.6/man/mysql_client_test_embedded.1 index 21d9d77b..44fb5173 100644 --- a/mysql-wsrep-5.6/man/mysql_client_test_embedded.1 +++ b/mysql-wsrep-5.6/man/mysql_client_test_embedded.1 @@ -1 +1 @@ -.so man/mysql_client_test.1 +.so mysql_client_test.1 diff --git a/mysql-wsrep-5.6/man/mysql_config.1 b/mysql-wsrep-5.6/man/mysql_config.1 index b9978958..926f47c3 100644 --- a/mysql-wsrep-5.6/man/mysql_config.1 +++ b/mysql-wsrep-5.6/man/mysql_config.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysql_config\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/02/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQL_CONFIG\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQL_CONFIG\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysql_config .SH "NAME" mysql_config \- display options for compiling clients .SH "SYNOPSIS" @@ -49,8 +48,6 @@ supports the following options\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_config: cflags option -.\" cflags option: mysql_config \fB\-\-cflags\fR .sp C Compiler flags to find include files and critical compiler flags and defines used when compiling the @@ -68,8 +65,6 @@ for more portable options that contain only include paths\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_config: cxxflags option -.\" cxxflags option: mysql_config \fB\-\-cxxflags\fR .sp Like @@ -84,8 +79,6 @@ Like .sp -1 .IP \(bu 2.3 .\} -.\" mysql_config: include option -.\" include option: mysql_config \fB\-\-include\fR .sp Compiler options to find MySQL include files\&. @@ -99,10 +92,6 @@ Compiler options to find MySQL include files\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_config: libmysqld-libs option -.\" libmysqld-libs option: mysql_config -.\" mysql_config: embedded option -.\" embedded option: mysql_config \fB\-\-libmysqld\-libs\fR, \fB\-\-embedded\fR .sp @@ -117,8 +106,6 @@ Libraries and options required to link with the MySQL embedded server\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_config: libs option -.\" libs option: mysql_config \fB\-\-libs\fR .sp Libraries and options required to link with the MySQL client library\&. @@ -132,8 +119,6 @@ Libraries and options required to link with the MySQL client library\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_config: libs_r option -.\" libs_r option: mysql_config \fB\-\-libs_r\fR .sp Libraries and options required to link with the thread\-safe MySQL client library\&. In MySQL 5\&.6, all client libraries are thread\-safe, so this option need not be used\&. The @@ -149,8 +134,6 @@ option can be used in all cases\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_config: plugindir option -.\" plugindir option: mysql_config \fB\-\-plugindir\fR .sp The default plugin directory path name, defined when configuring MySQL\&. @@ -164,9 +147,6 @@ The default plugin directory path name, defined when configuring MySQL\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_config: port option -.\" port option: mysql_config -.\" TCP/IP \fB\-\-port\fR .sp The default TCP/IP port number, defined when configuring MySQL\&. @@ -180,8 +160,6 @@ The default TCP/IP port number, defined when configuring MySQL\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_config: socket option -.\" socket option: mysql_config \fB\-\-socket\fR .sp The default Unix socket file, defined when configuring MySQL\&. @@ -195,8 +173,6 @@ The default Unix socket file, defined when configuring MySQL\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_config: variable option -.\" variable option: mysql_config \fB\-\-variable=\fR\fB\fIvar_name\fR\fR .sp Display the value of the named configuration variable\&. Permitted @@ -218,8 +194,6 @@ plugindir .sp -1 .IP \(bu 2.3 .\} -.\" mysql_config: version option -.\" version option: mysql_config \fB\-\-version\fR .sp Version number for the MySQL distribution\&. diff --git a/mysql-wsrep-5.6/man/mysql_config_editor.1 b/mysql-wsrep-5.6/man/mysql_config_editor.1 index b3131eda..a225cced 100644 --- a/mysql-wsrep-5.6/man/mysql_config_editor.1 +++ b/mysql-wsrep-5.6/man/mysql_config_editor.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysql_config_editor\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/02/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQL_CONFIG_EDIT" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQL_CONFIG_EDIT" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,8 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysql_config_editor -.\" .mylogin.cnf file .SH "NAME" mysql_config_editor \- configure authentication information for connecting to MySQL server .SH "SYNOPSIS" @@ -78,8 +76,6 @@ When you invoke a client program to connect to the server, the client uses \&.mylogin\&.cnf in conjunction with other option files\&. Its precedence is higher than other option files, but less than options specified explicitly on the client command line\&. For information about the order in which option files are used, see Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. -.\" MYSQL_TEST_LOGIN_FILE environment variable -.\" environment variable: MYSQL_TEST_LOGIN_FILE .PP To specify an alternate login path file name, set the MYSQL_TEST_LOGIN_FILE @@ -148,7 +144,7 @@ groups from other option files, so it reads them from the login path file as wel .\} With a \fB\-\-login\-path\fR -option, client programs additionally read the named login path from the login path ile\&. The option groups read from other option files remain the same\&. Consider this command: +option, client programs additionally read the named login path from the login path file\&. The option groups read from other option files remain the same\&. Consider this command: .sp .if n \{\ .RS 4 @@ -501,8 +497,6 @@ mysql_config_editor Commands and Command-Specific Options\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_config_editor: help option -.\" help option: mysql_config_editor \fB\-\-help\fR, \fB\-?\fR .sp @@ -534,8 +528,6 @@ shell> \fBmysql_config_editor \fR\fB\fIcommand\fR\fR\fB \-\-help\fR .sp -1 .IP \(bu 2.3 .\} -.\" mysql_config_editor: debug option -.\" debug option: mysql_config_editor \fB\-\-debug[=\fR\fB\fIdebug_options\fR\fR\fB]\fR, \fB\-# \fR\fB\fIdebug_options\fR\fR .sp @@ -554,8 +546,6 @@ d:t:o,/tmp/mysql_config_editor\&.trace\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_config_editor: verbose option -.\" verbose option: mysql_config_editor \fB\-\-verbose\fR, \fB\-v\fR .sp @@ -570,8 +560,6 @@ Verbose mode\&. Print more information about what the program does\&. This optio .sp -1 .IP \(bu 2.3 .\} -.\" mysql_config_editor: version option -.\" version option: mysql_config_editor \fB\-\-version\fR, \fB\-V\fR .sp diff --git a/mysql-wsrep-5.6/man/mysql_convert_table_format.1 b/mysql-wsrep-5.6/man/mysql_convert_table_format.1 index b5f829f9..faf26db5 100644 --- a/mysql-wsrep-5.6/man/mysql_convert_table_format.1 +++ b/mysql-wsrep-5.6/man/mysql_convert_table_format.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysql_convert_table_format\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/02/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQL_CONVERT_TAB" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQL_CONVERT_TAB" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysql_convert_table_format .SH "NAME" mysql_convert_table_format \- convert tables to use a given storage engine .SH "SYNOPSIS" @@ -91,8 +90,6 @@ supports the options described in the following list\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_convert_table_format: help option -.\" help option: mysql_convert_table_format \fB\-\-help\fR .sp Display a help message and exit\&. @@ -106,8 +103,6 @@ Display a help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_convert_table_format: force option -.\" force option: mysql_convert_table_format \fB\-\-force\fR .sp Continue even if errors occur\&. @@ -121,8 +116,6 @@ Continue even if errors occur\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_convert_table_format: host option -.\" host option: mysql_convert_table_format \fB\-\-host=\fR\fB\fIhost_name\fR\fR .sp Connect to the MySQL server on the given host\&. @@ -136,8 +129,6 @@ Connect to the MySQL server on the given host\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_convert_table_format: password option -.\" password option: mysql_convert_table_format \fB\-\-password=\fR\fB\fIpassword\fR\fR .sp The password to use when connecting to the server\&. Note that the password value is not optional for this option, unlike for other MySQL programs\&. @@ -154,8 +145,6 @@ Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can .sp -1 .IP \(bu 2.3 .\} -.\" mysql_convert_table_format: port option -.\" port option: mysql_convert_table_format \fB\-\-port=\fR\fB\fIport_num\fR\fR .sp The TCP/IP port number to use for the connection\&. @@ -169,8 +158,6 @@ The TCP/IP port number to use for the connection\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_convert_table_format: socket option -.\" socket option: mysql_convert_table_format \fB\-\-socket=\fR\fB\fIpath\fR\fR .sp For connections to @@ -185,8 +172,6 @@ localhost, the Unix socket file to use\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_convert_table_format: type option -.\" type option: mysql_convert_table_format \fB\-\-type=\fR\fB\fIengine_name\fR\fR .sp Specify the storage engine that the tables should be converted to use\&. The default is @@ -202,8 +187,6 @@ if this option is not given\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_convert_table_format: user option -.\" user option: mysql_convert_table_format \fB\-\-user=\fR\fB\fIuser_name\fR\fR .sp The MySQL user name to use when connecting to the server\&. @@ -217,8 +200,6 @@ The MySQL user name to use when connecting to the server\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_convert_table_format: verbose option -.\" verbose option: mysql_convert_table_format \fB\-\-verbose\fR .sp Verbose mode\&. Print more information about what the program does\&. @@ -232,8 +213,6 @@ Verbose mode\&. Print more information about what the program does\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_convert_table_format: version option -.\" version option: mysql_convert_table_format \fB\-\-version\fR .sp Display version information and exit\&. diff --git a/mysql-wsrep-5.6/man/mysql_find_rows.1 b/mysql-wsrep-5.6/man/mysql_find_rows.1 index 36fa1071..fa34538b 100644 --- a/mysql-wsrep-5.6/man/mysql_find_rows.1 +++ b/mysql-wsrep-5.6/man/mysql_find_rows.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysql_find_rows\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/02/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQL_FIND_ROWS\F" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQL_FIND_ROWS\F" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysql_find_rows .SH "NAME" mysql_find_rows \- extract SQL statements from files .SH "SYNOPSIS" @@ -102,8 +101,6 @@ supports the following options: .sp -1 .IP \(bu 2.3 .\} -.\" mysql_find_rows: help option -.\" help option: mysql_find_rows \fB\-\-help\fR, \fB\-\-Information\fR .sp @@ -118,8 +115,6 @@ Display a help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_find_rows: regexp option -.\" regexp option: mysql_find_rows \fB\-\-regexp=\fR\fB\fIpattern\fR\fR .sp Display queries that match the pattern\&. @@ -133,8 +128,6 @@ Display queries that match the pattern\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_find_rows: rows option -.\" rows option: mysql_find_rows \fB\-\-rows=\fR\fB\fIN\fR\fR .sp Quit after displaying @@ -150,8 +143,6 @@ queries\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_find_rows: skip-use-db option -.\" skip-use-db option: mysql_find_rows \fB\-\-skip\-use\-db\fR .sp Do not include @@ -167,8 +158,6 @@ statements in the output\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_find_rows: start_row option -.\" start_row option: mysql_find_rows \fB\-\-start_row=\fR\fB\fIN\fR\fR .sp Start output from this row\&. diff --git a/mysql-wsrep-5.6/man/mysql_fix_extensions.1 b/mysql-wsrep-5.6/man/mysql_fix_extensions.1 index c28a9733..3fa5d65e 100644 --- a/mysql-wsrep-5.6/man/mysql_fix_extensions.1 +++ b/mysql-wsrep-5.6/man/mysql_fix_extensions.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysql_fix_extensions\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/02/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQL_FIX_EXTENSI" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQL_FIX_EXTENSI" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysql_fix_extensions .SH "NAME" mysql_fix_extensions \- normalize table file name extensions .SH "SYNOPSIS" diff --git a/mysql-wsrep-5.6/man/mysql_install_db.1 b/mysql-wsrep-5.6/man/mysql_install_db.1 index ebb9cb85..8b246265 100644 --- a/mysql-wsrep-5.6/man/mysql_install_db.1 +++ b/mysql-wsrep-5.6/man/mysql_install_db.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysql_install_db\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/02/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQL_INSTALL_DB\" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQL_INSTALL_DB\" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysql_install_db .SH "NAME" mysql_install_db \- initialize MySQL data directory .SH "SYNOPSIS" @@ -192,8 +191,6 @@ Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_install_db: help option -.\" help option: mysql_install_db \fB\-\-help\fR .sp Display a help message and exit\&. @@ -207,8 +204,6 @@ Display a help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_install_db: basedir option -.\" basedir option: mysql_install_db \fB\-\-basedir=\fR\fB\fIdir_name\fR\fR .sp The path to the MySQL installation directory\&. @@ -222,8 +217,6 @@ The path to the MySQL installation directory\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_install_db: builddir option -.\" builddir option: mysql_install_db \fB\-\-builddir=\fR\fB\fIdir_name\fR\fR .sp For use with @@ -239,8 +232,6 @@ and out\-of\-source builds\&. Set this to the location of the directory where th .sp -1 .IP \(bu 2.3 .\} -.\" mysql_install_db: cross-bootstrap option -.\" cross-bootstrap option: mysql_install_db \fB\-\-cross\-bootstrap\fR .sp For internal use\&. This option is used for building system tables on one host intended for another\&. @@ -254,8 +245,6 @@ For internal use\&. This option is used for building system tables on one host i .sp -1 .IP \(bu 2.3 .\} -.\" mysql_install_db: datadir option -.\" datadir option: mysql_install_db \fB\-\-datadir=\fR\fB\fIdir_name\fR\fR .sp The path to the MySQL data directory\&. Beginning with MySQL 5\&.6\&.8, @@ -271,7 +260,6 @@ is more strict about the option value\&. Only the last component of the path nam .sp -1 .IP \(bu 2.3 .\} -.\" defaults-extra-file option \fB\-\-defaults\-extra\-file=\fR\fB\fIfile_name\fR\fR .sp Read this option file after the global option file but (on Unix) before the user option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. @@ -287,7 +275,6 @@ is interpreted relative to the current directory if given as a relative path nam .sp -1 .IP \(bu 2.3 .\} -.\" defaults-file option \fB\-\-defaults\-file=\fR\fB\fIfile_name\fR\fR .sp Use only the given option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. @@ -303,8 +290,6 @@ is interpreted relative to the current directory if given as a relative path nam .sp -1 .IP \(bu 2.3 .\} -.\" mysql_install_db: force option -.\" force option: mysql_install_db \fB\-\-force\fR .sp Cause @@ -320,8 +305,6 @@ to run even if DNS does not work\&. Grant table entries normally created using h .sp -1 .IP \(bu 2.3 .\} -.\" mysql_install_db: keep-my-cnf option -.\" keep-my-cnf option: mysql_install_db \fB\-\-keep\-my\-cnf\fR .sp Tell @@ -341,8 +324,6 @@ file\&. This option was added in MySQL 5\&.6\&.20\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_install_db: ldata option -.\" ldata option: mysql_install_db \fB\-\-ldata=\fR\fB\fIdir_name\fR\fR .sp A synonym for @@ -357,7 +338,6 @@ A synonym for .sp -1 .IP \(bu 2.3 .\} -.\" no-defaults option \fB\-\-no\-defaults\fR .sp Do not read any option files\&. If program startup fails due to reading unknown options from an option file, @@ -373,8 +353,6 @@ can be used to prevent them from being read\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_install_db: random-passwords option -.\" random-passwords option: mysql_install_db \fB\-\-random\-passwords\fR .sp On Unix platforms, this option provides for more secure MySQL installation\&. Invoking @@ -406,7 +384,6 @@ flag for those accounts\&. .sp -1 .IP \(bu 2.3 .\} -.\" .mysql_secret file The initial random root password is written to the @@ -491,8 +468,6 @@ This option was added in MySQL 5\&.6\&.8\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_install_db: rpm option -.\" rpm option: mysql_install_db \fB\-\-rpm\fR .sp For internal use\&. This option is used during the MySQL installation process for install operations performed using RPM packages\&. @@ -506,8 +481,6 @@ For internal use\&. This option is used during the MySQL installation process fo .sp -1 .IP \(bu 2.3 .\} -.\" mysql_install_db: skip-name-resolve option -.\" skip-name-resolve option: mysql_install_db \fB\-\-skip\-name\-resolve\fR .sp Use IP addresses rather than host names when creating grant table entries\&. This option can be useful if your DNS does not work\&. @@ -521,8 +494,6 @@ Use IP addresses rather than host names when creating grant table entries\&. Thi .sp -1 .IP \(bu 2.3 .\} -.\" mysql_install_db: srcdir option -.\" srcdir option: mysql_install_db \fB\-\-srcdir=\fR\fB\fIdir_name\fR\fR .sp For internal use\&. This option specifies the directory under which @@ -538,8 +509,6 @@ looks for support files such as the error message file and the file for populati .sp -1 .IP \(bu 2.3 .\} -.\" mysql_install_db: user option -.\" user option: mysql_install_db \fB\-\-user=\fR\fB\fIuser_name\fR\fR .sp The system (login) user name to use for running @@ -560,8 +529,6 @@ runs using your current login name and files and directories that it creates wil .sp -1 .IP \(bu 2.3 .\} -.\" mysql_install_db: verbose option -.\" verbose option: mysql_install_db \fB\-\-verbose\fR .sp Verbose mode\&. Print more information about what the program does\&. @@ -575,8 +542,6 @@ Verbose mode\&. Print more information about what the program does\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_install_db: windows option -.\" windows option: mysql_install_db \fB\-\-windows\fR .sp For internal use\&. This option is used for creating Windows distributions\&. diff --git a/mysql-wsrep-5.6/man/mysql_plugin.1 b/mysql-wsrep-5.6/man/mysql_plugin.1 index c4550ae9..a458b0aa 100644 --- a/mysql-wsrep-5.6/man/mysql_plugin.1 +++ b/mysql-wsrep-5.6/man/mysql_plugin.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysql_plugin\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/02/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQL_PLUGIN\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQL_PLUGIN\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysql_plugin .SH "NAME" mysql_plugin \- configure MySQL server plugins .SH "SYNOPSIS" @@ -58,11 +57,11 @@ mysql\&.plugin automatically\&. For additional control over plugin activation, use \fB\-\-\fR\fB\fIplugin_name\fR\fR options named for specific plugins, as described in -Section\ \&5.1.8.1, \(lqInstalling and Uninstalling Plugins\(rq\&. +Section\ \&5.5.2, \(lqInstalling and Uninstalling Plugins\(rq\&. .PP Each invocation of \fBmysql_plugin\fR -reads a configuration file to determine how to configure the plugins contained in a single plugin library object file\&. To invoke +reads a configuration file to determine how to configure the plugins contained in a single plugin library file\&. To invoke \fBmysql_plugin\fR, use this syntax: .sp .if n \{\ @@ -120,7 +119,7 @@ plugin3 .PP The first line in the myplugins\&.ini -file is the name of the library object file, without any extension such as +file is the name of the library file, without any extension such as \&.so or \&.dll\&. The remaining lines are the names of the components to be enabled or disabled\&. Each value in the file should be on a separate line\&. Lines on which the first character is @@ -174,8 +173,6 @@ Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_plugin: help option -.\" help option: mysql_plugin \fB\-\-help\fR, \fB\-?\fR .sp @@ -190,8 +187,6 @@ Display a help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_plugin: basedir option -.\" basedir option: mysql_plugin \fB\-\-basedir=\fR\fB\fIdir_name\fR\fR, \fB\-b \fR\fB\fIdir_name\fR\fR .sp @@ -206,8 +201,6 @@ The server base directory\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_plugin: datadir option -.\" datadir option: mysql_plugin \fB\-\-datadir=\fR\fB\fIdir_name\fR\fR, \fB\-d \fR\fB\fIdir_name\fR\fR .sp @@ -222,8 +215,6 @@ The server data directory\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_plugin: my-print-defaults option -.\" my-print-defaults option: mysql_plugin \fB\-\-my\-print\-defaults=\fR\fB\fIfile_name\fR\fR, \fB\-b \fR\fB\fIfile_name\fR\fR .sp @@ -240,8 +231,6 @@ program\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_plugin: mysqld option -.\" mysqld option: mysql_plugin \fB\-\-mysqld=\fR\fB\fIfile_name\fR\fR, \fB\-b \fR\fB\fIfile_name\fR\fR .sp @@ -258,8 +247,6 @@ server\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_plugin: no-defaults option -.\" no-defaults option: mysql_plugin \fB\-\-no\-defaults\fR, \fB\-p\fR .sp @@ -278,8 +265,6 @@ With .sp -1 .IP \(bu 2.3 .\} -.\" mysql_plugin: plugin-dir option -.\" plugin-dir option: mysql_plugin \fB\-\-plugin\-dir=\fR\fB\fIdir_name\fR\fR, \fB\-p \fR\fB\fIdir_name\fR\fR .sp @@ -294,8 +279,6 @@ The server plugin directory\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_plugin: plugin-ini option -.\" plugin-ini option: mysql_plugin \fB\-\-plugin\-ini=\fR\fB\fIfile_name\fR\fR, \fB\-i \fR\fB\fIfile_name\fR\fR .sp @@ -318,8 +301,6 @@ argument on the command line\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_plugin: print-defaults option -.\" print-defaults option: mysql_plugin \fB\-\-print\-defaults\fR, \fB\-P\fR .sp @@ -344,8 +325,6 @@ With .sp -1 .IP \(bu 2.3 .\} -.\" mysql_plugin: verbose option -.\" verbose option: mysql_plugin \fB\-\-verbose\fR, \fB\-v\fR .sp @@ -360,8 +339,6 @@ Verbose mode\&. Print more information about what the program does\&. This optio .sp -1 .IP \(bu 2.3 .\} -.\" mysql_plugin: version option -.\" version option: mysql_plugin \fB\-\-version\fR, \fB\-V\fR .sp diff --git a/mysql-wsrep-5.6/man/mysql_secure_installation.1 b/mysql-wsrep-5.6/man/mysql_secure_installation.1 index 676fe753..bec33429 100644 --- a/mysql-wsrep-5.6/man/mysql_secure_installation.1 +++ b/mysql-wsrep-5.6/man/mysql_secure_installation.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysql_secure_installation\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/02/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQL_SECURE_INST" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQL_SECURE_INST" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysql_secure_installation .SH "NAME" mysql_secure_installation \- improve MySQL installation security .SH "SYNOPSIS" diff --git a/mysql-wsrep-5.6/man/mysql_setpermission.1 b/mysql-wsrep-5.6/man/mysql_setpermission.1 index 8551c7f8..299e0406 100644 --- a/mysql-wsrep-5.6/man/mysql_setpermission.1 +++ b/mysql-wsrep-5.6/man/mysql_setpermission.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysql_setpermission\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/02/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQL_SETPERMISSI" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQL_SETPERMISSI" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysql_setpermission .SH "NAME" mysql_setpermission \- interactively set permissions in grant tables .SH "SYNOPSIS" @@ -100,8 +99,6 @@ supports the following options: .sp -1 .IP \(bu 2.3 .\} -.\" mysql_setpermission: help option -.\" help option: mysql_setpermission \fB\-\-help\fR .sp Display a help message and exit\&. @@ -115,8 +112,6 @@ Display a help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_setpermission: host option -.\" host option: mysql_setpermission \fB\-\-host=\fR\fB\fIhost_name\fR\fR .sp Connect to the MySQL server on the given host\&. @@ -130,8 +125,6 @@ Connect to the MySQL server on the given host\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_setpermission: password option -.\" password option: mysql_setpermission \fB\-\-password=\fR\fB\fIpassword\fR\fR .sp The password to use when connecting to the server\&. Note that the password value is not optional for this option, unlike for other MySQL programs\&. @@ -148,8 +141,6 @@ Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can .sp -1 .IP \(bu 2.3 .\} -.\" mysql_setpermission: port option -.\" port option: mysql_setpermission \fB\-\-port=\fR\fB\fIport_num\fR\fR .sp The TCP/IP port number to use for the connection\&. @@ -163,8 +154,6 @@ The TCP/IP port number to use for the connection\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_setpermission: socket option -.\" socket option: mysql_setpermission \fB\-\-socket=\fR\fB\fIpath\fR\fR .sp For connections to @@ -179,8 +168,6 @@ localhost, the Unix socket file to use\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_setpermission: user option -.\" user option: mysql_setpermission \fB\-\-user=\fR\fB\fIuser_name\fR\fR .sp The MySQL user name to use when connecting to the server\&. diff --git a/mysql-wsrep-5.6/man/mysql_tzinfo_to_sql.1 b/mysql-wsrep-5.6/man/mysql_tzinfo_to_sql.1 index d1124367..08199e2f 100644 --- a/mysql-wsrep-5.6/man/mysql_tzinfo_to_sql.1 +++ b/mysql-wsrep-5.6/man/mysql_tzinfo_to_sql.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysql_tzinfo_to_sql\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/02/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQL_TZINFO_TO_S" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQL_TZINFO_TO_S" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,8 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysql_tzinfo_to_sql -.\" time zone tables .SH "NAME" mysql_tzinfo_to_sql \- load the time zone tables .SH "SYNOPSIS" diff --git a/mysql-wsrep-5.6/man/mysql_upgrade.1 b/mysql-wsrep-5.6/man/mysql_upgrade.1 index afa78832..174c7202 100644 --- a/mysql-wsrep-5.6/man/mysql_upgrade.1 +++ b/mysql-wsrep-5.6/man/mysql_upgrade.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysql_upgrade\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/02/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQL_UPGRADE\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQL_UPGRADE\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,9 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysql_upgrade -.\" upgrading MySQL -.\" MySQL: upgrading .SH "NAME" mysql_upgrade \- check and upgrade MySQL tables .SH "SYNOPSIS" @@ -234,9 +231,6 @@ database\&. All checked and repaired tables are marked with the current MySQL version number\&. This ensures that next time you run \fBmysql_upgrade\fR with the same version of the server, it can tell whether there is any need to check or repair the table again\&. -.\" mysql_upgrade_info file: mysql_upgrade -.\" mysql_upgrade: mysql_upgrade_info file -.\" data directory: mysql_upgrade_info file .PP \fBmysql_upgrade\fR also saves the MySQL version number in a file named @@ -247,7 +241,7 @@ option\&. .PP \fBmysql_upgrade\fR does not upgrade the contents of the help tables\&. For upgrade instructions, see -Section\ \&5.1.10, \(lqServer-Side Help\(rq\&. +Section\ \&5.1.9, \(lqServer-Side Help\(rq\&. .PP By default, \fBmysql_upgrade\fR @@ -295,8 +289,6 @@ Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: help option -.\" help option: mysql_upgrade \fB\-\-help\fR .sp Display a short help message and exit\&. @@ -310,8 +302,6 @@ Display a short help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: basedir option -.\" basedir option: mysql_upgrade \fB\-\-basedir=\fR\fB\fIdir_name\fR\fR .sp The path to the MySQL installation directory\&. This option is accepted for backward compatibility but ignored\&. It is removed in MySQL 5\&.7\&. @@ -325,8 +315,6 @@ The path to the MySQL installation directory\&. This option is accepted for back .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: character-sets-dir option -.\" character-sets-dir option: mysql_upgrade \fB\-\-character\-sets\-dir=\fR\fB\fIdir_name\fR\fR .sp The directory where character sets are installed\&. See @@ -341,8 +329,6 @@ Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: compress option -.\" compress option: mysql_upgrade \fB\-\-compress\fR .sp Compress all information sent between the client and the server if both support compression\&. @@ -356,8 +342,6 @@ Compress all information sent between the client and the server if both support .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: datadir option -.\" datadir option: mysql_upgrade \fB\-\-datadir=\fR\fB\fIdir_name\fR\fR .sp The path to the data directory\&. This option is accepted for backward compatibility but ignored\&. It is removed in MySQL 5\&.7\&. @@ -371,8 +355,6 @@ The path to the data directory\&. This option is accepted for backward compatibi .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: debug option -.\" debug option: mysql_upgrade \fB\-\-debug[=\fR\fB\fIdebug_options\fR\fR\fB]\fR, \fB\-# [\fR\fB\fIdebug_options\fR\fR\fB]\fR .sp @@ -391,8 +373,6 @@ d:t:O,/tmp/mysql_upgrade\&.trace\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: debug-check option -.\" debug-check option: mysql_upgrade \fB\-\-debug\-check\fR .sp Print some debugging information when the program exits\&. @@ -406,8 +386,6 @@ Print some debugging information when the program exits\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: debug-info option -.\" debug-info option: mysql_upgrade \fB\-\-debug\-info\fR, \fB\-T\fR .sp @@ -422,8 +400,6 @@ Print debugging information and memory and CPU usage statistics when the program .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: default-auth option -.\" default-auth option: mysql_upgrade \fB\-\-default\-auth=\fR\fB\fIplugin\fR\fR .sp A hint about the client\-side authentication plugin to use\&. See @@ -440,8 +416,6 @@ This option was added in MySQL 5\&.6\&.2\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: default-character-set option -.\" default-character-set option: mysql_upgrade \fB\-\-default\-character\-set=\fR\fB\fIcharset_name\fR\fR .sp Use @@ -458,8 +432,6 @@ Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: defaults-extra-file option -.\" defaults-extra-file option: mysql_upgrade \fB\-\-defaults\-extra\-file=\fR\fB\fIfile_name\fR\fR .sp Read this option file after the global option file but (on Unix) before the user option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. @@ -475,8 +447,6 @@ is interpreted relative to the current directory if given as a relative path nam .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: defaults-file option -.\" defaults-file option: mysql_upgrade \fB\-\-defaults\-file=\fR\fB\fIfile_name\fR\fR .sp Use only the given option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. @@ -492,8 +462,6 @@ is interpreted relative to the current directory if given as a relative path nam .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: defaults-group-suffix option -.\" defaults-group-suffix option: mysql_upgrade \fB\-\-defaults\-group\-suffix=\fR\fB\fIstr\fR\fR .sp Read not only the usual option groups, but also groups with the usual names and a suffix of @@ -522,8 +490,6 @@ groups\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: force option -.\" force option: mysql_upgrade \fB\-\-force\fR .sp Ignore the @@ -541,8 +507,6 @@ has already been executed for the current version of MySQL\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: host option -.\" host option: mysql_upgrade \fB\-\-host=\fR\fB\fIhost_name\fR\fR, \fB\-h \fR\fB\fIhost_name\fR\fR .sp @@ -557,8 +521,6 @@ Connect to the MySQL server on the given host\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: login-path option -.\" login-path option: mysql_upgrade \fB\-\-login\-path=\fR\fB\fIname\fR\fR .sp Read options from the named login path in the @@ -579,8 +541,6 @@ utility\&. See .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: no-defaults option -.\" no-defaults option: mysql_upgrade \fB\-\-no\-defaults\fR .sp Do not read any option files\&. If program startup fails due to reading unknown options from an option file, @@ -606,8 +566,6 @@ utility\&. See .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: password option -.\" password option: mysql_upgrade \fB\-\-password[=\fR\fB\fIpassword\fR\fR\fB]\fR, \fB\-p[\fR\fB\fIpassword\fR\fR\fB]\fR .sp @@ -635,8 +593,6 @@ Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: pipe option -.\" pipe option: mysql_upgrade \fB\-\-pipe\fR, \fB\-W\fR .sp @@ -651,8 +607,6 @@ On Windows, connect to the server using a named pipe\&. This option applies only .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: plugin-dir option -.\" plugin-dir option: mysql_upgrade \fB\-\-plugin\-dir=\fR\fB\fIdir_name\fR\fR .sp The directory in which to look for plugins\&. Specify this option if the @@ -673,8 +627,6 @@ This option was added in MySQL 5\&.6\&.2\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: port option -.\" port option: mysql_upgrade \fB\-\-port=\fR\fB\fIport_num\fR\fR, \fB\-P \fR\fB\fIport_num\fR\fR .sp @@ -689,8 +641,6 @@ The TCP/IP port number to use for the connection\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: print-defaults option -.\" print-defaults option: mysql_upgrade \fB\-\-print\-defaults\fR .sp Print the program name and all options that it gets from option files\&. @@ -704,8 +654,6 @@ Print the program name and all options that it gets from option files\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: protocol option -.\" protocol option: mysql_upgrade \fB\-\-protocol={TCP|SOCKET|PIPE|MEMORY}\fR .sp The connection protocol to use for connecting to the server\&. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\&. For details on the permissible values, see @@ -720,8 +668,6 @@ Section\ \&4.2.2, \(lqConnecting to the MySQL Server\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: shared-memory-base-name option -.\" shared-memory-base-name option: mysql_upgrade \fB\-\-shared\-memory\-base\-name=\fR\fB\fIname\fR\fR .sp On Windows, the shared\-memory name to use, for connections made using shared memory to a local server\&. The default value is @@ -740,8 +686,6 @@ option to enable shared\-memory connections\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: socket option -.\" socket option: mysql_upgrade \fB\-\-socket=\fR\fB\fIpath\fR\fR, \fB\-S \fR\fB\fIpath\fR\fR .sp @@ -757,14 +701,12 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: SSL options -.\" SSL options: mysql_upgrade \fB\-\-ssl*\fR .sp Options that begin with \fB\-\-ssl\fR specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See -Section\ \&6.3.9.5, \(lqCommand Options for Secure Connections\(rq\&. +Section\ \&6.4.5, \(lqCommand Options for Secure Connections\(rq\&. .RE .sp .RS 4 @@ -775,8 +717,6 @@ Section\ \&6.3.9.5, \(lqCommand Options for Secure Connections\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: tmpdir option -.\" tmpdir option: mysql_upgrade \fB\-\-tmpdir=\fR\fB\fIdir_name\fR\fR, \fB\-t \fR\fB\fIdir_name\fR\fR .sp @@ -791,8 +731,6 @@ The path name of the directory to use for creating temporary files\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: upgrade-system-tables option -.\" upgrade-system-tables option: mysql_upgrade \fB\-\-upgrade\-system\-tables\fR, \fB\-s\fR .sp @@ -807,8 +745,6 @@ Upgrade only the system tables, do not upgrade data\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: user option -.\" user option: mysql_upgrade \fB\-\-user=\fR\fB\fIuser_name\fR\fR, \fB\-u \fR\fB\fIuser_name\fR\fR .sp @@ -824,8 +760,6 @@ root\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: verbose option -.\" verbose option: mysql_upgrade \fB\-\-verbose\fR .sp Verbose mode\&. Print more information about what the program does\&. @@ -839,8 +773,6 @@ Verbose mode\&. Print more information about what the program does\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: version-check option -.\" version-check option: mysql_upgrade \fB\-\-version\-check\fR, \fB\-k\fR .sp @@ -862,8 +794,6 @@ exits\&. This option is enabled by default; to disable the check, use .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: write-binlog option -.\" write-binlog option: mysql_upgrade \fB\-\-write\-binlog\fR .sp Cause binary logging to be enabled while diff --git a/mysql-wsrep-5.6/man/mysql_waitpid.1 b/mysql-wsrep-5.6/man/mysql_waitpid.1 index c0d4fdd7..43c115c4 100644 --- a/mysql-wsrep-5.6/man/mysql_waitpid.1 +++ b/mysql-wsrep-5.6/man/mysql_waitpid.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysql_waitpid\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/02/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQL_WAITPID\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQL_WAITPID\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysql_waitpid .SH "NAME" mysql_waitpid \- kill process and wait for its termination .SH "SYNOPSIS" @@ -88,8 +87,6 @@ supports the following options: .sp -1 .IP \(bu 2.3 .\} -.\" mysql_waitpid: help option -.\" help option: mysql_waitpid \fB\-\-help\fR, \fB\-?\fR, \fB\-I\fR @@ -105,8 +102,6 @@ Display a help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_waitpid: verbose option -.\" verbose option: mysql_waitpid \fB\-\-verbose\fR, \fB\-v\fR .sp @@ -121,8 +116,6 @@ Verbose mode\&. Display a warning if signal 0 could not be used and signal 1 is .sp -1 .IP \(bu 2.3 .\} -.\" mysql_waitpid: version option -.\" version option: mysql_waitpid \fB\-\-version\fR, \fB\-V\fR .sp diff --git a/mysql-wsrep-5.6/man/mysql_zap.1 b/mysql-wsrep-5.6/man/mysql_zap.1 index 9068c1e6..f63098fc 100644 --- a/mysql-wsrep-5.6/man/mysql_zap.1 +++ b/mysql-wsrep-5.6/man/mysql_zap.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysql_zap\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/02/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQL_ZAP\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQL_ZAP\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysql_zap .SH "NAME" mysql_zap \- kill processes that match a pattern .SH "SYNOPSIS" diff --git a/mysql-wsrep-5.6/man/mysqlaccess.1 b/mysql-wsrep-5.6/man/mysqlaccess.1 index 5f8bd5ae..8e622092 100644 --- a/mysql-wsrep-5.6/man/mysqlaccess.1 +++ b/mysql-wsrep-5.6/man/mysqlaccess.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysqlaccess\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/02/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQLACCESS\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQLACCESS\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysqlaccess .SH "NAME" mysqlaccess \- client for checking access privileges .SH "SYNOPSIS" @@ -89,8 +88,6 @@ supports the following options\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlaccess: help option -.\" help option: mysqlaccess \fB\-\-help\fR, \fB\-?\fR .sp @@ -105,8 +102,6 @@ Display a help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlaccess: brief option -.\" brief option: mysqlaccess \fB\-\-brief\fR, \fB\-b\fR .sp @@ -121,8 +116,6 @@ Generate reports in single\-line tabular format\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlaccess: commit option -.\" commit option: mysqlaccess \fB\-\-commit\fR .sp Copy the new access privileges from the temporary tables to the original grant tables\&. The grant tables must be flushed for the new privileges to take effect\&. (For example, execute a @@ -138,8 +131,6 @@ command\&.) .sp -1 .IP \(bu 2.3 .\} -.\" mysqlaccess: copy option -.\" copy option: mysqlaccess \fB\-\-copy\fR .sp Reload the temporary grant tables from original ones\&. @@ -153,8 +144,6 @@ Reload the temporary grant tables from original ones\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlaccess: db option -.\" db option: mysqlaccess \fB\-\-db=\fR\fB\fIdb_name\fR\fR, \fB\-d \fR\fB\fIdb_name\fR\fR .sp @@ -169,8 +158,6 @@ Specify the database name\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlaccess: debug option -.\" debug option: mysqlaccess \fB\-\-debug=\fR\fB\fIN\fR\fR .sp Specify the debug level\&. @@ -186,8 +173,6 @@ can be an integer from 0 to 3\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlaccess: host option -.\" host option: mysqlaccess \fB\-\-host=\fR\fB\fIhost_name\fR\fR, \fB\-h \fR\fB\fIhost_name\fR\fR .sp @@ -202,8 +187,6 @@ The host name to use in the access privileges\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlaccess: howto option -.\" howto option: mysqlaccess \fB\-\-howto\fR .sp Display some examples that show how to use @@ -218,8 +201,6 @@ Display some examples that show how to use .sp -1 .IP \(bu 2.3 .\} -.\" mysqlaccess: old_server option -.\" old_server option: mysqlaccess \fB\-\-old_server\fR .sp Assume that the server is an old MySQL server (before MySQL 3\&.21) that does not yet know how to handle full @@ -235,8 +216,6 @@ clauses\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlaccess: password option -.\" password option: mysqlaccess \fB\-\-password[=\fR\fB\fIpassword\fR\fR\fB]\fR, \fB\-p[\fR\fB\fIpassword\fR\fR\fB]\fR .sp @@ -262,8 +241,6 @@ Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlaccess: plan option -.\" plan option: mysqlaccess \fB\-\-plan\fR .sp Display suggestions and ideas for future releases\&. @@ -277,8 +254,6 @@ Display suggestions and ideas for future releases\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlaccess: preview option -.\" preview option: mysqlaccess \fB\-\-preview\fR .sp Show the privilege differences after making changes to the temporary grant tables\&. @@ -292,8 +267,6 @@ Show the privilege differences after making changes to the temporary grant table .sp -1 .IP \(bu 2.3 .\} -.\" mysqlaccess: relnotes option -.\" relnotes option: mysqlaccess \fB\-\-relnotes\fR .sp Display the release notes\&. @@ -307,8 +280,6 @@ Display the release notes\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlaccess: rhost option -.\" rhost option: mysqlaccess \fB\-\-rhost=\fR\fB\fIhost_name\fR\fR, \fB\-H \fR\fB\fIhost_name\fR\fR .sp @@ -323,8 +294,6 @@ Connect to the MySQL server on the given host\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlaccess: rollback option -.\" rollback option: mysqlaccess \fB\-\-rollback\fR .sp Undo the most recent changes to the temporary grant tables\&. @@ -338,8 +307,6 @@ Undo the most recent changes to the temporary grant tables\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlaccess: spassword option -.\" spassword option: mysqlaccess \fB\-\-spassword[=\fR\fB\fIpassword\fR\fR\fB]\fR, \fB\-P[\fR\fB\fIpassword\fR\fR\fB]\fR .sp @@ -365,8 +332,6 @@ Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlaccess: superuser option -.\" superuser option: mysqlaccess \fB\-\-superuser=\fR\fB\fIuser_name\fR\fR, \fB\-U \fR\fB\fIuser_name\fR\fR .sp @@ -381,8 +346,6 @@ Specify the user name for connecting as the superuser\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlaccess: table option -.\" table option: mysqlaccess \fB\-\-table\fR, \fB\-t\fR .sp @@ -397,8 +360,6 @@ Generate reports in table format\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlaccess: user option -.\" user option: mysqlaccess \fB\-\-user=\fR\fB\fIuser_name\fR\fR, \fB\-u \fR\fB\fIuser_name\fR\fR .sp @@ -413,8 +374,6 @@ The user name to use in the access privileges\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlaccess: version option -.\" version option: mysqlaccess \fB\-\-version\fR, \fB\-v\fR .sp diff --git a/mysql-wsrep-5.6/man/mysqladmin.1 b/mysql-wsrep-5.6/man/mysqladmin.1 index f8b908bc..1a1ff339 100644 --- a/mysql-wsrep-5.6/man/mysqladmin.1 +++ b/mysql-wsrep-5.6/man/mysqladmin.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysqladmin\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/02/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQLADMIN\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQLADMIN\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,9 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysqladmin -.\" administration: server -.\" server administration .SH "NAME" mysqladmin \- client for administering a MySQL server .SH "SYNOPSIS" @@ -449,8 +446,6 @@ Open tables: 19 Queries per second avg: 0\&.0268 .if n \{\ .RE .\} -.sp -.\" status command: results .PP The \fBmysqladmin status\fR @@ -464,7 +459,6 @@ command result displays the following values: .sp -1 .IP \(bu 2.3 .\} -.\" uptime Uptime .sp The number of seconds the MySQL server has been running\&. @@ -478,7 +472,6 @@ The number of seconds the MySQL server has been running\&. .sp -1 .IP \(bu 2.3 .\} -.\" threads Threads .sp The number of active threads (clients)\&. @@ -492,7 +485,6 @@ The number of active threads (clients)\&. .sp -1 .IP \(bu 2.3 .\} -.\" questions Questions .sp The number of questions (queries) from clients since the server was started\&. @@ -506,13 +498,12 @@ The number of questions (queries) from clients since the server was started\&. .sp -1 .IP \(bu 2.3 .\} -.\" slow queries Slow queries .sp The number of queries that have taken more than long_query_time seconds\&. See -Section\ \&5.2.5, \(lqThe Slow Query Log\(rq\&. +Section\ \&5.4.5, \(lqThe Slow Query Log\(rq\&. .RE .sp .RS 4 @@ -523,7 +514,6 @@ Section\ \&5.2.5, \(lqThe Slow Query Log\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" opens Opens .sp The number of tables the server has opened\&. @@ -537,8 +527,6 @@ The number of tables the server has opened\&. .sp -1 .IP \(bu 2.3 .\} -.\" flush tables -.\" tables: flush Flush tables .sp The number of @@ -556,7 +544,6 @@ commands the server has executed\&. .sp -1 .IP \(bu 2.3 .\} -.\" open tables Open tables .sp The number of tables that currently are open\&. @@ -567,10 +554,6 @@ If you execute when connecting to a local server using a Unix socket file, \fBmysqladmin\fR waits until the server\*(Aqs process ID file has been removed, to ensure that the server has stopped properly\&. -.\" mysqladmin command options -.\" command options: mysqladmin -.\" options: command-line: mysqladmin -.\" startup parameters: mysqladmin .PP \fBmysqladmin\fR supports the following options, which can be specified on the command line or in the @@ -588,8 +571,6 @@ Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: help option -.\" help option: mysqladmin \fB\-\-help\fR, \fB\-?\fR .sp @@ -604,8 +585,6 @@ Display a help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: bind-address option -.\" bind-address option: mysqladmin \fB\-\-bind\-address=\fR\fB\fIip_address\fR\fR .sp On a computer having multiple network interfaces, use this option to select which interface to use for connecting to the MySQL server\&. @@ -621,8 +600,6 @@ This option is supported beginning with MySQL 5\&.6\&.1\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: character-sets-dir option -.\" character-sets-dir option: mysqladmin \fB\-\-character\-sets\-dir=\fR\fB\fIdir_name\fR\fR .sp The directory where character sets are installed\&. See @@ -637,8 +614,6 @@ Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: compress option -.\" compress option: mysqladmin \fB\-\-compress\fR, \fB\-C\fR .sp @@ -653,8 +628,6 @@ Compress all information sent between the client and the server if both support .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: count option -.\" count option: mysqladmin \fB\-\-count=\fR\fB\fIN\fR\fR, \fB\-c \fR\fB\fIN\fR\fR .sp @@ -671,8 +644,6 @@ option is given\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: debug option -.\" debug option: mysqladmin \fB\-\-debug[=\fR\fB\fIdebug_options\fR\fR\fB]\fR, \fB\-# [\fR\fB\fIdebug_options\fR\fR\fB]\fR .sp @@ -691,8 +662,6 @@ d:t:o,/tmp/mysqladmin\&.trace\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: debug-check option -.\" debug-check option: mysqladmin \fB\-\-debug\-check\fR .sp Print some debugging information when the program exits\&. @@ -706,8 +675,6 @@ Print some debugging information when the program exits\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: debug-info option -.\" debug-info option: mysqladmin \fB\-\-debug\-info\fR .sp Print debugging information and memory and CPU usage statistics when the program exits\&. @@ -721,8 +688,6 @@ Print debugging information and memory and CPU usage statistics when the program .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: default-auth option -.\" default-auth option: mysqladmin \fB\-\-default\-auth=\fR\fB\fIplugin\fR\fR .sp A hint about the client\-side authentication plugin to use\&. See @@ -737,8 +702,6 @@ Section\ \&6.3.7, \(lqPluggable Authentication\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: default-character-set option -.\" default-character-set option: mysqladmin \fB\-\-default\-character\-set=\fR\fB\fIcharset_name\fR\fR .sp Use @@ -755,8 +718,6 @@ Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: defaults-extra-file option -.\" defaults-extra-file option: mysqladmin \fB\-\-defaults\-extra\-file=\fR\fB\fIfile_name\fR\fR .sp Read this option file after the global option file but (on Unix) before the user option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. @@ -772,8 +733,6 @@ is interpreted relative to the current directory if given as a relative path nam .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: defaults-file option -.\" defaults-file option: mysqladmin \fB\-\-defaults\-file=\fR\fB\fIfile_name\fR\fR .sp Use only the given option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. @@ -789,8 +748,6 @@ is interpreted relative to the current directory if given as a relative path nam .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: defaults-group-suffix option -.\" defaults-group-suffix option: mysqladmin \fB\-\-defaults\-group\-suffix=\fR\fB\fIstr\fR\fR .sp Read not only the usual option groups, but also groups with the usual names and a suffix of @@ -819,14 +776,12 @@ groups\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: enable-cleartext-plugin option -.\" enable-cleartext-plugin option: mysqladmin \fB\-\-enable\-cleartext\-plugin\fR .sp Enable the mysql_clear_password cleartext authentication plugin\&. (See -Section\ \&6.4.1.7, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) This option was added in MySQL 5\&.6\&.7\&. +Section\ \&6.5.1.7, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) This option was added in MySQL 5\&.6\&.7\&. .RE .sp .RS 4 @@ -837,8 +792,6 @@ Section\ \&6.4.1.7, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: force option -.\" force option: mysqladmin \fB\-\-force\fR, \fB\-f\fR .sp @@ -855,8 +808,6 @@ command\&. With multiple commands, continue even if an error occurs\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: host option -.\" host option: mysqladmin \fB\-\-host=\fR\fB\fIhost_name\fR\fR, \fB\-h \fR\fB\fIhost_name\fR\fR .sp @@ -871,8 +822,6 @@ Connect to the MySQL server on the given host\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: login-path option -.\" login-path option: mysqladmin \fB\-\-login\-path=\fR\fB\fIname\fR\fR .sp Read options from the named login path in the @@ -893,8 +842,6 @@ utility\&. See .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: no-beep option -.\" no-beep option: mysqladmin \fB\-\-no\-beep\fR, \fB\-b\fR .sp @@ -909,8 +856,6 @@ Suppress the warning beep that is emitted by default for errors such as a failur .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: no-defaults option -.\" no-defaults option: mysqladmin \fB\-\-no\-defaults\fR .sp Do not read any option files\&. If program startup fails due to reading unknown options from an option file, @@ -936,8 +881,6 @@ utility\&. See .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: password option -.\" password option: mysqladmin \fB\-\-password[=\fR\fB\fIpassword\fR\fR\fB]\fR, \fB\-p[\fR\fB\fIpassword\fR\fR\fB]\fR .sp @@ -965,8 +908,6 @@ Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: pipe option -.\" pipe option: mysqladmin \fB\-\-pipe\fR, \fB\-W\fR .sp @@ -981,8 +922,6 @@ On Windows, connect to the server using a named pipe\&. This option applies only .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: plugin-dir option -.\" plugin-dir option: mysqladmin \fB\-\-plugin\-dir=\fR\fB\fIdir_name\fR\fR .sp The directory in which to look for plugins\&. Specify this option if the @@ -1001,8 +940,6 @@ Section\ \&6.3.7, \(lqPluggable Authentication\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: port option -.\" port option: mysqladmin \fB\-\-port=\fR\fB\fIport_num\fR\fR, \fB\-P \fR\fB\fIport_num\fR\fR .sp @@ -1017,8 +954,6 @@ The TCP/IP port number to use for the connection\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: print-defaults option -.\" print-defaults option: mysqladmin \fB\-\-print\-defaults\fR .sp Print the program name and all options that it gets from option files\&. @@ -1032,8 +967,6 @@ Print the program name and all options that it gets from option files\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: protocol option -.\" protocol option: mysqladmin \fB\-\-protocol={TCP|SOCKET|PIPE|MEMORY}\fR .sp The connection protocol to use for connecting to the server\&. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\&. For details on the permissible values, see @@ -1048,8 +981,6 @@ Section\ \&4.2.2, \(lqConnecting to the MySQL Server\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: relative option -.\" relative option: mysqladmin \fB\-\-relative\fR, \fB\-r\fR .sp @@ -1068,8 +999,6 @@ command\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: secure-auth option -.\" secure-auth option: mysqladmin \fB\-\-secure\-auth\fR .sp Do not send passwords to the server in old (pre\-4\&.1) format\&. This prevents connections except for servers that use the newer password format\&. This option is enabled by default; use @@ -1088,7 +1017,22 @@ to disable it\&. This option was added in MySQL 5\&.6\&.17\&. .ps -1 .br Passwords that use the pre\-4\&.1 hashing method are less secure than passwords that use the native password hashing method and should be avoided\&. Pre\-4\&.1 passwords are deprecated and support for them will be removed in a future MySQL release\&. For account upgrade instructions, see -Section\ \&6.4.1.3, \(lqMigrating Away from Pre-4.1 Password Hashing and the mysql_old_password Plugin\(rq\&. +Section\ \&6.5.1.3, \(lqMigrating Away from Pre-4.1 Password Hashing and the mysql_old_password Plugin\(rq\&. +.sp .5v +.RE +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +This option is deprecated and will be removed in a future release\&. As of MySQL 5\&.7\&.5, it is always enabled and attempting to disable it produces an error\&. .sp .5v .RE .RE @@ -1101,8 +1045,6 @@ Section\ \&6.4.1.3, \(lqMigrating Away from Pre-4.1 Password Hashing and the mys .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: shared-memory-base-name option -.\" shared-memory-base-name option: mysqladmin \fB\-\-shared\-memory\-base\-name=\fR\fB\fIname\fR\fR .sp On Windows, the shared\-memory name to use, for connections made using shared memory to a local server\&. The default value is @@ -1121,8 +1063,6 @@ option to enable shared\-memory connections\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: silent option -.\" silent option: mysqladmin \fB\-\-silent\fR, \fB\-s\fR .sp @@ -1137,8 +1077,6 @@ Exit silently if a connection to the server cannot be established\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: sleep option -.\" sleep option: mysqladmin \fB\-\-sleep=\fR\fB\fIdelay\fR\fR, \fB\-i \fR\fB\fIdelay\fR\fR .sp @@ -1161,8 +1099,6 @@ executes commands indefinitely until interrupted\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: socket option -.\" socket option: mysqladmin \fB\-\-socket=\fR\fB\fIpath\fR\fR, \fB\-S \fR\fB\fIpath\fR\fR .sp @@ -1178,14 +1114,12 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: SSL options -.\" SSL options: mysqladmin \fB\-\-ssl*\fR .sp Options that begin with \fB\-\-ssl\fR specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See -Section\ \&6.3.9.5, \(lqCommand Options for Secure Connections\(rq\&. +Section\ \&6.4.5, \(lqCommand Options for Secure Connections\(rq\&. .RE .sp .RS 4 @@ -1196,8 +1130,6 @@ Section\ \&6.3.9.5, \(lqCommand Options for Secure Connections\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: user option -.\" user option: mysqladmin \fB\-\-user=\fR\fB\fIuser_name\fR\fR, \fB\-u \fR\fB\fIuser_name\fR\fR .sp @@ -1212,8 +1144,6 @@ The MySQL user name to use when connecting to the server\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: verbose option -.\" verbose option: mysqladmin \fB\-\-verbose\fR, \fB\-v\fR .sp @@ -1228,8 +1158,6 @@ Verbose mode\&. Print more information about what the program does\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: version option -.\" version option: mysqladmin \fB\-\-version\fR, \fB\-V\fR .sp @@ -1244,8 +1172,6 @@ Display version information and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: vertical option -.\" vertical option: mysqladmin \fB\-\-vertical\fR, \fB\-E\fR .sp @@ -1261,8 +1187,6 @@ Print output vertically\&. This is similar to .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: wait option -.\" wait option: mysqladmin \fB\-\-wait[=\fR\fB\fIcount\fR\fR\fB]\fR, \fB\-w[\fR\fB\fIcount\fR\fR\fB]\fR .sp @@ -1282,8 +1206,6 @@ You can also set the following variables by using .sp -1 .IP \(bu 2.3 .\} -.\" connect_timeout variable -.\" timeout: connect_timeout variable connect_timeout .sp The maximum number of seconds before connection timeout\&. The default value is 43200 (12 hours)\&. @@ -1297,8 +1219,6 @@ The maximum number of seconds before connection timeout\&. The default value is .sp -1 .IP \(bu 2.3 .\} -.\" shutdown_timeout variable -.\" timeout: shutdown_timeout variable shutdown_timeout .sp The maximum number of seconds to wait for server shutdown\&. The default value is 3600 (1 hour)\&. diff --git a/mysql-wsrep-5.6/man/mysqlbinlog.1 b/mysql-wsrep-5.6/man/mysqlbinlog.1 index c638e551..d941d598 100644 --- a/mysql-wsrep-5.6/man/mysqlbinlog.1 +++ b/mysql-wsrep-5.6/man/mysqlbinlog.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysqlbinlog\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/02/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQLBINLOG\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQLBINLOG\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysqlbinlog .SH "NAME" mysqlbinlog \- utility for processing binary log files .SH "SYNOPSIS" @@ -42,7 +41,7 @@ that describe modifications to database contents\&. The server writes these file utility\&. You can also use \fBmysqlbinlog\fR to display the contents of relay log files written by a slave server in a replication setup because relay logs have the same format as binary logs\&. The binary log and relay log are discussed further in -Section\ \&5.2.4, \(lqThe Binary Log\(rq, and +Section\ \&5.4.4, \(lqThe Binary Log\(rq, and Section\ \&17.2.2, \(lqReplication Relay and Status Logs\(rq\&. .PP Invoke @@ -168,8 +167,6 @@ Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: help option -.\" help option: mysqlbinlog \fB\-\-help\fR, \fB\-?\fR .sp @@ -184,8 +181,6 @@ Display a help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: base64-output option -.\" base64-output option: mysqlbinlog \fB\-\-base64\-output=\fR\fB\fIvalue\fR\fR .sp This option determines when events should be displayed encoded as base\-64 strings using @@ -285,8 +280,6 @@ the section called \(lqMYSQLBINLOG ROW EVENT DISPLAY\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: bind-address option -.\" bind-address option: mysqlbinlog \fB\-\-bind\-address=\fR\fB\fIip_address\fR\fR .sp On a computer having multiple network interfaces, use this option to select which interface to use for connecting to the MySQL server\&. @@ -302,8 +295,6 @@ This option is supported beginning with MySQL 5\&.6\&.1\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: binlog-row-event-max-size option -.\" binlog-row-event-max-size option: mysqlbinlog \fB\-\-binlog\-row\-event\-max\-size=\fR\fB\fIN\fR\fR .TS allbox tab(:); @@ -352,8 +343,6 @@ Specify the maximum size of a row\-based binary log event, in bytes\&. Rows are .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: character-sets-dir option -.\" character-sets-dir option: mysqlbinlog \fB\-\-character\-sets\-dir=\fR\fB\fIdir_name\fR\fR .sp The directory where character sets are installed\&. See @@ -368,8 +357,6 @@ Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: connection-server-id option -.\" connection-server-id option: mysqlbinlog \fB\-\-connection\-server\-id=\fR\fB\fIserver_id\fR\fR .sp This option is used to test a MySQL server for support of the @@ -393,8 +380,6 @@ This option was added in MySQL 5\&.6\&.20\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: database option -.\" database option: mysqlbinlog \fB\-\-database=\fR\fB\fIdb_name\fR\fR, \fB\-d \fR\fB\fIdb_name\fR\fR .sp @@ -512,8 +497,7 @@ INSERT statements following USE db2\&. .PP -\fBRow-based logging\fR. -\fBmysqlbinlog\fR +\fBRow-based logging\fR. \fBmysqlbinlog\fR outputs only entries that change tables belonging to \fIdb_name\fR\&. The default database has no effect on this\&. Suppose that the binary log just described was created using row\-based logging rather than statement\-based logging\&. \fBmysqlbinlog \-\-database=test\fR @@ -546,8 +530,6 @@ option did not work correctly with a log written by a GTID\-enabled MySQL server .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: debug option -.\" debug option: mysqlbinlog \fB\-\-debug[=\fR\fB\fIdebug_options\fR\fR\fB]\fR, \fB\-# [\fR\fB\fIdebug_options\fR\fR\fB]\fR .sp @@ -566,8 +548,6 @@ d:t:o,/tmp/mysqlbinlog\&.trace\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: debug-check option -.\" debug-check option: mysqlbinlog \fB\-\-debug\-check\fR .sp Print some debugging information when the program exits\&. @@ -581,8 +561,6 @@ Print some debugging information when the program exits\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: debug-info option -.\" debug-info option: mysqlbinlog \fB\-\-debug\-info\fR .sp Print debugging information and memory and CPU usage statistics when the program exits\&. @@ -596,8 +574,6 @@ Print debugging information and memory and CPU usage statistics when the program .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: default-auth option -.\" default-auth option: mysqlbinlog \fB\-\-default\-auth=\fR\fB\fIplugin\fR\fR .sp A hint about the client\-side authentication plugin to use\&. See @@ -614,8 +590,6 @@ This option was added in MySQL 5\&.6\&.2\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: defaults-extra-file option -.\" defaults-extra-file option: mysqlbinlog \fB\-\-defaults\-extra\-file=\fR\fB\fIfile_name\fR\fR .sp Read this option file after the global option file but (on Unix) before the user option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. @@ -631,8 +605,6 @@ is interpreted relative to the current directory if given as a relative path nam .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: defaults-file option -.\" defaults-file option: mysqlbinlog \fB\-\-defaults\-file=\fR\fB\fIfile_name\fR\fR .sp Use only the given option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. @@ -648,8 +620,6 @@ is interpreted relative to the current directory if given as a relative path nam .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: defaults-group-suffix option -.\" defaults-group-suffix option: mysqlbinlog \fB\-\-defaults\-group\-suffix=\fR\fB\fIstr\fR\fR .sp Read not only the usual option groups, but also groups with the usual names and a suffix of @@ -678,8 +648,6 @@ groups\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: disable-log-bin option -.\" disable-log-bin option: mysqlbinlog \fB\-\-disable\-log\-bin\fR, \fB\-D\fR .sp @@ -708,8 +676,6 @@ privilege\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: exclude-gtids option -.\" exclude-gtids option: mysqlbinlog \fB\-\-exclude\-gtids=\fR\fB\fIgtid_set\fR\fR .sp Do not display any of the groups listed in the @@ -724,8 +690,6 @@ Do not display any of the groups listed in the .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: force-if-open option -.\" force-if-open option: mysqlbinlog \fB\-\-force\-if\-open\fR, \fB\-F\fR .sp @@ -740,8 +704,6 @@ Read binary log files even if they are open or were not closed properly\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: force-read option -.\" force-read option: mysqlbinlog \fB\-\-force\-read\fR, \fB\-f\fR .sp @@ -760,8 +722,6 @@ stops if it reads such an event\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: hexdump option -.\" hexdump option: mysqlbinlog \fB\-\-hexdump\fR, \fB\-H\fR .sp @@ -777,8 +737,6 @@ the section called \(lqMYSQLBINLOG HEX DUMP FORMAT\(rq\&. The hex output can be .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: host option -.\" host option: mysqlbinlog \fB\-\-host=\fR\fB\fIhost_name\fR\fR, \fB\-h \fR\fB\fIhost_name\fR\fR .sp @@ -793,8 +751,6 @@ Get the binary log from the MySQL server on the given host\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: include-gtids option -.\" include-gtids option: mysqlbinlog \fB\-\-include\-gtids=\fR\fB\fIgtid_set\fR\fR .sp Display only the groups listed in the @@ -809,8 +765,6 @@ Display only the groups listed in the .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: local-load option -.\" local-load option: mysqlbinlog \fB\-\-local\-load=\fR\fB\fIdir_name\fR\fR, \fB\-l \fR\fB\fIdir_name\fR\fR .sp @@ -844,8 +798,6 @@ or any other MySQL program\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: login-path option -.\" login-path option: mysqlbinlog \fB\-\-login\-path=\fR\fB\fIname\fR\fR .sp Read options from the named login path in the @@ -866,8 +818,6 @@ utility\&. See .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: no-defaults option -.\" no-defaults option: mysqlbinlog \fB\-\-no\-defaults\fR .sp Do not read any option files\&. If program startup fails due to reading unknown options from an option file, @@ -893,8 +843,6 @@ utility\&. See .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: offset option -.\" offset option: mysqlbinlog \fB\-\-offset=\fR\fB\fIN\fR\fR, \fB\-o \fR\fB\fIN\fR\fR .sp @@ -911,8 +859,6 @@ entries in the log\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: password option -.\" password option: mysqlbinlog \fB\-\-password[=\fR\fB\fIpassword\fR\fR\fB]\fR, \fB\-p[\fR\fB\fIpassword\fR\fR\fB]\fR .sp @@ -940,8 +886,6 @@ Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: plugin-dir option -.\" plugin-dir option: mysqlbinlog \fB\-\-plugin\-dir=\fR\fB\fIdir_name\fR\fR .sp The directory in which to look for plugins\&. Specify this option if the @@ -962,10 +906,6 @@ This option was added in MySQL 5\&.6\&.2\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: port option -.\" port option: mysqlbinlog -.\" TCP/IP -.\" ports \fB\-\-port=\fR\fB\fIport_num\fR\fR, \fB\-P \fR\fB\fIport_num\fR\fR .sp @@ -980,8 +920,6 @@ The TCP/IP port number to use for connecting to a remote server\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: print-defaults option -.\" print-defaults option: mysqlbinlog \fB\-\-print\-defaults\fR .sp Print the program name and all options that it gets from option files\&. @@ -995,8 +933,6 @@ Print the program name and all options that it gets from option files\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: protocol option -.\" protocol option: mysqlbinlog \fB\-\-protocol={TCP|SOCKET|PIPE|MEMORY}\fR .sp The connection protocol to use for connecting to the server\&. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\&. For details on the permissible values, see @@ -1011,8 +947,6 @@ Section\ \&4.2.2, \(lqConnecting to the MySQL Server\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: raw option -.\" raw option: mysqlbinlog \fB\-\-raw\fR .sp By default, @@ -1049,8 +983,6 @@ This option was added in MySQL 5\&.6\&.0\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: read-from-remote-master option -.\" read-from-remote-master option: mysqlbinlog \fB\-\-read\-from\-remote\-master=\fR\fB\fItype\fR\fR .sp Read binary logs from a MySQL server with the @@ -1079,8 +1011,6 @@ This option was added in MySQL 5\&.6\&.5\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: read-from-remote-server option -.\" read-from-remote-server option: mysqlbinlog \fB\-\-read\-from\-remote\-server\fR, \fB\-R\fR .sp @@ -1106,8 +1036,6 @@ As of MySQL 5\&.6\&.5, this option is like .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: result-file option -.\" result-file option: mysqlbinlog \fB\-\-result\-file=\fR\fB\fIname\fR\fR, \fB\-r \fR\fB\fIname\fR\fR .sp @@ -1131,8 +1059,6 @@ option value is treated as a prefix that modifies output file names\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: secure-auth option -.\" secure-auth option: mysqlbinlog \fB\-\-secure\-auth\fR .sp Do not send passwords to the server in old (pre\-4\&.1) format\&. This prevents connections except for servers that use the newer password format\&. This option is enabled by default; use @@ -1151,7 +1077,22 @@ to disable it\&. This option was added in MySQL 5\&.6\&.17\&. .ps -1 .br Passwords that use the pre\-4\&.1 hashing method are less secure than passwords that use the native password hashing method and should be avoided\&. Pre\-4\&.1 passwords are deprecated and support for them will be removed in a future MySQL release\&. For account upgrade instructions, see -Section\ \&6.4.1.3, \(lqMigrating Away from Pre-4.1 Password Hashing and the mysql_old_password Plugin\(rq\&. +Section\ \&6.5.1.3, \(lqMigrating Away from Pre-4.1 Password Hashing and the mysql_old_password Plugin\(rq\&. +.sp .5v +.RE +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +This option is deprecated and will be removed in a future release\&. As of MySQL 5\&.7\&.5, it is always enabled and attempting to disable it produces an error\&. .sp .5v .RE .RE @@ -1164,8 +1105,6 @@ Section\ \&6.4.1.3, \(lqMigrating Away from Pre-4.1 Password Hashing and the mys .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: server-id option -.\" server-id option: mysqlbinlog \fB\-\-server\-id=\fR\fB\fIid\fR\fR .sp Display only those events created by the server having the given server ID\&. @@ -1179,8 +1118,6 @@ Display only those events created by the server having the given server ID\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: server-id-bits option -.\" server-id-bits option: mysqlbinlog \fB\-\-server\-id\-bits=\fR\fB\fIN\fR\fR .sp Use only the first @@ -1208,8 +1145,6 @@ supplied with the MySQL Cluster distribution, or built from the MySQL Cluster so .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: set-charset option -.\" set-charset option: mysqlbinlog \fB\-\-set\-charset=\fR\fB\fIcharset_name\fR\fR .sp Add a @@ -1225,8 +1160,6 @@ statement to the output to specify the character set to be used for processing l .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: shared-memory-base-name option -.\" shared-memory-base-name option: mysqlbinlog \fB\-\-shared\-memory\-base\-name=\fR\fB\fIname\fR\fR .sp On Windows, the shared\-memory name to use, for connections made using shared memory to a local server\&. The default value is @@ -1245,8 +1178,6 @@ option to enable shared\-memory connections\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: short-form option -.\" short-form option: mysqlbinlog \fB\-\-short\-form\fR, \fB\-s\fR .sp @@ -1261,8 +1192,6 @@ Display only the statements contained in the log, without any extra information .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: skip-gtids option -.\" skip-gtids option: mysqlbinlog \fB\-\-skip\-gtids[=(true|false)]\fR .sp Do not display any GTIDs in the output\&. This is needed when writing to a dump file from one or more binary logs containing GTIDs, as shown in this example: @@ -1292,8 +1221,6 @@ This option was added in MySQL 5\&.6\&.5\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: socket option -.\" socket option: mysqlbinlog \fB\-\-socket=\fR\fB\fIpath\fR\fR, \fB\-S \fR\fB\fIpath\fR\fR .sp @@ -1309,8 +1236,6 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: start-datetime option -.\" start-datetime option: mysqlbinlog \fB\-\-start\-datetime=\fR\fB\fIdatetime\fR\fR .sp Start reading the binary log at the first event having a timestamp equal to or later than the @@ -1346,8 +1271,6 @@ Section\ \&7.3, \(lqExample Backup and Recovery Strategy\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: start-position option -.\" start-position option: mysqlbinlog \fB\-\-start\-position=\fR\fB\fIN\fR\fR, \fB\-j \fR\fB\fIN\fR\fR .sp @@ -1366,8 +1289,6 @@ Section\ \&7.3, \(lqExample Backup and Recovery Strategy\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: stop-datetime option -.\" stop-datetime option: mysqlbinlog \fB\-\-stop\-datetime=\fR\fB\fIdatetime\fR\fR .sp Stop reading the binary log at the first event having a timestamp equal to or later than the @@ -1390,8 +1311,6 @@ Section\ \&7.3, \(lqExample Backup and Recovery Strategy\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: stop-never option -.\" stop-never option: mysqlbinlog \fB\-\-stop\-never\fR .sp This option is used with @@ -1422,8 +1341,6 @@ This option was added in MySQL 5\&.6\&.0\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: stop-never-slave-server-id option -.\" stop-never-slave-server-id option: mysqlbinlog \fB\-\-stop\-never\-slave\-server\-id=\fR\fB\fIid\fR\fR .sp With @@ -1447,8 +1364,6 @@ This option was added in MySQL 5\&.6\&.0\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: stop-position option -.\" stop-position option: mysqlbinlog \fB\-\-stop\-position=\fR\fB\fIN\fR\fR .sp Stop reading the binary log at the first event having a position equal to or greater than @@ -1466,8 +1381,6 @@ Section\ \&7.3, \(lqExample Backup and Recovery Strategy\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: to-last-log option -.\" to-last-log option: mysqlbinlog \fB\-\-to\-last\-log\fR, \fB\-t\fR .sp @@ -1483,8 +1396,6 @@ Do not stop at the end of the requested binary log from a MySQL server, but rath .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: user option -.\" user option: mysqlbinlog \fB\-\-user=\fR\fB\fIuser_name\fR\fR, \fB\-u \fR\fB\fIuser_name\fR\fR .sp @@ -1499,8 +1410,6 @@ The MySQL user name to use when connecting to a remote server\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: verbose option -.\" verbose option: mysqlbinlog \fB\-\-verbose\fR, \fB\-v\fR .sp @@ -1522,8 +1431,6 @@ the section called \(lqMYSQLBINLOG ROW EVENT DISPLAY\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: verify-binlog-checksum option -.\" verify-binlog-checksum option: mysqlbinlog \fB\-\-verify\-binlog\-checksum\fR, \fB\-c\fR .sp @@ -1538,8 +1445,6 @@ Verify checksums in binary log files\&. This option was added in MySQL 5\&.6\&.1 .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: version option -.\" version option: mysqlbinlog \fB\-\-version\fR, \fB\-V\fR .sp @@ -1562,7 +1467,6 @@ syntax: .sp -1 .IP \(bu 2.3 .\} -.\" open_files_limit variable open_files_limit .sp Specify the number of open file descriptors to reserve\&. @@ -2172,7 +2076,6 @@ T} .sp 1 .RE .SH "MYSQLBINLOG ROW EVENT DISPLAY" -.\" BINLOG statement: mysqlbinlog output .PP The following examples illustrate how \fBmysqlbinlog\fR diff --git a/mysql-wsrep-5.6/man/mysqlbug.1 b/mysql-wsrep-5.6/man/mysqlbug.1 index 644baec3..583fb3f0 100644 --- a/mysql-wsrep-5.6/man/mysqlbug.1 +++ b/mysql-wsrep-5.6/man/mysqlbug.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysqlbug\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/02/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQLBUG\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQLBUG\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysqlbug .SH "NAME" mysqlbug \- generate bug report .SH "SYNOPSIS" diff --git a/mysql-wsrep-5.6/man/mysqlcheck.1 b/mysql-wsrep-5.6/man/mysqlcheck.1 index 48b95db9..1af8de8d 100644 --- a/mysql-wsrep-5.6/man/mysqlcheck.1 +++ b/mysql-wsrep-5.6/man/mysqlcheck.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysqlcheck\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/02/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQLCHECK\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQLCHECK\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,11 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysqlcheck -.\" maintenance: tables -.\" repair: tables -.\" tables: maintenance -.\" tables: repair .SH "NAME" mysqlcheck \- a table maintenance program .SH "SYNOPSIS" @@ -215,8 +210,6 @@ Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: help option -.\" help option: mysqlcheck \fB\-\-help\fR, \fB\-?\fR .sp @@ -231,8 +224,6 @@ Display a help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: all-databases option -.\" all-databases option: mysqlcheck \fB\-\-all\-databases\fR, \fB\-A\fR .sp @@ -255,8 +246,6 @@ option\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: all-in-1 option -.\" all-in-1 option: mysqlcheck \fB\-\-all\-in\-1\fR, \fB\-1\fR .sp @@ -271,8 +260,6 @@ Instead of issuing a statement for each table, execute a single statement for ea .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: analyze option -.\" analyze option: mysqlcheck \fB\-\-analyze\fR, \fB\-a\fR .sp @@ -287,8 +274,6 @@ Analyze the tables\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: auto-repair option -.\" auto-repair option: mysqlcheck \fB\-\-auto\-repair\fR .sp If a checked table is corrupted, automatically fix it\&. Any necessary repairs are done after all tables have been checked\&. @@ -302,8 +287,6 @@ If a checked table is corrupted, automatically fix it\&. Any necessary repairs a .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: bind-address option -.\" bind-address option: mysqlcheck \fB\-\-bind\-address=\fR\fB\fIip_address\fR\fR .sp On a computer having multiple network interfaces, use this option to select which interface to use for connecting to the MySQL server\&. @@ -319,8 +302,6 @@ This option is supported beginning with MySQL 5\&.6\&.1\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: character-sets-dir option -.\" character-sets-dir option: mysqlcheck \fB\-\-character\-sets\-dir=\fR\fB\fIdir_name\fR\fR .sp The directory where character sets are installed\&. See @@ -335,8 +316,6 @@ Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: check option -.\" check option: mysqlcheck \fB\-\-check\fR, \fB\-c\fR .sp @@ -351,8 +330,6 @@ Check the tables for errors\&. This is the default operation\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: check-only-changed option -.\" check-only-changed option: mysqlcheck \fB\-\-check\-only\-changed\fR, \fB\-C\fR .sp @@ -367,8 +344,6 @@ Check only tables that have changed since the last check or that have not been c .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: check-upgrade option -.\" check-upgrade option: mysqlcheck \fB\-\-check\-upgrade\fR, \fB\-g\fR .sp @@ -391,8 +366,6 @@ options\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: compress option -.\" compress option: mysqlcheck \fB\-\-compress\fR .sp Compress all information sent between the client and the server if both support compression\&. @@ -406,8 +379,6 @@ Compress all information sent between the client and the server if both support .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: databases option -.\" databases option: mysqlcheck \fB\-\-databases\fR, \fB\-B\fR .sp @@ -434,8 +405,6 @@ option\&.) .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: debug option -.\" debug option: mysqlcheck \fB\-\-debug[=\fR\fB\fIdebug_options\fR\fR\fB]\fR, \fB\-# [\fR\fB\fIdebug_options\fR\fR\fB]\fR .sp @@ -454,8 +423,6 @@ d:t:o\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: debug-check option -.\" debug-check option: mysqlcheck \fB\-\-debug\-check\fR .sp Print some debugging information when the program exits\&. @@ -469,8 +436,6 @@ Print some debugging information when the program exits\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: debug-info option -.\" debug-info option: mysqlcheck \fB\-\-debug\-info\fR .sp Print debugging information and memory and CPU usage statistics when the program exits\&. @@ -484,8 +449,6 @@ Print debugging information and memory and CPU usage statistics when the program .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: default-character-set option -.\" default-character-set option: mysqlcheck \fB\-\-default\-character\-set=\fR\fB\fIcharset_name\fR\fR .sp Use @@ -502,8 +465,6 @@ Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: defaults-extra-file option -.\" defaults-extra-file option: mysqlcheck \fB\-\-defaults\-extra\-file=\fR\fB\fIfile_name\fR\fR .sp Read this option file after the global option file but (on Unix) before the user option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. @@ -519,8 +480,6 @@ is interpreted relative to the current directory if given as a relative path nam .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: defaults-file option -.\" defaults-file option: mysqlcheck \fB\-\-defaults\-file=\fR\fB\fIfile_name\fR\fR .sp Use only the given option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. @@ -536,8 +495,6 @@ is interpreted relative to the current directory if given as a relative path nam .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: defaults-group-suffix option -.\" defaults-group-suffix option: mysqlcheck \fB\-\-defaults\-group\-suffix=\fR\fB\fIstr\fR\fR .sp Read not only the usual option groups, but also groups with the usual names and a suffix of @@ -566,8 +523,6 @@ groups\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: extended option -.\" extended option: mysqlcheck \fB\-\-extended\fR, \fB\-e\fR .sp @@ -584,8 +539,6 @@ If you are using this option to repair tables, it runs an extended repair that m .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: default-auth option -.\" default-auth option: mysqlcheck \fB\-\-default\-auth=\fR\fB\fIplugin\fR\fR .sp A hint about the client\-side authentication plugin to use\&. See @@ -602,14 +555,12 @@ This option was added in MySQL 5\&.6\&.2\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: enable-cleartext-plugin option -.\" enable-cleartext-plugin option: mysqlcheck \fB\-\-enable\-cleartext\-plugin\fR .sp Enable the mysql_clear_password cleartext authentication plugin\&. (See -Section\ \&6.4.1.7, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) +Section\ \&6.5.1.7, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) .sp This option was added in MySQL 5\&.6\&.28\&. .RE @@ -622,8 +573,6 @@ This option was added in MySQL 5\&.6\&.28\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: fast option -.\" fast option: mysqlcheck \fB\-\-fast\fR, \fB\-F\fR .sp @@ -638,8 +587,6 @@ Check only tables that have not been closed properly\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: fix-db-names option -.\" fix-db-names option: mysqlcheck \fB\-\-fix\-db\-names\fR .sp Convert database names to 5\&.1 format\&. Only database names that contain special characters are affected\&. @@ -653,8 +600,6 @@ Convert database names to 5\&.1 format\&. Only database names that contain speci .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: fix-table-names option -.\" fix-table-names option: mysqlcheck \fB\-\-fix\-table\-names\fR .sp Convert table names to 5\&.1 format\&. Only table names that contain special characters are affected\&. This option also applies to views\&. @@ -668,8 +613,6 @@ Convert table names to 5\&.1 format\&. Only table names that contain special cha .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: force option -.\" force option: mysqlcheck \fB\-\-force\fR, \fB\-f\fR .sp @@ -684,8 +627,6 @@ Continue even if an SQL error occurs\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: host option -.\" host option: mysqlcheck \fB\-\-host=\fR\fB\fIhost_name\fR\fR, \fB\-h \fR\fB\fIhost_name\fR\fR .sp @@ -700,8 +641,6 @@ Connect to the MySQL server on the given host\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: login-path option -.\" login-path option: mysqlcheck \fB\-\-login\-path=\fR\fB\fIname\fR\fR .sp Read options from the named login path in the @@ -722,8 +661,6 @@ utility\&. See .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: medium-check option -.\" medium-check option: mysqlcheck \fB\-\-medium\-check\fR, \fB\-m\fR .sp @@ -740,8 +677,6 @@ operation\&. This finds only 99\&.99% of all errors, which should be good enough .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: no-defaults option -.\" no-defaults option: mysqlcheck \fB\-\-no\-defaults\fR .sp Do not read any option files\&. If program startup fails due to reading unknown options from an option file, @@ -767,8 +702,6 @@ utility\&. See .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: optimize option -.\" optimize option: mysqlcheck \fB\-\-optimize\fR, \fB\-o\fR .sp @@ -783,8 +716,6 @@ Optimize the tables\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: password option -.\" password option: mysqlcheck \fB\-\-password[=\fR\fB\fIpassword\fR\fR\fB]\fR, \fB\-p[\fR\fB\fIpassword\fR\fR\fB]\fR .sp @@ -812,8 +743,6 @@ Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: pipe option -.\" pipe option: mysql \fB\-\-pipe\fR, \fB\-W\fR .sp @@ -828,8 +757,6 @@ On Windows, connect to the server using a named pipe\&. This option applies only .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: plugin-dir option -.\" plugin-dir option: mysqlcheck \fB\-\-plugin\-dir=\fR\fB\fIdir_name\fR\fR .sp The directory in which to look for plugins\&. Specify this option if the @@ -850,8 +777,6 @@ This option was added in MySQL 5\&.6\&.2\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: port option -.\" port option: mysqlcheck \fB\-\-port=\fR\fB\fIport_num\fR\fR, \fB\-P \fR\fB\fIport_num\fR\fR .sp @@ -866,8 +791,6 @@ The TCP/IP port number to use for the connection\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: print-defaults option -.\" print-defaults option: mysqlcheck \fB\-\-print\-defaults\fR .sp Print the program name and all options that it gets from option files\&. @@ -881,8 +804,6 @@ Print the program name and all options that it gets from option files\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: protocol option -.\" protocol option: mysqlcheck \fB\-\-protocol={TCP|SOCKET|PIPE|MEMORY}\fR .sp The connection protocol to use for connecting to the server\&. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\&. For details on the permissible values, see @@ -897,8 +818,6 @@ Section\ \&4.2.2, \(lqConnecting to the MySQL Server\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: quick option -.\" quick option: mysqlcheck \fB\-\-quick\fR, \fB\-q\fR .sp @@ -915,8 +834,6 @@ If you are using this option to repair tables, it tries to repair only the index .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: repair option -.\" repair option: mysqlcheck \fB\-\-repair\fR, \fB\-r\fR .sp @@ -931,8 +848,6 @@ Perform a repair that can fix almost anything except unique keys that are not un .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: secure-auth option -.\" secure-auth option: mysqlcheck \fB\-\-secure\-auth\fR .sp Do not send passwords to the server in old (pre\-4\&.1) format\&. This prevents connections except for servers that use the newer password format\&. This option is enabled by default; use @@ -951,7 +866,22 @@ to disable it\&. This option was added in MySQL 5\&.6\&.17\&. .ps -1 .br Passwords that use the pre\-4\&.1 hashing method are less secure than passwords that use the native password hashing method and should be avoided\&. Pre\-4\&.1 passwords are deprecated and support for them will be removed in a future MySQL release\&. For account upgrade instructions, see -Section\ \&6.4.1.3, \(lqMigrating Away from Pre-4.1 Password Hashing and the mysql_old_password Plugin\(rq\&. +Section\ \&6.5.1.3, \(lqMigrating Away from Pre-4.1 Password Hashing and the mysql_old_password Plugin\(rq\&. +.sp .5v +.RE +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +This option is deprecated and will be removed in a future release\&. As of MySQL 5\&.7\&.5, it is always enabled and attempting to disable it produces an error\&. .sp .5v .RE .RE @@ -964,8 +894,6 @@ Section\ \&6.4.1.3, \(lqMigrating Away from Pre-4.1 Password Hashing and the mys .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: shared-memory-base-name option -.\" shared-memory-base-name option: mysqlcheck \fB\-\-shared\-memory\-base\-name=\fR\fB\fIname\fR\fR .sp On Windows, the shared\-memory name to use, for connections made using shared memory to a local server\&. The default value is @@ -984,8 +912,6 @@ option to enable shared\-memory connections\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: silent option -.\" silent option: mysqlcheck \fB\-\-silent\fR, \fB\-s\fR .sp @@ -1000,8 +926,6 @@ Silent mode\&. Print only error messages\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: skip-database option -.\" skip-database option: mysqlcheck \fB\-\-skip\-database=\fR\fB\fIdb_name\fR\fR .sp Do not include the named database (case sensitive) in the operations performed by @@ -1016,8 +940,6 @@ Do not include the named database (case sensitive) in the operations performed b .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: socket option -.\" socket option: mysqlcheck \fB\-\-socket=\fR\fB\fIpath\fR\fR, \fB\-S \fR\fB\fIpath\fR\fR .sp @@ -1033,14 +955,12 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: SSL options -.\" SSL options: mysqlcheck \fB\-\-ssl*\fR .sp Options that begin with \fB\-\-ssl\fR specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See -Section\ \&6.3.9.5, \(lqCommand Options for Secure Connections\(rq\&. +Section\ \&6.4.5, \(lqCommand Options for Secure Connections\(rq\&. .RE .sp .RS 4 @@ -1051,8 +971,6 @@ Section\ \&6.3.9.5, \(lqCommand Options for Secure Connections\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: tables option -.\" tables option: mysqlcheck \fB\-\-tables\fR .sp Override the @@ -1070,8 +988,6 @@ option\&. All name arguments following the option are regarded as table names\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: use-frm option -.\" use-frm option: mysqlcheck \fB\-\-use\-frm\fR .sp For repair operations on @@ -1091,8 +1007,6 @@ header is corrupted\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: user option -.\" user option: mysqlcheck \fB\-\-user=\fR\fB\fIuser_name\fR\fR, \fB\-u \fR\fB\fIuser_name\fR\fR .sp @@ -1107,8 +1021,6 @@ The MySQL user name to use when connecting to the server\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: verbose option -.\" verbose option: mysqlcheck \fB\-\-verbose\fR, \fB\-v\fR .sp @@ -1123,8 +1035,6 @@ Verbose mode\&. Print information about the various stages of program operation\ .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: version option -.\" version option: mysqlcheck \fB\-\-version\fR, \fB\-V\fR .sp @@ -1139,8 +1049,6 @@ Display version information and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: write-binlog option -.\" write-binlog option: mysqlcheck \fB\-\-write\-binlog\fR .sp This option is enabled by default, so that diff --git a/mysql-wsrep-5.6/man/mysqld.8 b/mysql-wsrep-5.6/man/mysqld.8 index 39a26f7e..5d715687 100644 --- a/mysql-wsrep-5.6/man/mysqld.8 +++ b/mysql-wsrep-5.6/man/mysqld.8 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysqld\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/02/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQLD\FR" "8" "03/02/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQLD\FR" "8" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,8 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysqld: MySQL server -.\" MySQL server: mysqld .SH "NAME" mysqld \- the MySQL server .SH "SYNOPSIS" diff --git a/mysql-wsrep-5.6/man/mysqld_multi.1 b/mysql-wsrep-5.6/man/mysqld_multi.1 index 94b79a8d..cc866166 100644 --- a/mysql-wsrep-5.6/man/mysqld_multi.1 +++ b/mysql-wsrep-5.6/man/mysqld_multi.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysqld_multi\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/02/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQLD_MULTI\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQLD_MULTI\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,10 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysqld_multi -.\" tools: mysqld_multi -.\" scripts -.\" multi mysqld .SH "NAME" mysqld_multi \- manage multiple MySQL servers .SH "SYNOPSIS" @@ -60,7 +56,7 @@ to specify which servers you want to start, stop, or obtain a status report for\ group used for starting \fBmysqld\fR\&. (See, for example, Section\ \&2.10.5, \(lqStarting and Stopping MySQL Automatically\(rq\&.) However, when using multiple servers, it is necessary that each one use its own value for options such as the Unix socket file and TCP/IP port number\&. For more information on which options must be unique per server in a multiple\-server environment, see -Section\ \&5.3, \(lqRunning Multiple MySQL Instances on One Machine\(rq\&. +Section\ \&5.6, \(lqRunning Multiple MySQL Instances on One Machine\(rq\&. .PP To invoke \fBmysqld_multi\fR, use the following syntax: @@ -158,8 +154,6 @@ searches for option files as follows: .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_multi: no-defaults option -.\" no-defaults option: mysqld_multi With \fB\-\-no\-defaults\fR, no option files are read\&. .RE @@ -172,8 +166,6 @@ With .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_multi: defaults-file option -.\" defaults-file option: mysqld_multi With \fB\-\-defaults\-file=\fR\fB\fIfile_name\fR\fR, only the named file is read\&. .RE @@ -186,8 +178,6 @@ With .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_multi: defaults-extra-file option -.\" defaults-extra-file option: mysqld_multi Otherwise, option files in the standard list of locations are read, including any file named by the \fB\-\-defaults\-extra\-file=\fR\fB\fIfile_name\fR\fR option, if one is given\&. (If the option is given multiple times, the last value is used\&.) @@ -233,8 +223,6 @@ supports the following options\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_multi: help option -.\" help option: mysqld_multi \fB\-\-help\fR .sp Display a help message and exit\&. @@ -248,8 +236,6 @@ Display a help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_multi: example option -.\" example option: mysqld_multi \fB\-\-example\fR .sp Display a sample option file\&. @@ -263,8 +249,6 @@ Display a sample option file\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_multi: log option -.\" log option: mysqld_multi \fB\-\-log=\fR\fB\fIfile_name\fR\fR .sp Specify the name of the log file\&. If the file exists, log output is appended to it\&. @@ -278,8 +262,6 @@ Specify the name of the log file\&. If the file exists, log output is appended t .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_multi: mysqladmin option -.\" mysqladmin option: mysqld_multi \fB\-\-mysqladmin=\fR\fB\fIprog_name\fR\fR .sp The @@ -295,8 +277,6 @@ binary to be used to stop servers\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_multi: mysqld option -.\" mysqld option: mysqld_multi \fB\-\-mysqld=\fR\fB\fIprog_name\fR\fR .sp The @@ -337,8 +317,6 @@ ledir = /opt/local/mysql/libexec .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_multi: no-log option -.\" no-log option: mysqld_multi \fB\-\-no\-log\fR .sp Print log information to @@ -354,8 +332,6 @@ rather than to the log file\&. By default, output goes to the log file\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_multi: password option -.\" password option: mysqld_multi \fB\-\-password=\fR\fB\fIpassword\fR\fR .sp The password of the MySQL account to use when invoking @@ -370,8 +346,6 @@ The password of the MySQL account to use when invoking .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_multi: silent option -.\" silent option: mysqld_multi \fB\-\-silent\fR .sp Silent mode; disable warnings\&. @@ -385,8 +359,6 @@ Silent mode; disable warnings\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_multi: tcp-ip option -.\" tcp-ip option: mysqld_multi \fB\-\-tcp\-ip\fR .sp Connect to each MySQL server through the TCP/IP port instead of the Unix socket file\&. (If a socket file is missing, the server might still be running, but accessible only through the TCP/IP port\&.) By default, connections are made using the Unix socket file\&. This option affects @@ -404,8 +376,6 @@ operations\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_multi: user option -.\" user option: mysqld_multi \fB\-\-user=\fR\fB\fIuser_name\fR\fR .sp The user name of the MySQL account to use when invoking @@ -420,8 +390,6 @@ The user name of the MySQL account to use when invoking .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_multi: verbose option -.\" verbose option: mysqld_multi \fB\-\-verbose\fR .sp Be more verbose\&. @@ -435,8 +403,6 @@ Be more verbose\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_multi: version option -.\" version option: mysqld_multi \fB\-\-version\fR .sp Display version information and exit\&. @@ -468,7 +434,7 @@ servers with the same data directory\&. Use separate data directories, unless yo what you are doing\&. Starting multiple servers with the same data directory does \fInot\fR give you extra performance in a threaded system\&. See -Section\ \&5.3, \(lqRunning Multiple MySQL Instances on One Machine\(rq\&. +Section\ \&5.6, \(lqRunning Multiple MySQL Instances on One Machine\(rq\&. .RE .sp .RS 4 diff --git a/mysql-wsrep-5.6/man/mysqld_safe.1 b/mysql-wsrep-5.6/man/mysqld_safe.1 index 93495090..af424af2 100644 --- a/mysql-wsrep-5.6/man/mysqld_safe.1 +++ b/mysql-wsrep-5.6/man/mysqld_safe.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysqld_safe\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/02/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQLD_SAFE\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQLD_SAFE\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,9 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysqld_safe -.\" tools: mysqld_safe -.\" scripts .SH "NAME" mysqld_safe \- MySQL server startup script .SH "SYNOPSIS" @@ -115,8 +112,6 @@ Section\ \&4.2.7, \(lqCommand-Line Options that Affect Option-File Handling\(rq\ .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_safe: help option -.\" help option: mysqld_safe \fB\-\-help\fR .sp Display a help message and exit\&. @@ -130,8 +125,6 @@ Display a help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_safe: basedir option -.\" basedir option: mysqld_safe \fB\-\-basedir=\fR\fB\fIdir_name\fR\fR .sp The path to the MySQL installation directory\&. @@ -145,8 +138,6 @@ The path to the MySQL installation directory\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_safe: core-file-size option -.\" core-file-size option: mysqld_safe \fB\-\-core\-file\-size=\fR\fB\fIsize\fR\fR .sp The size of the core file that @@ -163,8 +154,6 @@ should be able to create\&. The option value is passed to .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_safe: datadir option -.\" datadir option: mysqld_safe \fB\-\-datadir=\fR\fB\fIdir_name\fR\fR .sp The path to the data directory\&. @@ -178,8 +167,6 @@ The path to the data directory\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_safe: defaults-extra-file option -.\" defaults-extra-file option: mysqld_safe \fB\-\-defaults\-extra\-file=\fR\fB\fIfile_name\fR\fR .sp The name of an option file to be read in addition to the usual option files\&. This must be the first option on the command line if it is used\&. If the file does not exist or is otherwise inaccessible, the server will exit with an error\&. @@ -193,8 +180,6 @@ The name of an option file to be read in addition to the usual option files\&. T .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_safe: defaults-file option -.\" defaults-file option: mysqld_safe \fB\-\-defaults\-file=\fR\fB\fIfile_name\fR\fR .sp The name of an option file to be read instead of the usual option files\&. This must be the first option on the command line if it is used\&. @@ -208,8 +193,6 @@ The name of an option file to be read instead of the usual option files\&. This .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_safe: ledir option -.\" ledir option: mysqld_safe \fB\-\-ledir=\fR\fB\fIdir_name\fR\fR .sp If @@ -225,12 +208,10 @@ cannot find the server, use this option to indicate the path name to the directo .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_safe: log-error option -.\" log-error option: mysqld_safe \fB\-\-log\-error=\fR\fB\fIfile_name\fR\fR .sp Write the error log to the given file\&. See -Section\ \&5.2.2, \(lqThe Error Log\(rq\&. +Section\ \&5.4.2, \(lqThe Error Log\(rq\&. .RE .sp .RS 4 @@ -241,17 +222,33 @@ Section\ \&5.2.2, \(lqThe Error Log\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_safe: malloc-lib option -.\" mysqld option: malloc-lib \fB\-\-malloc\-lib=[\fR\fB\fIlib_name\fR\fR\fB]\fR -.\" memory allocation library -.\" tcmalloc: memory allocation library The name of the library to use for memory allocation instead of the system malloc() -library\&. Any library can be used by specifying its path name, but there is a shortcut form to enable use of the +library\&. As of MySQL 5\&.6\&.33, the option value must be one of the directories +/usr/lib, +/usr/lib64, +/usr/lib/i386\-linux\-gnu, or +/usr/lib/x86_64\-linux\-gnu\&. Prior to MySQL 5\&.6\&.33, any library can be used by specifying its path name, but there is a shortcut form to enable use of the tcmalloc library that is shipped with binary MySQL distributions for Linux in MySQL 5\&.6\&. It is possible that the shortcut form will not work under certain configurations, in which case you should specify a path name instead\&. +.if n \{\ .sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +As of MySQL 5\&.6\&.31, MySQL distributions no longer include a +tcmalloc +library\&. +.sp .5v +.RE The \fB\-\-malloc\-lib\fR option works by modifying the @@ -379,8 +376,6 @@ malloc\-lib=/opt/lib/libtcmalloc_minimal\&.so .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_safe: mysqld option -.\" mysqld option: mysqld_safe \fB\-\-mysqld=\fR\fB\fIprog_name\fR\fR .sp The name of the server program (in the @@ -390,6 +385,8 @@ directory) that you want to start\&. This option is needed if you use the MySQL cannot find the server, use the \fB\-\-ledir\fR option to indicate the path name to the directory where the server is located\&. +.sp +As of MySQL 5\&.6\&.33, this option can be given only on the command line and not in an option file\&. .RE .sp .RS 4 @@ -400,8 +397,6 @@ option to indicate the path name to the directory where the server is located\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_safe: mysqld-version option -.\" mysqld-version option: mysqld_safe \fB\-\-mysqld\-version=\fR\fB\fIsuffix\fR\fR .sp This option is similar to the @@ -423,6 +418,8 @@ uses in the ledir directory\&. +.sp +As of MySQL 5\&.6\&.33, this option can be given only on the command line and not in an option file\&. .RE .sp .RS 4 @@ -433,8 +430,6 @@ directory\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_safe: nice option -.\" nice option: mysqld_safe \fB\-\-nice=\fR\fB\fIpriority\fR\fR .sp Use the @@ -450,8 +445,6 @@ program to set the server\*(Aqs scheduling priority to the given value\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_safe: no-defaults option -.\" no-defaults option: mysqld_safe \fB\-\-no\-defaults\fR .sp Do not read any option files\&. This must be the first option on the command line if it is used\&. @@ -465,8 +458,6 @@ Do not read any option files\&. This must be the first option on the command lin .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_safe: open-files-limit option -.\" open-files-limit option: mysqld_safe \fB\-\-open\-files\-limit=\fR\fB\fIcount\fR\fR .sp The number of files that @@ -502,8 +493,6 @@ for this to function properly\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_safe: pid-file option -.\" pid-file option: mysqld_safe \fB\-\-pid\-file=\fR\fB\fIfile_name\fR\fR .sp The path name of the process ID file\&. @@ -517,8 +506,6 @@ The path name of the process ID file\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_safe: plugin-dir option -.\" plugin-dir option: mysqld_safe \fB\-\-plugin\-dir=\fR\fB\fIdir_name\fR\fR .sp The path name of the plugin directory\&. @@ -532,9 +519,6 @@ The path name of the plugin directory\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_safe: port option -.\" port option: mysqld_safe -.\" TCP/IP \fB\-\-port=\fR\fB\fIport_num\fR\fR .sp The port number that the server should use when listening for TCP/IP connections\&. The port number must be 1024 or higher unless the server is started by the @@ -550,8 +534,6 @@ system user\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_safe: skip-kill-mysqld option -.\" skip-kill-mysqld option: mysqld_safe \fB\-\-skip\-kill\-mysqld\fR .sp Do not try to kill stray @@ -567,8 +549,6 @@ processes at startup\&. This option works only on Linux\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_safe: socket option -.\" socket option: mysqld_safe \fB\-\-socket=\fR\fB\fIpath\fR\fR .sp The Unix socket file that the server should use when listening for local connections\&. @@ -582,10 +562,6 @@ The Unix socket file that the server should use when listening for local connect .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_safe: syslog option -.\" syslog option: mysqld_safe -.\" mysqld_safe: skip-syslog option -.\" skip-syslog option: mysqld_safe \fB\-\-syslog\fR, \fB\-\-skip\-syslog\fR .sp @@ -614,8 +590,6 @@ syslog facility/severity is used for all log messages\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_safe: syslog-tag option -.\" syslog-tag option: mysqld_safe \fB\-\-syslog\-tag=\fR\fB\fItag\fR\fR .sp For logging to @@ -641,8 +615,6 @@ mysqld\-\fItag\fR\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_safe: timezone option -.\" timezone option: mysqld_safe \fB\-\-timezone=\fR\fB\fItimezone\fR\fR .sp Set the @@ -658,8 +630,6 @@ time zone environment variable to the given option value\&. Consult your operati .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_safe: user option -.\" user option: mysqld_safe \fB\-\-user={\fR\fB\fIuser_name\fR\fR\fB|\fR\fB\fIuser_id\fR\fR\fB}\fR .sp Run the diff --git a/mysql-wsrep-5.6/man/mysqldump.1 b/mysql-wsrep-5.6/man/mysqldump.1 index 84140c91..6088a23c 100644 --- a/mysql-wsrep-5.6/man/mysqldump.1 +++ b/mysql-wsrep-5.6/man/mysqldump.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysqldump\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/02/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQLDUMP\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQLDUMP\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,11 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysqldump -.\" dumping: databases and tables -.\" backups: databases and tables -.\" databases: dumping -.\" tables: dumping .SH "NAME" mysqldump \- a database backup program .SH "SYNOPSIS" @@ -282,7 +277,7 @@ shell> \fBmysqldump [options] > dump\&.sql\fR .\} .PP However, UTF\-16 is not permitted as a connection character set (see -Section\ \&10.1.4, \(lqConnection Character Sets and Collations\(rq), so the dump file will not load correctly\&. To work around this issue, use the +Section\ \&10.1.5, \(lqConnection Character Sets and Collations\(rq), so the dump file will not load correctly\&. To work around this issue, use the \fB\-\-result\-file\fR option, which creates the output in ASCII format: .sp @@ -419,8 +414,6 @@ command logs into a MySQL server to extract information\&. The following options .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: bind-address option -.\" bind-address option: mysqldump \fB\-\-bind\-address=\fR\fB\fIip_address\fR\fR .sp On a computer having multiple network interfaces, use this option to select which interface to use for connecting to the MySQL server\&. @@ -436,8 +429,6 @@ This option is supported beginning with MySQL 5\&.6\&.1\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: compress option -.\" compress option: mysqldump \fB\-\-compress\fR, \fB\-C\fR .sp @@ -452,8 +443,6 @@ Compress all information sent between the client and the server if both support .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: default-auth option -.\" default-auth option: mysqldump \fB\-\-default\-auth=\fR\fB\fIplugin\fR\fR .sp A hint about the client\-side authentication plugin to use\&. See @@ -468,14 +457,12 @@ Section\ \&6.3.7, \(lqPluggable Authentication\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: enable-cleartext-plugin option -.\" enable-cleartext-plugin option: mysqldump \fB\-\-enable\-cleartext\-plugin\fR .sp Enable the mysql_clear_password cleartext authentication plugin\&. (See -Section\ \&6.4.1.7, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) +Section\ \&6.5.1.7, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) .sp This option was added in MySQL 5\&.6\&.28\&. .RE @@ -488,8 +475,6 @@ This option was added in MySQL 5\&.6\&.28\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: host option -.\" host option: mysqldump \fB\-\-host=\fR\fB\fIhost_name\fR\fR, \fB\-h \fR\fB\fIhost_name\fR\fR .sp @@ -505,8 +490,6 @@ localhost\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: login-path option -.\" login-path option: mysqldump \fB\-\-login\-path=\fR\fB\fIname\fR\fR .sp Read options from the named login path in the @@ -527,8 +510,6 @@ utility\&. See .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: password option -.\" password option: mysqldump \fB\-\-password[=\fR\fB\fIpassword\fR\fR\fB]\fR, \fB\-p[\fR\fB\fIpassword\fR\fR\fB]\fR .sp @@ -556,8 +537,6 @@ Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: pipe option -.\" pipe option: mysqldump \fB\-\-pipe\fR, \fB\-W\fR .sp @@ -572,8 +551,6 @@ On Windows, connect to the server using a named pipe\&. This option applies only .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: plugin-dir option -.\" plugin-dir option: mysqldump \fB\-\-plugin\-dir=\fR\fB\fIdir_name\fR\fR .sp The directory in which to look for plugins\&. Specify this option if the @@ -592,8 +569,6 @@ Section\ \&6.3.7, \(lqPluggable Authentication\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: port option -.\" port option: mysqldump \fB\-\-port=\fR\fB\fIport_num\fR\fR, \fB\-P \fR\fB\fIport_num\fR\fR .sp @@ -608,8 +583,6 @@ The TCP/IP port number to use for the connection\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: protocol option -.\" protocol option: mysqldump \fB\-\-protocol={TCP|SOCKET|PIPE|MEMORY}\fR .sp The connection protocol to use for connecting to the server\&. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\&. For details on the permissible values, see @@ -624,8 +597,6 @@ Section\ \&4.2.2, \(lqConnecting to the MySQL Server\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: secure-auth option -.\" secure-auth option: mysqldump \fB\-\-secure\-auth\fR .sp Do not send passwords to the server in old (pre\-4\&.1) format\&. This prevents connections except for servers that use the newer password format\&. This option is enabled by default; use @@ -644,7 +615,22 @@ to disable it\&. This option was added in MySQL 5\&.6\&.17\&. .ps -1 .br Passwords that use the pre\-4\&.1 hashing method are less secure than passwords that use the native password hashing method and should be avoided\&. Pre\-4\&.1 passwords are deprecated and support for them will be removed in a future MySQL release\&. For account upgrade instructions, see -Section\ \&6.4.1.3, \(lqMigrating Away from Pre-4.1 Password Hashing and the mysql_old_password Plugin\(rq\&. +Section\ \&6.5.1.3, \(lqMigrating Away from Pre-4.1 Password Hashing and the mysql_old_password Plugin\(rq\&. +.sp .5v +.RE +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +This option is deprecated and will be removed in a future release\&. As of MySQL 5\&.7\&.5, it is always enabled and attempting to disable it produces an error\&. .sp .5v .RE .RE @@ -657,8 +643,6 @@ Section\ \&6.4.1.3, \(lqMigrating Away from Pre-4.1 Password Hashing and the mys .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: socket option -.\" socket option: mysqldump \fB\-\-socket=\fR\fB\fIpath\fR\fR, \fB\-S \fR\fB\fIpath\fR\fR .sp @@ -674,14 +658,12 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: SSL options -.\" SSL options: mysqldump \fB\-\-ssl*\fR .sp Options that begin with \fB\-\-ssl\fR specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See -Section\ \&6.3.9.5, \(lqCommand Options for Secure Connections\(rq\&. +Section\ \&6.4.5, \(lqCommand Options for Secure Connections\(rq\&. .RE .sp .RS 4 @@ -692,8 +674,6 @@ Section\ \&6.3.9.5, \(lqCommand Options for Secure Connections\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: user option -.\" user option: mysqldump \fB\-\-user=\fR\fB\fIuser_name\fR\fR, \fB\-u \fR\fB\fIuser_name\fR\fR .sp @@ -752,8 +732,6 @@ These options are used to control which option files to read\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: defaults-extra-file option -.\" defaults-extra-file option: mysqldump \fB\-\-defaults\-extra\-file=\fR\fB\fIfile_name\fR\fR .sp Read this option file after the global option file but (on Unix) before the user option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. @@ -769,8 +747,6 @@ is interpreted relative to the current directory if given as a relative path nam .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: defaults-file option -.\" defaults-file option: mysqldump \fB\-\-defaults\-file=\fR\fB\fIfile_name\fR\fR .sp Use only the given option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. @@ -786,8 +762,6 @@ is interpreted relative to the current directory if given as a relative path nam .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: defaults-group-suffix option -.\" defaults-group-suffix option: mysqldump \fB\-\-defaults\-group\-suffix=\fR\fB\fIstr\fR\fR .sp Read not only the usual option groups, but also groups with the usual names and a suffix of @@ -816,8 +790,6 @@ groups\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: no-defaults option -.\" no-defaults option: mysqldump \fB\-\-no\-defaults\fR .sp Do not read any option files\&. If program startup fails due to reading unknown options from an option file, @@ -843,8 +815,6 @@ utility\&. See .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: print-defaults option -.\" print-defaults option: mysqldump \fB\-\-print\-defaults\fR .sp Print the program name and all options that it gets from option files\&. @@ -862,8 +832,6 @@ include setting up an entire new MySQL instance (including database tables), and .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: add-drop-database option -.\" add-drop-database option: mysqldump \fB\-\-add\-drop\-database\fR .sp Write a @@ -887,8 +855,6 @@ statements are written unless one of those options is specified\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: add-drop-table option -.\" add-drop-table option: mysqldump \fB\-\-add\-drop\-table\fR .sp Write a @@ -906,8 +872,6 @@ statement\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: add-drop-trigger option -.\" add-drop-trigger option: mysqldump \fB\-\-add\-drop\-trigger\fR .sp Write a @@ -925,8 +889,6 @@ statement\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: all-tablespaces option -.\" all-tablespaces option: mysqldump \fB\-\-all\-tablespaces\fR, \fB\-Y\fR .sp @@ -944,8 +906,6 @@ table\&. This information is not otherwise included in the output from .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: no-create-db option -.\" no-create-db option: mysqldump \fB\-\-no\-create\-db\fR, \fB\-n\fR .sp @@ -966,8 +926,6 @@ option is given\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: no-create-info option -.\" no-create-info option: mysqldump \fB\-\-no\-create\-info\fR, \fB\-t\fR .sp @@ -1005,8 +963,6 @@ option for this purpose\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: no-tablespaces option -.\" no-tablespaces option: mysqldump \fB\-\-no\-tablespaces\fR, \fB\-y\fR .sp @@ -1026,8 +982,6 @@ statements in the output of .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: replace option -.\" replace option: mysqldump \fB\-\-replace\fR .sp Write @@ -1047,8 +1001,6 @@ The following options print debugging information, encode debugging information .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: allow-keywords option -.\" allow-keywords option: mysqldump \fB\-\-allow\-keywords\fR .sp Permit creation of column names that are keywords\&. This works by prefixing each column name with the table name\&. @@ -1062,8 +1014,6 @@ Permit creation of column names that are keywords\&. This works by prefixing eac .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: comments option -.\" comments option: mysqldump \fB\-\-comments\fR, \fB\-i\fR .sp @@ -1079,8 +1029,6 @@ Write additional information in the dump file such as program version, server ve .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: debug option -.\" debug option: mysqldump \fB\-\-debug[=\fR\fB\fIdebug_options\fR\fR\fB]\fR, \fB\-# [\fR\fB\fIdebug_options\fR\fR\fB]\fR .sp @@ -1099,8 +1047,6 @@ d:t:o,/tmp/mysqldump\&.trace\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: debug-check option -.\" debug-check option: mysqldump \fB\-\-debug\-check\fR .sp Print some debugging information when the program exits\&. @@ -1114,8 +1060,6 @@ Print some debugging information when the program exits\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: debug-info option -.\" debug-info option: mysqldump \fB\-\-debug\-info\fR .sp Print debugging information and memory and CPU usage statistics when the program exits\&. @@ -1129,8 +1073,6 @@ Print debugging information and memory and CPU usage statistics when the program .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: dump-date option -.\" dump-date option: mysqldump \fB\-\-dump\-date\fR .sp If the @@ -1168,8 +1110,6 @@ suppresses date printing\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: force option -.\" force option: mysqldump \fB\-\-force\fR, \fB\-f\fR .sp @@ -1194,8 +1134,6 @@ prints the error message, but it also writes an SQL comment containing the view .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: log-error option -.\" log-error option: mysqldump \fB\-\-log\-error=\fR\fB\fIfile_name\fR\fR .sp Log warnings and errors by appending them to the named file\&. The default is to do no logging\&. @@ -1209,8 +1147,6 @@ Log warnings and errors by appending them to the named file\&. The default is to .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: skip-comments option -.\" skip-comments option: mysqldump \fB\-\-skip\-comments\fR .sp See the description for the @@ -1226,8 +1162,6 @@ option\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: verbose option -.\" verbose option: mysqldump \fB\-\-verbose\fR, \fB\-v\fR .sp @@ -1246,8 +1180,6 @@ command itself\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: help option -.\" help option: mysqldump \fB\-\-help\fR, \fB\-?\fR .sp @@ -1262,8 +1194,6 @@ Display a help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: version option -.\" version option: mysqldump \fB\-\-version\fR, \fB\-V\fR .sp @@ -1282,8 +1212,6 @@ command represents character data with national language settings\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: character-sets-dir option -.\" character-sets-dir option: mysqldump \fB\-\-character\-sets\-dir=\fR\fB\fIdir_name\fR\fR .sp The directory where character sets are installed\&. See @@ -1298,8 +1226,6 @@ Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: default-character-set option -.\" default-character-set option: mysqldump \fB\-\-default\-character\-set=\fR\fB\fIcharset_name\fR\fR .sp Use @@ -1319,8 +1245,6 @@ utf8\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: no-set-names option -.\" no-set-names option: mysqldump \fB\-\-no\-set\-names\fR, \fB\-N\fR .sp @@ -1338,8 +1262,6 @@ setting, the same as specifying .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: set-charset option -.\" set-charset option: mysqldump \fB\-\-set\-charset\fR .sp Write @@ -1362,8 +1284,6 @@ command is frequently used to create an empty instance, or an instance including .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: apply-slave-statements option -.\" apply-slave-statements option: mysqldump \fB\-\-apply\-slave\-statements\fR .sp For a slave dump produced with the @@ -1385,8 +1305,6 @@ statement at the end of the output\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: delete-master-logs option -.\" delete-master-logs option: mysqldump \fB\-\-delete\-master\-logs\fR .sp On a master replication server, delete the binary logs by sending a @@ -1403,8 +1321,6 @@ statement to the server after performing the dump operation\&. This option autom .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: dump-slave option -.\" dump-slave option: mysqldump \fB\-\-dump\-slave[=\fR\fB\fIvalue\fR\fR\fB]\fR .sp This option is similar to @@ -1448,8 +1364,6 @@ options can also be used\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: include-master-host-port option -.\" include-master-host-port option: mysqldump \fB\-\-include\-master\-host\-port\fR .sp For the @@ -1471,8 +1385,6 @@ options for the host name and TCP/IP port number of the slave\*(Aqs master\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: master-data option -.\" master-data option: mysqldump \fB\-\-master\-data[=\fR\fB\fIvalue\fR\fR\fB]\fR .sp Use this option to dump a master replication server to produce a dump file that can be used to set up another server as a slave of the master\&. It causes the dump output to include a @@ -1514,8 +1426,6 @@ Section\ \&17.2.2, \(lqReplication Relay and Status Logs\(rq)\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: set-gtid-purged option -.\" set-gtid-purged option: mysqldump \fB\-\-set\-gtid\-purged=\fR\fB\fIvalue\fR\fR .sp This option enables control over global transaction ID (GTID) information written to the dump file, by indicating whether to add a @@ -1614,8 +1524,6 @@ The following options specify how to represent the entire dump file or certain k .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: compact option -.\" compact option: mysqldump \fB\-\-compact\fR .sp Produce more compact output\&. This option enables the @@ -1635,8 +1543,6 @@ options\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: compatible option -.\" compatible option: mysqldump \fB\-\-compatible=\fR\fB\fIname\fR\fR .sp Produce output that is more compatible with other database systems or with older MySQL servers\&. The value of @@ -1670,8 +1576,6 @@ does not map data types to Oracle types or use Oracle comment syntax\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: complete-insert option -.\" complete-insert option: mysqldump \fB\-\-complete\-insert\fR, \fB\-c\fR .sp @@ -1688,8 +1592,6 @@ statements that include column names\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: create-options option -.\" create-options option: mysqldump \fB\-\-create\-options\fR .sp Include all MySQL\-specific table options in the @@ -1705,17 +1607,9 @@ statements\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: fields-terminated-by option -.\" fields-terminated-by option: mysqldump \fB\-\-fields\-terminated\-by=\&.\&.\&.\fR, -.\" mysqldump: fields-enclosed-by option -.\" fields-enclosed-by option: mysqldump \fB\-\-fields\-enclosed\-by=\&.\&.\&.\fR, -.\" mysqldump: fields-optionally-enclosed-by option -.\" fields-optionally-enclosed-by option: mysqldump \fB\-\-fields\-optionally\-enclosed\-by=\&.\&.\&.\fR, -.\" mysqldump: fields-escaped-by option -.\" fields-escaped-by option: mysqldump \fB\-\-fields\-escaped\-by=\&.\&.\&.\fR .sp These options are used with the @@ -1735,8 +1629,6 @@ Section\ \&13.2.6, \(lqLOAD DATA INFILE Syntax\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: hex-blob option -.\" hex-blob option: mysqldump \fB\-\-hex\-blob\fR .sp Dump binary columns using hexadecimal notation (for example, @@ -1758,8 +1650,6 @@ BIT\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: lines-terminated-by option -.\" lines-terminated-by option: mysqldump \fB\-\-lines\-terminated\-by=\&.\&.\&.\fR .sp This option is used with the @@ -1779,8 +1669,6 @@ Section\ \&13.2.6, \(lqLOAD DATA INFILE Syntax\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: quote-names option -.\" quote-names option: mysqldump \fB\-\-quote\-names\fR, \fB\-Q\fR .sp @@ -1805,8 +1693,6 @@ that may enable .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: result-file option -.\" result-file option: mysqldump \fB\-\-result\-file=\fR\fB\fIfile_name\fR\fR, \fB\-r \fR\fB\fIfile_name\fR\fR .sp @@ -1827,8 +1713,6 @@ carriage return/newline sequences\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: tab option -.\" tab option: mysqldump \fB\-\-tab=\fR\fB\fIdir_name\fR\fR, \fB\-T \fR\fB\fIdir_name\fR\fR .sp @@ -1889,8 +1773,6 @@ option\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: tz-utc option -.\" tz-utc option: mysqldump \fB\-\-tz\-utc\fR .sp This option enables @@ -1917,8 +1799,6 @@ is enabled by default\&. To disable it, use .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: xml option -.\" xml option: mysqldump \fB\-\-xml\fR, \fB\-X\fR .sp @@ -2033,8 +1913,6 @@ clause\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: all-databases option -.\" all-databases option: mysqldump \fB\-\-all\-databases\fR, \fB\-A\fR .sp @@ -2058,8 +1936,6 @@ Section\ \&17.2.2, \(lqReplication Relay and Status Logs\(rq) were not included .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: databases option -.\" databases option: mysqldump \fB\-\-databases\fR, \fB\-B\fR .sp @@ -2080,8 +1956,6 @@ statements are included in the output before each new database\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: events option -.\" events option: mysqldump \fB\-\-events\fR, \fB\-E\fR .sp @@ -2111,8 +1985,6 @@ database\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: ignore-table option -.\" ignore-table option: mysqldump \fB\-\-ignore\-table=\fR\fB\fIdb_name\&.tbl_name\fR\fR .sp Do not dump the given table, which must be specified using both the database and table names\&. To ignore multiple tables, use this option multiple times\&. This option also can be used to ignore views\&. @@ -2126,8 +1998,6 @@ Do not dump the given table, which must be specified using both the database and .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: no-data option -.\" no-data option: mysqldump \fB\-\-no\-data\fR, \fB\-d\fR .sp @@ -2144,8 +2014,6 @@ statement for the table (for example, to create an empty copy of the table by lo .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: routines option -.\" routines option: mysqldump \fB\-\-routines\fR, \fB\-R\fR .sp @@ -2183,8 +2051,6 @@ option\&. (Bug #11760384, Bug #52792) .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: tables option -.\" tables option: mysqldump \fB\-\-tables\fR .sp Override the @@ -2204,12 +2070,14 @@ regards all name arguments following the option as table names\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: triggers option -.\" triggers option: mysqldump \fB\-\-triggers\fR .sp Include triggers for each dumped table in the output\&. This option is enabled by default; disable it with \fB\-\-skip\-triggers\fR\&. +.sp +To be able to dump a table\*(Aqs triggers, you must have the +TRIGGER +privilege for the table\&. .RE .sp .RS 4 @@ -2220,8 +2088,6 @@ Include triggers for each dumped table in the output\&. This option is enabled b .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: where option -.\" where option: mysqldump \fB\-\-where=\*(Aq\fR\fB\fIwhere_condition\fR\fR\fB\*(Aq\fR, \fB\-w \*(Aq\fR\fB\fIwhere_condition\fR\fR\fB\*(Aq\fR .sp @@ -2265,8 +2131,6 @@ transactional options, primarily for the dump operation\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: delayed-insert option -.\" delayed-insert option: mysqldump \fB\-\-delayed\-insert\fR .sp For those nontransactional tables that support the @@ -2288,8 +2152,6 @@ inserts are deprecated, so this option will be removed in a future release\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: disable-keys option -.\" disable-keys option: mysqldump \fB\-\-disable\-keys\fR, \fB\-K\fR .sp @@ -2312,8 +2174,6 @@ tables\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: extended-insert option -.\" extended-insert option: mysqldump \fB\-\-extended\-insert\fR, \fB\-e\fR .sp @@ -2332,8 +2192,6 @@ lists\&. This results in a smaller dump file and speeds up inserts when the file .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: insert-ignore option -.\" insert-ignore option: mysqldump \fB\-\-insert\-ignore\fR .sp Write @@ -2351,8 +2209,6 @@ statements\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: opt option -.\" opt option: mysqldump \fB\-\-opt\fR .sp This option, enabled by default, is shorthand for the combination of @@ -2383,8 +2239,6 @@ for information about selectively enabling or disabling a subset of the options .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: quick option -.\" quick option: mysqldump \fB\-\-quick\fR, \fB\-q\fR .sp @@ -2401,8 +2255,6 @@ to retrieve rows for a table from the server a row at a time rather than retriev .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: skip-opt option -.\" skip-opt option: mysqldump \fB\-\-skip\-opt\fR .sp See the description for the @@ -2420,8 +2272,6 @@ The following options trade off the performance of the dump operation, against t .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: add-locks option -.\" add-locks option: mysqldump \fB\-\-add\-locks\fR .sp Surround each table dump with @@ -2440,8 +2290,6 @@ Section\ \&8.2.2.1, \(lqSpeed of INSERT Statements\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: flush-logs option -.\" flush-logs option: mysqldump \fB\-\-flush\-logs\fR, \fB\-F\fR .sp @@ -2469,8 +2317,6 @@ together with .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: flush-privileges option -.\" flush-privileges option: mysqldump \fB\-\-flush\-privileges\fR .sp Add a @@ -2492,8 +2338,6 @@ database for proper restoration\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: lock-all-tables option -.\" lock-all-tables option: mysqldump \fB\-\-lock\-all\-tables\fR, \fB\-x\fR .sp @@ -2511,8 +2355,6 @@ and .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: lock-tables option -.\" lock-tables option: mysqldump \fB\-\-lock\-tables\fR, \fB\-l\fR .sp @@ -2546,8 +2388,6 @@ at the end of the option list\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: no-autocommit option -.\" no-autocommit option: mysqldump \fB\-\-no\-autocommit\fR .sp Enclose the @@ -2567,8 +2407,6 @@ statements\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: order-by-primary option -.\" order-by-primary option: mysqldump \fB\-\-order\-by\-primary\fR .sp Dump each table\*(Aqs rows sorted by its primary key, or by its first unique index, if such an index exists\&. This is useful when dumping a @@ -2586,8 +2424,6 @@ table, but makes the dump operation take considerably longer\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: shared-memory-base-name option -.\" shared-memory-base-name option: mysqldump \fB\-\-shared\-memory\-base\-name=\fR\fB\fIname\fR\fR .sp On Windows, the shared\-memory name to use, for connections made using shared memory to a local server\&. The default value is @@ -2606,8 +2442,6 @@ option to enable shared\-memory connections\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: single-transaction option -.\" single-transaction option: mysqldump \fB\-\-single\-transaction\fR .sp This option sets the transaction isolation mode to @@ -2795,7 +2629,7 @@ statement is issued, the MySQL server may get stalled until those statements fin For point\-in\-time recovery (also known as \(lqroll\-forward,\(rq when you need to restore an old backup and replay the changes that happened since that backup), it is often useful to rotate the binary log (see -Section\ \&5.2.4, \(lqThe Binary Log\(rq) or at least know the binary log coordinates to which the dump corresponds: +Section\ \&5.4.4, \(lqThe Binary Log\(rq) or at least know the binary log coordinates to which the dump corresponds: .sp .if n \{\ .RS 4 @@ -2870,10 +2704,7 @@ for all features except index disabling and table locking, use \fB\-\-disable\-keys\fR \fB\-\-lock\-tables\fR\&. .RE -Restrictions.\" mysqldump: views -.\" mysqldump: problems -.\" mysqldump: workarounds -.PP +Restrictions.PP \fBmysqldump\fR does not dump the INFORMATION_SCHEMA diff --git a/mysql-wsrep-5.6/man/mysqldumpslow.1 b/mysql-wsrep-5.6/man/mysqldumpslow.1 index 8a8451f4..6cdc05b8 100644 --- a/mysql-wsrep-5.6/man/mysqldumpslow.1 +++ b/mysql-wsrep-5.6/man/mysqldumpslow.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysqldumpslow\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/02/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQLDUMPSLOW\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQLDUMPSLOW\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysqldumpslow .SH "NAME" mysqldumpslow \- Summarize slow query log files .SH "SYNOPSIS" @@ -36,7 +35,7 @@ mysqldumpslow \- Summarize slow query log files .SH "DESCRIPTION" .PP The MySQL slow query log contains information about queries that take a long time to execute (see -Section\ \&5.2.5, \(lqThe Slow Query Log\(rq)\&. +Section\ \&5.4.5, \(lqThe Slow Query Log\(rq)\&. \fBmysqldumpslow\fR parses MySQL slow query log files and prints a summary of their contents\&. .PP @@ -79,8 +78,6 @@ supports the following options\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldumpslow: help option -.\" help option: mysqldumpslow \fB\-\-help\fR .sp Display a help message and exit\&. @@ -110,8 +107,6 @@ and strings to .sp -1 .IP \(bu 2.3 .\} -.\" mysqldumpslow: debug option -.\" debug option: mysqldumpslow \fB\-\-debug\fR, \fB\-d\fR .sp @@ -294,8 +289,6 @@ queries in the output\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldumpslow: verbose option -.\" verbose option: mysqldumpslow \fB\-\-verbose\fR, \fB\-v\fR .sp diff --git a/mysql-wsrep-5.6/man/mysqlhotcopy.1 b/mysql-wsrep-5.6/man/mysqlhotcopy.1 index 8d7114c0..b9ebe60a 100644 --- a/mysql-wsrep-5.6/man/mysqlhotcopy.1 +++ b/mysql-wsrep-5.6/man/mysqlhotcopy.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysqlhotcopy\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/02/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQLHOTCOPY\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQLHOTCOPY\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,11 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysqlhotcopy -.\" dumping: databases and tables -.\" backups: databases and tables -.\" databases: dumping -.\" tables: dumping .SH "NAME" mysqlhotcopy \- a database backup program .SH "SYNOPSIS" @@ -140,8 +135,6 @@ Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlhotcopy: help option -.\" help option: mysqlhotcopy \fB\-\-help\fR, \fB\-?\fR .sp @@ -156,8 +149,6 @@ Display a help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlhotcopy: addtodest option -.\" addtodest option: mysqlhotcopy \fB\-\-addtodest\fR .sp Do not rename target directory (if it exists); merely add files to it\&. @@ -171,8 +162,6 @@ Do not rename target directory (if it exists); merely add files to it\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlhotcopy: allowold option -.\" allowold option: mysqlhotcopy \fB\-\-allowold\fR .sp Do not abort if a target exists; rename it by adding an @@ -188,8 +177,6 @@ suffix\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlhotcopy: checkpoint option -.\" checkpoint option: mysqlhotcopy \fB\-\-checkpoint=\fR\fB\fIdb_name\fR\fR\fB\&.\fR\fB\fItbl_name\fR\fR .sp Insert checkpoint entries into the specified database @@ -206,8 +193,6 @@ and table .sp -1 .IP \(bu 2.3 .\} -.\" mysqlhotcopy: chroot option -.\" chroot option: mysqlhotcopy \fB\-\-chroot=\fR\fB\fIdir_name\fR\fR .sp Base directory of the @@ -230,8 +215,6 @@ option given to .sp -1 .IP \(bu 2.3 .\} -.\" mysqlhotcopy: debug option -.\" debug option: mysqlhotcopy \fB\-\-debug\fR .sp Enable debug output\&. @@ -245,8 +228,6 @@ Enable debug output\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlhotcopy: dryrun option -.\" dryrun option: mysqlhotcopy \fB\-\-dryrun\fR, \fB\-n\fR .sp @@ -261,8 +242,6 @@ Report actions without performing them\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlhotcopy: flushlog option -.\" flushlog option: mysqlhotcopy \fB\-\-flushlog\fR .sp Flush logs after all tables are locked\&. @@ -276,8 +255,6 @@ Flush logs after all tables are locked\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlhotcopy: host option -.\" host option: mysqlhotcopy \fB\-\-host=\fR\fB\fIhost_name\fR\fR, \fB\-h \fR\fB\fIhost_name\fR\fR .sp @@ -294,8 +271,6 @@ using a Unix socket file\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlhotcopy: keepold option -.\" keepold option: mysqlhotcopy \fB\-\-keepold\fR .sp Do not delete previous (renamed) target when done\&. @@ -309,8 +284,6 @@ Do not delete previous (renamed) target when done\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlhotcopy: method option -.\" method option: mysqlhotcopy \fB\-\-method=\fR\fB\fIcommand\fR\fR .sp The method for copying files (cp @@ -327,8 +300,6 @@ cp\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlhotcopy: noindices option -.\" noindices option: mysqlhotcopy \fB\-\-noindices\fR .sp Do not include full index files for @@ -345,8 +316,6 @@ tables in the backup\&. This makes the backup smaller and faster\&. The indexes .sp -1 .IP \(bu 2.3 .\} -.\" mysqlhotcopy: password option -.\" password option: mysqlhotcopy \fB\-\-password=\fR\fB\fIpassword\fR\fR, \fB\-p\fR\fB\fIpassword\fR\fR .sp @@ -364,8 +333,6 @@ Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can .sp -1 .IP \(bu 2.3 .\} -.\" mysqlhotcopy: port option -.\" port option: mysqlhotcopy \fB\-\-port=\fR\fB\fIport_num\fR\fR, \fB\-P \fR\fB\fIport_num\fR\fR .sp @@ -380,8 +347,6 @@ The TCP/IP port number to use when connecting to the local server\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlhotcopy: old_server option -.\" old_server option: mysqlhotcopy \fB\-\-old_server\fR .sp In MySQL 5\&.6, @@ -401,8 +366,6 @@ option if the server is older than 5\&.5\&.3, which is when that statement was i .sp -1 .IP \(bu 2.3 .\} -.\" mysqlhotcopy: quiet option -.\" quiet option: mysqlhotcopy \fB\-\-quiet\fR, \fB\-q\fR .sp @@ -417,8 +380,6 @@ Be silent except for errors\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlhotcopy: record_log_pos option -.\" record_log_pos option: mysqlhotcopy \fB\-\-record_log_pos=\fR\fB\fIdb_name\fR\fR\fB\&.\fR\fB\fItbl_name\fR\fR .sp Record master and slave status in the specified database @@ -435,8 +396,6 @@ and table .sp -1 .IP \(bu 2.3 .\} -.\" mysqlhotcopy: regexp option -.\" regexp option: mysqlhotcopy \fB\-\-regexp=\fR\fB\fIexpr\fR\fR .sp Copy all databases with names that match the given regular expression\&. @@ -450,8 +409,6 @@ Copy all databases with names that match the given regular expression\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlhotcopy: resetmaster option -.\" resetmaster option: mysqlhotcopy \fB\-\-resetmaster\fR .sp Reset the binary log after locking all the tables\&. @@ -465,8 +422,6 @@ Reset the binary log after locking all the tables\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlhotcopy: resetslave option -.\" resetslave option: mysqlhotcopy \fB\-\-resetslave\fR .sp Reset the master info repository file or table after locking all the tables\&. @@ -480,8 +435,6 @@ Reset the master info repository file or table after locking all the tables\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlhotcopy: socket option -.\" socket option: mysqlhotcopy \fB\-\-socket=\fR\fB\fIpath\fR\fR, \fB\-S \fR\fB\fIpath\fR\fR .sp @@ -497,8 +450,6 @@ localhost\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlhotcopy: suffix option -.\" suffix option: mysqlhotcopy \fB\-\-suffix=\fR\fB\fIstr\fR\fR .sp The suffix to use for names of copied databases\&. @@ -512,8 +463,6 @@ The suffix to use for names of copied databases\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlhotcopy: tmpdir option -.\" tmpdir option: mysqlhotcopy \fB\-\-tmpdir=\fR\fB\fIdir_name\fR\fR .sp The temporary directory\&. The default is @@ -528,8 +477,6 @@ The temporary directory\&. The default is .sp -1 .IP \(bu 2.3 .\} -.\" mysqlhotcopy: user option -.\" user option: mysqlhotcopy \fB\-\-user=\fR\fB\fIuser_name\fR\fR, \fB\-u \fR\fB\fIuser_name\fR\fR .sp diff --git a/mysql-wsrep-5.6/man/mysqlimport.1 b/mysql-wsrep-5.6/man/mysqlimport.1 index 07bbb54c..93ee02d6 100644 --- a/mysql-wsrep-5.6/man/mysqlimport.1 +++ b/mysql-wsrep-5.6/man/mysqlimport.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysqlimport\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/02/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQLIMPORT\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQLIMPORT\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,11 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysqlimport -.\" importing: data -.\" data: importing -.\" files: text -.\" text files: importing .SH "NAME" mysqlimport \- a data import program .SH "SYNOPSIS" @@ -89,8 +84,6 @@ Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: help option -.\" help option: mysqlimport \fB\-\-help\fR, \fB\-?\fR .sp @@ -105,8 +98,6 @@ Display a help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: bind-address option -.\" bind-address option: mysqlimport \fB\-\-bind\-address=\fR\fB\fIip_address\fR\fR .sp On a computer having multiple network interfaces, use this option to select which interface to use for connecting to the MySQL server\&. @@ -122,8 +113,6 @@ This option is supported beginning with MySQL 5\&.6\&.1\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: character-sets-dir option -.\" character-sets-dir option: mysqlimport \fB\-\-character\-sets\-dir=\fR\fB\fIdir_name\fR\fR .sp The directory where character sets are installed\&. See @@ -138,8 +127,6 @@ Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: columns option -.\" columns option: mysqlimport \fB\-\-columns=\fR\fB\fIcolumn_list\fR\fR, \fB\-c \fR\fB\fIcolumn_list\fR\fR .sp @@ -154,8 +141,6 @@ This option takes a comma\-separated list of column names as its value\&. The or .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: compress option -.\" compress option: mysqlimport \fB\-\-compress\fR, \fB\-C\fR .sp @@ -170,8 +155,6 @@ Compress all information sent between the client and the server if both support .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: debug option -.\" debug option: mysqlimport \fB\-\-debug[=\fR\fB\fIdebug_options\fR\fR\fB]\fR, \fB\-# [\fR\fB\fIdebug_options\fR\fR\fB]\fR .sp @@ -190,8 +173,6 @@ d:t:o\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: debug-check option -.\" debug-check option: mysqlimport \fB\-\-debug\-check\fR .sp Print some debugging information when the program exits\&. @@ -205,8 +186,6 @@ Print some debugging information when the program exits\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: debug-info option -.\" debug-info option: mysqlimport \fB\-\-debug\-info\fR .sp Print debugging information and memory and CPU usage statistics when the program exits\&. @@ -220,8 +199,6 @@ Print debugging information and memory and CPU usage statistics when the program .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: default-character-set option -.\" default-character-set option: mysqlimport \fB\-\-default\-character\-set=\fR\fB\fIcharset_name\fR\fR .sp Use @@ -238,8 +215,6 @@ Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: default-auth option -.\" default-auth option: mysqlimport \fB\-\-default\-auth=\fR\fB\fIplugin\fR\fR .sp A hint about the client\-side authentication plugin to use\&. See @@ -256,8 +231,6 @@ This option was added in MySQL 5\&.6\&.2\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: defaults-extra-file option -.\" defaults-extra-file option: mysqlimport \fB\-\-defaults\-extra\-file=\fR\fB\fIfile_name\fR\fR .sp Read this option file after the global option file but (on Unix) before the user option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. @@ -273,8 +246,6 @@ is interpreted relative to the current directory if given as a relative path nam .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: defaults-file option -.\" defaults-file option: mysqlimport \fB\-\-defaults\-file=\fR\fB\fIfile_name\fR\fR .sp Use only the given option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. @@ -290,8 +261,6 @@ is interpreted relative to the current directory if given as a relative path nam .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: defaults-group-suffix option -.\" defaults-group-suffix option: mysqlimport \fB\-\-defaults\-group\-suffix=\fR\fB\fIstr\fR\fR .sp Read not only the usual option groups, but also groups with the usual names and a suffix of @@ -320,8 +289,6 @@ groups\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: delete option -.\" delete option: mysqlimport \fB\-\-delete\fR, \fB\-D\fR .sp @@ -336,14 +303,12 @@ Empty the table before importing the text file\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: enable-cleartext-plugin option -.\" enable-cleartext-plugin option: mysqlimport \fB\-\-enable\-cleartext\-plugin\fR .sp Enable the mysql_clear_password cleartext authentication plugin\&. (See -Section\ \&6.4.1.7, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) +Section\ \&6.5.1.7, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) .sp This option was added in MySQL 5\&.6\&.28\&. .RE @@ -356,17 +321,9 @@ This option was added in MySQL 5\&.6\&.28\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: fields-terminated-by option -.\" fields-terminated-by option: mysqldump \fB\-\-fields\-terminated\-by=\&.\&.\&.\fR, -.\" mysqldump: fields-enclosed-by option -.\" fields-enclosed-by option: mysqldump \fB\-\-fields\-enclosed\-by=\&.\&.\&.\fR, -.\" mysqldump: fields-optionally-enclosed-by option -.\" fields-optionally-enclosed-by option: mysqldump \fB\-\-fields\-optionally\-enclosed\-by=\&.\&.\&.\fR, -.\" mysqldump: fields-escaped-by option -.\" fields-escaped-by option: mysqldump \fB\-\-fields\-escaped\-by=\&.\&.\&.\fR .sp These options have the same meaning as the corresponding clauses for @@ -382,8 +339,6 @@ Section\ \&13.2.6, \(lqLOAD DATA INFILE Syntax\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: force option -.\" force option: mysqlimport \fB\-\-force\fR, \fB\-f\fR .sp @@ -401,8 +356,6 @@ exits if a table does not exist\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: host option -.\" host option: mysqlimport \fB\-\-host=\fR\fB\fIhost_name\fR\fR, \fB\-h \fR\fB\fIhost_name\fR\fR .sp @@ -418,8 +371,6 @@ localhost\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: ignore option -.\" ignore option: mysqlimport \fB\-\-ignore\fR, \fB\-i\fR .sp @@ -436,8 +387,6 @@ option\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: ignore-lines option -.\" ignore-lines option: mysqlimport \fB\-\-ignore\-lines=\fR\fB\fIN\fR\fR .sp Ignore the first @@ -453,8 +402,6 @@ lines of the data file\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: lines-terminated-by option -.\" lines-terminated-by option: mysqldump \fB\-\-lines\-terminated\-by=\&.\&.\&.\fR .sp This option has the same meaning as the corresponding clause for @@ -471,8 +418,6 @@ Section\ \&13.2.6, \(lqLOAD DATA INFILE Syntax\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: local option -.\" local option: mysqlimport \fB\-\-local\fR, \fB\-L\fR .sp @@ -487,8 +432,6 @@ Read input files locally from the client host\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: lock-tables option -.\" lock-tables option: mysqlimport \fB\-\-lock\-tables\fR, \fB\-l\fR .sp @@ -505,8 +448,6 @@ tables for writing before processing any text files\&. This ensures that all tab .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: login-path option -.\" login-path option: mysqlimport \fB\-\-login\-path=\fR\fB\fIname\fR\fR .sp Read options from the named login path in the @@ -527,8 +468,6 @@ utility\&. See .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: low-priority option -.\" low-priority option: mysqlimport \fB\-\-low\-priority\fR .sp Use @@ -547,8 +486,6 @@ MERGE)\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: no-defaults option -.\" no-defaults option: mysqlimport \fB\-\-no\-defaults\fR .sp Do not read any option files\&. If program startup fails due to reading unknown options from an option file, @@ -574,8 +511,6 @@ utility\&. See .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: password option -.\" password option: mysqlimport \fB\-\-password[=\fR\fB\fIpassword\fR\fR\fB]\fR, \fB\-p[\fR\fB\fIpassword\fR\fR\fB]\fR .sp @@ -603,8 +538,6 @@ Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: pipe option -.\" pipe option: mysqlimport \fB\-\-pipe\fR, \fB\-W\fR .sp @@ -619,8 +552,6 @@ On Windows, connect to the server using a named pipe\&. This option applies only .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: plugin-dir option -.\" plugin-dir option: mysqlimport \fB\-\-plugin\-dir=\fR\fB\fIdir_name\fR\fR .sp The directory in which to look for plugins\&. Specify this option if the @@ -641,8 +572,6 @@ This option was added in MySQL 5\&.6\&.2\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: port option -.\" port option: mysqlimport \fB\-\-port=\fR\fB\fIport_num\fR\fR, \fB\-P \fR\fB\fIport_num\fR\fR .sp @@ -657,8 +586,6 @@ The TCP/IP port number to use for the connection\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: print-defaults option -.\" print-defaults option: mysqlimport \fB\-\-print\-defaults\fR .sp Print the program name and all options that it gets from option files\&. @@ -672,8 +599,6 @@ Print the program name and all options that it gets from option files\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: protocol option -.\" protocol option: mysqlimport \fB\-\-protocol={TCP|SOCKET|PIPE|MEMORY}\fR .sp The connection protocol to use for connecting to the server\&. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\&. For details on the permissible values, see @@ -688,8 +613,6 @@ Section\ \&4.2.2, \(lqConnecting to the MySQL Server\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: replace option -.\" replace option: mysqlimport \fB\-\-replace\fR, \fB\-r\fR .sp @@ -710,8 +633,6 @@ options control handling of input rows that duplicate existing rows on unique ke .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: secure-auth option -.\" secure-auth option: mysqlimport \fB\-\-secure\-auth\fR .sp Do not send passwords to the server in old (pre\-4\&.1) format\&. This prevents connections except for servers that use the newer password format\&. This option is enabled by default; use @@ -730,7 +651,22 @@ to disable it\&. This option was added in MySQL 5\&.6\&.17\&. .ps -1 .br Passwords that use the pre\-4\&.1 hashing method are less secure than passwords that use the native password hashing method and should be avoided\&. Pre\-4\&.1 passwords are deprecated and support for them will be removed in a future MySQL release\&. For account upgrade instructions, see -Section\ \&6.4.1.3, \(lqMigrating Away from Pre-4.1 Password Hashing and the mysql_old_password Plugin\(rq\&. +Section\ \&6.5.1.3, \(lqMigrating Away from Pre-4.1 Password Hashing and the mysql_old_password Plugin\(rq\&. +.sp .5v +.RE +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +This option is deprecated and will be removed in a future release\&. As of MySQL 5\&.7\&.5, it is always enabled and attempting to disable it produces an error\&. .sp .5v .RE .RE @@ -743,8 +679,6 @@ Section\ \&6.4.1.3, \(lqMigrating Away from Pre-4.1 Password Hashing and the mys .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: shared-memory-base-name option -.\" shared-memory-base-name option: mysqlimport \fB\-\-shared\-memory\-base\-name=\fR\fB\fIname\fR\fR .sp On Windows, the shared\-memory name to use, for connections made using shared memory to a local server\&. The default value is @@ -763,8 +697,6 @@ option to enable shared\-memory connections\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: silent option -.\" silent option: mysqlimport \fB\-\-silent\fR, \fB\-s\fR .sp @@ -779,8 +711,6 @@ Silent mode\&. Produce output only when errors occur\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: socket option -.\" socket option: mysqlimport \fB\-\-socket=\fR\fB\fIpath\fR\fR, \fB\-S \fR\fB\fIpath\fR\fR .sp @@ -796,14 +726,12 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: SSL options -.\" SSL options: mysqlimport \fB\-\-ssl*\fR .sp Options that begin with \fB\-\-ssl\fR specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See -Section\ \&6.3.9.5, \(lqCommand Options for Secure Connections\(rq\&. +Section\ \&6.4.5, \(lqCommand Options for Secure Connections\(rq\&. .RE .sp .RS 4 @@ -814,8 +742,6 @@ Section\ \&6.3.9.5, \(lqCommand Options for Secure Connections\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: user option -.\" user option: mysqlimport \fB\-\-user=\fR\fB\fIuser_name\fR\fR, \fB\-u \fR\fB\fIuser_name\fR\fR .sp @@ -830,8 +756,6 @@ The MySQL user name to use when connecting to the server\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: use-threads option -.\" use-threads option: mysqlimport \fB\-\-use\-threads=\fR\fB\fIN\fR\fR .sp Load files in parallel using @@ -847,8 +771,6 @@ threads\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: verbose option -.\" verbose option: mysqlimport \fB\-\-verbose\fR, \fB\-v\fR .sp @@ -863,8 +785,6 @@ Verbose mode\&. Print more information about what the program does\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: version option -.\" version option: mysqlimport \fB\-\-version\fR, \fB\-V\fR .sp diff --git a/mysql-wsrep-5.6/man/mysqlshow.1 b/mysql-wsrep-5.6/man/mysqlshow.1 index fad8568e..236dc2a3 100644 --- a/mysql-wsrep-5.6/man/mysqlshow.1 +++ b/mysql-wsrep-5.6/man/mysqlshow.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysqlshow\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/02/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQLSHOW\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQLSHOW\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,12 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysqlshow -.\" databases: displaying -.\" displaying: database information -.\" tables: displaying -.\" columns: displaying -.\" showing: database information .SH "NAME" mysqlshow \- display database, table, and column information .SH "SYNOPSIS" @@ -136,8 +130,6 @@ Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: help option -.\" help option: mysqlshow \fB\-\-help\fR, \fB\-?\fR .sp @@ -152,8 +144,6 @@ Display a help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: bind-address option -.\" bind-address option: mysqlshow \fB\-\-bind\-address=\fR\fB\fIip_address\fR\fR .sp On a computer having multiple network interfaces, use this option to select which interface to use for connecting to the MySQL server\&. @@ -169,8 +159,6 @@ This option is supported beginning with MySQL 5\&.6\&.1\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: character-sets-dir option -.\" character-sets-dir option: mysqlshow \fB\-\-character\-sets\-dir=\fR\fB\fIdir_name\fR\fR .sp The directory where character sets are installed\&. See @@ -185,8 +173,6 @@ Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: compress option -.\" compress option: mysqlshow \fB\-\-compress\fR, \fB\-C\fR .sp @@ -201,8 +187,6 @@ Compress all information sent between the client and the server if both support .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: count option -.\" count option: mysqlshow \fB\-\-count\fR .sp Show the number of rows per table\&. This can be slow for non\-MyISAM @@ -217,8 +201,6 @@ tables\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: debug option -.\" debug option: mysqlshow \fB\-\-debug[=\fR\fB\fIdebug_options\fR\fR\fB]\fR, \fB\-# [\fR\fB\fIdebug_options\fR\fR\fB]\fR .sp @@ -237,8 +219,6 @@ d:t:o\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: debug-check option -.\" debug-check option: mysqlshow \fB\-\-debug\-check\fR .sp Print some debugging information when the program exits\&. @@ -252,8 +232,6 @@ Print some debugging information when the program exits\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: debug-info option -.\" debug-info option: mysqlshow \fB\-\-debug\-info\fR .sp Print debugging information and memory and CPU usage statistics when the program exits\&. @@ -267,8 +245,6 @@ Print debugging information and memory and CPU usage statistics when the program .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: default-character-set option -.\" default-character-set option: mysqlshow \fB\-\-default\-character\-set=\fR\fB\fIcharset_name\fR\fR .sp Use @@ -285,8 +261,6 @@ Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: default-auth option -.\" default-auth option: mysqlshow \fB\-\-default\-auth=\fR\fB\fIplugin\fR\fR .sp A hint about the client\-side authentication plugin to use\&. See @@ -303,8 +277,6 @@ This option was added in MySQL 5\&.6\&.2\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: defaults-extra-file option -.\" defaults-extra-file option: mysqlshow \fB\-\-defaults\-extra\-file=\fR\fB\fIfile_name\fR\fR .sp Read this option file after the global option file but (on Unix) before the user option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. @@ -320,8 +292,6 @@ is interpreted relative to the current directory if given as a relative path nam .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: defaults-file option -.\" defaults-file option: mysqlshow \fB\-\-defaults\-file=\fR\fB\fIfile_name\fR\fR .sp Use only the given option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. @@ -337,8 +307,6 @@ is interpreted relative to the current directory if given as a relative path nam .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: defaults-group-suffix option -.\" defaults-group-suffix option: mysqlshow \fB\-\-defaults\-group\-suffix=\fR\fB\fIstr\fR\fR .sp Read not only the usual option groups, but also groups with the usual names and a suffix of @@ -367,14 +335,12 @@ groups\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: enable-cleartext-plugin option -.\" enable-cleartext-plugin option: mysqlshow \fB\-\-enable\-cleartext\-plugin\fR .sp Enable the mysql_clear_password cleartext authentication plugin\&. (See -Section\ \&6.4.1.7, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) +Section\ \&6.5.1.7, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) .sp This option was added in MySQL 5\&.6\&.28\&. .RE @@ -387,8 +353,6 @@ This option was added in MySQL 5\&.6\&.28\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: host option -.\" host option: mysqlshow \fB\-\-host=\fR\fB\fIhost_name\fR\fR, \fB\-h \fR\fB\fIhost_name\fR\fR .sp @@ -403,8 +367,6 @@ Connect to the MySQL server on the given host\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: keys option -.\" keys option: mysqlshow \fB\-\-keys\fR, \fB\-k\fR .sp @@ -419,8 +381,6 @@ Show table indexes\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: login-path option -.\" login-path option: mysqlshow \fB\-\-login\-path=\fR\fB\fIname\fR\fR .sp Read options from the named login path in the @@ -441,8 +401,6 @@ utility\&. See .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: no-defaults option -.\" no-defaults option: mysqlshow \fB\-\-no\-defaults\fR .sp Do not read any option files\&. If program startup fails due to reading unknown options from an option file, @@ -468,8 +426,6 @@ utility\&. See .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: password option -.\" password option: mysqlshow \fB\-\-password[=\fR\fB\fIpassword\fR\fR\fB]\fR, \fB\-p[\fR\fB\fIpassword\fR\fR\fB]\fR .sp @@ -497,8 +453,6 @@ Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: pipe option -.\" pipe option: mysqlshow \fB\-\-pipe\fR, \fB\-W\fR .sp @@ -513,8 +467,6 @@ On Windows, connect to the server using a named pipe\&. This option applies only .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: plugin-dir option -.\" plugin-dir option: mysqlshow \fB\-\-plugin\-dir=\fR\fB\fIdir_name\fR\fR .sp The directory in which to look for plugins\&. Specify this option if the @@ -535,8 +487,6 @@ This option was added in MySQL 5\&.6\&.2\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: port option -.\" port option: mysqlshow \fB\-\-port=\fR\fB\fIport_num\fR\fR, \fB\-P \fR\fB\fIport_num\fR\fR .sp @@ -551,8 +501,6 @@ The TCP/IP port number to use for the connection\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: print-defaults option -.\" print-defaults option: mysqlshow \fB\-\-print\-defaults\fR .sp Print the program name and all options that it gets from option files\&. @@ -566,8 +514,6 @@ Print the program name and all options that it gets from option files\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: protocol option -.\" protocol option: mysqlshow \fB\-\-protocol={TCP|SOCKET|PIPE|MEMORY}\fR .sp The connection protocol to use for connecting to the server\&. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\&. For details on the permissible values, see @@ -582,8 +528,6 @@ Section\ \&4.2.2, \(lqConnecting to the MySQL Server\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: secure-auth option -.\" secure-auth option: mysqlshow \fB\-\-secure\-auth\fR .sp Do not send passwords to the server in old (pre\-4\&.1) format\&. This prevents connections except for servers that use the newer password format\&. This option is enabled by default; use @@ -602,7 +546,22 @@ to disable it\&. This option was added in MySQL 5\&.6\&.17\&. .ps -1 .br Passwords that use the pre\-4\&.1 hashing method are less secure than passwords that use the native password hashing method and should be avoided\&. Pre\-4\&.1 passwords are deprecated and support for them will be removed in a future MySQL release\&. For account upgrade instructions, see -Section\ \&6.4.1.3, \(lqMigrating Away from Pre-4.1 Password Hashing and the mysql_old_password Plugin\(rq\&. +Section\ \&6.5.1.3, \(lqMigrating Away from Pre-4.1 Password Hashing and the mysql_old_password Plugin\(rq\&. +.sp .5v +.RE +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +This option is deprecated and will be removed in a future release\&. As of MySQL 5\&.7\&.5, it is always enabled and attempting to disable it produces an error\&. .sp .5v .RE .RE @@ -615,8 +574,6 @@ Section\ \&6.4.1.3, \(lqMigrating Away from Pre-4.1 Password Hashing and the mys .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: shared-memory-base-name option -.\" shared-memory-base-name option: mysqlshow \fB\-\-shared\-memory\-base\-name=\fR\fB\fIname\fR\fR .sp On Windows, the shared\-memory name to use, for connections made using shared memory to a local server\&. The default value is @@ -635,8 +592,6 @@ option to enable shared\-memory connections\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: show-table-type option -.\" show-table-type option: mysqlshow \fB\-\-show\-table\-type\fR, \fB\-t\fR .sp @@ -655,8 +610,6 @@ VIEW\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: socket option -.\" socket option: mysqlshow \fB\-\-socket=\fR\fB\fIpath\fR\fR, \fB\-S \fR\fB\fIpath\fR\fR .sp @@ -672,14 +625,12 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: SSL options -.\" SSL options: mysqlshow \fB\-\-ssl*\fR .sp Options that begin with \fB\-\-ssl\fR specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See -Section\ \&6.3.9.5, \(lqCommand Options for Secure Connections\(rq\&. +Section\ \&6.4.5, \(lqCommand Options for Secure Connections\(rq\&. .RE .sp .RS 4 @@ -690,8 +641,6 @@ Section\ \&6.3.9.5, \(lqCommand Options for Secure Connections\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: status option -.\" status option: mysqlshow \fB\-\-status\fR, \fB\-i\fR .sp @@ -706,8 +655,6 @@ Display extra information about each table\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: user option -.\" user option: mysqlshow \fB\-\-user=\fR\fB\fIuser_name\fR\fR, \fB\-u \fR\fB\fIuser_name\fR\fR .sp @@ -722,8 +669,6 @@ The MySQL user name to use when connecting to the server\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: verbose option -.\" verbose option: mysqlshow \fB\-\-verbose\fR, \fB\-v\fR .sp @@ -738,8 +683,6 @@ Verbose mode\&. Print more information about what the program does\&. This optio .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: version option -.\" version option: mysqlshow \fB\-\-version\fR, \fB\-V\fR .sp diff --git a/mysql-wsrep-5.6/man/mysqlslap.1 b/mysql-wsrep-5.6/man/mysqlslap.1 index 1a12182f..c23fecfd 100644 --- a/mysql-wsrep-5.6/man/mysqlslap.1 +++ b/mysql-wsrep-5.6/man/mysqlslap.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysqlslap\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/02/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQLSLAP\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQLSLAP\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,8 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysqlslap -.\" load emulation .SH "NAME" mysqlslap \- load emulation client .SH "SYNOPSIS" @@ -173,8 +171,6 @@ Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: help option -.\" help option: mysqlslap \fB\-\-help\fR, \fB\-?\fR .sp @@ -189,8 +185,6 @@ Display a help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: auto-generate-sql option -.\" auto-generate-sql option: mysqlslap \fB\-\-auto\-generate\-sql\fR, \fB\-a\fR .sp @@ -205,8 +199,6 @@ Generate SQL statements automatically when they are not supplied in files or usi .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: auto-generate-sql-add-autoincrement option -.\" auto-generate-sql-add-autoincrement option: mysqlslap \fB\-\-auto\-generate\-sql\-add\-autoincrement\fR .sp Add an @@ -222,8 +214,6 @@ column to automatically generated tables\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: auto-generate-sql-execute-number option -.\" auto-generate-sql-execute-number option: mysqlslap \fB\-\-auto\-generate\-sql\-execute\-number=\fR\fB\fIN\fR\fR .sp Specify how many queries to generate automatically\&. @@ -237,8 +227,6 @@ Specify how many queries to generate automatically\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: auto-generate-sql-guid-primary option -.\" auto-generate-sql-guid-primary option: mysqlslap \fB\-\-auto\-generate\-sql\-guid\-primary\fR .sp Add a GUID\-based primary key to automatically generated tables\&. @@ -252,8 +240,6 @@ Add a GUID\-based primary key to automatically generated tables\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: auto-generate-sql-load-type option -.\" auto-generate-sql-load-type option: mysqlslap \fB\-\-auto\-generate\-sql\-load\-type=\fR\fB\fItype\fR\fR .sp Specify the test load type\&. The permissible values are @@ -278,8 +264,6 @@ mixed\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: auto-generate-sql-secondary-indexes option -.\" auto-generate-sql-secondary-indexes option: mysqlslap \fB\-\-auto\-generate\-sql\-secondary\-indexes=\fR\fB\fIN\fR\fR .sp Specify how many secondary indexes to add to automatically generated tables\&. By default, none are added\&. @@ -293,8 +277,6 @@ Specify how many secondary indexes to add to automatically generated tables\&. B .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: auto-generate-sql-unique-query-number option -.\" auto-generate-sql-unique-query-number option: mysqlslap \fB\-\-auto\-generate\-sql\-unique\-query\-number=\fR\fB\fIN\fR\fR .sp How many different queries to generate for automatic tests\&. For example, if you run a @@ -310,8 +292,6 @@ test that performs 1000 selects, you can use this option with a value of 1000 to .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: auto-generate-sql-unique-write-number option -.\" auto-generate-sql-unique-write-number option: mysqlslap \fB\-\-auto\-generate\-sql\-unique\-write\-number=\fR\fB\fIN\fR\fR .sp How many different queries to generate for @@ -326,11 +306,9 @@ How many different queries to generate for .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: auto-generate-sql-write-number option -.\" auto-generate-sql-write-number option: mysqlslap \fB\-\-auto\-generate\-sql\-write\-number=\fR\fB\fIN\fR\fR .sp -How many row inserts to perform on each thread\&. The default is 100\&. +How many row inserts to perform\&. The default is 100\&. .RE .sp .RS 4 @@ -341,8 +319,6 @@ How many row inserts to perform on each thread\&. The default is 100\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: commit option -.\" commit option: mysqlslap \fB\-\-commit=\fR\fB\fIN\fR\fR .sp How many statements to execute before committing\&. The default is 0 (no commits are done)\&. @@ -356,8 +332,6 @@ How many statements to execute before committing\&. The default is 0 (no commits .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: compress option -.\" compress option: mysqlslap \fB\-\-compress\fR, \fB\-C\fR .sp @@ -372,14 +346,10 @@ Compress all information sent between the client and the server if both support .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: concurrency option -.\" concurrency option: mysqlslap \fB\-\-concurrency=\fR\fB\fIN\fR\fR, \fB\-c \fR\fB\fIN\fR\fR .sp -The number of clients to simulate when issuing the -SELECT -statement\&. +The number of parallel clients to simulate\&. .RE .sp .RS 4 @@ -390,8 +360,6 @@ statement\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: create option -.\" create option: mysqlslap \fB\-\-create=\fR\fB\fIvalue\fR\fR .sp The file or string containing the statement to use for creating the table\&. @@ -405,8 +373,6 @@ The file or string containing the statement to use for creating the table\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: create-schema option -.\" create-schema option: mysqlslap \fB\-\-create\-schema=\fR\fB\fIvalue\fR\fR .sp The schema in which to run the tests\&. @@ -441,8 +407,6 @@ option as well\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: csv option -.\" csv option: mysqlslap \fB\-\-csv[=\fR\fB\fIfile_name\fR\fR\fB]\fR .sp Generate output in comma\-separated values format\&. The output goes to the named file, or to the standard output if no file is given\&. @@ -456,8 +420,6 @@ Generate output in comma\-separated values format\&. The output goes to the name .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: debug option -.\" debug option: mysqlslap \fB\-\-debug[=\fR\fB\fIdebug_options\fR\fR\fB]\fR, \fB\-# [\fR\fB\fIdebug_options\fR\fR\fB]\fR .sp @@ -476,8 +438,6 @@ d:t:o,/tmp/mysqlslap\&.trace\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: debug-check option -.\" debug-check option: mysqlslap \fB\-\-debug\-check\fR .sp Print some debugging information when the program exits\&. @@ -491,8 +451,6 @@ Print some debugging information when the program exits\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: debug-info option -.\" debug-info option: mysqlslap \fB\-\-debug\-info\fR, \fB\-T\fR .sp @@ -507,8 +465,6 @@ Print debugging information and memory and CPU usage statistics when the program .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: default-auth option -.\" default-auth option: mysqlslap \fB\-\-default\-auth=\fR\fB\fIplugin\fR\fR .sp A hint about the client\-side authentication plugin to use\&. See @@ -525,8 +481,6 @@ This option was added in MySQL 5\&.6\&.2\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: defaults-extra-file option -.\" defaults-extra-file option: mysqlslap \fB\-\-defaults\-extra\-file=\fR\fB\fIfile_name\fR\fR .sp Read this option file after the global option file but (on Unix) before the user option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. @@ -542,8 +496,6 @@ is interpreted relative to the current directory if given as a relative path nam .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: defaults-file option -.\" defaults-file option: mysqlslap \fB\-\-defaults\-file=\fR\fB\fIfile_name\fR\fR .sp Use only the given option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. @@ -559,8 +511,6 @@ is interpreted relative to the current directory if given as a relative path nam .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: defaults-group-suffix option -.\" defaults-group-suffix option: mysqlslap \fB\-\-defaults\-group\-suffix=\fR\fB\fIstr\fR\fR .sp Read not only the usual option groups, but also groups with the usual names and a suffix of @@ -589,8 +539,6 @@ groups\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: delimiter option -.\" delimiter option: mysqlslap \fB\-\-delimiter=\fR\fB\fIstr\fR\fR, \fB\-F \fR\fB\fIstr\fR\fR .sp @@ -605,8 +553,6 @@ The delimiter to use in SQL statements supplied in files or using command option .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: detach option -.\" detach option: mysqlslap \fB\-\-detach=\fR\fB\fIN\fR\fR .sp Detach (close and reopen) each connection after each @@ -622,14 +568,12 @@ statements\&. The default is 0 (connections are not detached)\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: enable-cleartext-plugin option -.\" enable-cleartext-plugin option: mysqlslap \fB\-\-enable\-cleartext\-plugin\fR .sp Enable the mysql_clear_password cleartext authentication plugin\&. (See -Section\ \&6.4.1.7, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) This option was added in MySQL 5\&.6\&.7\&. +Section\ \&6.5.1.7, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) This option was added in MySQL 5\&.6\&.7\&. .RE .sp .RS 4 @@ -640,8 +584,6 @@ Section\ \&6.4.1.7, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: engine option -.\" engine option: mysqlslap \fB\-\-engine=\fR\fB\fIengine_name\fR\fR, \fB\-e \fR\fB\fIengine_name\fR\fR .sp @@ -656,8 +598,6 @@ The storage engine to use for creating tables\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: host option -.\" host option: mysqlslap \fB\-\-host=\fR\fB\fIhost_name\fR\fR, \fB\-h \fR\fB\fIhost_name\fR\fR .sp @@ -672,8 +612,6 @@ Connect to the MySQL server on the given host\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: iterations option -.\" iterations option: mysqlslap \fB\-\-iterations=\fR\fB\fIN\fR\fR, \fB\-i \fR\fB\fIN\fR\fR .sp @@ -688,8 +626,6 @@ The number of times to run the tests\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: login-path option -.\" login-path option: mysqlslap \fB\-\-login\-path=\fR\fB\fIname\fR\fR .sp Read options from the named login path in the @@ -710,8 +646,6 @@ utility\&. See .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: no-drop option -.\" no-drop option: mysqlslap \fB\-\-no\-drop\fR .sp Prevent @@ -727,8 +661,6 @@ from dropping any schema it creates during the test run\&. This option was added .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: no-defaults option -.\" no-defaults option: mysqlslap \fB\-\-no\-defaults\fR .sp Do not read any option files\&. If program startup fails due to reading unknown options from an option file, @@ -754,8 +686,6 @@ utility\&. See .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: number-char-cols option -.\" number-char-cols option: mysqlslap \fB\-\-number\-char\-cols=\fR\fB\fIN\fR\fR, \fB\-x \fR\fB\fIN\fR\fR .sp @@ -774,8 +704,6 @@ is specified\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: number-int-cols option -.\" number-int-cols option: mysqlslap \fB\-\-number\-int\-cols=\fR\fB\fIN\fR\fR, \fB\-y \fR\fB\fIN\fR\fR .sp @@ -794,8 +722,6 @@ is specified\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: number-of-queries option -.\" number-of-queries option: mysqlslap \fB\-\-number\-of\-queries=\fR\fB\fIN\fR\fR .sp Limit each client to approximately this many queries\&. Query counting takes into account the statement delimiter\&. For example, if you invoke @@ -824,8 +750,6 @@ shell> \fBmysqlslap \-\-delimiter=";" \-\-number\-of\-queries=10\fR .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: only-print option -.\" only-print option: mysqlslap \fB\-\-only\-print\fR .sp Do not connect to databases\&. @@ -841,8 +765,6 @@ only prints what it would have done\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: password option -.\" password option: mysqlslap \fB\-\-password[=\fR\fB\fIpassword\fR\fR\fB]\fR, \fB\-p[\fR\fB\fIpassword\fR\fR\fB]\fR .sp @@ -870,8 +792,6 @@ Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: pipe option -.\" pipe option: mysqlslap \fB\-\-pipe\fR, \fB\-W\fR .sp @@ -886,8 +806,6 @@ On Windows, connect to the server using a named pipe\&. This option applies only .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: plugin-dir option -.\" plugin-dir option: mysqlslap \fB\-\-plugin\-dir=\fR\fB\fIdir_name\fR\fR .sp The directory in which to look for plugins\&. Specify this option if the @@ -908,8 +826,6 @@ This option was added in MySQL 5\&.6\&.2\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: port option -.\" port option: mysqlslap \fB\-\-port=\fR\fB\fIport_num\fR\fR, \fB\-P \fR\fB\fIport_num\fR\fR .sp @@ -924,8 +840,6 @@ The TCP/IP port number to use for the connection\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: post-query option -.\" post-query option: mysqlslap \fB\-\-post\-query=\fR\fB\fIvalue\fR\fR .sp The file or string containing the statement to execute after the tests have completed\&. This execution is not counted for timing purposes\&. @@ -939,8 +853,6 @@ The file or string containing the statement to execute after the tests have comp .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: post-system option -.\" post-system option: mysqlslap \fB\-\-post\-system=\fR\fB\fIstr\fR\fR .sp The string to execute using @@ -956,8 +868,6 @@ after the tests have completed\&. This execution is not counted for timing purpo .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: pre-query option -.\" pre-query option: mysqlslap \fB\-\-pre\-query=\fR\fB\fIvalue\fR\fR .sp The file or string containing the statement to execute before running the tests\&. This execution is not counted for timing purposes\&. @@ -971,8 +881,6 @@ The file or string containing the statement to execute before running the tests\ .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: pre-system option -.\" pre-system option: mysqlslap \fB\-\-pre\-system=\fR\fB\fIstr\fR\fR .sp The string to execute using @@ -988,8 +896,6 @@ before running the tests\&. This execution is not counted for timing purposes\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: print-defaults option -.\" print-defaults option: mysqlslap \fB\-\-print\-defaults\fR .sp Print the program name and all options that it gets from option files\&. @@ -1003,8 +909,6 @@ Print the program name and all options that it gets from option files\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: protocol option -.\" protocol option: mysqlslap \fB\-\-protocol={TCP|SOCKET|PIPE|MEMORY}\fR .sp The connection protocol to use for connecting to the server\&. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\&. For details on the permissible values, see @@ -1019,8 +923,6 @@ Section\ \&4.2.2, \(lqConnecting to the MySQL Server\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: query option -.\" query option: mysqlslap \fB\-\-query=\fR\fB\fIvalue\fR\fR, \fB\-q \fR\fB\fIvalue\fR\fR .sp @@ -1037,8 +939,6 @@ statement to use for retrieving data\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: secure-auth option -.\" secure-auth option: mysqlslap \fB\-\-secure\-auth\fR .sp Do not send passwords to the server in old (pre\-4\&.1) format\&. This prevents connections except for servers that use the newer password format\&. This option is enabled by default; use @@ -1057,7 +957,22 @@ to disable it\&. This option was added in MySQL 5\&.6\&.17\&. .ps -1 .br Passwords that use the pre\-4\&.1 hashing method are less secure than passwords that use the native password hashing method and should be avoided\&. Pre\-4\&.1 passwords are deprecated and support for them will be removed in a future MySQL release\&. For account upgrade instructions, see -Section\ \&6.4.1.3, \(lqMigrating Away from Pre-4.1 Password Hashing and the mysql_old_password Plugin\(rq\&. +Section\ \&6.5.1.3, \(lqMigrating Away from Pre-4.1 Password Hashing and the mysql_old_password Plugin\(rq\&. +.sp .5v +.RE +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +This option is deprecated and will be removed in a future release\&. As of MySQL 5\&.7\&.5, it is always enabled and attempting to disable it produces an error\&. .sp .5v .RE .RE @@ -1070,8 +985,6 @@ Section\ \&6.4.1.3, \(lqMigrating Away from Pre-4.1 Password Hashing and the mys .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: shared-memory-base-name option -.\" shared-memory-base-name option: mysqlslap \fB\-\-shared\-memory\-base\-name=\fR\fB\fIname\fR\fR .sp On Windows, the shared\-memory name to use, for connections made using shared memory to a local server\&. This option applies only if the server supports shared\-memory connections\&. @@ -1085,8 +998,6 @@ On Windows, the shared\-memory name to use, for connections made using shared me .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: silent option -.\" silent option: mysqlslap \fB\-\-silent\fR, \fB\-s\fR .sp @@ -1101,8 +1012,6 @@ Silent mode\&. No output\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: socket option -.\" socket option: mysqlslap \fB\-\-socket=\fR\fB\fIpath\fR\fR, \fB\-S \fR\fB\fIpath\fR\fR .sp @@ -1118,14 +1027,12 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: SSL options -.\" SSL options: mysqlslap \fB\-\-ssl*\fR .sp Options that begin with \fB\-\-ssl\fR specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See -Section\ \&6.3.9.5, \(lqCommand Options for Secure Connections\(rq\&. +Section\ \&6.4.5, \(lqCommand Options for Secure Connections\(rq\&. .RE .sp .RS 4 @@ -1136,8 +1043,6 @@ Section\ \&6.3.9.5, \(lqCommand Options for Secure Connections\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: user option -.\" user option: mysqlslap \fB\-\-user=\fR\fB\fIuser_name\fR\fR, \fB\-u \fR\fB\fIuser_name\fR\fR .sp @@ -1152,8 +1057,6 @@ The MySQL user name to use when connecting to the server\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: verbose option -.\" verbose option: mysqlslap \fB\-\-verbose\fR, \fB\-v\fR .sp @@ -1168,8 +1071,6 @@ Verbose mode\&. Print more information about what the program does\&. This optio .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: version option -.\" version option: mysqlslap \fB\-\-version\fR, \fB\-V\fR .sp diff --git a/mysql-wsrep-5.6/man/mysqltest.1 b/mysql-wsrep-5.6/man/mysqltest.1 index b4eb9676..41a447da 100644 --- a/mysql-wsrep-5.6/man/mysqltest.1 +++ b/mysql-wsrep-5.6/man/mysqltest.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysqltest\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/02/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL .\" Language: English .\" -.TH "\FBMYSQLTEST\FR" "1" "03/02/2016" "MySQL" "MySQL Database System" +.TH "\FBMYSQLTEST\FR" "1" "08/25/2016" "MySQL" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,8 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysqltest -.\" mysqltest_embedded .SH "NAME" mysqltest \- program to run test cases .br @@ -152,8 +150,6 @@ supports the following options: .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: help option -.\" help option: mysqltest \fB\-\-help\fR, \fB\-?\fR .sp @@ -168,8 +164,6 @@ Display a help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: basedir option -.\" basedir option: mysqltest \fB\-\-basedir=\fR\fB\fIdir_name\fR\fR, \fB\-b \fR\fB\fIdir_name\fR\fR .sp @@ -184,8 +178,6 @@ The base directory for tests\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: character-sets-dir option -.\" character-sets-dir option: mysqltest \fB\-\-character\-sets\-dir=\fR\fB\fIpath\fR\fR .sp The directory where character sets are installed\&. @@ -199,8 +191,6 @@ The directory where character sets are installed\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: compress option -.\" compress option: mysqltest \fB\-\-compress\fR, \fB\-C\fR .sp @@ -215,8 +205,6 @@ Compress all information sent between the client and the server if both support .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: currsor-protocol option -.\" cursor-protocol option: mysqltest \fB\-\-cursor\-protocol\fR .sp Use cursors for prepared statements\&. @@ -230,8 +218,6 @@ Use cursors for prepared statements\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: database option -.\" database option: mysqltest \fB\-\-database=\fR\fB\fIdb_name\fR\fR, \fB\-D \fR\fB\fIdb_name\fR\fR .sp @@ -246,8 +232,6 @@ The default database to use\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: debug option -.\" debug option: mysqltest \fB\-\-debug[=\fR\fB\fIdebug_options\fR\fR\fB]\fR, \fB\-#[\fR\fB\fIdebug_options\fR\fR\fB]\fR .sp @@ -265,8 +249,6 @@ value is .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: debug-check option -.\" debug-check option: mysqltest \fB\-\-debug\-check\fR .sp Print some debugging information when the program exits\&. @@ -280,8 +262,6 @@ Print some debugging information when the program exits\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: debug-info option -.\" debug-info option: mysqltest \fB\-\-debug\-info\fR .sp Print debugging information and memory and CPU usage statistics when the program exits\&. @@ -295,8 +275,6 @@ Print debugging information and memory and CPU usage statistics when the program .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: explain-protocol option -.\" explain-protocol option: mysqltest \fB\-\-explain\-protocol\fR, .sp Run @@ -312,8 +290,6 @@ on all SELECT, INSERT, REPLACE, UPDATE and DELETE queries\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: host option -.\" host option: mysqltest \fB\-\-host=\fR\fB\fIhost_name\fR\fR, \fB\-h \fR\fB\fIhost_name\fR\fR .sp @@ -328,8 +304,6 @@ Connect to the MySQL server on the given host\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: include option -.\" include option: mysqltest \fB\-\-include=\fR\fB\fIfile_name\fR\fR, \fB\-i \fR\fB\fIfile_name\fR\fR .sp @@ -348,8 +322,6 @@ command as the first line of the test file\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: json-explain-protocol option -.\" json-explain-protocol option: mysqltest \fB\-\-json\-explain\-protocol\fR, .sp Run @@ -367,8 +339,6 @@ option is available from MySQL 5\&.6\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: logdir option -.\" logdir option: mysqltest \fB\-\-logdir=\fR\fB\fIdir_name\fR\fR .sp The directory to use for log files\&. @@ -382,8 +352,6 @@ The directory to use for log files\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: mark-progress option -.\" mark-progress option: mysqltest \fB\-\-mark\-progress\fR .sp Write the line number and elapsed time to @@ -398,8 +366,6 @@ Write the line number and elapsed time to .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: max-connect-retries option -.\" max-connect-retries option: mysqltest \fB\-\-max\-connect\-retries=\fR\fB\fInum\fR\fR .sp The maximum number of connection attempts when connecting to server\&. @@ -413,8 +379,6 @@ The maximum number of connection attempts when connecting to server\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: max-connections option -.\" max-connections option: mysqltest \fB\-\-max\-connections=\fR\fB\fInum\fR\fR .sp The maximum number of simultaneous server connections per client (that is, per test)\&. If not set, the maximum is 128\&. Minimum allowed limit is 8, maximum is 5120\&. @@ -428,8 +392,6 @@ The maximum number of simultaneous server connections per client (that is, per t .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: no-defaults option -.\" no-defaults option: mysqltest \fB\-\-no\-defaults\fR .sp Do not read default options from any option files\&. If used, this must be the first option\&. @@ -443,8 +405,6 @@ Do not read default options from any option files\&. If used, this must be the f .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: plugin-dir option -.\" plugin-dir option: mysqltest \fB\-\-plugin\-dir=\fR\fB\fIpath\fR\fR .sp The directory in which to look for plugins\&. It may be necessary to specify this option if the @@ -464,8 +424,6 @@ does not find it\&. This option was added in MySQL 5\&.5\&.7\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: password option -.\" password option: mysqltest \fB\-\-password[=\fR\fB\fIpassword\fR\fR\fB]\fR, \fB\-p[\fR\fB\fIpassword\fR\fR\fB]\fR .sp @@ -488,8 +446,6 @@ option on the command line, you are prompted for one\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: port option -.\" port option: mysqltest \fB\-\-port=\fR\fB\fIport_num\fR\fR, \fB\-P \fR\fB\fIport_num\fR\fR .sp @@ -504,8 +460,6 @@ The TCP/IP port number to use for the connection\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: protocol option -.\" protocol option: mysqltest \fB\-\-protocol=\fR\fB{TCP|SOCKET|PIPE|MEMORY}\fR .sp Choose the protocol for communication with the server\&. @@ -525,8 +479,6 @@ option is ignored if running with the embedded server\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: ps-protocol option -.\" ps-protocol option: mysqltest \fB\-\-ps\-protocol\fR .sp Use the prepared\-statement protocol for communication\&. @@ -540,13 +492,9 @@ Use the prepared\-statement protocol for communication\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: quiet option -.\" quiet option: mysqltest \fB\-\-quiet\fR .sp Suppress all normal output\&. This is a synonym for -.\" mysqltest: silent option -.\" silent option: mysqltest \fB\-\-silent\fR\&. .RE .sp @@ -558,8 +506,6 @@ Suppress all normal output\&. This is a synonym for .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: record option -.\" record option: mysqltest \fB\-\-record\fR, \fB\-r\fR .sp @@ -577,8 +523,6 @@ option, if that option is given\&. It is an error to use this option without als .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: result-file option -.\" result-file option: mysqltest \fB\-\-result\-file=\fR\fB\fIfile_name\fR\fR, \fB\-R \fR\fB\fIfile_name\fR\fR .sp @@ -663,8 +607,6 @@ updates the given file by writing the actual test results to it\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: server-arg option -.\" server-arg option: mysqltest \fB\-\-server\-arg=\fR\fB\fIvalue\fR\fR, \fB\-A \fR\fB\fIvalue\fR\fR .sp @@ -682,8 +624,6 @@ or .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: server-file option -.\" server-file option: mysqltest \fB\-\-server\-file=\fR\fB\fIfile_name\fR\fR, \fB\-F \fR\fB\fIfile_name\fR\fR .sp @@ -698,8 +638,6 @@ Read arguments for the embedded server from the given file\&. The file should co .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: server-public-key-path option -.\" server-public-key-path option: mysqltest \fB\-\-server\-public\-key\-path=\fR\fBfile_name\fR .sp The path name to a file containing the server RSA public key\&. The file must be in PEM format\&. The public key is used for RSA encryption of the client password for connections to the server made using accounts that authenticate with the @@ -727,8 +665,6 @@ and renamed in 5\&.6\&.7 to .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: silent option -.\" silent option: mysqltest \fB\-\-silent\fR, \fB\-s\fR .sp @@ -743,8 +679,6 @@ Suppress all normal output\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: skip-safemalloc option -.\" skip-safemalloc option: mysqltest \fB\-\-skip\-safemalloc\fR .sp Do not use memory allocation checking\&. @@ -758,8 +692,6 @@ Do not use memory allocation checking\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: sleep option -.\" sleep option: mysqltest \fB\-\-sleep=\fR\fB\fInum\fR\fR, \fB\-T \fR\fB\fInum\fR\fR .sp @@ -784,8 +716,6 @@ commands in the test case\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: socket option -.\" socket option: mysqltest \fB\-\-socket=\fR\fB\fIpath\fR\fR, \fB\-S \fR\fB\fIpath\fR\fR .sp @@ -802,8 +732,6 @@ localhost .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: sp-protocol option -.\" sp-protocol option: mysqltest \fB\-\-sp\-protocol\fR .sp Execute DML statements within a stored procedure\&. For every DML statement, @@ -819,8 +747,6 @@ creates and invokes a stored procedure that executes the statement rather than e .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: tail-lines option -.\" tail-lines option: mysqltest \fB\-\-tail\-lines=\fR\fB\fInn\fR\fR .sp Specify how many lines of the result to include in the output if the test fails because an SQL statement fails\&. The default is 0, meaning no lines of result printed\&. @@ -834,8 +760,6 @@ Specify how many lines of the result to include in the output if the test fails .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: test-file option -.\" test-file option: mysqltest \fB\-\-test\-file=\fR\fB\fIfile_name\fR\fR, \fB\-x \fR\fB\fIfile_name\fR\fR .sp @@ -850,8 +774,6 @@ Read test input from this file\&. The default is to read from the standard input .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: timer-file option -.\" timer-file option: mysqltest \fB\-\-timer\-file=\fR\fB\fIfile_name\fR\fR, \fB\-m \fR\fB\fIfile_name\fR\fR .sp @@ -868,8 +790,6 @@ for its reporting\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: tls-version option -.\" tls-version option: mysqltest \fB\-\-tls\-version=\fR\fB\fIprotocol_list\fR\fR .sp The protocols permitted by the client for encrypted connections\&. The value is a comma\-separated list containing one or more of these protocols: TLSv1, TLSv1\&.1, TLSv1\&.2\&. (TLSv1\&.2 is supported only if MySQL was compiled using OpenSSL 1\&.0\&.1 or higher\&. It is not supported if MySQL was compiled using yaSSL\&.) @@ -885,8 +805,6 @@ This option was added in MySQL 5\&.7\&.10\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: tmpdir option -.\" tmpdir option: mysqltest \fB\-\-tmpdir=\fR\fB\fIdir_name\fR\fR, \fB\-t \fR\fB\fIdir_name\fR\fR .sp @@ -901,8 +819,6 @@ The temporary directory where socket files are created\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: trace-exec option -.\" trace-exec option: mysqltest \fB\-\-trace\-exec\fR .sp If enabled, this option causes @@ -921,8 +837,6 @@ This option was added in MySQL 5\&.8\&.0\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: user option -.\" user option: mysqltest \fB\-\-user=\fR\fB\fIuser_name\fR\fR, \fB\-u \fR\fB\fIuser_name\fR\fR .sp @@ -937,8 +851,6 @@ The MySQL user name to use when connecting to the server\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: verbose option -.\" verbose option: mysqltest \fB\-\-verbose\fR, \fB\-v\fR .sp @@ -953,8 +865,6 @@ Verbose mode\&. Print out more information about what the program does\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: version option -.\" version option: mysqltest \fB\-\-version\fR, \fB\-V\fR .sp @@ -969,8 +879,6 @@ Display version information and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: view-protocol option -.\" view-protocol option: mysqltest \fB\-\-view\-protocol\fR .sp Every diff --git a/mysql-wsrep-5.6/man/mysqltest_embedded.1 b/mysql-wsrep-5.6/man/mysqltest_embedded.1 index 1ac69456..22c91316 100644 --- a/mysql-wsrep-5.6/man/mysqltest_embedded.1 +++ b/mysql-wsrep-5.6/man/mysqltest_embedded.1 @@ -1 +1 @@ -.so man/mysqltest.1 +.so mysqltest.1 diff --git a/mysql-wsrep-5.6/man/perror.1 b/mysql-wsrep-5.6/man/perror.1 index f9f15180..08e4b645 100644 --- a/mysql-wsrep-5.6/man/perror.1 +++ b/mysql-wsrep-5.6/man/perror.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBperror\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/02/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBPERROR\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBPERROR\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,10 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" perror -.\" error messages: displaying -.\" errno -.\" Errcode .SH "NAME" perror \- explain error codes .SH "SYNOPSIS" @@ -115,8 +111,6 @@ supports the following options\&. .sp -1 .IP \(bu 2.3 .\} -.\" perror: help option -.\" help option: perror \fB\-\-help\fR, \fB\-\-info\fR, \fB\-I\fR, @@ -133,8 +127,6 @@ Display a help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" perror: ndb option -.\" ndb option: perror \fB\-\-ndb\fR .sp Print the error message for a MySQL Cluster error code\&. @@ -148,8 +140,6 @@ Print the error message for a MySQL Cluster error code\&. .sp -1 .IP \(bu 2.3 .\} -.\" perror: silent option -.\" silent option: perror \fB\-\-silent\fR, \fB\-s\fR .sp @@ -164,8 +154,6 @@ Silent mode\&. Print only the error message\&. .sp -1 .IP \(bu 2.3 .\} -.\" perror: verbose option -.\" verbose option: perror \fB\-\-verbose\fR, \fB\-v\fR .sp @@ -180,8 +168,6 @@ Verbose mode\&. Print error code and message\&. This is the default behavior\&. .sp -1 .IP \(bu 2.3 .\} -.\" perror: version option -.\" version option: perror \fB\-\-version\fR, \fB\-V\fR .sp diff --git a/mysql-wsrep-5.6/man/replace.1 b/mysql-wsrep-5.6/man/replace.1 index e4c2ef8f..42e523b8 100644 --- a/mysql-wsrep-5.6/man/replace.1 +++ b/mysql-wsrep-5.6/man/replace.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBreplace\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/02/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBREPLACE\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBREPLACE\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,8 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" replace utility -.\" string replacement: replace utility .SH "NAME" replace \- a string\-replacement utility .SH "SYNOPSIS" diff --git a/mysql-wsrep-5.6/man/resolve_stack_dump.1 b/mysql-wsrep-5.6/man/resolve_stack_dump.1 index e3d1ab18..355c6861 100644 --- a/mysql-wsrep-5.6/man/resolve_stack_dump.1 +++ b/mysql-wsrep-5.6/man/resolve_stack_dump.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBresolve_stack_dump\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/02/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBRESOLVE_STACK_DUM" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBRESOLVE_STACK_DUM" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" resolve_stack_dump .SH "NAME" resolve_stack_dump \- resolve numeric stack trace dump to symbols .SH "SYNOPSIS" @@ -68,8 +67,6 @@ supports the following options\&. .sp -1 .IP \(bu 2.3 .\} -.\" resolve_stack_dump: help option -.\" help option: resolve_stack_dump \fB\-\-help\fR, \fB\-h\fR .sp @@ -84,8 +81,6 @@ Display a help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" resolve_stack_dump: numeric-dump-file option -.\" numeric-dump-file option: resolve_stack_dump \fB\-\-numeric\-dump\-file=\fR\fB\fIfile_name\fR\fR, \fB\-n \fR\fB\fIfile_name\fR\fR .sp @@ -100,8 +95,6 @@ Read the stack trace from the given file\&. .sp -1 .IP \(bu 2.3 .\} -.\" resolve_stack_dump: symbols-file option -.\" symbols-file option: resolve_stack_dump \fB\-\-symbols\-file=\fR\fB\fIfile_name\fR\fR, \fB\-s \fR\fB\fIfile_name\fR\fR .sp @@ -116,8 +109,6 @@ Use the given symbols file\&. .sp -1 .IP \(bu 2.3 .\} -.\" resolve_stack_dump: version option -.\" version option: resolve_stack_dump \fB\-\-version\fR, \fB\-V\fR .sp diff --git a/mysql-wsrep-5.6/man/resolveip.1 b/mysql-wsrep-5.6/man/resolveip.1 index 97b76581..6c9e0321 100644 --- a/mysql-wsrep-5.6/man/resolveip.1 +++ b/mysql-wsrep-5.6/man/resolveip.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBresolveip\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/02/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBRESOLVEIP\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBRESOLVEIP\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" resolveip .SH "NAME" resolveip \- resolve host name to IP address or vice versa .SH "SYNOPSIS" @@ -64,8 +63,6 @@ supports the following options\&. .sp -1 .IP \(bu 2.3 .\} -.\" resolveip: help option -.\" help option: resolveip \fB\-\-help\fR, \fB\-\-info\fR, \fB\-?\fR, @@ -82,8 +79,6 @@ Display a help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" resolveip: silent option -.\" silent option: resolveip \fB\-\-silent\fR, \fB\-s\fR .sp @@ -98,8 +93,6 @@ Silent mode\&. Produce less output\&. .sp -1 .IP \(bu 2.3 .\} -.\" resolveip: version option -.\" version option: resolveip \fB\-\-version\fR, \fB\-V\fR .sp diff --git a/mysql-wsrep-5.6/mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test b/mysql-wsrep-5.6/mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test index f6886e8d..ceca8319 100644 --- a/mysql-wsrep-5.6/mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test +++ b/mysql-wsrep-5.6/mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test @@ -346,7 +346,7 @@ if (`select @@binlog_format = 'STATEMENT' || @@binlog_format = 'MIXED'`) --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR eval select (@a:=load_file("$MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output")) - is not null; + is not null AS Loaded; --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR eval select @a like "%#%error_code=0%ROLLBACK\\n/*!*/;%ROLLBACK /* added by mysqlbinlog */;%" OR diff --git a/mysql-wsrep-5.6/mysql-test/extra/rpl_tests/rpl_generate_mts_gap.test b/mysql-wsrep-5.6/mysql-test/extra/rpl_tests/rpl_generate_mts_gap.test new file mode 100644 index 00000000..8652f0bd --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/extra/rpl_tests/rpl_generate_mts_gap.test @@ -0,0 +1,47 @@ +# Following test first creates two databases (d1 and d2) and setup slave to use +# two parallel workers. The test case then insert on the slave a tuple that will +# block writes on d2 and generate gaps. + +--let $slave_stop_wait=5 + +--echo #### I. Initialize #### + +--source include/rpl_connection_slave.inc +--source include/stop_slave.inc +SET @save.innodb_lock_wait_timeout= @@global.innodb_lock_wait_timeout; +--eval set @@global.innodb_lock_wait_timeout=$slave_stop_wait + 1000 + +--source include/start_slave.inc + +--source include/rpl_connection_master.inc +CREATE DATABASE d1; +CREATE DATABASE d2; +CREATE TABLE d1.t (a INT PRIMARY KEY, name text) ENGINE=INNODB; +CREATE TABLE d2.t (a INT PRIMARY KEY, name text) ENGINE=INNODB; + +--echo #### II. Prepare test scenario #### + +--source include/sync_slave_sql_with_master.inc +BEGIN; +INSERT INTO d2.t VALUES (2, 'Slave local'); # Hold T3 +INSERT INTO d1.t VALUES (3, 'Slave local'); # Hold T6 + +--source include/rpl_connection_master.inc +INSERT INTO d1.t VALUES (1, 'T1'); +INSERT INTO d2.t VALUES (1, 'T2'); +INSERT INTO d2.t VALUES (2, 'T3'); # This will be a gap when executed on slave +INSERT INTO d2.t VALUES (3, 'T4'); # This will be a gap when executed on slave +INSERT INTO d1.t VALUES (2, 'T5'); + +--source include/rpl_connection_slave1.inc +--let $table=d1.t +--let $count=2 +--source include/wait_until_rows_count.inc + +--echo # Now d1.t has two rows and d2.t has one row. + +# Wait for coordinator to populate worker's queues. +--let $show_statement= SHOW PROCESSLIST +--let $field= State +--let $condition= = 'Slave has read all relay log; waiting for the slave I/O thread to update it' +--source include/wait_show_condition.inc diff --git a/mysql-wsrep-5.6/mysql-test/extra/rpl_tests/rpl_mts_relay_log_recovery.test b/mysql-wsrep-5.6/mysql-test/extra/rpl_tests/rpl_mts_relay_log_recovery.test new file mode 100644 index 00000000..c990e6cd --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/extra/rpl_tests/rpl_mts_relay_log_recovery.test @@ -0,0 +1,95 @@ +############################################################################### +# Bug#21507981: REPLICATION POSITION LOST AFTER CRASH ON MTS CONFIGURED SLAVE +# +# Problem: +# ======== +# Enable MTS along with crash-safe replication tables. Make sure that the server +# is busily inserting data with multiple threads in parallel. Shutdown mysqld +# uncleanly (kill -9 or power off server without notice). +# +# Now users are restarting the server with --relay-log-recovery=1 to recover the +# crashed slave. +# +# This results in following error: +# ================================ +# 2015-06-24 13:49:03 3895 [ERROR] --relay-log-recovery cannot +# be executed when the slave was stopped with an error or +# killed in MTS mode; consider using RESET SLAVE or restart +# the server with --relay-log-recovery = 0 followed by +# START SLAVE UNTIL SQL_AFTER_MTS_GAPS. +# +# i.e relay-log-recovery will not work in MTS mode. +############################################################################### +# Following test demonstrates that when gaps are generated due to MTS crash +# but not due to an error then recovery should be successful with +# --relay-log-recovery=1 option. +# +# ==== Usage ==== +# --let $skip_slave_start_var= BOOL [ TRUE / FALSE ] +# --source extra/rpl_tests/rpl_mts_relay_log_recovery.test +# +# Parameters: +# +# $skip_slave_start_var +# Boolean that specifies if 'skip_slave_start' server parameter should be +# TRUE or FALSE. +# +# Testing Method: +# =============== +# It first creates two databases (d1 and d2) and setup slave to use two parallel +# workers. The test case then insert on the slave a tuple that will block +# writes on d2 and generate gaps. Crash the slave server at this point and +# bring it back with --relay-log-recovery=1 and crash safe tables. Recovery +# should be successful. + +--source extra/rpl_tests/rpl_generate_mts_gap.test + +--source include/rpl_connection_slave.inc +CALL mtr.add_suppression("Recovery from master pos"); +# Kill the slave server +--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.2.expect +let PID_FILE= `SELECT @@pid_file`; +perl; +use strict; +my $file= $ENV{'PID_FILE'} or die "Pid file not set"; +open(FILE, "$file") or die("Unable to open $file: $!\n"); +my $pid=0; +while () { + $pid = $_; +} +close(FILE); +kill 9, $pid; +EOF + +# Restart the slave server +--let $rpl_server_number= 2 +--let $rpl_server_parameters= --skip_slave_start=$skip_slave_start_var --relay_log_info_repository=TABLE --master_info_repository=TABLE --sync_master_info=1 --relay-log-recovery=1 +--source include/rpl_start_server.inc + +--exec echo "After restart gaps should be filled." + +--let $assert_text= Table d1.t should contain 2 rows. +--let $assert_cond= [select count(*) from d1.t] = 2 +--source include/assert.inc + +--let $assert_text= Table d2.t should contain 3 rows. +--let $assert_cond= [select count(*) from d2.t] = 3 +--source include/assert.inc + +--source include/start_slave.inc + +# Check consistency +--source include/rpl_connection_master.inc +--source include/sync_slave_sql_with_master.inc +--let $diff_tables= master:d1.t, slave:d1.t +--source include/diff_tables.inc + +--let $diff_tables= master:d2.t, slave:d2.t +--source include/diff_tables.inc + +# +# Cleanup +# +--source include/rpl_connection_master.inc +DROP DATABASE d1; +DROP DATABASE d2; diff --git a/mysql-wsrep-5.6/mysql-test/include/explain_utils.inc b/mysql-wsrep-5.6/mysql-test/include/explain_utils.inc index 505798e4..a697fc52 100644 --- a/mysql-wsrep-5.6/mysql-test/include/explain_utils.inc +++ b/mysql-wsrep-5.6/mysql-test/include/explain_utils.inc @@ -72,15 +72,11 @@ if ($innodb) { } } --eval EXPLAIN FORMAT=JSON $query; -if ($validation) { ---disable_query_log ---replace_result $MASTER_MYSOCK MASTER_MYSOCK +--disable_result_log --exec $MYSQL -S $MASTER_MYSOCK -u root -r test -e "EXPLAIN FORMAT=JSON $query;" > $MYSQLTEST_VARDIR/tmp/explain.json ---replace_regex /[-]*// /FILE.[\/\\:_\.0-9A-Za-z]*/Validation:/ ---exec python $MYSQL_TEST_DIR/suite/opt_trace/validate_json.py $MYSQLTEST_VARDIR/tmp/explain.json +--exec perl $MYSQL_TEST_DIR/suite/opt_trace/validate_json.pl $MYSQLTEST_VARDIR/tmp/explain.json --remove_file '$MYSQLTEST_VARDIR/tmp/explain.json' ---enable_query_log -} +--enable_result_log } if ($select) { @@ -107,15 +103,11 @@ if ($innodb) { } } --eval EXPLAIN FORMAT=JSON $select; -if ($validation) { ---disable_query_log ---replace_result $MASTER_MYSOCK MASTER_MYSOCK +--disable_result_log --exec $MYSQL -S $MASTER_MYSOCK -u root -r test -e "EXPLAIN FORMAT=JSON $select;" > $MYSQLTEST_VARDIR/tmp/explain.json ---replace_regex /[-]*// /FILE.[\/\\:_\.0-9A-Za-z]*/Validation:/ ---exec python $MYSQL_TEST_DIR/suite/opt_trace/validate_json.py $MYSQLTEST_VARDIR/tmp/explain.json +--exec perl $MYSQL_TEST_DIR/suite/opt_trace/validate_json.pl $MYSQLTEST_VARDIR/tmp/explain.json --remove_file '$MYSQLTEST_VARDIR/tmp/explain.json' ---enable_query_log -} +--enable_result_log } } diff --git a/mysql-wsrep-5.6/mysql-test/include/galera_wait_ready.inc b/mysql-wsrep-5.6/mysql-test/include/galera_wait_ready.inc index 56525385..e20f01fa 100644 --- a/mysql-wsrep-5.6/mysql-test/include/galera_wait_ready.inc +++ b/mysql-wsrep-5.6/mysql-test/include/galera_wait_ready.inc @@ -1,3 +1,2 @@ -let $wait_timeout = 10; let $wait_condition = SELECT 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready' AND VARIABLE_VALUE = 'ON'; --source include/wait_condition.inc diff --git a/mysql-wsrep-5.6/mysql-test/include/mtr_warnings.sql b/mysql-wsrep-5.6/mysql-test/include/mtr_warnings.sql index 228ccce9..e2a1225f 100644 --- a/mysql-wsrep-5.6/mysql-test/include/mtr_warnings.sql +++ b/mysql-wsrep-5.6/mysql-test/include/mtr_warnings.sql @@ -281,11 +281,17 @@ INSERT INTO global_suppressions VALUES ("WSREP: Failed to prepare for incremental state transfer: Local state seqno is undefined:"), ("WSREP: gcs_caused\\(\\) returned -107 \\(Transport endpoint is not connected\\)"), ("WSREP: gcs_caused\\(\\) returned -1 \\(Operation not permitted\\)"), - ("WSREP: Action message in non-primary configuration from member 0"), + ("Action message in non-primary configuration from member"), ("InnoDB: Resizing redo log from"), ("InnoDB: Starting to delete and rewrite log files"), ("InnoDB: New log files created, LSN="), - +-- WSREP: Send action {0x7f86280147f0, 73, STATE_REQUEST} returned -107 (Transport endpoint is not connected) + ("Transport endpoint is not connected"), +-- "WSREP: Protocol violation. JOIN message sender 1.0 (host-91-221-67-96) is not in state transfer (SYNCED). Message ignored. + ("is not in state transfer"), + ("JOIN message from member .* in non-primary configuration"), + ("install timer expired"), + ("Last Applied Action message in non-primary configuration from member"), ("THE_LAST_SUPPRESSION")|| diff --git a/mysql-wsrep-5.6/mysql-test/include/plugin.defs b/mysql-wsrep-5.6/mysql-test/include/plugin.defs index a1a378a9..4af98081 100644 --- a/mysql-wsrep-5.6/mysql-test/include/plugin.defs +++ b/mysql-wsrep-5.6/mysql-test/include/plugin.defs @@ -46,3 +46,4 @@ libmemcached plugin/innodb_memcached/daemon_memcached DAEMON_MEMCACHED dae innodb_engine plugin/innodb_memcached/innodb_memcache INNODB_ENGINE validate_password plugin/password_validation VALIDATE_PASSWORD validate_password mysql_no_login plugin/mysql_no_login MYSQL_NO_LOGIN mysql_no_login +test_udf_services plugin/udf_services TESTUDFSERVICES diff --git a/mysql-wsrep-5.6/mysql-test/include/python_with_json.inc b/mysql-wsrep-5.6/mysql-test/include/python_with_json.inc deleted file mode 100644 index 49a0b99b..00000000 --- a/mysql-wsrep-5.6/mysql-test/include/python_with_json.inc +++ /dev/null @@ -1,25 +0,0 @@ ---disable_result_log -write_file $MYSQLTEST_VARDIR/tmp/explain.json; -{ - "table": - { - "id": 1, - "select_type": "SIMPLE", - "table_name": "t1", - "join_type": "index", - "key": "i1", - "key_length": "5", - "rows": 3, - "extra": - [ - "Using index" - ] - } -} -EOF ---require r/python_with_json.require ---replace_regex /[-]*// /FILE.[\/\\:_\.0-9A-Za-z]*/Validation:/ ---exec python $MYSQL_TEST_DIR/suite/opt_trace/validate_json.py $MYSQLTEST_VARDIR/tmp/explain.json ---remove_file '$MYSQLTEST_VARDIR/tmp/explain.json' ---enable_result_log - diff --git a/mysql-wsrep-5.6/mysql-test/include/subquery_sj.inc b/mysql-wsrep-5.6/mysql-test/include/subquery_sj.inc index 8a95c37c..f777e9d8 100644 --- a/mysql-wsrep-5.6/mysql-test/include/subquery_sj.inc +++ b/mysql-wsrep-5.6/mysql-test/include/subquery_sj.inc @@ -6603,3 +6603,80 @@ set @@optimizer_switch=@old_opt_switch; # New tests go here. --echo # End of 5.6 tests + +--echo # Bug#21139722: Assertion failed: !(used_tables() & ((table_map) 1) ... + +CREATE TABLE t1(a INTEGER) engine=innodb; +CREATE TABLE t2(b INTEGER) engine=innodb; + +let $query= +SELECT 1 +FROM (SELECT 1 IN (SELECT 1 + FROM t1 + WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2) + ) + FROM t2 + ) AS z; + +eval explain $query; +eval $query; + +DROP TABLE t1, t2; + +# A test case containing two outer references from different query blocks +# Debugging is needed to inspect correct transformation, unfortunately. + +CREATE TABLE t1(a INTEGER) engine=innodb; + +let $query= +SELECT (SELECT a + FROM t1 AS t2 + WHERE a IN (SELECT t1.a+t2.a + FROM t1 AS t3)) +FROM t1 AS t1; + +eval explain $query; +eval $query; + +DROP TABLE t1; + +--echo # End of test for Bug#21139722 + +--echo # +--echo # Bug#21139402 ASSERTION FAILED: LENGTH > 0 && KEYPARTS != 0, CRASH IN JOIN::OPTIMIZE_KEYUSE +--echo # + +CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a)); +CREATE TABLE t2 (c INT PRIMARY KEY); +let $query= +SELECT 1 +FROM t1 +WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a + FROM t1 + WHERE b) + FROM t2); +eval EXPLAIN $query; +eval $query; +DROP TABLE t1,t2; + +--echo # +--echo # Bug #22305361: QUERY WITH MATERIALIZED TABLE RETURNS INCORRECT +--echo # RESULTS IN 5.6 +--echo # + +CREATE TABLE t(a INT,b INT); +INSERT INTO t VALUES (1,0),(1,0),(1,0),(1,0),(1,1); + +let query= +SELECT * +FROM t AS t1 +WHERE t1.a IN (SELECT t2.a + FROM t AS t2 + WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a + FROM t AS t3 + WHERE t3.b=1)); + +eval EXPLAIN extended $query; +eval $query; + +DROP TABLE t; diff --git a/mysql-wsrep-5.6/mysql-test/include/wait_condition.inc b/mysql-wsrep-5.6/mysql-test/include/wait_condition.inc index de53fb59..1dbc36d4 100644 --- a/mysql-wsrep-5.6/mysql-test/include/wait_condition.inc +++ b/mysql-wsrep-5.6/mysql-test/include/wait_condition.inc @@ -39,7 +39,7 @@ let $wait_timeout= 0; let $wait_condition_reps= 0; while ($wait_counter) { - --error 0,ER_NO_SUCH_TABLE,ER_LOCK_WAIT_TIMEOUT,ER_UNKNOWN_COM_ERROR + --error 0,ER_NO_SUCH_TABLE,ER_LOCK_WAIT_TIMEOUT,ER_UNKNOWN_COM_ERROR,ER_LOCK_DEADLOCK let $success= `$wait_condition`; inc $wait_condition_reps; if ($success) diff --git a/mysql-wsrep-5.6/mysql-test/lib/My/SysInfo.pm b/mysql-wsrep-5.6/mysql-test/lib/My/SysInfo.pm index 4cca1166..51f7f326 100644 --- a/mysql-wsrep-5.6/mysql-test/lib/My/SysInfo.pm +++ b/mysql-wsrep-5.6/mysql-test/lib/My/SysInfo.pm @@ -1,5 +1,5 @@ # -*- cperl -*- -# Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -103,6 +103,40 @@ sub _kstat { return undef; } +sub _sysctl { + my ($self)= @_; + my $ncpu= `sysctl hw.ncpu 2> /dev/null`; + if ($ncpu eq '') { + return undef; + } + + my $cpuinfo= {}; + $ncpu =~ s/\D//g; + my $list = `sysctl machdep.cpu | grep machdep\.cpu\.[^.]*: 2> /dev/null`; + my @lines= split('\n', $list); + + foreach my $line (@lines) { + # Default value, the actual cpu values can be used to decrease this + # on slower cpus + $cpuinfo->{bogomips}= DEFAULT_BOGO_MIPS; + + my ($statistic, $value)= + $line=~ /machdep\.cpu\.(.*):\s+(.*)/; + $cpuinfo->{$statistic}= $value; + } + + for (1..$ncpu) { + my $temp_cpuinfo = $cpuinfo; + $temp_cpuinfo->{processor}= $_; + push(@{$self->{cpus}}, $temp_cpuinfo); + } + + # At least one cpu should have been found + # if this method worked + if ( $self->{cpus} ) { + return $self; + } +} sub _unamex { my ($self)= @_; @@ -123,6 +157,7 @@ sub new { ( \&_cpuinfo, \&_kstat, + \&_sysctl, \&_unamex, ); @@ -162,6 +197,9 @@ sub cpus { # Return the number of cpus found sub num_cpus { + if (IS_WINDOWS) { + return $ENV{NUMBER_OF_PROCESSORS} || 1; + } my ($self)= @_; return int(@{$self->{cpus}}) or confess "INTERNAL ERROR: No cpus in list"; diff --git a/mysql-wsrep-5.6/mysql-test/mysql-test-run.pl b/mysql-wsrep-5.6/mysql-test/mysql-test-run.pl index 879a9d85..9cb0351d 100755 --- a/mysql-wsrep-5.6/mysql-test/mysql-test-run.pl +++ b/mysql-wsrep-5.6/mysql-test/mysql-test-run.pl @@ -1,7 +1,7 @@ #!/usr/bin/perl # -*- cperl -*- -# Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -401,14 +401,16 @@ sub main { for my $limit (2000, 1500, 1000, 500){ $opt_parallel-- if ($sys_info->min_bogomips() < $limit); } - my $max_par= $ENV{MTR_MAX_PARALLEL} || 8; - $opt_parallel= $max_par if ($opt_parallel > $max_par); - $opt_parallel= $num_tests if ($opt_parallel > $num_tests); - $opt_parallel= 1 if (IS_WINDOWS and $sys_info->isvm()); + if(defined $ENV{MTR_MAX_PARALLEL}) { + my $max_par= $ENV{MTR_MAX_PARALLEL}; + $opt_parallel= $max_par if ($opt_parallel > $max_par); + } $opt_parallel= 1 if ($opt_parallel < 1); - mtr_report("Using parallel: $opt_parallel"); } + # Limit parallel workers to number of tests to avoid idle workers + $opt_parallel= $num_tests if ($num_tests > 0 and $opt_parallel > $num_tests); $ENV{MTR_PARALLEL} = $opt_parallel; + mtr_report("Using parallel: $opt_parallel"); if ($opt_parallel > 1 && ($opt_start_exit || $opt_stress)) { mtr_warning("Parallel cannot be used with --start-and-exit or --stress\n" . @@ -1788,9 +1790,13 @@ sub set_build_thread_ports($) { if ( lc($opt_build_thread) eq 'auto' ) { my $found_free = 0; $build_thread = 300; # Start attempts from here + + my $build_thread_upper = $build_thread + ($opt_parallel > 39 + ? $opt_parallel + int($opt_parallel / 4) + : 49); while (! $found_free) { - $build_thread= mtr_get_unique_id($build_thread, 349); + $build_thread= mtr_get_unique_id($build_thread, $build_thread_upper); if ( !defined $build_thread ) { mtr_error("Could not get a unique build thread id"); } @@ -5938,6 +5944,7 @@ sub start_mysqltest ($) { $exe= "strace"; mtr_add_arg($args, "-o"); mtr_add_arg($args, "%s/log/mysqltest.strace", $opt_vardir); + mtr_add_arg($args, "-f"); mtr_add_arg($args, "$exe_mysqltest"); } @@ -6336,6 +6343,7 @@ sub strace_server_arguments { mtr_add_arg($args, "-o"); mtr_add_arg($args, "%s/log/%s.strace", $opt_vardir, $type); + mtr_add_arg($args, "-f"); mtr_add_arg($args, $$exe); $$exe= "strace"; } diff --git a/mysql-wsrep-5.6/mysql-test/r/func_str.result b/mysql-wsrep-5.6/mysql-test/r/func_str.result index 000e8eea..236ca2ba 100644 --- a/mysql-wsrep-5.6/mysql-test/r/func_str.result +++ b/mysql-wsrep-5.6/mysql-test/r/func_str.result @@ -4514,5 +4514,15 @@ id insert(0x3a, 1, 0, d) 2 public data: DROP TABLE t1; # +# Bug#22888420 CONCAT_WS: ASSERTION FAILED: !S.USES_BUFFER_OWNED_BY(THIS) +# +do concat('a',concat_ws('a', 0x2859, 'a' , +trim(period_add('a',1) from (1&'')) +) +); +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '' +Warning 1292 Truncated incorrect INTEGER value: 'a' +# # End of 5.6 tests # diff --git a/mysql-wsrep-5.6/mysql-test/r/insert.result b/mysql-wsrep-5.6/mysql-test/r/insert.result index 0763b89c..59121a5b 100644 --- a/mysql-wsrep-5.6/mysql-test/r/insert.result +++ b/mysql-wsrep-5.6/mysql-test/r/insert.result @@ -750,3 +750,18 @@ ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (` UPDATE t1, t2 SET t1.fld1= t1.fld1 + 3; ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`fld2`) REFERENCES `t1` (`fld1`)) DROP TABLE t2, t1; +# +# BUG#22037930: INSERT IGNORE FAILS TO IGNORE FOREIGN +# KEY CONSTRAINT +CREATE TABLE t1 (fld1 INT PRIMARY KEY) ENGINE= INNODB; +CREATE TABLE t2 (fld1 VARCHAR(10), fld2 INT NOT NULL, +CONSTRAINT fk FOREIGN KEY (fld2) REFERENCES t1(fld1)) ENGINE= INNODB; +# Without patch, reports incorrect error. +INSERT INTO t2 VALUES('abc', 2) ON DUPLICATE KEY UPDATE fld1= 'def'; +ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `fk` FOREIGN KEY (`fld2`) REFERENCES `t1` (`fld1`)) +REPLACE INTO t2 VALUES('abc', 2); +ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `fk` FOREIGN KEY (`fld2`) REFERENCES `t1` (`fld1`)) +INSERT IGNORE INTO t2 VALUES('abc', 2) ON DUPLICATE KEY UPDATE fld1= 'def'; +Warnings: +Warning 1452 `test`.`t2`, CONSTRAINT `fk` FOREIGN KEY (`fld2`) REFERENCES `t1` (`fld1`) +DROP TABLE t2, t1; diff --git a/mysql-wsrep-5.6/mysql-test/r/loaddata.result b/mysql-wsrep-5.6/mysql-test/r/loaddata.result index 8ccc1a3d..ba5c763f 100644 --- a/mysql-wsrep-5.6/mysql-test/r/loaddata.result +++ b/mysql-wsrep-5.6/mysql-test/r/loaddata.result @@ -507,7 +507,7 @@ DROP TABLE t1; # Bug#11765139 58069: LOAD DATA INFILE: VALGRIND REPORTS INVALID MEMORY READS AND WRITES WITH U # CREATE TABLE t1(f1 INT); -SELECT 0xE1BB30 INTO OUTFILE 't1.dat'; +SELECT 0xE1C330 INTO OUTFILE 't1.dat'; LOAD DATA INFILE 't1.dat' IGNORE INTO TABLE t1 CHARACTER SET utf8; DROP TABLE t1; # @@ -532,3 +532,27 @@ FIELDS TERMINATED BY 't' LINES TERMINATED BY ''; Got one of the listed errors SET @@sql_mode= @old_mode; DROP TABLE t1; + +# +# Bug#23080148 - Backport of Bug#20683959. +# Bug#20683959 LOAD DATA INFILE IGNORES A SPECIFIC ROW SILENTLY +# UNDER DB CHARSET IS UTF8. +# +CREATE DATABASE d1 CHARSET latin1; +USE d1; +CREATE TABLE t1 (val TEXT); +LOAD DATA INFILE '../../std_data/bug20683959loaddata.txt' INTO TABLE t1; +SELECT COUNT(*) FROM t1; +COUNT(*) +1 +SELECT HEX(val) FROM t1; +HEX(val) +C38322525420406E696F757A656368756E3A20E98198E2889AF58081AEE7B99DE4B88AE383A3E7B99DE69690F58087B3E7B9A7EFBDA8E7B99DEFBDB3E7B99DE78999E880B3E7B8BAEFBDAAE7B9A7E89699E296A1E7B8BAE4BBA3EFBD8CE7B8BAEFBDA9E7B8B2E2889AE38184E7B99DEFBDB3E7B99DE4B88AE383A3E7B99DE69690F58087B3E7B9A7EFBDA8E7B99DEFBDB3E7B99DE5B3A8EFBD84E8ABA0EFBDA8E89C89F580948EE599AAE7B8BAEFBDAAE7B8BAE9A198EFBDA9EFBDB1E7B9A7E581B5E289A0E7B8BAEFBDBEE7B9A7E9A194EFBDA9E882B4EFBDA5EFBDB5E980A7F5808B96E28693E99EABE38287E58F99E7B8BAE58AB1E28691E7B8BAF5808B9AE7828AE98095EFBDB1E7B8BAEFBDAFE7B8B2E288ABE6A89FE89EB3E6BA98F58081ADE88EA0EFBDBAE98095E6BA98F58081AEE89D93EFBDBAE8AD9BEFBDACE980A7F5808B96E28693E7B8BAF580918EE288AAE7B8BAE4B88AEFBC9EE7B8BAE4B99DE28691E7B8BAF5808B96EFBCA0E88DB3E6A68AEFBDB9EFBDB3E981B2E5B3A8E296A1E7B8BAE7A4BCE7828AE88DB3E6A68AEFBDB0EFBDBDE7B8BAA0E7B8BAE88B93EFBDBEE5B899EFBC9E +CREATE DATABASE d2 CHARSET utf8; +USE d2; +CREATE TABLE t1 (val TEXT); +LOAD DATA INFILE '../../std_data/bug20683959loaddata.txt' INTO TABLE t1; +ERROR HY000: Invalid utf8 character string: 'Ã"RT @niouzechun: \9058\221A' +DROP TABLE d1.t1, d2.t1; +DROP DATABASE d1; +DROP DATABASE d2; diff --git a/mysql-wsrep-5.6/mysql-test/r/mysql_client_test_qcache.result b/mysql-wsrep-5.6/mysql-test/r/mysql_client_test_qcache.result new file mode 100644 index 00000000..3ff2f075 --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/r/mysql_client_test_qcache.result @@ -0,0 +1,14 @@ +# Bug#22559575 "the statement (1) has no open cursor" pops sometimes with +# prepared+query_cache +# +# Create relevent tables and call C API test cases +# Setup +select VARIABLE_VALUE into @qcache_hit_val1 from +information_schema.GLOBAL_STATUS where VARIABLE_NAME = 'Qcache_hits'; + +#Run C_API test case +select VARIABLE_VALUE into @qcache_hit_val2 from +information_schema.GLOBAL_STATUS where VARIABLE_NAME = 'Qcache_hits'; +SELECT @qcache_hit_val2 - @qcache_hit_val1; +@qcache_hit_val2 - @qcache_hit_val1 +1 diff --git a/mysql-wsrep-5.6/mysql-test/r/mysql_plugin.result b/mysql-wsrep-5.6/mysql-test/r/mysql_plugin.result index e971d8bc..a99ebd9f 100644 --- a/mysql-wsrep-5.6/mysql-test/r/mysql_plugin.result +++ b/mysql-wsrep-5.6/mysql-test/r/mysql_plugin.result @@ -105,7 +105,7 @@ ERROR: Missing --plugin_dir option. # Show the help. # mysql_plugin Ver V.V.VV Distrib XX.XX.XX -Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. Enable or disable plugins. diff --git a/mysql-wsrep-5.6/mysql-test/r/mysqlbinlog.result b/mysql-wsrep-5.6/mysql-test/r/mysqlbinlog.result index c8630998..a84bbcc1 100644 --- a/mysql-wsrep-5.6/mysql-test/r/mysqlbinlog.result +++ b/mysql-wsrep-5.6/mysql-test/r/mysqlbinlog.result @@ -731,9 +731,8 @@ RESET MASTER; FLUSH LOGS; SELECT (@a:=LOAD_FILE("MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug37313.binlog")) -IS NOT NULL; -(@a:=LOAD_FILE("MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug37313.binlog")) -IS NOT NULL +IS NOT NULL AS Loaded; +Loaded 1 *** Unsigned server_id 4294967295 is found: 1 *** SET @@global.server_id= 1; diff --git a/mysql-wsrep-5.6/mysql-test/r/mysqld--help-notwin.result b/mysql-wsrep-5.6/mysql-test/r/mysqld--help-notwin.result index ab5251c6..b33fbf13 100644 --- a/mysql-wsrep-5.6/mysql-test/r/mysqld--help-notwin.result +++ b/mysql-wsrep-5.6/mysql-test/r/mysqld--help-notwin.result @@ -1429,8 +1429,8 @@ wsrep-drupal-282555-workaround FALSE wsrep-forced-binlog-format NONE wsrep-load-data-splitting TRUE wsrep-log-conflicts FALSE -wsrep-max-ws-rows 131072 -wsrep-max-ws-size 1073741824 +wsrep-max-ws-rows 0 +wsrep-max-ws-size 2147483647 wsrep-mysql-replication-bundle 0 wsrep-node-address wsrep-node-incoming-address AUTO diff --git a/mysql-wsrep-5.6/mysql-test/r/sp-prelocking.result b/mysql-wsrep-5.6/mysql-test/r/sp-prelocking.result index 9e82a966..c2d12c3b 100644 --- a/mysql-wsrep-5.6/mysql-test/r/sp-prelocking.result +++ b/mysql-wsrep-5.6/mysql-test/r/sp-prelocking.result @@ -320,3 +320,34 @@ c2 DROP TRIGGER t1_ai; DROP TABLE t1, t2; End of 5.0 tests +# +# Bug#21142859: FUNCTION UPDATING A VIEW FAILS TO FIND TABLE THAT ACTUALLY EXISTS +# +CREATE TABLE t1 SELECT 1 AS fld1, 'A' AS fld2; +CREATE TABLE t2 (fld3 INT, fld4 CHAR(1)); +CREATE VIEW v1 AS SELECT * FROM t1; +CREATE TRIGGER t1_au AFTER UPDATE ON t1 +FOR EACH ROW INSERT INTO t2 VALUES (new.fld1, new.fld2); +CREATE FUNCTION f1() RETURNS INT +BEGIN +UPDATE v1 SET fld2='B' WHERE fld1=1; +RETURN row_count(); +END ! +# Without the patch, an error was getting reported. +SELECT f1(); +f1() +1 +DROP FUNCTION f1; +DROP VIEW v1; +DROP TABLE t1,t2; +# +# Bug #16672723 "CAN'T FIND TEMPORARY TABLE". +# +CREATE FUNCTION f1() RETURNS INT RETURN 1; +CREATE TEMPORARY TABLE tmp1(a INT); +PREPARE stmt1 FROM "CREATE TEMPORARY TABLE tmp2 AS SELECT b FROM (SELECT f1() AS b FROM tmp1) AS t"; +# The below statement failed before the fix. +EXECUTE stmt1; +DROP TEMPORARY TABLES tmp1, tmp2; +DEALLOCATE PREPARE stmt1; +DROP FUNCTION f1; diff --git a/mysql-wsrep-5.6/mysql-test/r/ssl_ca.result b/mysql-wsrep-5.6/mysql-test/r/ssl_ca.result new file mode 100644 index 00000000..ffc5671f --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/r/ssl_ca.result @@ -0,0 +1,24 @@ +# +# Bug#21920657: SSL-CA FAILS SILENTLY IF THE PATH CANNOT BE FOUND +# +# try to connect with wrong '--ssl-ca' path : should fail +ERROR 2026 (HY000): SSL connection error: SSL_CTX_set_default_verify_paths failed +# try to connect with correct '--ssl-ca' path : should connect +Variable_name Value +Ssl_cipher DHE-RSA-AES256-SHA +# +# Bug#21920678: SSL-CA DOES NOT ACCEPT ~USER TILDE HOME DIRECTORY +# PATH SUBSTITUTION +# +# try to connect with '--ssl-ca' option using tilde home directoy +# path substitution : should connect +Variable_name Value +Ssl_cipher DHE-RSA-AES256-SHA +# try to connect with '--ssl-key' option using tilde home directoy +# path substitution : should connect +Variable_name Value +Ssl_cipher DHE-RSA-AES256-SHA +# try to connect with '--ssl-cert' option using tilde home directoy +# path substitution : should connect +Variable_name Value +Ssl_cipher DHE-RSA-AES256-SHA diff --git a/mysql-wsrep-5.6/mysql-test/r/ssl_crl.result b/mysql-wsrep-5.6/mysql-test/r/ssl_crl.result index 570dd9ca..c9b47969 100644 --- a/mysql-wsrep-5.6/mysql-test/r/ssl_crl.result +++ b/mysql-wsrep-5.6/mysql-test/r/ssl_crl.result @@ -21,3 +21,15 @@ ssl_crl MYSQL_TEST_DIR/std_data/crl-client-revoked.crl ssl_crlpath ssl_key MYSQL_TEST_DIR/std_data/crl-server-key.pem # try logging in with a certificate in the server's --ssl-crl : should fail +# +# Bug#21920678: SSL-CA DOES NOT ACCEPT ~USER TILDE HOME DIRECTORY +# PATH SUBSTITUTION +# +# try to connect with '--ssl-crl' option using tilde home directoy +# path substitution : should connect +Variable_name Value +Ssl_cipher DHE-RSA-AES256-SHA +# try to connect with '--ssl-crlpath' option using tilde home directoy +# path substitution : should connect +Variable_name Value +Ssl_cipher DHE-RSA-AES256-SHA diff --git a/mysql-wsrep-5.6/mysql-test/r/subquery_sj_all.result b/mysql-wsrep-5.6/mysql-test/r/subquery_sj_all.result index b0408bf0..15a1b675 100644 --- a/mysql-wsrep-5.6/mysql-test/r/subquery_sj_all.result +++ b/mysql-wsrep-5.6/mysql-test/r/subquery_sj_all.result @@ -10683,4 +10683,101 @@ DROP TABLE t1,t2; # End of test for Bug#21184091 set @@optimizer_switch=@old_opt_switch; # End of 5.6 tests +# Bug#21139722: Assertion failed: !(used_tables() & ((table_map) 1) ... +CREATE TABLE t1(a INTEGER) engine=innodb; +CREATE TABLE t2(b INTEGER) engine=innodb; +explain SELECT 1 +FROM (SELECT 1 IN (SELECT 1 +FROM t1 +WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2) +) +FROM t2 +) AS z; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY ALL NULL NULL NULL NULL 2 NULL +2 DERIVED t2 ALL NULL NULL NULL NULL 1 NULL +3 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 1 Using where +5 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 Using where +4 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 NULL +SELECT 1 +FROM (SELECT 1 IN (SELECT 1 +FROM t1 +WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2) +) +FROM t2 +) AS z; +1 +DROP TABLE t1, t2; +CREATE TABLE t1(a INTEGER) engine=innodb; +explain SELECT (SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +FROM t1 AS t1; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 1 NULL +2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 Using where +2 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 1 FirstMatch(t2); Using join buffer (Block Nested Loop) +SELECT (SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +FROM t1 AS t1; +(SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +DROP TABLE t1; +# End of test for Bug#21139722 +# +# Bug#21139402 ASSERTION FAILED: LENGTH > 0 && KEYPARTS != 0, CRASH IN JOIN::OPTIMIZE_KEYUSE +# +CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a)); +CREATE TABLE t2 (c INT PRIMARY KEY); +EXPLAIN SELECT 1 +FROM t1 +WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a +FROM t1 +WHERE b) +FROM t2); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +3 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +SELECT 1 +FROM t1 +WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a +FROM t1 +WHERE b) +FROM t2); +1 +DROP TABLE t1,t2; +# +# Bug #22305361: QUERY WITH MATERIALIZED TABLE RETURNS INCORRECT +# RESULTS IN 5.6 +# +CREATE TABLE t(a INT,b INT); +INSERT INTO t VALUES (1,0),(1,0),(1,0),(1,0),(1,1); +EXPLAIN extended SELECT * +FROM t AS t1 +WHERE t1.a IN (SELECT t2.a +FROM t AS t2 +WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a +FROM t AS t3 +WHERE t3.b=1)); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 5 100.00 Using where +1 PRIMARY eq_ref 5 test.t1.a 1 100.00 NULL +2 MATERIALIZED t2 ALL NULL NULL NULL NULL 5 100.00 Using where +3 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 5 100.00 Using where +Warnings: +Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` semi join (`test`.`t` `t2`) where ((``.`a` = `test`.`t1`.`a`) and (not((concat(`test`.`t2`.`a`,''),(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and (outer_field_is_not_null, (((concat(`test`.`t2`.`a`,'')) = `test`.`t3`.`a`) or isnull(`test`.`t3`.`a`)), true)) having (outer_field_is_not_null, (`test`.`t3`.`a`), true)))))) +SELECT * +FROM t AS t1 +WHERE t1.a IN (SELECT t2.a +FROM t AS t2 +WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a +FROM t AS t3 +WHERE t3.b=1)); +a b +DROP TABLE t; set optimizer_switch=default; diff --git a/mysql-wsrep-5.6/mysql-test/r/subquery_sj_all_bka.result b/mysql-wsrep-5.6/mysql-test/r/subquery_sj_all_bka.result index acf5190a..40a4e06a 100644 --- a/mysql-wsrep-5.6/mysql-test/r/subquery_sj_all_bka.result +++ b/mysql-wsrep-5.6/mysql-test/r/subquery_sj_all_bka.result @@ -10689,5 +10689,102 @@ DROP TABLE t1,t2; # End of test for Bug#21184091 set @@optimizer_switch=@old_opt_switch; # End of 5.6 tests +# Bug#21139722: Assertion failed: !(used_tables() & ((table_map) 1) ... +CREATE TABLE t1(a INTEGER) engine=innodb; +CREATE TABLE t2(b INTEGER) engine=innodb; +explain SELECT 1 +FROM (SELECT 1 IN (SELECT 1 +FROM t1 +WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2) +) +FROM t2 +) AS z; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY ALL NULL NULL NULL NULL 2 NULL +2 DERIVED t2 ALL NULL NULL NULL NULL 1 NULL +3 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 1 Using where +5 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 Using where +4 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 NULL +SELECT 1 +FROM (SELECT 1 IN (SELECT 1 +FROM t1 +WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2) +) +FROM t2 +) AS z; +1 +DROP TABLE t1, t2; +CREATE TABLE t1(a INTEGER) engine=innodb; +explain SELECT (SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +FROM t1 AS t1; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 1 NULL +2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 Using where +2 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 1 FirstMatch(t2); Using join buffer (Block Nested Loop) +SELECT (SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +FROM t1 AS t1; +(SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +DROP TABLE t1; +# End of test for Bug#21139722 +# +# Bug#21139402 ASSERTION FAILED: LENGTH > 0 && KEYPARTS != 0, CRASH IN JOIN::OPTIMIZE_KEYUSE +# +CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a)); +CREATE TABLE t2 (c INT PRIMARY KEY); +EXPLAIN SELECT 1 +FROM t1 +WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a +FROM t1 +WHERE b) +FROM t2); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +3 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +SELECT 1 +FROM t1 +WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a +FROM t1 +WHERE b) +FROM t2); +1 +DROP TABLE t1,t2; +# +# Bug #22305361: QUERY WITH MATERIALIZED TABLE RETURNS INCORRECT +# RESULTS IN 5.6 +# +CREATE TABLE t(a INT,b INT); +INSERT INTO t VALUES (1,0),(1,0),(1,0),(1,0),(1,1); +EXPLAIN extended SELECT * +FROM t AS t1 +WHERE t1.a IN (SELECT t2.a +FROM t AS t2 +WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a +FROM t AS t3 +WHERE t3.b=1)); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 5 100.00 Using where +1 PRIMARY eq_ref 5 test.t1.a 1 100.00 NULL +2 MATERIALIZED t2 ALL NULL NULL NULL NULL 5 100.00 Using where +3 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 5 100.00 Using where +Warnings: +Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` semi join (`test`.`t` `t2`) where ((``.`a` = `test`.`t1`.`a`) and (not((concat(`test`.`t2`.`a`,''),(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and (outer_field_is_not_null, (((concat(`test`.`t2`.`a`,'')) = `test`.`t3`.`a`) or isnull(`test`.`t3`.`a`)), true)) having (outer_field_is_not_null, (`test`.`t3`.`a`), true)))))) +SELECT * +FROM t AS t1 +WHERE t1.a IN (SELECT t2.a +FROM t AS t2 +WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a +FROM t AS t3 +WHERE t3.b=1)); +a b +DROP TABLE t; set optimizer_switch=default; set optimizer_switch=default; diff --git a/mysql-wsrep-5.6/mysql-test/r/subquery_sj_all_bka_nixbnl.result b/mysql-wsrep-5.6/mysql-test/r/subquery_sj_all_bka_nixbnl.result index 85d3b8e3..d2c62e5b 100644 --- a/mysql-wsrep-5.6/mysql-test/r/subquery_sj_all_bka_nixbnl.result +++ b/mysql-wsrep-5.6/mysql-test/r/subquery_sj_all_bka_nixbnl.result @@ -10698,5 +10698,102 @@ DROP TABLE t1,t2; # End of test for Bug#21184091 set @@optimizer_switch=@old_opt_switch; # End of 5.6 tests +# Bug#21139722: Assertion failed: !(used_tables() & ((table_map) 1) ... +CREATE TABLE t1(a INTEGER) engine=innodb; +CREATE TABLE t2(b INTEGER) engine=innodb; +explain SELECT 1 +FROM (SELECT 1 IN (SELECT 1 +FROM t1 +WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2) +) +FROM t2 +) AS z; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY ALL NULL NULL NULL NULL 2 NULL +2 DERIVED t2 ALL NULL NULL NULL NULL 1 NULL +3 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 1 Using where +5 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 Using where +4 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 NULL +SELECT 1 +FROM (SELECT 1 IN (SELECT 1 +FROM t1 +WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2) +) +FROM t2 +) AS z; +1 +DROP TABLE t1, t2; +CREATE TABLE t1(a INTEGER) engine=innodb; +explain SELECT (SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +FROM t1 AS t1; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 1 NULL +2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 Using where +2 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 1 FirstMatch(t2) +SELECT (SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +FROM t1 AS t1; +(SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +DROP TABLE t1; +# End of test for Bug#21139722 +# +# Bug#21139402 ASSERTION FAILED: LENGTH > 0 && KEYPARTS != 0, CRASH IN JOIN::OPTIMIZE_KEYUSE +# +CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a)); +CREATE TABLE t2 (c INT PRIMARY KEY); +EXPLAIN SELECT 1 +FROM t1 +WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a +FROM t1 +WHERE b) +FROM t2); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +3 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +SELECT 1 +FROM t1 +WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a +FROM t1 +WHERE b) +FROM t2); +1 +DROP TABLE t1,t2; +# +# Bug #22305361: QUERY WITH MATERIALIZED TABLE RETURNS INCORRECT +# RESULTS IN 5.6 +# +CREATE TABLE t(a INT,b INT); +INSERT INTO t VALUES (1,0),(1,0),(1,0),(1,0),(1,1); +EXPLAIN extended SELECT * +FROM t AS t1 +WHERE t1.a IN (SELECT t2.a +FROM t AS t2 +WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a +FROM t AS t3 +WHERE t3.b=1)); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 5 100.00 Using where +1 PRIMARY eq_ref 5 test.t1.a 1 100.00 NULL +2 MATERIALIZED t2 ALL NULL NULL NULL NULL 5 100.00 Using where +3 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 5 100.00 Using where +Warnings: +Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` semi join (`test`.`t` `t2`) where ((``.`a` = `test`.`t1`.`a`) and (not((concat(`test`.`t2`.`a`,''),(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and (outer_field_is_not_null, (((concat(`test`.`t2`.`a`,'')) = `test`.`t3`.`a`) or isnull(`test`.`t3`.`a`)), true)) having (outer_field_is_not_null, (`test`.`t3`.`a`), true)))))) +SELECT * +FROM t AS t1 +WHERE t1.a IN (SELECT t2.a +FROM t AS t2 +WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a +FROM t AS t3 +WHERE t3.b=1)); +a b +DROP TABLE t; set optimizer_switch=default; set optimizer_switch=default; diff --git a/mysql-wsrep-5.6/mysql-test/r/subquery_sj_all_bkaunique.result b/mysql-wsrep-5.6/mysql-test/r/subquery_sj_all_bkaunique.result index b3540ad1..456eaa05 100644 --- a/mysql-wsrep-5.6/mysql-test/r/subquery_sj_all_bkaunique.result +++ b/mysql-wsrep-5.6/mysql-test/r/subquery_sj_all_bkaunique.result @@ -10690,5 +10690,102 @@ DROP TABLE t1,t2; # End of test for Bug#21184091 set @@optimizer_switch=@old_opt_switch; # End of 5.6 tests +# Bug#21139722: Assertion failed: !(used_tables() & ((table_map) 1) ... +CREATE TABLE t1(a INTEGER) engine=innodb; +CREATE TABLE t2(b INTEGER) engine=innodb; +explain SELECT 1 +FROM (SELECT 1 IN (SELECT 1 +FROM t1 +WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2) +) +FROM t2 +) AS z; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY ALL NULL NULL NULL NULL 2 NULL +2 DERIVED t2 ALL NULL NULL NULL NULL 1 NULL +3 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 1 Using where +5 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 Using where +4 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 NULL +SELECT 1 +FROM (SELECT 1 IN (SELECT 1 +FROM t1 +WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2) +) +FROM t2 +) AS z; +1 +DROP TABLE t1, t2; +CREATE TABLE t1(a INTEGER) engine=innodb; +explain SELECT (SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +FROM t1 AS t1; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 1 NULL +2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 Using where +2 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 1 FirstMatch(t2); Using join buffer (Block Nested Loop) +SELECT (SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +FROM t1 AS t1; +(SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +DROP TABLE t1; +# End of test for Bug#21139722 +# +# Bug#21139402 ASSERTION FAILED: LENGTH > 0 && KEYPARTS != 0, CRASH IN JOIN::OPTIMIZE_KEYUSE +# +CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a)); +CREATE TABLE t2 (c INT PRIMARY KEY); +EXPLAIN SELECT 1 +FROM t1 +WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a +FROM t1 +WHERE b) +FROM t2); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +3 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +SELECT 1 +FROM t1 +WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a +FROM t1 +WHERE b) +FROM t2); +1 +DROP TABLE t1,t2; +# +# Bug #22305361: QUERY WITH MATERIALIZED TABLE RETURNS INCORRECT +# RESULTS IN 5.6 +# +CREATE TABLE t(a INT,b INT); +INSERT INTO t VALUES (1,0),(1,0),(1,0),(1,0),(1,1); +EXPLAIN extended SELECT * +FROM t AS t1 +WHERE t1.a IN (SELECT t2.a +FROM t AS t2 +WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a +FROM t AS t3 +WHERE t3.b=1)); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 5 100.00 Using where +1 PRIMARY eq_ref 5 test.t1.a 1 100.00 NULL +2 MATERIALIZED t2 ALL NULL NULL NULL NULL 5 100.00 Using where +3 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 5 100.00 Using where +Warnings: +Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` semi join (`test`.`t` `t2`) where ((``.`a` = `test`.`t1`.`a`) and (not((concat(`test`.`t2`.`a`,''),(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and (outer_field_is_not_null, (((concat(`test`.`t2`.`a`,'')) = `test`.`t3`.`a`) or isnull(`test`.`t3`.`a`)), true)) having (outer_field_is_not_null, (`test`.`t3`.`a`), true)))))) +SELECT * +FROM t AS t1 +WHERE t1.a IN (SELECT t2.a +FROM t AS t2 +WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a +FROM t AS t3 +WHERE t3.b=1)); +a b +DROP TABLE t; set optimizer_switch=default; set optimizer_switch=default; diff --git a/mysql-wsrep-5.6/mysql-test/r/subquery_sj_dupsweed.result b/mysql-wsrep-5.6/mysql-test/r/subquery_sj_dupsweed.result index e17ca8e3..2f84832c 100644 --- a/mysql-wsrep-5.6/mysql-test/r/subquery_sj_dupsweed.result +++ b/mysql-wsrep-5.6/mysql-test/r/subquery_sj_dupsweed.result @@ -10555,4 +10555,100 @@ DROP TABLE t1,t2; # End of test for Bug#21184091 set @@optimizer_switch=@old_opt_switch; # End of 5.6 tests +# Bug#21139722: Assertion failed: !(used_tables() & ((table_map) 1) ... +CREATE TABLE t1(a INTEGER) engine=innodb; +CREATE TABLE t2(b INTEGER) engine=innodb; +explain SELECT 1 +FROM (SELECT 1 IN (SELECT 1 +FROM t1 +WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2) +) +FROM t2 +) AS z; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY ALL NULL NULL NULL NULL 2 NULL +2 DERIVED t2 ALL NULL NULL NULL NULL 1 NULL +3 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 1 Using where +5 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 Using where +4 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 NULL +SELECT 1 +FROM (SELECT 1 IN (SELECT 1 +FROM t1 +WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2) +) +FROM t2 +) AS z; +1 +DROP TABLE t1, t2; +CREATE TABLE t1(a INTEGER) engine=innodb; +explain SELECT (SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +FROM t1 AS t1; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 1 NULL +2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 Using where; Start temporary +2 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 1 End temporary; Using join buffer (Block Nested Loop) +SELECT (SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +FROM t1 AS t1; +(SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +DROP TABLE t1; +# End of test for Bug#21139722 +# +# Bug#21139402 ASSERTION FAILED: LENGTH > 0 && KEYPARTS != 0, CRASH IN JOIN::OPTIMIZE_KEYUSE +# +CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a)); +CREATE TABLE t2 (c INT PRIMARY KEY); +EXPLAIN SELECT 1 +FROM t1 +WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a +FROM t1 +WHERE b) +FROM t2); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +3 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +SELECT 1 +FROM t1 +WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a +FROM t1 +WHERE b) +FROM t2); +1 +DROP TABLE t1,t2; +# +# Bug #22305361: QUERY WITH MATERIALIZED TABLE RETURNS INCORRECT +# RESULTS IN 5.6 +# +CREATE TABLE t(a INT,b INT); +INSERT INTO t VALUES (1,0),(1,0),(1,0),(1,0),(1,1); +EXPLAIN extended SELECT * +FROM t AS t1 +WHERE t1.a IN (SELECT t2.a +FROM t AS t2 +WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a +FROM t AS t3 +WHERE t3.b=1)); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 5 100.00 Start temporary +1 PRIMARY t2 ALL NULL NULL NULL NULL 5 100.00 Using where; End temporary; Using join buffer (Block Nested Loop) +3 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 5 100.00 Using where +Warnings: +Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` semi join (`test`.`t` `t2`) where ((`test`.`t2`.`a` = `test`.`t1`.`a`) and (not((concat(`test`.`t1`.`a`,''),(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and (outer_field_is_not_null, (((concat(`test`.`t1`.`a`,'')) = `test`.`t3`.`a`) or isnull(`test`.`t3`.`a`)), true)) having (outer_field_is_not_null, (`test`.`t3`.`a`), true)))))) +SELECT * +FROM t AS t1 +WHERE t1.a IN (SELECT t2.a +FROM t AS t2 +WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a +FROM t AS t3 +WHERE t3.b=1)); +a b +DROP TABLE t; set optimizer_switch=default; diff --git a/mysql-wsrep-5.6/mysql-test/r/subquery_sj_dupsweed_bka.result b/mysql-wsrep-5.6/mysql-test/r/subquery_sj_dupsweed_bka.result index 3b5bd304..a643d110 100644 --- a/mysql-wsrep-5.6/mysql-test/r/subquery_sj_dupsweed_bka.result +++ b/mysql-wsrep-5.6/mysql-test/r/subquery_sj_dupsweed_bka.result @@ -10560,5 +10560,101 @@ DROP TABLE t1,t2; # End of test for Bug#21184091 set @@optimizer_switch=@old_opt_switch; # End of 5.6 tests +# Bug#21139722: Assertion failed: !(used_tables() & ((table_map) 1) ... +CREATE TABLE t1(a INTEGER) engine=innodb; +CREATE TABLE t2(b INTEGER) engine=innodb; +explain SELECT 1 +FROM (SELECT 1 IN (SELECT 1 +FROM t1 +WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2) +) +FROM t2 +) AS z; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY ALL NULL NULL NULL NULL 2 NULL +2 DERIVED t2 ALL NULL NULL NULL NULL 1 NULL +3 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 1 Using where +5 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 Using where +4 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 NULL +SELECT 1 +FROM (SELECT 1 IN (SELECT 1 +FROM t1 +WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2) +) +FROM t2 +) AS z; +1 +DROP TABLE t1, t2; +CREATE TABLE t1(a INTEGER) engine=innodb; +explain SELECT (SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +FROM t1 AS t1; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 1 NULL +2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 Using where; Start temporary +2 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 1 End temporary; Using join buffer (Block Nested Loop) +SELECT (SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +FROM t1 AS t1; +(SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +DROP TABLE t1; +# End of test for Bug#21139722 +# +# Bug#21139402 ASSERTION FAILED: LENGTH > 0 && KEYPARTS != 0, CRASH IN JOIN::OPTIMIZE_KEYUSE +# +CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a)); +CREATE TABLE t2 (c INT PRIMARY KEY); +EXPLAIN SELECT 1 +FROM t1 +WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a +FROM t1 +WHERE b) +FROM t2); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +3 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +SELECT 1 +FROM t1 +WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a +FROM t1 +WHERE b) +FROM t2); +1 +DROP TABLE t1,t2; +# +# Bug #22305361: QUERY WITH MATERIALIZED TABLE RETURNS INCORRECT +# RESULTS IN 5.6 +# +CREATE TABLE t(a INT,b INT); +INSERT INTO t VALUES (1,0),(1,0),(1,0),(1,0),(1,1); +EXPLAIN extended SELECT * +FROM t AS t1 +WHERE t1.a IN (SELECT t2.a +FROM t AS t2 +WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a +FROM t AS t3 +WHERE t3.b=1)); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 5 100.00 Start temporary +1 PRIMARY t2 ALL NULL NULL NULL NULL 5 100.00 Using where; End temporary; Using join buffer (Block Nested Loop) +3 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 5 100.00 Using where +Warnings: +Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` semi join (`test`.`t` `t2`) where ((`test`.`t2`.`a` = `test`.`t1`.`a`) and (not((concat(`test`.`t1`.`a`,''),(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and (outer_field_is_not_null, (((concat(`test`.`t1`.`a`,'')) = `test`.`t3`.`a`) or isnull(`test`.`t3`.`a`)), true)) having (outer_field_is_not_null, (`test`.`t3`.`a`), true)))))) +SELECT * +FROM t AS t1 +WHERE t1.a IN (SELECT t2.a +FROM t AS t2 +WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a +FROM t AS t3 +WHERE t3.b=1)); +a b +DROP TABLE t; set optimizer_switch=default; set optimizer_switch=default; diff --git a/mysql-wsrep-5.6/mysql-test/r/subquery_sj_dupsweed_bka_nixbnl.result b/mysql-wsrep-5.6/mysql-test/r/subquery_sj_dupsweed_bka_nixbnl.result index 0128f426..b616fc26 100644 --- a/mysql-wsrep-5.6/mysql-test/r/subquery_sj_dupsweed_bka_nixbnl.result +++ b/mysql-wsrep-5.6/mysql-test/r/subquery_sj_dupsweed_bka_nixbnl.result @@ -10560,5 +10560,101 @@ DROP TABLE t1,t2; # End of test for Bug#21184091 set @@optimizer_switch=@old_opt_switch; # End of 5.6 tests +# Bug#21139722: Assertion failed: !(used_tables() & ((table_map) 1) ... +CREATE TABLE t1(a INTEGER) engine=innodb; +CREATE TABLE t2(b INTEGER) engine=innodb; +explain SELECT 1 +FROM (SELECT 1 IN (SELECT 1 +FROM t1 +WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2) +) +FROM t2 +) AS z; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY ALL NULL NULL NULL NULL 2 NULL +2 DERIVED t2 ALL NULL NULL NULL NULL 1 NULL +3 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 1 Using where +5 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 Using where +4 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 NULL +SELECT 1 +FROM (SELECT 1 IN (SELECT 1 +FROM t1 +WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2) +) +FROM t2 +) AS z; +1 +DROP TABLE t1, t2; +CREATE TABLE t1(a INTEGER) engine=innodb; +explain SELECT (SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +FROM t1 AS t1; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 1 NULL +2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 Using where +2 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 1 Start temporary; End temporary +SELECT (SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +FROM t1 AS t1; +(SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +DROP TABLE t1; +# End of test for Bug#21139722 +# +# Bug#21139402 ASSERTION FAILED: LENGTH > 0 && KEYPARTS != 0, CRASH IN JOIN::OPTIMIZE_KEYUSE +# +CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a)); +CREATE TABLE t2 (c INT PRIMARY KEY); +EXPLAIN SELECT 1 +FROM t1 +WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a +FROM t1 +WHERE b) +FROM t2); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +3 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +SELECT 1 +FROM t1 +WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a +FROM t1 +WHERE b) +FROM t2); +1 +DROP TABLE t1,t2; +# +# Bug #22305361: QUERY WITH MATERIALIZED TABLE RETURNS INCORRECT +# RESULTS IN 5.6 +# +CREATE TABLE t(a INT,b INT); +INSERT INTO t VALUES (1,0),(1,0),(1,0),(1,0),(1,1); +EXPLAIN extended SELECT * +FROM t AS t1 +WHERE t1.a IN (SELECT t2.a +FROM t AS t2 +WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a +FROM t AS t3 +WHERE t3.b=1)); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 5 100.00 NULL +1 PRIMARY t2 ALL NULL NULL NULL NULL 5 100.00 Using where; Start temporary; End temporary +3 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 5 100.00 Using where +Warnings: +Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` semi join (`test`.`t` `t2`) where ((`test`.`t2`.`a` = `test`.`t1`.`a`) and (not((concat(`test`.`t1`.`a`,''),(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and (outer_field_is_not_null, (((concat(`test`.`t1`.`a`,'')) = `test`.`t3`.`a`) or isnull(`test`.`t3`.`a`)), true)) having (outer_field_is_not_null, (`test`.`t3`.`a`), true)))))) +SELECT * +FROM t AS t1 +WHERE t1.a IN (SELECT t2.a +FROM t AS t2 +WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a +FROM t AS t3 +WHERE t3.b=1)); +a b +DROP TABLE t; set optimizer_switch=default; set optimizer_switch=default; diff --git a/mysql-wsrep-5.6/mysql-test/r/subquery_sj_dupsweed_bkaunique.result b/mysql-wsrep-5.6/mysql-test/r/subquery_sj_dupsweed_bkaunique.result index d68b5723..eff4d127 100644 --- a/mysql-wsrep-5.6/mysql-test/r/subquery_sj_dupsweed_bkaunique.result +++ b/mysql-wsrep-5.6/mysql-test/r/subquery_sj_dupsweed_bkaunique.result @@ -10561,5 +10561,101 @@ DROP TABLE t1,t2; # End of test for Bug#21184091 set @@optimizer_switch=@old_opt_switch; # End of 5.6 tests +# Bug#21139722: Assertion failed: !(used_tables() & ((table_map) 1) ... +CREATE TABLE t1(a INTEGER) engine=innodb; +CREATE TABLE t2(b INTEGER) engine=innodb; +explain SELECT 1 +FROM (SELECT 1 IN (SELECT 1 +FROM t1 +WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2) +) +FROM t2 +) AS z; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY ALL NULL NULL NULL NULL 2 NULL +2 DERIVED t2 ALL NULL NULL NULL NULL 1 NULL +3 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 1 Using where +5 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 Using where +4 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 NULL +SELECT 1 +FROM (SELECT 1 IN (SELECT 1 +FROM t1 +WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2) +) +FROM t2 +) AS z; +1 +DROP TABLE t1, t2; +CREATE TABLE t1(a INTEGER) engine=innodb; +explain SELECT (SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +FROM t1 AS t1; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 1 NULL +2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 Using where; Start temporary +2 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 1 End temporary; Using join buffer (Block Nested Loop) +SELECT (SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +FROM t1 AS t1; +(SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +DROP TABLE t1; +# End of test for Bug#21139722 +# +# Bug#21139402 ASSERTION FAILED: LENGTH > 0 && KEYPARTS != 0, CRASH IN JOIN::OPTIMIZE_KEYUSE +# +CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a)); +CREATE TABLE t2 (c INT PRIMARY KEY); +EXPLAIN SELECT 1 +FROM t1 +WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a +FROM t1 +WHERE b) +FROM t2); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +3 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +SELECT 1 +FROM t1 +WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a +FROM t1 +WHERE b) +FROM t2); +1 +DROP TABLE t1,t2; +# +# Bug #22305361: QUERY WITH MATERIALIZED TABLE RETURNS INCORRECT +# RESULTS IN 5.6 +# +CREATE TABLE t(a INT,b INT); +INSERT INTO t VALUES (1,0),(1,0),(1,0),(1,0),(1,1); +EXPLAIN extended SELECT * +FROM t AS t1 +WHERE t1.a IN (SELECT t2.a +FROM t AS t2 +WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a +FROM t AS t3 +WHERE t3.b=1)); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 5 100.00 Start temporary +1 PRIMARY t2 ALL NULL NULL NULL NULL 5 100.00 Using where; End temporary; Using join buffer (Block Nested Loop) +3 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 5 100.00 Using where +Warnings: +Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` semi join (`test`.`t` `t2`) where ((`test`.`t2`.`a` = `test`.`t1`.`a`) and (not((concat(`test`.`t1`.`a`,''),(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and (outer_field_is_not_null, (((concat(`test`.`t1`.`a`,'')) = `test`.`t3`.`a`) or isnull(`test`.`t3`.`a`)), true)) having (outer_field_is_not_null, (`test`.`t3`.`a`), true)))))) +SELECT * +FROM t AS t1 +WHERE t1.a IN (SELECT t2.a +FROM t AS t2 +WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a +FROM t AS t3 +WHERE t3.b=1)); +a b +DROP TABLE t; set optimizer_switch=default; set optimizer_switch=default; diff --git a/mysql-wsrep-5.6/mysql-test/r/subquery_sj_firstmatch.result b/mysql-wsrep-5.6/mysql-test/r/subquery_sj_firstmatch.result index 6f96deba..6290c93a 100644 --- a/mysql-wsrep-5.6/mysql-test/r/subquery_sj_firstmatch.result +++ b/mysql-wsrep-5.6/mysql-test/r/subquery_sj_firstmatch.result @@ -10521,6 +10521,102 @@ DROP TABLE t1,t2; # End of test for Bug#21184091 set @@optimizer_switch=@old_opt_switch; # End of 5.6 tests +# Bug#21139722: Assertion failed: !(used_tables() & ((table_map) 1) ... +CREATE TABLE t1(a INTEGER) engine=innodb; +CREATE TABLE t2(b INTEGER) engine=innodb; +explain SELECT 1 +FROM (SELECT 1 IN (SELECT 1 +FROM t1 +WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2) +) +FROM t2 +) AS z; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY ALL NULL NULL NULL NULL 2 NULL +2 DERIVED t2 ALL NULL NULL NULL NULL 1 NULL +3 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 1 Using where +5 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 Using where +4 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 NULL +SELECT 1 +FROM (SELECT 1 IN (SELECT 1 +FROM t1 +WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2) +) +FROM t2 +) AS z; +1 +DROP TABLE t1, t2; +CREATE TABLE t1(a INTEGER) engine=innodb; +explain SELECT (SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +FROM t1 AS t1; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 1 NULL +2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 Using where +2 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 1 FirstMatch(t2); Using join buffer (Block Nested Loop) +SELECT (SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +FROM t1 AS t1; +(SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +DROP TABLE t1; +# End of test for Bug#21139722 +# +# Bug#21139402 ASSERTION FAILED: LENGTH > 0 && KEYPARTS != 0, CRASH IN JOIN::OPTIMIZE_KEYUSE +# +CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a)); +CREATE TABLE t2 (c INT PRIMARY KEY); +EXPLAIN SELECT 1 +FROM t1 +WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a +FROM t1 +WHERE b) +FROM t2); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +3 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +SELECT 1 +FROM t1 +WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a +FROM t1 +WHERE b) +FROM t2); +1 +DROP TABLE t1,t2; +# +# Bug #22305361: QUERY WITH MATERIALIZED TABLE RETURNS INCORRECT +# RESULTS IN 5.6 +# +CREATE TABLE t(a INT,b INT); +INSERT INTO t VALUES (1,0),(1,0),(1,0),(1,0),(1,1); +EXPLAIN extended SELECT * +FROM t AS t1 +WHERE t1.a IN (SELECT t2.a +FROM t AS t2 +WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a +FROM t AS t3 +WHERE t3.b=1)); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 5 100.00 NULL +1 PRIMARY t2 ALL NULL NULL NULL NULL 5 100.00 Using where; FirstMatch(t1); Using join buffer (Block Nested Loop) +3 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 5 100.00 Using where +Warnings: +Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` semi join (`test`.`t` `t2`) where ((`test`.`t2`.`a` = `test`.`t1`.`a`) and (not((concat(`test`.`t1`.`a`,''),(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and (outer_field_is_not_null, (((concat(`test`.`t1`.`a`,'')) = `test`.`t3`.`a`) or isnull(`test`.`t3`.`a`)), true)) having (outer_field_is_not_null, (`test`.`t3`.`a`), true)))))) +SELECT * +FROM t AS t1 +WHERE t1.a IN (SELECT t2.a +FROM t AS t2 +WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a +FROM t AS t3 +WHERE t3.b=1)); +a b +DROP TABLE t; # # Bug#51457 Firstmatch semijoin strategy gives wrong results for # certain query plans diff --git a/mysql-wsrep-5.6/mysql-test/r/subquery_sj_firstmatch_bka.result b/mysql-wsrep-5.6/mysql-test/r/subquery_sj_firstmatch_bka.result index 40521dba..f826aea8 100644 --- a/mysql-wsrep-5.6/mysql-test/r/subquery_sj_firstmatch_bka.result +++ b/mysql-wsrep-5.6/mysql-test/r/subquery_sj_firstmatch_bka.result @@ -10522,6 +10522,102 @@ DROP TABLE t1,t2; # End of test for Bug#21184091 set @@optimizer_switch=@old_opt_switch; # End of 5.6 tests +# Bug#21139722: Assertion failed: !(used_tables() & ((table_map) 1) ... +CREATE TABLE t1(a INTEGER) engine=innodb; +CREATE TABLE t2(b INTEGER) engine=innodb; +explain SELECT 1 +FROM (SELECT 1 IN (SELECT 1 +FROM t1 +WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2) +) +FROM t2 +) AS z; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY ALL NULL NULL NULL NULL 2 NULL +2 DERIVED t2 ALL NULL NULL NULL NULL 1 NULL +3 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 1 Using where +5 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 Using where +4 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 NULL +SELECT 1 +FROM (SELECT 1 IN (SELECT 1 +FROM t1 +WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2) +) +FROM t2 +) AS z; +1 +DROP TABLE t1, t2; +CREATE TABLE t1(a INTEGER) engine=innodb; +explain SELECT (SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +FROM t1 AS t1; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 1 NULL +2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 Using where +2 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 1 FirstMatch(t2); Using join buffer (Block Nested Loop) +SELECT (SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +FROM t1 AS t1; +(SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +DROP TABLE t1; +# End of test for Bug#21139722 +# +# Bug#21139402 ASSERTION FAILED: LENGTH > 0 && KEYPARTS != 0, CRASH IN JOIN::OPTIMIZE_KEYUSE +# +CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a)); +CREATE TABLE t2 (c INT PRIMARY KEY); +EXPLAIN SELECT 1 +FROM t1 +WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a +FROM t1 +WHERE b) +FROM t2); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +3 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +SELECT 1 +FROM t1 +WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a +FROM t1 +WHERE b) +FROM t2); +1 +DROP TABLE t1,t2; +# +# Bug #22305361: QUERY WITH MATERIALIZED TABLE RETURNS INCORRECT +# RESULTS IN 5.6 +# +CREATE TABLE t(a INT,b INT); +INSERT INTO t VALUES (1,0),(1,0),(1,0),(1,0),(1,1); +EXPLAIN extended SELECT * +FROM t AS t1 +WHERE t1.a IN (SELECT t2.a +FROM t AS t2 +WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a +FROM t AS t3 +WHERE t3.b=1)); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 5 100.00 NULL +1 PRIMARY t2 ALL NULL NULL NULL NULL 5 100.00 Using where; FirstMatch(t1); Using join buffer (Block Nested Loop) +3 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 5 100.00 Using where +Warnings: +Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` semi join (`test`.`t` `t2`) where ((`test`.`t2`.`a` = `test`.`t1`.`a`) and (not((concat(`test`.`t1`.`a`,''),(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and (outer_field_is_not_null, (((concat(`test`.`t1`.`a`,'')) = `test`.`t3`.`a`) or isnull(`test`.`t3`.`a`)), true)) having (outer_field_is_not_null, (`test`.`t3`.`a`), true)))))) +SELECT * +FROM t AS t1 +WHERE t1.a IN (SELECT t2.a +FROM t AS t2 +WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a +FROM t AS t3 +WHERE t3.b=1)); +a b +DROP TABLE t; # # Bug#51457 Firstmatch semijoin strategy gives wrong results for # certain query plans diff --git a/mysql-wsrep-5.6/mysql-test/r/subquery_sj_firstmatch_bka_nixbnl.result b/mysql-wsrep-5.6/mysql-test/r/subquery_sj_firstmatch_bka_nixbnl.result index 8d6f9322..3053b23d 100644 --- a/mysql-wsrep-5.6/mysql-test/r/subquery_sj_firstmatch_bka_nixbnl.result +++ b/mysql-wsrep-5.6/mysql-test/r/subquery_sj_firstmatch_bka_nixbnl.result @@ -10545,6 +10545,102 @@ DROP TABLE t1,t2; # End of test for Bug#21184091 set @@optimizer_switch=@old_opt_switch; # End of 5.6 tests +# Bug#21139722: Assertion failed: !(used_tables() & ((table_map) 1) ... +CREATE TABLE t1(a INTEGER) engine=innodb; +CREATE TABLE t2(b INTEGER) engine=innodb; +explain SELECT 1 +FROM (SELECT 1 IN (SELECT 1 +FROM t1 +WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2) +) +FROM t2 +) AS z; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY ALL NULL NULL NULL NULL 2 NULL +2 DERIVED t2 ALL NULL NULL NULL NULL 1 NULL +3 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 1 Using where +5 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 Using where +4 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 NULL +SELECT 1 +FROM (SELECT 1 IN (SELECT 1 +FROM t1 +WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2) +) +FROM t2 +) AS z; +1 +DROP TABLE t1, t2; +CREATE TABLE t1(a INTEGER) engine=innodb; +explain SELECT (SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +FROM t1 AS t1; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 1 NULL +2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 Using where +2 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 1 FirstMatch(t2) +SELECT (SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +FROM t1 AS t1; +(SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +DROP TABLE t1; +# End of test for Bug#21139722 +# +# Bug#21139402 ASSERTION FAILED: LENGTH > 0 && KEYPARTS != 0, CRASH IN JOIN::OPTIMIZE_KEYUSE +# +CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a)); +CREATE TABLE t2 (c INT PRIMARY KEY); +EXPLAIN SELECT 1 +FROM t1 +WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a +FROM t1 +WHERE b) +FROM t2); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +3 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +SELECT 1 +FROM t1 +WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a +FROM t1 +WHERE b) +FROM t2); +1 +DROP TABLE t1,t2; +# +# Bug #22305361: QUERY WITH MATERIALIZED TABLE RETURNS INCORRECT +# RESULTS IN 5.6 +# +CREATE TABLE t(a INT,b INT); +INSERT INTO t VALUES (1,0),(1,0),(1,0),(1,0),(1,1); +EXPLAIN extended SELECT * +FROM t AS t1 +WHERE t1.a IN (SELECT t2.a +FROM t AS t2 +WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a +FROM t AS t3 +WHERE t3.b=1)); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 5 100.00 NULL +1 PRIMARY t2 ALL NULL NULL NULL NULL 5 100.00 Using where; FirstMatch(t1) +3 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 5 100.00 Using where +Warnings: +Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` semi join (`test`.`t` `t2`) where ((`test`.`t2`.`a` = `test`.`t1`.`a`) and (not((concat(`test`.`t1`.`a`,''),(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and (outer_field_is_not_null, (((concat(`test`.`t1`.`a`,'')) = `test`.`t3`.`a`) or isnull(`test`.`t3`.`a`)), true)) having (outer_field_is_not_null, (`test`.`t3`.`a`), true)))))) +SELECT * +FROM t AS t1 +WHERE t1.a IN (SELECT t2.a +FROM t AS t2 +WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a +FROM t AS t3 +WHERE t3.b=1)); +a b +DROP TABLE t; # # Bug#51457 Firstmatch semijoin strategy gives wrong results for # certain query plans diff --git a/mysql-wsrep-5.6/mysql-test/r/subquery_sj_firstmatch_bkaunique.result b/mysql-wsrep-5.6/mysql-test/r/subquery_sj_firstmatch_bkaunique.result index 28d2780a..942b3ea5 100644 --- a/mysql-wsrep-5.6/mysql-test/r/subquery_sj_firstmatch_bkaunique.result +++ b/mysql-wsrep-5.6/mysql-test/r/subquery_sj_firstmatch_bkaunique.result @@ -10523,6 +10523,102 @@ DROP TABLE t1,t2; # End of test for Bug#21184091 set @@optimizer_switch=@old_opt_switch; # End of 5.6 tests +# Bug#21139722: Assertion failed: !(used_tables() & ((table_map) 1) ... +CREATE TABLE t1(a INTEGER) engine=innodb; +CREATE TABLE t2(b INTEGER) engine=innodb; +explain SELECT 1 +FROM (SELECT 1 IN (SELECT 1 +FROM t1 +WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2) +) +FROM t2 +) AS z; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY ALL NULL NULL NULL NULL 2 NULL +2 DERIVED t2 ALL NULL NULL NULL NULL 1 NULL +3 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 1 Using where +5 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 Using where +4 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 NULL +SELECT 1 +FROM (SELECT 1 IN (SELECT 1 +FROM t1 +WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2) +) +FROM t2 +) AS z; +1 +DROP TABLE t1, t2; +CREATE TABLE t1(a INTEGER) engine=innodb; +explain SELECT (SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +FROM t1 AS t1; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 1 NULL +2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 Using where +2 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 1 FirstMatch(t2); Using join buffer (Block Nested Loop) +SELECT (SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +FROM t1 AS t1; +(SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +DROP TABLE t1; +# End of test for Bug#21139722 +# +# Bug#21139402 ASSERTION FAILED: LENGTH > 0 && KEYPARTS != 0, CRASH IN JOIN::OPTIMIZE_KEYUSE +# +CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a)); +CREATE TABLE t2 (c INT PRIMARY KEY); +EXPLAIN SELECT 1 +FROM t1 +WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a +FROM t1 +WHERE b) +FROM t2); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +3 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +SELECT 1 +FROM t1 +WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a +FROM t1 +WHERE b) +FROM t2); +1 +DROP TABLE t1,t2; +# +# Bug #22305361: QUERY WITH MATERIALIZED TABLE RETURNS INCORRECT +# RESULTS IN 5.6 +# +CREATE TABLE t(a INT,b INT); +INSERT INTO t VALUES (1,0),(1,0),(1,0),(1,0),(1,1); +EXPLAIN extended SELECT * +FROM t AS t1 +WHERE t1.a IN (SELECT t2.a +FROM t AS t2 +WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a +FROM t AS t3 +WHERE t3.b=1)); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 5 100.00 NULL +1 PRIMARY t2 ALL NULL NULL NULL NULL 5 100.00 Using where; FirstMatch(t1); Using join buffer (Block Nested Loop) +3 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 5 100.00 Using where +Warnings: +Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` semi join (`test`.`t` `t2`) where ((`test`.`t2`.`a` = `test`.`t1`.`a`) and (not((concat(`test`.`t1`.`a`,''),(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and (outer_field_is_not_null, (((concat(`test`.`t1`.`a`,'')) = `test`.`t3`.`a`) or isnull(`test`.`t3`.`a`)), true)) having (outer_field_is_not_null, (`test`.`t3`.`a`), true)))))) +SELECT * +FROM t AS t1 +WHERE t1.a IN (SELECT t2.a +FROM t AS t2 +WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a +FROM t AS t3 +WHERE t3.b=1)); +a b +DROP TABLE t; # # Bug#51457 Firstmatch semijoin strategy gives wrong results for # certain query plans diff --git a/mysql-wsrep-5.6/mysql-test/r/subquery_sj_loosescan.result b/mysql-wsrep-5.6/mysql-test/r/subquery_sj_loosescan.result index 50177f0b..a7125ef4 100644 --- a/mysql-wsrep-5.6/mysql-test/r/subquery_sj_loosescan.result +++ b/mysql-wsrep-5.6/mysql-test/r/subquery_sj_loosescan.result @@ -10556,4 +10556,100 @@ DROP TABLE t1,t2; # End of test for Bug#21184091 set @@optimizer_switch=@old_opt_switch; # End of 5.6 tests +# Bug#21139722: Assertion failed: !(used_tables() & ((table_map) 1) ... +CREATE TABLE t1(a INTEGER) engine=innodb; +CREATE TABLE t2(b INTEGER) engine=innodb; +explain SELECT 1 +FROM (SELECT 1 IN (SELECT 1 +FROM t1 +WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2) +) +FROM t2 +) AS z; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY ALL NULL NULL NULL NULL 2 NULL +2 DERIVED t2 ALL NULL NULL NULL NULL 1 NULL +3 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 1 Using where +5 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 Using where +4 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 NULL +SELECT 1 +FROM (SELECT 1 IN (SELECT 1 +FROM t1 +WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2) +) +FROM t2 +) AS z; +1 +DROP TABLE t1, t2; +CREATE TABLE t1(a INTEGER) engine=innodb; +explain SELECT (SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +FROM t1 AS t1; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 1 NULL +2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 Using where; Start temporary +2 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 1 End temporary; Using join buffer (Block Nested Loop) +SELECT (SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +FROM t1 AS t1; +(SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +DROP TABLE t1; +# End of test for Bug#21139722 +# +# Bug#21139402 ASSERTION FAILED: LENGTH > 0 && KEYPARTS != 0, CRASH IN JOIN::OPTIMIZE_KEYUSE +# +CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a)); +CREATE TABLE t2 (c INT PRIMARY KEY); +EXPLAIN SELECT 1 +FROM t1 +WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a +FROM t1 +WHERE b) +FROM t2); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +3 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +SELECT 1 +FROM t1 +WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a +FROM t1 +WHERE b) +FROM t2); +1 +DROP TABLE t1,t2; +# +# Bug #22305361: QUERY WITH MATERIALIZED TABLE RETURNS INCORRECT +# RESULTS IN 5.6 +# +CREATE TABLE t(a INT,b INT); +INSERT INTO t VALUES (1,0),(1,0),(1,0),(1,0),(1,1); +EXPLAIN extended SELECT * +FROM t AS t1 +WHERE t1.a IN (SELECT t2.a +FROM t AS t2 +WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a +FROM t AS t3 +WHERE t3.b=1)); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 5 100.00 Start temporary +1 PRIMARY t2 ALL NULL NULL NULL NULL 5 100.00 Using where; End temporary; Using join buffer (Block Nested Loop) +3 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 5 100.00 Using where +Warnings: +Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` semi join (`test`.`t` `t2`) where ((`test`.`t2`.`a` = `test`.`t1`.`a`) and (not((concat(`test`.`t1`.`a`,''),(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and (outer_field_is_not_null, (((concat(`test`.`t1`.`a`,'')) = `test`.`t3`.`a`) or isnull(`test`.`t3`.`a`)), true)) having (outer_field_is_not_null, (`test`.`t3`.`a`), true)))))) +SELECT * +FROM t AS t1 +WHERE t1.a IN (SELECT t2.a +FROM t AS t2 +WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a +FROM t AS t3 +WHERE t3.b=1)); +a b +DROP TABLE t; set optimizer_switch=default; diff --git a/mysql-wsrep-5.6/mysql-test/r/subquery_sj_loosescan_bka.result b/mysql-wsrep-5.6/mysql-test/r/subquery_sj_loosescan_bka.result index e79aa141..9b134592 100644 --- a/mysql-wsrep-5.6/mysql-test/r/subquery_sj_loosescan_bka.result +++ b/mysql-wsrep-5.6/mysql-test/r/subquery_sj_loosescan_bka.result @@ -10561,5 +10561,101 @@ DROP TABLE t1,t2; # End of test for Bug#21184091 set @@optimizer_switch=@old_opt_switch; # End of 5.6 tests +# Bug#21139722: Assertion failed: !(used_tables() & ((table_map) 1) ... +CREATE TABLE t1(a INTEGER) engine=innodb; +CREATE TABLE t2(b INTEGER) engine=innodb; +explain SELECT 1 +FROM (SELECT 1 IN (SELECT 1 +FROM t1 +WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2) +) +FROM t2 +) AS z; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY ALL NULL NULL NULL NULL 2 NULL +2 DERIVED t2 ALL NULL NULL NULL NULL 1 NULL +3 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 1 Using where +5 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 Using where +4 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 NULL +SELECT 1 +FROM (SELECT 1 IN (SELECT 1 +FROM t1 +WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2) +) +FROM t2 +) AS z; +1 +DROP TABLE t1, t2; +CREATE TABLE t1(a INTEGER) engine=innodb; +explain SELECT (SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +FROM t1 AS t1; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 1 NULL +2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 Using where; Start temporary +2 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 1 End temporary; Using join buffer (Block Nested Loop) +SELECT (SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +FROM t1 AS t1; +(SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +DROP TABLE t1; +# End of test for Bug#21139722 +# +# Bug#21139402 ASSERTION FAILED: LENGTH > 0 && KEYPARTS != 0, CRASH IN JOIN::OPTIMIZE_KEYUSE +# +CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a)); +CREATE TABLE t2 (c INT PRIMARY KEY); +EXPLAIN SELECT 1 +FROM t1 +WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a +FROM t1 +WHERE b) +FROM t2); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +3 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +SELECT 1 +FROM t1 +WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a +FROM t1 +WHERE b) +FROM t2); +1 +DROP TABLE t1,t2; +# +# Bug #22305361: QUERY WITH MATERIALIZED TABLE RETURNS INCORRECT +# RESULTS IN 5.6 +# +CREATE TABLE t(a INT,b INT); +INSERT INTO t VALUES (1,0),(1,0),(1,0),(1,0),(1,1); +EXPLAIN extended SELECT * +FROM t AS t1 +WHERE t1.a IN (SELECT t2.a +FROM t AS t2 +WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a +FROM t AS t3 +WHERE t3.b=1)); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 5 100.00 Start temporary +1 PRIMARY t2 ALL NULL NULL NULL NULL 5 100.00 Using where; End temporary; Using join buffer (Block Nested Loop) +3 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 5 100.00 Using where +Warnings: +Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` semi join (`test`.`t` `t2`) where ((`test`.`t2`.`a` = `test`.`t1`.`a`) and (not((concat(`test`.`t1`.`a`,''),(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and (outer_field_is_not_null, (((concat(`test`.`t1`.`a`,'')) = `test`.`t3`.`a`) or isnull(`test`.`t3`.`a`)), true)) having (outer_field_is_not_null, (`test`.`t3`.`a`), true)))))) +SELECT * +FROM t AS t1 +WHERE t1.a IN (SELECT t2.a +FROM t AS t2 +WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a +FROM t AS t3 +WHERE t3.b=1)); +a b +DROP TABLE t; set optimizer_switch=default; set optimizer_switch=default; diff --git a/mysql-wsrep-5.6/mysql-test/r/subquery_sj_loosescan_bka_nixbnl.result b/mysql-wsrep-5.6/mysql-test/r/subquery_sj_loosescan_bka_nixbnl.result index 37d314d5..c5088894 100644 --- a/mysql-wsrep-5.6/mysql-test/r/subquery_sj_loosescan_bka_nixbnl.result +++ b/mysql-wsrep-5.6/mysql-test/r/subquery_sj_loosescan_bka_nixbnl.result @@ -10561,5 +10561,101 @@ DROP TABLE t1,t2; # End of test for Bug#21184091 set @@optimizer_switch=@old_opt_switch; # End of 5.6 tests +# Bug#21139722: Assertion failed: !(used_tables() & ((table_map) 1) ... +CREATE TABLE t1(a INTEGER) engine=innodb; +CREATE TABLE t2(b INTEGER) engine=innodb; +explain SELECT 1 +FROM (SELECT 1 IN (SELECT 1 +FROM t1 +WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2) +) +FROM t2 +) AS z; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY ALL NULL NULL NULL NULL 2 NULL +2 DERIVED t2 ALL NULL NULL NULL NULL 1 NULL +3 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 1 Using where +5 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 Using where +4 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 NULL +SELECT 1 +FROM (SELECT 1 IN (SELECT 1 +FROM t1 +WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2) +) +FROM t2 +) AS z; +1 +DROP TABLE t1, t2; +CREATE TABLE t1(a INTEGER) engine=innodb; +explain SELECT (SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +FROM t1 AS t1; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 1 NULL +2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 Using where +2 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 1 Start temporary; End temporary +SELECT (SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +FROM t1 AS t1; +(SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +DROP TABLE t1; +# End of test for Bug#21139722 +# +# Bug#21139402 ASSERTION FAILED: LENGTH > 0 && KEYPARTS != 0, CRASH IN JOIN::OPTIMIZE_KEYUSE +# +CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a)); +CREATE TABLE t2 (c INT PRIMARY KEY); +EXPLAIN SELECT 1 +FROM t1 +WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a +FROM t1 +WHERE b) +FROM t2); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +3 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +SELECT 1 +FROM t1 +WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a +FROM t1 +WHERE b) +FROM t2); +1 +DROP TABLE t1,t2; +# +# Bug #22305361: QUERY WITH MATERIALIZED TABLE RETURNS INCORRECT +# RESULTS IN 5.6 +# +CREATE TABLE t(a INT,b INT); +INSERT INTO t VALUES (1,0),(1,0),(1,0),(1,0),(1,1); +EXPLAIN extended SELECT * +FROM t AS t1 +WHERE t1.a IN (SELECT t2.a +FROM t AS t2 +WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a +FROM t AS t3 +WHERE t3.b=1)); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 5 100.00 NULL +1 PRIMARY t2 ALL NULL NULL NULL NULL 5 100.00 Using where; Start temporary; End temporary +3 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 5 100.00 Using where +Warnings: +Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` semi join (`test`.`t` `t2`) where ((`test`.`t2`.`a` = `test`.`t1`.`a`) and (not((concat(`test`.`t1`.`a`,''),(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and (outer_field_is_not_null, (((concat(`test`.`t1`.`a`,'')) = `test`.`t3`.`a`) or isnull(`test`.`t3`.`a`)), true)) having (outer_field_is_not_null, (`test`.`t3`.`a`), true)))))) +SELECT * +FROM t AS t1 +WHERE t1.a IN (SELECT t2.a +FROM t AS t2 +WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a +FROM t AS t3 +WHERE t3.b=1)); +a b +DROP TABLE t; set optimizer_switch=default; set optimizer_switch=default; diff --git a/mysql-wsrep-5.6/mysql-test/r/subquery_sj_loosescan_bkaunique.result b/mysql-wsrep-5.6/mysql-test/r/subquery_sj_loosescan_bkaunique.result index 98a23d3a..d889f032 100644 --- a/mysql-wsrep-5.6/mysql-test/r/subquery_sj_loosescan_bkaunique.result +++ b/mysql-wsrep-5.6/mysql-test/r/subquery_sj_loosescan_bkaunique.result @@ -10562,5 +10562,101 @@ DROP TABLE t1,t2; # End of test for Bug#21184091 set @@optimizer_switch=@old_opt_switch; # End of 5.6 tests +# Bug#21139722: Assertion failed: !(used_tables() & ((table_map) 1) ... +CREATE TABLE t1(a INTEGER) engine=innodb; +CREATE TABLE t2(b INTEGER) engine=innodb; +explain SELECT 1 +FROM (SELECT 1 IN (SELECT 1 +FROM t1 +WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2) +) +FROM t2 +) AS z; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY ALL NULL NULL NULL NULL 2 NULL +2 DERIVED t2 ALL NULL NULL NULL NULL 1 NULL +3 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 1 Using where +5 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 Using where +4 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 NULL +SELECT 1 +FROM (SELECT 1 IN (SELECT 1 +FROM t1 +WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2) +) +FROM t2 +) AS z; +1 +DROP TABLE t1, t2; +CREATE TABLE t1(a INTEGER) engine=innodb; +explain SELECT (SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +FROM t1 AS t1; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 1 NULL +2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 Using where; Start temporary +2 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 1 End temporary; Using join buffer (Block Nested Loop) +SELECT (SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +FROM t1 AS t1; +(SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +DROP TABLE t1; +# End of test for Bug#21139722 +# +# Bug#21139402 ASSERTION FAILED: LENGTH > 0 && KEYPARTS != 0, CRASH IN JOIN::OPTIMIZE_KEYUSE +# +CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a)); +CREATE TABLE t2 (c INT PRIMARY KEY); +EXPLAIN SELECT 1 +FROM t1 +WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a +FROM t1 +WHERE b) +FROM t2); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +3 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +SELECT 1 +FROM t1 +WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a +FROM t1 +WHERE b) +FROM t2); +1 +DROP TABLE t1,t2; +# +# Bug #22305361: QUERY WITH MATERIALIZED TABLE RETURNS INCORRECT +# RESULTS IN 5.6 +# +CREATE TABLE t(a INT,b INT); +INSERT INTO t VALUES (1,0),(1,0),(1,0),(1,0),(1,1); +EXPLAIN extended SELECT * +FROM t AS t1 +WHERE t1.a IN (SELECT t2.a +FROM t AS t2 +WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a +FROM t AS t3 +WHERE t3.b=1)); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 5 100.00 Start temporary +1 PRIMARY t2 ALL NULL NULL NULL NULL 5 100.00 Using where; End temporary; Using join buffer (Block Nested Loop) +3 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 5 100.00 Using where +Warnings: +Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` semi join (`test`.`t` `t2`) where ((`test`.`t2`.`a` = `test`.`t1`.`a`) and (not((concat(`test`.`t1`.`a`,''),(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and (outer_field_is_not_null, (((concat(`test`.`t1`.`a`,'')) = `test`.`t3`.`a`) or isnull(`test`.`t3`.`a`)), true)) having (outer_field_is_not_null, (`test`.`t3`.`a`), true)))))) +SELECT * +FROM t AS t1 +WHERE t1.a IN (SELECT t2.a +FROM t AS t2 +WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a +FROM t AS t3 +WHERE t3.b=1)); +a b +DROP TABLE t; set optimizer_switch=default; set optimizer_switch=default; diff --git a/mysql-wsrep-5.6/mysql-test/r/subquery_sj_mat.result b/mysql-wsrep-5.6/mysql-test/r/subquery_sj_mat.result index 4f0885a3..28284ca3 100644 --- a/mysql-wsrep-5.6/mysql-test/r/subquery_sj_mat.result +++ b/mysql-wsrep-5.6/mysql-test/r/subquery_sj_mat.result @@ -10786,4 +10786,101 @@ DROP TABLE t1,t2; # End of test for Bug#21184091 set @@optimizer_switch=@old_opt_switch; # End of 5.6 tests +# Bug#21139722: Assertion failed: !(used_tables() & ((table_map) 1) ... +CREATE TABLE t1(a INTEGER) engine=innodb; +CREATE TABLE t2(b INTEGER) engine=innodb; +explain SELECT 1 +FROM (SELECT 1 IN (SELECT 1 +FROM t1 +WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2) +) +FROM t2 +) AS z; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY ALL NULL NULL NULL NULL 2 NULL +2 DERIVED t2 ALL NULL NULL NULL NULL 1 NULL +3 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 1 Using where +5 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 Using where +4 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 NULL +SELECT 1 +FROM (SELECT 1 IN (SELECT 1 +FROM t1 +WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2) +) +FROM t2 +) AS z; +1 +DROP TABLE t1, t2; +CREATE TABLE t1(a INTEGER) engine=innodb; +explain SELECT (SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +FROM t1 AS t1; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 1 NULL +2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 Using where; Start temporary +2 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 1 End temporary; Using join buffer (Block Nested Loop) +SELECT (SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +FROM t1 AS t1; +(SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +DROP TABLE t1; +# End of test for Bug#21139722 +# +# Bug#21139402 ASSERTION FAILED: LENGTH > 0 && KEYPARTS != 0, CRASH IN JOIN::OPTIMIZE_KEYUSE +# +CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a)); +CREATE TABLE t2 (c INT PRIMARY KEY); +EXPLAIN SELECT 1 +FROM t1 +WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a +FROM t1 +WHERE b) +FROM t2); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +3 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +SELECT 1 +FROM t1 +WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a +FROM t1 +WHERE b) +FROM t2); +1 +DROP TABLE t1,t2; +# +# Bug #22305361: QUERY WITH MATERIALIZED TABLE RETURNS INCORRECT +# RESULTS IN 5.6 +# +CREATE TABLE t(a INT,b INT); +INSERT INTO t VALUES (1,0),(1,0),(1,0),(1,0),(1,1); +EXPLAIN extended SELECT * +FROM t AS t1 +WHERE t1.a IN (SELECT t2.a +FROM t AS t2 +WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a +FROM t AS t3 +WHERE t3.b=1)); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 5 100.00 Using where +1 PRIMARY eq_ref 5 test.t1.a 1 100.00 NULL +2 MATERIALIZED t2 ALL NULL NULL NULL NULL 5 100.00 Using where +3 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 5 100.00 Using where +Warnings: +Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` semi join (`test`.`t` `t2`) where ((``.`a` = `test`.`t1`.`a`) and (not((concat(`test`.`t2`.`a`,''),(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and (outer_field_is_not_null, (((concat(`test`.`t2`.`a`,'')) = `test`.`t3`.`a`) or isnull(`test`.`t3`.`a`)), true)) having (outer_field_is_not_null, (`test`.`t3`.`a`), true)))))) +SELECT * +FROM t AS t1 +WHERE t1.a IN (SELECT t2.a +FROM t AS t2 +WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a +FROM t AS t3 +WHERE t3.b=1)); +a b +DROP TABLE t; set optimizer_switch=default; diff --git a/mysql-wsrep-5.6/mysql-test/r/subquery_sj_mat_bka.result b/mysql-wsrep-5.6/mysql-test/r/subquery_sj_mat_bka.result index 5aef8649..48cc887f 100644 --- a/mysql-wsrep-5.6/mysql-test/r/subquery_sj_mat_bka.result +++ b/mysql-wsrep-5.6/mysql-test/r/subquery_sj_mat_bka.result @@ -10787,5 +10787,102 @@ DROP TABLE t1,t2; # End of test for Bug#21184091 set @@optimizer_switch=@old_opt_switch; # End of 5.6 tests +# Bug#21139722: Assertion failed: !(used_tables() & ((table_map) 1) ... +CREATE TABLE t1(a INTEGER) engine=innodb; +CREATE TABLE t2(b INTEGER) engine=innodb; +explain SELECT 1 +FROM (SELECT 1 IN (SELECT 1 +FROM t1 +WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2) +) +FROM t2 +) AS z; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY ALL NULL NULL NULL NULL 2 NULL +2 DERIVED t2 ALL NULL NULL NULL NULL 1 NULL +3 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 1 Using where +5 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 Using where +4 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 NULL +SELECT 1 +FROM (SELECT 1 IN (SELECT 1 +FROM t1 +WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2) +) +FROM t2 +) AS z; +1 +DROP TABLE t1, t2; +CREATE TABLE t1(a INTEGER) engine=innodb; +explain SELECT (SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +FROM t1 AS t1; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 1 NULL +2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 Using where; Start temporary +2 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 1 End temporary; Using join buffer (Block Nested Loop) +SELECT (SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +FROM t1 AS t1; +(SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +DROP TABLE t1; +# End of test for Bug#21139722 +# +# Bug#21139402 ASSERTION FAILED: LENGTH > 0 && KEYPARTS != 0, CRASH IN JOIN::OPTIMIZE_KEYUSE +# +CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a)); +CREATE TABLE t2 (c INT PRIMARY KEY); +EXPLAIN SELECT 1 +FROM t1 +WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a +FROM t1 +WHERE b) +FROM t2); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +3 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +SELECT 1 +FROM t1 +WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a +FROM t1 +WHERE b) +FROM t2); +1 +DROP TABLE t1,t2; +# +# Bug #22305361: QUERY WITH MATERIALIZED TABLE RETURNS INCORRECT +# RESULTS IN 5.6 +# +CREATE TABLE t(a INT,b INT); +INSERT INTO t VALUES (1,0),(1,0),(1,0),(1,0),(1,1); +EXPLAIN extended SELECT * +FROM t AS t1 +WHERE t1.a IN (SELECT t2.a +FROM t AS t2 +WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a +FROM t AS t3 +WHERE t3.b=1)); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 5 100.00 Using where +1 PRIMARY eq_ref 5 test.t1.a 1 100.00 NULL +2 MATERIALIZED t2 ALL NULL NULL NULL NULL 5 100.00 Using where +3 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 5 100.00 Using where +Warnings: +Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` semi join (`test`.`t` `t2`) where ((``.`a` = `test`.`t1`.`a`) and (not((concat(`test`.`t2`.`a`,''),(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and (outer_field_is_not_null, (((concat(`test`.`t2`.`a`,'')) = `test`.`t3`.`a`) or isnull(`test`.`t3`.`a`)), true)) having (outer_field_is_not_null, (`test`.`t3`.`a`), true)))))) +SELECT * +FROM t AS t1 +WHERE t1.a IN (SELECT t2.a +FROM t AS t2 +WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a +FROM t AS t3 +WHERE t3.b=1)); +a b +DROP TABLE t; set optimizer_switch=default; set optimizer_switch=default; diff --git a/mysql-wsrep-5.6/mysql-test/r/subquery_sj_mat_bka_nixbnl.result b/mysql-wsrep-5.6/mysql-test/r/subquery_sj_mat_bka_nixbnl.result index 53ea4f1f..3a29ba6c 100644 --- a/mysql-wsrep-5.6/mysql-test/r/subquery_sj_mat_bka_nixbnl.result +++ b/mysql-wsrep-5.6/mysql-test/r/subquery_sj_mat_bka_nixbnl.result @@ -10771,5 +10771,102 @@ DROP TABLE t1,t2; # End of test for Bug#21184091 set @@optimizer_switch=@old_opt_switch; # End of 5.6 tests +# Bug#21139722: Assertion failed: !(used_tables() & ((table_map) 1) ... +CREATE TABLE t1(a INTEGER) engine=innodb; +CREATE TABLE t2(b INTEGER) engine=innodb; +explain SELECT 1 +FROM (SELECT 1 IN (SELECT 1 +FROM t1 +WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2) +) +FROM t2 +) AS z; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY ALL NULL NULL NULL NULL 2 NULL +2 DERIVED t2 ALL NULL NULL NULL NULL 1 NULL +3 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 1 Using where +5 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 Using where +4 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 NULL +SELECT 1 +FROM (SELECT 1 IN (SELECT 1 +FROM t1 +WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2) +) +FROM t2 +) AS z; +1 +DROP TABLE t1, t2; +CREATE TABLE t1(a INTEGER) engine=innodb; +explain SELECT (SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +FROM t1 AS t1; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 1 NULL +2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 Using where +2 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 1 Start temporary; End temporary +SELECT (SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +FROM t1 AS t1; +(SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +DROP TABLE t1; +# End of test for Bug#21139722 +# +# Bug#21139402 ASSERTION FAILED: LENGTH > 0 && KEYPARTS != 0, CRASH IN JOIN::OPTIMIZE_KEYUSE +# +CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a)); +CREATE TABLE t2 (c INT PRIMARY KEY); +EXPLAIN SELECT 1 +FROM t1 +WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a +FROM t1 +WHERE b) +FROM t2); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +3 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +SELECT 1 +FROM t1 +WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a +FROM t1 +WHERE b) +FROM t2); +1 +DROP TABLE t1,t2; +# +# Bug #22305361: QUERY WITH MATERIALIZED TABLE RETURNS INCORRECT +# RESULTS IN 5.6 +# +CREATE TABLE t(a INT,b INT); +INSERT INTO t VALUES (1,0),(1,0),(1,0),(1,0),(1,1); +EXPLAIN extended SELECT * +FROM t AS t1 +WHERE t1.a IN (SELECT t2.a +FROM t AS t2 +WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a +FROM t AS t3 +WHERE t3.b=1)); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 5 100.00 Using where +1 PRIMARY eq_ref 5 test.t1.a 1 100.00 NULL +2 MATERIALIZED t2 ALL NULL NULL NULL NULL 5 100.00 Using where +3 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 5 100.00 Using where +Warnings: +Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` semi join (`test`.`t` `t2`) where ((``.`a` = `test`.`t1`.`a`) and (not((concat(`test`.`t2`.`a`,''),(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and (outer_field_is_not_null, (((concat(`test`.`t2`.`a`,'')) = `test`.`t3`.`a`) or isnull(`test`.`t3`.`a`)), true)) having (outer_field_is_not_null, (`test`.`t3`.`a`), true)))))) +SELECT * +FROM t AS t1 +WHERE t1.a IN (SELECT t2.a +FROM t AS t2 +WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a +FROM t AS t3 +WHERE t3.b=1)); +a b +DROP TABLE t; set optimizer_switch=default; set optimizer_switch=default; diff --git a/mysql-wsrep-5.6/mysql-test/r/subquery_sj_mat_bkaunique.result b/mysql-wsrep-5.6/mysql-test/r/subquery_sj_mat_bkaunique.result index d7d4d0f5..735cc0f1 100644 --- a/mysql-wsrep-5.6/mysql-test/r/subquery_sj_mat_bkaunique.result +++ b/mysql-wsrep-5.6/mysql-test/r/subquery_sj_mat_bkaunique.result @@ -10788,5 +10788,102 @@ DROP TABLE t1,t2; # End of test for Bug#21184091 set @@optimizer_switch=@old_opt_switch; # End of 5.6 tests +# Bug#21139722: Assertion failed: !(used_tables() & ((table_map) 1) ... +CREATE TABLE t1(a INTEGER) engine=innodb; +CREATE TABLE t2(b INTEGER) engine=innodb; +explain SELECT 1 +FROM (SELECT 1 IN (SELECT 1 +FROM t1 +WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2) +) +FROM t2 +) AS z; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY ALL NULL NULL NULL NULL 2 NULL +2 DERIVED t2 ALL NULL NULL NULL NULL 1 NULL +3 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 1 Using where +5 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 Using where +4 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 NULL +SELECT 1 +FROM (SELECT 1 IN (SELECT 1 +FROM t1 +WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2) +) +FROM t2 +) AS z; +1 +DROP TABLE t1, t2; +CREATE TABLE t1(a INTEGER) engine=innodb; +explain SELECT (SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +FROM t1 AS t1; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 1 NULL +2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 Using where; Start temporary +2 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 1 End temporary; Using join buffer (Block Nested Loop) +SELECT (SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +FROM t1 AS t1; +(SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +DROP TABLE t1; +# End of test for Bug#21139722 +# +# Bug#21139402 ASSERTION FAILED: LENGTH > 0 && KEYPARTS != 0, CRASH IN JOIN::OPTIMIZE_KEYUSE +# +CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a)); +CREATE TABLE t2 (c INT PRIMARY KEY); +EXPLAIN SELECT 1 +FROM t1 +WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a +FROM t1 +WHERE b) +FROM t2); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +3 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +SELECT 1 +FROM t1 +WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a +FROM t1 +WHERE b) +FROM t2); +1 +DROP TABLE t1,t2; +# +# Bug #22305361: QUERY WITH MATERIALIZED TABLE RETURNS INCORRECT +# RESULTS IN 5.6 +# +CREATE TABLE t(a INT,b INT); +INSERT INTO t VALUES (1,0),(1,0),(1,0),(1,0),(1,1); +EXPLAIN extended SELECT * +FROM t AS t1 +WHERE t1.a IN (SELECT t2.a +FROM t AS t2 +WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a +FROM t AS t3 +WHERE t3.b=1)); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 5 100.00 Using where +1 PRIMARY eq_ref 5 test.t1.a 1 100.00 NULL +2 MATERIALIZED t2 ALL NULL NULL NULL NULL 5 100.00 Using where +3 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 5 100.00 Using where +Warnings: +Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` semi join (`test`.`t` `t2`) where ((``.`a` = `test`.`t1`.`a`) and (not((concat(`test`.`t2`.`a`,''),(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and (outer_field_is_not_null, (((concat(`test`.`t2`.`a`,'')) = `test`.`t3`.`a`) or isnull(`test`.`t3`.`a`)), true)) having (outer_field_is_not_null, (`test`.`t3`.`a`), true)))))) +SELECT * +FROM t AS t1 +WHERE t1.a IN (SELECT t2.a +FROM t AS t2 +WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a +FROM t AS t3 +WHERE t3.b=1)); +a b +DROP TABLE t; set optimizer_switch=default; set optimizer_switch=default; diff --git a/mysql-wsrep-5.6/mysql-test/r/subquery_sj_mat_nosj.result b/mysql-wsrep-5.6/mysql-test/r/subquery_sj_mat_nosj.result index 46aa563b..a52aa4ea 100644 --- a/mysql-wsrep-5.6/mysql-test/r/subquery_sj_mat_nosj.result +++ b/mysql-wsrep-5.6/mysql-test/r/subquery_sj_mat_nosj.result @@ -10542,4 +10542,101 @@ DROP TABLE t1,t2; # End of test for Bug#21184091 set @@optimizer_switch=@old_opt_switch; # End of 5.6 tests +# Bug#21139722: Assertion failed: !(used_tables() & ((table_map) 1) ... +CREATE TABLE t1(a INTEGER) engine=innodb; +CREATE TABLE t2(b INTEGER) engine=innodb; +explain SELECT 1 +FROM (SELECT 1 IN (SELECT 1 +FROM t1 +WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2) +) +FROM t2 +) AS z; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY ALL NULL NULL NULL NULL 2 NULL +2 DERIVED t2 ALL NULL NULL NULL NULL 1 NULL +3 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 1 Using where +5 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 Using where +4 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 NULL +SELECT 1 +FROM (SELECT 1 IN (SELECT 1 +FROM t1 +WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2) +) +FROM t2 +) AS z; +1 +DROP TABLE t1, t2; +CREATE TABLE t1(a INTEGER) engine=innodb; +explain SELECT (SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +FROM t1 AS t1; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 1 NULL +2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 Using where +3 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 1 Using where +SELECT (SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +FROM t1 AS t1; +(SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +DROP TABLE t1; +# End of test for Bug#21139722 +# +# Bug#21139402 ASSERTION FAILED: LENGTH > 0 && KEYPARTS != 0, CRASH IN JOIN::OPTIMIZE_KEYUSE +# +CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a)); +CREATE TABLE t2 (c INT PRIMARY KEY); +EXPLAIN SELECT 1 +FROM t1 +WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a +FROM t1 +WHERE b) +FROM t2); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +3 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +SELECT 1 +FROM t1 +WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a +FROM t1 +WHERE b) +FROM t2); +1 +DROP TABLE t1,t2; +# +# Bug #22305361: QUERY WITH MATERIALIZED TABLE RETURNS INCORRECT +# RESULTS IN 5.6 +# +CREATE TABLE t(a INT,b INT); +INSERT INTO t VALUES (1,0),(1,0),(1,0),(1,0),(1,1); +EXPLAIN extended SELECT * +FROM t AS t1 +WHERE t1.a IN (SELECT t2.a +FROM t AS t2 +WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a +FROM t AS t3 +WHERE t3.b=1)); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 5 100.00 Using where +2 SUBQUERY t2 ALL NULL NULL NULL NULL 5 100.00 Using where +3 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 5 100.00 Using where +Warnings: +Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` where (`test`.`t1`.`a`,`test`.`t1`.`a` in ( (/* select#2 */ select `test`.`t2`.`a` from `test`.`t` `t2` where (not((concat(`test`.`t2`.`a`,''),(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and (outer_field_is_not_null, (((concat(`test`.`t2`.`a`,'')) = `test`.`t3`.`a`) or isnull(`test`.`t3`.`a`)), true)) having (outer_field_is_not_null, (`test`.`t3`.`a`), true))))) ), (`test`.`t1`.`a` in on where ((`test`.`t1`.`a` = `materialized-subquery`.`a`))))) +SELECT * +FROM t AS t1 +WHERE t1.a IN (SELECT t2.a +FROM t AS t2 +WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a +FROM t AS t3 +WHERE t3.b=1)); +a b +DROP TABLE t; set optimizer_switch=default; diff --git a/mysql-wsrep-5.6/mysql-test/r/subquery_sj_none.result b/mysql-wsrep-5.6/mysql-test/r/subquery_sj_none.result index 90d4a19c..68bb6f8e 100644 --- a/mysql-wsrep-5.6/mysql-test/r/subquery_sj_none.result +++ b/mysql-wsrep-5.6/mysql-test/r/subquery_sj_none.result @@ -10551,4 +10551,101 @@ DROP TABLE t1,t2; # End of test for Bug#21184091 set @@optimizer_switch=@old_opt_switch; # End of 5.6 tests +# Bug#21139722: Assertion failed: !(used_tables() & ((table_map) 1) ... +CREATE TABLE t1(a INTEGER) engine=innodb; +CREATE TABLE t2(b INTEGER) engine=innodb; +explain SELECT 1 +FROM (SELECT 1 IN (SELECT 1 +FROM t1 +WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2) +) +FROM t2 +) AS z; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY ALL NULL NULL NULL NULL 2 NULL +2 DERIVED t2 ALL NULL NULL NULL NULL 1 NULL +3 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 1 Using where +5 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 Using where +4 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 NULL +SELECT 1 +FROM (SELECT 1 IN (SELECT 1 +FROM t1 +WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2) +) +FROM t2 +) AS z; +1 +DROP TABLE t1, t2; +CREATE TABLE t1(a INTEGER) engine=innodb; +explain SELECT (SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +FROM t1 AS t1; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 1 NULL +2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 Using where +3 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 1 Using where +SELECT (SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +FROM t1 AS t1; +(SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +DROP TABLE t1; +# End of test for Bug#21139722 +# +# Bug#21139402 ASSERTION FAILED: LENGTH > 0 && KEYPARTS != 0, CRASH IN JOIN::OPTIMIZE_KEYUSE +# +CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a)); +CREATE TABLE t2 (c INT PRIMARY KEY); +EXPLAIN SELECT 1 +FROM t1 +WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a +FROM t1 +WHERE b) +FROM t2); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +3 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +SELECT 1 +FROM t1 +WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a +FROM t1 +WHERE b) +FROM t2); +1 +DROP TABLE t1,t2; +# +# Bug #22305361: QUERY WITH MATERIALIZED TABLE RETURNS INCORRECT +# RESULTS IN 5.6 +# +CREATE TABLE t(a INT,b INT); +INSERT INTO t VALUES (1,0),(1,0),(1,0),(1,0),(1,1); +EXPLAIN extended SELECT * +FROM t AS t1 +WHERE t1.a IN (SELECT t2.a +FROM t AS t2 +WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a +FROM t AS t3 +WHERE t3.b=1)); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 5 100.00 Using where +2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 5 100.00 Using where +3 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 5 100.00 Using where +Warnings: +Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` where (`test`.`t1`.`a`,(/* select#2 */ select 1 from `test`.`t` `t2` where ((not((concat(`test`.`t2`.`a`,''),(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and (outer_field_is_not_null, (((concat(`test`.`t2`.`a`,'')) = `test`.`t3`.`a`) or isnull(`test`.`t3`.`a`)), true)) having (outer_field_is_not_null, (`test`.`t3`.`a`), true))))) and ((`test`.`t1`.`a`) = `test`.`t2`.`a`)))) +SELECT * +FROM t AS t1 +WHERE t1.a IN (SELECT t2.a +FROM t AS t2 +WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a +FROM t AS t3 +WHERE t3.b=1)); +a b +DROP TABLE t; set optimizer_switch=default; diff --git a/mysql-wsrep-5.6/mysql-test/r/subquery_sj_none_bka.result b/mysql-wsrep-5.6/mysql-test/r/subquery_sj_none_bka.result index 27eb308f..89b46eb2 100644 --- a/mysql-wsrep-5.6/mysql-test/r/subquery_sj_none_bka.result +++ b/mysql-wsrep-5.6/mysql-test/r/subquery_sj_none_bka.result @@ -10552,5 +10552,102 @@ DROP TABLE t1,t2; # End of test for Bug#21184091 set @@optimizer_switch=@old_opt_switch; # End of 5.6 tests +# Bug#21139722: Assertion failed: !(used_tables() & ((table_map) 1) ... +CREATE TABLE t1(a INTEGER) engine=innodb; +CREATE TABLE t2(b INTEGER) engine=innodb; +explain SELECT 1 +FROM (SELECT 1 IN (SELECT 1 +FROM t1 +WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2) +) +FROM t2 +) AS z; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY ALL NULL NULL NULL NULL 2 NULL +2 DERIVED t2 ALL NULL NULL NULL NULL 1 NULL +3 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 1 Using where +5 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 Using where +4 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 NULL +SELECT 1 +FROM (SELECT 1 IN (SELECT 1 +FROM t1 +WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2) +) +FROM t2 +) AS z; +1 +DROP TABLE t1, t2; +CREATE TABLE t1(a INTEGER) engine=innodb; +explain SELECT (SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +FROM t1 AS t1; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 1 NULL +2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 Using where +3 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 1 Using where +SELECT (SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +FROM t1 AS t1; +(SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +DROP TABLE t1; +# End of test for Bug#21139722 +# +# Bug#21139402 ASSERTION FAILED: LENGTH > 0 && KEYPARTS != 0, CRASH IN JOIN::OPTIMIZE_KEYUSE +# +CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a)); +CREATE TABLE t2 (c INT PRIMARY KEY); +EXPLAIN SELECT 1 +FROM t1 +WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a +FROM t1 +WHERE b) +FROM t2); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +3 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +SELECT 1 +FROM t1 +WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a +FROM t1 +WHERE b) +FROM t2); +1 +DROP TABLE t1,t2; +# +# Bug #22305361: QUERY WITH MATERIALIZED TABLE RETURNS INCORRECT +# RESULTS IN 5.6 +# +CREATE TABLE t(a INT,b INT); +INSERT INTO t VALUES (1,0),(1,0),(1,0),(1,0),(1,1); +EXPLAIN extended SELECT * +FROM t AS t1 +WHERE t1.a IN (SELECT t2.a +FROM t AS t2 +WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a +FROM t AS t3 +WHERE t3.b=1)); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 5 100.00 Using where +2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 5 100.00 Using where +3 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 5 100.00 Using where +Warnings: +Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` where (`test`.`t1`.`a`,(/* select#2 */ select 1 from `test`.`t` `t2` where ((not((concat(`test`.`t2`.`a`,''),(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and (outer_field_is_not_null, (((concat(`test`.`t2`.`a`,'')) = `test`.`t3`.`a`) or isnull(`test`.`t3`.`a`)), true)) having (outer_field_is_not_null, (`test`.`t3`.`a`), true))))) and ((`test`.`t1`.`a`) = `test`.`t2`.`a`)))) +SELECT * +FROM t AS t1 +WHERE t1.a IN (SELECT t2.a +FROM t AS t2 +WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a +FROM t AS t3 +WHERE t3.b=1)); +a b +DROP TABLE t; set optimizer_switch=default; set optimizer_switch=default; diff --git a/mysql-wsrep-5.6/mysql-test/r/subquery_sj_none_bka_nixbnl.result b/mysql-wsrep-5.6/mysql-test/r/subquery_sj_none_bka_nixbnl.result index 217f7fb4..96b56c89 100644 --- a/mysql-wsrep-5.6/mysql-test/r/subquery_sj_none_bka_nixbnl.result +++ b/mysql-wsrep-5.6/mysql-test/r/subquery_sj_none_bka_nixbnl.result @@ -10547,5 +10547,102 @@ DROP TABLE t1,t2; # End of test for Bug#21184091 set @@optimizer_switch=@old_opt_switch; # End of 5.6 tests +# Bug#21139722: Assertion failed: !(used_tables() & ((table_map) 1) ... +CREATE TABLE t1(a INTEGER) engine=innodb; +CREATE TABLE t2(b INTEGER) engine=innodb; +explain SELECT 1 +FROM (SELECT 1 IN (SELECT 1 +FROM t1 +WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2) +) +FROM t2 +) AS z; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY ALL NULL NULL NULL NULL 2 NULL +2 DERIVED t2 ALL NULL NULL NULL NULL 1 NULL +3 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 1 Using where +5 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 Using where +4 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 NULL +SELECT 1 +FROM (SELECT 1 IN (SELECT 1 +FROM t1 +WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2) +) +FROM t2 +) AS z; +1 +DROP TABLE t1, t2; +CREATE TABLE t1(a INTEGER) engine=innodb; +explain SELECT (SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +FROM t1 AS t1; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 1 NULL +2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 Using where +3 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 1 Using where +SELECT (SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +FROM t1 AS t1; +(SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +DROP TABLE t1; +# End of test for Bug#21139722 +# +# Bug#21139402 ASSERTION FAILED: LENGTH > 0 && KEYPARTS != 0, CRASH IN JOIN::OPTIMIZE_KEYUSE +# +CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a)); +CREATE TABLE t2 (c INT PRIMARY KEY); +EXPLAIN SELECT 1 +FROM t1 +WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a +FROM t1 +WHERE b) +FROM t2); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +3 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +SELECT 1 +FROM t1 +WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a +FROM t1 +WHERE b) +FROM t2); +1 +DROP TABLE t1,t2; +# +# Bug #22305361: QUERY WITH MATERIALIZED TABLE RETURNS INCORRECT +# RESULTS IN 5.6 +# +CREATE TABLE t(a INT,b INT); +INSERT INTO t VALUES (1,0),(1,0),(1,0),(1,0),(1,1); +EXPLAIN extended SELECT * +FROM t AS t1 +WHERE t1.a IN (SELECT t2.a +FROM t AS t2 +WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a +FROM t AS t3 +WHERE t3.b=1)); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 5 100.00 Using where +2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 5 100.00 Using where +3 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 5 100.00 Using where +Warnings: +Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` where (`test`.`t1`.`a`,(/* select#2 */ select 1 from `test`.`t` `t2` where ((not((concat(`test`.`t2`.`a`,''),(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and (outer_field_is_not_null, (((concat(`test`.`t2`.`a`,'')) = `test`.`t3`.`a`) or isnull(`test`.`t3`.`a`)), true)) having (outer_field_is_not_null, (`test`.`t3`.`a`), true))))) and ((`test`.`t1`.`a`) = `test`.`t2`.`a`)))) +SELECT * +FROM t AS t1 +WHERE t1.a IN (SELECT t2.a +FROM t AS t2 +WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a +FROM t AS t3 +WHERE t3.b=1)); +a b +DROP TABLE t; set optimizer_switch=default; set optimizer_switch=default; diff --git a/mysql-wsrep-5.6/mysql-test/r/subquery_sj_none_bkaunique.result b/mysql-wsrep-5.6/mysql-test/r/subquery_sj_none_bkaunique.result index 6936ca24..8a2ba739 100644 --- a/mysql-wsrep-5.6/mysql-test/r/subquery_sj_none_bkaunique.result +++ b/mysql-wsrep-5.6/mysql-test/r/subquery_sj_none_bkaunique.result @@ -10553,5 +10553,102 @@ DROP TABLE t1,t2; # End of test for Bug#21184091 set @@optimizer_switch=@old_opt_switch; # End of 5.6 tests +# Bug#21139722: Assertion failed: !(used_tables() & ((table_map) 1) ... +CREATE TABLE t1(a INTEGER) engine=innodb; +CREATE TABLE t2(b INTEGER) engine=innodb; +explain SELECT 1 +FROM (SELECT 1 IN (SELECT 1 +FROM t1 +WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2) +) +FROM t2 +) AS z; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY ALL NULL NULL NULL NULL 2 NULL +2 DERIVED t2 ALL NULL NULL NULL NULL 1 NULL +3 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 1 Using where +5 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 Using where +4 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 NULL +SELECT 1 +FROM (SELECT 1 IN (SELECT 1 +FROM t1 +WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2) +) +FROM t2 +) AS z; +1 +DROP TABLE t1, t2; +CREATE TABLE t1(a INTEGER) engine=innodb; +explain SELECT (SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +FROM t1 AS t1; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 1 NULL +2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 Using where +3 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 1 Using where +SELECT (SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +FROM t1 AS t1; +(SELECT a +FROM t1 AS t2 +WHERE a IN (SELECT t1.a+t2.a +FROM t1 AS t3)) +DROP TABLE t1; +# End of test for Bug#21139722 +# +# Bug#21139402 ASSERTION FAILED: LENGTH > 0 && KEYPARTS != 0, CRASH IN JOIN::OPTIMIZE_KEYUSE +# +CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a)); +CREATE TABLE t2 (c INT PRIMARY KEY); +EXPLAIN SELECT 1 +FROM t1 +WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a +FROM t1 +WHERE b) +FROM t2); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +3 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +SELECT 1 +FROM t1 +WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a +FROM t1 +WHERE b) +FROM t2); +1 +DROP TABLE t1,t2; +# +# Bug #22305361: QUERY WITH MATERIALIZED TABLE RETURNS INCORRECT +# RESULTS IN 5.6 +# +CREATE TABLE t(a INT,b INT); +INSERT INTO t VALUES (1,0),(1,0),(1,0),(1,0),(1,1); +EXPLAIN extended SELECT * +FROM t AS t1 +WHERE t1.a IN (SELECT t2.a +FROM t AS t2 +WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a +FROM t AS t3 +WHERE t3.b=1)); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 5 100.00 Using where +2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 5 100.00 Using where +3 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 5 100.00 Using where +Warnings: +Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` where (`test`.`t1`.`a`,(/* select#2 */ select 1 from `test`.`t` `t2` where ((not((concat(`test`.`t2`.`a`,''),(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and (outer_field_is_not_null, (((concat(`test`.`t2`.`a`,'')) = `test`.`t3`.`a`) or isnull(`test`.`t3`.`a`)), true)) having (outer_field_is_not_null, (`test`.`t3`.`a`), true))))) and ((`test`.`t1`.`a`) = `test`.`t2`.`a`)))) +SELECT * +FROM t AS t1 +WHERE t1.a IN (SELECT t2.a +FROM t AS t2 +WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a +FROM t AS t3 +WHERE t3.b=1)); +a b +DROP TABLE t; set optimizer_switch=default; set optimizer_switch=default; diff --git a/mysql-wsrep-5.6/mysql-test/r/udf_services.result b/mysql-wsrep-5.6/mysql-test/r/udf_services.result new file mode 100644 index 00000000..0ddbecd3 --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/r/udf_services.result @@ -0,0 +1,15 @@ +# +# Bug #20085672: CRYPTIC ERROR WHEN FAILING TO UNLOAD A DYNAMIC LIBRARY +# +# Install the plugin +INSTALL PLUGIN test_udf_services SONAME 'TESTUDFSERVICES'; +# Define the function +CREATE FUNCTION test_udf_services_udf RETURNS INT +SONAME "TESTUDFSERVICES"; +# Uninstall the plugin +UNINSTALL PLUGIN test_udf_services; +# Install the plugin again. Should not fail +INSTALL PLUGIN test_udf_services SONAME 'TESTUDFSERVICES'; +# Cleanup +DROP FUNCTION test_udf_services_udf; +UNINSTALL PLUGIN test_udf_services; diff --git a/mysql-wsrep-5.6/mysql-test/r/validate_password_plugin.result b/mysql-wsrep-5.6/mysql-test/r/validate_password_plugin.result index 532cecc7..aa9581b6 100644 --- a/mysql-wsrep-5.6/mysql-test/r/validate_password_plugin.result +++ b/mysql-wsrep-5.6/mysql-test/r/validate_password_plugin.result @@ -222,6 +222,18 @@ wait/synch/rwlock/validate/LOCK_dict_file # cleanup DROP USER 'user1'@'localhost', 'user2'@'localhost'; SET @@global.validate_password_policy=DEFAULT; +# +# Bug#21616496: CREATE USER ACCEPTS PLUGIN AND PASSWORD HASH, +# BUT IGNORES THE PASSWORD HASH +# +CREATE USER 'user1'@'localhost' IDENTIFIED WITH 'mysql_native_password'; +ERROR HY000: Your password does not satisfy the current policy requirements +CREATE USER 'user1'@'localhost' IDENTIFIED WITH 'mysql_old_password'; +ERROR HY000: Your password does not satisfy the current policy requirements +CREATE USER 'user1'@'localhost' IDENTIFIED WITH 'mysql_native_password' AS '*0D3CED9BEC10A777AEC23CCC353A8C08A633045E'; +ERROR HY000: Your password does not satisfy the current policy requirements +CREATE USER 'user1'@'localhost' IDENTIFIED WITH 'mysql_old_password' AS '*0D3CED9BEC10A777AEC23CCC353A8C08A633045E'; +ERROR HY000: Your password does not satisfy the current policy requirements # clean up after the test UNINSTALL PLUGIN validate_password; End of tests diff --git a/mysql-wsrep-5.6/mysql-test/r/variables-win.result b/mysql-wsrep-5.6/mysql-test/r/variables-win.result new file mode 100644 index 00000000..53f13540 --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/r/variables-win.result @@ -0,0 +1,11 @@ +# +# Bug #23747899: @@basedir sysvar value not normalized if set through +# the command line/ini file +# There should be no slashes in @@basedir and just backslashes +# since it's normalized +SELECT +LOCATE('/', @@basedir) <> 0 AS have_slashes, +LOCATE('\\', @@basedir) <> 0 AS have_backslashes; +have_slashes have_backslashes +0 1 +End of the 5.6 tests diff --git a/mysql-wsrep-5.6/mysql-test/std_data/bug20683959loaddata.txt b/mysql-wsrep-5.6/mysql-test/std_data/bug20683959loaddata.txt new file mode 100644 index 00000000..1878cc78 --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/std_data/bug20683959loaddata.txt @@ -0,0 +1 @@ +Ã"RT @niouzechun: 遘√õ€®ç¹ä¸Šãƒ£ç¹æ–õ€‡³ç¹§ï½¨ç¹ï½³ç¹ç‰™è€³ç¸ºï½ªç¹§è–™â–¡ç¸ºä»£ï½Œç¸ºï½©ç¸²âˆšã„繝ウ繝上ャ繝斐õ€‡³ç¹§ï½¨ç¹ï½³ç¹å³¨ï½„諠ィ蜉õ€”Žå™ªç¸ºï½ªç¸ºé¡˜ï½©ï½±ç¹§åµâ‰ ç¸ºï½¾ç¹§é¡”ゥ肴・オ逧õ€‹–↓鞫ょ叙縺励↑縺õ€‹šç‚Šé€•ア縺ッ縲∫樟螳溘õ€­èŽ ï½ºé€•æº˜õ€®è“コ譛ャ逧õ€‹–↓縺õ€‘Žâˆªç¸ºä¸Šï¼žç¸ºä¹â†‘縺õ€‹–@荳榊ケウ遲峨□縺礼炊荳榊ース縺 ç¸ºè‹“セ帙> diff --git a/mysql-wsrep-5.6/mysql-test/suite/binlog/r/binlog_dmls_on_tmp_tables_readonly.result b/mysql-wsrep-5.6/mysql-test/suite/binlog/r/binlog_dmls_on_tmp_tables_readonly.result new file mode 100644 index 00000000..1dfac08e --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/binlog/r/binlog_dmls_on_tmp_tables_readonly.result @@ -0,0 +1,58 @@ +DROP TABLE IF EXISTS t1 ; +# READ_ONLY does nothing to SUPER users +# so we use a non-SUPER one: +GRANT CREATE, SELECT, DROP ON *.* TO test@localhost; +connect con1,localhost,test,,test; +connection default; +SET GLOBAL READ_ONLY=1; +connection con1; +CREATE TEMPORARY TABLE t1 (a INT) ENGINE=INNODB; +# Test INSERTS with autocommit being off and on. +BEGIN; +INSERT INTO t1 VALUES (10); +COMMIT; +INSERT INTO t1 VALUES (20); +# Test UPDATES with autocommit being off and on. +BEGIN; +UPDATE t1 SET a=30 WHERE a=10; +COMMIT; +UPDATE t1 SET a=40 WHERE a=20; +connection default; +SET GLOBAL READ_ONLY=0; +# Test scenario where global read_only is enabled in the middle of transaction. +# Test INSERT operations on temporary tables, INSERTs should be successful even +# when global read_only is enabled. +connection con1; +BEGIN; +INSERT INTO t1 VALUES(50); +connection default; +SET GLOBAL READ_ONLY=1; +connection con1; +SELECT @@GLOBAL.READ_ONLY; +@@GLOBAL.READ_ONLY +1 +COMMIT; +connection default; +SET GLOBAL READ_ONLY=0; +# Test UPDATE operations on temporary tables, UPDATEs should be successful even +# when global read_only is enabled. +connection con1; +BEGIN; +UPDATE t1 SET a=60 WHERE a=50; +connection default; +SET GLOBAL READ_ONLY=1; +connection con1; +SELECT @@GLOBAL.READ_ONLY; +@@GLOBAL.READ_ONLY +1 +COMMIT; +SELECT * FROM t1; +a +30 +40 +60 +# Clean up +connection default; +SET GLOBAL READ_ONLY=0; +disconnect con1; +DROP USER test@localhost; diff --git a/mysql-wsrep-5.6/mysql-test/suite/binlog/r/binlog_index.result b/mysql-wsrep-5.6/mysql-test/suite/binlog/r/binlog_index.result index a1d357ed..bc631363 100644 --- a/mysql-wsrep-5.6/mysql-test/suite/binlog/r/binlog_index.result +++ b/mysql-wsrep-5.6/mysql-test/suite/binlog/r/binlog_index.result @@ -324,5 +324,65 @@ master-bin.000017 # master-bin.000018 # master-bin.000019 # master-bin.000020 # +# Test case11: Bug #20381055SERVER CRASHES IF INDEX FILE IS OPENED BY +SET SESSION debug="d,force_index_file_delete_failure"; +call mtr.add_suppression("Failed to delete the existing index file"); +call mtr.add_suppression("failed to move crash safe index file to index file"); +call mtr.add_suppression("failed to update the index file"); +PURGE BINARY LOGS TO 'master-bin.000014';; +ERROR HY000: I/O error reading log index file +# Test the index file is complete, although is not purged successfully. +# Also this will indicate that binary logging is not disabled. +show binary logs; +Log_name File_size +master-bin.000012 # +master-bin.000013 # +master-bin.000014 # +master-bin.000015 # +master-bin.000016 # +master-bin.000017 # +master-bin.000018 # +master-bin.000019 # +master-bin.000020 # +SET GLOBAL binlog_error_action='IGNORE_ERROR'; +FLUSH LOGS; +ERROR HY000: Can't open file: 'master-bin.000021' (errno: 1 - Operation not permitted) +SHOW BINARY LOGS; +ERROR HY000: You are not using binary logging +show binary logs; +Log_name File_size +master-bin.000012 # +master-bin.000013 # +master-bin.000014 # +master-bin.000015 # +master-bin.000016 # +master-bin.000017 # +master-bin.000018 # +master-bin.000019 # +master-bin.000020 # +master-bin.000021 # +CREATE TABLE t1(i INT); +SET GLOBAL binlog_error_action='IGNORE_ERROR'; +SET SESSION debug="+d,force_index_file_delete_failure"; +SET SESSION debug="+d,force_rotate"; +INSERT INTO t1 VALUES (12); +ERROR HY000: Can't open file: 'master-bin.000022' (errno: 1 - Operation not permitted) +SHOW BINARY LOGS; +ERROR HY000: You are not using binary logging +show binary logs; +Log_name File_size +master-bin.000012 # +master-bin.000013 # +master-bin.000014 # +master-bin.000015 # +master-bin.000016 # +master-bin.000017 # +master-bin.000018 # +master-bin.000019 # +master-bin.000020 # +master-bin.000021 # +master-bin.000022 # +DROP TABLE t1; +# Test case11: Ends SET SESSION debug=""; End of tests diff --git a/mysql-wsrep-5.6/mysql-test/suite/binlog/r/binlog_killed.result b/mysql-wsrep-5.6/mysql-test/suite/binlog/r/binlog_killed.result index 5eedac8e..1ab6f096 100644 --- a/mysql-wsrep-5.6/mysql-test/suite/binlog/r/binlog_killed.result +++ b/mysql-wsrep-5.6/mysql-test/suite/binlog/r/binlog_killed.result @@ -100,9 +100,8 @@ master-bin.000001 # Query # # COMMIT *** a proof the query is binlogged with an error *** select (@a:=load_file("MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog")) -is not null; -(@a:=load_file("MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog")) -is not null +is not null AS Loaded; +Loaded 1 select 0 /* must return 0 to mean the killed update is in */; 0 @@ -138,9 +137,8 @@ master-bin.000001 # Query # # use `test`; delete from t4 where b=bug27563(1) or master-bin.000001 # Query # # COMMIT select (@a:=load_file("MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog")) -is not null; -(@a:=load_file("MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog")) -is not null +is not null AS Loaded; +Loaded 1 select 0 /* must return 0 to mean the killed delete is in */; 0 diff --git a/mysql-wsrep-5.6/mysql-test/suite/binlog/r/binlog_killed_simulate.result b/mysql-wsrep-5.6/mysql-test/suite/binlog/r/binlog_killed_simulate.result index 9547fdb8..9798d41c 100644 --- a/mysql-wsrep-5.6/mysql-test/suite/binlog/r/binlog_killed_simulate.result +++ b/mysql-wsrep-5.6/mysql-test/suite/binlog/r/binlog_killed_simulate.result @@ -5,9 +5,8 @@ reset master; update t1 set a=2 /* will be "killed" after work has been done */; select (@a:=load_file("MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog")) -is not null; -(@a:=load_file("MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog")) -is not null +is not null AS Loaded; +Loaded 1 select 1 /* must return 1 as query completed before got killed*/; 1 @@ -24,9 +23,8 @@ master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../s master-bin.000001 # Query # # COMMIT select (@a:=load_file("MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog")) -is not null; -(@a:=load_file("MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog")) -is not null +is not null AS Loaded; +Loaded 1 select 0 /* must return 0 to mean the killed query is in */; 0 diff --git a/mysql-wsrep-5.6/mysql-test/suite/binlog/r/binlog_sql_mode.result b/mysql-wsrep-5.6/mysql-test/suite/binlog/r/binlog_sql_mode.result index 9360b313..dc34f3f9 100644 --- a/mysql-wsrep-5.6/mysql-test/suite/binlog/r/binlog_sql_mode.result +++ b/mysql-wsrep-5.6/mysql-test/suite/binlog/r/binlog_sql_mode.result @@ -24,9 +24,8 @@ END;| Check Result select (@a:=load_file("MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug39526.binlog")) -is not null; -(@a:=load_file("MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug39526.binlog")) -is not null +is not null AS Loaded; +Loaded 1 *** String sql_mode=0 is found: 0 *** Clean Up diff --git a/mysql-wsrep-5.6/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result b/mysql-wsrep-5.6/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result index 4d298e15..d523bbc4 100644 --- a/mysql-wsrep-5.6/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result +++ b/mysql-wsrep-5.6/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result @@ -442,9 +442,8 @@ get_lock("a",10) flush logs; select (@a:=load_file("MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output")) -is not null; -(@a:=load_file("MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output")) -is not null +is not null AS Loaded; +Loaded 1 select @a like "%#%error_code=0%ROLLBACK\n/*!*/;%ROLLBACK /* added by mysqlbinlog */;%" OR diff --git a/mysql-wsrep-5.6/mysql-test/suite/binlog/t/binlog_dmls_on_tmp_tables_readonly.test b/mysql-wsrep-5.6/mysql-test/suite/binlog/t/binlog_dmls_on_tmp_tables_readonly.test new file mode 100644 index 00000000..30a6471b --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/binlog/t/binlog_dmls_on_tmp_tables_readonly.test @@ -0,0 +1,90 @@ +# ==== Purpose ==== +# +# Check that DMLs are allowed on temporary tables, when server is in read only +# mode and binary log is enabled with binlog-format being stmt/mixed mode. +# +# ==== Implementation ==== +# +# Start the server with binary log being enabled. Mark the server as read only. +# Create a non-SUPER user and let the user to create a temporary table and +# perform DML operations on that temporary table. DMLs should not be blocked +# with a 'server read-only mode' error. +# +# ==== References ==== +# +# Bug#12818255: READ-ONLY OPTION DOES NOT ALLOW INSERTS/UPDATES ON TEMPORARY +# TABLES +# Bug#14294223: CHANGES NOT ALLOWED TO TEMPORARY TABLES ON READ-ONLY SERVERS +############################################################################### +--source include/have_log_bin.inc +--disable_warnings +DROP TABLE IF EXISTS t1 ; +--enable_warnings + +--enable_connect_log +--echo # READ_ONLY does nothing to SUPER users +--echo # so we use a non-SUPER one: +GRANT CREATE, SELECT, DROP ON *.* TO test@localhost; + +connect (con1,localhost,test,,test); + +connection default; +SET GLOBAL READ_ONLY=1; + +connection con1; +CREATE TEMPORARY TABLE t1 (a INT) ENGINE=INNODB; + +--echo # Test INSERTS with autocommit being off and on. +BEGIN; +INSERT INTO t1 VALUES (10); +COMMIT; +INSERT INTO t1 VALUES (20); + +--echo # Test UPDATES with autocommit being off and on. +BEGIN; +UPDATE t1 SET a=30 WHERE a=10; +COMMIT; +UPDATE t1 SET a=40 WHERE a=20; + +connection default; +SET GLOBAL READ_ONLY=0; + +--echo # Test scenario where global read_only is enabled in the middle of transaction. +--echo # Test INSERT operations on temporary tables, INSERTs should be successful even +--echo # when global read_only is enabled. +connection con1; +BEGIN; +INSERT INTO t1 VALUES(50); + +connection default; +SET GLOBAL READ_ONLY=1; + +connection con1; +SELECT @@GLOBAL.READ_ONLY; +COMMIT; + +connection default; +SET GLOBAL READ_ONLY=0; + +--echo # Test UPDATE operations on temporary tables, UPDATEs should be successful even +--echo # when global read_only is enabled. +connection con1; +BEGIN; +UPDATE t1 SET a=60 WHERE a=50; + +connection default; +SET GLOBAL READ_ONLY=1; + +connection con1; +SELECT @@GLOBAL.READ_ONLY; +COMMIT; + +SELECT * FROM t1; + +--echo # Clean up +connection default; +SET GLOBAL READ_ONLY=0; + +disconnect con1; +DROP USER test@localhost; +--disable_connect_log diff --git a/mysql-wsrep-5.6/mysql-test/suite/binlog/t/binlog_index.test b/mysql-wsrep-5.6/mysql-test/suite/binlog/t/binlog_index.test index 41c4a852..0274fcfd 100644 --- a/mysql-wsrep-5.6/mysql-test/suite/binlog/t/binlog_index.test +++ b/mysql-wsrep-5.6/mysql-test/suite/binlog/t/binlog_index.test @@ -417,6 +417,61 @@ file_exists $MYSQLD_DATADIR/master-bin.000012; file_exists $MYSQLD_DATADIR/master-bin.000013; file_exists $MYSQLD_DATADIR/master-bin.000014; -eval SET SESSION debug="$old"; +-- echo # Test case11: Bug #20381055SERVER CRASHES IF INDEX FILE IS OPENED BY + # OTHER APPLICATION AND PURGE IS ISSUED. + # This test case test the server behaviour if index file cannot be + # deleted. +SET SESSION debug="d,force_index_file_delete_failure"; + +# Add supressions +call mtr.add_suppression("Failed to delete the existing index file"); +call mtr.add_suppression("failed to move crash safe index file to index file"); +call mtr.add_suppression("failed to update the index file"); + +# When index file cannot be recreated during purge binary logs command, +# it should throw error but it should not disable binary logging. +-- error ER_IO_ERR_LOG_INDEX_READ +-- eval PURGE BINARY LOGS TO 'master-bin.000014'; + +-- echo # Test the index file is complete, although is not purged successfully. +-- echo # Also this will indicate that binary logging is not disabled. +-- source include/show_binary_logs.inc +file_exists $MYSQLD_DATADIR/master-bin.000012; +file_exists $MYSQLD_DATADIR/master-bin.000013; +file_exists $MYSQLD_DATADIR/master-bin.000014; + +# When index file cannot be recreated during FLUSH LOGS command, +# it should throw error and binary logging should be disabled. +SET GLOBAL binlog_error_action='IGNORE_ERROR'; +# normalize strerror message for solaris10-sparc-64bit as long as errno is OK +--replace_regex /\.[\\\/]master/master/ /errno: 1 - .*\)/errno: 1 - Operation not permitted)/ +--error ER_CANT_OPEN_FILE +FLUSH LOGS; +--error ER_NO_BINARY_LOGGING +SHOW BINARY LOGS; +--source include/restart_mysqld.inc +-- source include/show_binary_logs.inc +CREATE TABLE t1(i INT); +SET GLOBAL binlog_error_action='IGNORE_ERROR'; +SET SESSION debug="+d,force_index_file_delete_failure"; +SET SESSION debug="+d,force_rotate"; + +# When index file cannot be recreated during DML command which +# is trying to rotate the binary log, it should throw error and +# binary logging should be disabled. +# normalize strerror message for solaris10-sparc-64bit as long as errno is OK +--replace_regex /\.[\\\/]master/master/ /errno: 1 - .*\)/errno: 1 - Operation not permitted)/ +--error ER_CANT_OPEN_FILE +INSERT INTO t1 VALUES (12); + +--error ER_NO_BINARY_LOGGING +SHOW BINARY LOGS; + +--source include/restart_mysqld.inc +-- source include/show_binary_logs.inc +DROP TABLE t1; +-- echo # Test case11: Ends + +eval SET SESSION debug="$old"; --echo End of tests diff --git a/mysql-wsrep-5.6/mysql-test/suite/binlog/t/binlog_killed.test b/mysql-wsrep-5.6/mysql-test/suite/binlog/t/binlog_killed.test index ce668552..f5401b47 100644 --- a/mysql-wsrep-5.6/mysql-test/suite/binlog/t/binlog_killed.test +++ b/mysql-wsrep-5.6/mysql-test/suite/binlog/t/binlog_killed.test @@ -303,7 +303,7 @@ if (!`SELECT COUNT(*) = 0 OR VARIABLE_VALUE != 'ON' FROM INFORMATION_SCHEMA.GLOB --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR eval select (@a:=load_file("$MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog")) -is not null; +is not null AS Loaded; --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR let $error_code= `select @a like "%#%error_code=0%" /* must return 0*/`; eval select $error_code /* must return 0 to mean the killed update is in */; @@ -361,7 +361,7 @@ if (!`SELECT COUNT(*) = 0 OR VARIABLE_VALUE != 'ON' FROM INFORMATION_SCHEMA.GLOB --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR eval select (@a:=load_file("$MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog")) -is not null; +is not null AS Loaded; --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR let $error_code= `select @a like "%#%error_code=0%" /* must return 0*/`; eval select $error_code /* must return 0 to mean the killed delete is in */; diff --git a/mysql-wsrep-5.6/mysql-test/suite/binlog/t/binlog_killed_simulate.test b/mysql-wsrep-5.6/mysql-test/suite/binlog/t/binlog_killed_simulate.test index 79494e2d..424d30dc 100644 --- a/mysql-wsrep-5.6/mysql-test/suite/binlog/t/binlog_killed_simulate.test +++ b/mysql-wsrep-5.6/mysql-test/suite/binlog/t/binlog_killed_simulate.test @@ -26,7 +26,7 @@ let $MYSQLD_DATADIR= `select @@datadir`; --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR eval select (@a:=load_file("$MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog")) -is not null; +is not null AS Loaded; --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR let $error_code= `select @a like "%#%error_code=0%" /* must return 1 */`; eval select $error_code /* must return 1 as query completed before got killed*/; @@ -57,7 +57,7 @@ source include/show_binlog_events.inc; --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR eval select (@a:=load_file("$MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog")) -is not null; +is not null AS Loaded; --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR let $error_code= `select @a like "%#%error_code=0%" /* must return 0*/`; eval select $error_code /* must return 0 to mean the killed query is in */; diff --git a/mysql-wsrep-5.6/mysql-test/suite/binlog/t/binlog_sql_mode.test b/mysql-wsrep-5.6/mysql-test/suite/binlog/t/binlog_sql_mode.test index 2b060135..66846e72 100644 --- a/mysql-wsrep-5.6/mysql-test/suite/binlog/t/binlog_sql_mode.test +++ b/mysql-wsrep-5.6/mysql-test/suite/binlog/t/binlog_sql_mode.test @@ -56,7 +56,7 @@ let $MYSQLD_DATADIR= `select @@datadir`; --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR eval select (@a:=load_file("$MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug39526.binlog")) -is not null; +is not null AS Loaded; let $s_mode_unsigned= `select @a like "%@@session.sql_mode=0%" /* must return 0 */`; echo *** String sql_mode=0 is found: $s_mode_unsigned ***; diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/galera_2nodes.cnf b/mysql-wsrep-5.6/mysql-test/suite/galera/galera_2nodes.cnf index 6dda00e2..42951fd3 100644 --- a/mysql-wsrep-5.6/mysql-test/suite/galera/galera_2nodes.cnf +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/galera_2nodes.cnf @@ -9,7 +9,7 @@ binlog-format=row wsrep_provider=@ENV.WSREP_PROVIDER wsrep_cluster_address='gcomm://' -wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#galera_port' +wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#galera_port;evs.suspect_timeout=PT10S' # enforce read-committed characteristics across the cluster wsrep_causal_reads=ON @@ -29,7 +29,7 @@ binlog-format=row wsrep_provider=@ENV.WSREP_PROVIDER wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port' -wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#galera_port' +wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#galera_port;evs.suspect_timeout=PT10S' # enforce read-committed characteristics across the cluster wsrep_causal_reads=ON diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/galera_2nodes_as_master_slave.cnf b/mysql-wsrep-5.6/mysql-test/suite/galera/galera_2nodes_as_master_slave.cnf new file mode 100644 index 00000000..716a790f --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/galera_2nodes_as_master_slave.cnf @@ -0,0 +1,83 @@ + +# +# Let's understand the topology. +# * Independent Master with server-id = 1 +# * Galera cluster with 2 nodes: node#1 and node#2 with server-id = 2, 3 +# node#1 act as slave to Independent Master with server-id = 1 +# * Independent Slave with server-id = 4 replicating from galera node#2 +# + +# Use default setting for mysqld processes +!include include/default_mysqld.cnf + +[mysqld] +log-slave-updates +log-bin=mysqld-bin +binlog-format=row +gtid-mode=on +enforce-gtid-consistency=true + +[mysqld.1] +server-id=1 + +[mysqld.2] +server-id=2 + +wsrep_provider=@ENV.WSREP_PROVIDER +wsrep_cluster_address='gcomm://' +wsrep_provider_options='base_port=@mysqld.2.#galera_port;evs.install_timeout = PT15S; evs.max_install_timeouts=1;' + +# enforce read-committed characteristics across the cluster +wsrep_causal_reads=ON +wsrep_sync_wait = 7 + +wsrep_node_address=127.0.0.1 +wsrep_sst_receive_address=127.0.0.2:@mysqld.2.#sst_port +wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port + +# Required for Galera +innodb_autoinc_lock_mode=2 + +innodb_flush_log_at_trx_commit=2 + +[mysqld.3] +server-id=3 + +wsrep_provider=@ENV.WSREP_PROVIDER +wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.2.#galera_port' +wsrep_provider_options='base_port=@mysqld.3.#galera_port;evs.install_timeout = PT15S; evs.max_install_timeouts = 1;' + +# enforce read-committed characteristics across the cluster +wsrep_causal_reads=ON +wsrep_sync_wait = 7 + +wsrep_node_address=127.0.0.1 +wsrep_sst_receive_address=127.0.0.2:@mysqld.3.#sst_port +wsrep_node_incoming_address=127.0.0.1:@mysqld.3.port + +# Required for Galera +innodb_autoinc_lock_mode=2 + +innodb_flush_log_at_trx_commit=2 + +[mysqld.4] +server-id=4 + +[ENV] +NODE_MYPORT_1= @mysqld.1.port +NODE_MYSOCK_1= @mysqld.1.socket + +NODE_MYPORT_2= @mysqld.2.port +NODE_MYSOCK_2= @mysqld.2.socket + +NODE_MYPORT_3= @mysqld.3.port +NODE_MYSOCK_3= @mysqld.3.socket + +NODE_MYPORT_4= @mysqld.4.port +NODE_MYSOCK_4= @mysqld.4.socket + +NODE_GALERAPORT_2= @mysqld.2.#galera_port +NODE_GALERAPORT_3= @mysqld.3.#galera_port + +NODE_SSTPORT_2= @mysqld.2.#sst_port +NODE_SSTPORT_3= @mysqld.3.#sst_port diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/galera_2nodes_as_master_with_repl_filter.cnf b/mysql-wsrep-5.6/mysql-test/suite/galera/galera_2nodes_as_master_with_repl_filter.cnf new file mode 100644 index 00000000..5f0af2e5 --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/galera_2nodes_as_master_with_repl_filter.cnf @@ -0,0 +1,87 @@ +# +# This .cnf file creates a setup with a 2-node Galera cluster and one stand-alone MySQL server, to be used as a slave +# + +# Use default setting for mysqld processes +!include include/default_mysqld.cnf + +[mysqld] +default-storage-engine=InnoDB + +[mysqld.1] +server-id=1 +binlog-format=row +log-bin=mysqld-bin +log_slave_updates +gtid-mode=on +enforce-gtid-consistency=true +event-scheduler=1 + +wsrep_provider=@ENV.WSREP_PROVIDER +wsrep_cluster_address='gcomm://' +wsrep_provider_options='base_port=@mysqld.1.#galera_port' + +# enforce read-committed characteristics across the cluster +wsrep_causal_reads=ON +wsrep_sync_wait = 7 + +wsrep_node_address=127.0.0.1 +wsrep_sst_receive_address=127.0.0.2:@mysqld.1.#sst_port +wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port + +# Required for Galera +innodb_autoinc_lock_mode=2 + +innodb_flush_log_at_trx_commit=2 + +[mysqld.2] +server-id=2 +binlog-format=row +log-bin=mysqld-bin +log_slave_updates +gtid-mode=on +enforce-gtid-consistency=true +event-scheduler=1 + +wsrep_provider=@ENV.WSREP_PROVIDER +wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port' +wsrep_provider_options='base_port=@mysqld.2.#galera_port' + +# enforce read-committed characteristics across the cluster +wsrep_causal_reads=ON +wsrep_sync_wait = 7 + +wsrep_node_address=127.0.0.1 +wsrep_sst_receive_address=127.0.0.2:@mysqld.2.#sst_port +wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port + +# Required for Galera +innodb_autoinc_lock_mode=2 + +innodb_flush_log_at_trx_commit=2 + +[mysqld.3] +server-id=3 +replicate-ignore-db=test +replicate-wild-ignore-table=test.% +log-bin=mysqld-bin +log_slave_updates +gtid-mode=on +enforce-gtid-consistency=true +event-scheduler=1 + +[ENV] +NODE_MYPORT_1= @mysqld.1.port +NODE_MYSOCK_1= @mysqld.1.socket + +NODE_MYPORT_2= @mysqld.2.port +NODE_MYSOCK_2= @mysqld.2.socket + +NODE_MYPORT_3= @mysqld.3.port +NODE_MYSOCK_3= @mysqld.3.socket + +NODE_GALERAPORT_1= @mysqld.1.#galera_port +NODE_GALERAPORT_2= @mysqld.2.#galera_port + +NODE_SSTPORT_1= @mysqld.1.#sst_port +NODE_SSTPORT_2= @mysqld.2.#sst_port diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/GAL-401.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/GAL-401.result new file mode 100644 index 00000000..bcf83e7e --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/r/GAL-401.result @@ -0,0 +1,21 @@ +SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=true'; +SET @@global.wsrep_desync = 1; +SET SESSION wsrep_sync_wait=0; +SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1'; +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1)); +SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0'; +SHOW STATUS LIKE 'wsrep_desync_count'; +Variable_name Value +wsrep_desync_count 0 +SET @@global.wsrep_desync = 0; +SET SESSION wsrep_sync_wait=7; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `f1` int(11) NOT NULL, + `f2` char(1) DEFAULT NULL, + PRIMARY KEY (`f1`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +DROP TABLE t1; +CALL mtr.add_suppression("WSREP: Protocol violation. JOIN message sender (.*) is not in state transfer \\(SYNCED\\). Message ignored."); +SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=false'; diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/MW-284.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/MW-284.result new file mode 100644 index 00000000..8cc39c8e --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/r/MW-284.result @@ -0,0 +1,15 @@ +CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; +SET GLOBAL wsrep_provider_options='gmcast.isolate=1'; +SET SESSION wsrep_on = OFF; +SET SESSION wsrep_on = ON; +START SLAVE USER='root'; +Warnings: +Note 1759 Sending passwords in plain text without SSL/TLS is extremely insecure. +include/wait_for_slave_param.inc [Slave_IO_Running] +SET GLOBAL wsrep_provider_options='gmcast.isolate=0'; +include/wait_for_slave_to_start.inc +INSERT INTO t1 VALUES (1); +DROP TABLE t1; +STOP SLAVE; +RESET SLAVE ALL; +CALL mtr.add_suppression('failed registering on master'); diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/MW-285.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/MW-285.result new file mode 100644 index 00000000..8c5a21fc --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/r/MW-285.result @@ -0,0 +1,19 @@ +CREATE TABLE parent1 ( id INT PRIMARY KEY, KEY (id) ) ENGINE=InnoDB; +CREATE TABLE parent2 ( id INT PRIMARY KEY, KEY (id) ) ENGINE=InnoDB; +CREATE TABLE child ( +id INT PRIMARY KEY, +parent1_id INT, +parent2_id INT, +FOREIGN KEY (parent1_id) REFERENCES parent1(id), +FOREIGN KEY (parent1_id) REFERENCES parent2(id) +) ENGINE=InnoDB; +INSERT INTO parent1 VALUES (1); +INSERT INTO parent2 VALUES (1); +INSERT INTO child VALUES (1,1,1); +INSERT INTO child VALUES (2,1,1); +SET foreign_key_checks=OFF; +DROP TABLE parent1; +UPDATE child SET parent1_id=2 WHERE id=1; +DROP TABLE child; +DROP TABLE parent2; +SET foreign_key_checks=ON; diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/MW-286.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/MW-286.result new file mode 100644 index 00000000..adc996c1 --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/r/MW-286.result @@ -0,0 +1,13 @@ +CREATE TABLE ten (f1 INTEGER); +INSERT INTO ten VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB; +INSERT INTO t1 (f1) SELECT 000000 + (10000 * a1.f1) + (1000 * a2.f1) + (100 * a3.f1) + (10 * a4.f1) + a5.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5; +INSERT INTO t1 (f1) SELECT 100000 + (10000 * a1.f1) + (1000 * a2.f1) + (100 * a3.f1) + (10 * a4.f1) + a5.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;; +SET GLOBAL wsrep_desync = TRUE; +SET wsrep_on = FALSE; +ALTER TABLE t1 ADD PRIMARY KEY (f1); +ERROR 70100: Query execution was interrupted +SET wsrep_on = TRUE; +SET GLOBAL wsrep_desync = FALSE; +DROP TABLE t1; +DROP TABLE ten; diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/MW-292.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/MW-292.result new file mode 100644 index 00000000..f038f880 --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/r/MW-292.result @@ -0,0 +1,30 @@ +CREATE TABLE rand_table (f1 FLOAT); +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1)); +INSERT INTO t1 VALUES (1, 'a'); +INSERT INTO t1 VALUES (2, 'a'); +SET AUTOCOMMIT=ON; +START TRANSACTION; +UPDATE t1 SET f2 = 'b' WHERE f1 = 1; +SELECT * FROM t1 WHERE f1 = 2 FOR UPDATE; +f1 f2 +2 a +SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_enter_sync'; +COMMIT;; +SET SESSION wsrep_sync_wait = 0; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +UPDATE t1 SET f2 = 'c' WHERE f1 = 2; +SET GLOBAL wsrep_provider_options = 'dbug='; +SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_enter_sync'; +SELECT TIMEDIFF(SYSDATE(), NOW()) < 2; +TIMEDIFF(SYSDATE(), NOW()) < 2 +1 +INSERT INTO rand_table VALUES (RAND()),(RAND()),(RAND()),(RAND()),(RAND()); +INSERT INTO rand_table VALUES (RAND()),(RAND()),(RAND()),(RAND()),(RAND()); +SELECT COUNT(DISTINCT f1) = 10 FROM rand_table; +COUNT(DISTINCT f1) = 10 +1 +wsrep_local_replays +1 +DROP TABLE t1; +DROP TABLE rand_table; diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/ev51914.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/ev51914.result new file mode 100644 index 00000000..4b9f7ace --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/r/ev51914.result @@ -0,0 +1,162 @@ +SAVEPOINT in a stored function should be forbidden +CREATE FUNCTION f1 () RETURNS INT BEGIN +SAVEPOINT s; +RETURN 1; +END| +SELECT f1(); +f1() +1 +DROP FUNCTION f1; +ROLLBACK TO SAVEPOINT in a stored function should be forbidden +CREATE FUNCTION f2 () RETURNS INT BEGIN +ROLLBACK TO SAVEPOINT s; +RETURN 1; +END| +BEGIN; +SAVEPOINT s; +SELECT f2(); +ERROR 42000: SAVEPOINT s does not exist +COMMIT; +DROP FUNCTION f2; +BEGIN; +SAVEPOINT S; +ROLLBACK TO SAVEPOINT S; +COMMIT; +CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB; +CREATE TABLE t2 (a INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB; +INSERT INTO t1 values (110), (111), (112), (113), (114); +Direct SAVEPOINT in a trigger should be forbidden +CREATE TRIGGER i1_t1 BEFORE INSERT ON t1 FOR EACH ROW SAVEPOINT s; +INSERT INTO t1 VALUES (1); +DROP TRIGGER i1_t1; +CREATE TRIGGER i2_t1 AFTER INSERT ON t1 FOR EACH ROW SAVEPOINT s; +INSERT INTO t1 VALUES (2); +DROP TRIGGER i2_t1; +INSERT INTO t1 VALUES (3); +CREATE TRIGGER u1_t1 BEFORE UPDATE ON t1 FOR EACH ROW SAVEPOINT s; +UPDATE t1 SET a=4 WHERE a=3; +DROP TRIGGER u1_t1; +CREATE TRIGGER u2_t1 AFTER UPDATE ON t1 FOR EACH ROW SAVEPOINT s; +UPDATE t1 SET a=4 WHERE a=3; +DROP TRIGGER u2_t1; +CREATE TRIGGER d1_t1 BEFORE DELETE ON t1 FOR EACH ROW SAVEPOINT s; +DELETE FROM t1; +DROP TRIGGER d1_t1; +CREATE TRIGGER d1_t1 AFTER DELETE ON t1 FOR EACH ROW SAVEPOINT s; +DELETE FROM t1; +DROP TRIGGER d1_t1; +SAVEPOINT in a compound statement in a trigger should be forbidden +CREATE TRIGGER i3_t1 BEFORE INSERT ON t1 FOR EACH ROW BEGIN +SAVEPOINT s; +END| +INSERT INTO t1 VALUES (5); +DROP TRIGGER i3_t1; +SAVEPOINT in a PS call in a trigger should be forbidden +CREATE TRIGGER i4_t1 BEFORE INSERT ON t1 FOR EACH ROW BEGIN +PREPARE set_savepoint FROM "SAVEPOINT s"; +EXECUTE set_savepoint; +DEALLOCATE PREPARE set_savepoint; +END| +ERROR 0A000: Dynamic SQL is not allowed in stored function or trigger +SAVEPOINT in SP called from a trigger should be forbidden +CREATE PROCEDURE p1() BEGIN +SAVEPOINT s; +END| +CREATE TRIGGER i5_t1 BEFORE INSERT ON t1 FOR EACH ROW CALL p1; +INSERT INTO t1 VALUES (6); +DROP TRIGGER i5_t1; +SAVEPOINT in a SP called from a PS called from a trigger be forbidden +PREPARE call_p1 FROM "CALL p1"; +CREATE TRIGGER i6_t1 BEFORE INSERT ON t1 FOR EACH ROW EXECUTE call_p1; +ERROR 0A000: Dynamic SQL is not allowed in stored function or trigger +SAVEPOINT in a function called from a trigger should be forbidden +CREATE FUNCTION f1 () RETURNS INT BEGIN +SAVEPOINT s; +RETURN 1; +END| +CREATE TRIGGER i7_t1 BEFORE INSERT ON t1 FOR EACH ROW SET @foo = f1(); +INSERT INTO t1 VALUES (7); +DROP TRIGGER i7_t1; +SAVEPOINT in a SP called from a SP called from a trigger should be forbidden +CREATE PROCEDURE p2() BEGIN +CALL p1(); +END| +CREATE TRIGGER i8_t1 BEFORE INSERT ON t1 FOR EACH ROW CALL p2; +INSERT INTO t1 VALUES (8); +DROP TRIGGER i8_t1; +SAVEPOINT in a SP called from a trigger called from a SP should be forbidden +CREATE TRIGGER i9_t1 BEFORE INSERT ON t1 FOR EACH ROW CALL p1; +CREATE PROCEDURE p3() BEGIN +INSERT INTO t1 VALUES (9); +END| +CALL p3(); +DROP TRIGGER i9_t1; +ROLLBACK TO SAVEPOINT in trigger as a trivial statement should be forbidden +CREATE TRIGGER i4_t1 BEFORE INSERT ON t1 FOR EACH ROW ROLLBACK TO SAVEPOINT s; +BEGIN; +SAVEPOINT s; +INSERT INTO t1 VALUES (5); +ERROR 42000: SAVEPOINT s does not exist +COMMIT; +DROP TRIGGER i4_t1; +ROLLBACK TO SAVEPOINT in a trigger in a SP call should be forbidden +CREATE PROCEDURE p4() BEGIN +ROLLBACK TO SAVEPOINT s; +END| +CREATE TRIGGER i5_t1 BEFORE INSERT ON t1 FOR EACH ROW CALL p4; +BEGIN; +SAVEPOINT s; +INSERT INTO t1 VALUES (6); +ERROR 42000: SAVEPOINT s does not exist +COMMIT; +DROP TRIGGER i5_t1; +SAVEPOINT in a SP next to a trigger should work +CREATE TRIGGER i6_t1 BEFORE INSERT ON t1 FOR EACH ROW SET NEW.a = NEW.a + 1; +CREATE PROCEDURE p5() BEGIN +SAVEPOINT s; +INSERT INTO t1 VALUES (10); +ROLLBACK TO SAVEPOINT s; +END| +BEGIN; +CALL p5(); +COMMIT; +DROP TRIGGER i6_t1; +create trigger t1 before insert on t1 for each row +begin +insert into t2 values (NULL); +end| +INSERT INTO t1 VALUES (201), (202), (203); +SELECT * FROM t1; +a +5 +6 +7 +8 +9 +201 +202 +203 +SELECT COUNT(*) FROM t2; +COUNT(*) +3 +SELECT * FROM t1; +a +5 +6 +7 +8 +9 +201 +202 +203 +SELECT COUNT(*) FROM t2; +COUNT(*) +3 +DEALLOCATE PREPARE call_p1; +DROP TABLE t1, t2; +DROP PROCEDURE p1; +DROP PROCEDURE p2; +DROP PROCEDURE p3; +DROP PROCEDURE p4; +DROP PROCEDURE p5; +DROP FUNCTION f1; diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera#414.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera#414.result new file mode 100644 index 00000000..029961f9 --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera#414.result @@ -0,0 +1,5 @@ +SET SESSION wsrep_sync_wait = 0; +SET SESSION wsrep_on = OFF; +SET SESSION wsrep_on = ON; +CALL mtr.add_suppression("Failed to set packet size"); +CALL mtr.add_suppression("Failed to set packet size"); diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_admin.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_admin.result new file mode 100644 index 00000000..e58b0a5e --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_admin.result @@ -0,0 +1,43 @@ +DROP TABLE IF EXISTS t1, t2; +DROP TABLE IF EXISTS x1, x2; +CREATE TABLE t1 (f1 INTEGER); +CREATE TABLE t2 (f1 INT PRIMARY KEY AUTO_INCREMENT, f2 INTEGER); +SET GLOBAL wsrep_replicate_myisam = TRUE; +CREATE TABLE x1 (f1 INTEGER) ENGINE=MyISAM; +CREATE TABLE x2 (f1 INT PRIMARY KEY AUTO_INCREMENT, f2 INTEGER) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10); +INSERT INTO x1 VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10); +INSERT INTO t2 (f2) SELECT 1 FROM t1 AS a1, t1 AS a2, t1 AS a3, t1 AS a4; +INSERT INTO x2 (f2) VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10); +# ANALYZE test +ANALYZE TABLE t1, t2; +Table Op Msg_type Msg_text +test.t1 analyze status OK +test.t2 analyze status OK +# OPTIMIZE test +OPTIMIZE TABLE t1, t2; +Table Op Msg_type Msg_text +test.t1 optimize note Table does not support optimize, doing recreate + analyze instead +test.t1 optimize status OK +test.t2 optimize note Table does not support optimize, doing recreate + analyze instead +test.t2 optimize status OK +# REPAIR test +REPAIR TABLE x1, x2; +Table Op Msg_type Msg_text +test.x1 repair status OK +test.x2 repair status OK +SELECT COUNT(*) = 10 FROM t1; +COUNT(*) = 10 +1 +SELECT COUNT(*) = 10 FROM x1; +COUNT(*) = 10 +1 +SELECT COUNT(*) = 10000 FROM t2; +COUNT(*) = 10000 +1 +SELECT COUNT(*) = 10 FROM x2; +COUNT(*) = 10 +1 +DROP TABLE t1, t2; +DROP TABLE x1, x2; +SET GLOBAL wsrep_replicate_myisam = FALSE; diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_bf_abort_flush_for_export.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_bf_abort_flush_for_export.result index d6ff0c20..96ed226c 100644 --- a/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_bf_abort_flush_for_export.result +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_bf_abort_flush_for_export.result @@ -6,6 +6,7 @@ SET SESSION wsrep_sync_wait = 0; UNLOCK TABLES; COMMIT; SET AUTOCOMMIT=ON; +SET SESSION wsrep_sync_wait = 7; SELECT COUNT(*) = 1 FROM t1; COUNT(*) = 1 1 diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_defaults.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_defaults.result index aaad574b..27843570 100644 --- a/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_defaults.result +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_defaults.result @@ -27,8 +27,8 @@ WSREP_DRUPAL_282555_WORKAROUND OFF WSREP_FORCED_BINLOG_FORMAT NONE WSREP_LOAD_DATA_SPLITTING ON WSREP_LOG_CONFLICTS OFF -WSREP_MAX_WS_ROWS 131072 -WSREP_MAX_WS_SIZE 1073741824 +WSREP_MAX_WS_ROWS 0 +WSREP_MAX_WS_SIZE 2147483647 WSREP_MYSQL_REPLICATION_BUNDLE 0 WSREP_NOTIFY_CMD WSREP_ON ON @@ -47,7 +47,7 @@ WSREP_SST_DONOR WSREP_SST_DONOR_REJECTS_QUERIES OFF WSREP_SST_METHOD rsync WSREP_SYNC_WAIT 7 -; ; ; cert.log_conflicts = no; debug = no; evs.auto_evict = 0; evs.causal_keepalive_period = PT1S; evs.debug_log_mask = 0x1; evs.delay_margin = PT1S; evs.delayed_keep_period = PT30S; evs.inactive_check_period = PT0.5S; evs.inactive_timeout = PT15S; evs.info_log_mask = 0; evs.install_timeout = PT7.5S; evs.join_retrans_period = PT1S; evs.keepalive_period = PT1S; evs.max_install_timeouts = 3; evs.send_window = 4; evs.stats_report_period = PT1M; evs.suspect_timeout = PT5S; evs.use_aggregate = true; evs.user_send_window = 2; evs.version = 0; evs.view_forget_timeout = P1D; ; gcache.keep_pages_size = 0; gcache.mem_size = 0; ; gcache.page_size = 128M; gcache.size = 128M; gcomm.thread_prio = ; gcs.fc_debug = 0; gcs.fc_factor = 1.0; gcs.fc_limit = 16; gcs.fc_master_slave = no; gcs.max_packet_size = 64500; gcs.max_throttle = 0.25; ;gcs.recv_q_soft_limit = 0.25; gcs.sync_donor = no; ; gmcast.mcast_addr = ; gmcast.mcast_ttl = 1; gmcast.peer_timeout = PT3S; gmcast.segment = 0; gmcast.time_wait = PT5S; gmcast.version = 0; ; pc.announce_timeout = PT3S; pc.checksum = false; pc.ignore_quorum = false; pc.ignore_sb = false; pc.linger = PT20S; pc.npvo = false; pc.recovery = true; pc.version = 0; pc.wait_prim = true; pc.wait_prim_timeout = P30S; pc.weight = 1; protonet.backend = asio; protonet.version = 0; repl.causal_read_timeout = PT90S; repl.commit_order = 3; repl.key_format = FLAT8; repl.max_ws_size = 2147483647; repl.proto_max = 7; socket.checksum = 2; +; ; ; cert.log_conflicts = no; debug = no; evs.auto_evict = 0; evs.causal_keepalive_period = PT1S; evs.debug_log_mask = 0x1; evs.delay_margin = PT1S; evs.delayed_keep_period = PT30S; evs.inactive_check_period = PT0.5S; evs.inactive_timeout = PT15S; evs.info_log_mask = 0; evs.install_timeout = PT7.5S; evs.join_retrans_period = PT1S; evs.keepalive_period = PT1S; evs.max_install_timeouts = 3; evs.send_window = 4; evs.stats_report_period = PT1M; evs.suspect_timeout = PT10S; evs.use_aggregate = true; evs.user_send_window = 2; evs.version = 0; evs.view_forget_timeout = P1D; ; gcache.keep_pages_size = 0; gcache.mem_size = 0; ; gcache.page_size = 128M; gcache.size = 128M; gcomm.thread_prio = ; gcs.fc_debug = 0; gcs.fc_factor = 1.0; gcs.fc_limit = 16; gcs.fc_master_slave = no; gcs.max_packet_size = 64500; gcs.max_throttle = 0.25; ;gcs.recv_q_soft_limit = 0.25; gcs.sync_donor = no; ; gmcast.mcast_addr = ; gmcast.mcast_ttl = 1; gmcast.peer_timeout = PT3S; gmcast.segment = 0; gmcast.time_wait = PT5S; gmcast.version = 0; ; pc.announce_timeout = PT3S; pc.checksum = false; pc.ignore_quorum = false; pc.ignore_sb = false; pc.linger = PT20S; pc.npvo = false; pc.recovery = true; pc.version = 0; pc.wait_prim = true; pc.wait_prim_timeout = P30S; pc.weight = 1; protonet.backend = asio; protonet.version = 0; repl.causal_read_timeout = PT90S; repl.commit_order = 3; repl.key_format = FLAT8; repl.max_ws_size = 2147483647; repl.proto_max = 7; socket.checksum = 2; socket.recv_buf_size = 212992; SELECT COUNT(*) FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME LIKE 'wsrep_%' AND VARIABLE_NAME != 'wsrep_debug_sync_waiters'; diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_desync_overlapped.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_desync_overlapped.result new file mode 100644 index 00000000..a1e7d59a --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_desync_overlapped.result @@ -0,0 +1,45 @@ +CREATE TABLE ten (f1 INTEGER); +INSERT INTO ten VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +CREATE TABLE t1 (f1 INTEGER, PRIMARY KEY (f1)) Engine=InnoDB; +CREATE TABLE t2 (f1 INTEGER, PRIMARY KEY (f1)) Engine=InnoDB; +SET GLOBAL wsrep_desync = 1; +show status like 'wsrep_desync_count'; +Variable_name Value +wsrep_desync_count 1 +SET DEBUG_SYNC='before_execute_sql_command SIGNAL alter1 WAIT_FOR alter2'; +INSERT INTO t1 (f1) SELECT 0000 + (100 * a1.f1) + (10 * a2.f1) + a3.f1 FROM ten AS a1, ten AS a2, ten AS a3; +SET GLOBAL wsrep_desync = 1; +Warnings: +Warning 1231 'wsrep_desync' is already ON. +show status like 'wsrep_desync_count'; +Variable_name Value +wsrep_desync_count 1 +SET DEBUG_SYNC='now WAIT_FOR alter1'; +SET DEBUG_SYNC='before_execute_sql_command SIGNAL alter2'; +INSERT INTO t2 (f1) SELECT 0000 + (100 * a1.f1) + (10 * a2.f1) + a3.f1 FROM ten AS a1, ten AS a2, ten AS a3; +SET DEBUG_SYNC='RESET'; +SET GLOBAL wsrep_desync = 0; +show status like 'wsrep_desync_count'; +Variable_name Value +wsrep_desync_count 0 +SET GLOBAL wsrep_desync = 0; +Warnings: +Warning 1231 'wsrep_desync' is already OFF. +show status like 'wsrep_desync_count'; +Variable_name Value +wsrep_desync_count 0 +show status like 'wsrep_desync_count'; +Variable_name Value +wsrep_desync_count 0 +SET GLOBAL wsrep_desync = 0; +Warnings: +Warning 1231 'wsrep_desync' is already OFF. +SELECT COUNT(*) FROM t1; +COUNT(*) +1000 +SELECT COUNT(*) FROM t2; +COUNT(*) +1000 +DROP TABLE t1; +DROP TABLE t2; +DROP TABLE ten; diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_kill_ddl.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_kill_ddl.result index 8dd36497..b83226bb 100644 --- a/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_kill_ddl.result +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_kill_ddl.result @@ -5,7 +5,4 @@ ALTER TABLE t1 ADD COLUMN f2 INTEGER; SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='t1'; COUNT(*) = 2 1 -SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; -VARIABLE_VALUE = 2 -1 DROP TABLE t1; diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_parallel_simple.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_parallel_simple.result index 294a94ba..6d023c38 100644 --- a/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_parallel_simple.result +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_parallel_simple.result @@ -1,6 +1,7 @@ CREATE TABLE t1 (id INT) ENGINE=InnoDB; CREATE TABLE t2 (id INT) ENGINE=InnoDB; SET GLOBAL wsrep_slave_threads = 2; +LOCK TABLE t1 WRITE; INSERT INTO t1 VALUES (1); INSERT INTO t2 VALUES (1); INSERT INTO t1 VALUES (1); @@ -13,15 +14,15 @@ INSERT INTO t1 VALUES (1); INSERT INTO t2 VALUES (1); INSERT INTO t1 VALUES (1); INSERT INTO t2 VALUES (1); +SET SESSION wsrep_sync_wait = 0; +UNLOCK TABLES; +SET SESSION wsrep_sync_wait = 7; SELECT COUNT(*) = 10 FROM t1; COUNT(*) = 10 0 SELECT COUNT(*) = 10 FROM t2; COUNT(*) = 10 0 -SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'committed%'; -COUNT(*) = 2 -1 SET GLOBAL wsrep_slave_threads = 1;; DROP TABLE t1; DROP TABLE t2; diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_repl_max_ws_size.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_repl_max_ws_size.result index 6e1054cb..b31150d4 100644 --- a/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_repl_max_ws_size.result +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_repl_max_ws_size.result @@ -6,5 +6,7 @@ SELECT COUNT(*) = 0 FROM t1; COUNT(*) = 0 1 DROP TABLE t1; -CALL mtr.add_suppression("WSREP: Maximum writeset size exceeded by"); -CALL mtr.add_suppression("WSREP: transaction size exceeded"); +CALL mtr.add_suppression("Maximum writeset size exceeded by"); +CALL mtr.add_suppression("transaction size limit"); +CALL mtr.add_suppression("transaction size exceeded"); +CALL mtr.add_suppression("rbr write fail"); diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_restart_on_unknown_option.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_restart_on_unknown_option.result new file mode 100644 index 00000000..a21b1edf --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_restart_on_unknown_option.result @@ -0,0 +1,40 @@ +CALL mtr.add_suppression("Aborting"); +CALL mtr.add_suppression("unknown option '--galera-unknown-option'"); +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1)); +INSERT INTO t1 VALUES (1, 'a'), (2, 'a'), (3, 'a'); +SELECT * FROM t1; +f1 f2 +1 a +2 a +3 a +Shutting down server ... +UPDATE t1 SET f2 = 'b' WHERE f1 > 1; +UPDATE t1 SET f2 = 'c' WHERE f1 > 2; +SELECT * FROM t1; +f1 f2 +1 a +2 b +3 c +Starting server ... +Starting server ... +SELECT * FROM t1; +f1 f2 +1 a +2 b +3 c +Shutting down server ... +UPDATE t1 SET f2 = 'd' WHERE f1 > 1; +UPDATE t1 SET f2 = 'd' WHERE f1 > 2; +SELECT * FROM t1; +f1 f2 +1 a +2 d +3 d +Starting server ... +Starting server ... +SELECT * FROM t1; +f1 f2 +1 a +2 d +3 d +DROP TABLE t1; diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_ssl_upgrade.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_ssl_upgrade.result index c0f2e84d..b24671d1 100644 --- a/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_ssl_upgrade.result +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_ssl_upgrade.result @@ -4,21 +4,12 @@ VARIABLE_VALUE = 'Synced' SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; VARIABLE_VALUE = 2 1 -SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment'; -VARIABLE_VALUE = 'Synced' -1 SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; VARIABLE_VALUE = 2 1 -SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment'; -VARIABLE_VALUE = 'Synced' -1 SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; VARIABLE_VALUE = 2 1 -SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment'; -VARIABLE_VALUE = 'Synced' -1 SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; VARIABLE_VALUE = 2 1 diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_toi_ddl_fk_update.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_toi_ddl_fk_update.result new file mode 100644 index 00000000..8366cfd2 --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_toi_ddl_fk_update.result @@ -0,0 +1,23 @@ +CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); +CREATE TABLE parent ( +id INT PRIMARY KEY, +KEY (id) +) ENGINE=InnoDB; +CREATE TABLE child ( +id INT PRIMARY KEY AUTO_INCREMENT, +parent_id INT +) ENGINE=InnoDB; +INSERT INTO parent VALUES (1); +INSERT INTO child (parent_id) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4; +ALTER TABLE child ADD FOREIGN KEY (parent_id) REFERENCES parent(id) ON UPDATE CASCADE;; +UPDATE parent SET id = 2 WHERE id = 1;; +SELECT COUNT(*) = 10000 FROM child WHERE parent_id = 2; +COUNT(*) = 10000 +1 +SELECT COUNT(*) = 10000 FROM child WHERE parent_id = 2; +COUNT(*) = 10000 +1 +DROP TABLE child; +DROP TABLE parent; +DROP TABLE ten; diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_toi_ddl_online.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_toi_ddl_online.result new file mode 100644 index 00000000..488b72ab --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_toi_ddl_online.result @@ -0,0 +1,27 @@ +CREATE TABLE ten (f1 INTEGER); +INSERT INTO ten VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 INTEGER) ENGINE=InnoDB; +INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5; +INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;; +CREATE INDEX i1 ON t1 (f2);; +ALTER TABLE t1 ADD COLUMN f3 INTEGER;; +SELECT COUNT(*) = 200000 FROM t1; +COUNT(*) = 200000 +1 +SELECT COUNT(*) = 3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; +COUNT(*) = 3 +1 +SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.STATISTICS WHERE TABLE_NAME = 't1'; +COUNT(*) = 2 +1 +SELECT COUNT(*) = 200000 FROM t1; +COUNT(*) = 200000 +1 +SELECT COUNT(*) = 3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; +COUNT(*) = 3 +1 +SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.STATISTICS WHERE TABLE_NAME = 't1'; +COUNT(*) = 2 +1 +DROP TABLE t1; +DROP TABLE ten; diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_toi_drop_database.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_toi_drop_database.result new file mode 100644 index 00000000..d4f98c38 --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_toi_drop_database.result @@ -0,0 +1,22 @@ +CREATE DATABASE database1; +USE database1; +CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); +CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; +CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO t1 (f1) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;; +USE database1; +INSERT INTO t2 (f1) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;; +DROP DATABASE database1;; +ERROR 42S02: Table 'database1.t1' doesn't exist +ERROR 42S02: Table 'database1.t2' doesn't exist +SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = 'database1'; +COUNT(*) = 0 +1 +USE database1; +ERROR 42000: Unknown database 'database1' +SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = 'database1'; +COUNT(*) = 0 +1 +USE database1; +ERROR 42000: Unknown database 'database1' diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_toi_truncate.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_toi_truncate.result new file mode 100644 index 00000000..98bc9f48 --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_toi_truncate.result @@ -0,0 +1,17 @@ +CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); +CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO t1 (f1) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5, ten AS a6;; +TRUNCATE TABLE t1;; +SELECT COUNT(*) = 1000000 FROM t1; +COUNT(*) = 1000000 +1 +DROP TABLE t1; +CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO t1 (f1) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5, ten AS a6;; +TRUNCATE TABLE t1;; +SELECT COUNT(*) = 1000000 FROM t1; +COUNT(*) = 1000000 +1 +DROP TABLE t1; +DROP TABLE ten; diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_var_max_ws_rows.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_var_max_ws_rows.result new file mode 100644 index 00000000..6e239c70 --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_var_max_ws_rows.result @@ -0,0 +1,115 @@ +CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); +CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 INTEGER) ENGINE=InnoDB; +SET GLOBAL wsrep_max_ws_rows = 4; +START TRANSACTION; +INSERT INTO t1 (f2) VALUES (1); +INSERT INTO t1 (f2) VALUES (2); +INSERT INTO t1 (f2) VALUES (3); +INSERT INTO t1 (f2) VALUES (4); +INSERT INTO t1 (f2) VALUES (5); +ERROR HY000: wsrep_max_ws_rows exceeded +COMMIT; +SELECT COUNT(*) = 0 FROM t1; +COUNT(*) = 0 +1 +START TRANSACTION; +INSERT INTO t1 (f2) VALUES (1); +INSERT INTO t1 (f2) VALUES (2); +INSERT INTO t1 (f2) VALUES (3); +INSERT INTO t1 (f2) VALUES (4); +UPDATE t1 SET f2 = 10 WHERE f2 = 4; +ERROR HY000: wsrep_max_ws_rows exceeded +COMMIT; +SELECT COUNT(*) = 0 FROM t1; +COUNT(*) = 0 +1 +START TRANSACTION; +INSERT INTO t1 (f2) VALUES (1); +INSERT INTO t1 (f2) VALUES (2); +INSERT INTO t1 (f2) VALUES (3); +INSERT INTO t1 (f2) VALUES (4); +DELETE FROM t1 WHERE f2 = 1; +ERROR HY000: wsrep_max_ws_rows exceeded +COMMIT; +SELECT COUNT(*) = 0 FROM t1; +COUNT(*) = 0 +1 +SET GLOBAL wsrep_max_ws_rows = 5; +INSERT INTO t1 (f2) VALUES (1),(2),(3),(4),(5); +SET GLOBAL wsrep_max_ws_rows = 4; +UPDATE t1 SET f2 = f2 + 10; +ERROR HY000: wsrep_max_ws_rows exceeded +SELECT COUNT(*) = 5 FROM t1; +COUNT(*) = 5 +1 +DELETE FROM t1 WHERE f2 < 10; +ERROR HY000: wsrep_max_ws_rows exceeded +SELECT COUNT(*) = 5 FROM t1; +COUNT(*) = 5 +1 +INSERT INTO t1 (f2) SELECT * FROM ten; +ERROR HY000: wsrep_max_ws_rows exceeded +SELECT COUNT(*) = 5 FROM t1; +COUNT(*) = 5 +1 +INSERT INTO t1 (f2) VALUES (10),(20),(30),(40),(50); +ERROR HY000: wsrep_max_ws_rows exceeded +SELECT COUNT(*) = 5 FROM t1; +COUNT(*) = 5 +1 +SET GLOBAL wsrep_max_ws_rows = 10; +DELETE FROM t1 WHERE f2 < 10; +SELECT COUNT(*) = 0 FROM t1; +COUNT(*) = 0 +1 +SET GLOBAL wsrep_max_ws_rows = 100; +SELECT COUNT(*) = 100 FROM t1; +COUNT(*) = 100 +1 +DELETE FROM t1 WHERE f2 < 101; +SELECT COUNT(*) = 0 FROM t1; +COUNT(*) = 0 +1 +SET GLOBAL wsrep_max_ws_rows = 9999; +INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4; +ERROR HY000: wsrep_max_ws_rows exceeded +SET GLOBAL wsrep_max_ws_rows = 10000; +INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4; +SET GLOBAL wsrep_max_ws_rows = 9999; +UPDATE t1 SET f2 = 2 WHERE f2 = 1; +ERROR HY000: wsrep_max_ws_rows exceeded +SET GLOBAL wsrep_max_ws_rows = 10000; +UPDATE t1 SET f2 = 2 WHERE f2 = 1; +SET GLOBAL wsrep_max_ws_rows = 9999; +DELETE FROM t1 WHERE f2 = 2; +ERROR HY000: wsrep_max_ws_rows exceeded +SET GLOBAL wsrep_max_ws_rows = 10000; +DELETE FROM t1 WHERE f2 = 2; +SELECT COUNT(*) = 0 FROM t1; +COUNT(*) = 0 +1 +SET AUTOCOMMIT = ON; +SET GLOBAL wsrep_max_ws_rows = 1; +START TRANSACTION; +INSERT INTO t1 (f2) VALUES (1); +INSERT INTO t1 (f2) VALUES (2); +ERROR HY000: wsrep_max_ws_rows exceeded +INSERT INTO t1 (f2) VALUES (1); +INSERT INTO t1 (f2) VALUES (2); +SET AUTOCOMMIT = OFF; +START TRANSACTION; +INSERT INTO t1 (f2) VALUES (1); +INSERT INTO t1 (f2) VALUES (2); +ERROR HY000: wsrep_max_ws_rows exceeded +INSERT INTO t1 (f2) VALUES (1); +INSERT INTO t1 (f2) VALUES (2); +ERROR HY000: wsrep_max_ws_rows exceeded +START TRANSACTION; +INSERT INTO t1 (f2) VALUES (1); +START TRANSACTION; +INSERT INTO t1 (f2) VALUES (1); +INSERT INTO t1 (f2) VALUES (2); +ERROR HY000: wsrep_max_ws_rows exceeded +DROP TABLE t1; +DROP TABLE ten; diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_var_max_ws_size.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_var_max_ws_size.result index 6db5c246..03c60f2f 100644 --- a/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_var_max_ws_size.result +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_var_max_ws_size.result @@ -9,4 +9,13 @@ ERROR HY000: Got error 5 during COMMIT SELECT COUNT(*) = 0 FROM t1; COUNT(*) = 0 1 +SET GLOBAL wsrep_provider_options = 'repl.max_ws_size=10000'; +SELECT @@wsrep_max_ws_size = 10000; +@@wsrep_max_ws_size = 10000 +1 +SET GLOBAL wsrep_provider_options = 'repl.max_ws_size=20000'; +SET GLOBAL wsrep_provider_options = 'repl.max_ws_size=10000'; +SET GLOBAL wsrep_max_ws_size = 20000; +provider_options_match +1 DROP TABLE t1; diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_wsrep_provider_options_syntax.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_wsrep_provider_options_syntax.result new file mode 100644 index 00000000..f19dc402 --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_wsrep_provider_options_syntax.result @@ -0,0 +1,5 @@ +call mtr.add_suppression("WSREP\: Unknown parameter 'gmcasts\.segment'"); +call mtr.add_suppression("WSREP\: Set options returned 7"); +SET GLOBAL wsrep_provider_options="gmcasts.segment=1"; +ERROR HY000: Incorrect arguments to SET +Unhandled exceptions: 0 diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/lp1376747-2.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/lp1376747-2.result new file mode 100644 index 00000000..3b8aee61 --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/r/lp1376747-2.result @@ -0,0 +1,19 @@ +CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); +FLUSH TABLES t1 FOR EXPORT; +ALTER TABLE t1 ADD COLUMN f2 INTEGER; +INSERT INTO t1 VALUES (2,3); +UNLOCK TABLES; +### t1 should have column f2 +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` int(11) NOT NULL, + `f2` int(11) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SELECT * from t1; +id f2 +1 NULL +2 3 +DROP TABLE t1; diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/lp1376747-3.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/lp1376747-3.result new file mode 100644 index 00000000..fc982c94 --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/r/lp1376747-3.result @@ -0,0 +1,21 @@ +CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); +FLUSH TABLE WITH READ LOCK; +### This shouldn't block. +FLUSH TABLES t1 FOR EXPORT; +ALTER TABLE t1 ADD COLUMN f2 INTEGER; +UNLOCK TABLES; +### t1 should have column f2 +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` int(11) NOT NULL, + `f2` int(11) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES (2,3); +SELECT * from t1; +id f2 +1 NULL +2 3 +DROP TABLE t1; diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/lp1376747-4.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/lp1376747-4.result new file mode 100644 index 00000000..b0ae2b7f --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/r/lp1376747-4.result @@ -0,0 +1,36 @@ +CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); +SET session wsrep_sync_wait=0; +SET session wsrep_causal_reads=OFF; +FLUSH TABLE WITH READ LOCK; +ALTER TABLE t1 ADD COLUMN f2 INTEGER; +INSERT INTO t1 VALUES (2,3); +SET session wsrep_sync_wait=0; +SET session wsrep_causal_reads=OFF; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` int(11) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +FLUSH TABLES t1 WITH READ LOCK;; +UNLOCK TABLES; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` int(11) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +UNLOCK TABLES; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` int(11) NOT NULL, + `f2` int(11) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SELECT * from t1; +id f2 +1 NULL +2 3 +DROP TABLE t1; diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/lp1376747.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/lp1376747.result new file mode 100644 index 00000000..4617d595 --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/r/lp1376747.result @@ -0,0 +1,19 @@ +CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); +FLUSH TABLES t1 WITH READ LOCK; +ALTER TABLE t1 ADD COLUMN f2 INTEGER; +INSERT INTO t1 VALUES (2,3); +UNLOCK TABLES; +### t1 should have column f2 +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` int(11) NOT NULL, + `f2` int(11) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SELECT * from t1; +id f2 +1 NULL +2 3 +DROP TABLE t1; diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/pxc-421.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/pxc-421.result new file mode 100644 index 00000000..1822201f --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/r/pxc-421.result @@ -0,0 +1,35 @@ +set GLOBAL wsrep_slave_threads=26; +CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); +INSERT INTO t1 (f1) SELECT * from t1 as x1; +set GLOBAL wsrep_slave_threads=16; +SET GLOBAL wsrep_provider='none'; +INSERT INTO t1 VALUES (2); +INSERT INTO t1 VALUES (3); +INSERT INTO t1 VALUES (4); +set GLOBAL wsrep_slave_threads=5; +SELECT COUNT(*) = 5 FROM t1; +COUNT(*) = 5 +1 +set GLOBAL wsrep_slave_threads=12; +SELECT COUNT(*) = 4 FROM t1; +COUNT(*) = 4 +1 +INSERT INTO t1 VALUES (100), (101), (102); +set GLOBAL wsrep_slave_threads=5; +INSERT INTO t1 (f1) SELECT * from t1 as x1; +show global variables like 'wsrep_slave_threads'; +Variable_name Value +wsrep_slave_threads 5 +SET GLOBAL wsrep_slave_threads = 1; +SELECT COUNT(*) FROM t1; +COUNT(*) +16 +SELECT COUNT(*) FROM t1; +COUNT(*) +15 +show global variables like 'wsrep_slave_threads'; +Variable_name Value +wsrep_slave_threads 12 +SET GLOBAL wsrep_slave_threads = 1; +DROP TABLE t1; diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/GAL-401.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/GAL-401.test new file mode 100644 index 00000000..b7ee36fb --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/t/GAL-401.test @@ -0,0 +1,49 @@ +# This tests proper desync counter cleanup when DONOR/DESYNC state is cleared. + +--source include/galera_cluster.inc +--source include/have_innodb.inc + +# Make node 1 tolerate split-brain +SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=true'; + +# Desync and disconnect node 2 from the PC: +--connection node_2 +SET @@global.wsrep_desync = 1; +SET SESSION wsrep_sync_wait=0; +SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1'; +--let $wait_condition = SELECT VARIABLE_VALUE = 'non-Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status'; +--source include/wait_condition.inc + +# Wait until node 2 disappears from the PC: +--connection node_1 +--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; +--source include/wait_condition.inc +--let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status'; +--source include/wait_condition.inc + +# Modify app state to force node 2 into PRIMARY upon reconnection. +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1)); + +# Reconnect node 2 to the PC: +--connection node_2 +SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0'; +--let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status'; +--source include/wait_condition.inc +--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; +--source include/wait_condition.inc + +# Must return 0: +SHOW STATUS LIKE 'wsrep_desync_count'; + +# Resync node_2, should pass: +SET @@global.wsrep_desync = 0; + +SET SESSION wsrep_sync_wait=7; +SHOW CREATE TABLE t1; +DROP TABLE t1; +CALL mtr.add_suppression("WSREP: Protocol violation. JOIN message sender (.*) is not in state transfer \\(SYNCED\\). Message ignored."); + +--connection node_1 +--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; +--source include/wait_condition.inc +SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=false'; diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-284.cnf b/mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-284.cnf new file mode 100644 index 00000000..52fd3093 --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-284.cnf @@ -0,0 +1 @@ +!include ../galera_2nodes_as_master.cnf diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-284.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-284.test new file mode 100644 index 00000000..ad02227f --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-284.test @@ -0,0 +1,57 @@ +# +# MW-284 Slave I/O retry on ER_COM_UNKNOWN_ERROR +# + +--source include/have_log_bin.inc +--source include/galera_cluster.inc + +--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3 +--disable_query_log +--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$NODE_MYPORT_1, MASTER_CONNECT_RETRY=1; +--enable_query_log + +--connection node_1 +CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; +SET GLOBAL wsrep_provider_options='gmcast.isolate=1'; +SET SESSION wsrep_on = OFF; +--let $wait_condition = SELECT VARIABLE_VALUE = 'non-Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status' +--source include/wait_condition.inc +SET SESSION wsrep_on = ON; + +--connection node_3 +START SLAVE USER='root'; +--sleep 1 +--let $slave_param= Slave_IO_Running +--let $slave_param_value= Connecting +--source include/wait_for_slave_param.inc + +--connection node_1 +SET GLOBAL wsrep_provider_options='gmcast.isolate=0'; + +# We expect the slave to reconnect and resume replication + +--connection node_3 +--source include/wait_for_slave_to_start.inc + +--connection node_1 +INSERT INTO t1 VALUES (1); + +--connection node_3 +--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1' +--source include/wait_condition.inc +--let $wait_condition = SELECT COUNT(*) > 0 FROM t1 +--source include/wait_condition.inc + +# Cleanup + +--connection node_1 +DROP TABLE t1; + +--connection node_3 +--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1' +--source include/wait_condition.inc + +STOP SLAVE; +RESET SLAVE ALL; + +CALL mtr.add_suppression('failed registering on master'); diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-285.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-285.test new file mode 100644 index 00000000..1c567f7b --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-285.test @@ -0,0 +1,31 @@ +# +# Broken FK constraints cause assertions +# + +--source include/galera_cluster.inc +--source include/have_innodb.inc + +CREATE TABLE parent1 ( id INT PRIMARY KEY, KEY (id) ) ENGINE=InnoDB; +CREATE TABLE parent2 ( id INT PRIMARY KEY, KEY (id) ) ENGINE=InnoDB; + +CREATE TABLE child ( + id INT PRIMARY KEY, + parent1_id INT, + parent2_id INT, + FOREIGN KEY (parent1_id) REFERENCES parent1(id), + FOREIGN KEY (parent1_id) REFERENCES parent2(id) +) ENGINE=InnoDB; + +INSERT INTO parent1 VALUES (1); +INSERT INTO parent2 VALUES (1); +INSERT INTO child VALUES (1,1,1); +INSERT INTO child VALUES (2,1,1); + +SET foreign_key_checks=OFF; +DROP TABLE parent1; + +UPDATE child SET parent1_id=2 WHERE id=1; + +DROP TABLE child; +DROP TABLE parent2; +SET foreign_key_checks=ON; diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-286.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-286.test new file mode 100644 index 00000000..1b2e322f --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-286.test @@ -0,0 +1,32 @@ +# +# MW-286 Spurious deadlock error after error with wsrep_desync and wsrep_on +# + +--source include/galera_cluster.inc +--source include/have_innodb.inc +--source include/big_test.inc + +--connection node_1 +CREATE TABLE ten (f1 INTEGER); +INSERT INTO ten VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); + +CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB; + +# Insert some values before the ALTER +INSERT INTO t1 (f1) SELECT 000000 + (10000 * a1.f1) + (1000 * a2.f1) + (100 * a3.f1) + (10 * a4.f1) + a5.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5; + +# Insert more values while the ALTER is running +--send INSERT INTO t1 (f1) SELECT 100000 + (10000 * a1.f1) + (1000 * a2.f1) + (100 * a3.f1) + (10 * a4.f1) + a5.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5; + +--connection node_2 +SET GLOBAL wsrep_desync = TRUE; +SET wsrep_on = FALSE; + +--error ER_QUERY_INTERRUPTED +ALTER TABLE t1 ADD PRIMARY KEY (f1); + +SET wsrep_on = TRUE; +SET GLOBAL wsrep_desync = FALSE; + +DROP TABLE t1; +DROP TABLE ten; diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-292.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-292.test new file mode 100644 index 00000000..945d9f42 --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-292.test @@ -0,0 +1,79 @@ +# +# MW-292 Reset timestamp after transaction replay +# +# We force transaction replay to happen and then we check that NOW() is not stuck in time. +# As a bonus we also check that RAND() continues to return random values after replay +# +# + +--source include/galera_cluster.inc +--source include/have_innodb.inc +--source include/have_debug_sync.inc +--source suite/galera/include/galera_have_debug_sync.inc + +--let $wsrep_local_replays_old = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'` + +CREATE TABLE rand_table (f1 FLOAT); +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1)); +INSERT INTO t1 VALUES (1, 'a'); +INSERT INTO t1 VALUES (2, 'a'); + +--connection node_1 +SET AUTOCOMMIT=ON; +START TRANSACTION; + +UPDATE t1 SET f2 = 'b' WHERE f1 = 1; +SELECT * FROM t1 WHERE f1 = 2 FOR UPDATE; + +# Block the commit +--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1 +--let $galera_sync_point = commit_monitor_enter_sync +--source include/galera_set_sync_point.inc + +--connection node_1 +--send COMMIT; + +# Wait until commit is blocked +--connection node_1a +SET SESSION wsrep_sync_wait = 0; +--source include/galera_wait_sync_point.inc + +# Issue a conflicting update on node #2 +--connection node_2 +UPDATE t1 SET f2 = 'c' WHERE f1 = 2; + +# Wait for both transactions to be blocked +--connection node_1a +--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'System lock'; +--source include/wait_condition.inc + +--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'init' AND INFO = 'COMMIT'; +--source include/wait_condition.inc + +# Unblock the commit +--connection node_1a +--source include/galera_clear_sync_point.inc +--source include/galera_signal_sync_point.inc + +# Commit succeeds via replay +--connection node_1 +--reap + +# Confirm that NOW() is not stuck in time relative to SYSDATE(); +--sleep 3 +SELECT TIMEDIFF(SYSDATE(), NOW()) < 2; + +INSERT INTO rand_table VALUES (RAND()),(RAND()),(RAND()),(RAND()),(RAND()); +INSERT INTO rand_table VALUES (RAND()),(RAND()),(RAND()),(RAND()),(RAND()); + +SELECT COUNT(DISTINCT f1) = 10 FROM rand_table; + +# wsrep_local_replays has increased by 1 +--let $wsrep_local_replays_new = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'` +--disable_query_log +--eval SELECT $wsrep_local_replays_new - $wsrep_local_replays_old = 1 AS wsrep_local_replays; +--enable_query_log + +--connection node_2 +DROP TABLE t1; +DROP TABLE rand_table; diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/ev51914.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/ev51914.test new file mode 100644 index 00000000..e5edacab --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/t/ev51914.test @@ -0,0 +1,214 @@ +# Disable SAVEPOINT and ROLLBACK TO SAVEPOINT in SP, SF, TR. + +--source include/galera_cluster.inc +--source include/have_innodb.inc + + +--connection node_1 +--echo SAVEPOINT in a stored function should be forbidden +--delimiter | +CREATE FUNCTION f1 () RETURNS INT BEGIN + SAVEPOINT s; + RETURN 1; +END| +--delimiter ; + +SELECT f1(); + +DROP FUNCTION f1; + +--echo ROLLBACK TO SAVEPOINT in a stored function should be forbidden +--delimiter | +CREATE FUNCTION f2 () RETURNS INT BEGIN + ROLLBACK TO SAVEPOINT s; + RETURN 1; +END| +--delimiter ; + +BEGIN; +SAVEPOINT s; +--error ER_SP_DOES_NOT_EXIST +SELECT f2(); +COMMIT; + +DROP FUNCTION f2; + +BEGIN; +SAVEPOINT S; +ROLLBACK TO SAVEPOINT S; +COMMIT; + + +CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB; +CREATE TABLE t2 (a INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB; +INSERT INTO t1 values (110), (111), (112), (113), (114); + +--echo Direct SAVEPOINT in a trigger should be forbidden +--connection node_2 +CREATE TRIGGER i1_t1 BEFORE INSERT ON t1 FOR EACH ROW SAVEPOINT s; + +--connection node_1 +INSERT INTO t1 VALUES (1); +DROP TRIGGER i1_t1; + +CREATE TRIGGER i2_t1 AFTER INSERT ON t1 FOR EACH ROW SAVEPOINT s; +INSERT INTO t1 VALUES (2); +DROP TRIGGER i2_t1; + +INSERT INTO t1 VALUES (3); +CREATE TRIGGER u1_t1 BEFORE UPDATE ON t1 FOR EACH ROW SAVEPOINT s; +UPDATE t1 SET a=4 WHERE a=3; +DROP TRIGGER u1_t1; + +CREATE TRIGGER u2_t1 AFTER UPDATE ON t1 FOR EACH ROW SAVEPOINT s; +UPDATE t1 SET a=4 WHERE a=3; +DROP TRIGGER u2_t1; + +CREATE TRIGGER d1_t1 BEFORE DELETE ON t1 FOR EACH ROW SAVEPOINT s; +DELETE FROM t1; +DROP TRIGGER d1_t1; + +CREATE TRIGGER d1_t1 AFTER DELETE ON t1 FOR EACH ROW SAVEPOINT s; +DELETE FROM t1; +DROP TRIGGER d1_t1; + +--echo SAVEPOINT in a compound statement in a trigger should be forbidden +--delimiter | +CREATE TRIGGER i3_t1 BEFORE INSERT ON t1 FOR EACH ROW BEGIN + SAVEPOINT s; +END| +--delimiter ; +INSERT INTO t1 VALUES (5); +DROP TRIGGER i3_t1; + +--echo SAVEPOINT in a PS call in a trigger should be forbidden +# echo handled by SAVEPOINT forbidden in PS +--delimiter | +--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG +CREATE TRIGGER i4_t1 BEFORE INSERT ON t1 FOR EACH ROW BEGIN + PREPARE set_savepoint FROM "SAVEPOINT s"; + EXECUTE set_savepoint; + DEALLOCATE PREPARE set_savepoint; +END| +--delimiter ; + +--connection node_2 +--echo SAVEPOINT in SP called from a trigger should be forbidden +--delimiter | +CREATE PROCEDURE p1() BEGIN + SAVEPOINT s; +END| +--delimiter ; +--connection node_1 +CREATE TRIGGER i5_t1 BEFORE INSERT ON t1 FOR EACH ROW CALL p1; +INSERT INTO t1 VALUES (6); +DROP TRIGGER i5_t1; + +--echo SAVEPOINT in a SP called from a PS called from a trigger be forbidden +# echo handled by SAVEPOINT forbidden in PS +PREPARE call_p1 FROM "CALL p1"; +--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG +CREATE TRIGGER i6_t1 BEFORE INSERT ON t1 FOR EACH ROW EXECUTE call_p1; + +--echo SAVEPOINT in a function called from a trigger should be forbidden +--delimiter | +CREATE FUNCTION f1 () RETURNS INT BEGIN + SAVEPOINT s; + RETURN 1; +END| +--delimiter ; +CREATE TRIGGER i7_t1 BEFORE INSERT ON t1 FOR EACH ROW SET @foo = f1(); +INSERT INTO t1 VALUES (7); +DROP TRIGGER i7_t1; + +--echo SAVEPOINT in a SP called from a SP called from a trigger should be forbidden +--delimiter | +CREATE PROCEDURE p2() BEGIN + CALL p1(); +END| +--delimiter ; +CREATE TRIGGER i8_t1 BEFORE INSERT ON t1 FOR EACH ROW CALL p2; +INSERT INTO t1 VALUES (8); +DROP TRIGGER i8_t1; + +--echo SAVEPOINT in a SP called from a trigger called from a SP should be forbidden +CREATE TRIGGER i9_t1 BEFORE INSERT ON t1 FOR EACH ROW CALL p1; +--delimiter | +CREATE PROCEDURE p3() BEGIN + INSERT INTO t1 VALUES (9); +END| +--delimiter ; +CALL p3(); +DROP TRIGGER i9_t1; + +--echo ROLLBACK TO SAVEPOINT in trigger as a trivial statement should be forbidden +# Trigger activation creates a new savepoint level, making the earlier levels +# inaccessible. Thus forbidding SAVEPOINT should be enough as then there is +# no valid savepoint to pass to ROLLBACK TO SAVEPOINT, but we forbid it once +# more just in case. +CREATE TRIGGER i4_t1 BEFORE INSERT ON t1 FOR EACH ROW ROLLBACK TO SAVEPOINT s; +BEGIN; +SAVEPOINT s; +--error ER_SP_DOES_NOT_EXIST +INSERT INTO t1 VALUES (5); +COMMIT; +DROP TRIGGER i4_t1; + +--echo ROLLBACK TO SAVEPOINT in a trigger in a SP call should be forbidden +--delimiter | +CREATE PROCEDURE p4() BEGIN + ROLLBACK TO SAVEPOINT s; +END| +--delimiter ; +CREATE TRIGGER i5_t1 BEFORE INSERT ON t1 FOR EACH ROW CALL p4; +BEGIN; +SAVEPOINT s; +--error ER_SP_DOES_NOT_EXIST +INSERT INTO t1 VALUES (6); +COMMIT; +DROP TRIGGER i5_t1; + +--echo SAVEPOINT in a SP next to a trigger should work +CREATE TRIGGER i6_t1 BEFORE INSERT ON t1 FOR EACH ROW SET NEW.a = NEW.a + 1; +--delimiter | +CREATE PROCEDURE p5() BEGIN + SAVEPOINT s; + INSERT INTO t1 VALUES (10); + ROLLBACK TO SAVEPOINT s; +END| +--delimiter ; +BEGIN; +CALL p5(); +COMMIT; +DROP TRIGGER i6_t1; + +--connection node_2 +delimiter |; +create trigger t1 before insert on t1 for each row +begin + insert into t2 values (NULL); +end| +delimiter ;| + +--connection node_1 +INSERT INTO t1 VALUES (201), (202), (203); + +--connection node_1 +SELECT * FROM t1; +SELECT COUNT(*) FROM t2; + +--connection node_2 +SELECT * FROM t1; +SELECT COUNT(*) FROM t2; + +--connection node_1 +DEALLOCATE PREPARE call_p1; + +--connection node_2 +DROP TABLE t1, t2; +DROP PROCEDURE p1; +DROP PROCEDURE p2; +DROP PROCEDURE p3; +DROP PROCEDURE p4; +DROP PROCEDURE p5; +DROP FUNCTION f1; diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera#414.cnf b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera#414.cnf new file mode 100644 index 00000000..fbd1c587 --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera#414.cnf @@ -0,0 +1,8 @@ +!include ../galera_2nodes.cnf + +[mysqld.1] +wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcs.max_packet_size=2' + +[mysqld.2] +wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcs.max_packet_size=2' + diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera#414.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera#414.test new file mode 100644 index 00000000..b426e651 --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera#414.test @@ -0,0 +1,32 @@ +# +# codership/galera#414 Shutdown crashes node if the node started with `gcs.max_packet_size=2` +# + +--source include/big_test.inc +--source include/galera_cluster.inc + +# We perform the shutdown/restart sequence in here. If there was a crash during shutdown, MTR will detect it + +--connection node_2 +--source include/shutdown_mysqld.inc + +--connection node_1 +SET SESSION wsrep_sync_wait = 0; +SET SESSION wsrep_on = OFF; +--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; +--source include/wait_condition.inc + +--connection node_2 +--source include/start_mysqld.inc + +--connection node_1 +SET SESSION wsrep_on = ON; +--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; +--source include/wait_condition.inc + +--connection node_1 +CALL mtr.add_suppression("Failed to set packet size"); + +--connection node_2 +CALL mtr.add_suppression("Failed to set packet size"); + diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_admin.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_admin.test new file mode 100644 index 00000000..d62c454b --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_admin.test @@ -0,0 +1,86 @@ +# +# Test that various admin commands from sql_admin.cc +# Currently, REPAIR, OPTIMIZE and ANALYZE are tested. +# Jira: PXC-390 +# + +--source include/galera_cluster.inc +--source include/have_innodb.inc + +--disable_warnings +DROP TABLE IF EXISTS t1, t2; +DROP TABLE IF EXISTS x1, x2; +--enable_warnings + +--connection node_1 +CREATE TABLE t1 (f1 INTEGER); +CREATE TABLE t2 (f1 INT PRIMARY KEY AUTO_INCREMENT, f2 INTEGER); +SET GLOBAL wsrep_replicate_myisam = TRUE; +CREATE TABLE x1 (f1 INTEGER) ENGINE=MyISAM; +CREATE TABLE x2 (f1 INT PRIMARY KEY AUTO_INCREMENT, f2 INTEGER) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10); +INSERT INTO x1 VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10); +INSERT INTO t2 (f2) SELECT 1 FROM t1 AS a1, t1 AS a2, t1 AS a3, t1 AS a4; +INSERT INTO x2 (f2) VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10); + +# Wait until all the data from t2 has been replicated +--connection node_2 +--let $wait_condition = SELECT COUNT(*) = 10 FROM x1; +--source include/wait_condition.inc +--let $wait_condition = SELECT COUNT(*) = 10 FROM x2; +--source include/wait_condition.inc +--let $wait_condition = SELECT COUNT(*) = 10 FROM t1; +--source include/wait_condition.inc +--let $wait_condition = SELECT COUNT(*) = 10000 FROM t2; +--source include/wait_condition.inc + + +--echo # ANALYZE test +--connection node_2 +--let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'` + +--connection node_1 +ANALYZE TABLE t1, t2; + +--connection node_2 +--let $wait_condition = SELECT VARIABLE_VALUE = $wsrep_last_committed_before + 1 FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed' +--source include/wait_condition.inc + + + +--echo # OPTIMIZE test +--connection node_2 +--let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'` + +--connection node_1 +OPTIMIZE TABLE t1, t2; + +--connection node_2 +--let $wait_condition = SELECT VARIABLE_VALUE = $wsrep_last_committed_before + 1 FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed' +--source include/wait_condition.inc + + + +--echo # REPAIR test +--connection node_2 +--let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'` + +--connection node_1 +REPAIR TABLE x1, x2; + +--connection node_2 +--let $wait_condition = SELECT VARIABLE_VALUE = $wsrep_last_committed_before + 1 FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed' +--source include/wait_condition.inc + + + +--connection node_2 +SELECT COUNT(*) = 10 FROM t1; +SELECT COUNT(*) = 10 FROM x1; +SELECT COUNT(*) = 10000 FROM t2; +SELECT COUNT(*) = 10 FROM x2; + +--connection node_1 +DROP TABLE t1, t2; +DROP TABLE x1, x2; +SET GLOBAL wsrep_replicate_myisam = FALSE; diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_bf_abort_flush_for_export.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_bf_abort_flush_for_export.test index e98a7685..86de404d 100644 --- a/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_bf_abort_flush_for_export.test +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_bf_abort_flush_for_export.test @@ -27,6 +27,7 @@ UNLOCK TABLES; COMMIT; SET AUTOCOMMIT=ON; +SET SESSION wsrep_sync_wait = 7; SELECT COUNT(*) = 1 FROM t1; --let $wsrep_local_bf_aborts_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_bf_aborts'` diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_desync_overlapped.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_desync_overlapped.test new file mode 100644 index 00000000..8b78e8cd --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_desync_overlapped.test @@ -0,0 +1,59 @@ +# +# Test for overlapped transactions under manual desync. +# +--source include/galera_cluster.inc +--source include/have_innodb.inc +--source include/have_debug_sync.inc + +--let $galera_connection_name = node_1a +--let $galera_server_number = 1 +--source include/galera_connect.inc + +--connection node_1 + +CREATE TABLE ten (f1 INTEGER); +INSERT INTO ten VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); + +CREATE TABLE t1 (f1 INTEGER, PRIMARY KEY (f1)) Engine=InnoDB; +CREATE TABLE t2 (f1 INTEGER, PRIMARY KEY (f1)) Engine=InnoDB; + +SET GLOBAL wsrep_desync = 1; +show status like 'wsrep_desync_count'; +SET DEBUG_SYNC='before_execute_sql_command SIGNAL alter1 WAIT_FOR alter2'; +send INSERT INTO t1 (f1) SELECT 0000 + (100 * a1.f1) + (10 * a2.f1) + a3.f1 FROM ten AS a1, ten AS a2, ten AS a3; + +--connection node_1a + +SET GLOBAL wsrep_desync = 1; +show status like 'wsrep_desync_count'; +SET DEBUG_SYNC='now WAIT_FOR alter1'; +SET DEBUG_SYNC='before_execute_sql_command SIGNAL alter2'; +send INSERT INTO t2 (f1) SELECT 0000 + (100 * a1.f1) + (10 * a2.f1) + a3.f1 FROM ten AS a1, ten AS a2, ten AS a3; + +--connection node_1 +reap; + +--connection node_1a +reap; + +--connection node_1 + +SET DEBUG_SYNC='RESET'; + +SET GLOBAL wsrep_desync = 0; +show status like 'wsrep_desync_count'; +SET GLOBAL wsrep_desync = 0; +show status like 'wsrep_desync_count'; + +--disable_query_log +call mtr.add_suppression("Trying to make wsrep_desync = OFF on the node that is already synchronized."); +--enable_query_log +show status like 'wsrep_desync_count'; +SET GLOBAL wsrep_desync = 0; + +SELECT COUNT(*) FROM t1; +SELECT COUNT(*) FROM t2; + +DROP TABLE t1; +DROP TABLE t2; +DROP TABLE ten; diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_flush_local.opt b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_flush_local.opt index 698bbefe..5a1fb674 100644 --- a/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_flush_local.opt +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_flush_local.opt @@ -1 +1 @@ ---query_cache_type=1 --query_cache_size=1000000 --innodb_track_changed_pages=1 --userstat=1 --thread_statistics=1 +--query_cache_type=1 --query_cache_size=1000000 diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_kill_ddl.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_kill_ddl.test index 3c2bce5b..90f3f30c 100644 --- a/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_kill_ddl.test +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_kill_ddl.test @@ -28,8 +28,13 @@ ALTER TABLE t1 ADD COLUMN f2 INTEGER; --source include/galera_connect.inc --connection node_2a +--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; +--source include/wait_condition.inc + +--let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status'; +--source include/wait_condition.inc + SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='t1'; -SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; --connection node_1 --disable_query_log diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_parallel_simple.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_parallel_simple.test index b1dc14de..e078a342 100644 --- a/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_parallel_simple.test +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_parallel_simple.test @@ -13,6 +13,7 @@ CREATE TABLE t2 (id INT) ENGINE=InnoDB; --connection node_2 SET GLOBAL wsrep_slave_threads = 2; +LOCK TABLE t1 WRITE; --connection node_1 INSERT INTO t1 VALUES (1); @@ -34,10 +35,20 @@ INSERT INTO t1 VALUES (1); INSERT INTO t2 VALUES (1); --connection node_2 +SET SESSION wsrep_sync_wait = 0; + +--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'Waiting for table metadata lock%'; +--source include/wait_condition.inc + +--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'applied write set%'; +--source include/wait_condition.inc + +UNLOCK TABLES; + +SET SESSION wsrep_sync_wait = 7; SELECT COUNT(*) = 10 FROM t1; SELECT COUNT(*) = 10 FROM t2; -SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'committed%'; --eval SET GLOBAL wsrep_slave_threads = $wsrep_slave_threads_orig; diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_repl_max_ws_size.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_repl_max_ws_size.test index 255e292f..60b866ae 100644 --- a/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_repl_max_ws_size.test +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_repl_max_ws_size.test @@ -23,5 +23,7 @@ SELECT COUNT(*) = 0 FROM t1; DROP TABLE t1; -CALL mtr.add_suppression("WSREP: Maximum writeset size exceeded by"); -CALL mtr.add_suppression("WSREP: transaction size exceeded"); +CALL mtr.add_suppression("Maximum writeset size exceeded by"); +CALL mtr.add_suppression("transaction size limit"); +CALL mtr.add_suppression("transaction size exceeded"); +CALL mtr.add_suppression("rbr write fail"); diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_restart_nochanges.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_restart_nochanges.test index 3772c23d..08b30884 100644 --- a/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_restart_nochanges.test +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_restart_nochanges.test @@ -12,6 +12,10 @@ INSERT INTO t1 VALUES (1); --connection node_2 --source include/restart_mysqld.inc +--connection node_1 +--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; +--source include/wait_condition.inc + --let $galera_connection_name = node_2a --let $galera_server_number = 2 --source include/galera_connect.inc diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_restart_on_unknown_option.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_restart_on_unknown_option.test new file mode 100644 index 00000000..2f27678b --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_restart_on_unknown_option.test @@ -0,0 +1,150 @@ +--source include/galera_cluster.inc +--source include/have_innodb.inc + +# Suppress expected warnings: + +CALL mtr.add_suppression("Aborting"); +CALL mtr.add_suppression("unknown option '--galera-unknown-option'"); + +# +# We should count the number of "Assertion failed" warnings +# in the log file before and after testing. To do this we need +# to save original log file before testing: +# +--let TEST_LOG=$MYSQLTEST_VARDIR/log/mysqld.2.err +--perl + use strict; + my $test_log=$ENV{'TEST_LOG'} or die "TEST_LOG not set"; + my $test_log_copy=$test_log . '.copy'; + if (-e $test_log_copy) { + unlink $test_log_copy; + } +EOF +--copy_file $TEST_LOG $TEST_LOG.copy + +--connection node_2 + +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1)); +INSERT INTO t1 VALUES (1, 'a'), (2, 'a'), (3, 'a'); + +SELECT * FROM t1; + +# Initiate normal shutdown on the node 2 and +# waiting until shutdown has been completed: + +--echo Shutting down server ... +--source include/shutdown_mysqld.inc + +--connection node_1 + +--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size' +--source include/wait_condition.inc + +# Some updates on node 1: + +UPDATE t1 SET f2 = 'b' WHERE f1 > 1; +UPDATE t1 SET f2 = 'c' WHERE f1 > 2; + +SELECT * FROM t1; + +# Remove the "grastate.dat" file (to initiate new SST) +# and restart node 2 with unknown option: + +--connection node_2 + +--remove_file $MYSQLTEST_VARDIR/mysqld.2/data/grastate.dat + +--let $start_mysqld_params=--galera-unknown-option + +--echo Starting server ... +--exec echo "try:$start_mysqld_params" > $_expect_file_name + +# Sleep to ensure that server exited... + +--sleep 30 + +# Restart node 2 without unknown option: + +--let $start_mysqld_params= + +--echo Starting server ... +--source include/start_mysqld.inc + +--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size' +--source include/wait_condition.inc + +# Sanity check (node 2 is running now and can perform SQL operators): + +SELECT * FROM t1; + +# Initiate normal shutdown on the node 2 and +# waiting until shutdown has been completed: + +--echo Shutting down server ... +--source include/shutdown_mysqld.inc + +--connection node_1 + +--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size' +--source include/wait_condition.inc + +# Some updates on node 1 - to initiate IST next time: + +UPDATE t1 SET f2 = 'd' WHERE f1 > 1; +UPDATE t1 SET f2 = 'd' WHERE f1 > 2; + +SELECT * FROM t1; + +# Restart node 2 with unknown option: + +--connection node_2 + +--let $start_mysqld_params=--galera-unknown-option + +--echo Starting server ... +--exec echo "try:$start_mysqld_params" > $_expect_file_name + +# Sleep to ensure that server exited... + +--sleep 30 + +# Restart node 2 without unknown option: + +--let $start_mysqld_params= + +--echo Starting server ... +--source include/start_mysqld.inc + +--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size' +--source include/wait_condition.inc + +# Sanity check (node 2 is running now and can perform SQL operators): + +SELECT * FROM t1; + +--connection node_1 + +DROP TABLE t1; + +# +# We should count the number of "Assertion failed" warnings +# in the log file during test phase - to print the error message +# if quantity of such warnings in log file increased at the end +# of the test: +# +--perl + use strict; + my $test_log=$ENV{'TEST_LOG'} or die "TEST_LOG not set"; + my $test_log_copy=$test_log . '.copy'; + open(FILE, $test_log_copy) or die("Unable to open $test_log_copy: $!\n"); + my $initial=grep(/Assertion * failed/gi,); + close(FILE); + open(FILE, $test_log) or die("Unable to open $test_log: $!\n"); + my $count_warnings=grep(/Assertion * failed/gi,); + close(FILE); + if ($count_warnings != $initial) { + my $diff=$count_warnings-$initial; + print "Assertion failed $diff times.\n"; + } +EOF +--remove_file $TEST_LOG.copy diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_ssl_upgrade.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_ssl_upgrade.test index 07aac0fb..a424942d 100644 --- a/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_ssl_upgrade.test +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_ssl_upgrade.test @@ -18,7 +18,8 @@ SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_N --source include/start_mysqld.inc --source include/wait_until_connected_again.inc -SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment'; +--let $wait_condition = SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment'; +--source include/wait_condition.inc SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; # 3. Restart node #2 with the new socket.ssl_ca , socket.ssl_cert and socket.ssl_key @@ -29,7 +30,8 @@ SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_N --source include/start_mysqld.inc --source include/wait_until_connected_again.inc -SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment'; +--let $wait_condition = SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment'; +--source include/wait_condition.inc SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; # 4. Restart node #1 with the new socket.ssl_ca , socket.ssl_cert and socket.ssl_key @@ -40,7 +42,8 @@ SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_N --source include/start_mysqld.inc --source include/wait_until_connected_again.inc -SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment'; +--let $wait_condition = SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment'; +--source include/wait_condition.inc SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; # Upgrade complete. Both nodes now use the new key and certificate diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_toi_ddl_fk_update.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_toi_ddl_fk_update.test new file mode 100644 index 00000000..f42fae4e --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_toi_ddl_fk_update.test @@ -0,0 +1,49 @@ +--source include/big_test.inc +--source include/galera_cluster.inc +--source include/have_innodb.inc + +# +# This test creates a new FK constraint while an UPDATE is running +# + +CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); + +CREATE TABLE parent ( + id INT PRIMARY KEY, + KEY (id) +) ENGINE=InnoDB; + +CREATE TABLE child ( + id INT PRIMARY KEY AUTO_INCREMENT, + parent_id INT +) ENGINE=InnoDB; + +INSERT INTO parent VALUES (1); + +INSERT INTO child (parent_id) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4; + +--connection node_1 +--sleep 1 +--send ALTER TABLE child ADD FOREIGN KEY (parent_id) REFERENCES parent(id) ON UPDATE CASCADE; + +--connection node_2 +--sleep 1 +--send UPDATE parent SET id = 2 WHERE id = 1; + +--connection node_1 +--reap + +--connection node_2 +--reap + +--connection node_2 +SELECT COUNT(*) = 10000 FROM child WHERE parent_id = 2; + +--connection node_1 +SELECT COUNT(*) = 10000 FROM child WHERE parent_id = 2; + +DROP TABLE child; +DROP TABLE parent; + +DROP TABLE ten; diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_toi_ddl_online.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_toi_ddl_online.test new file mode 100644 index 00000000..af45acc5 --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_toi_ddl_online.test @@ -0,0 +1,53 @@ +--source include/galera_cluster.inc +--source include/have_innodb.inc + +# +# In this test, we run concurrent INSERT against a table against which we have issued concurrent DDL statements that are fully online, +# that is, DDL statements that allow for the DML to proceed non-blocking while the DDL is in progress +# + +CREATE TABLE ten (f1 INTEGER); +INSERT INTO ten VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); + +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 INTEGER) ENGINE=InnoDB; +INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5; + +--connection node_1 +--send INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5; + +--let $galera_connection_name = node_1a +--let $galera_server_number = 1 +--source include/galera_connect.inc + +--connection node_1a +--send CREATE INDEX i1 ON t1 (f2); + + +--let $galera_connection_name = node_1b +--let $galera_server_number = 1 +--source include/galera_connect.inc + +--connection node_1b +--send ALTER TABLE t1 ADD COLUMN f3 INTEGER; + +--connection node_1 +--reap + +--connection node_1a +--reap + +--connection node_1b +--reap + +--connection node_2 +SELECT COUNT(*) = 200000 FROM t1; +SELECT COUNT(*) = 3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; +SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.STATISTICS WHERE TABLE_NAME = 't1'; + +--connection node_1 +SELECT COUNT(*) = 200000 FROM t1; +SELECT COUNT(*) = 3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; +SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.STATISTICS WHERE TABLE_NAME = 't1'; + +DROP TABLE t1; +DROP TABLE ten; diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_toi_drop_database.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_toi_drop_database.test new file mode 100644 index 00000000..3176b11d --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_toi_drop_database.test @@ -0,0 +1,54 @@ +# +# Test the operation of DDLs that affect multiple database objects +# + +--source include/big_test.inc +--source include/galera_cluster.inc +--source include/have_innodb.inc + +--let $galera_connection_name = node_1a +--let $galera_server_number = 1 +--source include/galera_connect.inc + +--connection node_1 +CREATE DATABASE database1; +USE database1; + +CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); + +CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; +CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB; + +# Insert 1M rows +--send INSERT INTO t1 (f1) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5; + +--connection node_1a +USE database1; +--send INSERT INTO t2 (f1) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5; + +--connection node_2 +--sleep 1 +--send DROP DATABASE database1; + +--connection node_1 +--sleep 30 +--error ER_NO_SUCH_TABLE +--reap + +--connection node_1a +--error ER_NO_SUCH_TABLE +--reap + +--connection node_2 +--reap + +--connection node_1 +SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = 'database1'; +--error ER_BAD_DB_ERROR +USE database1; + +--connection node_2 +SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = 'database1'; +--error ER_BAD_DB_ERROR +USE database1; diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_toi_truncate.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_toi_truncate.test new file mode 100644 index 00000000..2d6027b1 --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_toi_truncate.test @@ -0,0 +1,77 @@ +# +# Test the operation of TRUNCATE with concurrent DML. Even in the face of a concurrent INSERT, +# the TRUNCATE will complete first and be recorded in the history before the INSERT. +# + +--source include/big_test.inc +--source include/galera_cluster.inc +--source include/have_innodb.inc + +# +# INSERT and TRUNCATE on different nodes +# + +--connection node_1 +CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); + +CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; + +# Insert 100K rows +--connection node_2 +--send INSERT INTO t1 (f1) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5, ten AS a6; + +--connection node_1 +--sleep 1 +--send TRUNCATE TABLE t1; + +--connection node_1 +--reap + +--connection node_2 +--reap + +--connection node_2 +SELECT COUNT(*) = 1000000 FROM t1; + +--connection node_1 +--let $wait_condition = SELECT COUNT(*) = 1000000 FROM t1; +--source include/wait_condition.inc + +DROP TABLE t1; + +# +# INSERT AND TRUNCATE on same node +# + +--let $galera_connection_name = node_1a +--let $galera_server_number = 1 +--source include/galera_connect.inc + +--connection node_1 + +CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; + +# Insert 100K rows +--connection node_1 +--send INSERT INTO t1 (f1) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5, ten AS a6; + +--connection node_1a +--sleep 1 +--send TRUNCATE TABLE t1; + +--connection node_1 +--reap + +--connection node_1a +--reap + +--connection node_1 +SELECT COUNT(*) = 1000000 FROM t1; + +--connection node_2 +--let $wait_condition = SELECT COUNT(*) = 1000000 FROM t1; +--source include/wait_condition.inc + +DROP TABLE t1; +DROP TABLE ten; diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_var_max_ws_rows.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_var_max_ws_rows.test new file mode 100644 index 00000000..71f04df7 --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_var_max_ws_rows.test @@ -0,0 +1,154 @@ +--source include/galera_cluster.inc + +CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); + +CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 INTEGER) ENGINE=InnoDB; + +--let $wsrep_max_ws_rows_orig = `SELECT @@wsrep_max_ws_rows` +SET GLOBAL wsrep_max_ws_rows = 4; + +# Test that wsrep_max_ws_rows is enforced with multi statement transactions + +START TRANSACTION; +INSERT INTO t1 (f2) VALUES (1); +INSERT INTO t1 (f2) VALUES (2); +INSERT INTO t1 (f2) VALUES (3); +INSERT INTO t1 (f2) VALUES (4); +--error ER_ERROR_DURING_COMMIT +INSERT INTO t1 (f2) VALUES (5); +COMMIT; +SELECT COUNT(*) = 0 FROM t1; + +START TRANSACTION; +INSERT INTO t1 (f2) VALUES (1); +INSERT INTO t1 (f2) VALUES (2); +INSERT INTO t1 (f2) VALUES (3); +INSERT INTO t1 (f2) VALUES (4); +--error ER_ERROR_DURING_COMMIT +UPDATE t1 SET f2 = 10 WHERE f2 = 4; +COMMIT; +SELECT COUNT(*) = 0 FROM t1; + +START TRANSACTION; +INSERT INTO t1 (f2) VALUES (1); +INSERT INTO t1 (f2) VALUES (2); +INSERT INTO t1 (f2) VALUES (3); +INSERT INTO t1 (f2) VALUES (4); +--error ER_ERROR_DURING_COMMIT +DELETE FROM t1 WHERE f2 = 1; +COMMIT; +SELECT COUNT(*) = 0 FROM t1; + + +# Test that wsrep_max_ws_rows is enforced on sigle statements + +SET GLOBAL wsrep_max_ws_rows = 5; +INSERT INTO t1 (f2) VALUES (1),(2),(3),(4),(5); +SET GLOBAL wsrep_max_ws_rows = 4; + +--error ER_ERROR_DURING_COMMIT +UPDATE t1 SET f2 = f2 + 10; +SELECT COUNT(*) = 5 FROM t1; + +--error ER_ERROR_DURING_COMMIT +DELETE FROM t1 WHERE f2 < 10; +SELECT COUNT(*) = 5 FROM t1; + +--error ER_ERROR_DURING_COMMIT +INSERT INTO t1 (f2) SELECT * FROM ten; +SELECT COUNT(*) = 5 FROM t1; + +--error ER_ERROR_DURING_COMMIT +INSERT INTO t1 (f2) VALUES (10),(20),(30),(40),(50); +SELECT COUNT(*) = 5 FROM t1; + +# Fewer than wsrep_max_ws_rows is OK + +SET GLOBAL wsrep_max_ws_rows = 10; +DELETE FROM t1 WHERE f2 < 10; +SELECT COUNT(*) = 0 FROM t1; + +# Test a series of transactions + +--disable_query_log +SET GLOBAL wsrep_max_ws_rows = 5; +let $i= 100; +while ($i) +{ + START TRANSACTION; + --eval INSERT INTO t1 (f2) VALUES ($i); + COMMIT; + dec $i; +} +--enable_query_log +SET GLOBAL wsrep_max_ws_rows = 100; +SELECT COUNT(*) = 100 FROM t1; +DELETE FROM t1 WHERE f2 < 101; +SELECT COUNT(*) = 0 FROM t1; + +# Test large statements + +SET GLOBAL wsrep_max_ws_rows = 9999; +--error ER_ERROR_DURING_COMMIT +INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4; +SET GLOBAL wsrep_max_ws_rows = 10000; +INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4; + +SET GLOBAL wsrep_max_ws_rows = 9999; +--error ER_ERROR_DURING_COMMIT +UPDATE t1 SET f2 = 2 WHERE f2 = 1; +SET GLOBAL wsrep_max_ws_rows = 10000; +UPDATE t1 SET f2 = 2 WHERE f2 = 1; + +SET GLOBAL wsrep_max_ws_rows = 9999; +--error ER_ERROR_DURING_COMMIT +DELETE FROM t1 WHERE f2 = 2; +SET GLOBAL wsrep_max_ws_rows = 10000; +DELETE FROM t1 WHERE f2 = 2; + +SELECT COUNT(*) = 0 FROM t1; + + +# Test that wsrep_max_ws_rows is reset when switching autocommit mode + +SET AUTOCOMMIT = ON; +SET GLOBAL wsrep_max_ws_rows = 1; + +START TRANSACTION; +INSERT INTO t1 (f2) VALUES (1); +--error ER_ERROR_DURING_COMMIT +INSERT INTO t1 (f2) VALUES (2); + +INSERT INTO t1 (f2) VALUES (1); +INSERT INTO t1 (f2) VALUES (2); + + +SET AUTOCOMMIT = OFF; +START TRANSACTION; +INSERT INTO t1 (f2) VALUES (1); +--error ER_ERROR_DURING_COMMIT +INSERT INTO t1 (f2) VALUES (2); + +INSERT INTO t1 (f2) VALUES (1); +--error ER_ERROR_DURING_COMMIT +INSERT INTO t1 (f2) VALUES (2); + + +# Test that wsrep_max_ws_rows is reset on implicit commits + +START TRANSACTION; +INSERT INTO t1 (f2) VALUES (1); + +START TRANSACTION; +INSERT INTO t1 (f2) VALUES (1); +--error ER_ERROR_DURING_COMMIT +INSERT INTO t1 (f2) VALUES (2); + + +--disable_query_log +--eval SET GLOBAL wsrep_max_ws_rows = $wsrep_max_ws_rows_orig +--enable_query_log + +DROP TABLE t1; +DROP TABLE ten; diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_var_max_ws_size.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_var_max_ws_size.test index bd98babf..16a5479f 100644 --- a/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_var_max_ws_size.test +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_var_max_ws_size.test @@ -19,6 +19,29 @@ SET GLOBAL wsrep_max_ws_size = 1024; INSERT INTO t1 VALUES (DEFAULT, REPEAT('X', 1024)); SELECT COUNT(*) = 0 FROM t1; +# +# Changing repl.max_ws_size also changes wsrep_max_ws_size +# + +SET GLOBAL wsrep_provider_options = 'repl.max_ws_size=10000'; +SELECT @@wsrep_max_ws_size = 10000; + + +# +# Changing wsrep_max_ws_size is equivalent to changing repl.max_ws_size +# + +SET GLOBAL wsrep_provider_options = 'repl.max_ws_size=20000'; +--let $provider_options = `SELECT @@wsrep_provider_options` +SET GLOBAL wsrep_provider_options = 'repl.max_ws_size=10000'; + +SET GLOBAL wsrep_max_ws_size = 20000; +--let $provider_options_updated = `SELECT @@wsrep_provider_options` + +--disable_query_log +--eval SELECT STRCMP('$provider_options', '$provider_options_updated') = 0 AS provider_options_match +--enable_query_log + --disable_query_log --eval SET GLOBAL wsrep_max_ws_size = $wsrep_max_ws_size_orig --enable_query_log diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_wsrep_provider_options_syntax.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_wsrep_provider_options_syntax.test new file mode 100644 index 00000000..fe1abcf6 --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_wsrep_provider_options_syntax.test @@ -0,0 +1,20 @@ +# +# PXC-318: Typo in wsrep_provider_options causes an unhandled exception +# +--source include/galera_cluster.inc +--source include/have_innodb.inc +--let LOGF=$MYSQLTEST_VARDIR/log/mysqld.1.err +--disable_info +call mtr.add_suppression("WSREP\: Unknown parameter 'gmcasts\.segment'"); +call mtr.add_suppression("WSREP\: Set options returned 7"); +--error ER_WRONG_ARGUMENTS +SET GLOBAL wsrep_provider_options="gmcasts.segment=1"; +# Search for unhandled exception message. +perl; + use strict; + my $logf= $ENV{'LOGF'} or die "LOGF not set"; + open(FILE, "$logf") or die("Unable to open $logf: $!\n"); + my $count_warnings=grep(/terminate called after throwing an instance of /gi,); + print "Unhandled exceptions: $count_warnings\n"; + close(FILE); +EOF diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/lp1376747-2.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/lp1376747-2.test new file mode 100644 index 00000000..360681d7 --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/t/lp1376747-2.test @@ -0,0 +1,22 @@ +--source include/galera_cluster.inc +--source include/have_innodb.inc + +CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); + +--connection node_2 +FLUSH TABLES t1 FOR EXPORT; + +--connection node_1 +ALTER TABLE t1 ADD COLUMN f2 INTEGER; +INSERT INTO t1 VALUES (2,3); + +--connection node_2 +UNLOCK TABLES; + +--echo ### t1 should have column f2 +SHOW CREATE TABLE t1; +SELECT * from t1; + +--connection node_1 +DROP TABLE t1; diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/lp1376747-3.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/lp1376747-3.test new file mode 100644 index 00000000..75fe7d27 --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/t/lp1376747-3.test @@ -0,0 +1,28 @@ +--source include/galera_cluster.inc +--source include/have_innodb.inc + +CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); + +--connection node_2 +FLUSH TABLE WITH READ LOCK; +--echo ### This shouldn't block. +FLUSH TABLES t1 FOR EXPORT; + +--connection node_1 +ALTER TABLE t1 ADD COLUMN f2 INTEGER; + +--connection node_2 +UNLOCK TABLES; + +--echo ### t1 should have column f2 +SHOW CREATE TABLE t1; + +--connection node_1 +INSERT INTO t1 VALUES (2,3); + +--connection node_2 +SELECT * from t1; + +--connection node_1 +DROP TABLE t1; diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/lp1376747-4.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/lp1376747-4.test new file mode 100644 index 00000000..be56ee5e --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/t/lp1376747-4.test @@ -0,0 +1,53 @@ +# +# Test Flush tables with read lock along with +# flush tables with read lock for compatibility. +# Also, making sure all DDL and DMLs are propagated +# after provider is unpaused +# +--source include/galera_cluster.inc +--source include/have_innodb.inc + +--let $galera_connection_name = node_2a +--let $galera_server_number = 2 +--source include/galera_connect.inc + +--connection node_1 +CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); + +--connection node_2 +SET session wsrep_sync_wait=0; +SET session wsrep_causal_reads=OFF; +FLUSH TABLE WITH READ LOCK; + +--connection node_1 +ALTER TABLE t1 ADD COLUMN f2 INTEGER; +INSERT INTO t1 VALUES (2,3); + +--connection node_2a +SET session wsrep_sync_wait=0; +SET session wsrep_causal_reads=OFF; +SHOW CREATE TABLE t1; +--sleep 1 +--send FLUSH TABLES t1 WITH READ LOCK; + +--connection node_2 +# let the flush table wait in pause state before we unlock +# table otherwise there is window where-in flush table is +# yet to wait in pause and unlock allows alter table to proceed. +# this is because send in asynchronous. +--sleep 3 +# this will release existing lock but will not resume +# the cluster as there is new FTRL that is still pausing it. +UNLOCK TABLES; +SHOW CREATE TABLE t1; + +--connection node_2a +--reap +UNLOCK TABLES; +--sleep 1 +SHOW CREATE TABLE t1; +SELECT * from t1; + +--connection node_1 +DROP TABLE t1; diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/lp1376747.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/lp1376747.test new file mode 100644 index 00000000..769bb665 --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/t/lp1376747.test @@ -0,0 +1,24 @@ +--source include/galera_cluster.inc +--source include/have_innodb.inc + +CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); + +--connection node_2 +FLUSH TABLES t1 WITH READ LOCK; + +--connection node_1 +ALTER TABLE t1 ADD COLUMN f2 INTEGER; +INSERT INTO t1 VALUES (2,3); + +--sleep 2 + +--connection node_2 +UNLOCK TABLES; + +--echo ### t1 should have column f2 +SHOW CREATE TABLE t1; +SELECT * from t1; + +--connection node_1 +DROP TABLE t1; diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/pxc-421.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/pxc-421.test new file mode 100644 index 00000000..8a360b12 --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/galera/t/pxc-421.test @@ -0,0 +1,60 @@ +# +# PXC-421: Test deadlock involving updates of +# wsrep_provider, wsrep_cluster_address and wsrep_slave_threads. +# + +--source include/galera_cluster.inc +--source include/have_innodb.inc + +--connection node_1 +--let $wsrep_slave_1 = `SELECT @@wsrep_slave_threads` +set GLOBAL wsrep_slave_threads=26; +CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); +INSERT INTO t1 (f1) SELECT * from t1 as x1; + +--connection node_2 +--let $wsrep_slave_2 = `SELECT @@wsrep_slave_threads` +set GLOBAL wsrep_slave_threads=16; +--let $wsrep_provider_orig = `SELECT @@wsrep_provider` +--let $wsrep_cluster_address_orig = `SELECT @@wsrep_cluster_address` + +SET GLOBAL wsrep_provider='none'; +INSERT INTO t1 VALUES (2); + +--connection node_1 +INSERT INTO t1 VALUES (3); + +--connection node_2 +--disable_query_log +--eval SET GLOBAL wsrep_provider = '$wsrep_provider_orig'; +--eval SET GLOBAL wsrep_cluster_address = '$wsrep_cluster_address_orig'; +--enable_query_log + +--source include/wait_until_connected_again.inc +--source include/galera_wait_ready.inc + +INSERT INTO t1 VALUES (4); +set GLOBAL wsrep_slave_threads=5; + +# Node #2 has all the inserts +SELECT COUNT(*) = 5 FROM t1; + +--connection node_1 +set GLOBAL wsrep_slave_threads=12; +# Node #1 is missing the insert made while Node #2 was not replicated +SELECT COUNT(*) = 4 FROM t1; +INSERT INTO t1 VALUES (100), (101), (102); + +--connection node_2 +set GLOBAL wsrep_slave_threads=5; +INSERT INTO t1 (f1) SELECT * from t1 as x1; +show global variables like 'wsrep_slave_threads'; +--eval SET GLOBAL wsrep_slave_threads = $wsrep_slave_2 +SELECT COUNT(*) FROM t1; + +--connection node_1 +SELECT COUNT(*) FROM t1; +show global variables like 'wsrep_slave_threads'; +--eval SET GLOBAL wsrep_slave_threads = $wsrep_slave_1 +DROP TABLE t1; diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera_3nodes/galera_3nodes.cnf b/mysql-wsrep-5.6/mysql-test/suite/galera_3nodes/galera_3nodes.cnf index c04c8617..55edd1a0 100644 --- a/mysql-wsrep-5.6/mysql-test/suite/galera_3nodes/galera_3nodes.cnf +++ b/mysql-wsrep-5.6/mysql-test/suite/galera_3nodes/galera_3nodes.cnf @@ -18,21 +18,21 @@ wsrep_node_address=127.0.0.1 [mysqld.1] wsrep_cluster_address='gcomm://' -wsrep_provider_options='base_port=@mysqld.1.#galera_port' +wsrep_provider_options='base_port=@mysqld.1.#galera_port;evs.suspect_timeout=PT10S' wsrep_sst_receive_address=127.0.0.2:@mysqld.1.#sst_port wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port [mysqld.2] wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port' -wsrep_provider_options='base_port=@mysqld.2.#galera_port' +wsrep_provider_options='base_port=@mysqld.2.#galera_port;evs.suspect_timeout=PT10S' wsrep_sst_receive_address=127.0.0.2:@mysqld.2.#sst_port wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port [mysqld.3] wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port' -wsrep_provider_options='base_port=@mysqld.3.#galera_port' +wsrep_provider_options='base_port=@mysqld.3.#galera_port;evs.suspect_timeout=PT10S' wsrep_sst_receive_address=127.0.0.2:@mysqld.3.#sst_port wsrep_node_incoming_address=127.0.0.1:@mysqld.3.port diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera_3nodes/r/galera_pc_bootstrap.result b/mysql-wsrep-5.6/mysql-test/suite/galera_3nodes/r/galera_pc_bootstrap.result index f5a4cad4..69995acb 100644 --- a/mysql-wsrep-5.6/mysql-test/suite/galera_3nodes/r/galera_pc_bootstrap.result +++ b/mysql-wsrep-5.6/mysql-test/suite/galera_3nodes/r/galera_pc_bootstrap.result @@ -3,9 +3,6 @@ SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1'; SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1'; SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1'; SET SESSION wsrep_sync_wait = 0; -SHOW STATUS LIKE 'wsrep_cluster_status'; -Variable_name Value -wsrep_cluster_status non-Primary SET GLOBAL wsrep_provider_options = 'pc.bootstrap=1'; SHOW STATUS LIKE 'wsrep_cluster_size'; Variable_name Value diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera_3nodes/r/galera_pc_weight.result b/mysql-wsrep-5.6/mysql-test/suite/galera_3nodes/r/galera_pc_weight.result index 85f923ad..6fb93163 100644 --- a/mysql-wsrep-5.6/mysql-test/suite/galera_3nodes/r/galera_pc_weight.result +++ b/mysql-wsrep-5.6/mysql-test/suite/galera_3nodes/r/galera_pc_weight.result @@ -1,6 +1,8 @@ SET GLOBAL wsrep_provider_options = 'pc.weight=3'; Suspending node ... SET SESSION wsrep_sync_wait=0; +SET SESSION wsrep_on=OFF; +SET SESSION wsrep_on=ON; SHOW STATUS LIKE 'wsrep_cluster_size'; Variable_name Value wsrep_cluster_size 2 diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera_3nodes/t/galera_pc_bootstrap.cnf b/mysql-wsrep-5.6/mysql-test/suite/galera_3nodes/t/galera_pc_bootstrap.cnf new file mode 100644 index 00000000..d560b675 --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/galera_3nodes/t/galera_pc_bootstrap.cnf @@ -0,0 +1,5 @@ +# We need a dedicated .cnf file, even if empty, in order to force this test to run +# alone on a freshly started cluster. Otherwise there are adverse interactions with +# prior tests such as galera_3nodes.galera_innobackupex_backup + +!include ../galera_3nodes.cnf diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera_3nodes/t/galera_pc_bootstrap.test b/mysql-wsrep-5.6/mysql-test/suite/galera_3nodes/t/galera_pc_bootstrap.test index 6172ffcc..f8381a33 100644 --- a/mysql-wsrep-5.6/mysql-test/suite/galera_3nodes/t/galera_pc_bootstrap.test +++ b/mysql-wsrep-5.6/mysql-test/suite/galera_3nodes/t/galera_pc_bootstrap.test @@ -23,7 +23,8 @@ SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1'; # Node #2 should be non-primary SET SESSION wsrep_sync_wait = 0; -SHOW STATUS LIKE 'wsrep_cluster_status'; +--let $wait_condition = SELECT variable_value = 'non-Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE variable_name = 'wsrep_cluster_status'; +--source include/wait_condition.inc # Signal node #2 to bootstrap --connection node_2 diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera_3nodes/t/galera_pc_weight.cnf b/mysql-wsrep-5.6/mysql-test/suite/galera_3nodes/t/galera_pc_weight.cnf new file mode 100644 index 00000000..57026ce6 --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/galera_3nodes/t/galera_pc_weight.cnf @@ -0,0 +1,5 @@ +# We need a dedicated .cnf file, even if empty, in order to force this test to run +# alone on a freshly started cluster. Otherwise there are adverse interactions with +# following tests such as galera_3nodes.galera_var_dirty_reads2 + +!include ../galera_3nodes.cnf diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera_3nodes/t/galera_pc_weight.test b/mysql-wsrep-5.6/mysql-test/suite/galera_3nodes/t/galera_pc_weight.test index 6585f193..c118b748 100644 --- a/mysql-wsrep-5.6/mysql-test/suite/galera_3nodes/t/galera_pc_weight.test +++ b/mysql-wsrep-5.6/mysql-test/suite/galera_3nodes/t/galera_pc_weight.test @@ -19,6 +19,11 @@ SET GLOBAL wsrep_provider_options = 'pc.weight=3'; SET SESSION wsrep_sync_wait=0; --source include/wait_until_connected_again.inc +SET SESSION wsrep_on=OFF; +--let $wait_condition = SELECT VARIABLE_VALUE = 'non-Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status' +--source include/wait_condition.inc +SET SESSION wsrep_on=ON; + # We can not use SELECT queries here, as only SHOW is allowed to run. # For nodes #2 and #3, we expect a non-primary component of size 2 @@ -45,7 +50,7 @@ SHOW STATUS LIKE 'wsrep_local_state_comment'; --connection node_1 --source include/galera_resume.inc ---sleep 5 +--sleep 10 --source include/wait_until_connected_again.inc # For Node #1, we expect a primary component of size 1 diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera_3nodes/t/galera_var_dirty_reads2.test b/mysql-wsrep-5.6/mysql-test/suite/galera_3nodes/t/galera_var_dirty_reads2.test index 56971f1e..e9729280 100644 --- a/mysql-wsrep-5.6/mysql-test/suite/galera_3nodes/t/galera_var_dirty_reads2.test +++ b/mysql-wsrep-5.6/mysql-test/suite/galera_3nodes/t/galera_var_dirty_reads2.test @@ -105,4 +105,8 @@ SET GLOBAL wsrep_provider_options='gmcast.isolate=0'; --let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; --source include/wait_condition.inc +--connection node_2 +--let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status'; +--source include/wait_condition.inc + DROP TABLE t1; diff --git a/mysql-wsrep-5.6/mysql-test/suite/innodb/r/alter_rename_existing.result b/mysql-wsrep-5.6/mysql-test/suite/innodb/r/alter_rename_existing.result old mode 100755 new mode 100644 diff --git a/mysql-wsrep-5.6/mysql-test/suite/innodb/r/flush-hang.result b/mysql-wsrep-5.6/mysql-test/suite/innodb/r/flush-hang.result new file mode 100644 index 00000000..6f92f6c3 --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/innodb/r/flush-hang.result @@ -0,0 +1,36 @@ +# +#Bug #21133329 HANGING "SYSTEM LOCK" WHEN EXECUTING "FLUSH TABLE ... FOR EXPORT" +# +CREATE TABLE t1 ( +c1 BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 BIGINT, +c3 VARCHAR(2048), +c4 VARCHAR(2048), +INDEX idx1(c2), +INDEX idx2(c3(512)), +INDEX idx3(c4(512))) Engine=InnoDB; +CREATE TABLE t2 ( f1 int PRIMARY KEY) engine=innodb; +SET GLOBAL INNODB_PURGE_STOP_NOW=ON; +SET GLOBAL innodb_disable_background_merge=ON; +SET GLOBAL innodb_stats_persistent=OFF; +show variables like '%innodb_stats_persistent%'; +Variable_name Value +innodb_stats_persistent OFF +innodb_stats_persistent_sample_pages 20 +INSERT INTO t1(c2, c3, c4) VALUES +(1, REPEAT('a', 2048), REPEAT('a', 2048)), +(2, REPEAT('b', 2048), REPEAT('b', 2048)), +(3, REPEAT('c', 2048), REPEAT('c', 2048)), +(4, REPEAT('d', 2048), REPEAT('d', 2048)); +INSERT INTO t1(c2, c3, c4) SELECT c2, c3, c4 FROM t1; +INSERT INTO t1(c2, c3, c4) SELECT c2, c3, c4 FROM t1; +INSERT INTO t1(c2, c3, c4) SELECT c2, c3, c4 FROM t1; +INSERT INTO t1(c2, c3, c4) SELECT c2, c3, c4 FROM t1; +INSERT INTO t1(c2, c3, c4) SELECT c2, c3, c4 FROM t1; +INSERT INTO t1(c2, c3, c4) SELECT c2, c3, c4 FROM t1; +FLUSH TABLES t2 FOR EXPORT; +UNLOCK TABLES; +SET GLOBAL innodb_disable_background_merge=OFF; +SET GLOBAL INNODB_PURGE_RUN_NOW=ON; +SET GLOBAL innodb_stats_persistent=ON; +DROP TABLE t1,t2; diff --git a/mysql-wsrep-5.6/mysql-test/suite/innodb/r/import_update_stats.result b/mysql-wsrep-5.6/mysql-test/suite/innodb/r/import_update_stats.result new file mode 100644 index 00000000..a221721e --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/innodb/r/import_update_stats.result @@ -0,0 +1,69 @@ +SET @old_innodb_file_per_table = @@innodb_file_per_table; +SET GLOBAL innodb_file_per_table = 1; +SELECT @@innodb_file_per_table; +@@innodb_file_per_table +1 +CREATE TABLE t1 ( +col_1 CHAR (255), +col_2 VARCHAR (255) +) ENGINE = InnoDB; +CREATE INDEX idx1 ON t1(col_1); +CREATE INDEX idx2 ON t1(col_2); +SHOW INDEXES FROM t1; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment +t1 1 idx1 1 col_1 A 0 NULL NULL YES BTREE +t1 1 idx2 1 col_2 A 0 NULL NULL YES BTREE +INSERT INTO t1 VALUES ("col1_00001", "col2_00001"), ("col1_00002", "col2_00002"); +SHOW INDEXES FROM t1; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment +t1 1 idx1 1 col_1 A 2 NULL NULL YES BTREE +t1 1 idx2 1 col_2 A 2 NULL NULL YES BTREE +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status OK +SHOW INDEXES FROM t1; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment +t1 1 idx1 1 col_1 A 2 NULL NULL YES BTREE +t1 1 idx2 1 col_2 A 2 NULL NULL YES BTREE +FLUSH TABLES t1 FOR EXPORT; +backup: t1 +UNLOCK TABLES; +DROP TABLE t1; +CREATE TABLE t1 ( +col_1 CHAR (255), +col_2 VARCHAR (255) +) ENGINE = InnoDB; +CREATE INDEX idx1 ON t1(col_1); +CREATE INDEX idx2 ON t1(col_2); +SHOW INDEXES FROM t1; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment +t1 1 idx1 1 col_1 A 0 NULL NULL YES BTREE +t1 1 idx2 1 col_2 A 0 NULL NULL YES BTREE +INSERT INTO t1 VALUES ("col1_00001", "col2_00001"); +SHOW INDEXES FROM t1; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment +t1 1 idx1 1 col_1 A 1 NULL NULL YES BTREE +t1 1 idx2 1 col_2 A 1 NULL NULL YES BTREE +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status OK +SHOW INDEXES FROM t1; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment +t1 1 idx1 1 col_1 A 1 NULL NULL YES BTREE +t1 1 idx2 1 col_2 A 1 NULL NULL YES BTREE +ALTER TABLE t1 DISCARD TABLESPACE; +restore: t1 .ibd and .cfg files +ALTER TABLE t1 IMPORT TABLESPACE; +SHOW INDEXES FROM t1; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment +t1 1 idx1 1 col_1 A 2 NULL NULL YES BTREE +t1 1 idx2 1 col_2 A 2 NULL NULL YES BTREE +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status OK +SHOW INDEXES FROM t1; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment +t1 1 idx1 1 col_1 A 2 NULL NULL YES BTREE +t1 1 idx2 1 col_2 A 2 NULL NULL YES BTREE +DROP TABLE t1; +SET GLOBAL innodb_file_per_table = @old_innodb_file_per_table; diff --git a/mysql-wsrep-5.6/mysql-test/suite/innodb/r/innodb-index-online-norebuild.result b/mysql-wsrep-5.6/mysql-test/suite/innodb/r/innodb-index-online-norebuild.result new file mode 100644 index 00000000..611c726f --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/innodb/r/innodb-index-online-norebuild.result @@ -0,0 +1,26 @@ +# INPLACE ALTER WITH INPLACE_IGNORE FLAG AND CHANGE CREATE OPTION +# CHANGE THE COLUMN DEFAULT (INPLACE_IGNORE) +# AND TABLE CHARSET(CHANGE CREATE) +CREATE TABLE t1( +id INT PRIMARY KEY, +f1 INT NOT NULL DEFAULT 0)ENGINE=INNODB; +INSERT INTO t1 VALUES(1, 2); +ALTER TABLE t1 MODIFY COLUMN f1 INT NOT NULL DEFAULT 0, +DEFAULT CHARSET=latin1, ALGORITHM=INPLACE; +DROP TABLE t1; +# CHANGE THE STORAGE TYPE OF COLUMN(INPLACE IGNORE) +# AND TABLE CHARSET(CHANGE CREATE) +CREATE TABLE t1( +id INT STORAGE DISK)ENGINE=INNODB; +INSERT INTO t1 values(1); +ALTER TABLE t1 MODIFY COLUMN id INT STORAGE MEMORY, +DEFAULT CHARSET=latin1, ALGORITHM=INPLACE; +DROP TABLE t1; +# RENAME THE TABLE(INPLACE IGNORE) +# AND CHANGE TABLE CHARSET(CHANGE CREATE) +CREATE TABLE t1( +f1 INT NOT NULL, +f2 INT NOT NULL)ENGINE=INNODB; +INSERT INTO t1 VALUES(1, 2); +ALTER TABLE t1 RENAME t2, DEFAULT CHARSET=latin1, ALGORITHM=INPLACE; +DROP TABLE t2; diff --git a/mysql-wsrep-5.6/mysql-test/suite/innodb/r/innodb_bug54044.result b/mysql-wsrep-5.6/mysql-test/suite/innodb/r/innodb_bug54044.result index 4935febc..29b0127f 100644 --- a/mysql-wsrep-5.6/mysql-test/suite/innodb/r/innodb_bug54044.result +++ b/mysql-wsrep-5.6/mysql-test/suite/innodb/r/innodb_bug54044.result @@ -6,7 +6,8 @@ table_54044 CREATE TEMPORARY TABLE `table_54044` ( `IF(NULL IS NOT NULL, NULL, NULL)` binary(0) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 DROP TABLE table_54044; -CREATE TABLE tmp ENGINE = INNODB AS SELECT COALESCE(NULL, NULL, NULL), GREATEST(NULL, NULL), NULL; +CREATE TABLE tmp ENGINE = INNODB +AS SELECT COALESCE(NULL, NULL, NULL), GREATEST(NULL, NULL), NULL; SHOW CREATE TABLE tmp; Table Create Table tmp CREATE TABLE `tmp` ( diff --git a/mysql-wsrep-5.6/mysql-test/suite/innodb/r/innodb_deadlock_with_autoinc.result b/mysql-wsrep-5.6/mysql-test/suite/innodb/r/innodb_deadlock_with_autoinc.result new file mode 100644 index 00000000..67060854 --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/innodb/r/innodb_deadlock_with_autoinc.result @@ -0,0 +1,12 @@ +# +# Bug #21983865 UNEXPECTED DEADLOCK WITH INNODB_AUTOINC_LOCK_MODE=0 +# +create table t1(f1 int not null auto_increment primary key) engine=innodb; +# Hold autoinc_lock on table t1 from connection con1 +set debug_sync='ib_after_row_insert SIGNAL others WAIT_FOR continue_others'; +insert into t1 values(NULL); +# Create 40 connections and make it to wait for autoinc_lock on table t1. +# Release the auto_inc lock on table t1 for connection con1 +set debug_sync='now SIGNAL continue_others'; +# Now all 40 connections can finish the insert operation on t1. +drop table t1; diff --git a/mysql-wsrep-5.6/mysql-test/suite/innodb/r/monitor.result b/mysql-wsrep-5.6/mysql-test/suite/innodb/r/monitor.result index 68ab1bf1..7553df6a 100644 --- a/mysql-wsrep-5.6/mysql-test/suite/innodb/r/monitor.result +++ b/mysql-wsrep-5.6/mysql-test/suite/innodb/r/monitor.result @@ -547,3 +547,52 @@ set global innodb_monitor_enable = default; set global innodb_monitor_disable = default; set global innodb_monitor_reset = default; set global innodb_monitor_reset_all = default; +# +# Bug#22576241 SETTING INNODB_MONITOR_ENABLE TO ALL DOES NOT ENABLE ALL +# MONITORS +# +CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB; +SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME +LIKE 'buffer_page_written_index_leaf'; +NAME COUNT +buffer_page_written_index_leaf 0 +SET GLOBAL innodb_monitor_enable='module_buffer_page'; +INSERT INTO t1 VALUES (1), (2), (3), (4); +FLUSH TABLES t1 FOR EXPORT; +UNLOCK TABLES; +SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME +LIKE 'buffer_page_written_index_leaf'; +NAME COUNT +buffer_page_written_index_leaf NNNN +SET GLOBAL innodb_monitor_disable='module_buffer_page'; +SET GLOBAL innodb_monitor_reset_all='module_buffer_page'; +SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME +LIKE 'buffer_page_written_index_leaf'; +NAME COUNT +buffer_page_written_index_leaf 0 +SET GLOBAL innodb_monitor_enable='%'; +INSERT INTO t1 VALUES (5), (6), (7), (8); +FLUSH TABLES t1 FOR EXPORT; +UNLOCK TABLES; +SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME +LIKE 'buffer_page_written_index_leaf'; +NAME COUNT +buffer_page_written_index_leaf NNNN +SET GLOBAL innodb_monitor_disable='%'; +SET GLOBAL innodb_monitor_reset_all='%'; +SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME +LIKE 'buffer_page_written_index_leaf'; +NAME COUNT +buffer_page_written_index_leaf 0 +SET GLOBAL innodb_monitor_enable='ALL'; +INSERT INTO t1 VALUES (9), (10), (11), (12); +FLUSH TABLES t1 FOR EXPORT; +UNLOCK TABLES; +SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME +LIKE 'buffer_page_written_index_leaf'; +NAME COUNT +buffer_page_written_index_leaf NNNN +SET GLOBAL innodb_monitor_enable=default; +SET GLOBAL innodb_monitor_disable=default; +SET GLOBAL innodb_monitor_reset_all=default; +DROP TABLE t1; diff --git a/mysql-wsrep-5.6/mysql-test/suite/innodb/t/alter_rename_existing.test b/mysql-wsrep-5.6/mysql-test/suite/innodb/t/alter_rename_existing.test old mode 100755 new mode 100644 diff --git a/mysql-wsrep-5.6/mysql-test/suite/innodb/t/flush-hang.test b/mysql-wsrep-5.6/mysql-test/suite/innodb/t/flush-hang.test new file mode 100644 index 00000000..7de9abdc --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/innodb/t/flush-hang.test @@ -0,0 +1,50 @@ + +--echo # +--echo #Bug #21133329 HANGING "SYSTEM LOCK" WHEN EXECUTING "FLUSH TABLE ... FOR EXPORT" +--echo # + +--source include/not_embedded.inc +--source include/have_debug.inc +--source include/have_innodb.inc + +CREATE TABLE t1 ( + c1 BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 BIGINT, + c3 VARCHAR(2048), + c4 VARCHAR(2048), + INDEX idx1(c2), + INDEX idx2(c3(512)), + INDEX idx3(c4(512))) Engine=InnoDB; + +CREATE TABLE t2 ( f1 int PRIMARY KEY) engine=innodb; + +# Stop purge so that it doesn't remove the delete marked entries. +SET GLOBAL INNODB_PURGE_STOP_NOW=ON; + +# Disable change buffer merge from the master thread, additionally +# enable aggressive flushing so that more changes are buffered. +SET GLOBAL innodb_disable_background_merge=ON; +SET GLOBAL innodb_stats_persistent=OFF; +show variables like '%innodb_stats_persistent%'; + +INSERT INTO t1(c2, c3, c4) VALUES + (1, REPEAT('a', 2048), REPEAT('a', 2048)), + (2, REPEAT('b', 2048), REPEAT('b', 2048)), + (3, REPEAT('c', 2048), REPEAT('c', 2048)), + (4, REPEAT('d', 2048), REPEAT('d', 2048)); + +INSERT INTO t1(c2, c3, c4) SELECT c2, c3, c4 FROM t1; +INSERT INTO t1(c2, c3, c4) SELECT c2, c3, c4 FROM t1; +INSERT INTO t1(c2, c3, c4) SELECT c2, c3, c4 FROM t1; +INSERT INTO t1(c2, c3, c4) SELECT c2, c3, c4 FROM t1; +INSERT INTO t1(c2, c3, c4) SELECT c2, c3, c4 FROM t1; +INSERT INTO t1(c2, c3, c4) SELECT c2, c3, c4 FROM t1; + +FLUSH TABLES t2 FOR EXPORT; +UNLOCK TABLES; + +SET GLOBAL innodb_disable_background_merge=OFF; +SET GLOBAL INNODB_PURGE_RUN_NOW=ON; +SET GLOBAL innodb_stats_persistent=ON; + +DROP TABLE t1,t2; diff --git a/mysql-wsrep-5.6/mysql-test/suite/innodb/t/galera.skip b/mysql-wsrep-5.6/mysql-test/suite/innodb/t/galera.skip index d7bfe0c7..e90f9f1c 100644 --- a/mysql-wsrep-5.6/mysql-test/suite/innodb/t/galera.skip +++ b/mysql-wsrep-5.6/mysql-test/suite/innodb/t/galera.skip @@ -43,3 +43,5 @@ innodb-wl5522-debug : Unsafe statement written to the binary log using statement innodb_stats_table_flag_auto_recalc : Performs multiple restarts in a row which causes '1047: Unknown command' errors innodb-lock-inherit-read_commited : Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT innodb-index-debug : Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT +flush-hang : Unsafe statement written to the binary log +innodb_deadlock_with_autoinc : Test uses autoinc_lock_mode = 0 diff --git a/mysql-wsrep-5.6/mysql-test/suite/innodb/t/import_update_stats.test b/mysql-wsrep-5.6/mysql-test/suite/innodb/t/import_update_stats.test new file mode 100644 index 00000000..e12e2954 --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/innodb/t/import_update_stats.test @@ -0,0 +1,78 @@ +# +# BUG#20125349 - PERSISTANT STATS IS NOT UPDATED WHEN TTS IS IMPORTED. +# + +--source include/not_embedded.inc +--source include/have_innodb.inc + +let MYSQLD_DATADIR =`SELECT @@datadir`; +SET @old_innodb_file_per_table = @@innodb_file_per_table; + +SET GLOBAL innodb_file_per_table = 1; +SELECT @@innodb_file_per_table; + +CREATE TABLE t1 ( + col_1 CHAR (255), + col_2 VARCHAR (255) +) ENGINE = InnoDB; + +CREATE INDEX idx1 ON t1(col_1); +CREATE INDEX idx2 ON t1(col_2); + +SHOW INDEXES FROM t1; + +INSERT INTO t1 VALUES ("col1_00001", "col2_00001"), ("col1_00002", "col2_00002"); + +SHOW INDEXES FROM t1; + +ANALYZE TABLE t1; +SHOW INDEXES FROM t1; + +FLUSH TABLES t1 FOR EXPORT; +perl; +do 'include/innodb-util.inc'; +ib_backup_tablespaces("test", "t1"); +EOF + +UNLOCK TABLES; + +DROP TABLE t1; + +CREATE TABLE t1 ( + col_1 CHAR (255), + col_2 VARCHAR (255) +) ENGINE = InnoDB; + +CREATE INDEX idx1 ON t1(col_1); +CREATE INDEX idx2 ON t1(col_2); + +SHOW INDEXES FROM t1; + +INSERT INTO t1 VALUES ("col1_00001", "col2_00001"); + +SHOW INDEXES FROM t1; + +ANALYZE TABLE t1; +SHOW INDEXES FROM t1; + +ALTER TABLE t1 DISCARD TABLESPACE; + +perl; +do 'include/innodb-util.inc'; +ib_discard_tablespaces("test", "t1"); +ib_restore_tablespaces("test", "t1"); +EOF + +ALTER TABLE t1 IMPORT TABLESPACE; + +SHOW INDEXES FROM t1; + +ANALYZE TABLE t1; +SHOW INDEXES FROM t1; + +DROP TABLE t1; + +SET GLOBAL innodb_file_per_table = @old_innodb_file_per_table; + +--remove_files_wildcard $MYSQLTEST_VARDIR/tmp t1*.ibd +--remove_files_wildcard $MYSQLTEST_VARDIR/tmp t1*.cfg diff --git a/mysql-wsrep-5.6/mysql-test/suite/innodb/t/innodb-index-online-norebuild.test b/mysql-wsrep-5.6/mysql-test/suite/innodb/t/innodb-index-online-norebuild.test new file mode 100644 index 00000000..6bd59886 --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/innodb/t/innodb-index-online-norebuild.test @@ -0,0 +1,68 @@ +--echo # INPLACE ALTER WITH INPLACE_IGNORE FLAG AND CHANGE CREATE OPTION + +--echo # CHANGE THE COLUMN DEFAULT (INPLACE_IGNORE) +--echo # AND TABLE CHARSET(CHANGE CREATE) + +CREATE TABLE t1( + id INT PRIMARY KEY, + f1 INT NOT NULL DEFAULT 0)ENGINE=INNODB; + +INSERT INTO t1 VALUES(1, 2); + +let id_before_alter =`SELECT table_id FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE name="test/t1"`; + +ALTER TABLE t1 MODIFY COLUMN f1 INT NOT NULL DEFAULT 0, + DEFAULT CHARSET=latin1, ALGORITHM=INPLACE; + +let id_after_alter =`SELECT table_id FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE name="test/t1"`; + +if ($id_before_alter != $id_after_alter) +{ + --echo "Table rebuild happened"; +} + +DROP TABLE t1; + +--echo # CHANGE THE STORAGE TYPE OF COLUMN(INPLACE IGNORE) +--echo # AND TABLE CHARSET(CHANGE CREATE) + +CREATE TABLE t1( + id INT STORAGE DISK)ENGINE=INNODB; + +INSERT INTO t1 values(1); + +let id_before_alter =`SELECT table_id FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE name="test/t1"`; + +ALTER TABLE t1 MODIFY COLUMN id INT STORAGE MEMORY, + DEFAULT CHARSET=latin1, ALGORITHM=INPLACE; + +let id_after_alter =`SELECT table_id FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE name="test/t1"`; + +if ($id_before_alter != $id_after_alter) +{ + --echo "Table rebuild happened"; +} + +DROP TABLE t1; + +--echo # RENAME THE TABLE(INPLACE IGNORE) +--echo # AND CHANGE TABLE CHARSET(CHANGE CREATE) + +CREATE TABLE t1( + f1 INT NOT NULL, + f2 INT NOT NULL)ENGINE=INNODB; + +INSERT INTO t1 VALUES(1, 2); + +let id_before_alter =`SELECT table_id FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE name="test/t1"`; + +ALTER TABLE t1 RENAME t2, DEFAULT CHARSET=latin1, ALGORITHM=INPLACE; + +let id_after_alter =`SELECT table_id FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE name="test/t2"`; + +if ($id_before_alter != $id_after_alter) +{ + --echo "Table rebuild happened"; +} + +DROP TABLE t2; diff --git a/mysql-wsrep-5.6/mysql-test/suite/innodb/t/innodb_bug54044.test b/mysql-wsrep-5.6/mysql-test/suite/innodb/t/innodb_bug54044.test index 13c37d9c..cfc6f3c3 100644 --- a/mysql-wsrep-5.6/mysql-test/suite/innodb/t/innodb_bug54044.test +++ b/mysql-wsrep-5.6/mysql-test/suite/innodb/t/innodb_bug54044.test @@ -10,10 +10,9 @@ CREATE TEMPORARY TABLE table_54044 ENGINE = INNODB SHOW CREATE TABLE table_54044; DROP TABLE table_54044; -# These 'create table' operations should fail because of -# using NULL datatype +# This 'create table' should pass since it uses a Field_string of size 0. -CREATE TABLE tmp ENGINE = INNODB AS SELECT COALESCE(NULL, NULL, NULL), GREATEST(NULL, NULL), NULL; +CREATE TABLE tmp ENGINE = INNODB + AS SELECT COALESCE(NULL, NULL, NULL), GREATEST(NULL, NULL), NULL; SHOW CREATE TABLE tmp; DROP TABLE tmp; - diff --git a/mysql-wsrep-5.6/mysql-test/suite/innodb/t/innodb_deadlock_with_autoinc-master.opt b/mysql-wsrep-5.6/mysql-test/suite/innodb/t/innodb_deadlock_with_autoinc-master.opt new file mode 100644 index 00000000..fad0da2a --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/innodb/t/innodb_deadlock_with_autoinc-master.opt @@ -0,0 +1 @@ +--innodb-autoinc-lock-mode=0 diff --git a/mysql-wsrep-5.6/mysql-test/suite/innodb/t/innodb_deadlock_with_autoinc.test b/mysql-wsrep-5.6/mysql-test/suite/innodb/t/innodb_deadlock_with_autoinc.test new file mode 100644 index 00000000..a854c02a --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/innodb/t/innodb_deadlock_with_autoinc.test @@ -0,0 +1,47 @@ +--source include/have_debug.inc +--source include/have_innodb.inc +--source include/have_debug_sync.inc +--source include/count_sessions.inc + +--echo # +--echo # Bug #21983865 UNEXPECTED DEADLOCK WITH INNODB_AUTOINC_LOCK_MODE=0 +--echo # + +create table t1(f1 int not null auto_increment primary key) engine=innodb; + +--echo # Hold autoinc_lock on table t1 from connection con1 +connect (con1, localhost, root); +set debug_sync='ib_after_row_insert SIGNAL others WAIT_FOR continue_others'; +--send insert into t1 values(NULL) + +connection default; +--echo # Create 40 connections and make it to wait for autoinc_lock on table t1. +--disable_query_log +set debug_sync='now WAIT_FOR others'; +let $1=2; +while ($1 < 40) { + connect (con$1,localhost,root); + --send insert into t1 values(NULL) + inc $1; + connection default; +} + +connect (con40,localhost,root); +--enable_query_log +--echo # Release the auto_inc lock on table t1 for connection con1 +set debug_sync='now SIGNAL continue_others'; + +--echo # Now all 40 connections can finish the insert operation on t1. +let $1=1; +connection default; +disconnect con40; +while ($1 < 40) { + connection con$1; + --reap + connection default; + disconnect con$1; + inc $1; +} + +drop table t1; +--source include/wait_until_count_sessions.inc diff --git a/mysql-wsrep-5.6/mysql-test/suite/innodb/t/monitor.test b/mysql-wsrep-5.6/mysql-test/suite/innodb/t/monitor.test index 864e0cae..f54337ee 100644 --- a/mysql-wsrep-5.6/mysql-test/suite/innodb/t/monitor.test +++ b/mysql-wsrep-5.6/mysql-test/suite/innodb/t/monitor.test @@ -385,3 +385,56 @@ set global innodb_monitor_disable = default; set global innodb_monitor_reset = default; set global innodb_monitor_reset_all = default; -- enable_warnings + +--echo # +--echo # Bug#22576241 SETTING INNODB_MONITOR_ENABLE TO ALL DOES NOT ENABLE ALL +--echo # MONITORS +--echo # +CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB; + +let $innodb_monitor_enable = `SELECT @@innodb_monitor_enable`; + +--replace_regex /[1-9]/NNNN/ +SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME +LIKE 'buffer_page_written_index_leaf'; + +SET GLOBAL innodb_monitor_enable='module_buffer_page'; +INSERT INTO t1 VALUES (1), (2), (3), (4); FLUSH TABLES t1 FOR EXPORT; +UNLOCK TABLES; +--replace_regex /[1-9]/NNNN/ +SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME +LIKE 'buffer_page_written_index_leaf'; + +SET GLOBAL innodb_monitor_disable='module_buffer_page'; +SET GLOBAL innodb_monitor_reset_all='module_buffer_page'; +--replace_regex /[1-9]/NNNN/ +SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME +LIKE 'buffer_page_written_index_leaf'; + +SET GLOBAL innodb_monitor_enable='%'; +INSERT INTO t1 VALUES (5), (6), (7), (8); FLUSH TABLES t1 FOR EXPORT; +UNLOCK TABLES; +--replace_regex /[1-9]/NNNN/ +SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME +LIKE 'buffer_page_written_index_leaf'; + +SET GLOBAL innodb_monitor_disable='%'; +SET GLOBAL innodb_monitor_reset_all='%'; +--replace_regex /[1-9]/NNNN/ +SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME +LIKE 'buffer_page_written_index_leaf'; + +SET GLOBAL innodb_monitor_enable='ALL'; +INSERT INTO t1 VALUES (9), (10), (11), (12); FLUSH TABLES t1 FOR EXPORT; +UNLOCK TABLES; +--replace_regex /[1-9]/NNNN/ +SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME +LIKE 'buffer_page_written_index_leaf'; + +--disable_warnings +SET GLOBAL innodb_monitor_enable=default; +SET GLOBAL innodb_monitor_disable=default; +SET GLOBAL innodb_monitor_reset_all=default; +--enable_warnings + +DROP TABLE t1; diff --git a/mysql-wsrep-5.6/mysql-test/suite/innodb_fts/r/innodb-fts-basic.result b/mysql-wsrep-5.6/mysql-test/suite/innodb_fts/r/innodb-fts-basic.result index fe767476..435ef2c8 100644 --- a/mysql-wsrep-5.6/mysql-test/suite/innodb_fts/r/innodb-fts-basic.result +++ b/mysql-wsrep-5.6/mysql-test/suite/innodb_fts/r/innodb-fts-basic.result @@ -257,3 +257,31 @@ WHERE MATCH (title,body) AGAINST ('"more test proximity"' IN BOOLEAN MODE); id title body drop table articles; +# +# Bug #22679185 INVALID INNODB FTS DOC ID DURING INSERT +# +create table t1 (f1 int not null primary key, f2 varchar(100), +FTS_DOC_ID bigint(20) unsigned not null, +unique key `FTS_DOC_ID_INDEX` (`FTS_DOC_ID`), +fulltext key (f2))engine=innodb; +insert into t1 values(1, "This is the first record", 20000); +insert into t1 values(2, "This is the second record", 40000); +select FTS_DOC_ID from t1; +FTS_DOC_ID +20000 +40000 +drop table t1; +create table t1 (f1 int not null primary key, f2 varchar(100), +FTS_DOC_ID bigint(20) unsigned not null auto_increment, +unique key `FTS_DOC_ID_INDEX` (`FTS_DOC_ID`), +fulltext key (f2))engine=innodb, auto_increment=100000; +set auto_increment_increment = 65535; +insert into t1(f1, f2) values(1, "This is the first record"); +insert into t1(f1, f2) values(2, "This is the second record"); +insert into t1(f1, f2) values(3, "This is the third record"); +select FTS_DOC_ID from t1; +FTS_DOC_ID +131071 +196606 +262141 +drop table t1; diff --git a/mysql-wsrep-5.6/mysql-test/suite/innodb_fts/r/sync.result b/mysql-wsrep-5.6/mysql-test/suite/innodb_fts/r/sync.result index e350d123..627d3aa5 100644 --- a/mysql-wsrep-5.6/mysql-test/suite/innodb_fts/r/sync.result +++ b/mysql-wsrep-5.6/mysql-test/suite/innodb_fts/r/sync.result @@ -100,3 +100,33 @@ FTS_DOC_ID title 1 database 2 mysql DROP TABLE t1; +# Case 4: Test sync commit & rollback in background +CREATE TABLE t1( +id INT AUTO_INCREMENT, +title VARCHAR(100), +FULLTEXT(title), +PRIMARY KEY(id)) ENGINE=InnoDB; +SET SESSION debug="+d,fts_instrument_sync"; +INSERT INTO t1(title) VALUES('mysql'); +SET SESSION debug="-d,fts_instrument_sync"; +SET GLOBAL debug="+d,fts_instrument_sync,fts_instrument_sync_interrupted"; +INSERT INTO t1(title) VALUES('database'); +SET GLOBAL debug="-d,fts_instrument_sync,fts_instrument_sync_interrupted"; +SET SESSION debug="+d,fts_instrument_sync_debug"; +INSERT INTO t1(title) VALUES('good'); +SET SESSION debug="-d,fts_instrument_sync_debug"; +SET GLOBAL innodb_ft_aux_table="test/t1"; +SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_TABLE; +WORD FIRST_DOC_ID LAST_DOC_ID DOC_COUNT DOC_ID POSITION +database 2 2 1 2 0 +good 3 3 1 3 0 +mysql 1 1 1 1 0 +SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_CACHE; +WORD FIRST_DOC_ID LAST_DOC_ID DOC_COUNT DOC_ID POSITION +SET GLOBAL innodb_ft_aux_table=default; +SELECT * FROM t1 WHERE MATCH(title) AGAINST ('mysql database good'); +id title +1 mysql +2 database +3 good +DROP TABLE t1; diff --git a/mysql-wsrep-5.6/mysql-test/suite/innodb_fts/t/innodb-fts-basic.test b/mysql-wsrep-5.6/mysql-test/suite/innodb_fts/t/innodb-fts-basic.test index b421b0ab..af1e0890 100644 --- a/mysql-wsrep-5.6/mysql-test/suite/innodb_fts/t/innodb-fts-basic.test +++ b/mysql-wsrep-5.6/mysql-test/suite/innodb_fts/t/innodb-fts-basic.test @@ -221,3 +221,30 @@ SELECT * FROM articles AGAINST ('"more test proximity"' IN BOOLEAN MODE); drop table articles; + +--echo # +--echo # Bug #22679185 INVALID INNODB FTS DOC ID DURING INSERT +--echo # + +create table t1 (f1 int not null primary key, f2 varchar(100), + FTS_DOC_ID bigint(20) unsigned not null, + unique key `FTS_DOC_ID_INDEX` (`FTS_DOC_ID`), + fulltext key (f2))engine=innodb; + +insert into t1 values(1, "This is the first record", 20000); +insert into t1 values(2, "This is the second record", 40000); +select FTS_DOC_ID from t1; +drop table t1; + + +create table t1 (f1 int not null primary key, f2 varchar(100), + FTS_DOC_ID bigint(20) unsigned not null auto_increment, + unique key `FTS_DOC_ID_INDEX` (`FTS_DOC_ID`), + fulltext key (f2))engine=innodb, auto_increment=100000; + +set auto_increment_increment = 65535; +insert into t1(f1, f2) values(1, "This is the first record"); +insert into t1(f1, f2) values(2, "This is the second record"); +insert into t1(f1, f2) values(3, "This is the third record"); +select FTS_DOC_ID from t1; +drop table t1; diff --git a/mysql-wsrep-5.6/mysql-test/suite/innodb_fts/t/sync.test b/mysql-wsrep-5.6/mysql-test/suite/innodb_fts/t/sync.test index 5b8d05a7..9389fd72 100644 --- a/mysql-wsrep-5.6/mysql-test/suite/innodb_fts/t/sync.test +++ b/mysql-wsrep-5.6/mysql-test/suite/innodb_fts/t/sync.test @@ -107,8 +107,6 @@ DROP TABLE t1; --echo # Case 3: Test insert crash recovery --let $_expect_file_name=$MYSQLTEST_VARDIR/tmp/mysqld.$_server_id.expect -connect (con1,localhost,root,,); - CREATE TABLE t1 ( FTS_DOC_ID BIGINT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, title VARCHAR(200), @@ -139,4 +137,34 @@ SELECT * FROM t1 WHERE MATCH(title) AGAINST ('mysql database'); DROP TABLE t1; +--echo # Case 4: Test sync commit & rollback in background +CREATE TABLE t1( + id INT AUTO_INCREMENT, + title VARCHAR(100), + FULLTEXT(title), + PRIMARY KEY(id)) ENGINE=InnoDB; + +SET SESSION debug="+d,fts_instrument_sync"; +INSERT INTO t1(title) VALUES('mysql'); +SET SESSION debug="-d,fts_instrument_sync"; + +--source include/restart_mysqld.inc + +SET GLOBAL debug="+d,fts_instrument_sync,fts_instrument_sync_interrupted"; +INSERT INTO t1(title) VALUES('database'); +SET GLOBAL debug="-d,fts_instrument_sync,fts_instrument_sync_interrupted"; + +SET SESSION debug="+d,fts_instrument_sync_debug"; +INSERT INTO t1(title) VALUES('good'); +SET SESSION debug="-d,fts_instrument_sync_debug"; + +SET GLOBAL innodb_ft_aux_table="test/t1"; +SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_TABLE; +SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_CACHE; +SET GLOBAL innodb_ft_aux_table=default; + +SELECT * FROM t1 WHERE MATCH(title) AGAINST ('mysql database good'); + +DROP TABLE t1; + --source include/wait_until_count_sessions.inc diff --git a/mysql-wsrep-5.6/mysql-test/suite/opt_trace/validate_json.pl b/mysql-wsrep-5.6/mysql-test/suite/opt_trace/validate_json.pl new file mode 100755 index 00000000..2fcd6401 --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/opt_trace/validate_json.pl @@ -0,0 +1,159 @@ +#!/usr/bin/perl +use strict; +use JSON; +use File::Spec::Functions qw/ canonpath /; +my $usage = "This is from WL#5257 \"first API for optimizer trace\". + +Usage: + %s [-q] + + -q quiet mode: only display errors and warnings. + +It will verify that all optimizer traces of files (usually a_file +is a .result or .reject file which contains +SELECT * FROM OPTIMIZER_TRACE; ) are JSON-compliant, and that +they contain no duplicates keys. +Exit code is 0 if all ok."; +my $retcode = 0; +my @ignored; +my @input = @ARGV; + +# Filter out "-q" options +@input = grep {!/-q/} @input; + +if (!@input) +{ + print "$usage\n"; + exit 1; +} + +# If command line contains at least one "-q" option, it is quiet mode +my $quiet= scalar(@input) <= scalar(@ARGV) -1; +# On Windows, command line arguments specified using wildcards need to be evaluated. +# On Unix too if the arguments are passed with single quotes. +my $need_parse = grep(/\*/,@input); +if ($need_parse) +{ + my $platform_independent_dir; + $platform_independent_dir= canonpath "@input"; + @input= glob "$platform_independent_dir"; +} + +foreach my $input_file (@input) +{ + handle_one_file($input_file); + print "\n"; +} + +if ( @ignored ) +{ + print STDERR "These files have been ignored:\n"; + foreach my $ig ( @ignored ) + { + print "$ig\n"; + } + print "\n"; +} +if ( $retcode ) +{ + print STDERR "There are errors\n"; +} + +else +{ + print "\n"; + print "ALL OK\n"; +} + +exit $retcode; + +sub handle_one_file { + + my ( $input_file ) = @_; + if ( $input_file =~ /^.*(ctype_.*|mysqldump)\.result/ ) + { + push @ignored ,$input_file; + return; + } + print "FILE $input_file\n"; + print "\n"; + open(DATA,"<$input_file") or die "Can't open file"; + my @lines = ; + close(DATA); + my $first_trace_line = 0; + my $trace_line = 0; + my @trace = undef; + label_to: foreach my $i ( @lines ) + { + $trace_line = $trace_line + 1; + if (( grep(/^.*(\t)?{\n/,$i) ) and ( $first_trace_line == 0 )) + { + @trace = undef; + $first_trace_line = $trace_line; + push @trace, "{\n"; + next label_to; + } + if (( $i =~ /^}/ ) and ( $first_trace_line != 0)) + { + push @trace, "}"; + check($first_trace_line,@trace); + $first_trace_line = 0; + } + if ( $first_trace_line != 0 ) + { + # Eliminate /* */ from end_marker=on (not valid JSON) + $i =~ s/\/\*.*\*\// /g; + push @trace, $i; + } + + } +} + + +sub check { + + my ( $first_trace_line, @trace ) = @_; + my $string = join("", @trace); + my $parsed; + eval { $parsed = decode_json($string); }; + unless ( $parsed ) + { + print "Parse error at line: $first_trace_line\n"; + my $error = $@; + print "Error: $@\n"; + # If there is a character position specified, put a mark ('&') in front of this character + if ($error =~ /invalid character.*at character offset (\d+)/) + { + substr($string,$1,0) = "&"; + print "$string\n"; + } + else + { + print "$string\n"; + } + $retcode = 1; + print "\n"; + return; + } + # Detect non-unique keys in one object, by counting + # number of quote symbols ("): the json module outputs only + # one of the non-unique keys, making the number of " + # smaller compared to the input string. + + my $before = $string =~ tr/'"'//; + my $re_json; + $re_json= to_json($parsed); + my $after = $re_json =~ tr/'"'//; + if ( $before != $after ) + { + print "Non-unique keys at line $first_trace_line ( $before vs $after )\n"; + print "$string\n"; + $retcode = 1; + print "\n"; + return; + } + if ( !$quiet ) + { + print "OK at line $first_trace_line\n"; + } +} diff --git a/mysql-wsrep-5.6/mysql-test/suite/opt_trace/validate_json.py b/mysql-wsrep-5.6/mysql-test/suite/opt_trace/validate_json.py deleted file mode 100755 index 6a468423..00000000 --- a/mysql-wsrep-5.6/mysql-test/suite/opt_trace/validate_json.py +++ /dev/null @@ -1,123 +0,0 @@ -#! /usr/bin/python - -# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ - -import sys - -usage = """ -This is from WL#5257 "first API for optimizer trace". - -Usage: - %s [-q] - - -q quiet mode: only display errors and warnings. - -It will verify that all optimizer traces of files (usually a_file -is a .result or .reject file which contains -SELECT * FROM OPTIMIZER_TRACE; ) are JSON-compliant, and that -they contain no duplicates keys. -Exit code is 0 if all ok. -""" % sys.argv[0] - -input_files = filter(lambda x: x != '-q', sys.argv[1:]) # filter out "-q" options - -if not input_files: - print usage - sys.exit(1) - -quiet = len(input_files) < len(sys.argv) - 1 # command line contains at least one "-q" option - -import json, re - -trace_start_re = re.compile(r"^.*(\t)?{\n") -trace_end_re = re.compile(r"^}") -ignorable_re = re.compile(r"^.*(ctype_.*|mysqldump)\.result") - -def check(trace, first_trace_line): - global retcode - s = "".join(trace) - try: - parsed = json.loads(s) - except: - print "parse error at line", first_trace_line - error = str(sys.exc_info()) - print error - # if there is a character position specified, put a mark ('&') - # in front of this character - matchobj = re.search(r"ValueError\('Invalid control character at: line \d+ column \d+ \(char (\d+)\)'", error) - if matchobj: - first_error_char = int(matchobj.group(1)) - print s[:first_error_char] + "&" + s[first_error_char:] - else: - print s - retcode = 1 - print - return - # detect non-unique keys in one object, by counting - # number of quote symbols ("'): the json module outputs only - # one of the non-unique keys, making the number of " and ' - # smaller compared to the input string. - before = s.count('"') + s.count("'") - str_parsed = str(parsed) - after = str_parsed.count('"') + str_parsed.count("'") - if (before != after): - print "non-unique keys at line %d (%d vs %d)" % (first_trace_line, before, after) - print s - retcode = 1 - print - return - if not quiet: - print "ok at line", first_trace_line - -def handle_one_file(name): - if ignorable_re.match(name): - ignored.append(name) - return - print "FILE %s" % name - print - all = open(name).readlines() - first_trace_line = trace_line = 0 - trace = None - for l in all: - trace_line += 1 - if trace_start_re.match(l) and first_trace_line == 0: - trace = [] - first_trace_line = trace_line - trace.append("{\n") - continue - if trace_end_re.match(l): - assert first_trace_line != 0 - trace.append("}") # eliminate any following columns of table (MISSING_PRIVILEGES etc) - check(trace, first_trace_line) - first_trace_line = 0 - if first_trace_line != 0: - # eliminate /* */ from end_marker=on (not valid JSON) - no_comment = re.sub("/\*.*\*/", "", l) - trace.append(no_comment) - -retcode=0 -ignored=[] -for f in input_files: - handle_one_file(f) - print -if ignored: - print >>sys.stderr, "Those files have been ignored", ignored -print -if retcode: - print >>sys.stderr, "THERE ARE ERRORS" -else: - print "ALL OK" -sys.exit(retcode) diff --git a/mysql-wsrep-5.6/mysql-test/suite/perfschema/r/aggregate.result b/mysql-wsrep-5.6/mysql-test/suite/perfschema/r/aggregate.result deleted file mode 100644 index ab927f54..00000000 --- a/mysql-wsrep-5.6/mysql-test/suite/perfschema/r/aggregate.result +++ /dev/null @@ -1,118 +0,0 @@ -"General cleanup" -drop table if exists t1; -update performance_schema.setup_instruments set enabled = 'NO'; -update performance_schema.setup_consumers set enabled = 'NO'; -truncate table performance_schema.file_summary_by_event_name; -truncate table performance_schema.file_summary_by_instance; -truncate table performance_schema.socket_summary_by_event_name; -truncate table performance_schema.socket_summary_by_instance; -truncate table performance_schema.events_waits_summary_global_by_event_name; -truncate table performance_schema.events_waits_summary_by_instance; -truncate table performance_schema.events_waits_summary_by_thread_by_event_name; -update performance_schema.setup_consumers set enabled = 'YES'; -update performance_schema.setup_instruments -set enabled = 'YES', timed = 'YES'; -create table t1 ( -id INT PRIMARY KEY, -b CHAR(100) DEFAULT 'initial value') -ENGINE=MyISAM; -insert into t1 (id) values (1), (2), (3), (4), (5), (6), (7), (8); -update performance_schema.setup_instruments SET enabled = 'NO'; -update performance_schema.setup_consumers set enabled = 'NO'; -set @dump_all=FALSE; -"Verifying file aggregate consistency" -SELECT EVENT_NAME, e.COUNT_READ, SUM(i.COUNT_READ) -FROM performance_schema.file_summary_by_event_name AS e -JOIN performance_schema.file_summary_by_instance AS i USING (EVENT_NAME) -GROUP BY EVENT_NAME -HAVING (e.COUNT_READ <> SUM(i.COUNT_READ)) -OR @dump_all; -EVENT_NAME COUNT_READ SUM(i.COUNT_READ) -SELECT EVENT_NAME, e.COUNT_WRITE, SUM(i.COUNT_WRITE) -FROM performance_schema.file_summary_by_event_name AS e -JOIN performance_schema.file_summary_by_instance AS i USING (EVENT_NAME) -GROUP BY EVENT_NAME -HAVING (e.COUNT_WRITE <> SUM(i.COUNT_WRITE)) -OR @dump_all; -EVENT_NAME COUNT_WRITE SUM(i.COUNT_WRITE) -SELECT EVENT_NAME, e.COUNT_READ, SUM(i.COUNT_READ) -FROM performance_schema.socket_summary_by_event_name AS e -JOIN performance_schema.socket_summary_by_instance AS i USING (EVENT_NAME) -GROUP BY EVENT_NAME -HAVING (e.COUNT_READ <> SUM(i.COUNT_READ)) -OR @dump_all; -EVENT_NAME COUNT_READ SUM(i.COUNT_READ) -SELECT EVENT_NAME, e.COUNT_WRITE, SUM(i.COUNT_WRITE) -FROM performance_schema.socket_summary_by_event_name AS e -JOIN performance_schema.socket_summary_by_instance AS i USING (EVENT_NAME) -GROUP BY EVENT_NAME -HAVING (e.COUNT_WRITE <> SUM(i.COUNT_WRITE)) -OR @dump_all; -EVENT_NAME COUNT_WRITE SUM(i.COUNT_WRITE) -SELECT EVENT_NAME, e.SUM_NUMBER_OF_BYTES_READ, SUM(i.SUM_NUMBER_OF_BYTES_READ) -FROM performance_schema.file_summary_by_event_name AS e -JOIN performance_schema.file_summary_by_instance AS i USING (EVENT_NAME) -GROUP BY EVENT_NAME -HAVING (e.SUM_NUMBER_OF_BYTES_READ <> SUM(i.SUM_NUMBER_OF_BYTES_READ)) -OR @dump_all; -EVENT_NAME SUM_NUMBER_OF_BYTES_READ SUM(i.SUM_NUMBER_OF_BYTES_READ) -SELECT EVENT_NAME, e.SUM_NUMBER_OF_BYTES_WRITE, SUM(i.SUM_NUMBER_OF_BYTES_WRITE) -FROM performance_schema.file_summary_by_event_name AS e -JOIN performance_schema.file_summary_by_instance AS i USING (EVENT_NAME) -GROUP BY EVENT_NAME -HAVING (e.SUM_NUMBER_OF_BYTES_WRITE <> SUM(i.SUM_NUMBER_OF_BYTES_WRITE)) -OR @dump_all; -EVENT_NAME SUM_NUMBER_OF_BYTES_WRITE SUM(i.SUM_NUMBER_OF_BYTES_WRITE) -"Verifying waits aggregate consistency (instance)" -SELECT EVENT_NAME, e.SUM_TIMER_WAIT, SUM(i.SUM_TIMER_WAIT) -FROM performance_schema.events_waits_summary_global_by_event_name AS e -JOIN performance_schema.events_waits_summary_by_instance AS i USING (EVENT_NAME) -GROUP BY EVENT_NAME -HAVING (e.SUM_TIMER_WAIT < SUM(i.SUM_TIMER_WAIT)) -OR @dump_all; -EVENT_NAME SUM_TIMER_WAIT SUM(i.SUM_TIMER_WAIT) -SELECT EVENT_NAME, e.MIN_TIMER_WAIT, MIN(i.MIN_TIMER_WAIT) -FROM performance_schema.events_waits_summary_global_by_event_name AS e -JOIN performance_schema.events_waits_summary_by_instance AS i USING (EVENT_NAME) -GROUP BY EVENT_NAME -HAVING (e.MIN_TIMER_WAIT > MIN(i.MIN_TIMER_WAIT)) -AND (MIN(i.MIN_TIMER_WAIT) != 0) -OR @dump_all; -EVENT_NAME MIN_TIMER_WAIT MIN(i.MIN_TIMER_WAIT) -SELECT EVENT_NAME, e.MAX_TIMER_WAIT, MAX(i.MAX_TIMER_WAIT) -FROM performance_schema.events_waits_summary_global_by_event_name AS e -JOIN performance_schema.events_waits_summary_by_instance AS i USING (EVENT_NAME) -GROUP BY EVENT_NAME -HAVING (e.MAX_TIMER_WAIT < MAX(i.MAX_TIMER_WAIT)) -OR @dump_all; -EVENT_NAME MAX_TIMER_WAIT MAX(i.MAX_TIMER_WAIT) -"Verifying waits aggregate consistency (thread)" -SELECT EVENT_NAME, e.SUM_TIMER_WAIT, SUM(t.SUM_TIMER_WAIT) -FROM performance_schema.events_waits_summary_global_by_event_name AS e -JOIN performance_schema.events_waits_summary_by_thread_by_event_name AS t -USING (EVENT_NAME) -GROUP BY EVENT_NAME -HAVING (e.SUM_TIMER_WAIT < SUM(t.SUM_TIMER_WAIT)) -OR @dump_all; -EVENT_NAME SUM_TIMER_WAIT SUM(t.SUM_TIMER_WAIT) -SELECT EVENT_NAME, e.MIN_TIMER_WAIT, MIN(t.MIN_TIMER_WAIT) -FROM performance_schema.events_waits_summary_global_by_event_name AS e -JOIN performance_schema.events_waits_summary_by_thread_by_event_name AS t -USING (EVENT_NAME) -GROUP BY EVENT_NAME -HAVING (e.MIN_TIMER_WAIT > MIN(t.MIN_TIMER_WAIT)) -AND (MIN(t.MIN_TIMER_WAIT) != 0) -OR @dump_all; -EVENT_NAME MIN_TIMER_WAIT MIN(t.MIN_TIMER_WAIT) -SELECT EVENT_NAME, e.MAX_TIMER_WAIT, MAX(t.MAX_TIMER_WAIT) -FROM performance_schema.events_waits_summary_global_by_event_name AS e -JOIN performance_schema.events_waits_summary_by_thread_by_event_name AS t -USING (EVENT_NAME) -GROUP BY EVENT_NAME -HAVING (e.MAX_TIMER_WAIT < MAX(t.MAX_TIMER_WAIT)) -OR @dump_all; -EVENT_NAME MAX_TIMER_WAIT MAX(t.MAX_TIMER_WAIT) -update performance_schema.setup_consumers set enabled = 'YES'; -update performance_schema.setup_instruments -set enabled = 'YES', timed = 'YES'; -drop table test.t1; diff --git a/mysql-wsrep-5.6/mysql-test/suite/perfschema/t/aggregate.test b/mysql-wsrep-5.6/mysql-test/suite/perfschema/t/aggregate.test deleted file mode 100644 index 326c0e76..00000000 --- a/mysql-wsrep-5.6/mysql-test/suite/perfschema/t/aggregate.test +++ /dev/null @@ -1,191 +0,0 @@ -# Tests for PERFORMANCE_SCHEMA -# Verify that statistics aggregated by different criteria are consistent. - ---source include/not_embedded.inc ---source include/have_perfschema.inc ---source include/have_QC_Disabled.inc - ---echo "General cleanup" - ---disable_warnings -drop table if exists t1; ---enable_warnings - -update performance_schema.setup_instruments set enabled = 'NO'; -update performance_schema.setup_consumers set enabled = 'NO'; - -# Cleanup statistics -truncate table performance_schema.file_summary_by_event_name; -truncate table performance_schema.file_summary_by_instance; -truncate table performance_schema.socket_summary_by_event_name; -truncate table performance_schema.socket_summary_by_instance; -truncate table performance_schema.events_waits_summary_global_by_event_name; -truncate table performance_schema.events_waits_summary_by_instance; -truncate table performance_schema.events_waits_summary_by_thread_by_event_name; - -# Start recording data -update performance_schema.setup_consumers set enabled = 'YES'; -update performance_schema.setup_instruments - set enabled = 'YES', timed = 'YES'; - - -create table t1 ( - id INT PRIMARY KEY, - b CHAR(100) DEFAULT 'initial value') - ENGINE=MyISAM; - -insert into t1 (id) values (1), (2), (3), (4), (5), (6), (7), (8); - -# Stop recording data, so the select below don't add noise. -update performance_schema.setup_instruments SET enabled = 'NO'; -# Disable all consumers, for long standing waits -update performance_schema.setup_consumers set enabled = 'NO'; - -# Helper to debug -set @dump_all=FALSE; - -# Note that in general: -# - COUNT/SUM/MAX(file_summary_by_event_name) >= -# COUNT/SUM/MAX(file_summary_by_instance). -# - MIN(file_summary_by_event_name) <= -# MIN(file_summary_by_instance). -# There will be equality only when file instances are not removed, -# aka when a file is not deleted from the file system, -# because doing so removes a row in file_summary_by_instance. - -# Likewise: -# - COUNT/SUM/MAX(events_waits_summary_global_by_event_name) >= -# COUNT/SUM/MAX(events_waits_summary_by_instance) -# - MIN(events_waits_summary_global_by_event_name) <= -# MIN(events_waits_summary_by_instance) -# There will be equality only when an instrument instance -# is not removed, which is next to impossible to predictably guarantee -# in the server. -# For example, a MyISAM table removed from the table cache -# will cause a mysql_mutex_destroy on myisam/MYISAM_SHARE::intern_lock. -# Another example, a thread terminating will cause a mysql_mutex_destroy -# on sql/LOCK_delete -# Both cause a row to be deleted from events_waits_summary_by_instance. - -# Likewise: -# - COUNT/SUM/MAX(events_waits_summary_global_by_event_name) >= -# COUNT/SUM/MAX(events_waits_summary_by_thread_by_event_name) -# - MIN(events_waits_summary_global_by_event_name) <= -# MIN(events_waits_summary_by_thread_by_event_name) -# There will be equality only when no thread is removed, -# that is if no thread disconnects, or no sub thread (for example insert -# delayed) ever completes. -# A thread completing will cause rows in -# events_waits_summary_by_thread_by_event_name to be removed. - ---echo "Verifying file aggregate consistency" - -# Since the code generating the load in this test does: -# - create table -# - insert -# - does not cause temporary tables to be used -# we can test for equality here for file aggregates. - -# If any of these queries returns data, the test failed. - -SELECT EVENT_NAME, e.COUNT_READ, SUM(i.COUNT_READ) -FROM performance_schema.file_summary_by_event_name AS e -JOIN performance_schema.file_summary_by_instance AS i USING (EVENT_NAME) -GROUP BY EVENT_NAME -HAVING (e.COUNT_READ <> SUM(i.COUNT_READ)) -OR @dump_all; - -SELECT EVENT_NAME, e.COUNT_WRITE, SUM(i.COUNT_WRITE) -FROM performance_schema.file_summary_by_event_name AS e -JOIN performance_schema.file_summary_by_instance AS i USING (EVENT_NAME) -GROUP BY EVENT_NAME -HAVING (e.COUNT_WRITE <> SUM(i.COUNT_WRITE)) -OR @dump_all; - -SELECT EVENT_NAME, e.COUNT_READ, SUM(i.COUNT_READ) -FROM performance_schema.socket_summary_by_event_name AS e -JOIN performance_schema.socket_summary_by_instance AS i USING (EVENT_NAME) -GROUP BY EVENT_NAME -HAVING (e.COUNT_READ <> SUM(i.COUNT_READ)) -OR @dump_all; - -SELECT EVENT_NAME, e.COUNT_WRITE, SUM(i.COUNT_WRITE) -FROM performance_schema.socket_summary_by_event_name AS e -JOIN performance_schema.socket_summary_by_instance AS i USING (EVENT_NAME) -GROUP BY EVENT_NAME -HAVING (e.COUNT_WRITE <> SUM(i.COUNT_WRITE)) -OR @dump_all; - -SELECT EVENT_NAME, e.SUM_NUMBER_OF_BYTES_READ, SUM(i.SUM_NUMBER_OF_BYTES_READ) -FROM performance_schema.file_summary_by_event_name AS e -JOIN performance_schema.file_summary_by_instance AS i USING (EVENT_NAME) -GROUP BY EVENT_NAME -HAVING (e.SUM_NUMBER_OF_BYTES_READ <> SUM(i.SUM_NUMBER_OF_BYTES_READ)) -OR @dump_all; - -SELECT EVENT_NAME, e.SUM_NUMBER_OF_BYTES_WRITE, SUM(i.SUM_NUMBER_OF_BYTES_WRITE) -FROM performance_schema.file_summary_by_event_name AS e -JOIN performance_schema.file_summary_by_instance AS i USING (EVENT_NAME) -GROUP BY EVENT_NAME -HAVING (e.SUM_NUMBER_OF_BYTES_WRITE <> SUM(i.SUM_NUMBER_OF_BYTES_WRITE)) -OR @dump_all; - ---echo "Verifying waits aggregate consistency (instance)" - -SELECT EVENT_NAME, e.SUM_TIMER_WAIT, SUM(i.SUM_TIMER_WAIT) -FROM performance_schema.events_waits_summary_global_by_event_name AS e -JOIN performance_schema.events_waits_summary_by_instance AS i USING (EVENT_NAME) -GROUP BY EVENT_NAME -HAVING (e.SUM_TIMER_WAIT < SUM(i.SUM_TIMER_WAIT)) -OR @dump_all; - -SELECT EVENT_NAME, e.MIN_TIMER_WAIT, MIN(i.MIN_TIMER_WAIT) -FROM performance_schema.events_waits_summary_global_by_event_name AS e -JOIN performance_schema.events_waits_summary_by_instance AS i USING (EVENT_NAME) -GROUP BY EVENT_NAME -HAVING (e.MIN_TIMER_WAIT > MIN(i.MIN_TIMER_WAIT)) -AND (MIN(i.MIN_TIMER_WAIT) != 0) -OR @dump_all; - -SELECT EVENT_NAME, e.MAX_TIMER_WAIT, MAX(i.MAX_TIMER_WAIT) -FROM performance_schema.events_waits_summary_global_by_event_name AS e -JOIN performance_schema.events_waits_summary_by_instance AS i USING (EVENT_NAME) -GROUP BY EVENT_NAME -HAVING (e.MAX_TIMER_WAIT < MAX(i.MAX_TIMER_WAIT)) -OR @dump_all; - ---echo "Verifying waits aggregate consistency (thread)" - -SELECT EVENT_NAME, e.SUM_TIMER_WAIT, SUM(t.SUM_TIMER_WAIT) -FROM performance_schema.events_waits_summary_global_by_event_name AS e -JOIN performance_schema.events_waits_summary_by_thread_by_event_name AS t -USING (EVENT_NAME) -GROUP BY EVENT_NAME -HAVING (e.SUM_TIMER_WAIT < SUM(t.SUM_TIMER_WAIT)) -OR @dump_all; - -SELECT EVENT_NAME, e.MIN_TIMER_WAIT, MIN(t.MIN_TIMER_WAIT) -FROM performance_schema.events_waits_summary_global_by_event_name AS e -JOIN performance_schema.events_waits_summary_by_thread_by_event_name AS t -USING (EVENT_NAME) -GROUP BY EVENT_NAME -HAVING (e.MIN_TIMER_WAIT > MIN(t.MIN_TIMER_WAIT)) -AND (MIN(t.MIN_TIMER_WAIT) != 0) -OR @dump_all; - -SELECT EVENT_NAME, e.MAX_TIMER_WAIT, MAX(t.MAX_TIMER_WAIT) -FROM performance_schema.events_waits_summary_global_by_event_name AS e -JOIN performance_schema.events_waits_summary_by_thread_by_event_name AS t -USING (EVENT_NAME) -GROUP BY EVENT_NAME -HAVING (e.MAX_TIMER_WAIT < MAX(t.MAX_TIMER_WAIT)) -OR @dump_all; - - -# Cleanup - -update performance_schema.setup_consumers set enabled = 'YES'; -update performance_schema.setup_instruments - set enabled = 'YES', timed = 'YES'; - -drop table test.t1; diff --git a/mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_autoinc_lock_style.result b/mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_autoinc_lock_style.result new file mode 100644 index 00000000..16fb7e96 --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_autoinc_lock_style.result @@ -0,0 +1,15 @@ +include/master-slave.inc +Warnings: +Note #### Sending passwords in plain text without SSL/TLS is extremely insecure. +Note #### Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information. +[connection master] +CREATE TABLE t (i INT AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB; +include/sync_slave_sql_with_master.inc +SET @save_debug=@@debug; +SET GLOBAL DEBUG='+d,die_if_autoinc_old_lock_style_used'; +[connection master] +INSERT INTO t VALUES (1); +DROP TABLE t; +include/sync_slave_sql_with_master.inc +SET GLOBAL DEBUG=@save_debug; +include/rpl_end.inc diff --git a/mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_gtid_stress_failover.result b/mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_gtid_stress_failover.result deleted file mode 100644 index f7782294..00000000 --- a/mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_gtid_stress_failover.result +++ /dev/null @@ -1,19 +0,0 @@ -==== Configure ==== -==== Initialize ==== -include/rpl_init.inc [topology=1->2->3->4->5->1] -include/rpl_sync.inc -include/rpl_reset.inc -==== Test ==== -==== Sync ==== -Reap all sent queries. -include/rpl_stop_slaves.inc -include/rpl_change_topology.inc [new topology=1->2->3->4->5->1] -include/rpl_start_slaves.inc -include/rpl_sync.inc -==== Check result ==== -Check that GTID_EXECUTED is equal on all servers. -Check that database state is equal on all servers. -include/diff_servers.inc [servers=1 2 3 4 5 ] -==== Clean up ==== -include/rpl_sync.inc -include/rpl_end.inc diff --git a/mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_mts_relay_log_post_crash_recovery.result b/mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_mts_relay_log_post_crash_recovery.result new file mode 100644 index 00000000..f476ebf7 --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_mts_relay_log_post_crash_recovery.result @@ -0,0 +1,82 @@ +include/master-slave.inc +Warnings: +Note #### Sending passwords in plain text without SSL/TLS is extremely insecure. +Note #### Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information. +[connection master] +#### I. Initialize #### +[connection slave] +include/stop_slave.inc +SET @save.innodb_lock_wait_timeout= @@global.innodb_lock_wait_timeout; +set @@global.innodb_lock_wait_timeout=5 + 1000; +include/start_slave.inc +[connection master] +CREATE DATABASE d1; +CREATE DATABASE d2; +CREATE TABLE d1.t (a INT PRIMARY KEY, name text) ENGINE=INNODB; +CREATE TABLE d2.t (a INT PRIMARY KEY, name text) ENGINE=INNODB; +#### II. Prepare test scenario #### +include/sync_slave_sql_with_master.inc +BEGIN; +INSERT INTO d2.t VALUES (2, 'Slave local'); +INSERT INTO d1.t VALUES (3, 'Slave local'); +[connection master] +INSERT INTO d1.t VALUES (1, 'T1'); +INSERT INTO d2.t VALUES (1, 'T2'); +INSERT INTO d2.t VALUES (2, 'T3'); +INSERT INTO d2.t VALUES (3, 'T4'); +INSERT INTO d1.t VALUES (2, 'T5'); +[connection slave1] +# Now d1.t has two rows and d2.t has one row. +[connection slave] +CALL mtr.add_suppression("Recovery from master pos"); +include/rpl_start_server.inc [server_number=2 parameters: --skip_slave_start=FALSE --relay_log_info_repository=TABLE --master_info_repository=TABLE --sync_master_info=1 --relay-log-recovery=1] +After restart gaps should be filled. +include/assert.inc [Table d1.t should contain 2 rows.] +include/assert.inc [Table d2.t should contain 3 rows.] +include/start_slave.inc +[connection master] +include/sync_slave_sql_with_master.inc +include/diff_tables.inc [master:d1.t, slave:d1.t] +include/diff_tables.inc [master:d2.t, slave:d2.t] +[connection master] +DROP DATABASE d1; +DROP DATABASE d2; +#### I. Initialize #### +[connection slave] +include/stop_slave.inc +SET @save.innodb_lock_wait_timeout= @@global.innodb_lock_wait_timeout; +set @@global.innodb_lock_wait_timeout=5 + 1000; +include/start_slave.inc +[connection master] +CREATE DATABASE d1; +CREATE DATABASE d2; +CREATE TABLE d1.t (a INT PRIMARY KEY, name text) ENGINE=INNODB; +CREATE TABLE d2.t (a INT PRIMARY KEY, name text) ENGINE=INNODB; +#### II. Prepare test scenario #### +include/sync_slave_sql_with_master.inc +BEGIN; +INSERT INTO d2.t VALUES (2, 'Slave local'); +INSERT INTO d1.t VALUES (3, 'Slave local'); +[connection master] +INSERT INTO d1.t VALUES (1, 'T1'); +INSERT INTO d2.t VALUES (1, 'T2'); +INSERT INTO d2.t VALUES (2, 'T3'); +INSERT INTO d2.t VALUES (3, 'T4'); +INSERT INTO d1.t VALUES (2, 'T5'); +[connection slave1] +# Now d1.t has two rows and d2.t has one row. +[connection slave] +CALL mtr.add_suppression("Recovery from master pos"); +include/rpl_start_server.inc [server_number=2 parameters: --skip_slave_start=TRUE --relay_log_info_repository=TABLE --master_info_repository=TABLE --sync_master_info=1 --relay-log-recovery=1] +After restart gaps should be filled. +include/assert.inc [Table d1.t should contain 2 rows.] +include/assert.inc [Table d2.t should contain 3 rows.] +include/start_slave.inc +[connection master] +include/sync_slave_sql_with_master.inc +include/diff_tables.inc [master:d1.t, slave:d1.t] +include/diff_tables.inc [master:d2.t, slave:d2.t] +[connection master] +DROP DATABASE d1; +DROP DATABASE d2; +include/rpl_end.inc diff --git a/mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_mts_relay_log_recovery_on_error.result b/mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_mts_relay_log_recovery_on_error.result new file mode 100644 index 00000000..efd785a7 --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_mts_relay_log_recovery_on_error.result @@ -0,0 +1,60 @@ +include/master-slave.inc +Warnings: +Note #### Sending passwords in plain text without SSL/TLS is extremely insecure. +Note #### Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information. +[connection master] +[connection slave] +call mtr.add_suppression("Duplicate entry*"); +call mtr.add_suppression("The slave coordinator and worker threads are stopped, possibly leaving data in inconsistent state"); +call mtr.add_suppression("Failed to initialize the master info structure"); +call mtr.add_suppression("Slave failed to initialize relay log info*"); +call mtr.add_suppression("MTS recovery: automatic recovery failed.*"); +call mtr.add_suppression("Recovery from master pos"); +#### I. Initialize #### +[connection slave] +include/stop_slave.inc +SET @save.innodb_lock_wait_timeout= @@global.innodb_lock_wait_timeout; +set @@global.innodb_lock_wait_timeout=5 + 1000; +include/start_slave.inc +[connection master] +CREATE DATABASE d1; +CREATE DATABASE d2; +CREATE TABLE d1.t (a INT PRIMARY KEY, name text) ENGINE=INNODB; +CREATE TABLE d2.t (a INT PRIMARY KEY, name text) ENGINE=INNODB; +#### II. Prepare test scenario #### +include/sync_slave_sql_with_master.inc +BEGIN; +INSERT INTO d2.t VALUES (2, 'Slave local'); +INSERT INTO d1.t VALUES (3, 'Slave local'); +[connection master] +INSERT INTO d1.t VALUES (1, 'T1'); +INSERT INTO d2.t VALUES (1, 'T2'); +INSERT INTO d2.t VALUES (2, 'T3'); +INSERT INTO d2.t VALUES (3, 'T4'); +INSERT INTO d1.t VALUES (2, 'T5'); +[connection slave1] +# Now d1.t has two rows and d2.t has one row. +[connection slave] +COMMIT; +include/wait_for_slave_sql_error.inc [errno=1062] +include/rpl_restart_server.inc [server_number=2 parameters: --skip_slave_start=TRUE --relay_log_info_repository=TABLE --master_info_repository=TABLE --sync_master_info=1 --relay-log-recovery=1] +[connection slave] +Relay log recovery should fail as MTS stopped due to an error +START SLAVE; +ERROR HY000: Slave failed to initialize relay log info structure from the repository +Eliminate the cause of MTS error +DELETE FROM d2.t WHERE a=2; +DELETE FROM d1.t WHERE a=3; +include/rpl_restart_server.inc [server_number=2 parameters: --skip_slave_start=TRUE --relay_log_info_repository=TABLE --master_info_repository=TABLE --sync_master_info=1 --relay-log-recovery=1] +MTS recovery should be successful. Check that gaps are filled. +include/assert.inc [Table d1.t should contain 2 rows.] +include/assert.inc [Table d2.t should contain 3 rows.] +include/start_slave.inc +[connection master] +include/sync_slave_sql_with_master.inc +include/diff_tables.inc [master:d1.t, slave:d1.t] +include/diff_tables.inc [master:d2.t, slave:d2.t] +[connection master] +DROP DATABASE d1; +DROP DATABASE d2; +include/rpl_end.inc diff --git a/mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_parallel_change_master.result b/mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_parallel_change_master.result index 5728a577..e0e70c58 100644 --- a/mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_parallel_change_master.result +++ b/mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_parallel_change_master.result @@ -46,7 +46,7 @@ include/rpl_restart_server.inc [server_number=2 parameters: --relay-log-recovery SELECT @@global.relay_log_recovery as 'must be ON'; must be ON 1 -call mtr.add_suppression("--relay-log-recovery cannot be executed when the slave was stopped with an error or killed in MTS mode; consider using RESET SLAVE or restart the server with --relay-log-recovery = 0"); +call mtr.add_suppression("MTS recovery: automatic recovery failed.*"); call mtr.add_suppression("Failed to initialize the master info structure"); call mtr.add_suppression("It is not possible to change the type of the relay log repository because there are workers repositories with possible execution gaps. The value of --relay_log_info_repository is altered to one of the found Worker repositories"); include/rpl_restart_server.inc [server_number=2 parameters: --skip-slave-start] diff --git a/mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_row_img_sanity.result b/mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_row_img_sanity.result index 00ee2d00..e2f4c1ca 100644 --- a/mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_row_img_sanity.result +++ b/mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_row_img_sanity.result @@ -639,6 +639,73 @@ DROP TABLE t; include/wait_for_slave_sql_error.inc [errno=1032] DROP TABLE t; include/rpl_reset.inc +CON: 'master', IMG: 'FULL', RESTART SLAVE: 'N' +SET SESSION binlog_row_image= 'FULL'; +SET GLOBAL binlog_row_image= 'FULL'; +FLUSH TABLES; +SHOW VARIABLES LIKE 'binlog_row_image'; +Variable_name Value +binlog_row_image FULL +CON: 'slave', IMG: 'FULL', RESTART SLAVE: 'Y' +SET SESSION binlog_row_image= 'FULL'; +SET GLOBAL binlog_row_image= 'FULL'; +include/stop_slave.inc +include/start_slave.inc +FLUSH TABLES; +SHOW VARIABLES LIKE 'binlog_row_image'; +Variable_name Value +binlog_row_image FULL +CREATE TABLE t1(id INT PRIMARY KEY, a INT) ENGINE = INNODB; +include/sync_slave_sql_with_master.inc +INSERT INTO t1 (id, a) VALUES (1, 1); +"Case: FULL - EXPLAIN output should not display Using temporary" +EXPLAIN UPDATE t1 SET a=a+1 WHERE id < 2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range PRIMARY PRIMARY 4 const 1 Using where +UPDATE t1 SET a=a+1 WHERE id < 2; +CON: 'master', IMG: 'NOBLOB', RESTART SLAVE: 'N' +SET SESSION binlog_row_image= 'NOBLOB'; +SET GLOBAL binlog_row_image= 'NOBLOB'; +FLUSH TABLES; +SHOW VARIABLES LIKE 'binlog_row_image'; +Variable_name Value +binlog_row_image NOBLOB +CON: 'slave', IMG: 'NOBLOB', RESTART SLAVE: 'Y' +SET SESSION binlog_row_image= 'NOBLOB'; +SET GLOBAL binlog_row_image= 'NOBLOB'; +include/stop_slave.inc +include/start_slave.inc +FLUSH TABLES; +SHOW VARIABLES LIKE 'binlog_row_image'; +Variable_name Value +binlog_row_image NOBLOB +"Case: NOBLOB - EXPLAIN output should not display Using temporary" +EXPLAIN UPDATE t1 SET a=a+1 WHERE id < 2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range PRIMARY PRIMARY 4 const 1 Using where +UPDATE t1 SET a=a+1 WHERE id < 2; +CON: 'master', IMG: 'MINIMAL', RESTART SLAVE: 'N' +SET SESSION binlog_row_image= 'MINIMAL'; +SET GLOBAL binlog_row_image= 'MINIMAL'; +FLUSH TABLES; +SHOW VARIABLES LIKE 'binlog_row_image'; +Variable_name Value +binlog_row_image MINIMAL +CON: 'slave', IMG: 'MINIMAL', RESTART SLAVE: 'Y' +SET SESSION binlog_row_image= 'MINIMAL'; +SET GLOBAL binlog_row_image= 'MINIMAL'; +include/stop_slave.inc +include/start_slave.inc +FLUSH TABLES; +SHOW VARIABLES LIKE 'binlog_row_image'; +Variable_name Value +binlog_row_image MINIMAL +EXPLAIN UPDATE t1 SET a=a+1 WHERE id < 2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range PRIMARY PRIMARY 4 const 1 Using where +UPDATE t1 SET a=a+1 WHERE id < 2; +DROP TABLE t1; +include/sync_slave_sql_with_master.inc SET GLOBAL binlog_row_image= @old_binlog_row_image; SET SESSION binlog_row_image= @old_binlog_row_image; SET GLOBAL binlog_row_image= @old_binlog_row_image; diff --git a/mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_row_slave_skip_error_all.result b/mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_row_slave_skip_error_all.result new file mode 100644 index 00000000..7b23dd4b --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_row_slave_skip_error_all.result @@ -0,0 +1,46 @@ +include/master-slave.inc +Warnings: +Note #### Sending passwords in plain text without SSL/TLS is extremely insecure. +Note #### Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information. +[connection master] +CREATE TABLE t (name VARCHAR(25) DEFAULT NULL) ENGINE=InnoDB; +include/sync_slave_sql_with_master.inc +call mtr.add_suppression("Slave SQL.*Error executing row event: .Table .test.t. doesn.t exist., Error_code: 1146"); +call mtr.add_suppression("Slave SQL.*Column 0 of table .test.t. cannot be converted from type.* Error_code: 1677"); +call mtr.add_suppression("The slave coordinator and worker threads are stopped, possibly leaving data in inconsistent state"); +call mtr.add_suppression("Got error 1 during COMMIT"); +ALTER TABLE t CHANGE name name VARCHAR(255); +[connection master] +INSERT INTO t VALUE ('Amy'); +# Sync should be successful. Slave should not stop with an error +# ER_SLAVE_CONVERSION_FAILED. It should be up and running in spite +# of errors as we have set slave_skip_error=all. +include/sync_slave_sql_with_master.inc +DROP TABLE t; +[connection master] +UPDATE t SET name='New'; +# Sync should be successful. Slave should not stop with an error +# ER_NO_SUCH_TABLE. It should be up and running in spite of errors +# as we have set slave_skip_error=all. +include/sync_slave_sql_with_master.inc +# Enable a debug point to simulate failure during rows event cleanup. +SET @@GLOBAL.DEBUG= 'd,simulate_rows_event_cleanup_failure'; +[connection master] +UPDATE t SET name='Old'; +[connection slave] +# Since this is not an ignored error slave should stop. We only ignore the +# errors that are generated during the execution of an event. The other errors +# that are generated during commit/rollback failure, which takes place during cleanup +# cannot be ignored. +include/wait_for_slave_sql_error.inc [errno=1180] +==== Clean up ==== +SET @@GLOBAL.DEBUG= '$debug_saved'; +include/stop_slave_io.inc +RESET MASTER; +RESET SLAVE; +include/start_slave.inc +[connection master] +include/sync_slave_sql_with_master.inc +[connection master] +DROP TABLE t; +include/rpl_end.inc diff --git a/mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_server_uuid.result b/mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_server_uuid.result index 0a771d28..1447e482 100644 --- a/mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_server_uuid.result +++ b/mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_server_uuid.result @@ -9,7 +9,7 @@ CALL mtr.add_suppression(".*master and slave have equal MySQL server UUIDs.*"); CALL mtr.add_suppression("Master's UUID has changed, although this should not happen unless you have changed it manually"); CALL mtr.add_suppression("Slave I/O: SET @master_heartbeat_period to master failed with error: Lost connection to MySQL server during query"); CALL mtr.add_suppression("Notifying master by SET @master_binlog_checksum= @@global.binlog_checksum failed with error"); -CALL mtr.add_suppression("A slave with the same server_uuid as this slave has connected to the master"); +CALL mtr.add_suppression("A slave with the same server_uuid/server_id as this slave has connected to the master"); include/sync_slave_sql_with_master.inc # Case 1: diff --git a/mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_sql_thread_error.result b/mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_sql_thread_error.result new file mode 100644 index 00000000..9745cd77 --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_sql_thread_error.result @@ -0,0 +1,17 @@ +include/master-slave.inc +Warnings: +Note #### Sending passwords in plain text without SSL/TLS is extremely insecure. +Note #### Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information. +[connection master] +[connection slave] +CALL mtr.add_suppression("Relay log read failure"); +SET @save_debug=@@GLOBAL.debug; +SET GLOBAL debug="d,force_sql_thread_error"; +START SLAVE SQL_THREAD; +include/wait_for_slave_sql_to_stop.inc +SET GLOBAL debug=@save_debug; +include/start_slave.inc +[connection master] +CREATE TABLE t1(i INT); +DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_zombie_dump_threads.result b/mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_zombie_dump_threads.result new file mode 100644 index 00000000..48d0428b --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_zombie_dump_threads.result @@ -0,0 +1,16 @@ +include/master-slave.inc +Warnings: +Note #### Sending passwords in plain text without SSL/TLS is extremely insecure. +Note #### Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information. +[connection master] +include/stop_dump_threads.inc +[connection slave] +SET @save_debug = @@GLOBAL.debug; +SET GLOBAL debug="d,fake_5_5_version_slave"; +include/start_slave_io.inc +include/stop_slave_io.inc +include/start_slave_io.inc +[connection master] +[connection slave] +SET GLOBAL debug=@save_debug; +include/rpl_end.inc diff --git a/mysql-wsrep-5.6/mysql-test/suite/rpl/t/disabled.def b/mysql-wsrep-5.6/mysql-test/suite/rpl/t/disabled.def index 738843a2..e0920dd2 100644 --- a/mysql-wsrep-5.6/mysql-test/suite/rpl/t/disabled.def +++ b/mysql-wsrep-5.6/mysql-test/suite/rpl/t/disabled.def @@ -15,4 +15,3 @@ rpl_delayed_slave : Bug#11764654 2010-11-09 andrei rpl_delayed_slave fai rpl_row_binlog_max_cache_size : BUG#14126780 May 29 2012 Vasil Dimov timeout if est number of rows is 3 instead of 4 rpl_test_framework : Too many servers started, so fails under Galera-enabled MTR rpl_rotate_logs : codership/mysql-wsrep##71 Regression: Duplicate "file was not purged because it is the active log file" warning -rpl.rpl_gtid_stress_failover : BUG#20630589 2015-10-06 parveez Test needs to be stabilized diff --git a/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_autoinc_lock_style.test b/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_autoinc_lock_style.test new file mode 100644 index 00000000..1f3e2a0e --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_autoinc_lock_style.test @@ -0,0 +1,46 @@ +############################################################################### +# Bug#22247668 SLAVE IS ~10X SLOWER TO EXECUTE SET OF STATEMENTS COMPARED TO +# MASTER RBR +# Problem: A new style of locking is implemented in Innodb. Starting from 5.6, +# Innodb uses this new style of locking for all the cases except for the case +# where for a simple (single/multi) row INSERTs, it fall back to old style +# locking if another transaction has already acquired the AUTOINC lock on behalf of +# a LOAD FILE or INSERT...SELECT etc. type of statement. But on +# Slave, in RBR format, it is always using old style auto inc +# algorithm. +# +# Steps to reproduce: +# 1) Setup DEBUG simulation point on Slave to bring the server down +# if the INSERT enters old style autoinc locking method. +# +# 2) Execute AUTOINC related work on Master. +# +# 3) Make sure that sync on slave happens without any issues. +# +############################################################################### +--source include/have_debug.inc +--source include/have_binlog_format_row.inc +--source include/master-slave.inc + +# Initial setup +CREATE TABLE t (i INT AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB; +--source include/sync_slave_sql_with_master.inc + +# Step-1 : Setup DEBUG simulation point on Slave to bring the server down +# if the INSERT enters old style autoinc locking method. +SET @save_debug=@@debug; +SET GLOBAL DEBUG='+d,die_if_autoinc_old_lock_style_used'; + +# Step-2 :Execute AUTOINC related work on Master. +--source include/rpl_connection_master.inc +INSERT INTO t VALUES (1); +DROP TABLE t; + +# Step-3: Due to above DEBUG simulation point, server will go down if it enters +# old autoinc lock style. After fix, sync on Slave happens without any issues. +--source include/sync_slave_sql_with_master.inc + +# Cleanup +# Reset the simulation point on Slave. +SET GLOBAL DEBUG=@save_debug; +--source include/rpl_end.inc diff --git a/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_gtid_stress_failover.cnf b/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_gtid_stress_failover.cnf deleted file mode 100644 index be3b6ebb..00000000 --- a/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_gtid_stress_failover.cnf +++ /dev/null @@ -1,61 +0,0 @@ -!include ../my.cnf -[mysqld.1] -gtid-mode=on -enforce-gtid-consistency -log-slave-updates - -[mysqld.2] -gtid-mode=on -enforce-gtid-consistency -log-slave-updates - -[mysqld.3] -gtid-mode=on -enforce-gtid-consistency -log-slave-updates -server-id=3 - -[mysqld.4] -gtid-mode=on -enforce-gtid-consistency -log-slave-updates -server-id=4 - -[mysqld.5] -gtid-mode=on -enforce-gtid-consistency -log-slave-updates -server-id=5 - -#[mysqld.6] -#gtid-mode=on -#enforce-gtid-consistency -#log-slave-updates -#server-id=6 -# -#[mysqld.7] -#gtid-mode=on -#enforce-gtid-consistency -#log-slave-updates -#server-id=7 -# -#[mysqld.8] -#gtid-mode=on -#enforce-gtid-consistency -#log-slave-updates -#server-id=8 -# -#[mysqld.9] -#gtid-mode=on -#enforce-gtid-consistency -#log-slave-updates -#server-id=9 - -[ENV] -SERVER_MYPORT_3= @mysqld.3.port -SERVER_MYPORT_4= @mysqld.4.port -SERVER_MYPORT_5= @mysqld.5.port -#SERVER_MYPORT_6= @mysqld.6.port -#SERVER_MYPORT_7= @mysqld.7.port -#SERVER_MYPORT_8= @mysqld.8.port -#SERVER_MYPORT_9= @mysqld.9.port diff --git a/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_gtid_stress_failover.test b/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_gtid_stress_failover.test deleted file mode 100644 index a2839201..00000000 --- a/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_gtid_stress_failover.test +++ /dev/null @@ -1,444 +0,0 @@ -# ==== Purpose ==== -# -# Test that it is possible to change the topology completely randomly, -# and the GTID system takes care of sending the correct transactions, -# as long as all servers generate non-conflicting transactions. -# -# ==== Implementation ==== -# -# Configure X servers and Y clients on each server. Iterate Z times. -# -# In each iteration, select a random server and select a random client -# on that server. On this connection, perform each of the following -# with a fixed probability: -# -# - A transaction (DML) -# - A DDL statement -# - FLUSH LOGS -# - CHANGE MASTER to a random other server -# -# After all iterations are done, change to a circular topology and -# wait for the servers to synchronize. Then check that all servers -# have the same data. -# -# Details: -# - We create as many databases as we have servers. -# - Each server only executes DML / DDL on one database. -# - Each database has one table per client. Initially, the table -# names are t_1_0, t_2_0, ..., t_Y_0, where Y is the number of -# clients per server, and all tables are empty. -# - The DDL consists in replacing the table by t_y_i, where i is the -# iteration counter and y is the client used in this iteration. -# t_y_i is empty. We do this in a funny way (see the code) just to -# use a couple of different DDL statements. -# - The DML consists in replacing the contents of t_y_*, by the value -# i, where i is the iteration counter and y is the client used in -# this iteration. We do this in a funny way (see the code) just to -# use a couple of diffrent DML statements. -# -# ==== Custom usage ==== -# -# You can alter the behavior of this test by setting the following -# variables (as environment variables or mtr variables): -# -# $debug -# If set, print all statements (default off) -# -# $max_iterations -# The maximal number of iterations to run. (default 10000) -# -# $max_seconds -# The maximal time to run iterations. (default 300) -# -# $n_servers -# The number of servers to run on (default 5) -# -# $n_clients_per_server -# The number of clients to use for each server (default 5) -# -# $change_master_probability -# The probability to execute CHANGE MASTER in each iteration (default 0.1) -# -# $flush_logs_probability -# The probability to execute FLUSH LOGS in each iteration (default 0.05) -# -# $dml_probability -# The probability to execute DML in each iteration (default 1) -# -# $ddl_probability -# The probability to execute DDL in each iteration (default 0.1) -# -# $deterministic -# By default, the random seed is taken to be a random number, -# different for each run, and the test is deliberately executing -# several tasks concurrently. If $deterministic is set, the random -# seed is taken to be the value of $deterministic, and the -# concurrency is reduced (but not entirely eliminated). -# -# ==== References ==== -# -# WL#3584: Global Transaction Identifiers -# - Created as part of this worklog -# BUG#18385953: RPL_GTID_STRESS_FAILOVER FAILS WITH "ERROR IN SYNC_WITH_MASTER.INC" -# - fixed bug in cleanup code - -#Want to skip this test from daily Valgrind execution ---source include/no_valgrind_without_big.inc ---source include/big_test.inc ---source include/have_gtid.inc - -# This test case has path issues when executing the -# external command mysqldump.exe on windows. Since -# what it tests is not platform dependent we disable -# it on Windows. ---source include/not_windows.inc - -# This test case fails in MTS mode due to BUG#12995174 -# once that bug is fixed, the following line should be -# removed so that the test is enabled in MTS ---source include/not_mts_slave_parallel_workers.inc - ---echo ==== Configure ==== - -if ($max_seconds == '') -{ - --let $max_seconds= 300 -} -if ($max_iterations == '') -{ - --let $max_iterations= 10000 -} -if (!$n_servers) -{ - --let $n_servers= 5 -} -if (!$n_clients_per_server) -{ - --let $n_clients_per_server= 5 -} - -if ($change_master_probability == '') -{ - --let $change_master_probability= 0.1 -} -if ($flush_logs_probability == '') -{ - --let $flush_logs_probability= 0.05 -} -if ($dml_probability == '') -{ - --let $dml_probability= 1 -} -if ($ddl_probability == '') -{ - --let $ddl_probability= 0.1 -} - -if ($deterministic != '') -{ - --let $rand_seed= $deterministic -} - ---echo ==== Initialize ==== - ---let $underscore= _ ---let $zero= 0 - -if (!$debug) -{ - --disable_query_log - --disable_result_log -} -if ($debug) -{ - --echo debug: n_servers=$n_servers n_clients_per_server=$n_clients_per_server max_iterations=$max_iterations max_seconds=$max_seconds - --echo debug: change_master_probability=$change_master_probability flush_logs_probability=$flush_logs_probability dml_probability=$dml_probability ddl_probability=$ddl_probability -} - ---let $circular_topology= 1 ---let $server_list= ---let $server= $n_servers -while ($server > 0) -{ - --let $circular_topology= $server->$circular_topology - --let $server_list= $server $server_list - --dec $server -} - ---let $rpl_extra_connections_per_server= $n_clients_per_server ---let $rpl_topology= $circular_topology ---let $use_gtids= 1 ---source include/rpl_init.inc - ---let $server= 1 -while ($server <= $n_servers) -{ - --connection server_$server - eval CREATE DATABASE db_$server; - - --let $client= 1 - while ($client <= $n_clients_per_server) - { - --let $connection= server_$server$underscore$client - --connection $connection - - eval CREATE TABLE db_$server.t_$client$underscore$zero (a INT) ENGINE = InnoDB; - eval SET @last_value = -1; - - --inc $client - } - --inc $server -} - ---source include/rpl_sync.inc ---source include/rpl_reset.inc - ---let $server= 1 -while ($server <= $n_servers) -{ - --let $client= 1 - while ($client <= $n_clients_per_server) - { - --connection server_$server$underscore$client - send SELECT 1; - --inc $client - } - --inc $server -} - - ---echo ==== Test ==== - ---connection default ---let $iteration= 1 ---let $start_time= `SELECT UNIX_TIMESTAMP()` ---let $done= 0 -while (!$done) -{ - --connection default - - --let $rand_type= int - --let $rand_min= 1 - --let $rand_max= $n_servers + 1 - --source include/rand.inc - --let $server= $rand - - --let $rand_max= $n_clients_per_server + 1 - --source include/rand.inc - --let $client= $rand - - --let $rand_type= decide - --let $rand_probability= $change_master_probability - --source include/rand.inc - --let $do_change_master= $rand - - --let $rand_probability= $flush_logs_probability - --source include/rand.inc - --let $do_flush_logs= $rand - - --let $rand_probability= $dml_probability - --source include/rand.inc - --let $do_dml= $rand - - --let $rand_probability= $ddl_probability - --source include/rand.inc - --let $do_ddl= $rand - - if ($debug) - { - --echo debug: server=$server client=$client change_master=$do_change_master flush=$do_flush_logs dml=$do_dml ddl=$do_ddl - } - - --let $connection= server_$server$underscore$client - --connection $connection - - if ($do_change_master) - { - --reap - - # Computes a random number between 1 and $n_servers that is - # different from $server. - --let $rand_type= int - --let $rand_min= 0 - --let $rand_max= $n_servers - 1 - --source include/rand.inc - --let $new_master= `SELECT 1 + (($server + $rand) % $n_servers)` - if ($debug) - { - --echo change master for $server to $new_master - } - - --let $include_silent= 1 - --source include/stop_slave.inc - - --let $port= \$SERVER_MYPORT_$new_master - --disable_warnings - eval CHANGE MASTER TO MASTER_HOST = '127.0.0.1', - MASTER_PORT = $port, - MASTER_USER = 'root', - MASTER_CONNECT_RETRY = 1, - MASTER_AUTO_POSITION = 1; - --enable_warnings - - --source include/start_slave.inc - --let $include_silent= 0 - # give something for the next reap - send SELECT 1; - } - - if ($do_flush_logs) - { - --reap - send FLUSH LOGS; - } - - if ($do_dml) - { - --reap - --let $t= `SHOW TABLES IN db_$server LIKE 't_$client$underscore%'` - --let $t= db_$server.$t - --let $last_value= `SELECT @last_value` - --delimiter | - send| - eval - BEGIN; - INSERT INTO $t VALUES (-1); - UPDATE $t SET a = $iteration WHERE a = $last_value; - DELETE FROM $t WHERE a = -1; - COMMIT; - SET @last_value= $iteration; - | - --delimiter ; - } - - if ($do_ddl) - { - --reap - --let $t= `SHOW TABLES IN db_$server LIKE 't_$client$underscore%'` - --let $t= db_$server.$t - --delimiter | - send| - eval - CREATE TABLE db_$server.t_$client (a INT) ENGINE = InnoDB; - DROP TABLE $t; - RENAME TABLE db_$server.t_$client TO db_$server.t_$client$underscore$iteration; - SET @last_value = -1; - | - --delimiter ; - } - - if ($deterministic != '') - { - --reap - --sleep 2 - --send SELECT 1 - } - - --inc $iteration - - if ($iteration > $max_iterations) - { - --let $done= 1 - } - --connection default - --let $elapsed_time= `SELECT UNIX_TIMESTAMP() - $start_time` - if ($elapsed_time > $max_seconds) - { - --let $done= 1 - } -} -if ($debug) -{ - --echo exited after iteration $iteration, $elapsed_time seconds (max_seconds=$max_seconds, start_time=$start_time) -} -# extra debug info for show_rpl_debug_info ---let $extra_debug_info= iterations=$iterations - - ---echo ==== Sync ==== - ---echo Reap all sent queries. ---let $server= 1 -while ($server <= $n_servers) -{ - --let $client= 1 - while ($client <= $n_clients_per_server) - { - --connection server_$server$underscore$client - --reap - --inc $client - } - --inc $server -} - -# Wait for replication to catch up ---connection default - ---source include/rpl_stop_slaves.inc - ---let $rpl_topology= $circular_topology ---let $rpl_extra_connections_per_server= 5 ---let $rpl_unconditional_change_master= 1 ---source include/rpl_change_topology.inc - ---source include/rpl_start_slaves.inc - ---source include/rpl_sync.inc - - ---echo ==== Check result ==== - ---echo Check that GTID_EXECUTED is equal on all servers. ---let $server= 1 -while ($server <= $n_servers) -{ - --connection server_$server - --let $gtid_executed= `SELECT @@GLOBAL.GTID_EXECUTED` - if ($server > 1) - { - if ($last_gtid_executed != $gtid_executed) - { - --source include/show_rpl_debug_info.inc - --echo ERROR: GTID_EXECUTED differs between server 1 and server $server - --echo ERROR: GTID_EXECUTED on server 1: '$last_gtid_executed' - --echo ERROR: GTID_EXECUTED on server $server: '$gtid_executed' - --die GTID_EXECUTED differs between two servers - } - } - --let $last_gtid_executed= $gtid_executed - --inc $server -} - ---echo Check that database state is equal on all servers. ---let $diff_servers= $server_list ---source include/diff_servers.inc - - ---echo ==== Clean up ==== - -# drop database ---connection default ---let $server= 1 -while ($server <= $n_servers) -{ - eval DROP DATABASE db_$server; - --inc $server -} ---source include/rpl_sync.inc - -# restore AUTO_POSITION ---let $server= 1 -while ($server <= $n_servers) -{ - --connection server_$server - - --let $include_silent=1 - --source include/stop_slave.inc - CHANGE MASTER TO MASTER_AUTO_POSITION=0; - --source include/start_slave.inc - --let $include_silent=0 - - --inc $server -} - ---source include/rpl_end.inc diff --git a/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_mts_relay_log_post_crash_recovery-slave.opt b/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_mts_relay_log_post_crash_recovery-slave.opt new file mode 100644 index 00000000..14e093fa --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_mts_relay_log_post_crash_recovery-slave.opt @@ -0,0 +1 @@ +--slave-transaction-retries=0 --relay_log_info_repository=TABLE --master_info_repository=TABLE --sync_master_info=1 diff --git a/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_mts_relay_log_post_crash_recovery.test b/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_mts_relay_log_post_crash_recovery.test new file mode 100644 index 00000000..a6ee9994 --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_mts_relay_log_post_crash_recovery.test @@ -0,0 +1,40 @@ +############################################################################### +# Bug#21507981: REPLICATION POSITION LOST AFTER CRASH ON MTS CONFIGURED SLAVE +# +# Problem: +# ======== +# Enable MTS along with crash-safe replication tables. Make sure that the +# server +# is busily inserting data with multiple threads in parallel. Shutdown mysqld +# uncleanly (kill -9 or power off server without notice). +# +# Now users are restarting the server with --relay-log-recovery=1 to recover +# the +# crashed slave. +# +# This results in following error: +# ================================ +# 2015-06-24 13:49:03 3895 [ERROR] --relay-log-recovery cannot +# be executed when the slave was stopped with an error or +# killed in MTS mode; consider using RESET SLAVE or restart +# the server with --relay-log-recovery = 0 followed by +# START SLAVE UNTIL SQL_AFTER_MTS_GAPS. +# +# i.e relay-log-recovery will not work in MTS mode. +############################################################################### +# Following test demonstrates that when gaps are generated due to MTS crash +# but not due to an error then recovery should be successful with +# --relay-log-recovery=1 option. + +--source include/force_restart.inc +--source include/have_binlog_format_statement.inc +--source include/only_mts_slave_parallel_workers.inc +--source include/master-slave.inc + +--let $skip_slave_start_var= FALSE +--source extra/rpl_tests/rpl_mts_relay_log_recovery.test + +--let $skip_slave_start_var= TRUE +--source extra/rpl_tests/rpl_mts_relay_log_recovery.test + +--source include/rpl_end.inc diff --git a/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_mts_relay_log_recovery_on_error-slave.opt b/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_mts_relay_log_recovery_on_error-slave.opt new file mode 100644 index 00000000..14e093fa --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_mts_relay_log_recovery_on_error-slave.opt @@ -0,0 +1 @@ +--slave-transaction-retries=0 --relay_log_info_repository=TABLE --master_info_repository=TABLE --sync_master_info=1 diff --git a/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_mts_relay_log_recovery_on_error.test b/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_mts_relay_log_recovery_on_error.test new file mode 100644 index 00000000..e065d930 --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_mts_relay_log_recovery_on_error.test @@ -0,0 +1,115 @@ +############################################################################### +# Bug#21507981: REPLICATION POSITION LOST AFTER CRASH ON MTS CONFIGURED SLAVE +# +# Problem: +# ======== +# Enable MTS along with crash-safe replication tables. Make sure that the server +# is busily inserting data with multiple threads in parallel. Shutdown mysqld +# uncleanly (kill -9 or power off server without notice). +# +# Now users are restarting the server with --relay-log-recovery=1 to recover the +# crashed slave. +# +# This results in following error: +# ================================ +# 2015-06-24 13:49:03 3895 [ERROR] --relay-log-recovery cannot be executed when +# the slave was stopped with an error or killed in MTS mode; consider using +# RESET SLAVE or restart the server with --relay-log-recovery = 0 followed by +# START SLAVE UNTIL SQL_AFTER_MTS_GAPS. +# +# i.e relay-log-recovery will not work in MTS mode. +############################################################################### +# Following test demonstrates that when a gap is generated because MTS has +# stopped due to an error then attempting 'relay-log-recovery' will not be +# successful. Once the route cause of the error is eliminated restarting the +# recovery with relay-log-recovery=1 should fix the issue. +# +# Testing Method: +# =============== +# It first creates two databases (d1 and d2) and setup slave to use two parallel +# workers. The test case then insert on the slave a tuple that will block +# writes on d2 and generate gaps. Now COMMIT the blocking tuple on slave so +# that workers will proceed and apply the pending transactions. This will +# result in duplicate key error and slave will stop. Now crash the slave +# server and initiate relay-log-recovery. It should fail as slave has stopped +# due to an error. Eliminate the cause of duplicate key error by removing the +# local changes on slave. Restart the recovery process it should be +# successful. +--source include/force_restart.inc +--source include/have_binlog_format_statement.inc +--source include/only_mts_slave_parallel_workers.inc +--source include/master-slave.inc + +--source include/rpl_connection_slave.inc +call mtr.add_suppression("Duplicate entry*"); +call mtr.add_suppression("The slave coordinator and worker threads are stopped, possibly leaving data in inconsistent state"); +call mtr.add_suppression("Failed to initialize the master info structure"); +call mtr.add_suppression("Slave failed to initialize relay log info*"); +call mtr.add_suppression("MTS recovery: automatic recovery failed.*"); +call mtr.add_suppression("Recovery from master pos"); + +--source extra/rpl_tests/rpl_generate_mts_gap.test + +--source include/rpl_connection_slave.inc +COMMIT; +--let $slave_sql_errno= convert_error(ER_DUP_ENTRY) +source include/wait_for_slave_sql_error.inc; + +# Restart the slave server - Recovery will fail as MTS has stopped due to an +# error. +--let $rpl_server_number= 2 +--let $rpl_server_parameters= --skip_slave_start=TRUE --relay_log_info_repository=TABLE --master_info_repository=TABLE --sync_master_info=1 --relay-log-recovery=1 +--source include/rpl_restart_server.inc + +--source include/rpl_connection_slave.inc +--exec echo "Relay log recovery should fail as MTS stopped due to an error" + +--error ER_SLAVE_RLI_INIT_REPOSITORY +START SLAVE; + +# Remove the affending rows from slave. +--exec echo "Eliminate the cause of MTS error" +DELETE FROM d2.t WHERE a=2; +DELETE FROM d1.t WHERE a=3; + +--let $table=d2.t +--let $count=1 +--source include/wait_until_rows_count.inc + +--let $table=d1.t +--let $count=2 +--source include/wait_until_rows_count.inc + +# Restart the slave server this should fix the gaps. +--let $rpl_server_number= 2 +--let $rpl_server_parameters= --skip_slave_start=TRUE --relay_log_info_repository=TABLE --master_info_repository=TABLE --sync_master_info=1 --relay-log-recovery=1 +--source include/rpl_restart_server.inc + +--exec echo "MTS recovery should be successful. Check that gaps are filled." + +--let $assert_text= Table d1.t should contain 2 rows. +--let $assert_cond= [select count(*) from d1.t] = 2 +--source include/assert.inc + +--let $assert_text= Table d2.t should contain 3 rows. +--let $assert_cond= [select count(*) from d2.t] = 3 +--source include/assert.inc + +--source include/start_slave.inc + +# Check consistency +--source include/rpl_connection_master.inc +--source include/sync_slave_sql_with_master.inc +--let $diff_tables= master:d1.t, slave:d1.t +--source include/diff_tables.inc + +--let $diff_tables= master:d2.t, slave:d2.t +--source include/diff_tables.inc + +# +# Cleanup +# +--source include/rpl_connection_master.inc +DROP DATABASE d1; +DROP DATABASE d2; +--source include/rpl_end.inc diff --git a/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_parallel_change_master.test b/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_parallel_change_master.test index dec525af..f4357b10 100644 --- a/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_parallel_change_master.test +++ b/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_parallel_change_master.test @@ -106,7 +106,7 @@ SET @@global.slave_parallel_workers= @save.slave_parallel_workers; # cleanup --connection slave SELECT @@global.relay_log_recovery as 'must be ON'; -call mtr.add_suppression("--relay-log-recovery cannot be executed when the slave was stopped with an error or killed in MTS mode; consider using RESET SLAVE or restart the server with --relay-log-recovery = 0"); +call mtr.add_suppression("MTS recovery: automatic recovery failed.*"); call mtr.add_suppression("Failed to initialize the master info structure"); # # the following suppression applies to either restart. diff --git a/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_row_img_sanity.test b/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_row_img_sanity.test index af60b0fa..25dfde18 100644 --- a/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_row_img_sanity.test +++ b/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_row_img_sanity.test @@ -806,10 +806,73 @@ let $slave_sql_errno= 1032; source include/wait_for_slave_sql_error.inc; DROP TABLE t; --let $rpl_only_running_threads= 1 + +# ==== Purpose ==== +# +# Check that when binlog_row_image= FULL 'UPDATE' query should not using +# temporary if the PRIMARY KEY not being modified as part of the query. +# +# ==== Implementation ==== +# +# Set binlog_row_image= FULL. Create a table which has both a primary key and +# a regular int field which is not a key. Execute an UPDATE statement in such +# a way that it doesn't update the primary key field. See the 'EXPLAIN' output +# it should not use a temporary table. Repeat the same test in case of +# binlog_row_image= NOBLOB as well. No temporary table should be used in this +# case as well. +# +# ==== References ==== +# +# Bug#22510353: UNNECESSARY USING TEMPORARY FOR UPDATE +# +############################################################################### -- source include/rpl_reset.inc +-- connection master +-- let $row_img_set=master:FULL:N,slave:FULL:Y +-- source include/rpl_row_img_set.inc +CREATE TABLE t1(id INT PRIMARY KEY, a INT) ENGINE = INNODB; -## CLEAN UP +--source include/sync_slave_sql_with_master.inc + +-- connection master +-- let $row_img_query= INSERT INTO t1 (id, a) VALUES (1, 1) +-- let $row_img_expected_master= | 1:1 2:1 +-- let $row_img_expected_slave = | 1:1 2:1 +-- source include/rpl_row_img_parts_master_slave.inc + +-- echo "Case: FULL - EXPLAIN output should not display Using temporary" +EXPLAIN UPDATE t1 SET a=a+1 WHERE id < 2; + +-- let $row_img_query= UPDATE t1 SET a=a+1 WHERE id < 2 +-- let $row_img_expected_master= 1:1 2:1 | 1:1 2:2 +-- let $row_img_expected_slave = 1:1 2:1 | 1:1 2:2 +-- source include/rpl_row_img_parts_master_slave.inc +-- let $row_img_set=master:NOBLOB:N,slave:NOBLOB:Y +-- source include/rpl_row_img_set.inc + +-- echo "Case: NOBLOB - EXPLAIN output should not display Using temporary" +EXPLAIN UPDATE t1 SET a=a+1 WHERE id < 2; + +-- let $row_img_query= UPDATE t1 SET a=a+1 WHERE id < 2 +-- let $row_img_expected_master= 1:1 2:2 | 1:1 2:3 +-- let $row_img_expected_slave = 1:1 2:2 | 1:1 2:3 +-- source include/rpl_row_img_parts_master_slave.inc + +-- let $row_img_set=master:MINIMAL:N,slave:MINIMAL:Y +-- source include/rpl_row_img_set.inc + +EXPLAIN UPDATE t1 SET a=a+1 WHERE id < 2; + +-- let $row_img_query= UPDATE t1 SET a=a+1 WHERE id < 2 +-- let $row_img_expected_master= 1:1 | 2:4 +-- let $row_img_expected_slave = 1:1 | 2:4 +-- source include/rpl_row_img_parts_master_slave.inc + +DROP TABLE t1; +--source include/sync_slave_sql_with_master.inc + +## CLEAN UP -- connection master SET GLOBAL binlog_row_image= @old_binlog_row_image; SET SESSION binlog_row_image= @old_binlog_row_image; diff --git a/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_row_slave_skip_error_all-slave.opt b/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_row_slave_skip_error_all-slave.opt new file mode 100644 index 00000000..ea52372a --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_row_slave_skip_error_all-slave.opt @@ -0,0 +1 @@ +--slave-skip-errors=all --log_warnings=2 diff --git a/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_row_slave_skip_error_all.test b/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_row_slave_skip_error_all.test new file mode 100644 index 00000000..b70444da --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_row_slave_skip_error_all.test @@ -0,0 +1,80 @@ +# ==== Purpose ==== +# +# Check that slave-skip-errors skips following errors like +# ER_SLAVE_CONVERSION_FAILED and ER_NO_SUCH_TABLE. +# +# ==== Implementation ==== +# On slave, set slave_skip_errors=all, so that slave skips all the errors that +# are reported during application of row based events. +# +# On master, create a table t with a varchar filed of length 25. On slave +# increase the varchar field width to 255, so that updates that are received +# from master will fail on slave with error ER_SLAVE_CONVERSION_FAILED. +# +# Secondly drop the table t on slave and try to the update the table from +# master. The updates will fail on slave with an error ER_NO_SUCH_TABLE. +# +# Verify that slave doesn't break inspite of these errors. +# ==== References ==== +# +# Bug#17653275:--SLAVE-SKIP-ERRORS WON'T SKIP MISSING DATABASE/TABLE +################################################################################ +--source include/have_debug.inc +--source include/have_binlog_format_row.inc +--source include/master-slave.inc + +# On master create table t which contains a field named 'name' with length +# varchar(25). +CREATE TABLE t (name VARCHAR(25) DEFAULT NULL) ENGINE=InnoDB; +--source include/sync_slave_sql_with_master.inc + +# On slave alter the name field length to varchar(255). +call mtr.add_suppression("Slave SQL.*Error executing row event: .Table .test.t. doesn.t exist., Error_code: 1146"); +call mtr.add_suppression("Slave SQL.*Column 0 of table .test.t. cannot be converted from type.* Error_code: 1677"); +call mtr.add_suppression("The slave coordinator and worker threads are stopped, possibly leaving data in inconsistent state"); +call mtr.add_suppression("Got error 1 during COMMIT"); +ALTER TABLE t CHANGE name name VARCHAR(255); + +--source include/rpl_connection_master.inc +INSERT INTO t VALUE ('Amy'); +--echo # Sync should be successful. Slave should not stop with an error +--echo # ER_SLAVE_CONVERSION_FAILED. It should be up and running in spite +--echo # of errors as we have set slave_skip_error=all. +--source include/sync_slave_sql_with_master.inc + +# Drop the table t on slave. +DROP TABLE t; + +--source include/rpl_connection_master.inc +UPDATE t SET name='New'; +--echo # Sync should be successful. Slave should not stop with an error +--echo # ER_NO_SUCH_TABLE. It should be up and running in spite of errors +--echo # as we have set slave_skip_error=all. +--source include/sync_slave_sql_with_master.inc + +--echo # Enable a debug point to simulate failure during rows event cleanup. +--let $debug_saved= `SELECT @@GLOBAL.DEBUG` +SET @@GLOBAL.DEBUG= 'd,simulate_rows_event_cleanup_failure'; + +--source include/rpl_connection_master.inc +UPDATE t SET name='Old'; +--source include/rpl_connection_slave.inc +--echo # Since this is not an ignored error slave should stop. We only ignore the +--echo # errors that are generated during the execution of an event. The other errors +--echo # that are generated during commit/rollback failure, which takes place during cleanup +--echo # cannot be ignored. +--let $slave_sql_errno= convert_error(ER_ERROR_DURING_COMMIT); +--source include/wait_for_slave_sql_error.inc +--echo ==== Clean up ==== +SET @@GLOBAL.DEBUG= '$debug_saved'; +--source include/stop_slave_io.inc +RESET MASTER; +RESET SLAVE; +--source include/start_slave.inc + +--source include/rpl_connection_master.inc +--source include/sync_slave_sql_with_master.inc + +--source include/rpl_connection_master.inc +DROP TABLE t; +--source include/rpl_end.inc diff --git a/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_server_uuid.test b/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_server_uuid.test index ec74b83a..a393716c 100644 --- a/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_server_uuid.test +++ b/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_server_uuid.test @@ -22,7 +22,7 @@ CALL mtr.add_suppression(".*master and slave have equal MySQL server UUIDs.*"); CALL mtr.add_suppression("Master's UUID has changed, although this should not happen unless you have changed it manually"); CALL mtr.add_suppression("Slave I/O: SET @master_heartbeat_period to master failed with error: Lost connection to MySQL server during query"); CALL mtr.add_suppression("Notifying master by SET @master_binlog_checksum= @@global.binlog_checksum failed with error"); -CALL mtr.add_suppression("A slave with the same server_uuid as this slave has connected to the master"); +CALL mtr.add_suppression("A slave with the same server_uuid/server_id as this slave has connected to the master"); --let $uuid_file= auto.cnf @@ -299,7 +299,7 @@ eval CHANGE MASTER TO --let $assert_file=$MYSQLTEST_VARDIR/log/mysqld.2.err # Assert only the occurrences after the last CHANGE MASTER --let $assert_only_after=CHANGE MASTER .* executed ---let $assert_select= Slave .* Got fatal error .* from master .* slave with the same server_uuid as this slave +--let $assert_select= Slave .* Got fatal error .* from master .* slave with the same server_uuid/server_id as this slave --let $assert_text= Found the expected line in server 2 error log --source include/assert_grep.inc diff --git a/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_sql_thread_error.test b/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_sql_thread_error.test new file mode 100644 index 00000000..7f0845da --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_sql_thread_error.test @@ -0,0 +1,53 @@ +############################################################################### +# +# Bug#21697821 RELAYLOG.LOG_LOCK IS NOT RELEASED IN +# AN ERROR CASE (IN NEXT_EVENT()) +# +# Problem: In an error case, relaylog.log_lock acquired by SQL thread is not +# released which is causing all threads, which are looking to acquire +# the lock, to hang forever. +# +# Steps to reproduce: +# +# 1) Inject sql thread error using a simulation point and start SQL thread. +# +# 2) Wait till SQL thread goes down (before fix, it wont release the log_lock). +# +# 3) start SQL thread (before fix, it will wait for log_lock) +# +# 4) After the fix, make sure the replication is working fine. +# +############################################################################### + +--source include/have_debug.inc +--source include/have_binlog_format_statement.inc +--let rpl_skip_start_slave=1 +--source include/master-slave.inc + +# Step 1) Set a simulation on Slave SQL thread so that it enters +# into faulty code (before fix) path. +--source include/rpl_connection_slave.inc +CALL mtr.add_suppression("Relay log read failure"); +SET @save_debug=@@GLOBAL.debug; +SET GLOBAL debug="d,force_sql_thread_error"; + +# Start SQL thread +START SLAVE SQL_THREAD; + +# Step 2) Wait for SQL thread to go down with the injected error. +# Before fix, SQL thread would not have released +# relay_log.log_lock. +--source include/wait_for_slave_sql_to_stop.inc + +# Step 3) Before fix, when SQL thread is trying to acquire +# relay_log.log_lock which was not released will hang +# forever. +SET GLOBAL debug=@save_debug; +--source include/start_slave.inc + +# Step 4) Execute dummy statements on master and see that it +# replication is working fine. +--source include/rpl_connection_master.inc +CREATE TABLE t1(i INT); +DROP TABLE t1; +--source include/rpl_end.inc diff --git a/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_zombie_dump_threads.test b/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_zombie_dump_threads.test new file mode 100644 index 00000000..d6bd56af --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_zombie_dump_threads.test @@ -0,0 +1,59 @@ +############################################################################### +# Bug#21179199 ZOMBIE DUMP THREADS ARE NOT DISCONNECTED, +# CAN ALSO LEAD TO A CRASH +# +# Problem: Zombie dump threads on Master (>= MySQL-5.6 version) +# that are created to server slaves which are on lower +# versions than MySQL-5.6 version are not getting killed. +# Steps to reproduce: +# +# 1) A simulation point on slave to fake that server MySQL version is lower +# than MySQL-5.6 (i.e., no slave_uuid set in initial replication protocol) +# +# 2) Start IO thread on Slave which will start a dump thread on Master. +# +# 3) Restart the IO thread (Master should kill existing dump thread before +# starting a new dump thread) +# +# 4) Now count the number of dump threads on Master, it should be only '1'. +# +############################################################################### +--source include/have_debug.inc +--source include/have_binlog_format_statement.inc +--let rpl_skip_start_slave= 1 +--source include/master-slave.inc + +# When this test script is running in combination with other tests, +# it is possible that dump threads from those tests are not killed. +# (rpl_end.inc does not kill dump threads). +# Hence doing the cleanup here as this test depends on counting the +# active dump threads. +--source include/stop_dump_threads.inc + +# Step-1) A simulation point on slave to fake that server MySQL version +# is lower than MySQL-5.6 (i.e., no slave_uuid set in initial replication +# protocol). +--source include/rpl_connection_slave.inc +SET @save_debug = @@GLOBAL.debug; +SET GLOBAL debug="d,fake_5_5_version_slave"; + +# Step-2) Start IO thread on Slave which will start a dump thread on Master. +--source include/start_slave_io.inc + +# Step-3) Restart the IO thread (Master should kill existing dump thread before +# starting a new dump thread) +--source include/stop_slave_io.inc +--source include/start_slave_io.inc + +# Step-4) Count the number of dump threads on Master, it should be eventually +# become '1'. +--source include/rpl_connection_master.inc +--let $wait_condition= SELECT COUNT(*) = 1 FROM information_schema.processlist WHERE COMMAND LIKE 'Binlog Dump%' +--source include/wait_condition.inc + +# Cleanup +--source include/rpl_connection_slave.inc +SET GLOBAL debug=@save_debug; +# We do not care about SQL thread for this test scenario +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-wsrep-5.6/mysql-test/t/func_str.test b/mysql-wsrep-5.6/mysql-test/t/func_str.test index 03e2444e..cebf670c 100644 --- a/mysql-wsrep-5.6/mysql-test/t/func_str.test +++ b/mysql-wsrep-5.6/mysql-test/t/func_str.test @@ -1733,6 +1733,15 @@ SELECT id, insert(':', 1, 0, d) FROM t1; SELECT id, insert(0x3a, 1, 0, d) FROM t1; DROP TABLE t1; +--echo # +--echo # Bug#22888420 CONCAT_WS: ASSERTION FAILED: !S.USES_BUFFER_OWNED_BY(THIS) +--echo # + +do concat('a',concat_ws('a', 0x2859, 'a' , + trim(period_add('a',1) from (1&'')) + ) + ); + --echo # --echo # End of 5.6 tests --echo # diff --git a/mysql-wsrep-5.6/mysql-test/t/innodb_explain_json_non_select_all.test b/mysql-wsrep-5.6/mysql-test/t/innodb_explain_json_non_select_all.test index addfd383..81241414 100644 --- a/mysql-wsrep-5.6/mysql-test/t/innodb_explain_json_non_select_all.test +++ b/mysql-wsrep-5.6/mysql-test/t/innodb_explain_json_non_select_all.test @@ -22,12 +22,10 @@ set @save_storage_engine= @@session.default_storage_engine; set session default_storage_engine = InnoDB; --let $innodb = 1 -# Next 2 variables control the JSON format output and validation in explain_utils. +# Next variable controls the JSON format output in explain_utils. # 1 = enable, 0 = disable --let $json = 1 -# Validation disabled due to not having Python with JSON on all PB machines. ---let $validation = 0 ---file_exists $MYSQL_TEST_DIR/suite/opt_trace/validate_json.py +--file_exists $MYSQL_TEST_DIR/suite/opt_trace/validate_json.pl --source include/explain_non_select.inc set default_storage_engine= @save_storage_engine; diff --git a/mysql-wsrep-5.6/mysql-test/t/innodb_explain_json_non_select_none.test b/mysql-wsrep-5.6/mysql-test/t/innodb_explain_json_non_select_none.test index 63ff4d25..b89bbf7c 100644 --- a/mysql-wsrep-5.6/mysql-test/t/innodb_explain_json_non_select_none.test +++ b/mysql-wsrep-5.6/mysql-test/t/innodb_explain_json_non_select_none.test @@ -30,11 +30,9 @@ if (`select locate('mrr', @@optimizer_switch) > 0`) set @save_storage_engine= @@session.default_storage_engine; set session default_storage_engine = InnoDB; --let $innodb = 1 -# Next 2 variables control the JSON format output and validation in explain_utils. +# Next variable controls the JSON format output in explain_utils. # 1 = enable, 0 = disable --let $json = 1 -# Validation disabled due to not having Python with JSON on all PB machines. ---let $validation = 0 --source include/explain_non_select.inc set default_storage_engine= @save_storage_engine; diff --git a/mysql-wsrep-5.6/mysql-test/t/innodb_explain_non_select_all.test b/mysql-wsrep-5.6/mysql-test/t/innodb_explain_non_select_all.test index a8e7bbfa..0a5df0b6 100644 --- a/mysql-wsrep-5.6/mysql-test/t/innodb_explain_non_select_all.test +++ b/mysql-wsrep-5.6/mysql-test/t/innodb_explain_non_select_all.test @@ -20,9 +20,8 @@ set @save_storage_engine= @@session.default_storage_engine; set session default_storage_engine = InnoDB; --let $innodb = 1 -# json validation in explain_util.inc can be switched off by setting to zero. +# json format in explain_util.inc can be switched off by setting to zero. --let $json = 0 ---let $validation = 0 --source include/explain_non_select.inc set default_storage_engine= @save_storage_engine; diff --git a/mysql-wsrep-5.6/mysql-test/t/innodb_explain_non_select_none.test b/mysql-wsrep-5.6/mysql-test/t/innodb_explain_non_select_none.test index e2030bd8..0a039d1e 100644 --- a/mysql-wsrep-5.6/mysql-test/t/innodb_explain_non_select_none.test +++ b/mysql-wsrep-5.6/mysql-test/t/innodb_explain_non_select_none.test @@ -29,7 +29,6 @@ set @save_storage_engine= @@session.default_storage_engine; set session default_storage_engine = InnoDB; --let $innodb = 1 --let $json = 0 ---let $validation = 0 --source include/explain_non_select.inc set default_storage_engine= @save_storage_engine; diff --git a/mysql-wsrep-5.6/mysql-test/t/insert.test b/mysql-wsrep-5.6/mysql-test/t/insert.test index 35c82321..fff8d49e 100644 --- a/mysql-wsrep-5.6/mysql-test/t/insert.test +++ b/mysql-wsrep-5.6/mysql-test/t/insert.test @@ -591,3 +591,25 @@ UPDATE t1, t2 SET t2.fld2= t2.fld2 + 3; UPDATE t1, t2 SET t1.fld1= t1.fld1 + 3; DROP TABLE t2, t1; + + +--echo # +--echo # BUG#22037930: INSERT IGNORE FAILS TO IGNORE FOREIGN +--echo # KEY CONSTRAINT + +CREATE TABLE t1 (fld1 INT PRIMARY KEY) ENGINE= INNODB; + +CREATE TABLE t2 (fld1 VARCHAR(10), fld2 INT NOT NULL, +CONSTRAINT fk FOREIGN KEY (fld2) REFERENCES t1(fld1)) ENGINE= INNODB; + +--echo # Without patch, reports incorrect error. +--error ER_NO_REFERENCED_ROW_2 +INSERT INTO t2 VALUES('abc', 2) ON DUPLICATE KEY UPDATE fld1= 'def'; +--error ER_NO_REFERENCED_ROW_2 +REPLACE INTO t2 VALUES('abc', 2); + +--enable_warnings +INSERT IGNORE INTO t2 VALUES('abc', 2) ON DUPLICATE KEY UPDATE fld1= 'def'; +--disable_warnings + +DROP TABLE t2, t1; diff --git a/mysql-wsrep-5.6/mysql-test/t/loaddata.test b/mysql-wsrep-5.6/mysql-test/t/loaddata.test index aa7be524..9a664b84 100644 --- a/mysql-wsrep-5.6/mysql-test/t/loaddata.test +++ b/mysql-wsrep-5.6/mysql-test/t/loaddata.test @@ -610,7 +610,7 @@ disconnect con1; --echo # CREATE TABLE t1(f1 INT); -EVAL SELECT 0xE1BB30 INTO OUTFILE 't1.dat'; +EVAL SELECT 0xE1C330 INTO OUTFILE 't1.dat'; --disable_warnings LOAD DATA INFILE 't1.dat' IGNORE INTO TABLE t1 CHARACTER SET utf8; --enable_warnings @@ -656,3 +656,26 @@ SET @@sql_mode= @old_mode; --remove_file $MYSQLTEST_VARDIR/mysql DROP TABLE t1; +--echo +--echo # +--echo # Bug#23080148 - Backport of Bug#20683959. +--echo # Bug#20683959 LOAD DATA INFILE IGNORES A SPECIFIC ROW SILENTLY +--echo # UNDER DB CHARSET IS UTF8. +--echo # + +CREATE DATABASE d1 CHARSET latin1; +USE d1; +CREATE TABLE t1 (val TEXT); +LOAD DATA INFILE '../../std_data/bug20683959loaddata.txt' INTO TABLE t1; +SELECT COUNT(*) FROM t1; +SELECT HEX(val) FROM t1; + +CREATE DATABASE d2 CHARSET utf8; +USE d2; +CREATE TABLE t1 (val TEXT); +--error ER_INVALID_CHARACTER_STRING +LOAD DATA INFILE '../../std_data/bug20683959loaddata.txt' INTO TABLE t1; + +DROP TABLE d1.t1, d2.t1; +DROP DATABASE d1; +DROP DATABASE d2; diff --git a/mysql-wsrep-5.6/mysql-test/t/myisam_explain_json_non_select_all.test b/mysql-wsrep-5.6/mysql-test/t/myisam_explain_json_non_select_all.test index 040e9880..822c96fc 100644 --- a/mysql-wsrep-5.6/mysql-test/t/myisam_explain_json_non_select_all.test +++ b/mysql-wsrep-5.6/mysql-test/t/myisam_explain_json_non_select_all.test @@ -15,11 +15,9 @@ set optimizer_switch='semijoin=on,materialization=on,firstmatch=on,loosescan=on, set @save_storage_engine= @@session.default_storage_engine; set session default_storage_engine = MyISAM; -# Next 2 variables control the JSON format output and validation in explain_utils. +# Next variable controls the JSON format output in explain_utils. # 1 = enable, 0 = disable --let $json = 1 -# Validation disabled due to not having Python with JSON on all PB machines. ---let $validation = 0 --source include/explain_non_select.inc set default_storage_engine= @save_storage_engine; diff --git a/mysql-wsrep-5.6/mysql-test/t/myisam_explain_json_non_select_none.test b/mysql-wsrep-5.6/mysql-test/t/myisam_explain_json_non_select_none.test index a99407e1..d5ac303d 100644 --- a/mysql-wsrep-5.6/mysql-test/t/myisam_explain_json_non_select_none.test +++ b/mysql-wsrep-5.6/mysql-test/t/myisam_explain_json_non_select_none.test @@ -25,11 +25,9 @@ if (`select locate('mrr', @@optimizer_switch) > 0`) set @save_storage_engine= @@session.default_storage_engine; set session default_storage_engine = MyISAM; -# Next 2 variables control the JSON format output and validation in explain_utils. +# Next variable controls the JSON format output in explain_utils. # 1 = enable, 0 = disable --let $json = 1 -# Validation disabled due to not having Python with JSON on all PB machines. ---let $validation = 0 --source include/explain_non_select.inc set default_storage_engine= @save_storage_engine; diff --git a/mysql-wsrep-5.6/mysql-test/t/myisam_explain_non_select_all.test b/mysql-wsrep-5.6/mysql-test/t/myisam_explain_non_select_all.test index 0b77e643..d6d715d2 100644 --- a/mysql-wsrep-5.6/mysql-test/t/myisam_explain_non_select_all.test +++ b/mysql-wsrep-5.6/mysql-test/t/myisam_explain_non_select_all.test @@ -14,7 +14,6 @@ set optimizer_switch='semijoin=on,materialization=on,firstmatch=on,loosescan=on, set @save_storage_engine= @@session.default_storage_engine; set session default_storage_engine = MyISAM; --let $json = 0 ---let $validation = 0 --source include/explain_non_select.inc set default_storage_engine= @save_storage_engine; diff --git a/mysql-wsrep-5.6/mysql-test/t/myisam_explain_non_select_none.test b/mysql-wsrep-5.6/mysql-test/t/myisam_explain_non_select_none.test index b585dfa3..ca0b2506 100644 --- a/mysql-wsrep-5.6/mysql-test/t/myisam_explain_non_select_none.test +++ b/mysql-wsrep-5.6/mysql-test/t/myisam_explain_non_select_none.test @@ -24,7 +24,6 @@ if (`select locate('mrr', @@optimizer_switch) > 0`) set @save_storage_engine= @@session.default_storage_engine; set session default_storage_engine = MyISAM; --let $json = 0 ---let $validation = 0 --source include/explain_non_select.inc set default_storage_engine= @save_storage_engine; diff --git a/mysql-wsrep-5.6/mysql-test/t/mysql_client_test_qcache-master.opt b/mysql-wsrep-5.6/mysql-test/t/mysql_client_test_qcache-master.opt new file mode 100644 index 00000000..a00258bc --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/t/mysql_client_test_qcache-master.opt @@ -0,0 +1 @@ +--query_cache_type=1 diff --git a/mysql-wsrep-5.6/mysql-test/t/mysql_client_test_qcache.test b/mysql-wsrep-5.6/mysql-test/t/mysql_client_test_qcache.test new file mode 100644 index 00000000..8b3a6ebc --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/t/mysql_client_test_qcache.test @@ -0,0 +1,21 @@ +# This test should work in embedded server after we fix mysqltest +-- source include/not_embedded.inc + +--echo # Bug#22559575 "the statement (1) has no open cursor" pops sometimes with +--echo # prepared+query_cache +--echo # +--echo # Create relevent tables and call C API test cases +--echo # Setup + +select VARIABLE_VALUE into @qcache_hit_val1 from + information_schema.GLOBAL_STATUS where VARIABLE_NAME = 'Qcache_hits'; + +--echo +--echo #Run C_API test case +--exec echo "$MYSQL_CLIENT_TEST --silent test_bug22559575" > $MYSQLTEST_VARDIR/log/mysql_client_test_qcache.out.log 2>&1 +--exec $MYSQL_CLIENT_TEST --silent test_bug22559575 >> $MYSQLTEST_VARDIR/log/mysql_client_test_qcache.out.log 2>&1 + +select VARIABLE_VALUE into @qcache_hit_val2 from + information_schema.GLOBAL_STATUS where VARIABLE_NAME = 'Qcache_hits'; +SELECT @qcache_hit_val2 - @qcache_hit_val1; + diff --git a/mysql-wsrep-5.6/mysql-test/t/mysqlbinlog.test b/mysql-wsrep-5.6/mysql-test/t/mysqlbinlog.test index 726df628..adfa1445 100644 --- a/mysql-wsrep-5.6/mysql-test/t/mysqlbinlog.test +++ b/mysql-wsrep-5.6/mysql-test/t/mysqlbinlog.test @@ -374,7 +374,7 @@ FLUSH LOGS; --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR eval SELECT (@a:=LOAD_FILE("$binlog_file")) -IS NOT NULL; +IS NOT NULL AS Loaded; let $s_id_unsigned= `SELECT @a LIKE "%server id $s_id_max%" /* must return 1 */`; echo *** Unsigned server_id $s_id_max is found: $s_id_unsigned ***; diff --git a/mysql-wsrep-5.6/mysql-test/t/sp-prelocking.test b/mysql-wsrep-5.6/mysql-test/t/sp-prelocking.test index 966c59a5..f835b3fa 100644 --- a/mysql-wsrep-5.6/mysql-test/t/sp-prelocking.test +++ b/mysql-wsrep-5.6/mysql-test/t/sp-prelocking.test @@ -388,3 +388,41 @@ DROP TABLE t1, t2; --echo End of 5.0 tests +--echo # +--echo # Bug#21142859: FUNCTION UPDATING A VIEW FAILS TO FIND TABLE THAT ACTUALLY EXISTS +--echo # + +CREATE TABLE t1 SELECT 1 AS fld1, 'A' AS fld2; +CREATE TABLE t2 (fld3 INT, fld4 CHAR(1)); + +CREATE VIEW v1 AS SELECT * FROM t1; + +CREATE TRIGGER t1_au AFTER UPDATE ON t1 +FOR EACH ROW INSERT INTO t2 VALUES (new.fld1, new.fld2); + +DELIMITER !; +CREATE FUNCTION f1() RETURNS INT +BEGIN + UPDATE v1 SET fld2='B' WHERE fld1=1; + RETURN row_count(); +END ! +DELIMITER ;! + +--echo # Without the patch, an error was getting reported. +SELECT f1(); + +DROP FUNCTION f1; +DROP VIEW v1; +DROP TABLE t1,t2; + +--echo # +--echo # Bug #16672723 "CAN'T FIND TEMPORARY TABLE". +--echo # +CREATE FUNCTION f1() RETURNS INT RETURN 1; +CREATE TEMPORARY TABLE tmp1(a INT); +PREPARE stmt1 FROM "CREATE TEMPORARY TABLE tmp2 AS SELECT b FROM (SELECT f1() AS b FROM tmp1) AS t"; +--echo # The below statement failed before the fix. +EXECUTE stmt1; +DROP TEMPORARY TABLES tmp1, tmp2; +DEALLOCATE PREPARE stmt1; +DROP FUNCTION f1; diff --git a/mysql-wsrep-5.6/mysql-test/t/ssl_ca-master.opt b/mysql-wsrep-5.6/mysql-test/t/ssl_ca-master.opt new file mode 100644 index 00000000..9bd47571 --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/t/ssl_ca-master.opt @@ -0,0 +1,3 @@ +--ssl-ca=$MYSQL_TEST_DIR/std_data/crl-ca-cert.pem +--ssl-key=$MYSQL_TEST_DIR/std_data/crl-server-key.pem +--ssl-cert=$MYSQL_TEST_DIR/std_data/crl-server-cert.pem diff --git a/mysql-wsrep-5.6/mysql-test/t/ssl_ca.test b/mysql-wsrep-5.6/mysql-test/t/ssl_ca.test new file mode 100644 index 00000000..bc6ef557 --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/t/ssl_ca.test @@ -0,0 +1,32 @@ +--source include/have_ssl.inc +--source include/not_embedded.inc + +--echo # +--echo # Bug#21920657: SSL-CA FAILS SILENTLY IF THE PATH CANNOT BE FOUND +--echo # + +--echo # try to connect with wrong '--ssl-ca' path : should fail +--error 1 +--exec $MYSQL --ssl-ca=$MYSQL_TEST_DIR/std_data/wrong-crl-ca-cert.pem --ssl-key=$MYSQL_TEST_DIR/std_data/crl-client-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/crl-client-cert.pem test -e "SHOW STATUS LIKE 'Ssl_cipher'" 2>&1 + +--echo # try to connect with correct '--ssl-ca' path : should connect +--exec $MYSQL --ssl-ca=$MYSQL_TEST_DIR/std_data/crl-ca-cert.pem --ssl-key=$MYSQL_TEST_DIR/std_data/crl-client-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/crl-client-cert.pem test -e "SHOW STATUS LIKE 'Ssl_cipher'" + +--echo # +--echo # Bug#21920678: SSL-CA DOES NOT ACCEPT ~USER TILDE HOME DIRECTORY +--echo # PATH SUBSTITUTION +--echo # + +--let $mysql_test_dir_path= `SELECT REPLACE('$MYSQL_TEST_DIR', '$HOME', '~')` + +--echo # try to connect with '--ssl-ca' option using tilde home directoy +--echo # path substitution : should connect +--exec $MYSQL --ssl-ca=$mysql_test_dir_path/std_data/crl-ca-cert.pem --ssl-key=$MYSQL_TEST_DIR/std_data/crl-client-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/crl-client-cert.pem test -e "SHOW STATUS LIKE 'Ssl_cipher'" + +--echo # try to connect with '--ssl-key' option using tilde home directoy +--echo # path substitution : should connect +--exec $MYSQL --ssl-ca=$MYSQL_TEST_DIR/std_data/crl-ca-cert.pem --ssl-key=$mysql_test_dir_path/std_data/crl-client-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/crl-client-cert.pem test -e "SHOW STATUS LIKE 'Ssl_cipher'" + +--echo # try to connect with '--ssl-cert' option using tilde home directoy +--echo # path substitution : should connect +--exec $MYSQL --ssl-ca=$MYSQL_TEST_DIR/std_data/crl-ca-cert.pem --ssl-key=$MYSQL_TEST_DIR/std_data/crl-client-key.pem --ssl-cert=$mysql_test_dir_path/std_data/crl-client-cert.pem test -e "SHOW STATUS LIKE 'Ssl_cipher'" diff --git a/mysql-wsrep-5.6/mysql-test/t/ssl_crl.test b/mysql-wsrep-5.6/mysql-test/t/ssl_crl.test index ce54e42d..81da28a0 100644 --- a/mysql-wsrep-5.6/mysql-test/t/ssl_crl.test +++ b/mysql-wsrep-5.6/mysql-test/t/ssl_crl.test @@ -21,3 +21,20 @@ if (!$crllen) --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR --error 1 --exec $MYSQL --ssl-ca=$MYSQL_TEST_DIR/std_data/crl-ca-cert.pem --ssl-key=$MYSQL_TEST_DIR/std_data/crl-client-revoked-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/crl-client-revoked-cert.pem test -e "SHOW VARIABLES like '%ssl%';" + +--echo # +--echo # Bug#21920678: SSL-CA DOES NOT ACCEPT ~USER TILDE HOME DIRECTORY +--echo # PATH SUBSTITUTION +--echo # + +--let $mysql_test_dir_path= `SELECT REPLACE('$MYSQL_TEST_DIR', '$HOME', '~')` + +--echo # try to connect with '--ssl-crl' option using tilde home directoy +--echo # path substitution : should connect +--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR +--exec $MYSQL --ssl-ca=$MYSQL_TEST_DIR/std_data/crl-ca-cert.pem --ssl-key=$MYSQL_TEST_DIR/std_data/crl-client-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/crl-client-cert.pem test --ssl-crl=$mysql_test_dir_path/std_data/crl-client-revoked.crl -e "SHOW STATUS LIKE 'Ssl_cipher'" + +--echo # try to connect with '--ssl-crlpath' option using tilde home directoy +--echo # path substitution : should connect +--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR +--exec $MYSQL --ssl-ca=$MYSQL_TEST_DIR/std_data/crl-ca-cert.pem --ssl-key=$MYSQL_TEST_DIR/std_data/crl-client-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/crl-client-cert.pem --ssl-crlpath=$mysql_test_dir_path/std_data/crldir test -e "SHOW STATUS LIKE 'Ssl_cipher'" diff --git a/mysql-wsrep-5.6/mysql-test/t/udf_services-master.opt b/mysql-wsrep-5.6/mysql-test/t/udf_services-master.opt new file mode 100644 index 00000000..fad70153 --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/t/udf_services-master.opt @@ -0,0 +1 @@ +$TESTUDFSERVICES_OPT diff --git a/mysql-wsrep-5.6/mysql-test/t/udf_services.test b/mysql-wsrep-5.6/mysql-test/t/udf_services.test new file mode 100644 index 00000000..91e43e71 --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/t/udf_services.test @@ -0,0 +1,25 @@ +--source include/not_embedded.inc + +--echo # +--echo # Bug #20085672: CRYPTIC ERROR WHEN FAILING TO UNLOAD A DYNAMIC LIBRARY +--echo # + +--echo # Install the plugin +--replace_result $TESTUDFSERVICES TESTUDFSERVICES +eval INSTALL PLUGIN test_udf_services SONAME '$TESTUDFSERVICES'; + +--echo # Define the function +--replace_result $TESTUDFSERVICES TESTUDFSERVICES +eval CREATE FUNCTION test_udf_services_udf RETURNS INT + SONAME "$TESTUDFSERVICES"; + +--echo # Uninstall the plugin +UNINSTALL PLUGIN test_udf_services; + +--echo # Install the plugin again. Should not fail +--replace_result $TESTUDFSERVICES TESTUDFSERVICES +eval INSTALL PLUGIN test_udf_services SONAME '$TESTUDFSERVICES'; + +--echo # Cleanup +DROP FUNCTION test_udf_services_udf; +UNINSTALL PLUGIN test_udf_services; diff --git a/mysql-wsrep-5.6/mysql-test/t/validate_password_plugin.test b/mysql-wsrep-5.6/mysql-test/t/validate_password_plugin.test index 94a73831..c1795e2f 100644 --- a/mysql-wsrep-5.6/mysql-test/t/validate_password_plugin.test +++ b/mysql-wsrep-5.6/mysql-test/t/validate_password_plugin.test @@ -264,6 +264,23 @@ SET @@global.validate_password_policy=DEFAULT; remove_file $MYSQLTEST_VARDIR/tmp/dictionary.txt; remove_file $MYSQLTEST_VARDIR/tmp/dictionary2.txt; +--echo # +--echo # Bug#21616496: CREATE USER ACCEPTS PLUGIN AND PASSWORD HASH, +--echo # BUT IGNORES THE PASSWORD HASH +--echo # + +--error ER_NOT_VALID_PASSWORD +CREATE USER 'user1'@'localhost' IDENTIFIED WITH 'mysql_native_password'; + +--error ER_NOT_VALID_PASSWORD +CREATE USER 'user1'@'localhost' IDENTIFIED WITH 'mysql_old_password'; + +--error ER_NOT_VALID_PASSWORD +CREATE USER 'user1'@'localhost' IDENTIFIED WITH 'mysql_native_password' AS '*0D3CED9BEC10A777AEC23CCC353A8C08A633045E'; + +--error ER_NOT_VALID_PASSWORD +CREATE USER 'user1'@'localhost' IDENTIFIED WITH 'mysql_old_password' AS '*0D3CED9BEC10A777AEC23CCC353A8C08A633045E'; + --echo # clean up after the test UNINSTALL PLUGIN validate_password; diff --git a/mysql-wsrep-5.6/mysql-test/t/variables-win.test b/mysql-wsrep-5.6/mysql-test/t/variables-win.test new file mode 100644 index 00000000..ddb92c6f --- /dev/null +++ b/mysql-wsrep-5.6/mysql-test/t/variables-win.test @@ -0,0 +1,15 @@ +--source include/windows.inc + + +--echo # +--echo # Bug #23747899: @@basedir sysvar value not normalized if set through +--echo # the command line/ini file + +--echo # There should be no slashes in @@basedir and just backslashes +--echo # since it's normalized +SELECT + LOCATE('/', @@basedir) <> 0 AS have_slashes, + LOCATE('\\', @@basedir) <> 0 AS have_backslashes; + + +--echo End of the 5.6 tests diff --git a/mysql-wsrep-5.6/mysql-test/t/wl6443_deprecation.test b/mysql-wsrep-5.6/mysql-test/t/wl6443_deprecation.test index 3ef9c2bc..86d5e4bc 100644 --- a/mysql-wsrep-5.6/mysql-test/t/wl6443_deprecation.test +++ b/mysql-wsrep-5.6/mysql-test/t/wl6443_deprecation.test @@ -80,6 +80,9 @@ perl; my $count_warnings= $count_warnings; print "Deprecation warning count : $count_warnings\n"; close(FILE); + # Truncate the log file so that repititions of the test don't pick up deprecation warnings from previous runs + open(FILE,">$logf") or die("Unable to open $logf for truncation $!\n"); + close(FILE); EOF -- source include/mysql_upgrade_preparation.inc diff --git a/mysql-wsrep-5.6/mysql-test/valgrind.supp b/mysql-wsrep-5.6/mysql-test/valgrind.supp index 2bff5ebe..40d83cfc 100644 --- a/mysql-wsrep-5.6/mysql-test/valgrind.supp +++ b/mysql-wsrep-5.6/mysql-test/valgrind.supp @@ -934,25 +934,6 @@ fun:malloc_info } -{ - GitHub codership/mysql-wsrep#176 - Memcheck:Leak - fun:_Z16wsrep_get_paramsRKN6galera10ReplicatorE - fun:galera_parameters_get - fun:_ZL24refresh_provider_optionsv - fun:_Z29wsrep_provider_options_updateP7sys_varP3THD13enum_var_type - fun:_ZN7sys_var6updateEP3THDP7set_var - fun:_ZN7set_var6updateEP3THD - fun:_Z17sql_set_variablesP3THDP4ListI12set_var_baseE - fun:_Z21mysql_execute_commandP3THD - fun:_Z11mysql_parseP3THDPcjP12Parser_state - fun:_ZL17wsrep_mysql_parseP3THDPcjP12Parser_state - fun:_Z16dispatch_command19enum_server_commandP3THDPcj - fun:_Z10do_commandP3THD - fun:_Z24do_handle_one_connectionP3THD - fun:handle_one_connection -} - { GitHub codership/galera#330 Memcheck:Leak @@ -1046,31 +1027,6 @@ g codership/mysql-wsrep/issues#176 fun:_Z16wsrep_set_paramsRN6galera10ReplicatorEPKc } -{ - codership/mysql-wsrep/issues#176 - Memcheck:Leak - fun:_Z16wsrep_get_paramsRKN6galera10ReplicatorE -} - -{ - codership/mysql-wsrep/issues#176 - Memcheck:Leak - fun:_Z16wsrep_get_paramsRKN6galera10ReplicatorE - fun:galera_parameters_get - fun:_ZL24refresh_provider_optionsv - fun:_Z21wsrep_provider_updateP7sys_varP3THD13enum_var_type - fun:_ZN7sys_var6updateEP3THDP7set_var - fun:_ZN7set_var6updateEP3THD - fun:_Z17sql_set_variablesP3THDP4ListI12set_var_baseE - fun:_Z21mysql_execute_commandP3THD - fun:_Z11mysql_parseP3THDPcjP12Parser_state - fun:_ZL17wsrep_mysql_parseP3THDPcjP12Parser_state - fun:_Z16dispatch_command19enum_server_commandP3THDPcj - fun:_Z10do_commandP3THD - fun:_Z24do_handle_one_connectionP3THD - fun:handle_one_connection -} - { codership/mysql-wsrep/issues#176 Memcheck:Leak @@ -1181,72 +1137,6 @@ g codership/mysql-wsrep/issues#176 fun:_Z24do_handle_one_connectionP3THD } -{ - codership/mysql-wsrep/issues#176 - Memcheck:Leak - match-leak-kinds: possible - fun:malloc - fun:strdup - fun:_Z16wsrep_get_paramsRKN6galera10ReplicatorE - fun:galera_parameters_get - fun:_ZL24refresh_provider_optionsv - fun:_Z29wsrep_provider_options_updateP7sys_varP3THD13enum_var_type - fun:_ZN7sys_var6updateEP3THDP7set_var - fun:_ZN7set_var6updateEP3THD - fun:_Z17sql_set_variablesP3THDP4ListI12set_var_baseE - fun:_Z21mysql_execute_commandP3THD - fun:_Z11mysql_parseP3THDPcjP12Parser_state - fun:_ZL17wsrep_mysql_parseP3THDPcjP12Parser_state - fun:_Z16dispatch_command19enum_server_commandP3THDPcj - fun:_Z10do_commandP3THD - fun:_Z24do_handle_one_connectionP3THD - fun:handle_one_connection -} - -{ - codership/mysql-wsrep/issues#176 - Memcheck:Leak - match-leak-kinds: definite - fun:malloc - fun:strdup - fun:_Z16wsrep_get_paramsRKN6galera10ReplicatorE - fun:galera_parameters_get - fun:_ZL24refresh_provider_optionsv - fun:_Z29wsrep_provider_options_updateP7sys_varP3THD13enum_var_type - fun:_ZN7sys_var6updateEP3THDP7set_var - fun:_ZN7set_var6updateEP3THD - fun:_Z17sql_set_variablesP3THDP4ListI12set_var_baseE - fun:_Z21mysql_execute_commandP3THD - fun:_Z11mysql_parseP3THDPcjP12Parser_state - fun:_ZL17wsrep_mysql_parseP3THDPcjP12Parser_state - fun:_Z16dispatch_command19enum_server_commandP3THDPcj - fun:_Z10do_commandP3THD - fun:_Z24do_handle_one_connectionP3THD - fun:handle_one_connection -} - -{ - codership/mysql-wsrep/issues#176 - Memcheck:Leak - match-leak-kinds: definite - fun:malloc - fun:strdup - fun:_Z16wsrep_get_paramsRKN6galera10ReplicatorE - fun:galera_parameters_get - fun:_ZL24refresh_provider_optionsv - fun:_Z21wsrep_provider_updateP7sys_varP3THD13enum_var_type - fun:_ZN7sys_var6updateEP3THDP7set_var - fun:_ZN7set_var6updateEP3THD - fun:_Z17sql_set_variablesP3THDP4ListI12set_var_baseE - fun:_Z21mysql_execute_commandP3THD - fun:_Z11mysql_parseP3THDPcjP12Parser_state - fun:_ZL17wsrep_mysql_parseP3THDPcjP12Parser_state - fun:_Z16dispatch_command19enum_server_commandP3THDPcj - fun:_Z10do_commandP3THD - fun:_Z24do_handle_one_connectionP3THD - fun:handle_one_connection -} - { codership/galera#331 Memcheck:Leak diff --git a/mysql-wsrep-5.6/mysys/charset-def.c b/mysql-wsrep-5.6/mysys/charset-def.c index ab8991ff..0c95d840 100644 --- a/mysql-wsrep-5.6/mysys/charset-def.c +++ b/mysql-wsrep-5.6/mysys/charset-def.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -161,7 +161,7 @@ extern CHARSET_INFO my_charset_utf8mb4_vietnamese_ci; #endif /* HAVE_UCA_COLLATIONS */ -my_bool init_compiled_charsets(myf flags __attribute__((unused))) +my_bool init_compiled_charsets(myf flags MY_ATTRIBUTE((unused))) { CHARSET_INFO *cs; diff --git a/mysql-wsrep-5.6/mysys/charset.c b/mysql-wsrep-5.6/mysys/charset.c index d98dc774..9d9a4ce6 100644 --- a/mysql-wsrep-5.6/mysys/charset.c +++ b/mysql-wsrep-5.6/mysys/charset.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -357,8 +357,8 @@ static int add_collation(CHARSET_INFO *cs) Be silent by default: no warnings on the client side. */ static void -default_reporter(enum loglevel level __attribute__ ((unused)), - const char *format __attribute__ ((unused)), +default_reporter(enum loglevel level MY_ATTRIBUTE ((unused)), + const char *format MY_ATTRIBUTE ((unused)), ...) { } @@ -1040,3 +1040,22 @@ size_t escape_quotes_for_mysql(CHARSET_INFO *charset_info, *to= 0; return overflow ? (ulong)~0 : (ulong) (to - to_start); } + +#if defined(EXPORT_SYMVER16) +#ifndef EMBEDDED_LIBRARY + +// Hack to provide Fedora symbols + +CHARSET_INFO *mysql_get_charset(uint cs_number, myf flags) +{ + return get_charset(cs_number, flags); +} + + +CHARSET_INFO * mysql_get_charset_by_csname(const char *cs_name, uint cs_flags, myf flags) +{ + return get_charset_by_csname(cs_name, cs_flags, flags); +} + +#endif +#endif /* EXPORT_SYMVER16 */ diff --git a/mysql-wsrep-5.6/mysys/errors.c b/mysql-wsrep-5.6/mysys/errors.c index 963ccb3f..2209a8a3 100644 --- a/mysql-wsrep-5.6/mysys/errors.c +++ b/mysql-wsrep-5.6/mysys/errors.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/mysql-wsrep-5.6/mysys/mf_cache.c b/mysql-wsrep-5.6/mysys/mf_cache.c index 545084ea..10c410e0 100644 --- a/mysql-wsrep-5.6/mysys/mf_cache.c +++ b/mysql-wsrep-5.6/mysys/mf_cache.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -26,7 +26,7 @@ this, just remember the file name for later removal */ -static my_bool cache_remove_open_tmp(IO_CACHE *cache __attribute__((unused)), +static my_bool cache_remove_open_tmp(IO_CACHE *cache MY_ATTRIBUTE((unused)), const char *name) { #if O_TEMPORARY == 0 diff --git a/mysql-wsrep-5.6/mysys/mf_iocache.c b/mysql-wsrep-5.6/mysys/mf_iocache.c index da66d458..015acf2c 100644 --- a/mysql-wsrep-5.6/mysys/mf_iocache.c +++ b/mysql-wsrep-5.6/mysys/mf_iocache.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -323,7 +323,7 @@ static void my_aiowait(my_aio_result *result) my_bool reinit_io_cache(IO_CACHE *info, enum cache_type type, my_off_t seek_offset, - pbool use_async_io __attribute__((unused)), + pbool use_async_io MY_ATTRIBUTE((unused)), pbool clear_cache) { DBUG_ENTER("reinit_io_cache"); @@ -1129,7 +1129,7 @@ static void copy_to_read_buffer(IO_CACHE *write_cache, while (write_length) { size_t copy_length= MY_MIN(write_length, write_cache->buffer_length); - int __attribute__((unused)) rc; + int MY_ATTRIBUTE((unused)) rc; rc= lock_io_cache(write_cache, write_cache->pos_in_file); /* The writing thread does always have the lock when it awakes. */ @@ -1732,7 +1732,7 @@ int my_block_write(register IO_CACHE *info, const uchar *Buffer, size_t Count, unlock_append_buffer(info); int my_b_flush_io_cache(IO_CACHE *info, - int need_append_buffer_lock __attribute__((unused))) + int need_append_buffer_lock MY_ATTRIBUTE((unused))) { size_t length; my_off_t pos_in_file; diff --git a/mysql-wsrep-5.6/mysys/mf_keycache.c b/mysql-wsrep-5.6/mysys/mf_keycache.c index cf37b457..b6758316 100644 --- a/mysql-wsrep-5.6/mysys/mf_keycache.c +++ b/mysql-wsrep-5.6/mysys/mf_keycache.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -2498,8 +2498,8 @@ static void read_block(KEY_CACHE *keycache, uchar *key_cache_read(KEY_CACHE *keycache, File file, my_off_t filepos, int level, uchar *buff, uint length, - uint block_length __attribute__((unused)), - int return_buffer __attribute__((unused))) + uint block_length MY_ATTRIBUTE((unused)), + int return_buffer MY_ATTRIBUTE((unused))) { my_bool locked_and_incremented= FALSE; int error=0; @@ -2979,7 +2979,7 @@ int key_cache_insert(KEY_CACHE *keycache, int key_cache_write(KEY_CACHE *keycache, File file, my_off_t filepos, int level, uchar *buff, uint length, - uint block_length __attribute__((unused)), + uint block_length MY_ATTRIBUTE((unused)), int dont_write) { my_bool locked_and_incremented= FALSE; @@ -4206,7 +4206,7 @@ static int flush_all_key_blocks(KEY_CACHE *keycache) 0 on success (always because it can't fail) */ -int reset_key_cache_counters(const char *name __attribute__((unused)), +int reset_key_cache_counters(const char *name MY_ATTRIBUTE((unused)), KEY_CACHE *key_cache) { DBUG_ENTER("reset_key_cache_counters"); @@ -4230,9 +4230,9 @@ int reset_key_cache_counters(const char *name __attribute__((unused)), /* Test if disk-cache is ok */ -static void test_key_cache(KEY_CACHE *keycache __attribute__((unused)), - const char *where __attribute__((unused)), - my_bool lock __attribute__((unused))) +static void test_key_cache(KEY_CACHE *keycache MY_ATTRIBUTE((unused)), + const char *where MY_ATTRIBUTE((unused)), + my_bool lock MY_ATTRIBUTE((unused))) { /* TODO */ } diff --git a/mysql-wsrep-5.6/mysys/mf_keycaches.c b/mysql-wsrep-5.6/mysys/mf_keycaches.c index b49a46f2..cdc66b75 100644 --- a/mysql-wsrep-5.6/mysys/mf_keycaches.c +++ b/mysql-wsrep-5.6/mysys/mf_keycaches.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -77,7 +77,7 @@ static void safe_hash_entry_free(SAFE_HASH_ENTRY *entry) /* Get key and length for a SAFE_HASH_ENTRY */ static uchar *safe_hash_entry_get(SAFE_HASH_ENTRY *entry, size_t *length, - my_bool not_used __attribute__((unused))) + my_bool not_used MY_ATTRIBUTE((unused))) { *length=entry->length; return (uchar*) entry->key; diff --git a/mysql-wsrep-5.6/mysys/mf_tempfile.c b/mysql-wsrep-5.6/mysys/mf_tempfile.c index 62b3e097..eaab5388 100644 --- a/mysql-wsrep-5.6/mysys/mf_tempfile.c +++ b/mysql-wsrep-5.6/mysys/mf_tempfile.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -55,8 +55,8 @@ */ File create_temp_file(char *to, const char *dir, const char *prefix, - int mode __attribute__((unused)), - myf MyFlags __attribute__((unused))) + int mode MY_ATTRIBUTE((unused)), + myf MyFlags MY_ATTRIBUTE((unused))) { File file= -1; #ifdef __WIN__ diff --git a/mysql-wsrep-5.6/mysys/mf_unixpath.c b/mysql-wsrep-5.6/mysys/mf_unixpath.c index 6777c27b..05df11ed 100644 --- a/mysql-wsrep-5.6/mysys/mf_unixpath.c +++ b/mysql-wsrep-5.6/mysys/mf_unixpath.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -24,7 +24,7 @@ @param to A pathname. */ -void to_unix_path(char *to __attribute__((unused))) +void to_unix_path(char *to MY_ATTRIBUTE((unused))) { #if FN_LIBCHAR != '/' { diff --git a/mysql-wsrep-5.6/mysys/my_access.c b/mysql-wsrep-5.6/mysys/my_access.c index 13ebe51f..e963866f 100644 --- a/mysql-wsrep-5.6/mysys/my_access.c +++ b/mysql-wsrep-5.6/mysys/my_access.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -187,9 +187,9 @@ static my_bool does_drive_exists(char drive_letter) @return TRUE if the file name is allowed, FALSE otherwise. */ -my_bool is_filename_allowed(const char *name __attribute__((unused)), - size_t length __attribute__((unused)), - my_bool allow_current_dir __attribute__((unused))) +my_bool is_filename_allowed(const char *name MY_ATTRIBUTE((unused)), + size_t length MY_ATTRIBUTE((unused)), + my_bool allow_current_dir MY_ATTRIBUTE((unused))) { /* For Windows, check if the file name contains : character. diff --git a/mysql-wsrep-5.6/mysys/my_alarm.c b/mysql-wsrep-5.6/mysys/my_alarm.c index fb36d69a..582088d8 100644 --- a/mysql-wsrep-5.6/mysys/my_alarm.c +++ b/mysql-wsrep-5.6/mysys/my_alarm.c @@ -1,5 +1,4 @@ -/* Copyright (C) 2000 MySQL AB - Use is subject to license terms +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -12,7 +11,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* Function to set a varible when we got a alarm */ /* Used by my_lock samt functions in m_alarm.h */ @@ -24,7 +23,7 @@ #ifdef HAVE_ALARM /* ARGSUSED */ -sig_handler my_set_alarm_variable(int signo __attribute__((unused))) +sig_handler my_set_alarm_variable(int signo MY_ATTRIBUTE((unused))) { my_have_got_alarm=1; /* Tell program that time expired */ return; diff --git a/mysql-wsrep-5.6/mysys/my_alloc.c b/mysql-wsrep-5.6/mysys/my_alloc.c index 731760af..e689fb35 100644 --- a/mysql-wsrep-5.6/mysys/my_alloc.c +++ b/mysql-wsrep-5.6/mysys/my_alloc.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -44,7 +44,7 @@ */ void init_alloc_root(MEM_ROOT *mem_root, size_t block_size, - size_t pre_alloc_size __attribute__((unused))) + size_t pre_alloc_size MY_ATTRIBUTE((unused))) { DBUG_ENTER("init_alloc_root"); DBUG_PRINT("enter",("root: 0x%lx", (long) mem_root)); @@ -94,7 +94,7 @@ void init_alloc_root(MEM_ROOT *mem_root, size_t block_size, */ void reset_root_defaults(MEM_ROOT *mem_root, size_t block_size, - size_t pre_alloc_size __attribute__((unused))) + size_t pre_alloc_size MY_ATTRIBUTE((unused))) { DBUG_ASSERT(alloc_root_inited(mem_root)); diff --git a/mysql-wsrep-5.6/mysys/my_bitmap.c b/mysql-wsrep-5.6/mysys/my_bitmap.c index 7f2888b0..d9ecd35e 100644 --- a/mysql-wsrep-5.6/mysys/my_bitmap.c +++ b/mysql-wsrep-5.6/mysys/my_bitmap.c @@ -1,5 +1,5 @@ /* - Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -81,14 +81,14 @@ void create_last_word_mask(MY_BITMAP *map) } -static inline void bitmap_lock(MY_BITMAP *map __attribute__((unused))) +static inline void bitmap_lock(MY_BITMAP *map MY_ATTRIBUTE((unused))) { if (map->mutex) mysql_mutex_lock(map->mutex); } -static inline void bitmap_unlock(MY_BITMAP *map __attribute__((unused))) +static inline void bitmap_unlock(MY_BITMAP *map MY_ATTRIBUTE((unused))) { if (map->mutex) mysql_mutex_unlock(map->mutex); @@ -136,7 +136,7 @@ static inline uint get_first_not_set(uint32 value, uint word_pos) my_bool bitmap_init(MY_BITMAP *map, my_bitmap_map *buf, uint n_bits, - my_bool thread_safe __attribute__((unused))) + my_bool thread_safe MY_ATTRIBUTE((unused))) { DBUG_ENTER("bitmap_init"); if (!buf) diff --git a/mysql-wsrep-5.6/mysys/my_fopen.c b/mysql-wsrep-5.6/mysys/my_fopen.c index dc640a07..e3a933a0 100644 --- a/mysql-wsrep-5.6/mysys/my_fopen.c +++ b/mysql-wsrep-5.6/mysys/my_fopen.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -147,7 +147,7 @@ static FILE *my_win_freopen(const char *path, const char *mode, FILE *stream) /* No close operation hook. */ -static int no_close(void *cookie __attribute__((unused))) +static int no_close(void *cookie MY_ATTRIBUTE((unused))) { return 0; } diff --git a/mysql-wsrep-5.6/mysys/my_fstream.c b/mysql-wsrep-5.6/mysys/my_fstream.c index 263d8ba8..26b6c451 100644 --- a/mysql-wsrep-5.6/mysys/my_fstream.c +++ b/mysql-wsrep-5.6/mysys/my_fstream.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -171,7 +171,7 @@ size_t my_fwrite(FILE *stream, const uchar *Buffer, size_t Count, myf MyFlags) /* Seek to position in file */ my_off_t my_fseek(FILE *stream, my_off_t pos, int whence, - myf MyFlags __attribute__((unused))) + myf MyFlags MY_ATTRIBUTE((unused))) { DBUG_ENTER("my_fseek"); DBUG_PRINT("my",("stream: 0x%lx pos: %lu whence: %d MyFlags: %d", @@ -183,7 +183,7 @@ my_off_t my_fseek(FILE *stream, my_off_t pos, int whence, /* Tell current position of file */ -my_off_t my_ftell(FILE *stream, myf MyFlags __attribute__((unused))) +my_off_t my_ftell(FILE *stream, myf MyFlags MY_ATTRIBUTE((unused))) { off_t pos; DBUG_ENTER("my_ftell"); diff --git a/mysql-wsrep-5.6/mysys/my_gethwaddr.c b/mysql-wsrep-5.6/mysys/my_gethwaddr.c index 42f5e3ea..32b2593f 100644 --- a/mysql-wsrep-5.6/mysys/my_gethwaddr.c +++ b/mysql-wsrep-5.6/mysys/my_gethwaddr.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -228,14 +228,14 @@ my_bool my_gethwaddr(uchar *to) #else /* __FreeBSD__ || __linux__ || __WIN__ */ /* just fail */ -my_bool my_gethwaddr(uchar *to __attribute__((unused))) +my_bool my_gethwaddr(uchar *to MY_ATTRIBUTE((unused))) { return 1; } #endif #else /* MAIN */ -int main(int argc __attribute__((unused)),char **argv) +int main(int argc MY_ATTRIBUTE((unused)),char **argv) { uchar mac[6]; uint i; diff --git a/mysql-wsrep-5.6/mysys/my_getsystime.c b/mysql-wsrep-5.6/mysys/my_getsystime.c index 40dc33e3..5e9ff149 100644 --- a/mysql-wsrep-5.6/mysys/my_getsystime.c +++ b/mysql-wsrep-5.6/mysys/my_getsystime.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -170,7 +170,7 @@ ulonglong my_micro_time_and_time(time_t *time_arg) @retval current time. */ -time_t my_time_possible_from_micro(ulonglong microtime __attribute__((unused))) +time_t my_time_possible_from_micro(ulonglong microtime MY_ATTRIBUTE((unused))) { #ifdef _WIN32 time_t t; diff --git a/mysql-wsrep-5.6/mysys/my_lib.c b/mysql-wsrep-5.6/mysys/my_lib.c index 470be096..204c79e8 100644 --- a/mysql-wsrep-5.6/mysys/my_lib.c +++ b/mysql-wsrep-5.6/mysys/my_lib.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -390,7 +390,7 @@ error: int my_fstat(File Filedes, MY_STAT *stat_area, - myf MyFlags __attribute__((unused))) + myf MyFlags MY_ATTRIBUTE((unused))) { DBUG_ENTER("my_fstat"); DBUG_PRINT("my",("fd: %d MyFlags: %d", Filedes, MyFlags)); diff --git a/mysql-wsrep-5.6/mysys/my_mess.c b/mysql-wsrep-5.6/mysys/my_mess.c index 8ee816b3..b7f175b5 100644 --- a/mysql-wsrep-5.6/mysys/my_mess.c +++ b/mysql-wsrep-5.6/mysys/my_mess.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ #include "mysys_priv.h" -void my_message_stderr(uint error __attribute__((unused)), +void my_message_stderr(uint error MY_ATTRIBUTE((unused)), const char *str, myf MyFlags) { DBUG_ENTER("my_message_stderr"); diff --git a/mysql-wsrep-5.6/mysys/my_redel.c b/mysql-wsrep-5.6/mysys/my_redel.c index 142491f3..1ce758b4 100644 --- a/mysql-wsrep-5.6/mysys/my_redel.c +++ b/mysql-wsrep-5.6/mysys/my_redel.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -35,6 +35,9 @@ struct utimbuf { if MY_REDEL_MAKE_COPY is given, then the orginal file is renamed to org_name-'current_time'.BAK + + if MY_REDEL_NO_COPY_STAT is given, stats are not copied + from org_name to tmp_name. */ #define REDEL_EXT ".BAK" @@ -46,8 +49,11 @@ int my_redel(const char *org_name, const char *tmp_name, myf MyFlags) DBUG_PRINT("my",("org_name: '%s' tmp_name: '%s' MyFlags: %d", org_name,tmp_name,MyFlags)); - if (my_copystat(org_name,tmp_name,MyFlags) < 0) - goto end; + if (!(MyFlags & MY_REDEL_NO_COPY_STAT)) + { + if (my_copystat(org_name,tmp_name,MyFlags) < 0) + goto end; + } if (MyFlags & MY_REDEL_MAKE_BACKUP) { char name_buff[FN_REFLEN+20]; diff --git a/mysql-wsrep-5.6/mysys/my_static.c b/mysql-wsrep-5.6/mysys/my_static.c index 86e2a0d5..5fc866fd 100644 --- a/mysql-wsrep-5.6/mysys/my_static.c +++ b/mysql-wsrep-5.6/mysys/my_static.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -74,12 +74,12 @@ void (*error_handler_hook)(uint error, const char *str, myf MyFlags)= void (*fatal_error_handler_hook)(uint error, const char *str, myf MyFlags)= my_message_stderr; -static void proc_info_dummy(void *a __attribute__((unused)), - const PSI_stage_info *b __attribute__((unused)), - PSI_stage_info *c __attribute__((unused)), - const char *d __attribute__((unused)), - const char *e __attribute__((unused)), - const unsigned int f __attribute__((unused))) +static void proc_info_dummy(void *a MY_ATTRIBUTE((unused)), + const PSI_stage_info *b MY_ATTRIBUTE((unused)), + PSI_stage_info *c MY_ATTRIBUTE((unused)), + const char *d MY_ATTRIBUTE((unused)), + const char *e MY_ATTRIBUTE((unused)), + const unsigned int f MY_ATTRIBUTE((unused))) { return; } diff --git a/mysql-wsrep-5.6/mysys/my_symlink.c b/mysql-wsrep-5.6/mysys/my_symlink.c index f70f9a79..4b71df66 100644 --- a/mysql-wsrep-5.6/mysys/my_symlink.c +++ b/mysql-wsrep-5.6/mysys/my_symlink.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -107,7 +107,7 @@ int my_symlink(const char *content, const char *linkname, myf MyFlags) #endif -int my_is_symlink(const char *filename __attribute__((unused))) +int my_is_symlink(const char *filename MY_ATTRIBUTE((unused))) { #if defined (HAVE_LSTAT) && defined (S_ISLNK) struct stat stat_buff; diff --git a/mysql-wsrep-5.6/mysys/my_sync.c b/mysql-wsrep-5.6/mysys/my_sync.c index 566cc9b2..a2b46474 100644 --- a/mysql-wsrep-5.6/mysys/my_sync.c +++ b/mysql-wsrep-5.6/mysys/my_sync.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -159,8 +159,8 @@ int my_sync_dir(const char *dir_name, myf my_flags) #else /* NEED_EXPLICIT_SYNC_DIR */ -int my_sync_dir(const char *dir_name __attribute__((unused)), - myf my_flags __attribute__((unused))) +int my_sync_dir(const char *dir_name MY_ATTRIBUTE((unused)), + myf my_flags MY_ATTRIBUTE((unused))) { return 0; } @@ -192,8 +192,8 @@ int my_sync_dir_by_file(const char *file_name, myf my_flags) #else /* NEED_EXPLICIT_SYNC_DIR */ -int my_sync_dir_by_file(const char *file_name __attribute__((unused)), - myf my_flags __attribute__((unused))) +int my_sync_dir_by_file(const char *file_name MY_ATTRIBUTE((unused)), + myf my_flags MY_ATTRIBUTE((unused))) { return 0; } diff --git a/mysql-wsrep-5.6/mysys/my_write.c b/mysql-wsrep-5.6/mysys/my_write.c index 7335f960..9cf2db0f 100644 --- a/mysql-wsrep-5.6/mysys/my_write.c +++ b/mysql-wsrep-5.6/mysys/my_write.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/mysql-wsrep-5.6/mysys/psi_noop.c b/mysql-wsrep-5.6/mysys/psi_noop.c index 63d189a4..0fb54888 100644 --- a/mysql-wsrep-5.6/mysys/psi_noop.c +++ b/mysql-wsrep-5.6/mysys/psi_noop.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -27,7 +27,7 @@ C_MODE_START -#define NNN __attribute__((unused)) +#define NNN MY_ATTRIBUTE((unused)) static void register_mutex_noop(const char *category NNN, PSI_mutex_info *info NNN, @@ -637,9 +637,9 @@ digest_end_noop(PSI_digest_locker *locker NNN, } static int -set_thread_connect_attrs_noop(const char *buffer __attribute__((unused)), - uint length __attribute__((unused)), - const void *from_cs __attribute__((unused))) +set_thread_connect_attrs_noop(const char *buffer MY_ATTRIBUTE((unused)), + uint length MY_ATTRIBUTE((unused)), + const void *from_cs MY_ATTRIBUTE((unused))) { return 0; } diff --git a/mysql-wsrep-5.6/mysys/ptr_cmp.c b/mysql-wsrep-5.6/mysys/ptr_cmp.c index 156bd4da..66e70d73 100644 --- a/mysql-wsrep-5.6/mysys/ptr_cmp.c +++ b/mysql-wsrep-5.6/mysys/ptr_cmp.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -45,9 +45,9 @@ static int native_compare(size_t *length, unsigned char **a, unsigned char **b) Special case for ORDER BY / GROUP BY CHAR(0) NOT NULL */ static -int ptr_compare_zero_length(size_t *compare_length __attribute__((unused)), - uchar **a __attribute__((unused)), - uchar **b __attribute__((unused))) +int ptr_compare_zero_length(size_t *compare_length MY_ATTRIBUTE((unused)), + uchar **a MY_ATTRIBUTE((unused)), + uchar **b MY_ATTRIBUTE((unused))) { return 0; } @@ -61,7 +61,7 @@ static int ptr_compare_3(size_t *compare_length, uchar **a, uchar **b); /* Get a pointer to a optimal byte-compare function for a given size */ #ifdef __sun -qsort2_cmp get_ptr_compare (size_t size __attribute__((unused))) +qsort2_cmp get_ptr_compare (size_t size MY_ATTRIBUTE((unused))) { return (qsort2_cmp) native_compare; } diff --git a/mysql-wsrep-5.6/mysys/stacktrace.c b/mysql-wsrep-5.6/mysys/stacktrace.c index e915698a..9e7a991f 100644 --- a/mysql-wsrep-5.6/mysys/stacktrace.c +++ b/mysql-wsrep-5.6/mysys/stacktrace.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -159,8 +159,8 @@ void my_safe_print_str(const char* val, int max_len) /* Use Solaris' symbolic stack trace routine. */ #include -void my_print_stacktrace(uchar* stack_bottom __attribute__((unused)), - ulong thread_stack __attribute__((unused))) +void my_print_stacktrace(uchar* stack_bottom MY_ATTRIBUTE((unused)), + ulong thread_stack MY_ATTRIBUTE((unused))) { if (printstack(fileno(stderr)) == -1) my_safe_printf_stderr("%s", @@ -178,9 +178,9 @@ void my_print_stacktrace(uchar* stack_bottom __attribute__((unused)), #if BACKTRACE_DEMANGLE -char __attribute__ ((weak)) * -my_demangle(const char *mangled_name __attribute__((unused)), - int *status __attribute__((unused))) +char MY_ATTRIBUTE ((weak)) * +my_demangle(const char *mangled_name MY_ATTRIBUTE((unused)), + int *status MY_ATTRIBUTE((unused))) { return NULL; } diff --git a/mysql-wsrep-5.6/mysys/testhash.c b/mysql-wsrep-5.6/mysys/testhash.c index 659dd1e8..daff98d1 100644 --- a/mysql-wsrep-5.6/mysys/testhash.c +++ b/mysql-wsrep-5.6/mysys/testhash.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -39,7 +39,7 @@ my_bool hash_check(HASH *hash); void free_record(void *record); static uchar *hash2_key(const uchar *rec,uint *length, - my_bool not_used __attribute__((unused))) + my_bool not_used MY_ATTRIBUTE((unused))) { *length=(uint) (uchar) rec[reclength-1]; return (uchar*) rec; diff --git a/mysql-wsrep-5.6/mysys/thr_alarm.c b/mysql-wsrep-5.6/mysys/thr_alarm.c index 3a628b80..a3d13a59 100644 --- a/mysql-wsrep-5.6/mysys/thr_alarm.c +++ b/mysql-wsrep-5.6/mysys/thr_alarm.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -60,9 +60,9 @@ static void *alarm_handler(void *arg); #define reschedule_alarms() pthread_kill(alarm_thread,THR_SERVER_ALARM) #endif -static sig_handler thread_alarm(int sig __attribute__((unused))); +static sig_handler thread_alarm(int sig MY_ATTRIBUTE((unused))); -static int compare_ulong(void *not_used __attribute__((unused)), +static int compare_ulong(void *not_used MY_ATTRIBUTE((unused)), uchar *a_ptr,uchar* b_ptr) { ulong a=*((ulong*) a_ptr),b= *((ulong*) b_ptr); @@ -274,7 +274,7 @@ void thr_end_alarm(thr_alarm_t *alarmed) every second. */ -sig_handler process_alarm(int sig __attribute__((unused))) +sig_handler process_alarm(int sig MY_ATTRIBUTE((unused))) { sigset_t old_mask; /* @@ -304,7 +304,7 @@ sig_handler process_alarm(int sig __attribute__((unused))) } -static sig_handler process_alarm_part2(int sig __attribute__((unused))) +static sig_handler process_alarm_part2(int sig MY_ATTRIBUTE((unused))) { ALARM *alarm_data; DBUG_ENTER("process_alarm"); @@ -492,7 +492,7 @@ void thr_alarm_info(ALARM_INFO *info) */ -static sig_handler thread_alarm(int sig __attribute__((unused))) +static sig_handler thread_alarm(int sig MY_ATTRIBUTE((unused))) { #ifdef MAIN printf("thread_alarm\n"); fflush(stdout); @@ -511,7 +511,7 @@ static sig_handler thread_alarm(int sig __attribute__((unused))) /* set up a alarm thread with uses 'sleep' to sleep between alarms */ #ifdef USE_ALARM_THREAD -static void *alarm_handler(void *arg __attribute__((unused))) +static void *alarm_handler(void *arg MY_ATTRIBUTE((unused))) { int error; struct timespec abstime; @@ -580,7 +580,7 @@ void thr_alarm_kill(my_thread_id thread_id) /* Can't do this yet */ } -sig_handler process_alarm(int sig __attribute__((unused))) +sig_handler process_alarm(int sig MY_ATTRIBUTE((unused))) { /* Can't do this yet */ } @@ -774,7 +774,7 @@ static sig_handler print_signal_warning(int sig) #endif /* USE_ONE_SIGNAL_HAND */ -static void *signal_hand(void *arg __attribute__((unused))) +static void *signal_hand(void *arg MY_ATTRIBUTE((unused))) { sigset_t set; int sig,error,err_count=0;; @@ -842,7 +842,7 @@ static void *signal_hand(void *arg __attribute__((unused))) } -int main(int argc __attribute__((unused)),char **argv __attribute__((unused))) +int main(int argc MY_ATTRIBUTE((unused)),char **argv MY_ATTRIBUTE((unused))) { pthread_t tid; pthread_attr_t thr_attr; @@ -931,7 +931,7 @@ int main(int argc __attribute__((unused)),char **argv __attribute__((unused))) #else /* !defined(DONT_USE_ALARM_THREAD) */ -int main(int argc __attribute__((unused)),char **argv __attribute__((unused))) +int main(int argc MY_ATTRIBUTE((unused)),char **argv MY_ATTRIBUTE((unused))) { printf("thr_alarm disabled with DONT_USE_THR_ALARM\n"); exit(1); diff --git a/mysql-wsrep-5.6/mysys/thr_lock.c b/mysql-wsrep-5.6/mysys/thr_lock.c index 00f461aa..86743c47 100644 --- a/mysql-wsrep-5.6/mysys/thr_lock.c +++ b/mysql-wsrep-5.6/mysys/thr_lock.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1679,21 +1679,21 @@ static ulong sum=0; /* The following functions is for WRITE_CONCURRENT_INSERT */ -static void test_get_status(void* param __attribute__((unused)), - int concurrent_insert __attribute__((unused))) +static void test_get_status(void* param MY_ATTRIBUTE((unused)), + int concurrent_insert MY_ATTRIBUTE((unused))) { } -static void test_update_status(void* param __attribute__((unused))) +static void test_update_status(void* param MY_ATTRIBUTE((unused))) { } -static void test_copy_status(void* to __attribute__((unused)) , - void *from __attribute__((unused))) +static void test_copy_status(void* to MY_ATTRIBUTE((unused)) , + void *from MY_ATTRIBUTE((unused))) { } -static my_bool test_check_status(void* param __attribute__((unused))) +static my_bool test_check_status(void* param MY_ATTRIBUTE((unused))) { return 0; } @@ -1750,7 +1750,7 @@ static void *test_thread(void *arg) } -int main(int argc __attribute__((unused)),char **argv __attribute__((unused))) +int main(int argc MY_ATTRIBUTE((unused)),char **argv MY_ATTRIBUTE((unused))) { pthread_t tid; pthread_attr_t thr_attr; diff --git a/mysql-wsrep-5.6/mysys/thr_mutex.c b/mysql-wsrep-5.6/mysys/thr_mutex.c index 536508a6..3f7bd4fc 100644 --- a/mysql-wsrep-5.6/mysys/thr_mutex.c +++ b/mysql-wsrep-5.6/mysys/thr_mutex.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -53,7 +53,7 @@ void safe_mutex_global_init(void) int safe_mutex_init(safe_mutex_t *mp, - const pthread_mutexattr_t *attr __attribute__((unused)), + const pthread_mutexattr_t *attr MY_ATTRIBUTE((unused)), const char *file, uint line) { @@ -370,7 +370,7 @@ int safe_mutex_destroy(safe_mutex_t *mp, const char *file, uint line) This is ok, as this thread may not yet have been exited. */ -void safe_mutex_end(FILE *file __attribute__((unused))) +void safe_mutex_end(FILE *file MY_ATTRIBUTE((unused))) { if (!safe_mutex_count) /* safetly */ pthread_mutex_destroy(&THR_LOCK_mutex); diff --git a/mysql-wsrep-5.6/mysys/tree.c b/mysql-wsrep-5.6/mysys/tree.c index dbc42b3e..82078cb1 100644 --- a/mysql-wsrep-5.6/mysys/tree.c +++ b/mysql-wsrep-5.6/mysys/tree.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -83,7 +83,7 @@ static void rb_delete_fixup(TREE *tree,TREE_ELEMENT ***parent); static int test_rb_tree(TREE_ELEMENT *element); #endif -void init_tree(TREE *tree, ulong default_alloc_size, ulong memory_limit, +void init_tree(TREE *tree, size_t default_alloc_size, ulong memory_limit, int size, qsort_cmp2 compare, my_bool with_delete, tree_element_free free_element, const void *custom_arg) { @@ -127,7 +127,7 @@ void init_tree(TREE *tree, ulong default_alloc_size, ulong memory_limit, } if (!(tree->with_delete=with_delete)) { - init_alloc_root(&tree->mem_root, (uint) default_alloc_size, 0); + init_alloc_root(&tree->mem_root, default_alloc_size, 0); tree->mem_root.min_malloc=(sizeof(TREE_ELEMENT)+tree->size_of_element); } DBUG_VOID_RETURN; diff --git a/mysql-wsrep-5.6/mysys/waiting_threads.c b/mysql-wsrep-5.6/mysys/waiting_threads.c index da4ade56..f1468d69 100644 --- a/mysql-wsrep-5.6/mysys/waiting_threads.c +++ b/mysql-wsrep-5.6/mysys/waiting_threads.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -295,9 +295,9 @@ uint32 wt_cycle_stats[2][WT_CYCLE_STATS+1]; uint32 wt_success_stats; static my_atomic_rwlock_t - cycle_stats_lock __attribute__((unused)), - wait_stats_lock __attribute__((unused)), - success_stats_lock __attribute__((unused)); + cycle_stats_lock MY_ATTRIBUTE((unused)), + wait_stats_lock MY_ATTRIBUTE((unused)), + success_stats_lock MY_ATTRIBUTE((unused)); #ifdef SAFE_STATISTICS #define incr(VAR, LOCK) \ diff --git a/mysql-wsrep-5.6/mysys_ssl/my_default.cc b/mysql-wsrep-5.6/mysys_ssl/my_default.cc index ff8f44c7..4e51ce23 100644 --- a/mysql-wsrep-5.6/mysys_ssl/my_default.cc +++ b/mysql-wsrep-5.6/mysys_ssl/my_default.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -106,8 +106,6 @@ static const char *my_login_path= 0; static char my_defaults_file_buffer[FN_REFLEN]; static char my_defaults_extra_file_buffer[FN_REFLEN]; -static char my_login_file[FN_REFLEN]; - static my_bool defaults_already_read= FALSE; #ifdef WITH_WSREP @@ -116,12 +114,6 @@ static my_bool defaults_already_read= FALSE; char wsrep_defaults_file[FN_REFLEN + 10]={0,}; char wsrep_defaults_group_suffix[FN_EXTLEN]={0,}; #endif /* WITH_WREP */ -/* Set to TRUE, if --no-defaults is found. */ -static my_bool found_no_defaults= FALSE; - -/* Set to TRUE, when login file is being processed. */ -static my_bool is_login_file= FALSE; - /* Which directories are searched for options (and in which order) */ #define MAX_DEFAULT_DIRS 6 @@ -154,13 +146,16 @@ struct handle_option_ctx }; static int search_default_file(Process_option_func func, void *func_ctx, - const char *dir, const char *config_file); + const char *dir, const char *config_file, + my_bool is_login_file); static int search_default_file_with_ext(Process_option_func func, void *func_ctx, const char *dir, const char *ext, - const char *config_file, int recursion_level); -static my_bool mysql_file_getline(char *str, int size, MYSQL_FILE *file); - + const char *config_file, + int recursion_level, + my_bool is_login_file); +static my_bool mysql_file_getline(char *str, int size, MYSQL_FILE *file, + my_bool is_login_file); /** Create the list of default directories. @@ -236,6 +231,7 @@ fn_expand(const char *filename, char *result_buf) func_ctx It's context. Usually it is the structure to store additional options. default_directories List of default directories. + found_no_defaults TRUE, if --no-defaults is specified. DESCRIPTION Process the default options from argc & argv @@ -259,7 +255,8 @@ fn_expand(const char *filename, char *result_buf) int my_search_option_files(const char *conf_file, int *argc, char ***argv, uint *args_used, Process_option_func func, - void *func_ctx, const char **default_directories) + void *func_ctx, const char **default_directories, + my_bool is_login_file, my_bool found_no_defaults) { const char **dirs, *forced_default_file, *forced_extra_defaults; int error= 0; @@ -273,7 +270,7 @@ int my_search_option_files(const char *conf_file, int *argc, char ***argv, (char **) &forced_default_file, (char **) &forced_extra_defaults, (char **) &my_defaults_group_suffix, - (char **) &my_login_path); + (char **) &my_login_path, found_no_defaults); if (! my_defaults_group_suffix) my_defaults_group_suffix= getenv(STRINGIFY_ARG(DEFAULT_GROUP_SUFFIX_ENV)); @@ -388,14 +385,16 @@ int my_search_option_files(const char *conf_file, int *argc, char ***argv, // If conf_file is an absolute path, we only read it if (dirname_length(conf_file)) { - if ((error= search_default_file(func, func_ctx, NullS, conf_file)) < 0) - goto err; + if ((error= search_default_file(func, func_ctx, NullS, conf_file, + is_login_file)) < 0) + goto err; } // If my defaults file is set (from a previous run), we read it else if (my_defaults_file) { if ((error= search_default_file_with_ext(func, func_ctx, "", "", - my_defaults_file, 0)) < 0) + my_defaults_file, 0, + is_login_file)) < 0) goto err; if (error > 0) { @@ -410,14 +409,16 @@ int my_search_option_files(const char *conf_file, int *argc, char ***argv, { if (**dirs) { - if (search_default_file(func, func_ctx, *dirs, conf_file) < 0) - goto err; + if (search_default_file(func, func_ctx, *dirs, conf_file, + is_login_file) < 0) + goto err; } else if (my_defaults_extra_file) { if ((error= search_default_file_with_ext(func, func_ctx, "", "", - my_defaults_extra_file, 0)) < 0) - goto err; /* Fatal error */ + my_defaults_extra_file, 0, + is_login_file)) < 0) + goto err; /* Fatal error */ if (error > 0) { fprintf(stderr, "Could not open required defaults file: %s\n", @@ -505,7 +506,8 @@ int get_defaults_options(int argc, char **argv, char **defaults, char **extra_defaults, char **group_suffix, - char **login_path) + char **login_path, + my_bool found_no_defaults) { int org_argc= argc, prev_argc= 0, default_option_count= 0; *defaults= *extra_defaults= *group_suffix= *login_path= 0; @@ -639,6 +641,8 @@ int my_load_defaults(const char *conf_file, const char **groups, char *ptr,**res; struct handle_option_ctx ctx; const char **dirs; + char my_login_file[FN_REFLEN]; + my_bool found_no_defaults= false; uint args_sep= my_getopt_use_args_separator ? 1 : 0; DBUG_ENTER("load_defaults"); @@ -668,23 +672,21 @@ int my_load_defaults(const char *conf_file, const char **groups, if ((error= my_search_option_files(conf_file, argc, argv, &args_used, handle_default_option, - (void *) &ctx, dirs))) + (void *) &ctx, dirs, false, found_no_defaults))) { free_root(&alloc,MYF(0)); DBUG_RETURN(error); } /* Read options from login group. */ - is_login_file= TRUE; if (my_default_get_login_file(my_login_file, sizeof(my_login_file)) && (error= my_search_option_files(my_login_file,argc, argv, &args_used, handle_default_option, (void *) &ctx, - dirs))) + dirs, true, found_no_defaults))) { free_root(&alloc,MYF(0)); DBUG_RETURN(error); } - is_login_file= FALSE; /* Here error contains <> 0 only if we have a fully specified conf_file @@ -767,7 +769,8 @@ void free_defaults(char **argv) static int search_default_file(Process_option_func opt_handler, void *handler_ctx, const char *dir, - const char *config_file) + const char *config_file, + my_bool is_login_file) { char **ext; const char *empty_list[]= { "", 0 }; @@ -779,7 +782,7 @@ static int search_default_file(Process_option_func opt_handler, int error; if ((error= search_default_file_with_ext(opt_handler, handler_ctx, dir, *ext, - config_file, 0)) < 0) + config_file, 0, is_login_file)) < 0) return error; } return 0; @@ -851,6 +854,7 @@ static char *get_argument(const char *keyword, size_t kwlen, group groups to read recursion_level the level of recursion, got while processing "!include" or "!includedir" + is_login_file TRUE, when login file is being processed. RETURN 0 Success @@ -863,7 +867,8 @@ static int search_default_file_with_ext(Process_option_func opt_handler, const char *dir, const char *ext, const char *config_file, - int recursion_level) + int recursion_level, + my_bool is_login_file) { char name[FN_REFLEN + 10], buff[4096], curr_gr[4096], *ptr, *end, **tmp_ext; char *value, option[4096+2], tmp[FN_REFLEN]; @@ -892,7 +897,7 @@ static int search_default_file_with_ext(Process_option_func opt_handler, } fn_format(name,name,"","",4); - if ((rc= check_file_permissions(name)) < 2) + if ((rc= check_file_permissions(name, is_login_file)) < 2) return (int) rc; if (is_login_file) @@ -912,7 +917,7 @@ static int search_default_file_with_ext(Process_option_func opt_handler, strncpy(wsrep_defaults_file, name, sizeof(wsrep_defaults_file) - 1); #endif /* WITH_WSREP */ - while (mysql_file_getline(buff, sizeof(buff) - 1, fp)) + while (mysql_file_getline(buff, sizeof(buff) - 1, fp, is_login_file)) { line++; /* Ignore comment and empty lines */ @@ -973,7 +978,7 @@ static int search_default_file_with_ext(Process_option_func opt_handler, MY_UNPACK_FILENAME | MY_SAFE_PATH); search_default_file_with_ext(opt_handler, handler_ctx, "", "", tmp, - recursion_level + 1); + recursion_level + 1, is_login_file); } } @@ -988,7 +993,7 @@ static int search_default_file_with_ext(Process_option_func opt_handler, goto err; search_default_file_with_ext(opt_handler, handler_ctx, "", "", ptr, - recursion_level + 1); + recursion_level + 1, is_login_file); } continue; @@ -1150,15 +1155,17 @@ static char *remove_end_comment(char *ptr) of scrambled login file, the line read is first decrypted and then returned. - @param str [out] Buffer to store the read text. - @param size [in] At max, size-1 bytes to be read. - @param file [in] Source file. + @param str [out] Buffer to store the read text. + @param size [in] At max, size-1 bytes to be read. + @param file [in] Source file. + @param is_login_file [in] TRUE, when login file is being processed. @return 1 Success 0 Error */ -static my_bool mysql_file_getline(char *str, int size, MYSQL_FILE *file) +static my_bool mysql_file_getline(char *str, int size, MYSQL_FILE *file, + my_bool is_login_file) { uchar cipher[4096], len_buf[MAX_CIPHER_STORE_LEN]; static unsigned char my_key[LOGIN_KEY_LEN]; @@ -1297,7 +1304,7 @@ static int add_directory(MEM_ROOT *alloc, const char *dir, const char **dirs) char buf[FN_REFLEN]; size_t len; char *p; - my_bool err __attribute__((unused)); + my_bool err MY_ATTRIBUTE((unused)); len= normalize_dirname(buf, dir); if (!(p= strmake_root(alloc, buf, len))) @@ -1471,13 +1478,14 @@ int my_default_get_login_file(char *file_name, size_t file_name_size) /** Check file permissions of the option file. - @param file_name [in] Name of the option file. + @param file_name [in] Name of the option file. + @param is_login_file [in] TRUE, when login file is being processed. @return 0 - Non-allowable file permissions. 1 - Failed to stat. 2 - Success. */ -int check_file_permissions(const char *file_name) +int check_file_permissions(const char *file_name, my_bool is_login_file) { #if !defined(__WIN__) MY_STAT stat_info; diff --git a/mysql-wsrep-5.6/mysys_ssl/my_getopt.cc b/mysql-wsrep-5.6/mysys_ssl/my_getopt.cc index d67d23ae..5ef6213d 100644 --- a/mysql-wsrep-5.6/mysys_ssl/my_getopt.cc +++ b/mysql-wsrep-5.6/mysys_ssl/my_getopt.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1370,7 +1370,7 @@ static void init_one_value(const struct my_option *option, void *variable, */ static void fini_one_value(const struct my_option *option, void *variable, - longlong value __attribute__ ((unused))) + longlong value MY_ATTRIBUTE ((unused))) { DBUG_ENTER("fini_one_value"); switch ((option->var_type & GET_TYPE_MASK)) { diff --git a/mysql-wsrep-5.6/packaging/WiX/mysql_server.wxs.in b/mysql-wsrep-5.6/packaging/WiX/mysql_server.wxs.in index 73db450b..132818e2 100644 --- a/mysql-wsrep-5.6/packaging/WiX/mysql_server.wxs.in +++ b/mysql-wsrep-5.6/packaging/WiX/mysql_server.wxs.in @@ -2,7 +2,7 @@ xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"> - + + + + Installed + Tue, 03 May 2016 09:30:33 +0200 + +mysql-community (5.6.28-1ubuntu15.10) wily; urgency=low + + * New upstream release + + -- Lars Tangvald Thu, 12 Nov 2015 10:34:23 +0100 + +mysql-community (5.6.26-1ubuntu15.04) vivid; urgency=low + + * new upstream release + * mysql-commercial-server now depends on perl, psmisc + mysql-commercial-test now depends on python, libmysqlclient-dev + (Closes: #20893836) + + -- Akhil Mohan Thu, 18 Jun 2015 16:34:10 +0530 + +mysql-community (5.6.25-3ubuntu15.04) vivid; urgency=low + + * new upstream release + * mysql-common now conflicts with + mysql-server-5.6, mysql-server-core-5.6 + mysql-client-5.6, mysql-client-core-5.6 + * mysql-*-server no more provides + mysql-server-5.6, mysql-server-core-5.6 + * mysql-*-client no more provides + mysql-client-5.6, mysql-client-core-5.6 + + -- Akhil Mohan Mon, 15 Jun 2015 16:48:05 +0530 + +mysql-community (5.6.24-3ubuntu15.04) vivid; urgency=low + + * updated Standards-Version to 3.9.6 in d/control + * apparmor profile updated to allow read on all files under /etc/mysql + * added new conf files under d/extra/*.conf + * mysql_plugin moved from client to server pkg + * innochecksum moved from client to server pkg + * server pkg now replaces client pkg + * added systemd service profile and script + * new /etc/mysql/my.cnf management scheme added for Ubuntu 15.04 + as discussed in Dec 2014 for native packaging source + * added dh "--with systemd" for enabling systemd + + -- Akhil Mohan Wed, 27 May 2015 11:35:35 +0530 + +mysql-community (5.6.24-2ubuntu15.04) vivid; urgency=low + + * new upstream release + * forked packaging source from utopic to vivid + + -- Akhil Mohan Wed, 15 Apr 2015 18:52:22 +0530 + +mysql-community (5.6.24-1ubuntu14.10) utopic; urgency=low + + * new upstream release + + -- Akhil Mohan Mon, 16 Feb 2014 15:45:09 +0530 + +mysql-community (5.6.23-1ubuntu14.10) utopic; urgency=low + + * new upstream release + * mysql-community-server now recommends mysql-client + * mysql-community-server now depends on apparmor + * removed template install-test-db; not installed by default + * d/compat incremented to 9 from 8 + * d/control updated to build depend on debhelper 9 + * added d/*.lintian-overrides and d/source/lintian-overrides + * d/rules updated to reflect correct file permissions + + -- Akhil Mohan Wed, 31 Dec 2014 10:51:07 +0530 + +mysql-community (5.6.22-2ubuntu14.10) utopic; urgency=low + + * new upstream release + * mysql-common now replaces mysql-server-{,core-}5.6 + + -- Akhil Mohan Wed, 28 Nov 2014 15:18:07 +0530 + +mysql-community (5.6.22-1ubuntu14.10) utopic; urgency=low + + * new upstream release + * fixed d/*server.postinst to allow dropping test db without + setting root password + * init script will now run my_i_db if data dir is not present or empty + * updated init script to read app armor profile on startup + * forked packaging source from trusty and rebranded for utopic + * updated d/m-c-source.install to pack *.xz packaging source archive + * added more system resources to app armor profile + * dh_apparmor to now run before dh_installinit in d/rules + * libmysqlclient-dev now replaces mysql-client-{,core-}5.6 + + -- Akhil Mohan Wed, 05 Nov 2014 17:04:07 +0530 + +mysql-community (5.6.21-1ubuntu14.04) trusty; urgency=low + + * new upstream release + * updated d/rules to increment -j8 as make option + * updated d/source/include-binaries to add mysql_no_login plugin + * updated CMake option WITH_EXTRA_CHARSETS from complex to all + + -- Akhil Mohan Wed, 20 Aug 2014 19:12:30 +0530 + +mysql-community (5.6.20-1ubuntu14.04) trusty; urgency=low + + * new upstream release + * added fakeroot as build-dep in d/control + * added d/*.dirs for bench, dev and test pkg + * updated d/rules to make compilation verbose + * removed default CFLAGS, CXXFLAGS in d/rules + * added patch for testsuite search paths under d/patches + * modified cmake option for testsuite in d/rules + * updated patch d/fix-mysql_install_db.patch + * enabled two patches in d/patches/series + * removed extra permissions check in d/rules when fixed in source + * modified d/mysql-*-server.postinst to stop removing /usr/my.cnf + * modified d/*-test.* for updated location of testsuite + * updated d/{mysql-*-server.install,rules} to include debug plugins + * updated d/rules to remove storage engine cmake options + * modified data dir permission in d/*server.{pre,post}inst + * updated d/source/include-binaries to add debug plugins + * updated d/rules to rename debug plugins + + -- Akhil Mohan Wed, 02 Jul 2014 17:45:30 +0530 + +mysql-community (5.6.19-1ubuntu14.04) trusty; urgency=low + + * new upstream release + * d/rules updated to rid of files removed from source + * modified path for source tar in source pkg + * obscured actual filenames in d/source/include-binaries + * modified d/rules to handle obscured filenames + + -- Akhil Mohan Mon, 05 May 2014 15:45:10 +0530 + +mysql-community (5.6.17-1ubuntu14.04) trusty; urgency=low + + * new upstream release + + -- Akhil Mohan Fri, 28 Feb 2014 18:06:30 +0530 diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/compat b/mysql-wsrep-5.6/packaging/deb-xenial/compat new file mode 100644 index 00000000..ec635144 --- /dev/null +++ b/mysql-wsrep-5.6/packaging/deb-xenial/compat @@ -0,0 +1 @@ +9 diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/control b/mysql-wsrep-5.6/packaging/deb-xenial/control new file mode 100644 index 00000000..8bc5ecdf --- /dev/null +++ b/mysql-wsrep-5.6/packaging/deb-xenial/control @@ -0,0 +1,192 @@ +Source: mysql-community +Maintainer: MySQL Release Engineering +Section: database +Priority: optional +Standards-Version: 3.9.6 +Homepage: http://www.mysql.com/ +Build-Depends: debhelper (>= 9.0.0), libaio-dev[linux-any], libncurses5-dev (>= 5.0-6), perl, zlib1g-dev (>= 1:1.1.3-5), po-debconf, psmisc, bison, dh-apparmor, dh-systemd (>= 1.5), lsb-release, cmake, fakeroot, libnuma-dev + +Package: mysql-server +Architecture: any +Depends: mysql-community-server (= ${binary:Version}), ${misc:Depends} +Description: MySQL Server meta package depending on latest version + The MySQL(TM) software delivers a very fast, multi-threaded, multi-user, + and robust SQL (Structured Query Language) database server. MySQL Server + is intended for mission-critical, heavy-load production systems as well + as for embedding into mass-deployed software. MySQL is a trademark of + Oracle. This is a meta package that depends on the latest mysql server + package available in the repository. + +Package: mysql-community-server +Architecture: any +Pre-depends: debconf (>= 0.2.17), adduser +Depends: mysql-common (= ${binary:Version}), apparmor, perl, psmisc, + ${shlibs:Depends}, ${misc:Depends} +Recommends: mysql-client (= ${binary:Version}) +Conflicts: mysql, + mysql-server-5.0, mysql-server-core-5.0, + mysql-server-5.1, mysql-server-core-5.1, + mysql-server-5.5, mysql-server-core-5.5, + mysql-server-5.6, mysql-server-core-5.6, + mysql-commercial-server +Replaces: mysql, + mysql-server-5.0, mysql-server-core-5.0, + mysql-server-5.1, mysql-server-core-5.1, + mysql-server-5.5, mysql-server-core-5.5, + mysql-server-5.6, mysql-server-core-5.6, + mysql-commercial-server, + mysql-community-client +Provides: virtual-mysql-server, virtual-mysql-server-core +Description: MySQL Server + The MySQL(TM) software delivers a very fast, multi-threaded, multi-user, + and robust SQL (Structured Query Language) database server. MySQL Server + is intended for mission-critical, heavy-load production systems as well + as for embedding into mass-deployed software. MySQL is a trademark of + Oracle. This package includes the MySQL server binary as well as related + utilities to run and administer a MySQL server. + +Package: mysql-client +Architecture: any +Depends: mysql-community-client (= ${binary:Version}), ${misc:Depends} +Description: MySQL Client meta package depending on latest version + The MySQL(TM) software delivers a very fast, multi-threaded, multi-user, + and robust SQL (Structured Query Language) database server. MySQL Server + is intended for mission-critical, heavy-load production systems as well + as for embedding into mass-deployed software. MySQL is a trademark of + Oracle. This is a meta package that depends on the latest mysql client + package available in the repository. + +Package: mysql-community-client +Architecture: any +Depends: mysql-common (= ${binary:Version}), + ${shlibs:Depends}, ${misc:Depends} +Conflicts: mysql, + mysql-client-5.0, mysql-client-core-5.0, + mysql-client-5.1, mysql-client-core-5.1, + mysql-client-5.5, mysql-client-core-5.5, + mysql-client-5.6, mysql-client-core-5.6, + mysql-commercial-client +Replaces: mysql, + mysql-client-5.0, mysql-client-core-5.0, + mysql-client-5.1, mysql-client-core-5.1, + mysql-client-5.5, mysql-client-core-5.5, + mysql-client-5.6, mysql-client-core-5.6, + mysql-commercial-client +Provides: virtual-mysql-client, virtual-mysql-client-core +Description: MySQL Client + The MySQL(TM) software delivers a very fast, multi-threaded, multi-user, + and robust SQL (Structured Query Language) database server. MySQL Server + is intended for mission-critical, heavy-load production systems as well + as for embedding into mass-deployed software. MySQL is a trademark of + Oracle. This package contains the standard MySQL clients and + administration tools. + +Package: libmysqlclient18 +Architecture: any +Section: libs +Pre-Depends: ${misc:Pre-Depends} +Multi-Arch: same +Depends: mysql-common (= ${binary:Version}), + ${shlibs:Depends}, ${misc:Depends} +Description: MySQL shared client libraries + The MySQL(TM) software delivers a very fast, multi-threaded, multi-user, + and robust SQL (Structured Query Language) database server. MySQL Server + is intended for mission-critical, heavy-load production systems as well + as for embedding into mass-deployed software. MySQL is a trademark of + Oracle. This package contains the shared libraries for MySQL client + applications. + +Package: mysql-common +Architecture: any +Pre-depends: debconf (>= 0.2.17), ${misc:Pre-Depends} +Multi-Arch: foreign +Depends: ${shlibs:Depends}, ${misc:Depends} +Conflicts: mysql, mysql-server-5.6, mysql-server-core-5.6, + mysql-client-5.6, mysql-client-core-5.6, + mariadb-server-5.5, percona-xtradb-cluster-common-5.5 +Replaces: mysql, mysql-server-5.5, mysql-server-core-5.5, libmysqlclient-dev, + mysql-server-5.6, mysql-server-core-5.6, + mariadb-server-5.5, percona-xtradb-cluster-common-5.5 +Provides: mysql-common, mysql-common-5.6 +Description: MySQL Common + The MySQL(TM) software delivers a very fast, multi-threaded, multi-user, + and robust SQL (Structured Query Language) database server. MySQL Server + is intended for mission-critical, heavy-load production systems as well + as for embedding into mass-deployed software. MySQL is a trademark of + Oracle. This package contains common files needed by MySQL client + library, MySQL database server, and MySQL embedded server. + +Package: libmysqlclient-dev +Architecture: any +Section: libdevel +Depends: libmysqlclient18 (= ${binary:Version}), + ${shlibs:Depends}, ${misc:Depends} +Replaces: mysql-client-5.6, mysql-client-core-5.6 +Description: MySQL development headers + The MySQL(TM) software delivers a very fast, multi-threaded, multi-user, + and robust SQL (Structured Query Language) database server. MySQL Server + is intended for mission-critical, heavy-load production systems as well + as for embedding into mass-deployed software. MySQL is a trademark of + Oracle. This package contains the development header files necessary + to develop MySQL client applications. + +Package: libmysqld-dev +Architecture: any +Section: libdevel +Depends: libmysqlclient-dev (= ${binary:Version}), + ${shlibs:Depends}, ${misc:Depends} +Description: MySQL embedded server library + The MySQL(TM) software delivers a very fast, multi-threaded, multi-user, + and robust SQL (Structured Query Language) database server. MySQL Server + is intended for mission-critical, heavy-load production systems as well + as for embedding into mass-deployed software. MySQL is a trademark of + Oracle. This package contains the MySQL server as an embedded library. + +Package: mysql-testsuite +Architecture: any +Depends: mysql-community-test (= ${binary:Version}), ${misc:Depends} +Description: MySQL Testsuite meta package depending on latest version + The MySQL(TM) software delivers a very fast, multi-threaded, multi-user, + and robust SQL (Structured Query Language) database server. MySQL Server + is intended for mission-critical, heavy-load production systems as well + as for embedding into mass-deployed software. MySQL is a trademark of + Oracle. This is a meta package that depends on the latest mysql test + package available in the repository. + +Package: mysql-community-test +Architecture: any +Depends: mysql-community-server (= ${binary:Version}), + mysql-community-client (= ${binary:Version}), python, + libmysqlclient-dev, ${shlibs:Depends}, ${misc:Depends} +Conflicts: mysql, + mysql-testsuite-5.0, mysql-testsuite-5.1, mysql-testsuite-5.5, + mysql-testsuite-5.6, mysql-commercial-test +Description: MySQL Test Run MTR - The MySQL testsuite + The MySQL(TM) software delivers a very fast, multi-threaded, multi-user, + and robust SQL (Structured Query Language) database server. MySQL Server + is intended for mission-critical, heavy-load production systems as well + as for embedding into mass-deployed software. MySQL is a trademark of + Oracle. This package contains the MySQL regression test suite for MySQL + database server. + +Package: mysql-community-bench +Architecture: any +Depends: mysql-community-server (= ${binary:Version}), + ${shlibs:Depends}, ${misc:Depends} +Conflicts: mysql, mysql-commercial-bench +Description: MySQL Bench + The MySQL(TM) software delivers a very fast, multi-threaded, multi-user, + and robust SQL (Structured Query Language) database server. MySQL Server + is intended for mission-critical, heavy-load production systems as well + as for embedding into mass-deployed software. MySQL is a trademark of + Oracle. + +Package: mysql-community-source +Architecture: any +Depends: ${misc:Depends}, ${shlibs:Depends} +Description: MySQL source + The MySQL(TM) software delivers a very fast, multi-threaded, multi-user, + and robust SQL (Structured Query Language) database server. MySQL Server + is intended for mission-critical, heavy-load production systems as well + as for embedding into mass-deployed software. MySQL is a trademark of + Oracle. diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/copyright b/mysql-wsrep-5.6/packaging/deb-xenial/copyright new file mode 100644 index 00000000..0d2a19fa --- /dev/null +++ b/mysql-wsrep-5.6/packaging/deb-xenial/copyright @@ -0,0 +1,41 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: MySQL Server 5.6 +Upstream-Contact: MySQL Release Engineering +Source: http://dev.mysql.com/ + +Copyright: 2000, 2016, Oracle and/or its affiliates. All rights reserved. +License: + This is a release of MySQL, a dual-license SQL database server. + For the avoidance of doubt, this particular copy of the software + is released under the version 2 of the GNU General Public License. + MySQL is brought to you by Oracle. + . + MySQL FOSS License Exception + We want free and open source software applications under certain + licenses to be able to use specified GPL-licensed MySQL client + libraries despite the fact that not all such FOSS licenses are + compatible with version 2 of the GNU General Public License. + Therefore there are special exceptions to the terms and conditions + of the GPLv2 as applied to these client libraries, which are + identified and described in more detail in the FOSS License + Exception at + . + . + This distribution may include materials developed by third + parties. For license and attribution notices for these + materials, please refer to the documentation that accompanies + this distribution (see the "Licenses for Third-Party Components" + appendix) or view the online documentation at + . + . + GPLv2 Disclaimer + For the avoidance of doubt, except that if any license choice + other than GPL or LGPL is available it will apply instead, + Oracle elects to use only the General Public License version 2 + (GPLv2) at this time for any software where a choice of GPL + license versions is made available with the language indicating + that GPLv2 or any later version may be used, or where a choice + . + The full text of the GNU General Public License version 2 can + be found in the file + `/usr/share/mysql/doc/COPYING'. diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/extra/apparmor-profile b/mysql-wsrep-5.6/packaging/deb-xenial/extra/apparmor-profile new file mode 100644 index 00000000..5cae3bfa --- /dev/null +++ b/mysql-wsrep-5.6/packaging/deb-xenial/extra/apparmor-profile @@ -0,0 +1,47 @@ +# vim:syntax=apparmor +# Last Modified: Fri Feb 28 18:06:30 2014 +#include + +/usr/sbin/mysqld { + #include + #include + #include + +# Allow system resource access + /sys/devices/system/cpu/ r, + capability sys_resource, + capability dac_override, + capability setuid, + capability setgid, + +# Allow config access + /etc/mysql/** r, + +# Allow pid and socket file access + /run/mysqld/mysqld.pid rw, + /run/mysqld/mysqld.sock rw, + +# Allow read/ write to /tmp + /tmp/ r, + /tmp/* rw, + +# Allow execution of server binary + /usr/sbin/mysqld mr, + /usr/sbin/mysqld-debug mr, + +# Allow plugin access + /usr/lib/mysql/plugin/ r, + /usr/lib/mysql/plugin/*.so* mr, + +# Allow error msg and charset access + /usr/share/mysql/ r, + /usr/share/mysql/** r, + +# Allow data dir access + /var/lib/mysql/ r, + /var/lib/mysql/** rwk, + +# Allow log file access + /var/log/mysql/ r, + /var/log/mysql/** rw, +} diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/extra/my.cnf.fallback b/mysql-wsrep-5.6/packaging/deb-xenial/extra/my.cnf.fallback new file mode 100644 index 00000000..4c4004c1 --- /dev/null +++ b/mysql-wsrep-5.6/packaging/deb-xenial/extra/my.cnf.fallback @@ -0,0 +1,25 @@ +# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# +# The MySQL Commercial Server configuration file. +# +# For explanations see +# http://dev.mysql.com/doc/mysql/en/server-system-variables.html + +# * IMPORTANT: Additional settings that can override those from this file! +# The files must end with '.cnf', otherwise they'll be ignored. +# +!includedir /etc/mysql/conf.d/ diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/extra/mysql-systemd-start b/mysql-wsrep-5.6/packaging/deb-xenial/extra/mysql-systemd-start new file mode 100644 index 00000000..d22c44d0 --- /dev/null +++ b/mysql-wsrep-5.6/packaging/deb-xenial/extra/mysql-systemd-start @@ -0,0 +1,84 @@ +#!/bin/bash + +# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# Scripts to run by MySQL systemd service +# +# Needed argument: pre | post +# +# pre mode : try to perform sanity check for configuration, log, data +# post mode : ping server until answer is received + +pinger () { + while /bin/true ; do + sleep 1 + mysqladmin ping >/dev/null 2>&1 && break + done +} + +sanity () { + MYSQLRUN=/var/run/mysqld + MYSQLDATA=/var/lib/mysql + MYSQLLOG=/var/log/mysql + + if [ ! -d ${MYSQLDATA} -a ! -L ${MYSQLDATA} ]; + then + mkdir ${MYSQLDATA} + chown mysql:mysql ${MYSQLDATA} + chmod 750 ${MYSQLDATA} + fi + + if [ ! -d "${MYSQLDATA}/mysql" -a ! -L "${MYSQLDATA}/mysql" ]; + then + mkdir ${MYSQLDATA}/mysql + chown mysql:mysql ${MYSQLDATA}/mysql + chmod 750 ${MYSQLDATA}/mysql + fi + + if [ ! "$(ls -A ${MYSQLDATA}/mysql)" ]; + then + mysql_install_db --user=mysql > /dev/null + fi + + if [ ! -d ${MYSQLLOG} -a ! -L ${MYSQLLOG} ]; + then + mkdir ${MYSQLLOG} + chown mysql:adm ${MYSQLLOG} + chmod 750 ${MYSQLLOG} + touch ${MYSQLLOG}/error.log + chmod 640 ${MYSQLLOG}/error.log + chown mysql:adm ${MYSQLLOG}/error.log + fi + + if [ ! -d "${MYSQLRUN}" -a ! -L "${MYSQLRUN}" ]; + then + mkdir ${MYSQLRUN} + chown mysql:mysql ${MYSQLRUN} + chmod 755 ${MYSQLRUN} + fi + + /lib/init/apparmor-profile-load usr.sbin.mysqld + + if [ ! -r /etc/mysql/my.cnf ]; then + echo "MySQL configuration not found at /etc/mysql/my.cnf. Please install one using update-alternatives." + exit 1 + fi +} + +case $1 in + "pre") sanity ;; + "post") pinger ;; +esac diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/extra/mysql.cnf b/mysql-wsrep-5.6/packaging/deb-xenial/extra/mysql.cnf new file mode 100644 index 00000000..04caab3e --- /dev/null +++ b/mysql-wsrep-5.6/packaging/deb-xenial/extra/mysql.cnf @@ -0,0 +1,26 @@ +# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# +# The MySQL Community Server configuration file. +# +# For explanations see +# http://dev.mysql.com/doc/mysql/en/server-system-variables.html + +# * IMPORTANT: Additional settings that can override those from this file! +# The files must end with '.cnf', otherwise they'll be ignored. +# +!includedir /etc/mysql/conf.d/ +!includedir /etc/mysql/mysql.conf.d/ diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/extra/mysql.conf.cnf b/mysql-wsrep-5.6/packaging/deb-xenial/extra/mysql.conf.cnf new file mode 100644 index 00000000..b76afea3 --- /dev/null +++ b/mysql-wsrep-5.6/packaging/deb-xenial/extra/mysql.conf.cnf @@ -0,0 +1,22 @@ +# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# +# The MySQL Commercial Client configuration file. +# +# For explanations see +# http://dev.mysql.com/doc/mysql/en/server-system-variables.html + +[mysql] diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/extra/mysql_embedded.1 b/mysql-wsrep-5.6/packaging/deb-xenial/extra/mysql_embedded.1 new file mode 100644 index 00000000..735c4e05 --- /dev/null +++ b/mysql-wsrep-5.6/packaging/deb-xenial/extra/mysql_embedded.1 @@ -0,0 +1 @@ +.so man1/mysql.1 diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/extra/mysqld.cnf b/mysql-wsrep-5.6/packaging/deb-xenial/extra/mysqld.cnf new file mode 100644 index 00000000..f8275a9e --- /dev/null +++ b/mysql-wsrep-5.6/packaging/deb-xenial/extra/mysqld.cnf @@ -0,0 +1,48 @@ +# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# +# The MySQL Commercial Server configuration file. +# +# For explanations see +# http://dev.mysql.com/doc/mysql/en/server-system-variables.html + +[mysqld_safe] +pid-file = /var/run/mysqld/mysqld.pid +socket = /var/run/mysqld/mysqld.sock +nice = 0 + +[mysqld] +user = mysql +pid-file = /var/run/mysqld/mysqld.pid +socket = /var/run/mysqld/mysqld.sock +port = 3306 +basedir = /usr +datadir = /var/lib/mysql +tmpdir = /tmp +lc-messages-dir = /usr/share/mysql +explicit_defaults_for_timestamp + +# Instead of skip-networking the default is now to listen only on +# localhost which is more compatible and is not less secure. +bind-address = 127.0.0.1 + +log-error = /var/log/mysql/error.log + +# Recommended in standard MySQL setup +sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES + +# Disabling symbolic-links is recommended to prevent assorted security risks +symbolic-links=0 diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/libmysqlclient-dev.install b/mysql-wsrep-5.6/packaging/deb-xenial/libmysqlclient-dev.install new file mode 100644 index 00000000..1040c1c1 --- /dev/null +++ b/mysql-wsrep-5.6/packaging/deb-xenial/libmysqlclient-dev.install @@ -0,0 +1,29 @@ +# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +usr/include/mysql/*.h +usr/include/mysql/mysql/*.h +usr/include/mysql/mysql/*.h.pp +usr/include/mysql/mysql/psi/*.h +usr/lib/*/libmysqlclient.a +usr/lib/*/libmysqlclient.so +usr/lib/*/libmysqlservices.a +usr/bin/mysql_config +usr/bin/mysql_config_editor +usr/share/man/man1/mysql_config.1 +usr/share/man/man1/mysql_config_editor.1 +# legal +usr/share/doc/libmysqlclient-dev/COPYING +usr/share/doc/libmysqlclient-dev/README diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/libmysqlclient-dev.lintian-overrides b/mysql-wsrep-5.6/packaging/deb-xenial/libmysqlclient-dev.lintian-overrides new file mode 100644 index 00000000..5684af7a --- /dev/null +++ b/mysql-wsrep-5.6/packaging/deb-xenial/libmysqlclient-dev.lintian-overrides @@ -0,0 +1,21 @@ +# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# Additional license file is needed so overriding this warning +libmysqlclient-dev: extra-license-file usr/share/doc/libmysqlclient-dev/LICENSE.mysql +libmysqlclient-dev: extra-license-file usr/share/doc/libmysqlclient-dev/COPYING.gz +libmysqlclient-dev: copyright-should-refer-to-common-license-file-for-lgpl +# Due to static linking this cannot be avoided and hence being overridden +libmysqlclient-dev: embedded-library diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/libmysqlclient18.install b/mysql-wsrep-5.6/packaging/deb-xenial/libmysqlclient18.install new file mode 100644 index 00000000..34656aec --- /dev/null +++ b/mysql-wsrep-5.6/packaging/deb-xenial/libmysqlclient18.install @@ -0,0 +1,19 @@ +# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +usr/lib/*/libmysqlclient.so.* +# legal +usr/share/doc/libmysqlclient18/COPYING +usr/share/doc/libmysqlclient18/README diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/libmysqlclient18.lintian-overrides b/mysql-wsrep-5.6/packaging/deb-xenial/libmysqlclient18.lintian-overrides new file mode 100644 index 00000000..b209f7d6 --- /dev/null +++ b/mysql-wsrep-5.6/packaging/deb-xenial/libmysqlclient18.lintian-overrides @@ -0,0 +1,21 @@ +# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# Additional license file is needed so overriding this warning +libmysqlclient18: extra-license-file usr/share/doc/libmysqlclient18/LICENSE.mysql +libmysqlclient18: extra-license-file usr/share/doc/libmysqlclient18/COPYING.gz +libmysqlclient18: copyright-should-refer-to-common-license-file-for-lgpl +# Due to static linking this cannot be avoided and hence being overridden +libmysqlclient18: embedded-library diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/libmysqld-dev.install b/mysql-wsrep-5.6/packaging/deb-xenial/libmysqld-dev.install new file mode 100644 index 00000000..25d84d70 --- /dev/null +++ b/mysql-wsrep-5.6/packaging/deb-xenial/libmysqld-dev.install @@ -0,0 +1,20 @@ +# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +usr/lib/*/libmysqld.a +usr/lib/*/libmysqld-debug.a +# legal +usr/share/doc/libmysqld-dev/COPYING +usr/share/doc/libmysqld-dev/README diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/libmysqld-dev.lintian-overrides b/mysql-wsrep-5.6/packaging/deb-xenial/libmysqld-dev.lintian-overrides new file mode 100644 index 00000000..5f23271b --- /dev/null +++ b/mysql-wsrep-5.6/packaging/deb-xenial/libmysqld-dev.lintian-overrides @@ -0,0 +1,19 @@ +# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# Additional license file is needed so overriding this warning +libmysqld-dev: extra-license-file usr/share/doc/libmysqld-dev/LICENSE.mysql +libmysqld-dev: extra-license-file usr/share/doc/libmysqld-dev/COPYING.gz +libmysqld-dev: copyright-should-refer-to-common-license-file-for-lgpl diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/mysql-client.install b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-client.install new file mode 100644 index 00000000..bdfd3404 --- /dev/null +++ b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-client.install @@ -0,0 +1,18 @@ +# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# legal +usr/share/doc/mysql-client/COPYING +usr/share/doc/mysql-client/README diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/mysql-client.lintian-overrides b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-client.lintian-overrides new file mode 100644 index 00000000..3a13702c --- /dev/null +++ b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-client.lintian-overrides @@ -0,0 +1,19 @@ +# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# Additional license file is needed so overriding this warning +mysql-client: extra-license-file usr/share/doc/mysql-client/LICENSE.mysql +mysql-client: extra-license-file usr/share/doc/mysql-client/COPYING.gz +mysql-client: copyright-should-refer-to-common-license-file-for-lgpl diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/mysql-common.dirs b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-common.dirs new file mode 100644 index 00000000..6879c646 --- /dev/null +++ b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-common.dirs @@ -0,0 +1,16 @@ +# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +etc/mysql/conf.d diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/mysql-common.install b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-common.install new file mode 100644 index 00000000..80d940eb --- /dev/null +++ b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-common.install @@ -0,0 +1,32 @@ +# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# configuration file and script +debian/extra/my.cnf.fallback etc/mysql/ +debian/extra/mysql.conf.cnf etc/mysql/conf.d/mysql.cnf + +usr/share/aclocal/mysql.m4 +usr/share/mysql/docs/INFO_SRC +usr/share/mysql/docs/INFO_BIN +usr/share/mysql/docs/ChangeLog +# localized error msgs +usr/share/mysql/*/errmsg.sys +usr/share/mysql/errmsg-utf8.txt +# charsets +usr/share/mysql/charsets/*.xml +usr/share/mysql/charsets/README +# legal +usr/share/doc/mysql-common/COPYING +usr/share/doc/mysql-common/README diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/mysql-common.lintian-overrides b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-common.lintian-overrides new file mode 100644 index 00000000..567b8c95 --- /dev/null +++ b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-common.lintian-overrides @@ -0,0 +1,19 @@ +# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# Additional license file is needed so overriding this warning +mysql-common: extra-license-file usr/share/doc/mysql-common/LICENSE.mysql +mysql-common: extra-license-file usr/share/doc/mysql-common/COPYING.gz +mysql-common: copyright-should-refer-to-common-license-file-for-lgpl diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/mysql-common.postinst b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-common.postinst new file mode 100644 index 00000000..ce1cd9e2 --- /dev/null +++ b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-common.postinst @@ -0,0 +1,25 @@ +#!/bin/sh + +# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +set -e + +if [ "$1" = "configure" ]; then + # Low priority fallback for client use when no server is installed. + update-alternatives --install /etc/mysql/my.cnf my.cnf /etc/mysql/my.cnf.fallback 100 +fi + +#DEBHELPER# diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/mysql-common.postrm b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-common.postrm new file mode 100644 index 00000000..3c37399e --- /dev/null +++ b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-common.postrm @@ -0,0 +1,25 @@ +#!/bin/bash + +# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +set -e + +if [ "$1" = "purge" ]; then + rmdir /etc/mysql 2>/dev/null || true + update-alternatives --remove-all my.cnf +fi + +#DEBHELPER# diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-bench.install b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-bench.install new file mode 100644 index 00000000..bb46ab33 --- /dev/null +++ b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-bench.install @@ -0,0 +1,19 @@ +# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +usr/lib/mysql/sql-bench/* +# legal +usr/share/doc/mysql-community-bench/COPYING +usr/share/doc/mysql-community-bench/README diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-bench.lintian-overrides b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-bench.lintian-overrides new file mode 100644 index 00000000..7d6a1cf9 --- /dev/null +++ b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-bench.lintian-overrides @@ -0,0 +1,19 @@ +# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# Additional license file is needed so overriding this warning +mysql-community-bench: extra-license-file usr/share/doc/mysql-community-bench/LICENSE.mysql +mysql-community-bench: extra-license-file usr/share/doc/mysql-community-bench/COPYING.gz +mysql-community-bench: copyright-should-refer-to-common-license-file-for-lgpl diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-client.install b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-client.install new file mode 100644 index 00000000..531f12d9 --- /dev/null +++ b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-client.install @@ -0,0 +1,56 @@ +# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# binaries +usr/bin/myisam_ftdump +usr/bin/mysql +usr/bin/mysql_embedded +usr/bin/mysqlaccess +usr/bin/mysqlaccess.conf +usr/bin/mysqladmin +usr/bin/mysqlbug +usr/bin/mysqlcheck +usr/bin/mysql_client_test +usr/bin/mysql_client_test_embedded +usr/bin/mysqldump +usr/bin/mysqldumpslow +usr/bin/mysql_find_rows +usr/bin/mysql_fix_extensions +usr/bin/mysqlimport +usr/bin/mysqlshow +usr/bin/mysqlslap +usr/bin/mysql_waitpid +# man pages +usr/share/man/man1/myisam_ftdump.1 +usr/share/man/man1/mysql.1 +usr/share/man/man1/mysql_embedded.1 +usr/share/man/man1/mysqlaccess.1 +usr/share/man/man1/mysqladmin.1 +usr/share/man/man1/mysqlbug.1 +usr/share/man/man1/mysqlcheck.1 +usr/share/man/man1/mysql_client_test.1 +usr/share/man/man1/mysql_client_test_embedded.1 +usr/share/man/man1/mysqldump.1 +usr/share/man/man1/mysqldumpslow.1 +usr/share/man/man1/mysql_find_rows.1 +usr/share/man/man1/mysql_fix_extensions.1 +usr/share/man/man1/mysqlimport.1 +usr/share/man/man1/mysqlman.1 +usr/share/man/man1/mysqlshow.1 +usr/share/man/man1/mysqlslap.1 +usr/share/man/man1/mysql_waitpid.1 +# legal +usr/share/doc/mysql-community-client/COPYING +usr/share/doc/mysql-community-client/README diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-client.lintian-overrides b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-client.lintian-overrides new file mode 100644 index 00000000..fa916a06 --- /dev/null +++ b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-client.lintian-overrides @@ -0,0 +1,21 @@ +# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# Additional license file is needed so overriding this warning +mysql-community-client: extra-license-file usr/share/doc/mysql-community-client/LICENSE.mysql +mysql-community-client: extra-license-file usr/share/doc/mysql-community-clienti/COPYING.gz +mysql-community-client: copyright-should-refer-to-common-license-file-for-lgpl +# Due to static linking this cannot be avoided and hence being overridden +mysql-community-client: embedded-library diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.config b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.config new file mode 100755 index 00000000..d97d5348 --- /dev/null +++ b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.config @@ -0,0 +1,88 @@ +#!/bin/bash + +# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +. /usr/share/debconf/confmodule + +if [ "$1" = "configure" ] && [ -z "$2" ]; +then + + set -e + + PKG_LIST=mysql-server-5.5:mysql-server-5.6:mysql-community-server:mysql-commercial-server + INSTALLED_PKG=none + MYSQLDATA=/var/lib/mysql + + IFS_BACKUP=${IFS} + IFS=":" + for PKG in ${PKG_LIST}; + do + STATUS=$(dpkg -s ${PKG} 2> /dev/null | grep Status: | cut -d' ' -f4) + if [ "${STATUS}" = "installed" ]; + then + INSTALLED_PKG=${PKG} + break + fi + done + IFS=${IFS_BACKUP} + + if [ "${INSTALLED_PKG}" = "none" ]; + then + if [ -d ${MYSQLDATA} -o -L ${MYSQLDATA} ]; + then + db_input high mysql-community-server/data-dir || true + else + db_fset mysql-community-server/data-dir seen true + fi + + while :; do + PASSWD="" + db_input high mysql-community-server/root-pass || true + db_go + + db_get mysql-community-server/root-pass + if [ -z "${RET}" ]; + then + db_fset mysql-community-server/root-pass seen true + db_fset mysql-community-server/re-root-pass seen true + break + fi + PASSWD="${RET}" + + db_input high mysql-community-server/re-root-pass || true + db_go + + db_get mysql-community-server/re-root-pass + if [ "${RET}" == "${PASSWD}" ]; + then + PASSWD="" + break + fi + + db_fset mysql-community-server/root-pass-mismatch seen false + db_input critical mysql-community-server/root-pass-mismatch + db_set mysql-community-server/root-pass "" + db_set mysql-community-server/re-root-pass "" + done + + else + db_fset mysql-community-server/data-dir seen true + db_fset mysql-community-server/root-pass seen true + db_fset mysql-community-server/re-root-pass seen true + fi + + set +e +fi diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.dirs b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.dirs new file mode 100644 index 00000000..4a021150 --- /dev/null +++ b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.dirs @@ -0,0 +1,19 @@ +# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +etc/mysql/mysql.conf.d +etc/init.d +usr/lib/mysql +usr/lib/mysql/plugin diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.install b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.install new file mode 100644 index 00000000..d5b6b2b0 --- /dev/null +++ b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.install @@ -0,0 +1,94 @@ +# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# binaries +usr/bin/innochecksum +usr/bin/msql2mysql +usr/bin/myisamchk +usr/bin/myisamlog +usr/bin/myisampack +usr/bin/my_print_defaults +usr/bin/mysqlbinlog +usr/bin/mysql_convert_table_format +usr/bin/mysqld_multi +usr/bin/mysqld_safe +usr/bin/mysqlhotcopy +usr/bin/mysql_install_db +usr/bin/mysql_plugin +usr/bin/mysql_secure_installation +usr/bin/mysql_setpermission +usr/bin/mysqltest +usr/bin/mysqltest_embedded +usr/bin/mysql_tzinfo_to_sql +usr/bin/mysql_upgrade +usr/bin/mysql_zap +usr/bin/perror +usr/bin/replace +usr/bin/resolveip +usr/bin/resolve_stack_dump +usr/sbin/mysqld +# debug binary +usr/sbin/mysqld-debug +# man pages +usr/share/man/man1/innochecksum.1 +usr/share/man/man1/comp_err.1 +usr/share/man/man1/msql2mysql.1 +usr/share/man/man1/myisamchk.1 +usr/share/man/man1/myisamlog.1 +usr/share/man/man1/myisampack.1 +usr/share/man/man1/my_print_defaults.1 +usr/share/man/man1/mysqlbinlog.1 +usr/share/man/man1/mysql_convert_table_format.1 +usr/share/man/man1/mysqld_multi.1 +usr/share/man/man1/mysqld_safe.1 +usr/share/man/man1/mysqlhotcopy.1 +usr/share/man/man1/mysql_install_db.1 +usr/share/man/man1/mysql_plugin.1 +usr/share/man/man1/mysql_secure_installation.1 +usr/share/man/man1/mysql.server.1 +usr/share/man/man1/mysql_setpermission.1 +usr/share/man/man1/mysql-stress-test.pl.1 +usr/share/man/man1/mysqltest.1 +usr/share/man/man1/mysqltest_embedded.1 +usr/share/man/man1/mysql_tzinfo_to_sql.1 +usr/share/man/man1/mysql_upgrade.1 +usr/share/man/man1/mysql_zap.1 +usr/share/man/man1/perror.1 +usr/share/man/man1/replace.1 +usr/share/man/man1/resolveip.1 +usr/share/man/man1/resolve_stack_dump.1 +usr/share/man/man8/mysqld.8 +# confguration files +debian/extra/mysql.cnf etc/mysql/ +debian/extra/mysqld.cnf etc/mysql/mysql.conf.d/ +# app armor profile +etc/apparmor.d/usr.sbin.mysqld +# SQL files +usr/share/mysql/*.sql +# plugins +usr/lib/mysql/plugin/*.so +usr/lib/mysql/plugin/debug/*.so +usr/lib/mysql/plugin/daemon_example.ini +usr/lib/mysql/plugin/debug/daemon_example.ini +# support files +usr/share/mysql/mysqld_multi.server +usr/share/mysql/magic +usr/share/mysql/mysql-log-rotate +usr/share/mysql/mysql-systemd-start +usr/share/mysql/my-default.cnf +usr/share/mysql/dictionary.txt +# legal +usr/share/doc/mysql-community-server/COPYING +usr/share/doc/mysql-community-server/README diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.lintian-overrides b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.lintian-overrides new file mode 100644 index 00000000..e80759ae --- /dev/null +++ b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.lintian-overrides @@ -0,0 +1,23 @@ +# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# Additional license file is needed so overriding this warning +mysql-community-server: extra-license-file usr/share/doc/mysql-community-server/LICENSE.mysql +mysql-community-server: extra-license-file usr/share/doc/mysql-community-server/COPYING.gz +mysql-community-server: copyright-should-refer-to-common-license-file-for-lgpl +# Due to static linking this cannot be avoided and hence being overridden +mysql-community-server: embedded-library +# Since we ship debug plugins so this error is overridden +mysql-community-server: unstripped-binary-or-object usr/lib/mysql/plugin/debug/* diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.mysql.init b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.mysql.init new file mode 100755 index 00000000..cab9cec6 --- /dev/null +++ b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.mysql.init @@ -0,0 +1,192 @@ +#!/bin/bash +# +### BEGIN INIT INFO +# Provides: mysql +# Required-Start: $remote_fs $syslog +# Required-Stop: $remote_fs $syslog +# Should-Start: $network $time +# Should-Stop: $network $time +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Start/ Stop MySQL Community Server daemon +# Description: This service script facilitates startup and shutdown of +# mysqld daemon throught its wrapper script mysqld_safe +### END INIT INFO +# + +# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +. /lib/lsb/init-functions + +cd / +umask 077 + +MYSQLDATA=/var/lib/mysql +VERSION=$(mysqld --version | grep mysqld | cut -d' ' -f4) + +get_mysql_option() { + RESULT=$(my_print_defaults "$1" | sed -n "s/^--$2=//p" | tail -n 1) + if [ -z "$RESULT" ]; + then + RESULT="$3" + fi + echo $RESULT +} + +get_running () { + PIDFILE=$(get_mysql_option mysqld_safe pid-file "") + if [ -z "$PIDFILE" ]; + then + PIDFILE=$(get_mysql_option mysqld pid-file "$MYSQLDATA/$(hostname).pid") + fi + if [ -e "$PIDFILE" ] && [ -d "/proc/$(cat "$PIDFILE")" ]; + then + echo 1 + else + echo 0 + fi +} + +server_stop () { + RUNNING=$(get_running) + COUNT=0 + while :; do + COUNT=$(( COUNT+1 )) + echo -n . + if [ "${RUNNING}" -eq 0 ]; + then + echo + break + fi + if [ "${COUNT}" -gt 15 ]; + then + echo + return 1 + fi + RUNNING=$(get_running) + sleep 1 + done + return 0 +} + +case "$1" in + 'start') + RUNNING=$(get_running) + if [ "${RUNNING}" -eq 1 ]; + then + log_action_msg "A MySQL Server is already started" + else + MYSQLRUN=/var/run/mysqld + MYSQLDATA=/var/lib/mysql + MYSQLLOG=/var/log/mysql + + if [ ! -d ${MYSQLDATA} -a ! -L ${MYSQLDATA} ]; + then + mkdir ${MYSQLDATA} + chown mysql:mysql ${MYSQLDATA} + chmod 750 ${MYSQLDATA} + fi + + if [ ! -d "${MYSQLDATA}/mysql" -a ! -L "${MYSQLDATA}/mysql" ]; + then + mkdir ${MYSQLDATA}/mysql + chown mysql:mysql ${MYSQLDATA}/mysql + chmod 750 ${MYSQLDATA}/mysql + fi + + if [ ! "$(ls -A ${MYSQLDATA}/mysql)" ]; + then + mysql_install_db --user=mysql > /dev/null + fi + + if [ ! -d ${MYSQLLOG} -a ! -L ${MYSQLLOG} ]; + then + mkdir ${MYSQLLOG} + chown mysql:adm ${MYSQLLOG} + chmod 750 ${MYSQLLOG} + touch ${MYSQLLOG}/error.log + chmod 640 ${MYSQLLOG}/error.log + chown mysql:adm ${MYSQLLOG}/error.log + fi + + if [ ! -d "${MYSQLRUN}" -a ! -L "${MYSQLRUN}" ]; + then + mkdir ${MYSQLRUN} + chown mysql:mysql ${MYSQLRUN} + chmod 755 ${MYSQLRUN} + fi + + /lib/init/apparmor-profile-load usr.sbin.mysqld + + su - mysql -s /bin/bash -c "mysqld_safe > /dev/null &" + for i in 1 2 3 4 5 6; + do + sleep 1 + echo -n . + done + echo + RUNNING=$(get_running) + if [ "${RUNNING}" -eq 1 ]; + then + log_action_msg "MySQL Community Server ${VERSION} is started" + else + log_action_msg "MySQL Community Server ${VERSION} did not start. Please check logs for more details." + fi + fi + ;; + + 'stop') + RUNNING=$(get_running) + if [ "${RUNNING}" -eq 1 ]; + then + killall -15 mysqld + server_stop + if [ "$?" -eq 0 ]; + then + log_action_msg "MySQL Community Server ${VERSION} is stopped" + else + log_action_msg "Attempt to shutdown MySQL Community Server ${VERSION} timed out" + fi + else + log_action_msg "MySQL Community Server ${VERSION} is already stopped" + fi + ;; + + 'restart'|'reload'|'force-reload') + log_action_msg "Stopping MySQL Community Server ${VERSION}" + $0 stop + log_action_msg "Re-starting MySQL Community Server ${VERSION}" + $0 start + ;; + + 'status') + RUNNING=$(get_running) + if [ ${RUNNING} -eq 1 ]; + then + log_action_msg "MySQL Community Server ${VERSION} is running" + else + log_action_msg "MySQL Community Server ${VERSION} is not running" + exit 3 + fi + ;; + + *) + echo "Usage: $SELF start|stop|restart|reload|force-reload|status" + exit 1 + ;; +esac + +exit 0 diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.mysql.service b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.mysql.service new file mode 100644 index 00000000..e38ab613 --- /dev/null +++ b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.mysql.service @@ -0,0 +1,33 @@ +# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# MySQL systemd service file + +[Unit] +Description=MySQL Community Server +After=network.target + +[Install] +WantedBy=multi-user.target + +[Service] +User=mysql +Group=mysql +PermissionsStartOnly=true +ExecStartPre=/usr/share/mysql/mysql-systemd-start pre +ExecStart=/usr/bin/mysqld_safe +ExecStartPost=/usr/share/mysql/mysql-systemd-start post +TimeoutSec=600 +Restart=on-failure diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.postinst b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.postinst new file mode 100755 index 00000000..246c2779 --- /dev/null +++ b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.postinst @@ -0,0 +1,95 @@ +#!/bin/bash + +# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +. /usr/share/debconf/confmodule + +take_upstart_job_backup () { + if [ -e "/etc/init/mysql.conf" ] && [ -d "/var/lib/mysql" ]; + then + mv /etc/init/mysql.conf /var/lib/mysql/.mysql.conf.backup + fi +} + +case "$1" in + configure) + + if [ -z "$2" ]; + then + set -e + + update-alternatives --install /etc/mysql/my.cnf my.cnf "/etc/mysql/mysql.cnf" 200 + + MYSQLDATA=/var/lib/mysql + + if [ ! -d "${MYSQLDATA}/mysql" -a ! -L "${MYSQLDATA}/mysql" ]; + then + mkdir ${MYSQLDATA}/mysql + chown mysql:mysql ${MYSQLDATA}/mysql + chmod 750 ${MYSQLDATA}/mysql + if [ ! "$(ls -A ${MYSQLDATA}/mysql)" ]; + then + mysql_install_db --user=mysql > /dev/null + fi + fi + + db_get mysql-community-server/root-pass && PASSWD=${RET} + if [ ! -z "${PASSWD}" ]; + then + db_set mysql-community-server/root-pass "" + db_set mysql-community-server/re-root-pass "" + PASSWD="UPDATE user SET password=PASSWORD('${PASSWD}') WHERE user='root';" + else + PASSWD="" + fi + + SQL=`mktemp` + if [ -f "${SQL}" ]; + then + chmod 700 ${SQL} + cat << EOF > ${SQL} +USE mysql; +${PASSWD} +DELETE FROM user WHERE user=''; +FLUSH PRIVILEGES; +EOF + mysqld --basedir=/usr --bootstrap --user=mysql --skip-grant-tables < $SQL + PASSWD="" + rm -f ${SQL} + fi + + set +e + + fi + + ;; + + abort-upgrade|abort-remove|abort-configure) + + ;; + + *) + exit 1 + ;; +esac + +db_stop + +take_upstart_job_backup + +#DEBHELPER# + +exit 0 diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.postrm b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.postrm new file mode 100755 index 00000000..6d9b3ec7 --- /dev/null +++ b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.postrm @@ -0,0 +1,155 @@ +#!/bin/bash + +# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; +then +. /usr/share/debconf/confmodule +fi + +place_upstart_job_back () { + if [ -e "/var/lib/mysql/.mysql.conf.backup" ]; + then + mv /var/lib/mysql/.mysql.conf.backup /etc/init/mysql.conf + fi +} + +get_pcount () { + PSCOUNT=$(ps -ef | grep "/usr/sbin/mysqld" | wc -l) + echo "${PSCOUNT}" +} + +server_stop () { + PSCOUNT=$(get_pcount) + COUNT=0 + while :; do + COUNT=$(( COUNT+1 )) + echo -n . + if [ "${PSCOUNT}" -eq 1 ]; + then + echo + break + fi + if [ "${COUNT}" -gt 15 ]; + then + echo + return 1 + fi + PSCOUNT=$(get_pcount) + sleep 1 + done + return 0 +} + +case "$1" in + remove) + + set -e + + place_upstart_job_back + update-alternatives --remove my.cnf "/etc/mysql/mysql.cnf" + + set +e + + ;; + + purge) + + set -e + + place_upstart_job_back + + MYSQLDATA=/var/lib/mysql + MYSQLLOG=/var/log/mysql + MYSQLRUN=/var/run/mysqld + + server_stop + + db_input high mysql-community-server/remove-data-dir || true + db_go + db_get mysql-community-server/remove-data-dir && RMDATADIR=${RET} + if [ "${RMDATADIR}" = "true" ]; + then + if [ -d ${MYSQLRUN} ] || [ -L ${MYSQLRUN} ]; + then + rm -rf ${MYSQLRUN} + fi + + if [ -d ${MYSQLLOG} ] || [ -L ${MYSQLLOG} ]; + then + rm -rf ${MYSQLLOG} + fi + + if [ -d ${MYSQLDATA} ] || [ -L ${MYSQLDATA} ]; + then + rm -rf ${MYSQLDATA} + fi + + if getent passwd mysql >/dev/null; + then + userdel mysql + fi + fi + + set +e + ;; + + abort-install) + + set -e + + place_upstart_job_back + + if [ -x "/etc/init.d/mysql" ]; + then + invoke-rc.d mysql start || exit $? + else + if [ -d ${MYSQLRUN} ] || [ -L ${MYSQLRUN} ]; + then + rm -rf ${MYSQLRUN} + fi + + if [ -d ${MYSQLLOG} ] || [ -L ${MYSQLLOG} ]; + then + rm -rf ${MYSQLLOG} + fi + + if [ -d ${MYSQLDATA} ] || [ -L ${MYSQLDATA} ]; + then + rm -rf ${MYSQLDATA} + fi + + if getent passwd mysql >/dev/null; + then + userdel mysql + fi + fi + + set +e + ;; + + upgrade|abort-upgrade) + + ;; + + *) + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.preinst b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.preinst new file mode 100755 index 00000000..2a747ba5 --- /dev/null +++ b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.preinst @@ -0,0 +1,123 @@ +#!/bin/bash + +# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +get_pcount () { + PSCOUNT=$(ps -ef | grep "/usr/sbin/mysqld" | wc -l) + echo "${PSCOUNT}" +} + +server_stop () { + PSCOUNT=$(get_pcount) + COUNT=0 + while :; do + COUNT=$(( COUNT+1 )) + echo -n . + if [ "${PSCOUNT}" -eq 1 ]; + then + echo + break + fi + if [ "${COUNT}" -gt 15 ]; + then + echo + return 1 + fi + PSCOUNT=$(get_pcount) + sleep 1 + done + return 0 +} + +case "$1" in + install) + + if [ -z "$2" ]; + then + + set -e + + if [ -x "/etc/init.d/mysql" ]; + then + invoke-rc.d mysql stop || exit $? + server_stop + fi + + MYSQLDATA=/var/lib/mysql + MYSQLLOG=/var/log/mysql + MYSQLRUN=/var/run/mysqld + + if ! getent group mysql >/dev/null; + then + addgroup --system mysql >/dev/null + fi + + if ! getent passwd mysql >/dev/null; + then + adduser --ingroup mysql --system --disabled-login --no-create-home --home ${MYSQLDATA} --shell /bin/false --gecos "MySQL Server" mysql >/dev/null + fi + + if [ ! -d ${MYSQLDATA} -a ! -L ${MYSQLDATA} ]; + then + mkdir ${MYSQLDATA} + chown mysql:mysql ${MYSQLDATA} + chmod 750 ${MYSQLDATA} + fi + + if [ ! -d ${MYSQLLOG} -a ! -L ${MYSQLLOG} ]; + then + mkdir ${MYSQLLOG} + chown mysql:adm ${MYSQLLOG} + chmod 750 ${MYSQLLOG} + touch ${MYSQLLOG}/error.log + chmod 640 ${MYSQLLOG}/error.log + chown mysql:adm ${MYSQLLOG}/error.log + fi + + if [ ! -d ${MYSQLRUN} -a ! -L ${MYSQLRUN} ]; + then + mkdir ${MYSQLRUN} + chown mysql:mysql ${MYSQLRUN} + chmod 755 ${MYSQLRUN} + fi + + set +e + + fi + + ;; + + upgrade) + + set -e + + #DEBHELPER# + server_stop + + set +e + + ;; + + abort-upgrade) + + ;; + + *) + exit 1 + ;; +esac + +exit 0 diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.prerm b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.prerm new file mode 100755 index 00000000..642c03d8 --- /dev/null +++ b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.prerm @@ -0,0 +1,24 @@ +#!/bin/bash + +# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +set -e + +#DEBHELPER# + +set +e + +exit 0 diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.templates b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.templates new file mode 100644 index 00000000..7b7e0ac3 --- /dev/null +++ b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.templates @@ -0,0 +1,33 @@ +Template: mysql-community-server/root-pass +Type: password +Description: Enter root password: + Please provide a strong password that will be set for the root account of your MySQL database. + Leave it blank if you do not wish to set or change the root password at this time. + +Template: mysql-community-server/re-root-pass +Type: password +Description: Re-enter root password: + Now that you have selected a password for the root account, please confirm by typing it again. Do not share the password with anyone. + +Template: mysql-community-server/root-pass-mismatch +Type: error +Description: The two passwords did not match + Please try again. Make sure you type the exact same password twice. + +Template: mysql-community-server/remove-data-dir +Type: boolean +Default: false +Description: Remove data directory at /var/lib/mysql ? + This operation will remove the data directory that stores all the databases, tables and related meta-data. + It is highly recommended to take data backup before removing the data directory. + +Template: mysql-community-server/data-dir +Type: note +Description: Data directory found when no MySQL server package is installed + A data directory '/var/lib/mysql' is present on this system when no MySQL server + package is currently installed on the system. The directory may be under control of + server package received from third-party vendors. It may also be an unclaimed data + directory from previous removal of mysql packages. + . + It is highly recommended to take data backup. If you have not done so, now would be + the time to take backup in another shell. Once completed, press 'Ok' to continue. diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-source.install b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-source.install new file mode 100644 index 00000000..8c3fbbb2 --- /dev/null +++ b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-source.install @@ -0,0 +1,21 @@ +# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +../*.dsc usr/src/mysql/ +../*.tar.gz usr/src/mysql/ +../*.tar.xz usr/src/mysql/ +# legal +usr/share/doc/mysql-community-source/COPYING +usr/share/doc/mysql-community-source/README diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-source.lintian-overrides b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-source.lintian-overrides new file mode 100644 index 00000000..82479233 --- /dev/null +++ b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-source.lintian-overrides @@ -0,0 +1,19 @@ +# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# Additional license file is needed so overriding this warning +mysql-community-source: extra-license-file usr/share/doc/mysql-community-source/LICENSE.mysql +mysql-community-source: extra-license-file usr/share/doc/mysql-community-source/COPYING.gz +mysql-community-source: copyright-should-refer-to-common-license-file-for-lgpl diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-test.install b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-test.install new file mode 100644 index 00000000..5b33d488 --- /dev/null +++ b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-test.install @@ -0,0 +1,20 @@ +# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +usr/lib/mysql-test/* +usr/share/man/man1/mysql-test-run.pl.1 +# legal +usr/share/doc/mysql-community-test/COPYING +usr/share/doc/mysql-community-test/README diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-test.links b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-test.links new file mode 100644 index 00000000..6a68af05 --- /dev/null +++ b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-test.links @@ -0,0 +1,17 @@ +# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +usr/lib/mysql-test/mysql-test-run.pl usr/lib/mysql-test/mysql-test-run +usr/lib/mysql-test/mysql-test-run.pl usr/lib/mysql-test/mtr diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-test.lintian-overrides b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-test.lintian-overrides new file mode 100644 index 00000000..38315bcf --- /dev/null +++ b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-test.lintian-overrides @@ -0,0 +1,19 @@ +# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# Additional license file is needed so overriding this warning +mysql-community-test: extra-license-file usr/share/doc/mysql-community-test/LICENSE.mysql +mysql-community-test: extra-license-file usr/share/doc/mysql-community-test/COPYING.gz +mysql-community-test: copyright-should-refer-to-common-license-file-for-lgpl diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/mysql-server.install b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-server.install new file mode 100644 index 00000000..47255da6 --- /dev/null +++ b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-server.install @@ -0,0 +1,18 @@ +# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# legal +usr/share/doc/mysql-server/COPYING +usr/share/doc/mysql-server/README diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/mysql-server.lintian-overrides b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-server.lintian-overrides new file mode 100644 index 00000000..8642e14c --- /dev/null +++ b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-server.lintian-overrides @@ -0,0 +1,19 @@ +# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# Additional license file is needed so overriding this warning +mysql-server: extra-license-file usr/share/doc/mysql-server/LICENSE.mysql +mysql-server: extra-license-file usr/share/doc/mysql-server/COPYING.gz +mysql-server: copyright-should-refer-to-common-license-file-for-lgpl diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/mysql-testsuite.install b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-testsuite.install new file mode 100644 index 00000000..342af045 --- /dev/null +++ b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-testsuite.install @@ -0,0 +1,18 @@ +# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# legal +usr/share/doc/mysql-testsuite/COPYING +usr/share/doc/mysql-testsuite/README diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/mysql-testsuite.lintian-overrides b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-testsuite.lintian-overrides new file mode 100644 index 00000000..fd192af2 --- /dev/null +++ b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-testsuite.lintian-overrides @@ -0,0 +1,19 @@ +# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# Additional license file is needed so overriding this warning +mysql-testsuite: extra-license-file usr/share/doc/mysql-testsuite/LICENSE.mysql +mysql-testsuite: extra-license-file usr/share/doc/mysql-testsuite/COPYING.gz +mysql-testsuite: copyright-should-refer-to-common-license-file-for-lgpl diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/patches/fix-man-page-links.patch b/mysql-wsrep-5.6/packaging/deb-xenial/patches/fix-man-page-links.patch new file mode 100644 index 00000000..004ccdf7 --- /dev/null +++ b/mysql-wsrep-5.6/packaging/deb-xenial/patches/fix-man-page-links.patch @@ -0,0 +1,14 @@ +From: Akhil Mohan +Description: Fix path in man page link. +Bug: http://bugs.mysql.com/bug.php?id=70952 + +--- a/man/mysql_client_test_embedded.1 2013-11-08 19:00:22.000000000 +0530 ++++ b/man/mysql_client_test_embedded.1 2013-11-14 19:29:56.768315219 +0530 +@@ -1 +1 @@ +-.so man-gpl-tmp2/mysql_client_test.1 ++.so man1/mysql_client_test.1 +--- a/man/mysqltest_embedded.1 2013-11-08 19:00:22.000000000 +0530 ++++ b/man/mysqltest_embedded.1 2013-11-14 19:31:19.079280675 +0530 +@@ -1 +1 @@ +-.so man-gpl-tmp2/mysqltest.1 ++.so man1/mysqltest.1 diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/patches/fix-mtr-search-paths.patch b/mysql-wsrep-5.6/packaging/deb-xenial/patches/fix-mtr-search-paths.patch new file mode 100644 index 00000000..8a27a091 --- /dev/null +++ b/mysql-wsrep-5.6/packaging/deb-xenial/patches/fix-mtr-search-paths.patch @@ -0,0 +1,13 @@ +From: Akhil Mohan +Description: Adding extra search path for testsuite. + +--- a/mysql-test/lib/mtr_cases.pm 2014-02-24 13:14:37 +0530 ++++ b/mysql-test/lib/mtr_cases.pm 2014-07-02 11:46:24 +0530 +@@ -288,6 +288,7 @@ + { + $suitedir= my_find_dir($::basedir, + ["share/mysql-test/suite", ++ "lib/mysql-test/suite", + "mysql-test/suite", + "internal/mysql-test/suite", + "mysql-test", diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/patches/fix-mysql_install_db.patch b/mysql-wsrep-5.6/packaging/deb-xenial/patches/fix-mysql_install_db.patch new file mode 100644 index 00000000..41311b2c --- /dev/null +++ b/mysql-wsrep-5.6/packaging/deb-xenial/patches/fix-mysql_install_db.patch @@ -0,0 +1,43 @@ +From: Terje Røsten +Description: Maintains the pending --skip-my-cnf option in mainline +Bug: + +diff --git a/scripts/mysql_install_db.pl.in b/scripts/mysql_install_db.pl.in +index 440a977..7d068fc 100644 +--- a/scripts/mysql_install_db.pl.in ++++ b/scripts/mysql_install_db.pl.in +@@ -113,6 +113,7 @@ EOF2 + print <{srcdir} and $opt->{basedir} ) + { + error($opt,"Specify either --basedir or --srcdir, not both"); + } +-if ( $opt->{'keep-my-cnf'} ) ++if ( $opt->{rpm} || $opt->{'keep-my-cnf'} ) + { + $keep_my_cnf = 1; + } +@@ -664,7 +665,7 @@ if ( $opt->{'skip-name-resolve'} and $resolved and $resolved =~ /\s/ ) + } + + # ---------------------------------------------------------------------- +-# Create database directories mysql & test ++# Create database directory mysql + # ---------------------------------------------------------------------- + + # FIXME The shell variant uses "mkdir -p": +@@ -697,7 +698,7 @@ if ($opt_user) + } + } + +-foreach my $dir ( $opt->{ldata}, "$opt->{ldata}/mysql", "$opt->{ldata}/test" ) ++foreach my $dir ( $opt->{ldata}, "$opt->{ldata}/mysql") + { + mkdir($dir, 0700) unless -d $dir; + if ($opt_user and -w "/") diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/patches/series b/mysql-wsrep-5.6/packaging/deb-xenial/patches/series new file mode 100644 index 00000000..48069e28 --- /dev/null +++ b/mysql-wsrep-5.6/packaging/deb-xenial/patches/series @@ -0,0 +1,18 @@ +# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +#fix-man-page-links.patch +fix-mysql_install_db.patch +fix-mtr-search-paths.patch diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/rules b/mysql-wsrep-5.6/packaging/deb-xenial/rules new file mode 100755 index 00000000..e81d6a22 --- /dev/null +++ b/mysql-wsrep-5.6/packaging/deb-xenial/rules @@ -0,0 +1,137 @@ +#!/usr/bin/make -f + +# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +%: + dh $@ + +export DH_VERBOSE=1 +export CFLAGS= +export CXXFLAGS= + +override_dh_auto_configure: + @echo "RULES.$@" + cmake . \ + -DBUILD_CONFIG=mysql_release \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DINSTALL_DOCDIR=share/mysql/docs \ + -DINSTALL_DOCREADMEDIR=share/mysql \ + -DINSTALL_INCLUDEDIR=include/mysql \ + -DINSTALL_INFODIR=share/mysql/docs \ + -DINSTALL_LIBDIR=lib/$(DEB_HOST_MULTIARCH) \ + -DINSTALL_MANDIR=share/man \ + -DINSTALL_MYSQLSHAREDIR=share/mysql \ + -DINSTALL_MYSQLTESTDIR=lib/mysql-test \ + -DINSTALL_PLUGINDIR=lib/mysql/plugin \ + -DINSTALL_SBINDIR=sbin \ + -DINSTALL_SCRIPTDIR=bin \ + -DINSTALL_SQLBENCHDIR=lib/mysql \ + -DINSTALL_SUPPORTFILESDIR=share/mysql \ + -DMYSQL_DATADIR=/var/lib/mysql \ + -DSYSCONFDIR=/etc/mysql \ + -DMYSQL_UNIX_ADDR=/var/run/mysqld/mysqld.sock \ + -DWITH_SSL=bundled \ + -DWITH_ZLIB=system \ + -DWITH_EXTRA_CHARSETS=all \ + -DWITH_INNODB_MEMCACHED=1 \ + -DCOMPILATION_COMMENT="MySQL Community Server (GPL)" \ + -DINSTALL_LAYOUT=DEB + + cat CMakeCache.txt + touch $@ + +override_dh_auto_build: + @echo "RULES.$@" + $(MAKE) -j8 VERBOSE=1 + touch $@ + +override_dh_auto_test: + @echo "RULES.$@" + echo "No tests run because test 9: pfs_connect_attr is failing unreasonably" + touch $@ + +override_dh_auto_install: + + @echo "RULES.$@" + # complete install first + $(MAKE) install DESTDIR=debian/tmp + # remove all redundant files and links + rm debian/tmp/usr/lib/*/*_r* + rm debian/tmp/usr/lib/mysql-test/cmake_install.cmake + rm debian/tmp/usr/lib/mysql-test/CTestTestfile.cmake + rm debian/tmp/usr/lib/mysql-test/Makefile + # add missing man pages + install -g root -o root -m 0644 debian/extra/mysql_embedded.1 debian/tmp/usr/share/man/man1 + # add MySQL Server debug binary and library to package + install -g root -o root -m 0755 debian/extra/server-binary debian/tmp/usr/sbin/mysqld-debug + install -g root -o root -m 0755 debian/extra/embedded-server debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libmysqld-debug.a + # add debug plugin libraries to package + install -g root -o root -m 0755 -d debian/tmp/usr/lib/mysql/plugin/debug + for file in debian/extra/*-plugin; do NEW=`echo $$file | cut -d- -f1`; mv $$file $$NEW.so; done + install -g root -o root -m 0755 debian/extra/*.so debian/tmp/usr/lib/mysql/plugin/debug + install -g root -o root -m 0755 debian/extra/daemon_example.ini debian/tmp/usr/lib/mysql/plugin/debug + # add apparmor profile + install -g root -o root -m 0644 -D debian/extra/apparmor-profile debian/tmp/etc/apparmor.d/usr.sbin.mysqld + # add systemd script + install -m 0755 debian/extra/mysql-systemd-start debian/tmp/usr/share/mysql/ + # add directory for legal docs + install -g root -o root -m 0755 -d debian/tmp/usr/share/doc/mysql-server + install -g root -o root -m 0755 -d debian/tmp/usr/share/doc/mysql-community-server + install -g root -o root -m 0755 -d debian/tmp/usr/share/doc/mysql-client + install -g root -o root -m 0755 -d debian/tmp/usr/share/doc/mysql-community-client + install -g root -o root -m 0755 -d debian/tmp/usr/share/doc/mysql-common + install -g root -o root -m 0755 -d debian/tmp/usr/share/doc/libmysqlclient18 + install -g root -o root -m 0755 -d debian/tmp/usr/share/doc/libmysqlclient-dev + install -g root -o root -m 0755 -d debian/tmp/usr/share/doc/libmysqld-dev + install -g root -o root -m 0755 -d debian/tmp/usr/share/doc/mysql-community-bench + install -g root -o root -m 0755 -d debian/tmp/usr/share/doc/mysql-testsuite + install -g root -o root -m 0755 -d debian/tmp/usr/share/doc/mysql-community-test + install -g root -o root -m 0755 -d debian/tmp/usr/share/doc/mysql-community-source + # add COPYING file to each package + install -g root -o root -m 0644 debian/tmp/usr/share/mysql/COPYING debian/tmp/usr/share/doc/mysql-server/COPYING + install -g root -o root -m 0644 debian/tmp/usr/share/mysql/COPYING debian/tmp/usr/share/doc/mysql-community-server/COPYING + install -g root -o root -m 0644 debian/tmp/usr/share/mysql/COPYING debian/tmp/usr/share/doc/mysql-client/COPYING + install -g root -o root -m 0644 debian/tmp/usr/share/mysql/COPYING debian/tmp/usr/share/doc/mysql-community-client/COPYING + install -g root -o root -m 0644 debian/tmp/usr/share/mysql/COPYING debian/tmp/usr/share/doc/mysql-common/COPYING + install -g root -o root -m 0644 debian/tmp/usr/share/mysql/COPYING debian/tmp/usr/share/doc/libmysqlclient18/COPYING + install -g root -o root -m 0644 debian/tmp/usr/share/mysql/COPYING debian/tmp/usr/share/doc/libmysqlclient-dev/COPYING + install -g root -o root -m 0644 debian/tmp/usr/share/mysql/COPYING debian/tmp/usr/share/doc/libmysqld-dev/COPYING + install -g root -o root -m 0644 debian/tmp/usr/share/mysql/COPYING debian/tmp/usr/share/doc/mysql-community-bench/COPYING + install -g root -o root -m 0644 debian/tmp/usr/share/mysql/COPYING debian/tmp/usr/share/doc/mysql-testsuite/COPYING + install -g root -o root -m 0644 debian/tmp/usr/share/mysql/COPYING debian/tmp/usr/share/doc/mysql-community-test/COPYING + install -g root -o root -m 0644 debian/tmp/usr/share/mysql/COPYING debian/tmp/usr/share/doc/mysql-community-source/COPYING + # add README file to each package + install -g root -o root -m 0644 debian/tmp/usr/share/mysql/README debian/tmp/usr/share/doc/mysql-server/README + install -g root -o root -m 0644 debian/tmp/usr/share/mysql/README debian/tmp/usr/share/doc/mysql-community-server/README + install -g root -o root -m 0644 debian/tmp/usr/share/mysql/README debian/tmp/usr/share/doc/mysql-client/README + install -g root -o root -m 0644 debian/tmp/usr/share/mysql/README debian/tmp/usr/share/doc/mysql-community-client/README + install -g root -o root -m 0644 debian/tmp/usr/share/mysql/README debian/tmp/usr/share/doc/mysql-common/README + install -g root -o root -m 0644 debian/tmp/usr/share/mysql/README debian/tmp/usr/share/doc/libmysqlclient18/README + install -g root -o root -m 0644 debian/tmp/usr/share/mysql/README debian/tmp/usr/share/doc/libmysqlclient-dev/README + install -g root -o root -m 0644 debian/tmp/usr/share/mysql/README debian/tmp/usr/share/doc/libmysqld-dev/README + install -g root -o root -m 0644 debian/tmp/usr/share/mysql/README debian/tmp/usr/share/doc/mysql-community-bench/README + install -g root -o root -m 0644 debian/tmp/usr/share/mysql/README debian/tmp/usr/share/doc/mysql-testsuite/README + install -g root -o root -m 0644 debian/tmp/usr/share/mysql/README debian/tmp/usr/share/doc/mysql-community-test/README + install -g root -o root -m 0644 debian/tmp/usr/share/mysql/README debian/tmp/usr/share/doc/mysql-community-source/README + touch $@ + +override_dh_installinit: + @echo "RULES.$@" + dh_apparmor -pmysql-community-server --profile-name=usr.sbin.mysqld + dh_systemd_enable --name=mysql + dh_installinit --name=mysql -- defaults 19 21 + dh_systemd_start --restart-after-upgrade + touch $@ diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/source/format b/mysql-wsrep-5.6/packaging/deb-xenial/source/format new file mode 100644 index 00000000..163aaf8d --- /dev/null +++ b/mysql-wsrep-5.6/packaging/deb-xenial/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/source/include-binaries b/mysql-wsrep-5.6/packaging/deb-xenial/source/include-binaries new file mode 100644 index 00000000..a1992308 --- /dev/null +++ b/mysql-wsrep-5.6/packaging/deb-xenial/source/include-binaries @@ -0,0 +1,34 @@ +# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# obscured filename for mysqld-debug, libmysqld-debug.a and debug plugins +debian/extra/server-binary +debian/extra/embedded-server +debian/extra/adt_null-plugin +debian/extra/auth-plugin +debian/extra/auth_socket-plugin +debian/extra/auth_test_plugin-plugin +debian/extra/innodb_engine-plugin +debian/extra/libdaemon_example-plugin +debian/extra/libmemcached-plugin +debian/extra/mypluglib-plugin +debian/extra/mysql_no_login-plugin +debian/extra/qa_auth_client-plugin +debian/extra/qa_auth_interface-plugin +debian/extra/qa_auth_server-plugin +debian/extra/semisync_master-plugin +debian/extra/semisync_slave-plugin +debian/extra/test_udf_services-plugin +debian/extra/validate_password-plugin diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/watch b/mysql-wsrep-5.6/packaging/deb-xenial/watch new file mode 100644 index 00000000..c45c5e3e --- /dev/null +++ b/mysql-wsrep-5.6/packaging/deb-xenial/watch @@ -0,0 +1,2 @@ +version=3 +http://mysql.mirrors.pair.com/Downloads/MySQL-5.6/mysql-([\d\.]+).tar.gz diff --git a/mysql-wsrep-5.6/packaging/rpm-docker/mysql.spec.in b/mysql-wsrep-5.6/packaging/rpm-docker/mysql.spec.in index 47498f34..47ad2c2c 100644 --- a/mysql-wsrep-5.6/packaging/rpm-docker/mysql.spec.in +++ b/mysql-wsrep-5.6/packaging/rpm-docker/mysql.spec.in @@ -1,4 +1,4 @@ -# Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -189,7 +189,8 @@ done # Remove test plugins for p in auth.so auth_test_plugin.so daemon_example.ini libdaemon_example.so qa_auth_client.so \ - qa_auth_interface.so qa_auth_server.so replication_observers_example_plugin.so ha_example.so ; do + qa_auth_interface.so qa_auth_server.so replication_observers_example_plugin.so ha_example.so \ + test_udf_services.so ; do rm -f %{buildroot}%{_libdir}/mysql/plugin/$p done @@ -286,6 +287,9 @@ rm -r $(readlink var) var %dir %attr(750, mysql, mysql) /var/lib/mysql-files %changelog +* Mon Mar 14 2016 Georgi Kodinov - 5.6.31-1 +- Add test_udf_services.so plugin + * Thu Jun 25 2015 Balasubramanian Kandasamy - 5.6.26-1 - Update package names diff --git a/mysql-wsrep-5.6/packaging/rpm-fedora/CMakeLists.txt b/mysql-wsrep-5.6/packaging/rpm-fedora/CMakeLists.txt index 63dc7d1d..51bf0035 100644 --- a/mysql-wsrep-5.6/packaging/rpm-fedora/CMakeLists.txt +++ b/mysql-wsrep-5.6/packaging/rpm-fedora/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -28,7 +28,7 @@ IF(UNIX) FOREACH(fedfile my.cnf my_config.h mysql_config.sh mysqld.service mysql-systemd-start mysql.conf - mysql-5.6.16-mysql-install.patch mysql-5.6-libmysqlclient-symbols.patch) + mysql-5.6.16-mysql-install.patch) CONFIGURE_FILE(${fedfile} ${CMAKE_CURRENT_BINARY_DIR}/${fedfile} COPYONLY) ENDFOREACH() ENDIF() diff --git a/mysql-wsrep-5.6/packaging/rpm-fedora/mysql-5.6-libmysqlclient-symbols.patch b/mysql-wsrep-5.6/packaging/rpm-fedora/mysql-5.6-libmysqlclient-symbols.patch deleted file mode 100644 index e16e65a0..00000000 --- a/mysql-wsrep-5.6/packaging/rpm-fedora/mysql-5.6-libmysqlclient-symbols.patch +++ /dev/null @@ -1,960 +0,0 @@ -diff -rup old/libmysql/libmysql.c new/libmysql/libmysql.c ---- old/libmysql/libmysql.c 2013-11-04 20:15:10.000000000 +0100 -+++ new/libmysql/libmysql.c 2014-01-14 12:10:27.148374504 +0100 -@@ -4898,3 +4898,612 @@ my_bool STDCALL mysql_read_query_result( - return (*mysql->methods->read_query_result)(mysql); - } - -+#ifndef EMBEDDED_LIBRARY -+ -+// Hack to provide both libmysqlclient_16 and libmysqlclient_18 symbol versions -+ -+#define SYM_16(_exportedsym) __asm__(".symver symver16_" #_exportedsym "," #_exportedsym "@libmysqlclient_16") -+ -+void STDCALL symver16_myodbc_remove_escape(MYSQL *mysql,char *name) -+{ -+ return myodbc_remove_escape(mysql, name); -+} -+SYM_16(myodbc_remove_escape); -+ -+ -+my_ulonglong STDCALL symver16_mysql_affected_rows(MYSQL *mysql) -+{ -+ return mysql_affected_rows(mysql); -+} -+SYM_16(mysql_affected_rows); -+ -+ -+my_bool STDCALL symver16_mysql_autocommit(MYSQL * mysql, my_bool auto_mode) -+{ -+ return mysql_autocommit(mysql, auto_mode); -+} -+SYM_16(mysql_autocommit); -+ -+ -+my_bool STDCALL symver16_mysql_change_user(MYSQL *mysql, const char *user, const char *passwd, const char *db) -+{ -+ return mysql_change_user(mysql, user, passwd, db); -+} -+SYM_16(mysql_change_user); -+ -+ -+const char * STDCALL symver16_mysql_character_set_name(MYSQL *mysql) -+{ -+ return mysql_character_set_name(mysql); -+} -+SYM_16(mysql_character_set_name); -+ -+ -+my_bool STDCALL symver16_mysql_commit(MYSQL * mysql) -+{ -+ return mysql_commit(mysql); -+} -+SYM_16(mysql_commit); -+ -+ -+void STDCALL symver16_mysql_data_seek(MYSQL_RES *result, my_ulonglong row) -+{ -+ return mysql_data_seek(result, row); -+} -+SYM_16(mysql_data_seek); -+ -+ -+void STDCALL symver16_mysql_debug(const char *debug __attribute__((unused))) -+{ -+ return mysql_debug(debug); -+} -+SYM_16(mysql_debug); -+ -+ -+int STDCALL symver16_mysql_dump_debug_info(MYSQL *mysql) -+{ -+ return mysql_dump_debug_info(mysql); -+} -+SYM_16(mysql_dump_debug_info); -+ -+ -+my_bool STDCALL symver16_mysql_embedded(void) -+{ -+ return mysql_embedded(); -+} -+SYM_16(mysql_embedded); -+ -+ -+my_bool STDCALL symver16_mysql_eof(MYSQL_RES *res) -+{ -+ return mysql_eof(res); -+} -+SYM_16(mysql_eof); -+ -+ -+ulong STDCALL symver16_mysql_escape_string(char *to,const char *from,ulong length) -+{ -+ return mysql_escape_string(to, from, length); -+} -+SYM_16(mysql_escape_string); -+ -+ -+MYSQL_FIELD * STDCALL symver16_mysql_fetch_field(MYSQL_RES *result) -+{ -+ return mysql_fetch_field(result); -+} -+SYM_16(mysql_fetch_field); -+ -+ -+MYSQL_FIELD * STDCALL symver16_mysql_fetch_field_direct(MYSQL_RES *res,uint fieldnr) -+{ -+ return mysql_fetch_field_direct(res, fieldnr); -+} -+SYM_16(mysql_fetch_field_direct); -+ -+ -+MYSQL_FIELD * STDCALL symver16_mysql_fetch_fields(MYSQL_RES *res) -+{ -+ return mysql_fetch_fields(res); -+} -+SYM_16(mysql_fetch_fields); -+ -+ -+unsigned int STDCALL symver16_mysql_field_count(MYSQL *mysql) -+{ -+ return mysql_field_count(mysql); -+} -+SYM_16(mysql_field_count); -+ -+ -+MYSQL_FIELD_OFFSET STDCALL symver16_mysql_field_seek(MYSQL_RES *result, MYSQL_FIELD_OFFSET field_offset) -+{ -+ return mysql_field_seek(result, field_offset); -+} -+SYM_16(mysql_field_seek); -+ -+ -+MYSQL_FIELD_OFFSET STDCALL symver16_mysql_field_tell(MYSQL_RES *res) -+{ -+ return mysql_field_tell(res); -+} -+SYM_16(mysql_field_tell); -+ -+ -+void STDCALL symver16_mysql_get_character_set_info(MYSQL *mysql, MY_CHARSET_INFO *csinfo) -+{ -+ return mysql_get_character_set_info(mysql, csinfo); -+} -+SYM_16(mysql_get_character_set_info); -+ -+ -+const char * STDCALL symver16_mysql_get_client_info(void) -+{ -+ return mysql_get_client_info(); -+} -+SYM_16(mysql_get_client_info); -+ -+ulong STDCALL symver16_mysql_get_client_version(void) -+{ -+ return mysql_get_client_version(); -+} -+SYM_16(mysql_get_client_version); -+ -+ -+const char * STDCALL symver16_mysql_get_host_info(MYSQL *mysql) -+{ -+ return mysql_get_host_info(mysql); -+} -+SYM_16(mysql_get_host_info); -+ -+ -+MYSQL_PARAMETERS *STDCALL symver16_mysql_get_parameters(void) -+{ -+ return mysql_get_parameters(); -+} -+SYM_16(mysql_get_parameters); -+ -+ -+uint STDCALL symver16_mysql_get_proto_info(MYSQL *mysql) -+{ -+ return mysql_get_proto_info(mysql); -+} -+SYM_16(mysql_get_proto_info); -+ -+ -+const char * STDCALL symver16_mysql_get_server_info(MYSQL *mysql) -+{ -+ return mysql_get_server_info(mysql); -+} -+SYM_16(mysql_get_server_info); -+ -+ -+ulong STDCALL symver16_mysql_hex_string(char *to, const char *from, ulong length) -+{ -+ return mysql_hex_string(to, from, length); -+} -+SYM_16(mysql_hex_string); -+ -+ -+const char *STDCALL symver16_mysql_info(MYSQL *mysql) -+{ -+ return mysql_info(mysql); -+} -+SYM_16(mysql_info); -+ -+ -+my_ulonglong STDCALL symver16_mysql_insert_id(MYSQL *mysql) -+{ -+ return mysql_insert_id(mysql); -+} -+SYM_16(mysql_insert_id); -+ -+ -+int STDCALL symver16_mysql_kill(MYSQL *mysql,ulong pid) -+{ -+ return mysql_kill(mysql, pid); -+} -+SYM_16(mysql_kill); -+ -+ -+MYSQL_RES * STDCALL symver16_mysql_list_dbs(MYSQL *mysql, const char *wild) -+{ -+ return mysql_list_dbs(mysql, wild); -+} -+SYM_16(mysql_list_dbs); -+ -+ -+MYSQL_RES * STDCALL symver16_mysql_list_fields(MYSQL *mysql, const char *table, const char *wild) -+{ -+ return mysql_list_fields(mysql, table, wild); -+} -+SYM_16(mysql_list_fields); -+ -+ -+MYSQL_RES * STDCALL symver16_mysql_list_processes(MYSQL *mysql) -+{ -+ return mysql_list_processes(mysql); -+} -+SYM_16(mysql_list_processes); -+ -+ -+MYSQL_RES * STDCALL symver16_mysql_list_tables(MYSQL *mysql, const char *wild) -+{ -+ return mysql_list_tables(mysql, wild); -+} -+SYM_16(mysql_list_tables); -+ -+ -+my_bool STDCALL symver16_mysql_more_results(MYSQL *mysql) -+{ -+ return mysql_more_results(mysql); -+} -+SYM_16(mysql_more_results); -+ -+ -+int STDCALL symver16_mysql_next_result(MYSQL *mysql) -+{ -+ return mysql_next_result(mysql); -+} -+SYM_16(mysql_next_result); -+ -+ -+int STDCALL symver16_mysql_ping(MYSQL *mysql) -+{ -+ return mysql_ping(mysql); -+} -+SYM_16(mysql_ping); -+ -+ -+int STDCALL symver16_mysql_query(MYSQL *mysql, const char *query) -+{ -+ return mysql_query(mysql, query); -+} -+SYM_16(mysql_query); -+ -+ -+my_bool STDCALL symver16_mysql_read_query_result(MYSQL *mysql) -+{ -+ return mysql_read_query_result(mysql); -+} -+SYM_16(mysql_read_query_result); -+ -+ -+ulong STDCALL symver16_mysql_real_escape_string(MYSQL *mysql, char *to,const char *from, ulong length) -+{ -+ return mysql_real_escape_string(mysql, to, from, length); -+} -+SYM_16(mysql_real_escape_string); -+ -+ -+int STDCALL symver16_mysql_refresh(MYSQL *mysql,uint options) -+{ -+ return mysql_refresh(mysql, options); -+} -+SYM_16(mysql_refresh); -+ -+ -+my_bool STDCALL symver16_mysql_rollback(MYSQL * mysql) -+{ -+ return mysql_rollback(mysql); -+} -+SYM_16(mysql_rollback); -+ -+ -+MYSQL_ROW_OFFSET STDCALL symver16_mysql_row_seek(MYSQL_RES *result, MYSQL_ROW_OFFSET row) -+{ -+ return mysql_row_seek(result, row); -+} -+SYM_16(mysql_row_seek); -+ -+ -+MYSQL_ROW_OFFSET STDCALL symver16_mysql_row_tell(MYSQL_RES *res) -+{ -+ return mysql_row_tell(res); -+} -+SYM_16(mysql_row_tell); -+ -+ -+void STDCALL symver16_mysql_server_end() -+{ -+ return mysql_server_end(); -+} -+SYM_16(mysql_server_end); -+ -+ -+int STDCALL symver16_mysql_server_init(int argc __attribute__((unused)), char **argv __attribute__((unused)), char **groups __attribute__((unused))) -+{ -+ return mysql_server_init(argc, argv, groups); -+} -+SYM_16(mysql_server_init); -+ -+ -+void symver16_mysql_set_local_infile_default(MYSQL *mysql) -+{ -+ return mysql_set_local_infile_default(mysql); -+} -+SYM_16(mysql_set_local_infile_default); -+ -+ -+void symver16_mysql_set_local_infile_handler(MYSQL *mysql, int (*local_infile_init)(void **, const char *, void *), int (*local_infile_read)(void *, char *, uint), void (*local_infile_end)(void *), int (*local_infile_error)(void *, char *, uint), void *userdata) -+{ -+ return mysql_set_local_infile_handler(mysql, local_infile_init, local_infile_read, local_infile_end, local_infile_error, userdata); -+} -+SYM_16(mysql_set_local_infile_handler); -+ -+ -+int STDCALL symver16_mysql_set_server_option(MYSQL *mysql, enum enum_mysql_set_option option) -+{ -+ return mysql_set_server_option(mysql, option); -+} -+SYM_16(mysql_set_server_option); -+ -+ -+int STDCALL symver16_mysql_shutdown(MYSQL *mysql, enum mysql_enum_shutdown_level shutdown_level) -+{ -+ return mysql_shutdown(mysql, shutdown_level); -+} -+SYM_16(mysql_shutdown); -+ -+ -+const char *STDCALL symver16_mysql_sqlstate(MYSQL *mysql) -+{ -+ return mysql_sqlstate(mysql); -+} -+SYM_16(mysql_sqlstate); -+ -+ -+const char * STDCALL symver16_mysql_stat(MYSQL *mysql) -+{ -+ return mysql_stat(mysql); -+} -+SYM_16(mysql_stat); -+ -+ -+my_ulonglong STDCALL symver16_mysql_stmt_affected_rows(MYSQL_STMT *stmt) -+{ -+ return mysql_stmt_affected_rows(stmt); -+} -+SYM_16(mysql_stmt_affected_rows); -+ -+ -+my_bool STDCALL symver16_mysql_stmt_attr_get(MYSQL_STMT *stmt, enum enum_stmt_attr_type attr_type, void *value) -+{ -+ return mysql_stmt_attr_get(stmt, attr_type, value); -+} -+SYM_16(mysql_stmt_attr_get); -+ -+ -+my_bool STDCALL symver16_mysql_stmt_attr_set(MYSQL_STMT *stmt, enum enum_stmt_attr_type attr_type, const void *value) -+{ -+ return mysql_stmt_attr_set(stmt, attr_type, value); -+} -+SYM_16(mysql_stmt_attr_set); -+ -+ -+my_bool STDCALL symver16_mysql_stmt_bind_param(MYSQL_STMT *stmt, MYSQL_BIND *my_bind) -+{ -+ return mysql_stmt_bind_param(stmt, my_bind); -+} -+SYM_16(mysql_stmt_bind_param); -+ -+ -+my_bool STDCALL symver16_mysql_stmt_bind_result(MYSQL_STMT *stmt, MYSQL_BIND *my_bind) -+{ -+ return mysql_stmt_bind_result(stmt, my_bind); -+} -+SYM_16(mysql_stmt_bind_result); -+ -+ -+my_bool STDCALL symver16_mysql_stmt_close(MYSQL_STMT *stmt) -+{ -+ return mysql_stmt_close(stmt); -+} -+SYM_16(mysql_stmt_close); -+ -+ -+void STDCALL symver16_mysql_stmt_data_seek(MYSQL_STMT *stmt, my_ulonglong row) -+{ -+ return mysql_stmt_data_seek(stmt, row); -+} -+SYM_16(mysql_stmt_data_seek); -+ -+ -+uint STDCALL symver16_mysql_stmt_errno(MYSQL_STMT * stmt) -+{ -+ return mysql_stmt_errno(stmt); -+} -+SYM_16(mysql_stmt_errno); -+ -+ -+const char *STDCALL symver16_mysql_stmt_error(MYSQL_STMT * stmt) -+{ -+ return mysql_stmt_error(stmt); -+} -+SYM_16(mysql_stmt_error); -+ -+ -+int STDCALL symver16_mysql_stmt_execute(MYSQL_STMT *stmt) -+{ -+ return mysql_stmt_execute(stmt); -+} -+SYM_16(mysql_stmt_execute); -+ -+ -+int STDCALL symver16_mysql_stmt_fetch(MYSQL_STMT *stmt) -+{ -+ return mysql_stmt_fetch(stmt); -+} -+SYM_16(mysql_stmt_fetch); -+ -+ -+int STDCALL symver16_mysql_stmt_fetch_column(MYSQL_STMT *stmt, MYSQL_BIND *my_bind, uint column, ulong offset) -+{ -+ return mysql_stmt_fetch_column(stmt, my_bind, column, offset); -+} -+SYM_16(mysql_stmt_fetch_column); -+ -+ -+unsigned int STDCALL symver16_mysql_stmt_field_count(MYSQL_STMT *stmt) -+{ -+ return mysql_stmt_field_count(stmt); -+} -+SYM_16(mysql_stmt_field_count); -+ -+ -+my_bool STDCALL symver16_mysql_stmt_free_result(MYSQL_STMT *stmt) -+{ -+ return mysql_stmt_free_result(stmt); -+} -+SYM_16(mysql_stmt_free_result); -+ -+ -+MYSQL_STMT * STDCALL symver16_mysql_stmt_init(MYSQL *mysql) -+{ -+ return mysql_stmt_init(mysql); -+} -+SYM_16(mysql_stmt_init); -+ -+ -+my_ulonglong STDCALL symver16_mysql_stmt_insert_id(MYSQL_STMT *stmt) -+{ -+ return mysql_stmt_insert_id(stmt); -+} -+SYM_16(mysql_stmt_insert_id); -+ -+ -+my_ulonglong STDCALL symver16_mysql_stmt_num_rows(MYSQL_STMT *stmt) -+{ -+ return mysql_stmt_num_rows(stmt); -+} -+SYM_16(mysql_stmt_num_rows); -+ -+ -+ulong STDCALL symver16_mysql_stmt_param_count(MYSQL_STMT * stmt) -+{ -+ return mysql_stmt_param_count(stmt); -+} -+SYM_16(mysql_stmt_param_count); -+ -+ -+MYSQL_RES * STDCALL symver16_mysql_stmt_param_metadata(MYSQL_STMT *stmt) -+{ -+ return mysql_stmt_param_metadata(stmt); -+} -+SYM_16(mysql_stmt_param_metadata); -+ -+ -+int STDCALL symver16_mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query, ulong length) -+{ -+ return mysql_stmt_prepare(stmt, query, length); -+} -+SYM_16(mysql_stmt_prepare); -+ -+ -+my_bool STDCALL symver16_mysql_stmt_reset(MYSQL_STMT *stmt) -+{ -+ return mysql_stmt_reset(stmt); -+} -+SYM_16(mysql_stmt_reset); -+ -+ -+MYSQL_RES * STDCALL symver16_mysql_stmt_result_metadata(MYSQL_STMT *stmt) -+{ -+ return mysql_stmt_result_metadata(stmt); -+} -+SYM_16(mysql_stmt_result_metadata); -+ -+ -+MYSQL_ROW_OFFSET STDCALL symver16_mysql_stmt_row_seek(MYSQL_STMT *stmt, MYSQL_ROW_OFFSET row) -+{ -+ return mysql_stmt_row_seek(stmt, row); -+} -+SYM_16(mysql_stmt_row_seek); -+ -+ -+MYSQL_ROW_OFFSET STDCALL symver16_mysql_stmt_row_tell(MYSQL_STMT *stmt) -+{ -+ return mysql_stmt_row_tell(stmt); -+} -+SYM_16(mysql_stmt_row_tell); -+ -+ -+my_bool STDCALL symver16_mysql_stmt_send_long_data(MYSQL_STMT *stmt, uint param_number, const char *data, ulong length) -+{ -+ return mysql_stmt_send_long_data(stmt, param_number, data, length); -+} -+SYM_16(mysql_stmt_send_long_data); -+ -+ -+const char *STDCALL symver16_mysql_stmt_sqlstate(MYSQL_STMT * stmt) -+{ -+ return mysql_stmt_sqlstate(stmt); -+} -+SYM_16(mysql_stmt_sqlstate); -+ -+ -+int STDCALL symver16_mysql_stmt_store_result(MYSQL_STMT *stmt) -+{ -+ return mysql_stmt_store_result(stmt); -+} -+SYM_16(mysql_stmt_store_result); -+ -+ -+void STDCALL symver16_mysql_thread_end() -+{ -+ return mysql_thread_end(); -+} -+SYM_16(mysql_thread_end); -+ -+ -+ulong STDCALL symver16_mysql_thread_id(MYSQL *mysql) -+{ -+ return mysql_thread_id(mysql); -+} -+SYM_16(mysql_thread_id); -+ -+ -+my_bool STDCALL symver16_mysql_thread_init() -+{ -+ return mysql_thread_init(); -+} -+SYM_16(mysql_thread_init); -+ -+ -+uint STDCALL symver16_mysql_thread_safe(void) -+{ -+ return mysql_thread_safe(); -+} -+SYM_16(mysql_thread_safe); -+ -+ -+MYSQL_RES * STDCALL symver16_mysql_use_result(MYSQL *mysql) -+{ -+ return mysql_use_result(mysql); -+} -+SYM_16(mysql_use_result); -+ -+ -+uint STDCALL symver16_mysql_warning_count(MYSQL *mysql) -+{ -+ return mysql_warning_count(mysql); -+} -+SYM_16(mysql_warning_count); -+ -+/*****/ -+ -+MYSQL * STDCALL symver16_mysql_real_connect(MYSQL *mysql,const char *host, const char *user, const char *passwd, const char *db, uint port, const char *unix_socket,ulong client_flag) -+{ -+ return mysql_real_connect(mysql, host, user, passwd, db, port, unix_socket, client_flag); -+} -+SYM_16(mysql_real_connect); -+ -+/*****/ -+ -+my_bool symver16_my_init(void) -+{ -+ return my_init(); -+} -+SYM_16(my_init); -+ -+#endif -diff -rup old/libmysql/libmysql.ver.in new/libmysql/libmysql.ver.in ---- old/libmysql/libmysql.ver.in 2013-11-04 20:15:10.000000000 +0100 -+++ new/libmysql/libmysql.ver.in 2014-01-14 12:10:27.148374504 +0100 -@@ -1 +1,136 @@ --libmysqlclient_@SHARED_LIB_MAJOR_VERSION@ { global: *; }; -+libmysqlclient_16 -+{ -+ local: -+ symver16_*; -+}; -+ -+libmysqlclient_18 -+{ -+ global: -+ my_init; -+ myodbc_remove_escape; -+ mysql_affected_rows; -+ mysql_autocommit; -+ mysql_change_user; -+ mysql_character_set_name; -+ mysql_close; -+ mysql_commit; -+ mysql_data_seek; -+ mysql_debug; -+ mysql_dump_debug_info; -+ mysql_embedded; -+ mysql_eof; -+ mysql_errno; -+ mysql_error; -+ mysql_escape_string; -+ mysql_fetch_field; -+ mysql_fetch_field_direct; -+ mysql_fetch_fields; -+ mysql_fetch_lengths; -+ mysql_fetch_row; -+ mysql_field_count; -+ mysql_field_seek; -+ mysql_field_tell; -+ mysql_free_result; -+ mysql_get_character_set_info; -+ mysql_get_client_info; -+ mysql_get_client_version; -+ mysql_get_host_info; -+ mysql_get_parameters; -+ mysql_get_proto_info; -+ mysql_get_server_info; -+ mysql_get_server_version; -+ mysql_get_ssl_cipher; -+ mysql_hex_string; -+ mysql_info; -+ mysql_init; -+ mysql_insert_id; -+ mysql_kill; -+ mysql_list_dbs; -+ mysql_list_fields; -+ mysql_list_processes; -+ mysql_list_tables; -+ mysql_more_results; -+ mysql_next_result; -+ mysql_num_fields; -+ mysql_num_rows; -+ mysql_options; -+ mysql_ping; -+ mysql_query; -+ mysql_read_query_result; -+ mysql_real_connect; -+ mysql_real_escape_string; -+ mysql_real_query; -+ mysql_refresh; -+ mysql_rollback; -+ mysql_row_seek; -+ mysql_row_tell; -+ mysql_select_db; -+ mysql_send_query; -+ mysql_server_end; -+ mysql_server_init; -+ mysql_set_character_set; -+ mysql_set_local_infile_default; -+ mysql_set_local_infile_handler; -+ mysql_set_server_option; -+ mysql_shutdown; -+ mysql_sqlstate; -+ mysql_ssl_set; -+ mysql_stat; -+ mysql_stmt_affected_rows; -+ mysql_stmt_attr_get; -+ mysql_stmt_attr_set; -+ mysql_stmt_bind_param; -+ mysql_stmt_bind_result; -+ mysql_stmt_close; -+ mysql_stmt_data_seek; -+ mysql_stmt_errno; -+ mysql_stmt_error; -+ mysql_stmt_execute; -+ mysql_stmt_fetch; -+ mysql_stmt_fetch_column; -+ mysql_stmt_field_count; -+ mysql_stmt_free_result; -+ mysql_stmt_init; -+ mysql_stmt_insert_id; -+ mysql_stmt_num_rows; -+ mysql_stmt_param_count; -+ mysql_stmt_param_metadata; -+ mysql_stmt_prepare; -+ mysql_stmt_reset; -+ mysql_stmt_result_metadata; -+ mysql_stmt_row_seek; -+ mysql_stmt_row_tell; -+ mysql_stmt_send_long_data; -+ mysql_stmt_sqlstate; -+ mysql_stmt_store_result; -+ mysql_store_result; -+ mysql_thread_end; -+ mysql_thread_id; -+ mysql_thread_init; -+ mysql_thread_safe; -+ mysql_use_result; -+ mysql_warning_count; -+ -+ free_defaults; -+ handle_options; -+ load_defaults; -+ my_print_help; -+ -+ #my_make_scrambled_password; -+ THR_KEY_mysys; -+ -+ mysql_client_find_plugin; -+ mysql_client_register_plugin; -+ mysql_load_plugin; -+ mysql_load_plugin_v; -+ mysql_plugin_options; -+ mysql_stmt_next_result; -+ -+ #mysql_default_charset_info; -+ mysql_get_charset; -+ mysql_get_charset_by_csname; -+ mysql_net_realloc; -+ #mysql_client_errors; -+ *; -+} libmysqlclient_16; -diff -rup old/mysys/charset.c new/mysys/charset.c ---- old/mysys/charset.c 2013-11-04 20:15:10.000000000 +0100 -+++ new/mysys/charset.c 2014-01-14 12:10:27.197377417 +0100 -@@ -1040,3 +1040,20 @@ size_t escape_quotes_for_mysql(CHARSET_I - *to= 0; - return overflow ? (ulong)~0 : (ulong) (to - to_start); - } -+ -+#ifndef EMBEDDED_LIBRARY -+ -+// Hack to provide Fedora symbols -+ -+CHARSET_INFO *mysql_get_charset(uint cs_number, myf flags) -+{ -+ return get_charset(cs_number, flags); -+} -+ -+ -+CHARSET_INFO * mysql_get_charset_by_csname(const char *cs_name, uint cs_flags, myf flags) -+{ -+ return get_charset_by_csname(cs_name, cs_flags, flags); -+} -+ -+#endif -diff -rup old/sql/net_serv.cc new/sql/net_serv.cc ---- old/sql/net_serv.cc 2013-11-04 20:15:10.000000000 +0100 -+++ new/sql/net_serv.cc 2014-01-14 12:10:27.252380688 +0100 -@@ -1047,3 +1047,15 @@ void my_net_set_write_timeout(NET *net, - DBUG_VOID_RETURN; - } - -+#ifndef EMBEDDED_LIBRARY -+C_MODE_START -+ -+// Hack to provide Fedora symbols -+ -+my_bool mysql_net_realloc(NET *net, size_t length) -+{ -+ return net_realloc(net, length); -+} -+ -+C_MODE_END -+#endif -diff -rup old/sql/password.c new/sql/password.c ---- old/sql/password.c 2013-11-04 20:15:10.000000000 +0100 -+++ new/sql/password.c 2014-01-14 12:10:27.309384078 +0100 -@@ -584,3 +584,16 @@ void make_password_from_salt(char *to, c - octet2hex(to, (const char*) hash_stage2, SHA1_HASH_SIZE); - } - -+#ifndef EMBEDDED_LIBRARY -+ -+// Hack to provide both libmysqlclient_16 and libmysqlclient_18 symbol versions -+ -+#define SYM_16(_exportedsym) __asm__(".symver symver16_" #_exportedsym "," #_exportedsym "@libmysqlclient_16") -+ -+void symver16_my_make_scrambled_password(char *to, const char *password, size_t pass_len) -+{ -+ my_make_scrambled_password(to, password, pass_len); -+} -+SYM_16(my_make_scrambled_password); -+ -+#endif -diff -rup old/sql-common/client.c new/sql-common/client.c ---- old/sql-common/client.c 2013-11-04 20:15:10.000000000 +0100 -+++ new/sql-common/client.c 2014-01-14 12:10:27.199377537 +0100 -@@ -4847,3 +4847,136 @@ static int clear_password_auth_client(MY - - return res ? CR_ERROR : CR_OK; - } -+ -+#ifndef EMBEDDED_LIBRARY -+ -+// Hack to provide both libmysqlclient_16 and libmysqlclient_18 symbol versions -+ -+#define SYM_16(_exportedsym) __asm__(".symver symver16_" #_exportedsym "," #_exportedsym "@libmysqlclient_16") -+ -+void STDCALL symver16_mysql_close(MYSQL *mysql) -+{ -+ return mysql_close(mysql); -+} -+SYM_16(mysql_close); -+ -+ -+uint STDCALL symver16_mysql_errno(MYSQL *mysql) -+{ -+ return mysql_errno(mysql); -+} -+SYM_16(mysql_errno); -+ -+ -+const char * STDCALL symver16_mysql_error(MYSQL *mysql) -+{ -+ return mysql_error(mysql); -+} -+SYM_16(mysql_error); -+ -+ -+ulong * STDCALL symver16_mysql_fetch_lengths(MYSQL_RES *res) -+{ -+ return mysql_fetch_lengths(res); -+} -+SYM_16(mysql_fetch_lengths); -+ -+ -+MYSQL_ROW STDCALL symver16_mysql_fetch_row(MYSQL_RES *res) -+{ -+ return mysql_fetch_row(res); -+} -+SYM_16(mysql_fetch_row); -+ -+ -+void STDCALL symver16_mysql_free_result(MYSQL_RES *result) -+{ -+ return mysql_free_result(result); -+} -+SYM_16(mysql_free_result); -+ -+ -+ulong STDCALL symver16_mysql_get_server_version(MYSQL *mysql) -+{ -+ return mysql_get_server_version(mysql); -+} -+SYM_16(mysql_get_server_version); -+ -+ -+const char * STDCALL symver16_mysql_get_ssl_cipher(MYSQL *mysql __attribute__((unused))) -+{ -+ return mysql_get_ssl_cipher(mysql); -+} -+SYM_16(mysql_get_ssl_cipher); -+ -+ -+MYSQL * STDCALL symver16_mysql_init(MYSQL *mysql) -+{ -+ return mysql_init(mysql); -+} -+SYM_16(mysql_init); -+ -+ -+unsigned int STDCALL symver16_mysql_num_fields(MYSQL_RES *res) -+{ -+ return mysql_num_fields(res); -+} -+SYM_16(mysql_num_fields); -+ -+ -+my_ulonglong STDCALL symver16_mysql_num_rows(MYSQL_RES *res) -+{ -+ return mysql_num_rows(res); -+} -+SYM_16(mysql_num_rows); -+ -+ -+int STDCALL symver16_mysql_options(MYSQL *mysql,enum mysql_option option, const void *arg) -+{ -+ return mysql_options(mysql, option, arg); -+} -+SYM_16(mysql_options); -+ -+ -+int STDCALL symver16_mysql_real_query(MYSQL *mysql, const char *query, ulong length) -+{ -+ return mysql_real_query(mysql, query, length); -+} -+SYM_16(mysql_real_query); -+ -+ -+int STDCALL symver16_mysql_select_db(MYSQL *mysql, const char *db) -+{ -+ return mysql_select_db(mysql, db); -+} -+SYM_16(mysql_select_db); -+ -+ -+int STDCALL symver16_mysql_send_query(MYSQL* mysql, const char* query, ulong length) -+{ -+ return mysql_send_query(mysql, query, length); -+} -+SYM_16(mysql_send_query); -+ -+ -+int STDCALL symver16_mysql_set_character_set(MYSQL *mysql, const char *cs_name) -+{ -+ return mysql_set_character_set(mysql, cs_name); -+} -+SYM_16(mysql_set_character_set); -+ -+ -+my_bool STDCALL symver16_mysql_ssl_set(MYSQL *mysql __attribute__((unused)), const char *key __attribute__((unused)), const char *cert __attribute__((unused)), const char *ca __attribute__((unused)), const char *capath __attribute__((unused)), const char *cipher __attribute__((unused))) -+{ -+ return mysql_ssl_set(mysql, key, cert, ca, capath, cipher); -+} -+SYM_16(mysql_ssl_set); -+ -+ -+MYSQL_RES * STDCALL symver16_mysql_store_result(MYSQL *mysql) -+{ -+ return mysql_store_result(mysql); -+} -+SYM_16(mysql_store_result); -+ -+#endif diff --git a/mysql-wsrep-5.6/packaging/rpm-fedora/mysql.spec.in b/mysql-wsrep-5.6/packaging/rpm-fedora/mysql.spec.in index 2f571ac4..1a8af1b8 100644 --- a/mysql-wsrep-5.6/packaging/rpm-fedora/mysql.spec.in +++ b/mysql-wsrep-5.6/packaging/rpm-fedora/mysql.spec.in @@ -1,4 +1,4 @@ -# Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -54,6 +54,8 @@ %global license_type GPLv2 %endif +%global min 5.6.10 + Name: mysql-%{product_suffix} Summary: A very fast and reliable SQL database server Group: Applications/Databases @@ -69,8 +71,7 @@ Source2: mysqld.service Source3: mysql.conf Source4: my_config.h Source6: mysql_config.sh -Patch0: mysql-5.6-libmysqlclient-symbols.patch -Patch1: mysql-5.6.16-mysql-install.patch +Patch0: mysql-5.6.16-mysql-install.patch BuildRequires: cmake BuildRequires: perl BuildRequires: time @@ -114,14 +115,15 @@ Requires: shadow-utils Requires: net-tools %if 0%{?commercial} Obsoletes: mysql-community-server < %{version}-%{release} -Requires: mysql-commercial-client%{?_isa} = %{version}-%{release} +Requires: mysql-commercial-client%{?_isa} >= %{min} Requires: mysql-commercial-common%{?_isa} = %{version}-%{release} %else -Requires: mysql-community-client%{?_isa} = %{version}-%{release} +Requires: mysql-community-client%{?_isa} >= %{min} Requires: mysql-community-common%{?_isa} = %{version}-%{release} %endif Obsoletes: mariadb-server Obsoletes: mariadb-galera-server +Obsoletes: mariadb-server-galera Obsoletes: community-mysql-server < %{version}-%{release} Obsoletes: mysql-server < %{version}-%{release} Provides: mysql-server = %{version}-%{release} @@ -158,9 +160,9 @@ Summary: MySQL database client applications and tools Group: Applications/Databases %if 0%{?commercial} Obsoletes: mysql-community-client < %{version}-%{release} -Requires: mysql-commercial-libs%{?_isa} = %{version}-%{release} +Requires: mysql-commercial-libs%{?_isa} >= %{min} %else -Requires: mysql-community-libs%{?_isa} = %{version}-%{release} +Requires: mysql-community-libs%{?_isa} >= %{min} %endif Obsoletes: mariadb Obsoletes: community-mysql < %{version}-%{release} @@ -196,10 +198,10 @@ MySQL database server, and MySQL embedded server. Summary: Test suite for the MySQL database server Group: Applications/Databases %if 0%{?commercial} -Requires: mysql-commercial-server%{?_isa} = %{version}-%{release} +Requires: mysql-commercial-server%{?_isa} >= %{min} Obsoletes: mysql-community-test < %{version}-%{release} %else -Requires: mysql-community-server%{?_isa} = %{version}-%{release} +Requires: mysql-community-server%{?_isa} >= %{min} %endif Obsoletes: mariadb-test Obsoletes: community-mysql-test < %{version}-%{release} @@ -217,9 +219,9 @@ Summary: MySQL benchmark suite Group: Applications/Databases %if 0%{?commercial} Obsoletes: mysql-community-bench < %{version}-%{release} -Requires: mysql-commercial-server%{?_isa} = %{version}-%{release} +Requires: mysql-commercial-server%{?_isa} >= %{min} %else -Requires: mysql-community-server%{?_isa} = %{version}-%{release} +Requires: mysql-community-server%{?_isa} >= %{min} %endif Obsoletes: mariadb-bench Obsoletes: community-mysql-bench < %{obs_ver} @@ -236,9 +238,9 @@ Summary: Development header files and libraries for MySQL database client Group: Applications/Databases %if 0%{?commercial} Obsoletes: mysql-community-devel < %{version}-%{release} -Requires: mysql-enterprise-libs%{?_isa} = %{version}-%{release} +Requires: mysql-commercial-libs%{?_isa} >= %{min} %else -Requires: mysql-community-libs%{?_isa} = %{version}-%{release} +Requires: mysql-community-libs%{?_isa} >= %{min} %endif Obsoletes: mariadb-devel Obsoletes: community-mysql-devel < %{obs_ver} @@ -255,9 +257,9 @@ Summary: Shared libraries for MySQL database client applications Group: Applications/Databases %if 0%{?commercial} Obsoletes: mysql-community-libs < %{version}-%{release} -Requires: mysql-commercial-common%{?_isa} = %{version}-%{release} +Requires: mysql-commercial-common%{?_isa} >= %{min} %else -Requires: mysql-community-common%{?_isa} = %{version}-%{release} +Requires: mysql-community-common%{?_isa} >= %{min} %endif Obsoletes: mariadb-libs Obsoletes: community-mysql-libs < %{version}-%{release} @@ -301,11 +303,11 @@ Summary: Development header files and libraries for MySQL as an embeddabl Group: Applications/Databases %if 0%{?commercial} Obsoletes: mysql-community-embedded-devel < %{version}-%{release} -Requires: mysql-commercial-devel%{?_isa} = %{version}-%{release} -Requires: mysql-commercial-embedded%{?_isa} = %{version}-%{release} +Requires: mysql-commercial-devel%{?_isa} >= %{min} +Requires: mysql-commercial-embedded%{?_isa} >= %{min} %else -Requires: mysql-community-devel%{?_isa} = %{version}-%{release} -Requires: mysql-community-embedded%{?_isa} = %{version}-%{release} +Requires: mysql-community-devel%{?_isa} >= %{min} +Requires: mysql-community-embedded%{?_isa} >= %{min} %endif Obsoletes: mariadb-embedded-devel Obsoletes: community-mysql-embedded-devel < %{version}-%{release} @@ -321,7 +323,6 @@ the embedded version of the MySQL server. %setup -q -T -a 0 -c -n %{src_dir} pushd %{src_dir} %patch0 -p1 -%patch1 -p1 %build # Fail quickly and obviously if user tries to build as root @@ -352,6 +353,7 @@ mkdir debug -DINSTALL_SQLBENCHDIR=share \ -DMYSQL_UNIX_ADDR="%{mysqldatadir}/mysql.sock" \ -DFEATURE_SET="%{feature_set}" \ + -DWITH_SYMVER16=1 \ -DWITH_EMBEDDED_SERVER=1 \ -DWITH_EMBEDDED_SHARED_LIBRARY=1 \ %{?ssl_option} \ @@ -377,6 +379,7 @@ mkdir release -DINSTALL_SQLBENCHDIR=share \ -DMYSQL_UNIX_ADDR="%{mysqldatadir}/mysql.sock" \ -DFEATURE_SET="%{feature_set}" \ + -DWITH_SYMVER16=1 \ -DWITH_EMBEDDED_SERVER=1 \ -DWITH_EMBEDDED_SHARED_LIBRARY=1 \ %{?ssl_option} \ @@ -458,6 +461,7 @@ rm -r $(readlink var) var datadir=$(/usr/bin/my_print_defaults server mysqld | grep '^--datadir=' | sed -n 's/--datadir=//p' | tail -n 1) /bin/chmod 0755 "$datadir" >/dev/null 2>&1 || : /bin/touch /var/log/mysqld.log >/dev/null 2>&1 || : +/bin/chown mysql:mysql /var/log/mysqld.log >/dev/null 2>&1 || : %systemd_post mysqld.service /usr/bin/systemctl enable mysqld >/dev/null 2>&1 || : @@ -625,8 +629,6 @@ datadir=$(/usr/bin/my_print_defaults server mysqld | grep '^--datadir=' | sed -n %attr(755, root, root) %{_bindir}/mysqlimport %attr(755, root, root) %{_bindir}/mysqlshow %attr(755, root, root) %{_bindir}/mysqlslap -%attr(755, root, root) %{_bindir}/mysql_config -%attr(755, root, root) %{_bindir}/mysql_config-%{__isa_bits} %attr(755, root, root) %{_bindir}/mysql_config_editor %attr(644, root, root) %{_mandir}/man1/msql2mysql.1* @@ -679,12 +681,14 @@ datadir=$(/usr/bin/my_print_defaults server mysqld | grep '^--datadir=' | sed -n %attr(755, root, root) %{_libdir}/mysql/plugin/auth_test_plugin.so %attr(644, root, root) %{_libdir}/mysql/plugin/daemon_example.ini %attr(755, root, root) %{_libdir}/mysql/plugin/libdaemon_example.so +%attr(755, root, root) %{_libdir}/mysql/plugin/test_udf_services.so %attr(755, root, root) %{_libdir}/mysql/plugin/qa_auth_client.so %attr(755, root, root) %{_libdir}/mysql/plugin/qa_auth_interface.so %attr(755, root, root) %{_libdir}/mysql/plugin/qa_auth_server.so %attr(755, root, root) %{_libdir}/mysql/plugin/debug/auth.so %attr(755, root, root) %{_libdir}/mysql/plugin/debug/auth_test_plugin.so %attr(755, root, root) %{_libdir}/mysql/plugin/debug/libdaemon_example.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/test_udf_services.so %attr(755, root, root) %{_libdir}/mysql/plugin/debug/qa_auth_client.so %attr(755, root, root) %{_libdir}/mysql/plugin/debug/qa_auth_interface.so %attr(755, root, root) %{_libdir}/mysql/plugin/debug/qa_auth_server.so @@ -716,6 +720,12 @@ datadir=$(/usr/bin/my_print_defaults server mysqld | grep '^--datadir=' | sed -n %attr(755, root, root) %{_libdir}/mysql/libmysqld.so %changelog +* Tue Jul 05 2016 Balasubramanian Kandasamy - 5.6.32-1 +- Remove mysql_config from client subpackage + +* Mon Mar 14 2016 Georgi Kodinov - 5.6.31-1 +- Add test_udf_services.so plugin + * Wed Jan 14 2015 Balasubramanian Kandasamy - 5.6.24-1 - Add mysql_no_login.so plugin diff --git a/mysql-wsrep-5.6/packaging/rpm-oel/CMakeLists.txt b/mysql-wsrep-5.6/packaging/rpm-oel/CMakeLists.txt index 252573e8..948305b8 100644 --- a/mysql-wsrep-5.6/packaging/rpm-oel/CMakeLists.txt +++ b/mysql-wsrep-5.6/packaging/rpm-oel/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -29,8 +29,7 @@ IF(UNIX) FOREACH(fedfile my.cnf my_config.h mysql_config.sh mysqld.service mysql-systemd-start mysql.conf mysql-5.6.16-mysql-install.patch mysql.init - filter-requires.sh filter-provides.sh - mysql-5.6-libmysqlclient-symbols.patch) + filter-requires.sh filter-provides.sh) CONFIGURE_FILE(${fedfile} ${CMAKE_CURRENT_BINARY_DIR}/${fedfile} COPYONLY) ENDFOREACH() ENDIF() diff --git a/mysql-wsrep-5.6/packaging/rpm-oel/mysql-5.6-libmysqlclient-symbols.patch b/mysql-wsrep-5.6/packaging/rpm-oel/mysql-5.6-libmysqlclient-symbols.patch deleted file mode 100644 index e16e65a0..00000000 --- a/mysql-wsrep-5.6/packaging/rpm-oel/mysql-5.6-libmysqlclient-symbols.patch +++ /dev/null @@ -1,960 +0,0 @@ -diff -rup old/libmysql/libmysql.c new/libmysql/libmysql.c ---- old/libmysql/libmysql.c 2013-11-04 20:15:10.000000000 +0100 -+++ new/libmysql/libmysql.c 2014-01-14 12:10:27.148374504 +0100 -@@ -4898,3 +4898,612 @@ my_bool STDCALL mysql_read_query_result( - return (*mysql->methods->read_query_result)(mysql); - } - -+#ifndef EMBEDDED_LIBRARY -+ -+// Hack to provide both libmysqlclient_16 and libmysqlclient_18 symbol versions -+ -+#define SYM_16(_exportedsym) __asm__(".symver symver16_" #_exportedsym "," #_exportedsym "@libmysqlclient_16") -+ -+void STDCALL symver16_myodbc_remove_escape(MYSQL *mysql,char *name) -+{ -+ return myodbc_remove_escape(mysql, name); -+} -+SYM_16(myodbc_remove_escape); -+ -+ -+my_ulonglong STDCALL symver16_mysql_affected_rows(MYSQL *mysql) -+{ -+ return mysql_affected_rows(mysql); -+} -+SYM_16(mysql_affected_rows); -+ -+ -+my_bool STDCALL symver16_mysql_autocommit(MYSQL * mysql, my_bool auto_mode) -+{ -+ return mysql_autocommit(mysql, auto_mode); -+} -+SYM_16(mysql_autocommit); -+ -+ -+my_bool STDCALL symver16_mysql_change_user(MYSQL *mysql, const char *user, const char *passwd, const char *db) -+{ -+ return mysql_change_user(mysql, user, passwd, db); -+} -+SYM_16(mysql_change_user); -+ -+ -+const char * STDCALL symver16_mysql_character_set_name(MYSQL *mysql) -+{ -+ return mysql_character_set_name(mysql); -+} -+SYM_16(mysql_character_set_name); -+ -+ -+my_bool STDCALL symver16_mysql_commit(MYSQL * mysql) -+{ -+ return mysql_commit(mysql); -+} -+SYM_16(mysql_commit); -+ -+ -+void STDCALL symver16_mysql_data_seek(MYSQL_RES *result, my_ulonglong row) -+{ -+ return mysql_data_seek(result, row); -+} -+SYM_16(mysql_data_seek); -+ -+ -+void STDCALL symver16_mysql_debug(const char *debug __attribute__((unused))) -+{ -+ return mysql_debug(debug); -+} -+SYM_16(mysql_debug); -+ -+ -+int STDCALL symver16_mysql_dump_debug_info(MYSQL *mysql) -+{ -+ return mysql_dump_debug_info(mysql); -+} -+SYM_16(mysql_dump_debug_info); -+ -+ -+my_bool STDCALL symver16_mysql_embedded(void) -+{ -+ return mysql_embedded(); -+} -+SYM_16(mysql_embedded); -+ -+ -+my_bool STDCALL symver16_mysql_eof(MYSQL_RES *res) -+{ -+ return mysql_eof(res); -+} -+SYM_16(mysql_eof); -+ -+ -+ulong STDCALL symver16_mysql_escape_string(char *to,const char *from,ulong length) -+{ -+ return mysql_escape_string(to, from, length); -+} -+SYM_16(mysql_escape_string); -+ -+ -+MYSQL_FIELD * STDCALL symver16_mysql_fetch_field(MYSQL_RES *result) -+{ -+ return mysql_fetch_field(result); -+} -+SYM_16(mysql_fetch_field); -+ -+ -+MYSQL_FIELD * STDCALL symver16_mysql_fetch_field_direct(MYSQL_RES *res,uint fieldnr) -+{ -+ return mysql_fetch_field_direct(res, fieldnr); -+} -+SYM_16(mysql_fetch_field_direct); -+ -+ -+MYSQL_FIELD * STDCALL symver16_mysql_fetch_fields(MYSQL_RES *res) -+{ -+ return mysql_fetch_fields(res); -+} -+SYM_16(mysql_fetch_fields); -+ -+ -+unsigned int STDCALL symver16_mysql_field_count(MYSQL *mysql) -+{ -+ return mysql_field_count(mysql); -+} -+SYM_16(mysql_field_count); -+ -+ -+MYSQL_FIELD_OFFSET STDCALL symver16_mysql_field_seek(MYSQL_RES *result, MYSQL_FIELD_OFFSET field_offset) -+{ -+ return mysql_field_seek(result, field_offset); -+} -+SYM_16(mysql_field_seek); -+ -+ -+MYSQL_FIELD_OFFSET STDCALL symver16_mysql_field_tell(MYSQL_RES *res) -+{ -+ return mysql_field_tell(res); -+} -+SYM_16(mysql_field_tell); -+ -+ -+void STDCALL symver16_mysql_get_character_set_info(MYSQL *mysql, MY_CHARSET_INFO *csinfo) -+{ -+ return mysql_get_character_set_info(mysql, csinfo); -+} -+SYM_16(mysql_get_character_set_info); -+ -+ -+const char * STDCALL symver16_mysql_get_client_info(void) -+{ -+ return mysql_get_client_info(); -+} -+SYM_16(mysql_get_client_info); -+ -+ulong STDCALL symver16_mysql_get_client_version(void) -+{ -+ return mysql_get_client_version(); -+} -+SYM_16(mysql_get_client_version); -+ -+ -+const char * STDCALL symver16_mysql_get_host_info(MYSQL *mysql) -+{ -+ return mysql_get_host_info(mysql); -+} -+SYM_16(mysql_get_host_info); -+ -+ -+MYSQL_PARAMETERS *STDCALL symver16_mysql_get_parameters(void) -+{ -+ return mysql_get_parameters(); -+} -+SYM_16(mysql_get_parameters); -+ -+ -+uint STDCALL symver16_mysql_get_proto_info(MYSQL *mysql) -+{ -+ return mysql_get_proto_info(mysql); -+} -+SYM_16(mysql_get_proto_info); -+ -+ -+const char * STDCALL symver16_mysql_get_server_info(MYSQL *mysql) -+{ -+ return mysql_get_server_info(mysql); -+} -+SYM_16(mysql_get_server_info); -+ -+ -+ulong STDCALL symver16_mysql_hex_string(char *to, const char *from, ulong length) -+{ -+ return mysql_hex_string(to, from, length); -+} -+SYM_16(mysql_hex_string); -+ -+ -+const char *STDCALL symver16_mysql_info(MYSQL *mysql) -+{ -+ return mysql_info(mysql); -+} -+SYM_16(mysql_info); -+ -+ -+my_ulonglong STDCALL symver16_mysql_insert_id(MYSQL *mysql) -+{ -+ return mysql_insert_id(mysql); -+} -+SYM_16(mysql_insert_id); -+ -+ -+int STDCALL symver16_mysql_kill(MYSQL *mysql,ulong pid) -+{ -+ return mysql_kill(mysql, pid); -+} -+SYM_16(mysql_kill); -+ -+ -+MYSQL_RES * STDCALL symver16_mysql_list_dbs(MYSQL *mysql, const char *wild) -+{ -+ return mysql_list_dbs(mysql, wild); -+} -+SYM_16(mysql_list_dbs); -+ -+ -+MYSQL_RES * STDCALL symver16_mysql_list_fields(MYSQL *mysql, const char *table, const char *wild) -+{ -+ return mysql_list_fields(mysql, table, wild); -+} -+SYM_16(mysql_list_fields); -+ -+ -+MYSQL_RES * STDCALL symver16_mysql_list_processes(MYSQL *mysql) -+{ -+ return mysql_list_processes(mysql); -+} -+SYM_16(mysql_list_processes); -+ -+ -+MYSQL_RES * STDCALL symver16_mysql_list_tables(MYSQL *mysql, const char *wild) -+{ -+ return mysql_list_tables(mysql, wild); -+} -+SYM_16(mysql_list_tables); -+ -+ -+my_bool STDCALL symver16_mysql_more_results(MYSQL *mysql) -+{ -+ return mysql_more_results(mysql); -+} -+SYM_16(mysql_more_results); -+ -+ -+int STDCALL symver16_mysql_next_result(MYSQL *mysql) -+{ -+ return mysql_next_result(mysql); -+} -+SYM_16(mysql_next_result); -+ -+ -+int STDCALL symver16_mysql_ping(MYSQL *mysql) -+{ -+ return mysql_ping(mysql); -+} -+SYM_16(mysql_ping); -+ -+ -+int STDCALL symver16_mysql_query(MYSQL *mysql, const char *query) -+{ -+ return mysql_query(mysql, query); -+} -+SYM_16(mysql_query); -+ -+ -+my_bool STDCALL symver16_mysql_read_query_result(MYSQL *mysql) -+{ -+ return mysql_read_query_result(mysql); -+} -+SYM_16(mysql_read_query_result); -+ -+ -+ulong STDCALL symver16_mysql_real_escape_string(MYSQL *mysql, char *to,const char *from, ulong length) -+{ -+ return mysql_real_escape_string(mysql, to, from, length); -+} -+SYM_16(mysql_real_escape_string); -+ -+ -+int STDCALL symver16_mysql_refresh(MYSQL *mysql,uint options) -+{ -+ return mysql_refresh(mysql, options); -+} -+SYM_16(mysql_refresh); -+ -+ -+my_bool STDCALL symver16_mysql_rollback(MYSQL * mysql) -+{ -+ return mysql_rollback(mysql); -+} -+SYM_16(mysql_rollback); -+ -+ -+MYSQL_ROW_OFFSET STDCALL symver16_mysql_row_seek(MYSQL_RES *result, MYSQL_ROW_OFFSET row) -+{ -+ return mysql_row_seek(result, row); -+} -+SYM_16(mysql_row_seek); -+ -+ -+MYSQL_ROW_OFFSET STDCALL symver16_mysql_row_tell(MYSQL_RES *res) -+{ -+ return mysql_row_tell(res); -+} -+SYM_16(mysql_row_tell); -+ -+ -+void STDCALL symver16_mysql_server_end() -+{ -+ return mysql_server_end(); -+} -+SYM_16(mysql_server_end); -+ -+ -+int STDCALL symver16_mysql_server_init(int argc __attribute__((unused)), char **argv __attribute__((unused)), char **groups __attribute__((unused))) -+{ -+ return mysql_server_init(argc, argv, groups); -+} -+SYM_16(mysql_server_init); -+ -+ -+void symver16_mysql_set_local_infile_default(MYSQL *mysql) -+{ -+ return mysql_set_local_infile_default(mysql); -+} -+SYM_16(mysql_set_local_infile_default); -+ -+ -+void symver16_mysql_set_local_infile_handler(MYSQL *mysql, int (*local_infile_init)(void **, const char *, void *), int (*local_infile_read)(void *, char *, uint), void (*local_infile_end)(void *), int (*local_infile_error)(void *, char *, uint), void *userdata) -+{ -+ return mysql_set_local_infile_handler(mysql, local_infile_init, local_infile_read, local_infile_end, local_infile_error, userdata); -+} -+SYM_16(mysql_set_local_infile_handler); -+ -+ -+int STDCALL symver16_mysql_set_server_option(MYSQL *mysql, enum enum_mysql_set_option option) -+{ -+ return mysql_set_server_option(mysql, option); -+} -+SYM_16(mysql_set_server_option); -+ -+ -+int STDCALL symver16_mysql_shutdown(MYSQL *mysql, enum mysql_enum_shutdown_level shutdown_level) -+{ -+ return mysql_shutdown(mysql, shutdown_level); -+} -+SYM_16(mysql_shutdown); -+ -+ -+const char *STDCALL symver16_mysql_sqlstate(MYSQL *mysql) -+{ -+ return mysql_sqlstate(mysql); -+} -+SYM_16(mysql_sqlstate); -+ -+ -+const char * STDCALL symver16_mysql_stat(MYSQL *mysql) -+{ -+ return mysql_stat(mysql); -+} -+SYM_16(mysql_stat); -+ -+ -+my_ulonglong STDCALL symver16_mysql_stmt_affected_rows(MYSQL_STMT *stmt) -+{ -+ return mysql_stmt_affected_rows(stmt); -+} -+SYM_16(mysql_stmt_affected_rows); -+ -+ -+my_bool STDCALL symver16_mysql_stmt_attr_get(MYSQL_STMT *stmt, enum enum_stmt_attr_type attr_type, void *value) -+{ -+ return mysql_stmt_attr_get(stmt, attr_type, value); -+} -+SYM_16(mysql_stmt_attr_get); -+ -+ -+my_bool STDCALL symver16_mysql_stmt_attr_set(MYSQL_STMT *stmt, enum enum_stmt_attr_type attr_type, const void *value) -+{ -+ return mysql_stmt_attr_set(stmt, attr_type, value); -+} -+SYM_16(mysql_stmt_attr_set); -+ -+ -+my_bool STDCALL symver16_mysql_stmt_bind_param(MYSQL_STMT *stmt, MYSQL_BIND *my_bind) -+{ -+ return mysql_stmt_bind_param(stmt, my_bind); -+} -+SYM_16(mysql_stmt_bind_param); -+ -+ -+my_bool STDCALL symver16_mysql_stmt_bind_result(MYSQL_STMT *stmt, MYSQL_BIND *my_bind) -+{ -+ return mysql_stmt_bind_result(stmt, my_bind); -+} -+SYM_16(mysql_stmt_bind_result); -+ -+ -+my_bool STDCALL symver16_mysql_stmt_close(MYSQL_STMT *stmt) -+{ -+ return mysql_stmt_close(stmt); -+} -+SYM_16(mysql_stmt_close); -+ -+ -+void STDCALL symver16_mysql_stmt_data_seek(MYSQL_STMT *stmt, my_ulonglong row) -+{ -+ return mysql_stmt_data_seek(stmt, row); -+} -+SYM_16(mysql_stmt_data_seek); -+ -+ -+uint STDCALL symver16_mysql_stmt_errno(MYSQL_STMT * stmt) -+{ -+ return mysql_stmt_errno(stmt); -+} -+SYM_16(mysql_stmt_errno); -+ -+ -+const char *STDCALL symver16_mysql_stmt_error(MYSQL_STMT * stmt) -+{ -+ return mysql_stmt_error(stmt); -+} -+SYM_16(mysql_stmt_error); -+ -+ -+int STDCALL symver16_mysql_stmt_execute(MYSQL_STMT *stmt) -+{ -+ return mysql_stmt_execute(stmt); -+} -+SYM_16(mysql_stmt_execute); -+ -+ -+int STDCALL symver16_mysql_stmt_fetch(MYSQL_STMT *stmt) -+{ -+ return mysql_stmt_fetch(stmt); -+} -+SYM_16(mysql_stmt_fetch); -+ -+ -+int STDCALL symver16_mysql_stmt_fetch_column(MYSQL_STMT *stmt, MYSQL_BIND *my_bind, uint column, ulong offset) -+{ -+ return mysql_stmt_fetch_column(stmt, my_bind, column, offset); -+} -+SYM_16(mysql_stmt_fetch_column); -+ -+ -+unsigned int STDCALL symver16_mysql_stmt_field_count(MYSQL_STMT *stmt) -+{ -+ return mysql_stmt_field_count(stmt); -+} -+SYM_16(mysql_stmt_field_count); -+ -+ -+my_bool STDCALL symver16_mysql_stmt_free_result(MYSQL_STMT *stmt) -+{ -+ return mysql_stmt_free_result(stmt); -+} -+SYM_16(mysql_stmt_free_result); -+ -+ -+MYSQL_STMT * STDCALL symver16_mysql_stmt_init(MYSQL *mysql) -+{ -+ return mysql_stmt_init(mysql); -+} -+SYM_16(mysql_stmt_init); -+ -+ -+my_ulonglong STDCALL symver16_mysql_stmt_insert_id(MYSQL_STMT *stmt) -+{ -+ return mysql_stmt_insert_id(stmt); -+} -+SYM_16(mysql_stmt_insert_id); -+ -+ -+my_ulonglong STDCALL symver16_mysql_stmt_num_rows(MYSQL_STMT *stmt) -+{ -+ return mysql_stmt_num_rows(stmt); -+} -+SYM_16(mysql_stmt_num_rows); -+ -+ -+ulong STDCALL symver16_mysql_stmt_param_count(MYSQL_STMT * stmt) -+{ -+ return mysql_stmt_param_count(stmt); -+} -+SYM_16(mysql_stmt_param_count); -+ -+ -+MYSQL_RES * STDCALL symver16_mysql_stmt_param_metadata(MYSQL_STMT *stmt) -+{ -+ return mysql_stmt_param_metadata(stmt); -+} -+SYM_16(mysql_stmt_param_metadata); -+ -+ -+int STDCALL symver16_mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query, ulong length) -+{ -+ return mysql_stmt_prepare(stmt, query, length); -+} -+SYM_16(mysql_stmt_prepare); -+ -+ -+my_bool STDCALL symver16_mysql_stmt_reset(MYSQL_STMT *stmt) -+{ -+ return mysql_stmt_reset(stmt); -+} -+SYM_16(mysql_stmt_reset); -+ -+ -+MYSQL_RES * STDCALL symver16_mysql_stmt_result_metadata(MYSQL_STMT *stmt) -+{ -+ return mysql_stmt_result_metadata(stmt); -+} -+SYM_16(mysql_stmt_result_metadata); -+ -+ -+MYSQL_ROW_OFFSET STDCALL symver16_mysql_stmt_row_seek(MYSQL_STMT *stmt, MYSQL_ROW_OFFSET row) -+{ -+ return mysql_stmt_row_seek(stmt, row); -+} -+SYM_16(mysql_stmt_row_seek); -+ -+ -+MYSQL_ROW_OFFSET STDCALL symver16_mysql_stmt_row_tell(MYSQL_STMT *stmt) -+{ -+ return mysql_stmt_row_tell(stmt); -+} -+SYM_16(mysql_stmt_row_tell); -+ -+ -+my_bool STDCALL symver16_mysql_stmt_send_long_data(MYSQL_STMT *stmt, uint param_number, const char *data, ulong length) -+{ -+ return mysql_stmt_send_long_data(stmt, param_number, data, length); -+} -+SYM_16(mysql_stmt_send_long_data); -+ -+ -+const char *STDCALL symver16_mysql_stmt_sqlstate(MYSQL_STMT * stmt) -+{ -+ return mysql_stmt_sqlstate(stmt); -+} -+SYM_16(mysql_stmt_sqlstate); -+ -+ -+int STDCALL symver16_mysql_stmt_store_result(MYSQL_STMT *stmt) -+{ -+ return mysql_stmt_store_result(stmt); -+} -+SYM_16(mysql_stmt_store_result); -+ -+ -+void STDCALL symver16_mysql_thread_end() -+{ -+ return mysql_thread_end(); -+} -+SYM_16(mysql_thread_end); -+ -+ -+ulong STDCALL symver16_mysql_thread_id(MYSQL *mysql) -+{ -+ return mysql_thread_id(mysql); -+} -+SYM_16(mysql_thread_id); -+ -+ -+my_bool STDCALL symver16_mysql_thread_init() -+{ -+ return mysql_thread_init(); -+} -+SYM_16(mysql_thread_init); -+ -+ -+uint STDCALL symver16_mysql_thread_safe(void) -+{ -+ return mysql_thread_safe(); -+} -+SYM_16(mysql_thread_safe); -+ -+ -+MYSQL_RES * STDCALL symver16_mysql_use_result(MYSQL *mysql) -+{ -+ return mysql_use_result(mysql); -+} -+SYM_16(mysql_use_result); -+ -+ -+uint STDCALL symver16_mysql_warning_count(MYSQL *mysql) -+{ -+ return mysql_warning_count(mysql); -+} -+SYM_16(mysql_warning_count); -+ -+/*****/ -+ -+MYSQL * STDCALL symver16_mysql_real_connect(MYSQL *mysql,const char *host, const char *user, const char *passwd, const char *db, uint port, const char *unix_socket,ulong client_flag) -+{ -+ return mysql_real_connect(mysql, host, user, passwd, db, port, unix_socket, client_flag); -+} -+SYM_16(mysql_real_connect); -+ -+/*****/ -+ -+my_bool symver16_my_init(void) -+{ -+ return my_init(); -+} -+SYM_16(my_init); -+ -+#endif -diff -rup old/libmysql/libmysql.ver.in new/libmysql/libmysql.ver.in ---- old/libmysql/libmysql.ver.in 2013-11-04 20:15:10.000000000 +0100 -+++ new/libmysql/libmysql.ver.in 2014-01-14 12:10:27.148374504 +0100 -@@ -1 +1,136 @@ --libmysqlclient_@SHARED_LIB_MAJOR_VERSION@ { global: *; }; -+libmysqlclient_16 -+{ -+ local: -+ symver16_*; -+}; -+ -+libmysqlclient_18 -+{ -+ global: -+ my_init; -+ myodbc_remove_escape; -+ mysql_affected_rows; -+ mysql_autocommit; -+ mysql_change_user; -+ mysql_character_set_name; -+ mysql_close; -+ mysql_commit; -+ mysql_data_seek; -+ mysql_debug; -+ mysql_dump_debug_info; -+ mysql_embedded; -+ mysql_eof; -+ mysql_errno; -+ mysql_error; -+ mysql_escape_string; -+ mysql_fetch_field; -+ mysql_fetch_field_direct; -+ mysql_fetch_fields; -+ mysql_fetch_lengths; -+ mysql_fetch_row; -+ mysql_field_count; -+ mysql_field_seek; -+ mysql_field_tell; -+ mysql_free_result; -+ mysql_get_character_set_info; -+ mysql_get_client_info; -+ mysql_get_client_version; -+ mysql_get_host_info; -+ mysql_get_parameters; -+ mysql_get_proto_info; -+ mysql_get_server_info; -+ mysql_get_server_version; -+ mysql_get_ssl_cipher; -+ mysql_hex_string; -+ mysql_info; -+ mysql_init; -+ mysql_insert_id; -+ mysql_kill; -+ mysql_list_dbs; -+ mysql_list_fields; -+ mysql_list_processes; -+ mysql_list_tables; -+ mysql_more_results; -+ mysql_next_result; -+ mysql_num_fields; -+ mysql_num_rows; -+ mysql_options; -+ mysql_ping; -+ mysql_query; -+ mysql_read_query_result; -+ mysql_real_connect; -+ mysql_real_escape_string; -+ mysql_real_query; -+ mysql_refresh; -+ mysql_rollback; -+ mysql_row_seek; -+ mysql_row_tell; -+ mysql_select_db; -+ mysql_send_query; -+ mysql_server_end; -+ mysql_server_init; -+ mysql_set_character_set; -+ mysql_set_local_infile_default; -+ mysql_set_local_infile_handler; -+ mysql_set_server_option; -+ mysql_shutdown; -+ mysql_sqlstate; -+ mysql_ssl_set; -+ mysql_stat; -+ mysql_stmt_affected_rows; -+ mysql_stmt_attr_get; -+ mysql_stmt_attr_set; -+ mysql_stmt_bind_param; -+ mysql_stmt_bind_result; -+ mysql_stmt_close; -+ mysql_stmt_data_seek; -+ mysql_stmt_errno; -+ mysql_stmt_error; -+ mysql_stmt_execute; -+ mysql_stmt_fetch; -+ mysql_stmt_fetch_column; -+ mysql_stmt_field_count; -+ mysql_stmt_free_result; -+ mysql_stmt_init; -+ mysql_stmt_insert_id; -+ mysql_stmt_num_rows; -+ mysql_stmt_param_count; -+ mysql_stmt_param_metadata; -+ mysql_stmt_prepare; -+ mysql_stmt_reset; -+ mysql_stmt_result_metadata; -+ mysql_stmt_row_seek; -+ mysql_stmt_row_tell; -+ mysql_stmt_send_long_data; -+ mysql_stmt_sqlstate; -+ mysql_stmt_store_result; -+ mysql_store_result; -+ mysql_thread_end; -+ mysql_thread_id; -+ mysql_thread_init; -+ mysql_thread_safe; -+ mysql_use_result; -+ mysql_warning_count; -+ -+ free_defaults; -+ handle_options; -+ load_defaults; -+ my_print_help; -+ -+ #my_make_scrambled_password; -+ THR_KEY_mysys; -+ -+ mysql_client_find_plugin; -+ mysql_client_register_plugin; -+ mysql_load_plugin; -+ mysql_load_plugin_v; -+ mysql_plugin_options; -+ mysql_stmt_next_result; -+ -+ #mysql_default_charset_info; -+ mysql_get_charset; -+ mysql_get_charset_by_csname; -+ mysql_net_realloc; -+ #mysql_client_errors; -+ *; -+} libmysqlclient_16; -diff -rup old/mysys/charset.c new/mysys/charset.c ---- old/mysys/charset.c 2013-11-04 20:15:10.000000000 +0100 -+++ new/mysys/charset.c 2014-01-14 12:10:27.197377417 +0100 -@@ -1040,3 +1040,20 @@ size_t escape_quotes_for_mysql(CHARSET_I - *to= 0; - return overflow ? (ulong)~0 : (ulong) (to - to_start); - } -+ -+#ifndef EMBEDDED_LIBRARY -+ -+// Hack to provide Fedora symbols -+ -+CHARSET_INFO *mysql_get_charset(uint cs_number, myf flags) -+{ -+ return get_charset(cs_number, flags); -+} -+ -+ -+CHARSET_INFO * mysql_get_charset_by_csname(const char *cs_name, uint cs_flags, myf flags) -+{ -+ return get_charset_by_csname(cs_name, cs_flags, flags); -+} -+ -+#endif -diff -rup old/sql/net_serv.cc new/sql/net_serv.cc ---- old/sql/net_serv.cc 2013-11-04 20:15:10.000000000 +0100 -+++ new/sql/net_serv.cc 2014-01-14 12:10:27.252380688 +0100 -@@ -1047,3 +1047,15 @@ void my_net_set_write_timeout(NET *net, - DBUG_VOID_RETURN; - } - -+#ifndef EMBEDDED_LIBRARY -+C_MODE_START -+ -+// Hack to provide Fedora symbols -+ -+my_bool mysql_net_realloc(NET *net, size_t length) -+{ -+ return net_realloc(net, length); -+} -+ -+C_MODE_END -+#endif -diff -rup old/sql/password.c new/sql/password.c ---- old/sql/password.c 2013-11-04 20:15:10.000000000 +0100 -+++ new/sql/password.c 2014-01-14 12:10:27.309384078 +0100 -@@ -584,3 +584,16 @@ void make_password_from_salt(char *to, c - octet2hex(to, (const char*) hash_stage2, SHA1_HASH_SIZE); - } - -+#ifndef EMBEDDED_LIBRARY -+ -+// Hack to provide both libmysqlclient_16 and libmysqlclient_18 symbol versions -+ -+#define SYM_16(_exportedsym) __asm__(".symver symver16_" #_exportedsym "," #_exportedsym "@libmysqlclient_16") -+ -+void symver16_my_make_scrambled_password(char *to, const char *password, size_t pass_len) -+{ -+ my_make_scrambled_password(to, password, pass_len); -+} -+SYM_16(my_make_scrambled_password); -+ -+#endif -diff -rup old/sql-common/client.c new/sql-common/client.c ---- old/sql-common/client.c 2013-11-04 20:15:10.000000000 +0100 -+++ new/sql-common/client.c 2014-01-14 12:10:27.199377537 +0100 -@@ -4847,3 +4847,136 @@ static int clear_password_auth_client(MY - - return res ? CR_ERROR : CR_OK; - } -+ -+#ifndef EMBEDDED_LIBRARY -+ -+// Hack to provide both libmysqlclient_16 and libmysqlclient_18 symbol versions -+ -+#define SYM_16(_exportedsym) __asm__(".symver symver16_" #_exportedsym "," #_exportedsym "@libmysqlclient_16") -+ -+void STDCALL symver16_mysql_close(MYSQL *mysql) -+{ -+ return mysql_close(mysql); -+} -+SYM_16(mysql_close); -+ -+ -+uint STDCALL symver16_mysql_errno(MYSQL *mysql) -+{ -+ return mysql_errno(mysql); -+} -+SYM_16(mysql_errno); -+ -+ -+const char * STDCALL symver16_mysql_error(MYSQL *mysql) -+{ -+ return mysql_error(mysql); -+} -+SYM_16(mysql_error); -+ -+ -+ulong * STDCALL symver16_mysql_fetch_lengths(MYSQL_RES *res) -+{ -+ return mysql_fetch_lengths(res); -+} -+SYM_16(mysql_fetch_lengths); -+ -+ -+MYSQL_ROW STDCALL symver16_mysql_fetch_row(MYSQL_RES *res) -+{ -+ return mysql_fetch_row(res); -+} -+SYM_16(mysql_fetch_row); -+ -+ -+void STDCALL symver16_mysql_free_result(MYSQL_RES *result) -+{ -+ return mysql_free_result(result); -+} -+SYM_16(mysql_free_result); -+ -+ -+ulong STDCALL symver16_mysql_get_server_version(MYSQL *mysql) -+{ -+ return mysql_get_server_version(mysql); -+} -+SYM_16(mysql_get_server_version); -+ -+ -+const char * STDCALL symver16_mysql_get_ssl_cipher(MYSQL *mysql __attribute__((unused))) -+{ -+ return mysql_get_ssl_cipher(mysql); -+} -+SYM_16(mysql_get_ssl_cipher); -+ -+ -+MYSQL * STDCALL symver16_mysql_init(MYSQL *mysql) -+{ -+ return mysql_init(mysql); -+} -+SYM_16(mysql_init); -+ -+ -+unsigned int STDCALL symver16_mysql_num_fields(MYSQL_RES *res) -+{ -+ return mysql_num_fields(res); -+} -+SYM_16(mysql_num_fields); -+ -+ -+my_ulonglong STDCALL symver16_mysql_num_rows(MYSQL_RES *res) -+{ -+ return mysql_num_rows(res); -+} -+SYM_16(mysql_num_rows); -+ -+ -+int STDCALL symver16_mysql_options(MYSQL *mysql,enum mysql_option option, const void *arg) -+{ -+ return mysql_options(mysql, option, arg); -+} -+SYM_16(mysql_options); -+ -+ -+int STDCALL symver16_mysql_real_query(MYSQL *mysql, const char *query, ulong length) -+{ -+ return mysql_real_query(mysql, query, length); -+} -+SYM_16(mysql_real_query); -+ -+ -+int STDCALL symver16_mysql_select_db(MYSQL *mysql, const char *db) -+{ -+ return mysql_select_db(mysql, db); -+} -+SYM_16(mysql_select_db); -+ -+ -+int STDCALL symver16_mysql_send_query(MYSQL* mysql, const char* query, ulong length) -+{ -+ return mysql_send_query(mysql, query, length); -+} -+SYM_16(mysql_send_query); -+ -+ -+int STDCALL symver16_mysql_set_character_set(MYSQL *mysql, const char *cs_name) -+{ -+ return mysql_set_character_set(mysql, cs_name); -+} -+SYM_16(mysql_set_character_set); -+ -+ -+my_bool STDCALL symver16_mysql_ssl_set(MYSQL *mysql __attribute__((unused)), const char *key __attribute__((unused)), const char *cert __attribute__((unused)), const char *ca __attribute__((unused)), const char *capath __attribute__((unused)), const char *cipher __attribute__((unused))) -+{ -+ return mysql_ssl_set(mysql, key, cert, ca, capath, cipher); -+} -+SYM_16(mysql_ssl_set); -+ -+ -+MYSQL_RES * STDCALL symver16_mysql_store_result(MYSQL *mysql) -+{ -+ return mysql_store_result(mysql); -+} -+SYM_16(mysql_store_result); -+ -+#endif diff --git a/mysql-wsrep-5.6/packaging/rpm-oel/mysql.init b/mysql-wsrep-5.6/packaging/rpm-oel/mysql.init index bfd4a4c8..0d64f0e7 100644 --- a/mysql-wsrep-5.6/packaging/rpm-oel/mysql.init +++ b/mysql-wsrep-5.6/packaging/rpm-oel/mysql.init @@ -102,7 +102,7 @@ start(){ # alarms, per bug #547485 $exec --datadir="$datadir" --socket="$socketfile" \ --pid-file="$mypidfile" \ - --basedir=/usr --user=mysql >/dev/null 2>&1 & + --basedir=/usr --user=mysql >/dev/null & safe_pid=$! # Spin for a maximum of N seconds waiting for the server to come up; # exit the loop immediately if mysqld_safe process disappears. diff --git a/mysql-wsrep-5.6/packaging/rpm-oel/mysql.spec.in b/mysql-wsrep-5.6/packaging/rpm-oel/mysql.spec.in index 6e442564..279663d7 100644 --- a/mysql-wsrep-5.6/packaging/rpm-oel/mysql.spec.in +++ b/mysql-wsrep-5.6/packaging/rpm-oel/mysql.spec.in @@ -1,4 +1,4 @@ -# Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -81,6 +81,8 @@ %global license_type GPLv2 %endif +%global min 5.6.10 + Name: mysql-%{product_suffix} Summary: A very fast and reliable SQL database server Group: Applications/Databases @@ -102,7 +104,6 @@ Source7: %{compatsrc} Source90: filter-provides.sh Source91: filter-requires.sh Patch0: mysql-5.6.16-mysql-install.patch -Patch1: mysql-5.6-libmysqlclient-symbols.patch BuildRequires: cmake BuildRequires: perl %{?el7:BuildRequires: perl(Time::HiRes)} @@ -160,11 +161,11 @@ Requires: net-tools Provides: MySQL-server-advanced%{?_isa} = %{version}-%{release} Obsoletes: MySQL-server-advanced < %{version}-%{release} Obsoletes: mysql-community-server < %{version}-%{release} -Requires: mysql-commercial-client%{?_isa} = %{version}-%{release} +Requires: mysql-commercial-client%{?_isa} >= %{min} Requires: mysql-commercial-common%{?_isa} = %{version}-%{release} %else Provides: MySQL-server%{?_isa} = %{version}-%{release} -Requires: mysql-community-client%{?_isa} = %{version}-%{release} +Requires: mysql-community-client%{?_isa} >= %{min} Requires: mysql-community-common%{?_isa} = %{version}-%{release} %endif Obsoletes: MySQL-server < %{version}-%{release} @@ -213,10 +214,10 @@ Group: Applications/Databases Provides: MySQL-client-advanced%{?_isa} = %{version}-%{release} Obsoletes: MySQL-client-advanced < %{version}-%{release} Obsoletes: mysql-community-client < %{version}-%{release} -Requires: mysql-commercial-libs%{?_isa} = %{version}-%{release} +Requires: mysql-commercial-libs%{?_isa} >= %{min} %else Provides: MySQL-client%{?_isa} = %{version}-%{release} -Requires: mysql-community-libs%{?_isa} = %{version}-%{release} +Requires: mysql-community-libs%{?_isa} >= %{min} %endif Obsoletes: MySQL-client < %{version}-%{release} Obsoletes: mariadb @@ -238,7 +239,7 @@ Obsoletes: mysql-community-common < %{version}-%{release} %endif Provides: mysql-common = %{version}-%{release} Provides: mysql-common%{?_isa} = %{version}-%{release} -%{?el5:Requires: mysql%{?_isa} = %{version}-%{release}} +%{?el5:Requires: mysql%{?_isa} >= %{min}} %description common This packages contains common files needed by MySQL client library, @@ -252,10 +253,10 @@ Group: Applications/Databases Provides: MySQL-test-advanced%{?_isa} = %{version}-%{release} Obsoletes: MySQL-test-advanced < %{version}-%{release} Obsoletes: mysql-community-test < %{version}-%{release} -Requires: mysql-commercial-server%{?_isa} = %{version}-%{release} +Requires: mysql-commercial-server%{?_isa} >= %{min} %else Provides: MySQL-test%{?_isa} = %{version}-%{release} -Requires: mysql-community-server%{?_isa} = %{version}-%{release} +Requires: mysql-community-server%{?_isa} >= %{min} %endif Obsoletes: MySQL-test < %{version}-%{release} Obsoletes: mysql-test < %{version}-%{release} @@ -273,9 +274,9 @@ Summary: MySQL benchmark suite Group: Applications/Databases %if 0%{?commercial} Obsoletes: mysql-community-bench < %{version}-%{release} -Requires: mysql-commercial-server%{?_isa} = %{version}-%{release} +Requires: mysql-commercial-server%{?_isa} >= %{min} %else -Requires: mysql-community-server%{?_isa} = %{version}-%{release} +Requires: mysql-community-server%{?_isa} >= %{min} %endif Obsoletes: mariadb-bench Obsoletes: community-mysql-bench < %{version}-%{release} @@ -294,10 +295,10 @@ Group: Applications/Databases Provides: MySQL-devel-advanced%{?_isa} = %{version}-%{release} Obsoletes: MySQL-devel-advanced < %{version}-%{release} Obsoletes: mysql-community-devel < %{version}-%{release} -Requires: mysql-commercial-libs%{?_isa} = %{version}-%{release} +Requires: mysql-commercial-libs%{?_isa} >= %{min} %else Provides: MySQL-devel%{?_isa} = %{version}-%{release} -Requires: mysql-community-libs%{?_isa} = %{version}-%{release} +Requires: mysql-community-libs%{?_isa} >= %{min} %endif Obsoletes: MySQL-devel < %{version}-%{release} Obsoletes: mysql-devel < %{version}-%{release} @@ -317,10 +318,10 @@ Group: Applications/Databases Provides: MySQL-shared-advanced%{?_isa} = %{version}-%{release} Obsoletes: MySQL-shared-advanced < %{version}-%{release} Obsoletes: mysql-community-libs < %{version}-%{release} -Requires: mysql-commercial-common%{?_isa} = %{version}-%{release} +Requires: mysql-commercial-common%{?_isa} >= %{min} %else Provides: MySQL-shared%{?_isa} = %{version}-%{release} -Requires: mysql-community-common%{?_isa} = %{version}-%{release} +Requires: mysql-community-common%{?_isa} >= %{min} %endif Obsoletes: MySQL-shared < %{version}-%{release} Obsoletes: mysql-libs < %{version}-%{release} @@ -344,10 +345,10 @@ Provides: mysql-libs-compat%{?_isa} = %{version}-%{release} Provides: MySQL-shared-compat-advanced%{?_isa} = %{version}-%{release} Obsoletes: MySQL-shared-compat-advanced < %{version}-%{release} Obsoletes: mysql-community-libs-compat < %{version}-%{release} -Requires: mysql-commercial-libs%{?_isa} = %{version}-%{release} +Requires: mysql-commercial-libs%{?_isa} >= %{min} %else Provides: MySQL-shared-compat%{?_isa} = %{version}-%{release} -Requires: mysql-community-libs%{?_isa} = %{version}-%{release} +Requires: mysql-community-libs%{?_isa} >= %{min} %endif Obsoletes: MySQL-shared-compat < %{version}-%{release} %if 0%{?rhel} > 5 @@ -394,11 +395,11 @@ Summary: Development header files and libraries for MySQL as an embeddabl Group: Applications/Databases %if 0%{?commercial} Obsoletes: mysql-community-embedded-devel < %{version}-%{release} -Requires: mysql-commercial-devel%{?_isa} = %{version}-%{release} -Requires: mysql-commercial-embedded%{?_isa} = %{version}-%{release} +Requires: mysql-commercial-devel%{?_isa} >= %{min} +Requires: mysql-commercial-embedded%{?_isa} >= %{min} %else -Requires: mysql-community-devel%{?_isa} = %{version}-%{release} -Requires: mysql-community-embedded%{?_isa} = %{version}-%{release} +Requires: mysql-community-devel%{?_isa} >= %{min} +Requires: mysql-community-embedded%{?_isa} >= %{min} %endif Obsoletes: mariadb-embedded-devel Obsoletes: mysql-embedded-devel < %{version}-%{release} @@ -414,13 +415,13 @@ the embedded version of the MySQL server. Summary: Convenience package for easy upgrades of MySQL package set Group: Applications/Databases %if 0%{?commercial} -Requires: mysql-commercial-client%{?_isa} = %{version}-%{release} -Requires: mysql-commercial-libs%{?_isa} = %{version}-%{release} -Requires: mysql-commercial-libs-compat%{?_isa} = %{version}-%{release} +Requires: mysql-commercial-client%{?_isa} >= %{min} +Requires: mysql-commercial-libs%{?_isa} >= %{min} +Requires: mysql-commercial-libs-compat%{?_isa} >= %{min} %else -Requires: mysql-community-client%{?_isa} = %{version}-%{release} -Requires: mysql-community-libs%{?_isa} = %{version}-%{release} -Requires: mysql-community-libs-compat%{?_isa} = %{version}-%{release} +Requires: mysql-community-client%{?_isa} >= %{min} +Requires: mysql-community-libs%{?_isa} >= %{min} +Requires: mysql-community-libs-compat%{?_isa} >= %{min} %endif %description -n mysql @@ -439,7 +440,6 @@ package has been split into several subpackages. %endif # 0%{?compatlib} pushd %{src_dir} %patch0 -p1 -%{?el7:%patch1 -p1} %build # Fail quickly and obviously if user tries to build as root @@ -511,6 +511,7 @@ mkdir debug -DINSTALL_SQLBENCHDIR=share \ -DMYSQL_UNIX_ADDR="%{mysqldatadir}/mysql.sock" \ -DFEATURE_SET="%{feature_set}" \ + %{?el7:-DWITH_SYMVER16=1} \ -DWITH_EMBEDDED_SERVER=1 \ -DWITH_EMBEDDED_SHARED_LIBRARY=1 \ %{?ssl_option} \ @@ -536,6 +537,7 @@ mkdir release -DINSTALL_SQLBENCHDIR=share \ -DMYSQL_UNIX_ADDR="%{mysqldatadir}/mysql.sock" \ -DFEATURE_SET="%{feature_set}" \ + %{?el7:-DWITH_SYMVER16=1} \ -DWITH_EMBEDDED_SERVER=1 \ -DWITH_EMBEDDED_SHARED_LIBRARY=1 \ %{?ssl_option} \ @@ -633,6 +635,7 @@ rm -r $(readlink var) var datadir=$(/usr/bin/my_print_defaults server mysqld | grep '^--datadir=' | sed -n 's/--datadir=//p' | tail -n 1) /bin/chmod 0755 "$datadir" >/dev/null 2>&1 || : /bin/touch /var/log/mysqld.log >/dev/null 2>&1 || : +/bin/chown mysql:mysql /var/log/mysqld.log >/dev/null 2>&1 || : %if 0%{?systemd} %systemd_post mysqld.service /usr/bin/systemctl enable mysqld >/dev/null 2>&1 || : @@ -765,12 +768,14 @@ fi %attr(755, root, root) %{_libdir}/mysql/plugin/auth_test_plugin.so %attr(644, root, root) %{_libdir}/mysql/plugin/daemon_example.ini %attr(755, root, root) %{_libdir}/mysql/plugin/libdaemon_example.so +%attr(755, root, root) %{_libdir}/mysql/plugin/test_udf_services.so %attr(755, root, root) %{_libdir}/mysql/plugin/qa_auth_client.so %attr(755, root, root) %{_libdir}/mysql/plugin/qa_auth_interface.so %attr(755, root, root) %{_libdir}/mysql/plugin/qa_auth_server.so %attr(755, root, root) %{_libdir}/mysql/plugin/debug/auth.so %attr(755, root, root) %{_libdir}/mysql/plugin/debug/auth_test_plugin.so %attr(755, root, root) %{_libdir}/mysql/plugin/debug/libdaemon_example.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/test_udf_services.so %attr(755, root, root) %{_libdir}/mysql/plugin/debug/qa_auth_client.so %attr(755, root, root) %{_libdir}/mysql/plugin/debug/qa_auth_interface.so %attr(755, root, root) %{_libdir}/mysql/plugin/debug/qa_auth_server.so @@ -857,8 +862,6 @@ fi %attr(755, root, root) %{_bindir}/mysqlimport %attr(755, root, root) %{_bindir}/mysqlshow %attr(755, root, root) %{_bindir}/mysqlslap -%attr(755, root, root) %{_bindir}/mysql_config -%attr(755, root, root) %{_bindir}/mysql_config-%{__isa_bits} %attr(755, root, root) %{_bindir}/mysql_config_editor %attr(644, root, root) %{_mandir}/man1/msql2mysql.1* @@ -949,6 +952,12 @@ fi %endif %changelog +* Tue Jul 05 2016 Balasubramanian Kandasamy - 5.6.32-1 +- Remove mysql_config from client subpackage + +* Mon Mar 14 2016 Georgi Kodinov - 5.6.31-1 +- Add test_udf_services.so plugin + * Tue Sep 29 2015 Balasubramanian Kandasamy - 5.6.28-1 - Added conflicts to mysql-connector-c-shared dependencies diff --git a/mysql-wsrep-5.6/packaging/rpm-sles/mysql.init b/mysql-wsrep-5.6/packaging/rpm-sles/mysql.init index 749aa200..29862568 100644 --- a/mysql-wsrep-5.6/packaging/rpm-sles/mysql.init +++ b/mysql-wsrep-5.6/packaging/rpm-sles/mysql.init @@ -153,7 +153,7 @@ start () { rc_failed 6 ; rc_status -v ; rc_exit fi - $PROG --basedir=/usr --datadir="$datadir" --pid-file="$pidfile" >/dev/null 2>&1 & + $PROG --basedir=/usr --datadir="$datadir" --pid-file="$pidfile" >/dev/null & if pinger $! ; then echo -n "Starting service MySQL:" touch $lockfile diff --git a/mysql-wsrep-5.6/packaging/rpm-sles/mysql.spec.in b/mysql-wsrep-5.6/packaging/rpm-sles/mysql.spec.in index 2fed2da7..245bacf4 100644 --- a/mysql-wsrep-5.6/packaging/rpm-sles/mysql.spec.in +++ b/mysql-wsrep-5.6/packaging/rpm-sles/mysql.spec.in @@ -1,4 +1,4 @@ -# Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -66,6 +66,8 @@ %{?sles12: %global systemd 1} %{!?_tmpfilesdir: %global _tmpfilesdir /usr/lib/tmpfiles.d} +%global min 5.6.10 + Name: mysql-%{product_suffix} Summary: A very fast and reliable SQL database server Group: Applications/Databases @@ -136,12 +138,12 @@ Requires: perl-base Provides: MySQL-server-advanced = %{version}-%{release} Obsoletes: MySQL-server-advanced < %{version}-%{release} Obsoletes: mysql-community-server < %{version}-%{release} -Requires: mysql-commercial-client = %{version}-%{release} -Requires: mysql-commercial-common = %{version}-%{release} +Requires: mysql-commercial-client >= %{min} +Requires: mysql-commercial-common >= %{min} %else Provides: MySQL-server = %{version}-%{release} -Requires: mysql-community-client = %{version}-%{release} -Requires: mysql-community-common = %{version}-%{release} +Requires: mysql-community-client >= %{min} +Requires: mysql-community-common >= %{min} %endif Obsoletes: MySQL-server < %{version}-%{release} Obsoletes: mysql < %{version}-%{release} @@ -189,10 +191,10 @@ Group: Applications/Databases Provides: MySQL-client-advanced = %{version}-%{release} Obsoletes: MySQL-client-advanced < %{version}-%{release} Obsoletes: mysql-community-client < %{version}-%{release} -Requires: mysql-commercial-libs = %{version}-%{release} +Requires: mysql-commercial-libs >= %{min} %else Provides: MySQL-client = %{version}-%{release} -Requires: mysql-community-libs = %{version}-%{release} +Requires: mysql-community-libs >= %{min} %endif Obsoletes: MySQL-client < %{version}-%{release} Provides: mysql-client = %{version}-%{release} @@ -224,10 +226,10 @@ Group: Applications/Databases Provides: MySQL-test-advanced = %{version}-%{release} Obsoletes: MySQL-test-advanced < %{version}-%{release} Obsoletes: mysql-community-test < %{version}-%{release} -Requires: mysql-commercial-server = %{version}-%{release} +Requires: mysql-commercial-server >= %{min} %else Provides: MySQL-test = %{version}-%{release} -Requires: mysql-community-server = %{version}-%{release} +Requires: mysql-community-server >= %{min} %endif Obsoletes: MySQL-test < %{version}-%{release} Obsoletes: mysql-test < %{version}-%{release} @@ -245,9 +247,9 @@ Summary: MySQL benchmark suite Group: Applications/Databases %if 0%{?commercial} Obsoletes: mysql-community-bench < %{version}-%{release} -Requires: mysql-commercial-server = %{version}-%{release} +Requires: mysql-commercial-server >= %{min} %else -Requires: mysql-community-server = %{version}-%{release} +Requires: mysql-community-server >= %{min} %endif Obsoletes: mariadb-bench Obsoletes: community-mysql-bench < %{version}-%{release} @@ -266,10 +268,10 @@ Group: Applications/Databases Provides: MySQL-devel-advanced = %{version}-%{release} Obsoletes: MySQL-devel-advanced < %{version}-%{release} Obsoletes: mysql-community-devel < %{version}-%{release} -Requires: mysql-commercial-libs = %{version}-%{release} +Requires: mysql-commercial-libs >= %{min} %else Provides: MySQL-devel = %{version}-%{release} -Requires: mysql-community-libs = %{version}-%{release} +Requires: mysql-community-libs >= %{min} %endif Obsoletes: MySQL-devel < %{version}-%{release} Obsoletes: mysql-devel < %{version}-%{release} @@ -290,10 +292,10 @@ Group: Applications/Databases Provides: MySQL-shared-advanced = %{version}-%{release} Obsoletes: MySQL-shared-advanced < %{version}-%{release} Obsoletes: mysql-community-libs < %{version}-%{release} -Requires: mysql-commercial-common = %{version}-%{release} +Requires: mysql-commercial-common >= %{min} %else Provides: MySQL-shared = %{version}-%{release} -Requires: mysql-community-common = %{version}-%{release} +Requires: mysql-community-common >= %{min} %endif Obsoletes: MySQL-shared < %{version}-%{release} Obsoletes: mysql-libs < %{version}-%{release} @@ -316,10 +318,10 @@ Group: Applications/Databases Provides: MySQL-embedded-advanced = %{version}-%{release} Obsoletes: MySQL-embedded-advanced < %{version}-%{release} Obsoletes: mysql-community-embedded < %{version}-%{release} -Requires: mysql-commercial-common = %{version}-%{release} +Requires: mysql-commercial-common >= %{min} %else Provides: MySQL-embedded = %{version}-%{release} -Requires: mysql-community-common = %{version}-%{release} +Requires: mysql-community-common >= %{min} %endif Obsoletes: mariadb-embedded Obsoletes: MySQL-embedded < %{version}-%{release} @@ -343,11 +345,11 @@ Summary: Development header files and libraries for MySQL as an embeddabl Group: Applications/Databases %if 0%{?commercial} Obsoletes: mysql-community-embedded-devel < %{version}-%{release} -Requires: mysql-commercial-devel = %{version}-%{release} -Requires: mysql-commercial-embedded = %{version}-%{release} +Requires: mysql-commercial-devel >= %{min} +Requires: mysql-commercial-embedded >= %{min} %else -Requires: mysql-community-devel = %{version}-%{release} -Requires: mysql-community-embedded = %{version}-%{release} +Requires: mysql-community-devel >= %{min} +Requires: mysql-community-embedded >= %{min} %endif Obsoletes: mariadb-embedded-devel Obsoletes: mysql-embedded-devel < %{version}-%{release} @@ -507,6 +509,7 @@ rm -r $(readlink var) var datadir=$(/usr/bin/my_print_defaults server mysqld | grep '^--datadir=' | sed -n 's/--datadir=//p' | tail -n 1) /bin/chmod 0755 "$datadir" /bin/touch /var/log/mysql/mysqld.log +/bin/chown mysql:mysql /var/log/mysql/mysqld.log >/dev/null 2>&1 || : %if 0%{?systemd} %service_add_post mysql.service /usr/bin/systemd-tmpfiles --create %{_tmpfilesdir}/mysql.conf >/dev/null 2>&1 || : @@ -717,7 +720,6 @@ fi %attr(755, root, root) %{_bindir}/mysqlimport %attr(755, root, root) %{_bindir}/mysqlshow %attr(755, root, root) %{_bindir}/mysqlslap -%attr(755, root, root) %{_bindir}/mysql_config %attr(755, root, root) %{_bindir}/mysql_config_editor %attr(644, root, root) %{_mandir}/man1/msql2mysql.1* @@ -781,12 +783,14 @@ fi %attr(755, root, root) %{_libdir}/mysql/plugin/auth_test_plugin.so %attr(644, root, root) %{_libdir}/mysql/plugin/daemon_example.ini %attr(755, root, root) %{_libdir}/mysql/plugin/libdaemon_example.so +%attr(755, root, root) %{_libdir}/mysql/plugin/test_udf_services.so %attr(755, root, root) %{_libdir}/mysql/plugin/qa_auth_client.so %attr(755, root, root) %{_libdir}/mysql/plugin/qa_auth_interface.so %attr(755, root, root) %{_libdir}/mysql/plugin/qa_auth_server.so %attr(755, root, root) %{_libdir}/mysql/plugin/debug/auth.so %attr(755, root, root) %{_libdir}/mysql/plugin/debug/auth_test_plugin.so %attr(755, root, root) %{_libdir}/mysql/plugin/debug/libdaemon_example.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/test_udf_services.so %attr(755, root, root) %{_libdir}/mysql/plugin/debug/qa_auth_client.so %attr(755, root, root) %{_libdir}/mysql/plugin/debug/qa_auth_interface.so %attr(755, root, root) %{_libdir}/mysql/plugin/debug/qa_auth_server.so @@ -818,6 +822,9 @@ fi %attr(755, root, root) %{_libdir}/mysql/libmysqld.so %changelog +* Mon Mar 14 2016 Georgi Kodinov - 5.6.31-1 +- Add test_udf_services.so plugin + * Tue Sep 29 2015 Balasubramanian Kandasamy - 5.6.28-1 - Added conflicts to mysql-connector-c-shared dependencies diff --git a/mysql-wsrep-5.6/plugin/audit_null/audit_null.c b/mysql-wsrep-5.6/plugin/audit_null/audit_null.c index 5ff93753..4ac85f22 100644 --- a/mysql-wsrep-5.6/plugin/audit_null/audit_null.c +++ b/mysql-wsrep-5.6/plugin/audit_null/audit_null.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -18,9 +18,7 @@ #include #include -#if !defined(__attribute__) && (defined(__cplusplus) || !defined(__GNUC__) || __GNUC__ == 2 && __GNUC_MINOR__ < 8) -#define __attribute__(A) -#endif +#include "my_attribute.h" static volatile int number_of_calls; /* for SHOW STATUS, see below */ /* Count MYSQL_AUDIT_GENERAL_CLASS event instances */ @@ -48,7 +46,7 @@ static volatile int number_of_calls_connection_change_user; 1 failure (cannot happen) */ -static int audit_null_plugin_init(void *arg __attribute__((unused))) +static int audit_null_plugin_init(void *arg MY_ATTRIBUTE((unused))) { number_of_calls= 0; number_of_calls_general_log= 0; @@ -75,7 +73,7 @@ static int audit_null_plugin_init(void *arg __attribute__((unused))) */ -static int audit_null_plugin_deinit(void *arg __attribute__((unused))) +static int audit_null_plugin_deinit(void *arg MY_ATTRIBUTE((unused))) { return(0); } @@ -91,7 +89,7 @@ static int audit_null_plugin_deinit(void *arg __attribute__((unused))) DESCRIPTION */ -static void audit_null_notify(MYSQL_THD thd __attribute__((unused)), +static void audit_null_notify(MYSQL_THD thd MY_ATTRIBUTE((unused)), unsigned int event_class, const void *event) { diff --git a/mysql-wsrep-5.6/plugin/auth/dialog.c b/mysql-wsrep-5.6/plugin/auth/dialog.c index ea600743..9f9c0ef2 100644 --- a/mysql-wsrep-5.6/plugin/auth/dialog.c +++ b/mysql-wsrep-5.6/plugin/auth/dialog.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -207,8 +207,8 @@ typedef char *(*mysql_authentication_dialog_ask_t)(struct st_mysql *mysql, static mysql_authentication_dialog_ask_t ask; -static char *builtin_ask(MYSQL *mysql __attribute__((unused)), - int type __attribute__((unused)), +static char *builtin_ask(MYSQL *mysql MY_ATTRIBUTE((unused)), + int type MY_ATTRIBUTE((unused)), const char *prompt, char *buf, int buf_len) { @@ -309,10 +309,10 @@ static int perform_dialog(MYSQL_PLUGIN_VIO *vio, MYSQL *mysql) or fall back to the default implementation. */ -static int init_dialog(char *unused1 __attribute__((unused)), - size_t unused2 __attribute__((unused)), - int unused3 __attribute__((unused)), - va_list unused4 __attribute__((unused))) +static int init_dialog(char *unused1 MY_ATTRIBUTE((unused)), + size_t unused2 MY_ATTRIBUTE((unused)), + int unused3 MY_ATTRIBUTE((unused)), + va_list unused4 MY_ATTRIBUTE((unused))) { void *sym= dlsym(RTLD_DEFAULT, "mysql_authentication_dialog_ask"); ask= sym ? (mysql_authentication_dialog_ask_t) sym : builtin_ask; diff --git a/mysql-wsrep-5.6/plugin/auth/mysql_no_login.c b/mysql-wsrep-5.6/plugin/auth/mysql_no_login.c index c7a55205..024665ce 100644 --- a/mysql-wsrep-5.6/plugin/auth/mysql_no_login.c +++ b/mysql-wsrep-5.6/plugin/auth/mysql_no_login.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2014, 2015 Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2014, 2016 Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -32,8 +32,8 @@ #include static int mysql_no_login( - MYSQL_PLUGIN_VIO *vio __attribute__((unused)), - MYSQL_SERVER_AUTH_INFO *info __attribute__((unused))) + MYSQL_PLUGIN_VIO *vio MY_ATTRIBUTE((unused)), + MYSQL_SERVER_AUTH_INFO *info MY_ATTRIBUTE((unused))) { return CR_ERROR; } diff --git a/mysql-wsrep-5.6/plugin/daemon_example/daemon_example.cc b/mysql-wsrep-5.6/plugin/daemon_example/daemon_example.cc index 094cbe87..8b5d52c5 100644 --- a/mysql-wsrep-5.6/plugin/daemon_example/daemon_example.cc +++ b/mysql-wsrep-5.6/plugin/daemon_example/daemon_example.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -26,10 +26,10 @@ #include "sql_plugin.h" // st_plugin_int /* - Disable __attribute__() on non-gcc compilers. + Disable MY_ATTRIBUTE() on non-gcc compilers. */ -#if !defined(__attribute__) && !defined(__GNUC__) -#define __attribute__(A) +#if !defined(MY_ATTRIBUTE) && !defined(__GNUC__) +#define MY_ATTRIBUTE(A) #endif diff --git a/mysql-wsrep-5.6/plugin/fulltext/plugin_example.c b/mysql-wsrep-5.6/plugin/fulltext/plugin_example.c index d5f6d869..b13dd223 100644 --- a/mysql-wsrep-5.6/plugin/fulltext/plugin_example.c +++ b/mysql-wsrep-5.6/plugin/fulltext/plugin_example.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -17,9 +17,7 @@ #include #include -#if !defined(__attribute__) && (defined(__cplusplus) || !defined(__GNUC__) || __GNUC__ == 2 && __GNUC_MINOR__ < 8) -#define __attribute__(A) -#endif +#include "my_attribute.h" static long number_of_calls= 0; /* for SHOW STATUS, see below */ @@ -62,7 +60,7 @@ static long number_of_calls= 0; /* for SHOW STATUS, see below */ 1 failure (cannot happen) */ -static int simple_parser_plugin_init(void *arg __attribute__((unused))) +static int simple_parser_plugin_init(void *arg MY_ATTRIBUTE((unused))) { return(0); } @@ -81,7 +79,7 @@ static int simple_parser_plugin_init(void *arg __attribute__((unused))) */ -static int simple_parser_plugin_deinit(void *arg __attribute__((unused))) +static int simple_parser_plugin_deinit(void *arg MY_ATTRIBUTE((unused))) { return(0); } @@ -102,7 +100,7 @@ static int simple_parser_plugin_deinit(void *arg __attribute__((unused))) */ static int simple_parser_init(MYSQL_FTPARSER_PARAM *param - __attribute__((unused))) + MY_ATTRIBUTE((unused))) { return(0); } @@ -123,7 +121,7 @@ static int simple_parser_init(MYSQL_FTPARSER_PARAM *param */ static int simple_parser_deinit(MYSQL_FTPARSER_PARAM *param - __attribute__((unused))) + MY_ATTRIBUTE((unused))) { return(0); } diff --git a/mysql-wsrep-5.6/plugin/innodb_memcached/daemon_memcached/utilities/engine_loader.c b/mysql-wsrep-5.6/plugin/innodb_memcached/daemon_memcached/utilities/engine_loader.c index ff005087..7c64a880 100644 --- a/mysql-wsrep-5.6/plugin/innodb_memcached/daemon_memcached/utilities/engine_loader.c +++ b/mysql-wsrep-5.6/plugin/innodb_memcached/daemon_memcached/utilities/engine_loader.c @@ -137,6 +137,12 @@ void log_engine_details(ENGINE_HANDLE * engine, offset += nw; for (int ii = 0; ii < info->num_features; ++ii) { if (info->features[ii].description != NULL) { + // We don't want to write partially from source + if (sizeof(message)-offset <= + 2+strlen(info->features[ii].description)) + { + return; + } nw = snprintf(message + offset, sizeof(message) - offset, "%s%s", comma ? ", " : "", info->features[ii].description); diff --git a/mysql-wsrep-5.6/plugin/innodb_memcached/innodb_memcache/src/innodb_engine.c b/mysql-wsrep-5.6/plugin/innodb_memcached/innodb_memcache/src/innodb_engine.c index d7c6ee52..60fc3720 100644 --- a/mysql-wsrep-5.6/plugin/innodb_memcached/innodb_memcache/src/innodb_engine.c +++ b/mysql-wsrep-5.6/plugin/innodb_memcached/innodb_memcache/src/innodb_engine.c @@ -1,6 +1,6 @@ /*********************************************************************** -Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the @@ -1929,6 +1929,9 @@ search_done: &col_value->value_int, col_value->value_len, col_value->is_unsigned); + + assert(int_len <= conn_data->mul_col_buf_len); + memcpy(c_value, int_buf, int_len); c_value += int_len; } else { diff --git a/mysql-wsrep-5.6/plugin/password_validation/validate_password.cc b/mysql-wsrep-5.6/plugin/password_validation/validate_password.cc index 9bee07c0..23970aae 100644 --- a/mysql-wsrep-5.6/plugin/password_validation/validate_password.cc +++ b/mysql-wsrep-5.6/plugin/password_validation/validate_password.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -24,12 +24,12 @@ /* - __attribute__(A) needs to be defined for Windows else complier + MY_ATTRIBUTE(A) needs to be defined for Windows else complier do not recognise it. Argument in plugin_init and plugin_deinit Used in other plugins as well. */ -#if !defined(__attribute__) && (defined(__cplusplus) || !defined(__GNUC__) || __GNUC__ == 2 && __GNUC_MINOR__ < 8) -#define __attribute__(A) +#if !defined(MY_ATTRIBUTE) && (defined(__cplusplus) || !defined(__GNUC__) || __GNUC__ == 2 && __GNUC_MINOR__ < 8) +#define MY_ATTRIBUTE(A) #endif #define MAX_DICTIONARY_FILE_LENGTH 1024 * 1024 @@ -367,7 +367,7 @@ static int validate_password_init(MYSQL_PLUGIN plugin_info) It empty the std::set and returns 0 */ -static int validate_password_deinit(void *arg __attribute__((unused))) +static int validate_password_deinit(void *arg MY_ATTRIBUTE((unused))) { free_dictionary_file(); mysql_rwlock_destroy(&LOCK_dict_file); @@ -380,8 +380,8 @@ static int validate_password_deinit(void *arg __attribute__((unused))) the cache and re-load the new dictionary file. */ static void -dictionary_update(MYSQL_THD thd __attribute__((unused)), - struct st_mysql_sys_var *var __attribute__((unused)), +dictionary_update(MYSQL_THD thd MY_ATTRIBUTE((unused)), + struct st_mysql_sys_var *var MY_ATTRIBUTE((unused)), void *var_ptr, const void *save) { *(const char**)var_ptr= *(const char**)save; @@ -396,8 +396,8 @@ dictionary_update(MYSQL_THD thd __attribute__((unused)), 4. validate_password_special_char_count */ static void -length_update(MYSQL_THD thd __attribute__((unused)), - struct st_mysql_sys_var *var __attribute__((unused)), +length_update(MYSQL_THD thd MY_ATTRIBUTE((unused)), + struct st_mysql_sys_var *var MY_ATTRIBUTE((unused)), void *var_ptr, const void *save) { int new_validate_password_length; diff --git a/mysql-wsrep-5.6/plugin/udf_services/CMakeLists.txt b/mysql-wsrep-5.6/plugin/udf_services/CMakeLists.txt new file mode 100644 index 00000000..7b2fc4f1 --- /dev/null +++ b/mysql-wsrep-5.6/plugin/udf_services/CMakeLists.txt @@ -0,0 +1,16 @@ +# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +MYSQL_ADD_PLUGIN(test_udf_services test_udf_services.cc MODULE_ONLY) diff --git a/mysql-wsrep-5.6/plugin/udf_services/test_udf_services.cc b/mysql-wsrep-5.6/plugin/udf_services/test_udf_services.cc new file mode 100644 index 00000000..2baf6517 --- /dev/null +++ b/mysql-wsrep-5.6/plugin/udf_services/test_udf_services.cc @@ -0,0 +1,101 @@ +/* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ + +#include +#include +#include +#include + +/** + @file test_udf_services.cc + + This is a test suite plugin to verify that plugins can co-exist with UDFs. + The file defines one DAEMON plugin @ref test_udf_services_plugin and one + UDF function: @ref test_udf_services_udf. + The test then checks if the plugin can be unloaded and loaded while the + UDF is defined. + + No user-facing functionality in this plugin. Just test material ! +*/ + +static struct st_mysql_daemon test_udf_services_plugin= +{ MYSQL_DAEMON_INTERFACE_VERSION }; + +mysql_declare_plugin(test_udf_services) +{ + MYSQL_DAEMON_PLUGIN, + &test_udf_services_plugin, + "test_udf_services", + "Georgi Kodinov", + "MySQL mtr test framework", + PLUGIN_LICENSE_GPL, + NULL, /* Plugin Init */ + NULL, /* Plugin Deinit */ + 0x0100, /* Plugin version: 1.0 */ + NULL, /* status variables */ + NULL, /* system variables */ + NULL, /* config options */ + 0, /* flags */ +} +mysql_declare_plugin_end; + +#ifdef WIN32 +#define PLUGIN_EXPORT extern "C" __declspec(dllexport) +#else +#define PLUGIN_EXPORT extern "C" +#endif + + +/** + Initialization function for @ref test_udf_services_udf + + Must be present otherwise the server refuses to load + + @param initrd Return value from xxxx_init + @param args Array of arguments + @param[out] message Error message in case of error. + @retval FALSE success + @retval TRUE Failure. Error in the message argument +*/ +PLUGIN_EXPORT my_bool +test_udf_services_udf_init(UDF_INIT *initid MY_ATTRIBUTE((unused)), + UDF_ARGS *args MY_ATTRIBUTE((unused)), + char *message MY_ATTRIBUTE((unused))) +{ + return FALSE; +} + + +/** + A UDF function returning 0. + + @param initrd Return value from xxxx_init + @param args Array of arguments + @param[out] is_null If the result is null, store 1 here + @param[out] error On error store 1 here +*/ +PLUGIN_EXPORT longlong +test_udf_services_udf(UDF_INIT *initid MY_ATTRIBUTE((unused)), + UDF_ARGS *args MY_ATTRIBUTE((unused)), + char *is_null MY_ATTRIBUTE((unused)), + char *error MY_ATTRIBUTE((unused))) +{ + char buffer[10]; + *is_null= 0; + *error= 0; + /* use a plugin service function */ + my_snprintf(buffer, sizeof(buffer), "test"); + return 0; +} diff --git a/mysql-wsrep-5.6/regex/regcomp.c b/mysql-wsrep-5.6/regex/regcomp.c index 72708287..5fe6c538 100644 --- a/mysql-wsrep-5.6/regex/regcomp.c +++ b/mysql-wsrep-5.6/regex/regcomp.c @@ -3,7 +3,7 @@ This file was modified by Oracle on 2015-05-18 for 32-bit compatibility. - Modifications copyright (c) 2015, Oracle and/or its affiliates. All rights + Modifications copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. */ #include @@ -1258,8 +1258,8 @@ register char *cp; */ static void mcinvert(p, cs) - register struct parse *p __attribute__((unused)); - register cset *cs __attribute__((unused)); + register struct parse *p MY_ATTRIBUTE((unused)); + register cset *cs MY_ATTRIBUTE((unused)); { assert(cs->multis == NULL); /* xxx */ } @@ -1273,8 +1273,8 @@ mcinvert(p, cs) */ static void mccase(p, cs) -register struct parse *p __attribute__((unused)); -register cset *cs __attribute__((unused)); +register struct parse *p MY_ATTRIBUTE((unused)); +register cset *cs MY_ATTRIBUTE((unused)); { assert(cs->multis == NULL); /* xxx */ } diff --git a/mysql-wsrep-5.6/regex/split.c b/mysql-wsrep-5.6/regex/split.c index bd2a53c0..abae74eb 100644 --- a/mysql-wsrep-5.6/regex/split.c +++ b/mysql-wsrep-5.6/regex/split.c @@ -159,10 +159,18 @@ char *argv[]; if (argc > 4) for (n = atoi(argv[3]); n > 0; n--) { + if(sizeof(buf)-1 < strlen(argv[1])) + { + exit(EXIT_FAILURE); + } (void) strcpy(buf, argv[1]); } else if (argc > 3) for (n = atoi(argv[3]); n > 0; n--) { + if(sizeof(buf)-1 < strlen(argv[1])) + { + exit(EXIT_FAILURE); + } (void) strcpy(buf, argv[1]); (void) split(buf, fields, MNF, argv[2]); } diff --git a/mysql-wsrep-5.6/scripts/mysqld_multi.sh b/mysql-wsrep-5.6/scripts/mysqld_multi.sh index 528db4b9..e6a6f022 100644 --- a/mysql-wsrep-5.6/scripts/mysqld_multi.sh +++ b/mysql-wsrep-5.6/scripts/mysqld_multi.sh @@ -1,6 +1,6 @@ #!/usr/bin/perl -# Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public @@ -687,7 +687,11 @@ sub my_which my ($command) = @_; my (@paths, $path); - return $command if (-f $command && -x $command); + # If the argument is not 'my_print_defaults' then it would be of the format + # / + return $command if ($command ne 'my_print_defaults' && -f $command && + -x $command); + @paths = split(':', $ENV{'PATH'}); foreach $path (@paths) { diff --git a/mysql-wsrep-5.6/scripts/mysqld_safe.sh b/mysql-wsrep-5.6/scripts/mysqld_safe.sh index c975843f..d39c0e9d 100644 --- a/mysql-wsrep-5.6/scripts/mysqld_safe.sh +++ b/mysql-wsrep-5.6/scripts/mysqld_safe.sh @@ -281,8 +281,17 @@ parse_arguments() { --core-file-size=*) core_file_size="$val" ;; --ledir=*) ledir="$val" ;; --malloc-lib=*) set_malloc_lib "$val" ;; - --mysqld=*) MYSQLD="$val" ;; + --mysqld=*) + if [ -z "$pick_args" ]; then + log_error "--mysqld option can only be used as command line option, found in config file" + exit 1 + fi + MYSQLD="$val" ;; --mysqld-version=*) + if [ -z "$pick_args" ]; then + log_error "--mysqld-version option can only be used as command line option, found in config file" + exit 1 + fi if test -n "$val" then MYSQLD="mysqld-$val" @@ -376,38 +385,22 @@ mysqld_ld_preload_text() { echo "$text" } - -mysql_config= -get_mysql_config() { - if [ -z "$mysql_config" ]; then - mysql_config=`echo "$0" | sed 's,/[^/][^/]*$,/mysql_config,'` - if [ ! -x "$mysql_config" ]; then - log_error "Can not run mysql_config $@ from '$mysql_config'" - exit 1 - fi - fi - - "$mysql_config" "$@" -} - - # set_malloc_lib LIB # - If LIB is empty, do nothing and return -# - If LIB is 'tcmalloc', look for tcmalloc shared library in /usr/lib -# then pkglibdir. tcmalloc is part of the Google perftools project. +# - If LIB is 'tcmalloc', look for tcmalloc shared library in $malloc_dirs. +# tcmalloc is part of the Google perftools project. # - If LIB is an absolute path, assume it is a malloc shared library # # Put LIB in mysqld_ld_preload, which will be added to LD_PRELOAD when # running mysqld. See ld.so for details. set_malloc_lib() { + # This list is kept intentionally simple. + malloc_dirs="/usr/lib /usr/lib64 /usr/lib/i386-linux-gnu /usr/lib/x86_64-linux-gnu" malloc_lib="$1" if [ "$malloc_lib" = tcmalloc ]; then - pkglibdir=`get_mysql_config --variable=pkglibdir` malloc_lib= - # This list is kept intentionally simple. Simply set --malloc-lib - # to a full path if another location is desired. - for libdir in /usr/lib "$pkglibdir" "$pkglibdir/mysql"; do + for libdir in `echo $malloc_dirs`; do for flavor in _minimal '' _and_profiler _debug; do tmp="$libdir/libtcmalloc$flavor.so" #log_notice "DEBUG: Checking for malloc lib '$tmp'" @@ -418,7 +411,7 @@ set_malloc_lib() { done if [ -z "$malloc_lib" ]; then - log_error "no shared library for --malloc-lib=tcmalloc found in /usr/lib or $pkglibdir" + log_error "no shared library for --malloc-lib=tcmalloc found in $malloc_dirs" exit 1 fi fi @@ -429,9 +422,21 @@ set_malloc_lib() { case "$malloc_lib" in /*) if [ ! -r "$malloc_lib" ]; then - log_error "--malloc-lib '$malloc_lib' can not be read and will not be used" + log_error "--malloc-lib can not be read and will not be used" exit 1 fi + + # Restrict to a the list in $malloc_dirs above + case "`dirname "$malloc_lib"`" in + /usr/lib) ;; + /usr/lib64) ;; + /usr/lib/i386-linux-gnu) ;; + /usr/lib/x86_64-linux-gnu) ;; + *) + log_error "--malloc-lib must be located in one of the directories: $malloc_dirs" + exit 1 + ;; + esac ;; *) log_error "--malloc-lib must be an absolute path or 'tcmalloc'; " \ @@ -647,7 +652,7 @@ then log_notice "Logging to '$err_log'." logging=file - if [ ! -f "$err_log" ]; then # if error log already exists, + if [ ! -f "$err_log" -a ! -h "$err_log" ]; then # if error log already exists, touch "$err_log" # we just append. otherwise, chmod "$fmode" "$err_log" # fix the permissions here! fi @@ -672,7 +677,7 @@ then USER_OPTION="--user=$user" fi # Change the err log to the right user, if it is in use - if [ $want_syslog -eq 0 ]; then + if [ $want_syslog -eq 0 -a ! -h "$err_log" ]; then touch "$err_log" chown $user "$err_log" fi @@ -692,9 +697,11 @@ safe_mysql_unix_port=${mysql_unix_port:-${MYSQL_UNIX_PORT:-@MYSQL_UNIX_ADDR@}} mysql_unix_port_dir=`dirname $safe_mysql_unix_port` if [ ! -d $mysql_unix_port_dir ] then - mkdir $mysql_unix_port_dir - chown $user $mysql_unix_port_dir - chmod 755 $mysql_unix_port_dir + if [ ! -h $mysql_unix_port_dir ]; then + mkdir $mysql_unix_port_dir + chown $user $mysql_unix_port_dir + chmod 755 $mysql_unix_port_dir + fi fi # If the user doesn't specify a binary, we assume name "mysqld" @@ -806,7 +813,9 @@ then exit 1 fi fi - rm -f "$pid_file" + if [ ! -h "$pid_file" ]; then + rm -f "$pid_file" + fi if test -f "$pid_file" then log_error "Fatal error: Can't remove the pid file: @@ -861,7 +870,13 @@ max_wsrep_restarts=0 while true do - rm -f $safe_mysql_unix_port "$pid_file" # Some extra safety + # Some extra safety + if [ ! -h "$safe_mysql_unix_port" ]; then + rm -f "$safe_mysql_unix_port" + fi + if [ ! -h "$pid_file" ]; then + rm -f "$pid_file" + fi start_time=`date +%M%S` @@ -879,7 +894,7 @@ do eval_log_error "$cmd $wsrep_start_position_opt --wsrep_cluster_address=$url $nohup_redir" fi - if [ $want_syslog -eq 0 -a ! -f "$err_log" ]; then + if [ $want_syslog -eq 0 -a ! -f "$err_log" -a ! -h "$err_log" ]; then touch "$err_log" # hypothetical: log was renamed but not chown $user "$err_log" # flushed yet. we'd recreate it with chmod "$fmode" "$err_log" # wrong owner next time we log, so set diff --git a/mysql-wsrep-5.6/sql-common/client.c b/mysql-wsrep-5.6/sql-common/client.c index 4f5f85f0..cd3c2e02 100644 --- a/mysql-wsrep-5.6/sql-common/client.c +++ b/mysql-wsrep-5.6/sql-common/client.c @@ -1128,6 +1128,22 @@ static int add_init_command(struct st_mysql_options *options, const char *cmd) } while(0) #endif +static char *set_ssl_option_unpack_path(struct st_mysql_options *options, + const char *arg) +{ + char *opt_var= NULL; + if (arg) + { + char *buff= (char *)my_malloc(FN_REFLEN + 1, MYF(MY_WME)); + unpack_filename(buff, (char *)arg); + opt_var= my_strdup(buff, MYF(MY_WME)); + options->use_ssl= 1; + my_free(buff); + } + return opt_var; +} + + void mysql_read_default_options(struct st_mysql_options *options, const char *filename,const char *group) { @@ -1725,12 +1741,12 @@ mysql_init(MYSQL *mysql) #define strdup_if_not_null(A) (A) == 0 ? 0 : my_strdup((A),MYF(MY_WME)) my_bool STDCALL -mysql_ssl_set(MYSQL *mysql __attribute__((unused)) , - const char *key __attribute__((unused)), - const char *cert __attribute__((unused)), - const char *ca __attribute__((unused)), - const char *capath __attribute__((unused)), - const char *cipher __attribute__((unused))) +mysql_ssl_set(MYSQL *mysql MY_ATTRIBUTE((unused)) , + const char *key MY_ATTRIBUTE((unused)), + const char *cert MY_ATTRIBUTE((unused)), + const char *ca MY_ATTRIBUTE((unused)), + const char *capath MY_ATTRIBUTE((unused)), + const char *cipher MY_ATTRIBUTE((unused))) { my_bool result= 0; DBUG_ENTER("mysql_ssl_set"); @@ -1755,7 +1771,7 @@ mysql_ssl_set(MYSQL *mysql __attribute__((unused)) , #if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY) static void -mysql_ssl_free(MYSQL *mysql __attribute__((unused))) +mysql_ssl_free(MYSQL *mysql MY_ATTRIBUTE((unused))) { struct st_VioSSLFd *ssl_fd= (struct st_VioSSLFd*) mysql->connector_fd; DBUG_ENTER("mysql_ssl_free"); @@ -1801,7 +1817,7 @@ mysql_ssl_free(MYSQL *mysql __attribute__((unused))) */ const char * STDCALL -mysql_get_ssl_cipher(MYSQL *mysql __attribute__((unused))) +mysql_get_ssl_cipher(MYSQL *mysql MY_ATTRIBUTE((unused))) { DBUG_ENTER("mysql_get_ssl_cipher"); #if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY) @@ -4069,8 +4085,8 @@ static void mysql_prune_stmt_list(MYSQL *mysql) should also be reflected there. */ -void mysql_detach_stmt_list(LIST **stmt_list __attribute__((unused)), - const char *func_name __attribute__((unused))) +void mysql_detach_stmt_list(LIST **stmt_list MY_ATTRIBUTE((unused)), + const char *func_name MY_ATTRIBUTE((unused))) { #ifdef MYSQL_CLIENT /* Reset connection handle in all prepared statements. */ @@ -4480,17 +4496,43 @@ mysql_options(MYSQL *mysql,enum mysql_option option, const void *arg) case MYSQL_DEFAULT_AUTH: EXTENSION_SET_STRING(&mysql->options, default_auth, arg); break; - case MYSQL_OPT_SSL_KEY: SET_SSL_OPTION(ssl_key, arg); break; - case MYSQL_OPT_SSL_CERT: SET_SSL_OPTION(ssl_cert, arg); break; - case MYSQL_OPT_SSL_CA: SET_SSL_OPTION(ssl_ca, arg); break; - case MYSQL_OPT_SSL_CAPATH: SET_SSL_OPTION(ssl_capath, arg); break; + case MYSQL_OPT_SSL_KEY: + if (mysql->options.ssl_key) + my_free(mysql->options.ssl_key); + mysql->options.ssl_key= set_ssl_option_unpack_path(&mysql->options, arg); + break; + case MYSQL_OPT_SSL_CERT: + if (mysql->options.ssl_cert) + my_free(mysql->options.ssl_cert); + mysql->options.ssl_cert= set_ssl_option_unpack_path(&mysql->options, arg); + break; + case MYSQL_OPT_SSL_CA: + if (mysql->options.ssl_ca) + my_free(mysql->options.ssl_ca); + mysql->options.ssl_ca= set_ssl_option_unpack_path(&mysql->options, arg); + break; + case MYSQL_OPT_SSL_CAPATH: + if (mysql->options.ssl_capath) + my_free(mysql->options.ssl_capath); + mysql->options.ssl_capath= set_ssl_option_unpack_path(&mysql->options, arg); + break; case MYSQL_OPT_SSL_CIPHER: SET_SSL_OPTION(ssl_cipher, arg); break; - case MYSQL_OPT_SSL_CRL: EXTENSION_SET_SSL_STRING(&mysql->options, - ssl_crl, arg); - break; - case MYSQL_OPT_SSL_CRLPATH: EXTENSION_SET_SSL_STRING(&mysql->options, - ssl_crlpath, arg); - break; + case MYSQL_OPT_SSL_CRL: + if (mysql->options.extension) + my_free(mysql->options.extension->ssl_crl); + else + ALLOCATE_EXTENSIONS(&mysql->options); + mysql->options.extension->ssl_crl= + set_ssl_option_unpack_path(&mysql->options, arg); + break; + case MYSQL_OPT_SSL_CRLPATH: + if (mysql->options.extension) + my_free(mysql->options.extension->ssl_crlpath); + else + ALLOCATE_EXTENSIONS(&mysql->options); + mysql->options.extension->ssl_crlpath= + set_ssl_option_unpack_path(&mysql->options, arg); + break; case MYSQL_SERVER_PUBLIC_KEY: EXTENSION_SET_STRING(&mysql->options, server_public_key_path, arg); break; @@ -4556,7 +4598,7 @@ mysql_options(MYSQL *mysql,enum mysql_option option, const void *arg) */ uchar * get_attr_key(LEX_STRING *part, size_t *length, - my_bool not_used __attribute__((unused))) + my_bool not_used MY_ATTRIBUTE((unused))) { *length= part[0].length; return (uchar *) part[0].str; @@ -4917,3 +4959,138 @@ static int clear_password_auth_client(MYSQL_PLUGIN_VIO *vio, MYSQL *mysql) return res ? CR_ERROR : CR_OK; } + +#if defined(EXPORT_SYMVER16) +#ifndef EMBEDDED_LIBRARY + +// Hack to provide both libmysqlclient_16 and libmysqlclient_18 symbol versions + +#define SYM_16(_exportedsym) __asm__(".symver symver16_" #_exportedsym "," #_exportedsym "@libmysqlclient_16") + +void STDCALL symver16_mysql_close(MYSQL *mysql) +{ + return mysql_close(mysql); +} +SYM_16(mysql_close); + + +uint STDCALL symver16_mysql_errno(MYSQL *mysql) +{ + return mysql_errno(mysql); +} +SYM_16(mysql_errno); + + +const char * STDCALL symver16_mysql_error(MYSQL *mysql) +{ + return mysql_error(mysql); +} +SYM_16(mysql_error); + + +ulong * STDCALL symver16_mysql_fetch_lengths(MYSQL_RES *res) +{ + return mysql_fetch_lengths(res); +} +SYM_16(mysql_fetch_lengths); + + +MYSQL_ROW STDCALL symver16_mysql_fetch_row(MYSQL_RES *res) +{ + return mysql_fetch_row(res); +} +SYM_16(mysql_fetch_row); + + +void STDCALL symver16_mysql_free_result(MYSQL_RES *result) +{ + return mysql_free_result(result); +} +SYM_16(mysql_free_result); + + +ulong STDCALL symver16_mysql_get_server_version(MYSQL *mysql) +{ + return mysql_get_server_version(mysql); +} +SYM_16(mysql_get_server_version); + + +const char * STDCALL symver16_mysql_get_ssl_cipher(MYSQL *mysql __attribute__((unused))) +{ + return mysql_get_ssl_cipher(mysql); +} +SYM_16(mysql_get_ssl_cipher); + + +MYSQL * STDCALL symver16_mysql_init(MYSQL *mysql) +{ + return mysql_init(mysql); +} +SYM_16(mysql_init); + + +unsigned int STDCALL symver16_mysql_num_fields(MYSQL_RES *res) +{ + return mysql_num_fields(res); +} +SYM_16(mysql_num_fields); + + +my_ulonglong STDCALL symver16_mysql_num_rows(MYSQL_RES *res) +{ + return mysql_num_rows(res); +} +SYM_16(mysql_num_rows); + + +int STDCALL symver16_mysql_options(MYSQL *mysql,enum mysql_option option, const void *arg) +{ + return mysql_options(mysql, option, arg); +} +SYM_16(mysql_options); + + +int STDCALL symver16_mysql_real_query(MYSQL *mysql, const char *query, ulong length) +{ + return mysql_real_query(mysql, query, length); +} +SYM_16(mysql_real_query); + + +int STDCALL symver16_mysql_select_db(MYSQL *mysql, const char *db) +{ + return mysql_select_db(mysql, db); +} +SYM_16(mysql_select_db); + + +int STDCALL symver16_mysql_send_query(MYSQL* mysql, const char* query, ulong length) +{ + return mysql_send_query(mysql, query, length); +} +SYM_16(mysql_send_query); + + +int STDCALL symver16_mysql_set_character_set(MYSQL *mysql, const char *cs_name) +{ + return mysql_set_character_set(mysql, cs_name); +} +SYM_16(mysql_set_character_set); + + +my_bool STDCALL symver16_mysql_ssl_set(MYSQL *mysql __attribute__((unused)), const char *key __attribute__((unused)), const char *cert __attribute__((unused)), const char *ca __attribute__((unused)), const char *capath __attribute__((unused)), const char *cipher __attribute__((unused))) +{ + return mysql_ssl_set(mysql, key, cert, ca, capath, cipher); +} +SYM_16(mysql_ssl_set); + + +MYSQL_RES * STDCALL symver16_mysql_store_result(MYSQL *mysql) +{ + return mysql_store_result(mysql); +} +SYM_16(mysql_store_result); + +#endif +#endif /* EXPORT_SYMVER16 */ diff --git a/mysql-wsrep-5.6/sql/binlog.cc b/mysql-wsrep-5.6/sql/binlog.cc index 1e0fa53c..78f64234 100644 --- a/mysql-wsrep-5.6/sql/binlog.cc +++ b/mysql-wsrep-5.6/sql/binlog.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -2045,17 +2045,16 @@ trans_has_updated_trans_table(const THD* thd) This function checks if a transactional table was updated by the current statement. - @param thd The client thread that executed the current statement. + @param ha_list Registered storage engine handler list. @return @c true if a transactional table was updated, @c false otherwise. */ bool -stmt_has_updated_trans_table(const THD *thd) +stmt_has_updated_trans_table(Ha_trx_info* ha_list) { Ha_trx_info *ha_info; - for (ha_info= thd->transaction.stmt.ha_list; ha_info; - ha_info= ha_info->next()) + for (ha_info= ha_list; ha_info; ha_info= ha_info->next()) { if (ha_info->is_trx_read_write() && ha_info->ht() != binlog_hton) return (TRUE); @@ -3479,23 +3478,48 @@ int MYSQL_BIN_LOG::move_crash_safe_index_file_to_index_file(bool need_lock_index if (mysql_file_close(index_file.file, MYF(0)) < 0) { error= -1; - sql_print_error("MYSQL_BIN_LOG::move_crash_safe_index_file_to_index_file " - "failed to close the index file."); - goto err; + sql_print_error("While rebuilding index file %s: " + "Failed to close the index file.", index_file_name); + /* + Delete Crash safe index file here and recover the binlog.index + state(index_file io_cache) from old binlog.index content. + */ + mysql_file_delete(key_file_binlog_index, crash_safe_index_file_name, + MYF(0)); + + goto recoverable_err; + } + if (DBUG_EVALUATE_IF("force_index_file_delete_failure", 1, 0) || + mysql_file_delete(key_file_binlog_index, index_file_name, MYF(MY_WME))) + { + error= -1; + sql_print_error("While rebuilding index file %s: " + "Failed to delete the existing index file. It could be " + "that file is being used by some other process.", + index_file_name); + /* + Delete Crash safe file index file here and recover the binlog.index + state(index_file io_cache) from old binlog.index content. + */ + mysql_file_delete(key_file_binlog_index, crash_safe_index_file_name, + MYF(0)); + + goto recoverable_err; } - mysql_file_delete(key_file_binlog_index, index_file_name, MYF(MY_WME)); } DBUG_EXECUTE_IF("crash_create_before_rename_index_file", DBUG_SUICIDE();); if (my_rename(crash_safe_index_file_name, index_file_name, MYF(MY_WME))) { error= -1; - sql_print_error("MYSQL_BIN_LOG::move_crash_safe_index_file_to_index_file " - "failed to move crash_safe_index_file to index file."); - goto err; + sql_print_error("While rebuilding index file %s: " + "Failed to rename the new index file to the existing " + "index file.", index_file_name); + goto fatal_err; } DBUG_EXECUTE_IF("crash_create_after_rename_index_file", DBUG_SUICIDE();); +recoverable_err: if ((fd= mysql_file_open(key_file_binlog_index, index_file_name, O_RDWR | O_CREAT | O_BINARY, @@ -3505,16 +3529,32 @@ int MYSQL_BIN_LOG::move_crash_safe_index_file_to_index_file(bool need_lock_index mysql_file_seek(fd, 0L, MY_SEEK_END, MYF(0)), 0, MYF(MY_WME | MY_WAIT_IF_FULL))) { - error= -1; - sql_print_error("MYSQL_BIN_LOG::move_crash_safe_index_file_to_index_file " - "failed to open the index file."); - goto err; + sql_print_error("After rebuilding the index file %s: " + "Failed to open the index file.", index_file_name); + goto fatal_err; } -err: if (need_lock_index) mysql_mutex_unlock(&LOCK_index); DBUG_RETURN(error); + +fatal_err: + /* + This situation is very very rare to happen (unless there is some serious + memory related issues like OOM) and should be treated as fatal error. + Hence it is better to bring down the server without respecting + 'binlog_error_action' value here. + */ + exec_binlog_error_action_abort("MySQL server failed to update the " + "binlog.index file's content properly. " + "It might not be in sync with available " + "binlogs and the binlog.index file state is in " + "unrecoverable state. Aborting the server."); + /* + Server is aborted in the above function. + This is dead code to make compiler happy. + */ + DBUG_RETURN(error); } @@ -4417,7 +4457,7 @@ err: int error_index= 0, close_error_index= 0; /* Read each entry from purge_index_file and delete the file. */ - if (is_inited_purge_index_file() && + if (!error && is_inited_purge_index_file() && (error_index= purge_index_entry(thd, decrease_log_space, false/*need_lock_index=false*/))) sql_print_error("MYSQL_BIN_LOG::purge_logs failed to process registered files" " that would be purged."); @@ -5529,7 +5569,8 @@ int MYSQL_BIN_LOG::rotate(bool force_rotate, bool* check_purge) *check_purge= false; - if (force_rotate || (my_b_tell(&log_file) >= (my_off_t) max_size)) + if (DBUG_EVALUATE_IF("force_rotate", 1, 0) || force_rotate || + (my_b_tell(&log_file) >= (my_off_t) max_size)) { error= new_file_without_locking(NULL); *check_purge= true; @@ -7353,7 +7394,8 @@ commit_stage: If we need to rotate, we do it without commit error. Otherwise the thd->commit_error will be possibly reset. */ - if (do_rotate && thd->commit_error == THD::CE_NONE) + if (DBUG_EVALUATE_IF("force_rotate", 1, 0) || + (do_rotate && thd->commit_error == THD::CE_NONE)) { /* Do not force the rotate as several consecutive groups may @@ -8000,6 +8042,26 @@ has_write_table_auto_increment_not_first_in_pk(TABLE_LIST *tables) return 0; } +#ifndef DBUG_OFF +const char * get_locked_tables_mode_name(enum_locked_tables_mode locked_tables_mode) +{ + switch (locked_tables_mode) + { + case LTM_NONE: + return "LTM_NONE"; + case LTM_LOCK_TABLES: + return "LTM_LOCK_TABLES"; + case LTM_PRELOCKED: + return "LTM_PRELOCKED"; + case LTM_PRELOCKED_UNDER_LOCK_TABLES: + return "LTM_PRELOCKED_UNDER_LOCK_TABLES"; + default: + return "Unknown table lock mode"; + } +} +#endif + + /** Decide on logging format to use for the statement and issue errors or warnings as needed. The decision depends on the following @@ -8739,7 +8801,7 @@ template Rows_log_event* THD::binlog_prepare_pending_rows_event(TABLE* table, uint32 serv_id, size_t needed, bool is_transactional, - RowsEventT *hint __attribute__((unused)), + RowsEventT *hint MY_ATTRIBUTE((unused)), const uchar* extra_row_info) { DBUG_ENTER("binlog_prepare_pending_rows_event"); diff --git a/mysql-wsrep-5.6/sql/binlog.h b/mysql-wsrep-5.6/sql/binlog.h index 4ed6db27..3251a4a3 100644 --- a/mysql-wsrep-5.6/sql/binlog.h +++ b/mysql-wsrep-5.6/sql/binlog.h @@ -1,5 +1,5 @@ #ifndef BINLOG_H_INCLUDED -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -86,7 +86,7 @@ public: /** Lock for protecting the queue. */ mysql_mutex_t m_lock; - } __attribute__((aligned(CPU_LEVEL1_DCACHE_LINESIZE))); + } MY_ATTRIBUTE((aligned(CPU_LEVEL1_DCACHE_LINESIZE))); public: Stage_manager() @@ -690,7 +690,7 @@ typedef struct st_load_file_info extern MYSQL_PLUGIN_IMPORT MYSQL_BIN_LOG mysql_bin_log; bool trans_has_updated_trans_table(const THD* thd); -bool stmt_has_updated_trans_table(const THD *thd); +bool stmt_has_updated_trans_table(Ha_trx_info* ha_list); bool ending_trans(THD* thd, const bool all); bool ending_single_stmt_trans(THD* thd, const bool all); bool trans_cannot_safely_rollback(const THD* thd); diff --git a/mysql-wsrep-5.6/sql/field.cc b/mysql-wsrep-5.6/sql/field.cc index 301beb51..30fbb32a 100644 --- a/mysql-wsrep-5.6/sql/field.cc +++ b/mysql-wsrep-5.6/sql/field.cc @@ -1,5 +1,5 @@ /* - Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1290,7 +1290,7 @@ out_of_range: */ type_conversion_status Field_num::store_time(MYSQL_TIME *ltime, - uint8 dec_arg __attribute__((unused))) + uint8 dec_arg MY_ATTRIBUTE((unused))) { longlong nr= TIME_to_ulonglong_round(ltime); return store(ltime->neg ? -nr : nr, 0); @@ -1444,8 +1444,8 @@ bool Field::send_binary(Protocol *protocol) master's field size, @c false otherwise. */ bool Field::compatible_field_size(uint field_metadata, - Relay_log_info *rli_arg __attribute__((unused)), - uint16 mflags __attribute__((unused)), + Relay_log_info *rli_arg MY_ATTRIBUTE((unused)), + uint16 mflags MY_ATTRIBUTE((unused)), int *order_var) { uint const source_size= pack_length_from_metadata(field_metadata); @@ -1508,7 +1508,7 @@ Field::store(const char *to, uint length, const CHARSET_INFO *cs, */ uchar * Field::pack(uchar *to, const uchar *from, uint max_length, - bool low_byte_first __attribute__((unused))) + bool low_byte_first MY_ATTRIBUTE((unused))) { uint32 length= pack_length(); set_if_smaller(length, max_length); @@ -1548,7 +1548,7 @@ Field::pack(uchar *to, const uchar *from, uint max_length, */ const uchar * Field::unpack(uchar* to, const uchar *from, uint param_data, - bool low_byte_first __attribute__((unused))) + bool low_byte_first MY_ATTRIBUTE((unused))) { uint length=pack_length(); int from_type= 0; @@ -1860,7 +1860,7 @@ bool Field::optimize_range(uint idx, uint part) Field *Field::new_field(MEM_ROOT *root, TABLE *new_table, - bool keep_type __attribute__((unused))) + bool keep_type MY_ATTRIBUTE((unused))) { Field *tmp= clone(root); if (tmp == NULL) @@ -2435,7 +2435,7 @@ longlong Field_decimal::val_int(void) } -String *Field_decimal::val_str(String *val_buffer __attribute__((unused)), +String *Field_decimal::val_str(String *val_buffer MY_ATTRIBUTE((unused)), String *val_ptr) { ASSERT_COLUMN_MARKED_FOR_READ; @@ -2806,7 +2806,7 @@ Field_new_decimal::store_decimal(const my_decimal *decimal_value) type_conversion_status Field_new_decimal::store_time(MYSQL_TIME *ltime, - uint8 dec_arg __attribute__((unused))) + uint8 dec_arg MY_ATTRIBUTE((unused))) { my_decimal decimal_value; return store_value(date2my_decimal(ltime, &decimal_value)); @@ -2847,7 +2847,7 @@ my_decimal* Field_new_decimal::val_decimal(my_decimal *decimal_value) String *Field_new_decimal::val_str(String *val_buffer, - String *val_ptr __attribute__((unused))) + String *val_ptr MY_ATTRIBUTE((unused))) { ASSERT_COLUMN_MARKED_FOR_READ; my_decimal decimal_value; @@ -2960,8 +2960,8 @@ uint Field_new_decimal::pack_length_from_metadata(uint field_metadata) @return @c true */ bool Field_new_decimal::compatible_field_size(uint field_metadata, - Relay_log_info * __attribute__((unused)), - uint16 mflags __attribute__((unused)), + Relay_log_info * MY_ATTRIBUTE((unused)), + uint16 mflags MY_ATTRIBUTE((unused)), int *order_var) { uint const source_precision= (field_metadata >> 8U) & 0x00ff; @@ -3161,7 +3161,7 @@ longlong Field_tiny::val_int(void) String *Field_tiny::val_str(String *val_buffer, - String *val_ptr __attribute__((unused))) + String *val_ptr MY_ATTRIBUTE((unused))) { ASSERT_COLUMN_MARKED_FOR_READ; const CHARSET_INFO *cs= &my_charset_numeric; @@ -3376,7 +3376,7 @@ longlong Field_short::val_int(void) String *Field_short::val_str(String *val_buffer, - String *val_ptr __attribute__((unused))) + String *val_ptr MY_ATTRIBUTE((unused))) { ASSERT_COLUMN_MARKED_FOR_READ; const CHARSET_INFO *cs= &my_charset_numeric; @@ -3596,7 +3596,7 @@ longlong Field_medium::val_int(void) String *Field_medium::val_str(String *val_buffer, - String *val_ptr __attribute__((unused))) + String *val_ptr MY_ATTRIBUTE((unused))) { ASSERT_COLUMN_MARKED_FOR_READ; const CHARSET_INFO *cs= &my_charset_numeric; @@ -3830,7 +3830,7 @@ longlong Field_long::val_int(void) } String *Field_long::val_str(String *val_buffer, - String *val_ptr __attribute__((unused))) + String *val_ptr MY_ATTRIBUTE((unused))) { ASSERT_COLUMN_MARKED_FOR_READ; const CHARSET_INFO *cs= &my_charset_numeric; @@ -4079,7 +4079,7 @@ longlong Field_longlong::val_int(void) String *Field_longlong::val_str(String *val_buffer, - String *val_ptr __attribute__((unused))) + String *val_ptr MY_ATTRIBUTE((unused))) { const CHARSET_INFO *cs= &my_charset_numeric; uint length; @@ -4199,7 +4199,7 @@ Field_real::unpack(uchar *to, const uchar *from, type_conversion_status Field_real::store_time(MYSQL_TIME *ltime, - uint8 dec_arg __attribute__((unused))) + uint8 dec_arg MY_ATTRIBUTE((unused))) { double nr= TIME_to_double(ltime); return store(ltime->neg ? -nr : nr); @@ -4289,7 +4289,7 @@ longlong Field_float::val_int(void) String *Field_float::val_str(String *val_buffer, - String *val_ptr __attribute__((unused))) + String *val_ptr MY_ATTRIBUTE((unused))) { ASSERT_COLUMN_MARKED_FOR_READ; DBUG_ASSERT(!zerofill || field_length <= MAX_FIELD_CHARLENGTH); @@ -4625,7 +4625,7 @@ bool Field_real::get_time(MYSQL_TIME *ltime) String *Field_double::val_str(String *val_buffer, - String *val_ptr __attribute__((unused))) + String *val_ptr MY_ATTRIBUTE((unused))) { ASSERT_COLUMN_MARKED_FOR_READ; DBUG_ASSERT(!zerofill || field_length <= MAX_FIELD_CHARLENGTH); @@ -5089,7 +5089,7 @@ Field_temporal_with_date::convert_number_to_TIME(longlong nr, type_conversion_status Field_temporal_with_date::store_time(MYSQL_TIME *ltime, - uint8 dec_arg __attribute__((unused))) + uint8 dec_arg MY_ATTRIBUTE((unused))) { ASSERT_COLUMN_MARKED_FOR_WRITE; type_conversion_status error; @@ -5480,7 +5480,7 @@ int Field_timestamp::cmp(const uchar *a_ptr, const uchar *b_ptr) } -void Field_timestamp::make_sort_key(uchar *to,uint length __attribute__((unused))) +void Field_timestamp::make_sort_key(uchar *to,uint length MY_ATTRIBUTE((unused))) { #ifdef WORDS_BIGENDIAN if (!table || !table->s->db_low_byte_first) @@ -5699,7 +5699,7 @@ Field_time_common::convert_number_to_TIME(longlong nr, bool unsigned_val, type_conversion_status Field_time_common::store_time(MYSQL_TIME *ltime, - uint8 dec_arg __attribute__((unused))) + uint8 dec_arg MY_ATTRIBUTE((unused))) { /* Check if seconds or minutes are out of range */ if (ltime->second >= 60 || ltime->minute >= 60) @@ -5725,7 +5725,7 @@ Field_time_common::store_internal_with_round(MYSQL_TIME *ltime, int *warnings) String *Field_time_common::val_str(String *val_buffer, - String *val_ptr __attribute__((unused))) + String *val_ptr MY_ATTRIBUTE((unused))) { ASSERT_COLUMN_MARKED_FOR_READ; MYSQL_TIME ltime; @@ -6039,7 +6039,7 @@ type_conversion_status Field_year::store(double nr) type_conversion_status Field_year::store_time(MYSQL_TIME *ltime, - uint8 dec_arg __attribute__((unused))) + uint8 dec_arg MY_ATTRIBUTE((unused))) { if (ltime->time_type != MYSQL_TIMESTAMP_DATETIME && ltime->time_type != MYSQL_TIMESTAMP_DATE) @@ -6103,7 +6103,7 @@ longlong Field_year::val_int(void) String *Field_year::val_str(String *val_buffer, - String *val_ptr __attribute__((unused))) + String *val_ptr MY_ATTRIBUTE((unused))) { DBUG_ASSERT(field_length < 5); val_buffer->alloc(5); @@ -6203,7 +6203,7 @@ longlong Field_newdate::val_time_temporal() String *Field_newdate::val_str(String *val_buffer, - String *val_ptr __attribute__((unused))) + String *val_ptr MY_ATTRIBUTE((unused))) { ASSERT_COLUMN_MARKED_FOR_READ; val_buffer->alloc(field_length); @@ -6393,7 +6393,7 @@ longlong Field_datetime::val_int() Using my_datetime_number_to_str() instead of my_datetime_to_str(). */ String *Field_datetime::val_str(String *val_buffer, - String *val_ptr __attribute__((unused))) + String *val_ptr MY_ATTRIBUTE((unused))) { ASSERT_COLUMN_MARKED_FOR_READ; val_buffer->alloc(field_length + 1); @@ -6787,7 +6787,7 @@ longlong Field_string::val_int(void) } -String *Field_string::val_str(String *val_buffer __attribute__((unused)), +String *Field_string::val_str(String *val_buffer MY_ATTRIBUTE((unused)), String *val_ptr) { ASSERT_COLUMN_MARKED_FOR_READ; @@ -6845,7 +6845,7 @@ check_field_for_37426(const void *param_arg) bool Field_string::compatible_field_size(uint field_metadata, Relay_log_info *rli_arg, - uint16 mflags __attribute__((unused)), + uint16 mflags MY_ATTRIBUTE((unused)), int *order_var) { #ifdef HAVE_REPLICATION @@ -6883,7 +6883,7 @@ int Field_string::cmp(const uchar *a_ptr, const uchar *b_ptr) void Field_string::make_sort_key(uchar *to, uint length) { - uint tmp __attribute__((unused))= + uint tmp MY_ATTRIBUTE((unused))= field_charset->coll->strnxfrm(field_charset, to, length, char_length(), ptr, field_length, @@ -6915,7 +6915,7 @@ void Field_string::sql_type(String &res) const uchar *Field_string::pack(uchar *to, const uchar *from, uint max_length, - bool low_byte_first __attribute__((unused))) + bool low_byte_first MY_ATTRIBUTE((unused))) { uint length= min(field_length,max_length); uint local_char_length= max_length/field_charset->mbmaxlen; @@ -6974,7 +6974,7 @@ const uchar * Field_string::unpack(uchar *to, const uchar *from, uint param_data, - bool low_byte_first __attribute__((unused))) + bool low_byte_first MY_ATTRIBUTE((unused))) { uint from_length, length; @@ -7229,7 +7229,7 @@ longlong Field_varstring::val_int(void) return result; } -String *Field_varstring::val_str(String *val_buffer __attribute__((unused)), +String *Field_varstring::val_str(String *val_buffer MY_ATTRIBUTE((unused)), String *val_ptr) { ASSERT_COLUMN_MARKED_FOR_READ; @@ -7391,7 +7391,7 @@ uint32 Field_varstring::data_length() uchar *Field_varstring::pack(uchar *to, const uchar *from, uint max_length, - bool low_byte_first __attribute__((unused))) + bool low_byte_first MY_ATTRIBUTE((unused))) { uint length= length_bytes == 1 ? (uint) *from : uint2korr(from); set_if_smaller(max_length, field_length); @@ -7428,7 +7428,7 @@ uchar *Field_varstring::pack(uchar *to, const uchar *from, const uchar * Field_varstring::unpack(uchar *to, const uchar *from, uint param_data, - bool low_byte_first __attribute__((unused))) + bool low_byte_first MY_ATTRIBUTE((unused))) { uint length; uint l_bytes= (param_data && (param_data < field_length)) ? @@ -7887,7 +7887,7 @@ longlong Field_blob::val_int(void) return my_strntoll(charset(),blob,length,10,NULL,¬_used); } -String *Field_blob::val_str(String *val_buffer __attribute__((unused)), +String *Field_blob::val_str(String *val_buffer MY_ATTRIBUTE((unused)), String *val_ptr) { ASSERT_COLUMN_MARKED_FOR_READ; @@ -8539,7 +8539,7 @@ int Field_enum::do_save_field_metadata(uchar *metadata_ptr) } -String *Field_enum::val_str(String *val_buffer __attribute__((unused)), +String *Field_enum::val_str(String *val_buffer MY_ATTRIBUTE((unused)), String *val_ptr) { uint tmp=(uint) Field_enum::val_int(); @@ -8683,7 +8683,7 @@ type_conversion_status Field_set::store(longlong nr, bool unsigned_val) String *Field_set::val_str(String *val_buffer, - String *val_ptr __attribute__((unused))) + String *val_ptr MY_ATTRIBUTE((unused))) { ulonglong tmp=(ulonglong) Field_enum::val_int(); uint bitnr=0; @@ -9148,7 +9148,7 @@ longlong Field_bit::val_int(void) String *Field_bit::val_str(String *val_buffer, - String *val_ptr __attribute__((unused))) + String *val_ptr MY_ATTRIBUTE((unused))) { ASSERT_COLUMN_MARKED_FOR_READ; char buff[sizeof(longlong)]; @@ -9308,7 +9308,7 @@ uint Field_bit::pack_length_from_metadata(uint field_metadata) */ bool Field_bit::compatible_field_size(uint field_metadata, - Relay_log_info * __attribute__((unused)), + Relay_log_info * MY_ATTRIBUTE((unused)), uint16 mflags, int *order_var) { @@ -9348,7 +9348,7 @@ void Field_bit::sql_type(String &res) const uchar * Field_bit::pack(uchar *to, const uchar *from, uint max_length, - bool low_byte_first __attribute__((unused))) + bool low_byte_first MY_ATTRIBUTE((unused))) { DBUG_ASSERT(max_length > 0); uint length; @@ -9396,7 +9396,7 @@ Field_bit::pack(uchar *to, const uchar *from, uint max_length, */ const uchar * Field_bit::unpack(uchar *to, const uchar *from, uint param_data, - bool low_byte_first __attribute__((unused))) + bool low_byte_first MY_ATTRIBUTE((unused))) { DBUG_ENTER("Field_bit::unpack"); DBUG_PRINT("enter", ("to: %p, from: %p, param_data: 0x%x", diff --git a/mysql-wsrep-5.6/sql/field.h b/mysql-wsrep-5.6/sql/field.h index ff3b49f5..eb3e3691 100644 --- a/mysql-wsrep-5.6/sql/field.h +++ b/mysql-wsrep-5.6/sql/field.h @@ -1,7 +1,7 @@ #ifndef FIELD_INCLUDED #define FIELD_INCLUDED -/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1889,13 +1889,13 @@ public: return new Field_long(*this); } virtual uchar *pack(uchar* to, const uchar *from, - uint max_length __attribute__((unused)), + uint max_length MY_ATTRIBUTE((unused)), bool low_byte_first) { return pack_int32(to, from, low_byte_first); } virtual const uchar *unpack(uchar* to, const uchar *from, - uint param_data __attribute__((unused)), + uint param_data MY_ATTRIBUTE((unused)), bool low_byte_first) { return unpack_int32(to, from, low_byte_first); @@ -1954,13 +1954,13 @@ public: return new Field_longlong(*this); } virtual uchar *pack(uchar* to, const uchar *from, - uint max_length __attribute__((unused)), + uint max_length MY_ATTRIBUTE((unused)), bool low_byte_first) { return pack_int64(to, from, low_byte_first); } virtual const uchar *unpack(uchar* to, const uchar *from, - uint param_data __attribute__((unused)), + uint param_data MY_ATTRIBUTE((unused)), bool low_byte_first) { return unpack_int64(to, from, low_byte_first); @@ -2560,12 +2560,12 @@ public: return new Field_timestamp(*this); } uchar *pack(uchar *to, const uchar *from, - uint max_length __attribute__((unused)), bool low_byte_first) + uint max_length MY_ATTRIBUTE((unused)), bool low_byte_first) { return pack_int32(to, from, low_byte_first); } const uchar *unpack(uchar* to, const uchar *from, - uint param_data __attribute__((unused)), + uint param_data MY_ATTRIBUTE((unused)), bool low_byte_first) { return unpack_int32(to, from, low_byte_first); @@ -2998,12 +2998,12 @@ public: return new Field_datetime(*this); } uchar *pack(uchar* to, const uchar *from, - uint max_length __attribute__((unused)), bool low_byte_first) + uint max_length MY_ATTRIBUTE((unused)), bool low_byte_first) { return pack_int64(to, from, low_byte_first); } const uchar *unpack(uchar* to, const uchar *from, - uint param_data __attribute__((unused)), + uint param_data MY_ATTRIBUTE((unused)), bool low_byte_first) { return unpack_int64(to, from, low_byte_first); diff --git a/mysql-wsrep-5.6/sql/field_conv.cc b/mysql-wsrep-5.6/sql/field_conv.cc index 1e44aefc..9f6de2a3 100644 --- a/mysql-wsrep-5.6/sql/field_conv.cc +++ b/mysql-wsrep-5.6/sql/field_conv.cc @@ -195,7 +195,7 @@ set_field_to_null_with_conversions(Field *field, bool no_conversions) } -static void do_skip(Copy_field *copy __attribute__((unused))) +static void do_skip(Copy_field *copy MY_ATTRIBUTE((unused))) { } diff --git a/mysql-wsrep-5.6/sql/filesort.cc b/mysql-wsrep-5.6/sql/filesort.cc index 3d5ba0cc..eeed08b0 100644 --- a/mysql-wsrep-5.6/sql/filesort.cc +++ b/mysql-wsrep-5.6/sql/filesort.cc @@ -1,5 +1,5 @@ /* - Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1040,7 +1040,7 @@ void make_sortkey(Sort_param *param, uchar *to, uchar *ref_pos) if (sort_field->need_strxnfrm) { char *from=(char*) res->ptr(); - uint tmp_length __attribute__((unused)); + uint tmp_length MY_ATTRIBUTE((unused)); if ((uchar*) from == to) { DBUG_ASSERT(sort_field->length >= length); diff --git a/mysql-wsrep-5.6/sql/ha_ndb_index_stat.cc b/mysql-wsrep-5.6/sql/ha_ndb_index_stat.cc index d4f654d4..a9ade57d 100644 --- a/mysql-wsrep-5.6/sql/ha_ndb_index_stat.cc +++ b/mysql-wsrep-5.6/sql/ha_ndb_index_stat.cc @@ -1,5 +1,5 @@ /* - Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1727,7 +1727,7 @@ ndb_index_stat_stop_listener(Ndb_index_stat_proc &pr) } pthread_handler_t -ndb_index_stat_thread_func(void *arg __attribute__((unused))) +ndb_index_stat_thread_func(void *arg MY_ATTRIBUTE((unused))) { THD *thd; /* needs to be first for thread_stack */ struct timespec abstime; diff --git a/mysql-wsrep-5.6/sql/ha_ndbcluster.cc b/mysql-wsrep-5.6/sql/ha_ndbcluster.cc index 18194f93..b46f07b4 100644 --- a/mysql-wsrep-5.6/sql/ha_ndbcluster.cc +++ b/mysql-wsrep-5.6/sql/ha_ndbcluster.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -417,7 +417,7 @@ pthread_mutex_t ndbcluster_mutex; HASH ndbcluster_open_tables; static uchar *ndbcluster_get_key(NDB_SHARE *share, size_t *length, - my_bool not_used __attribute__((unused))); + my_bool not_used MY_ATTRIBUTE((unused))); static void modify_shared_stats(NDB_SHARE *share, Ndb_local_table_statistics *local_stat); @@ -1293,7 +1293,7 @@ typedef struct st_thd_ndb_share { } THD_NDB_SHARE; static uchar *thd_ndb_share_get_key(THD_NDB_SHARE *thd_ndb_share, size_t *length, - my_bool not_used __attribute__((unused))) + my_bool not_used MY_ATTRIBUTE((unused))) { *length= sizeof(thd_ndb_share->key); return (uchar*) &thd_ndb_share->key; @@ -11106,7 +11106,7 @@ int ndbcluster_table_exists_in_engine(handlerton *hton, THD* thd, extern "C" uchar* tables_get_key(const char *entry, size_t *length, - my_bool not_used __attribute__((unused))) + my_bool not_used MY_ATTRIBUTE((unused))) { *length= strlen(entry); return (uchar*) entry; @@ -12657,7 +12657,7 @@ ha_ndbcluster::register_query_cache_table(THD *thd, */ static uchar *ndbcluster_get_key(NDB_SHARE *share, size_t *length, - my_bool not_used __attribute__((unused))) + my_bool not_used MY_ATTRIBUTE((unused))) { *length= share->key_length; return (uchar*) share->key; @@ -14539,7 +14539,7 @@ ha_ndbcluster::update_table_comment( /** Utility thread main loop. */ -pthread_handler_t ndb_util_thread_func(void *arg __attribute__((unused))) +pthread_handler_t ndb_util_thread_func(void *arg MY_ATTRIBUTE((unused))) { THD *thd; /* needs to be first for thread_stack */ struct timespec abstime; diff --git a/mysql-wsrep-5.6/sql/ha_ndbcluster_binlog.cc b/mysql-wsrep-5.6/sql/ha_ndbcluster_binlog.cc index 21f20b55..29f2ca10 100644 --- a/mysql-wsrep-5.6/sql/ha_ndbcluster_binlog.cc +++ b/mysql-wsrep-5.6/sql/ha_ndbcluster_binlog.cc @@ -1,5 +1,5 @@ /* - Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -6252,7 +6252,7 @@ private: static uchar * ndb_schema_objects_get_key(NDB_SCHEMA_OBJECT *schema_object, size_t *length, - my_bool not_used __attribute__((unused))) + my_bool not_used MY_ATTRIBUTE((unused))) { *length= schema_object->key_length; return (uchar*) schema_object->key; diff --git a/mysql-wsrep-5.6/sql/ha_partition.cc b/mysql-wsrep-5.6/sql/ha_partition.cc index 16263056..a3e43718 100644 --- a/mysql-wsrep-5.6/sql/ha_partition.cc +++ b/mysql-wsrep-5.6/sql/ha_partition.cc @@ -1,5 +1,5 @@ /* - Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -222,7 +222,7 @@ static uint partition_flags() return HA_CAN_PARTITION; } -static uint alter_table_flags(uint flags __attribute__((unused))) +static uint alter_table_flags(uint flags MY_ATTRIBUTE((unused))) { return (HA_PARTITION_FUNCTION_SUPPORTED | HA_FAST_CHANGE_PARTITION); @@ -1676,9 +1676,9 @@ int ha_partition::change_partitions(HA_CREATE_INFO *create_info, ulonglong * const copied, ulonglong * const deleted, const uchar *pack_frm_data - __attribute__((unused)), + MY_ATTRIBUTE((unused)), size_t pack_frm_len - __attribute__((unused))) + MY_ATTRIBUTE((unused))) { List_iterator part_it(m_part_info->partitions); List_iterator t_it(m_part_info->temp_partitions); @@ -2962,7 +2962,7 @@ bool ha_partition::get_from_handler_file(const char *name, MEM_ROOT *mem_root, */ static uchar *get_part_name(PART_NAME_DEF *part, size_t *length, - my_bool not_used __attribute__((unused))) + my_bool not_used MY_ATTRIBUTE((unused))) { *length= part->length; return part->partition_name; diff --git a/mysql-wsrep-5.6/sql/handler.cc b/mysql-wsrep-5.6/sql/handler.cc index a891766a..dbf560da 100644 --- a/mysql-wsrep-5.6/sql/handler.cc +++ b/mysql-wsrep-5.6/sql/handler.cc @@ -1443,7 +1443,7 @@ int ha_commit_trans(THD *thd, bool all, bool ignore_global_read_lock) DEBUG_SYNC(thd, "ha_commit_trans_after_acquire_commit_lock"); } - if (rw_trans && + if (rw_trans && stmt_has_updated_trans_table(ha_info) && opt_readonly && !(thd->security_ctx->master_access & SUPER_ACL) && !thd->slave_thread) @@ -6359,7 +6359,7 @@ end: ha_rows DsMrr_impl::dsmrr_info(uint keyno, uint n_ranges, uint rows, uint *bufsz, uint *flags, Cost_estimate *cost) { - ha_rows res __attribute__((unused)); + ha_rows res MY_ATTRIBUTE((unused)); uint def_flags= *flags; uint def_bufsz= *bufsz; @@ -7401,6 +7401,17 @@ int handler::ha_write_row(uchar *buf) if (unlikely(error= binlog_log_row(table, 0, buf, log_func))) DBUG_RETURN(error); /* purecov: inspected */ +#ifdef WITH_WSREP + current_thd->wsrep_affected_rows++; + if (wsrep_max_ws_rows && + current_thd->wsrep_exec_mode != REPL_RECV && + current_thd->wsrep_affected_rows > wsrep_max_ws_rows) + { + trans_rollback_stmt(current_thd) || trans_rollback(current_thd); + my_message(ER_ERROR_DURING_COMMIT, "wsrep_max_ws_rows exceeded", MYF(0)); + DBUG_RETURN(ER_ERROR_DURING_COMMIT); + } +#endif /* WITH_WSREP */ DEBUG_SYNC_C("ha_write_row_end"); DBUG_RETURN(0); @@ -7432,6 +7443,17 @@ int handler::ha_update_row(const uchar *old_data, uchar *new_data) return error; if (unlikely(error= binlog_log_row(table, old_data, new_data, log_func))) return error; +#ifdef WITH_WSREP + current_thd->wsrep_affected_rows++; + if (wsrep_max_ws_rows && + current_thd->wsrep_exec_mode != REPL_RECV && + current_thd->wsrep_affected_rows > wsrep_max_ws_rows) + { + trans_rollback_stmt(current_thd) || trans_rollback(current_thd); + my_message(ER_ERROR_DURING_COMMIT, "wsrep_max_ws_rows exceeded", MYF(0)); + return ER_ERROR_DURING_COMMIT; + } +#endif /* WITH_WSREP */ return 0; } @@ -7460,6 +7482,17 @@ int handler::ha_delete_row(const uchar *buf) return error; if (unlikely(error= binlog_log_row(table, buf, 0, log_func))) return error; +#ifdef WITH_WSREP + current_thd->wsrep_affected_rows++; + if (wsrep_max_ws_rows && + current_thd->wsrep_exec_mode != REPL_RECV && + current_thd->wsrep_affected_rows > wsrep_max_ws_rows) + { + trans_rollback_stmt(current_thd) || trans_rollback(current_thd); + my_message(ER_ERROR_DURING_COMMIT, "wsrep_max_ws_rows exceeded", MYF(0)); + return ER_ERROR_DURING_COMMIT; + } +#endif /* WITH_WSREP */ return 0; } diff --git a/mysql-wsrep-5.6/sql/handler.h b/mysql-wsrep-5.6/sql/handler.h index b0ed7a55..484774d7 100644 --- a/mysql-wsrep-5.6/sql/handler.h +++ b/mysql-wsrep-5.6/sql/handler.h @@ -3073,7 +3073,7 @@ private: */ virtual int rnd_init(bool scan)= 0; virtual int rnd_end() { return 0; } - virtual int write_row(uchar *buf __attribute__((unused))) + virtual int write_row(uchar *buf MY_ATTRIBUTE((unused))) { return HA_ERR_WRONG_COMMAND; } @@ -3086,13 +3086,13 @@ private: the columns required for the error message are not read, the error message will contain garbage. */ - virtual int update_row(const uchar *old_data __attribute__((unused)), - uchar *new_data __attribute__((unused))) + virtual int update_row(const uchar *old_data MY_ATTRIBUTE((unused)), + uchar *new_data MY_ATTRIBUTE((unused))) { return HA_ERR_WRONG_COMMAND; } - virtual int delete_row(const uchar *buf __attribute__((unused))) + virtual int delete_row(const uchar *buf MY_ATTRIBUTE((unused))) { return HA_ERR_WRONG_COMMAND; } @@ -3125,8 +3125,8 @@ private: @return non-0 in case of failure, 0 in case of success. When lock_type is F_UNLCK, the return value is ignored. */ - virtual int external_lock(THD *thd __attribute__((unused)), - int lock_type __attribute__((unused))) + virtual int external_lock(THD *thd MY_ATTRIBUTE((unused)), + int lock_type MY_ATTRIBUTE((unused))) { return 0; } diff --git a/mysql-wsrep-5.6/sql/hostname.cc b/mysql-wsrep-5.6/sql/hostname.cc index d3944ba8..b999be8c 100644 --- a/mysql-wsrep-5.6/sql/hostname.cc +++ b/mysql-wsrep-5.6/sql/hostname.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -413,7 +413,7 @@ int ip_to_hostname(struct sockaddr_storage *ip_storage, { const struct sockaddr *ip= (const sockaddr *) ip_storage; int err_code; - bool err_status __attribute__((unused)); + bool err_status MY_ATTRIBUTE((unused)); Host_errors errors; DBUG_ENTER("ip_to_hostname"); diff --git a/mysql-wsrep-5.6/sql/init.h b/mysql-wsrep-5.6/sql/init.h index 88cd8e6e..2edef637 100644 --- a/mysql-wsrep-5.6/sql/init.h +++ b/mysql-wsrep-5.6/sql/init.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -19,6 +19,6 @@ #include "my_global.h" /* ulong */ void unireg_init(ulong options); -void unireg_end(void) __attribute__((noreturn)); +void unireg_end(void) MY_ATTRIBUTE((noreturn)); #endif /* INIT_INCLUDED */ diff --git a/mysql-wsrep-5.6/sql/item.cc b/mysql-wsrep-5.6/sql/item.cc index e2635c19..6468342c 100644 --- a/mysql-wsrep-5.6/sql/item.cc +++ b/mysql-wsrep-5.6/sql/item.cc @@ -230,9 +230,6 @@ bool Item::val_bool() */ String *Item::val_str_ascii(String *str) { - if (!(collation.collation->state & MY_CS_NONASCII)) - return val_str(str); - DBUG_ASSERT(str != &str_value); uint errors; @@ -240,11 +237,15 @@ String *Item::val_str_ascii(String *str) if (!res) return 0; - if ((null_value= str->copy(res->ptr(), res->length(), - collation.collation, &my_charset_latin1, - &errors))) - return 0; - + if (!(res->charset()->state & MY_CS_NONASCII)) + str= res; + else + { + if ((null_value= str->copy(res->ptr(), res->length(), collation.collation, + &my_charset_latin1, &errors))) + return 0; + } + return str; } @@ -2914,11 +2915,24 @@ table_map Item_field::used_tables() const } -table_map Item_field::resolved_used_tables() const +bool Item_field::used_tables_for_level(uchar *arg) { - if (field->table->const_table) - return 0; // const item - return field->table->map; + // Used by resolver only, so can never reach a "const" table. + DBUG_ASSERT(!field->orig_table->const_table); + TABLE_LIST *tr= field->orig_table->pos_in_table_list; + Used_tables *const ut= (Used_tables *)(arg); + + /* + When the qualifying query for the field (table_ref->select_lex) is the + same level as the requested level, add the table's map. When the qualifying + query for the field is outer relative to the requested level, add an outer + reference. + */ + if (ut->select == tr->select_lex) + ut->used_tables|= tr->table->map; + else if (ut->select->nest_level > tr->select_lex->nest_level) + ut->used_tables|= OUTER_REF_TABLE_BIT; + return false; } void Item_ident::fix_after_pullout(st_select_lex *parent_select, @@ -2993,7 +3007,9 @@ void Item_ident::fix_after_pullout(st_select_lex *parent_select, */ Item_subselect *subq_predicate= child_select->master_unit()->item; - subq_predicate->used_tables_cache|= this->resolved_used_tables(); + Used_tables ut(depended_from); + (void) walk(&Item::used_tables_for_level, true, (uchar *)(&ut)); + subq_predicate->used_tables_cache|= ut.used_tables; subq_predicate->const_item_cache&= this->const_item(); } } @@ -3412,8 +3428,8 @@ Item *Item_null::safe_charset_converter(const CHARSET_INFO *tocs) static void default_set_param_func(Item_param *param, - uchar **pos __attribute__((unused)), - ulong len __attribute__((unused))) + uchar **pos MY_ATTRIBUTE((unused)), + ulong len MY_ATTRIBUTE((unused))) { param->set_null(); } @@ -4724,8 +4740,10 @@ void mark_select_range_as_dependent(THD *thd, if (found_field == view_ref_found) { Item::Type type= found_item->type(); - prev_subselect_item->used_tables_cache|= - found_item->used_tables(); + Used_tables ut(last_select); + (void) found_item->walk(&Item::used_tables_for_level, true, + (uchar *)(&ut)); + prev_subselect_item->used_tables_cache|= ut.used_tables; dependent= ((type == Item::REF_ITEM || type == Item::FIELD_ITEM) ? (Item_ident*) found_item : 0); @@ -5170,8 +5188,10 @@ Item_field::fix_outer_field(THD *thd, Field **from_field, Item **reference) else { Item::Type ref_type= (*reference)->type(); - prev_subselect_item->used_tables_cache|= - (*reference)->used_tables(); + Used_tables ut(select); + (void) (*reference)->walk(&Item::used_tables_for_level, true, + (uchar *)(&ut)); + prev_subselect_item->used_tables_cache|= ut.used_tables; prev_subselect_item->const_item_cache&= (*reference)->const_item(); mark_as_dependent(thd, last_checked_context->select_lex, diff --git a/mysql-wsrep-5.6/sql/item.h b/mysql-wsrep-5.6/sql/item.h index e0d90ae9..99404bf2 100644 --- a/mysql-wsrep-5.6/sql/item.h +++ b/mysql-wsrep-5.6/sql/item.h @@ -143,6 +143,19 @@ public: } } }; +/** + Class used as argument to Item::walk() together with used_tables_for_level() +*/ +class Used_tables +{ +public: + explicit Used_tables(st_select_lex *select) : + select(select), used_tables(0) + {} + + st_select_lex *const select; ///< Level for which data is accumulated + table_map used_tables; ///< Accumulated used tables data +}; /*************************************************************************/ @@ -1192,23 +1205,6 @@ public: /* bit map of tables used by item */ virtual table_map used_tables() const { return (table_map) 0L; } - /** - Return used table information for the level this item is resolved on. - - For fields, this returns the table the item is resolved from. - - For all other items, this behaves like used_tables(). - - @note: Use this function with caution. External calls to this function - should only be made for class objects derived from Item_ident. - Item::resolved_used_tables is for internal use only, in order to - process fields underlying a view column reference. - */ - virtual table_map resolved_used_tables() const - { - // As this is the level this item was resolved on, it cannot be outer: - DBUG_ASSERT(!(used_tables() & OUTER_REF_TABLE_BIT)); - - return used_tables(); - } /* Return table map of tables that can't be NULL tables (tables that are used in a context where if they would contain a NULL row generated @@ -1440,6 +1436,21 @@ public: virtual bool reset_query_id_processor(uchar *query_id_arg) { return 0; } virtual bool find_item_processor(uchar *arg) { return this == (void *) arg; } virtual bool register_field_in_read_map(uchar *arg) { return 0; } +/** + Return used table information for the specified query block (level). + For a field that is resolved from this query block, return the table number. + For a field that is resolved from a query block outer to the specified one, + return OUTER_REF_TABLE_BIT + + @param[in,out] arg pointer to an instance of class Used_tables, which is + constructed with the query block as argument. + The used tables information is accumulated in the field + used_tables in this class. + + @note This function is used to update used tables information after + merging a query block (a subquery) with its parent. + */ + virtual bool used_tables_for_level(uchar *arg) { return false; } virtual bool inform_item_in_cond_of_tab(uchar *join_tab_index) { return false; } /** Clean up after removing the item from the item tree. @@ -2243,7 +2254,6 @@ public: type_conversion_status save_in_field(Field *field,bool no_conversions); void save_org_in_field(Field *field); table_map used_tables() const; - virtual table_map resolved_used_tables() const; enum Item_result result_type () const { return field->result_type(); @@ -2278,6 +2288,7 @@ public: bool add_field_to_set_processor(uchar * arg); bool remove_column_from_bitmap(uchar * arg); bool find_item_in_field_list_processor(uchar *arg); + bool used_tables_for_level(uchar *arg); bool register_field_in_read_map(uchar *arg); bool check_partition_func_processor(uchar *int_arg) {return FALSE;} void cleanup(); @@ -3245,9 +3256,6 @@ public: (*ref)->update_used_tables(); } - virtual table_map resolved_used_tables() const - { return (*ref)->resolved_used_tables(); } - table_map not_null_tables() const { /* @@ -4191,11 +4199,6 @@ public: void set_used_tables(table_map map) { used_table_map= map; } - virtual table_map resolved_used_tables() const - { - return example ? example->resolved_used_tables() : used_table_map; - } - virtual bool allocate(uint i) { return 0; } virtual bool setup(Item *item) { diff --git a/mysql-wsrep-5.6/sql/item_func.cc b/mysql-wsrep-5.6/sql/item_func.cc index a4297644..5fb940c1 100644 --- a/mysql-wsrep-5.6/sql/item_func.cc +++ b/mysql-wsrep-5.6/sql/item_func.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -239,6 +239,16 @@ Item_func::fix_fields(THD *thd, Item **ref) void Item_func::fix_after_pullout(st_select_lex *parent_select, st_select_lex *removed_select) { + if (const_item()) + { + /* + Pulling out a const item changes nothing to it. Moreover, some items may + have decided that they're const by some other logic than the generic + one below, and we must preserve that decision. + */ + return; + } + Item **arg,**arg_end; used_tables_cache= get_initial_pseudo_tables(); @@ -3997,7 +4007,7 @@ public: }; uchar *ull_get_key(const User_level_lock *ull, size_t *length, - my_bool not_used __attribute__((unused))) + my_bool not_used MY_ATTRIBUTE((unused))) { *length= ull->key_length; return ull->key; diff --git a/mysql-wsrep-5.6/sql/item_geofunc.cc b/mysql-wsrep-5.6/sql/item_geofunc.cc index dce88894..9ec8de9e 100644 --- a/mysql-wsrep-5.6/sql/item_geofunc.cc +++ b/mysql-wsrep-5.6/sql/item_geofunc.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -200,7 +200,7 @@ String *Item_func_geometry_type::val_str_ascii(String *str) /* String will not move */ str->copy(geom->get_class_info()->m_name.str, geom->get_class_info()->m_name.length, - default_charset()); + &my_charset_latin1); return str; } diff --git a/mysql-wsrep-5.6/sql/item_geofunc.h b/mysql-wsrep-5.6/sql/item_geofunc.h index 95306db8..b3b21f0c 100644 --- a/mysql-wsrep-5.6/sql/item_geofunc.h +++ b/mysql-wsrep-5.6/sql/item_geofunc.h @@ -519,7 +519,21 @@ class Item_func_distance: public Item_real_func Gcalc_function func; Gcalc_scan_iterator scan_it; public: - Item_func_distance(Item *a, Item *b): Item_real_func(a, b) {} + Item_func_distance(Item *a, Item *b): Item_real_func(a, b) + { + /* + Distance could be NULL, if either of the operands are + not geometries. + */ + maybe_null= true; + } + + void fix_length_and_dec() + { + Item_real_func::fix_length_and_dec(); + maybe_null= true; + } + double val_real(); const char *func_name() const { return "st_distance"; } }; diff --git a/mysql-wsrep-5.6/sql/item_sum.cc b/mysql-wsrep-5.6/sql/item_sum.cc index 58bac626..f35735a4 100644 --- a/mysql-wsrep-5.6/sql/item_sum.cc +++ b/mysql-wsrep-5.6/sql/item_sum.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. rights reserved. This program is free software; you can redistribute it and/or modify @@ -3070,7 +3070,7 @@ int group_concat_key_cmp_with_order(const void* arg, const void* key1, */ extern "C" -int dump_leaf_key(void* key_arg, element_count count __attribute__((unused)), +int dump_leaf_key(void* key_arg, element_count count MY_ATTRIBUTE((unused)), void* item_arg) { Item_func_group_concat *item= (Item_func_group_concat *) item_arg; diff --git a/mysql-wsrep-5.6/sql/item_sum.h b/mysql-wsrep-5.6/sql/item_sum.h index 7862fb0d..1ec80e92 100644 --- a/mysql-wsrep-5.6/sql/item_sum.h +++ b/mysql-wsrep-5.6/sql/item_sum.h @@ -1,7 +1,7 @@ #ifndef ITEM_SUM_INCLUDED #define ITEM_SUM_INCLUDED -/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. reserved. reserved. This program is free software; you can redistribute it and/or modify @@ -1417,7 +1417,7 @@ int group_concat_key_cmp_with_distinct(const void* arg, const void* key1, int group_concat_key_cmp_with_order(const void* arg, const void* key1, const void* key2); int dump_leaf_key(void* key_arg, - element_count count __attribute__((unused)), + element_count count MY_ATTRIBUTE((unused)), void* item_arg); C_MODE_END @@ -1463,7 +1463,7 @@ class Item_func_group_concat : public Item_sum const void* key1, const void* key2); friend int dump_leaf_key(void* key_arg, - element_count count __attribute__((unused)), + element_count count MY_ATTRIBUTE((unused)), void* item_arg); public: diff --git a/mysql-wsrep-5.6/sql/item_timefunc.cc b/mysql-wsrep-5.6/sql/item_timefunc.cc index 4078ec89..05117ffa 100644 --- a/mysql-wsrep-5.6/sql/item_timefunc.cc +++ b/mysql-wsrep-5.6/sql/item_timefunc.cc @@ -1,5 +1,5 @@ /* - Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1902,7 +1902,7 @@ Item_func_now::save_in_field(Field *to, bool no_conversions) time zone. Defines time zone (local) used for whole SYSDATE function. */ bool Item_func_sysdate_local::get_date(MYSQL_TIME *now_time, - uint fuzzy_date __attribute__((unused))) + uint fuzzy_date MY_ATTRIBUTE((unused))) { THD *thd= current_thd; ulonglong tmp= my_micro_time(); @@ -2138,7 +2138,7 @@ void Item_func_from_unixtime::fix_length_and_dec() bool Item_func_from_unixtime::get_date(MYSQL_TIME *ltime, - uint fuzzy_date __attribute__((unused))) + uint fuzzy_date MY_ATTRIBUTE((unused))) { lldiv_t lld; if (decimals) @@ -2177,7 +2177,7 @@ void Item_func_convert_tz::fix_length_and_dec() bool Item_func_convert_tz::get_date(MYSQL_TIME *ltime, - uint fuzzy_date __attribute__((unused))) + uint fuzzy_date MY_ATTRIBUTE((unused))) { my_time_t my_time_tmp; String str; diff --git a/mysql-wsrep-5.6/sql/log.cc b/mysql-wsrep-5.6/sql/log.cc index d6c8ba96..86436092 100644 --- a/mysql-wsrep-5.6/sql/log.cc +++ b/mysql-wsrep-5.6/sql/log.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1496,6 +1496,78 @@ bool MYSQL_LOG::init_and_set_log_file_name(const char *log_name, } +bool is_valid_log_name(const char *name, size_t len) +{ + if (len > 3) + { + const char *tail= name + len - 4; + if (my_strcasecmp(system_charset_info, tail, ".ini") == 0 || + my_strcasecmp(system_charset_info, tail, ".cnf") == 0) + { + return false; + } + } + return true; +} + + +/** + Get the real log file name, and possibly reopen file. + + Use realpath() to get the path with symbolic links + expanded. Then, close the file, and reopen the real path using the + O_NOFOLLOW flag. This will reject following symbolic links. + + @param file File descriptor. + @param log_file_key Key for P_S instrumentation. + @param open_flags Flags to use for opening the file. + @param opened_file_name Name of the open fd. + + @retval file descriptor to open file with 'real_file_name', or '-1' + in case of errors. +*/ + +#ifndef _WIN32 +static File mysql_file_real_name_reopen(File file, +#ifdef HAVE_PSI_INTERFACE + PSI_file_key log_file_key, +#endif + int open_flags, + const char *opened_file_name) +{ + DBUG_ASSERT(file); + DBUG_ASSERT(opened_file_name); + + /* Buffer for realpath must have capacity for PATH_MAX. */ + char real_file_name[PATH_MAX]; + + /* Get realpath, validate, open realpath with O_NOFOLLOW. */ + if (realpath(opened_file_name, real_file_name) == NULL) + { + (void) mysql_file_close(file, MYF(0)); + return -1; + } + + if (mysql_file_close(file, MYF(0))) + return -1; + + if (strlen(real_file_name) > FN_REFLEN) + return -1; + + if (!is_valid_log_name(real_file_name, strlen(real_file_name))) + { + sql_print_error("Invalid log file name after expanding symlinks: '%s'", + real_file_name); + return -1; + } + + return mysql_file_open(log_file_key, real_file_name, + open_flags | O_NOFOLLOW, + MYF(MY_WME | ME_WAITTANG)); +} +#endif // _WIN32 + + /* Open a (new) log file. @@ -1566,6 +1638,18 @@ bool MYSQL_LOG::open( MYF(MY_WME | ME_WAITTANG))) < 0) goto err; +#ifndef _WIN32 + /* Reopen and validate path. */ + if ((log_type_arg == LOG_UNKNOWN || log_type_arg == LOG_NORMAL) && + (file= mysql_file_real_name_reopen(file, +#ifdef HAVE_PSI_INTERFACE + log_file_key, +#endif + open_flags, + log_file_name)) < 0) + goto err; +#endif // _WIN32 + if ((pos= mysql_file_tell(file, MYF(MY_WME))) == MY_FILEPOS_ERROR) { if (my_errno == ESPIPE) diff --git a/mysql-wsrep-5.6/sql/log.h b/mysql-wsrep-5.6/sql/log.h index 8c0d91eb..64965958 100644 --- a/mysql-wsrep-5.6/sql/log.h +++ b/mysql-wsrep-5.6/sql/log.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -610,6 +610,16 @@ bool flush_error_log(); char *make_log_name(char *buff, const char *name, const char* log_ext); +/** + Check given log name against certain blacklisted names/extensions. + + @param name Log name to check + @param len Length of log name + + @returns true if name is valid, false otherwise. +*/ +bool is_valid_log_name(const char *name, size_t len); + extern LOGGER logger; #endif /* LOG_H */ diff --git a/mysql-wsrep-5.6/sql/log_event.cc b/mysql-wsrep-5.6/sql/log_event.cc index e7878a35..b0158efa 100644 --- a/mysql-wsrep-5.6/sql/log_event.cc +++ b/mysql-wsrep-5.6/sql/log_event.cc @@ -354,7 +354,7 @@ inline int idempotent_error_code(int err_code) Ignore error code specified on command line. */ -inline int ignored_error_code(int err_code) +int ignored_error_code(int err_code) { #ifdef HAVE_NDB_BINLOG /* @@ -1743,7 +1743,7 @@ Log_event* Log_event::read_log_event(const char* buf, uint event_len, void Log_event::print_header(IO_CACHE* file, PRINT_EVENT_INFO* print_event_info, - bool is_more __attribute__((unused))) + bool is_more MY_ATTRIBUTE((unused))) { char llbuff[22]; my_off_t hexdump_from= print_event_info->hexdump_from; @@ -2727,7 +2727,7 @@ Slave_worker *Log_event::get_slave_worker(Relay_log_info *rli) { if (!rli->curr_group_seen_gtid && !rli->curr_group_seen_begin) { - ulong gaq_idx __attribute__((unused)); + ulong gaq_idx MY_ATTRIBUTE((unused)); rli->mts_groups_assigned++; rli->curr_group_isolated= FALSE; @@ -3772,7 +3772,8 @@ Query_log_event::Query_log_event(THD* thd_arg, const char* query_arg, if (cmd_can_generate_row_events) { cmd_must_go_to_trx_cache= cmd_must_go_to_trx_cache || using_trans; - if (cmd_must_go_to_trx_cache || stmt_has_updated_trans_table(thd) || + if (cmd_must_go_to_trx_cache || + stmt_has_updated_trans_table(thd->transaction.stmt.ha_list) || thd->lex->is_mixed_stmt_unsafe(thd->in_multi_stmt_transaction_mode(), thd->variables.binlog_direct_non_trans_update, trans_has_updated_trans_table(thd), @@ -11126,6 +11127,7 @@ end: int Rows_log_event::do_apply_event(Relay_log_info const *rli) { DBUG_ENTER("Rows_log_event::do_apply_event(Relay_log_info*)"); + TABLE *table= NULL; int error= 0; if (opt_bin_log) @@ -11215,28 +11217,33 @@ int Rows_log_event::do_apply_event(Relay_log_info const *rli) #endif if (thd->is_slave_error || thd->is_fatal_error) { - /* - Error reporting borrowed from Query_log_event with many excessive - simplifications. - We should not honour --slave-skip-errors at this point as we are - having severe errors which should not be skiped. - */ - rli->report(ERROR_LEVEL, actual_error, - "Error executing row event: '%s'", - (actual_error ? thd->get_stmt_da()->message() : - "unexpected success or fatal error")); - thd->is_slave_error= 1; + if (ignored_error_code(actual_error)) + { + if (log_warnings > 1) + rli->report(WARNING_LEVEL, actual_error, + "Error executing row event: '%s'", + (actual_error ? thd->get_stmt_da()->message() : + "unexpected success or fatal error")); + thd->get_stmt_da()->clear_warning_info(thd->query_id); + clear_all_errors(thd, const_cast(rli)); + error= 0; + goto end; + } + else + { + rli->report(ERROR_LEVEL, actual_error, + "Error executing row event: '%s'", + (actual_error ? thd->get_stmt_da()->message() : + "unexpected success or fatal error")); + thd->is_slave_error= 1; + const_cast(rli)->slave_close_thread_tables(thd); + DBUG_RETURN(actual_error); + } } - const_cast(rli)->slave_close_thread_tables(thd); - DBUG_RETURN(actual_error); } - /* When the open and locking succeeded, we check all tables to ensure that they still have the correct type. - - We can use a down cast here since we know that every table added - to the tables_to_lock is a RPL_TABLE_LIST. */ { @@ -11255,10 +11262,37 @@ int Rows_log_event::do_apply_event(Relay_log_info const *rli) NOTE: The base tables are added here are removed when close_thread_tables is called. */ - RPL_TABLE_LIST *ptr= rli->tables_to_lock; - for (uint i= 0 ; ptr && (i < rli->tables_to_lock_count); - ptr= static_cast(ptr->next_global), i++) + TABLE_LIST *table_list_ptr= rli->tables_to_lock; + for (uint i=0 ; table_list_ptr && (i < rli->tables_to_lock_count); + table_list_ptr= table_list_ptr->next_global, i++) { + /* + Below if condition takes care of skipping base tables that + make up the MERGE table (which are added by open_tables() + call). They are added next to the merge table in the list. + For eg: If RPL_TABLE_LIST is t3->t1->t2 (where t1 and t2 + are base tables for merge table 't3'), open_tables will modify + the list by adding t1 and t2 again immediately after t3 in the + list (*not at the end of the list*). New table_to_lock list will + look like t3->t1'->t2'->t1->t2 (where t1' and t2' are TABLE_LIST + objects added by open_tables() call). There is no flag(or logic) in + open_tables() that can skip adding these base tables to the list. + So the logic here should take care of skipping them. + + tables_to_lock_count logic will take care of skipping base tables + that are added at the end of the list. + For eg: If RPL_TABLE_LIST is t1->t2->t3, open_tables will modify + the list into t1->t2->t3->t1'->t2'. t1' and t2' will be skipped + because tables_to_lock_count logic in this for loop. + */ + if (table_list_ptr->parent_l) + continue; + /* + We can use a down cast here since we know that every table added + to the tables_to_lock is a RPL_TABLE_LIST (or child table which is + skipped above). + */ + RPL_TABLE_LIST *ptr= static_cast(table_list_ptr); DBUG_ASSERT(ptr->m_tabledef_valid); TABLE *conv_table; if (!ptr->m_tabledef.compatible_with(thd, const_cast(rli), @@ -11267,13 +11301,18 @@ int Rows_log_event::do_apply_event(Relay_log_info const *rli) DBUG_PRINT("debug", ("Table: %s.%s is not compatible with master", ptr->table->s->db.str, ptr->table->s->table_name.str)); - /* - We should not honour --slave-skip-errors at this point as we are - having severe errors which should not be skiped. - */ - thd->is_slave_error= 1; - const_cast(rli)->slave_close_thread_tables(thd); - DBUG_RETURN(ERR_BAD_TABLE_DEF); + if (thd->is_slave_error) + { + const_cast(rli)->slave_close_thread_tables(thd); + DBUG_RETURN(ERR_BAD_TABLE_DEF); + } + else + { + thd->get_stmt_da()->clear_warning_info(thd->query_id); + clear_all_errors(thd, const_cast(rli)); + error= 0; + goto end; + } } DBUG_PRINT("debug", ("Table: %s.%s is compatible with master" " - conv_table: %p", @@ -11299,7 +11338,15 @@ int Rows_log_event::do_apply_event(Relay_log_info const *rli) */ TABLE_LIST *ptr= rli->tables_to_lock; for (uint i=0 ; ptr && (i < rli->tables_to_lock_count); ptr= ptr->next_global, i++) + { + /* + Please see comment in above 'for' loop to know the reason + for this if condition + */ + if (ptr->parent_l) + continue; const_cast(rli)->m_table_map.set_table(ptr->table_id, ptr->table); + } #ifdef HAVE_QUERY_CACHE #ifdef WITH_WSREP @@ -11317,8 +11364,7 @@ int Rows_log_event::do_apply_event(Relay_log_info const *rli) #endif } - TABLE* - table= + table= m_table= const_cast(rli)->m_table_map.get_table(m_table_id); DBUG_PRINT("debug", ("m_table: 0x%lx, m_table_id: %llu", (ulong) m_table, @@ -11551,7 +11597,7 @@ AFTER_MAIN_EXEC_ROW_LOOP: thd->is_slave_error= 1; DBUG_RETURN(error); } - +end: if (get_flags(STMT_END_F)) { @@ -11563,12 +11609,25 @@ AFTER_MAIN_EXEC_ROW_LOOP: #endif /* WITH_WSREP && HAVE_QUERY_CACHE */ if((error= rows_event_stmt_cleanup(rli, thd))) - slave_rows_error_report(ERROR_LEVEL, - thd->is_error() ? 0 : error, - rli, thd, table, - get_type_str(), - const_cast(rli)->get_rpl_log_name(), - (ulong) log_pos); + { + if (table) + slave_rows_error_report(ERROR_LEVEL, + thd->is_error() ? 0 : error, + rli, thd, table, + get_type_str(), + const_cast(rli)->get_rpl_log_name(), + (ulong) log_pos); + else + { + rli->report(ERROR_LEVEL, + thd->is_error() ? thd->get_stmt_da()->sql_errno() : error, + "Error in cleaning up after an event of type:%s; %s; the group" + " log file/position: %s %lu", get_type_str(), + thd->is_error() ? thd->get_stmt_da()->message() : "unexpected error", + const_cast(rli)->get_rpl_log_name(), + (ulong) log_pos); + } + } /* We are at end of the statement (STMT_END_F flag), lets clean the memory which was used from thd's mem_root now. This needs to be done only if we are here in SQL thread context. @@ -11610,6 +11669,11 @@ Rows_log_event::do_shall_skip(Relay_log_info *rli) static int rows_event_stmt_cleanup(Relay_log_info const *rli, THD * thd) { + DBUG_EXECUTE_IF("simulate_rows_event_cleanup_failure", + { + my_error(ER_ERROR_DURING_COMMIT, MYF(0), 1); + return (1); + }); int error; { /* @@ -11666,6 +11730,12 @@ static int rows_event_stmt_cleanup(Relay_log_info const *rli, THD * thd) thd->reset_current_stmt_binlog_format_row(); const_cast(rli)->cleanup_context(thd, 0); + + /* + Clean sql_command value + */ + thd->lex->sql_command= SQLCOM_END; + } return error; } @@ -12506,6 +12576,16 @@ Write_rows_log_event::do_before_row_operations(const Slave_reporting_capability if (get_flags(STMT_END_F)) status_var_increment(thd->status_var.com_stat[SQLCOM_INSERT]); + /* + Let storage engines treat this event as an INSERT command. + + Set 'sql_command' as SQLCOM_INSERT after the tables are locked. + When locking the tables, it should be SQLCOM_END. + THD::decide_binlog_format which is called from "lock tables" + assumes that row_events will have 'sql_command' as SQLCOM_END. + */ + thd->lex->sql_command= SQLCOM_INSERT; + /** todo: to introduce a property for the event (handler?) which forces applying the event in the replace (idempotent) fashion. @@ -13025,6 +13105,17 @@ Delete_rows_log_event::do_before_row_operations(const Slave_reporting_capability */ if (get_flags(STMT_END_F)) status_var_increment(thd->status_var.com_stat[SQLCOM_DELETE]); + + /* + Let storage engines treat this event as a DELETE command. + + Set 'sql_command' as SQLCOM_UPDATE after the tables are locked. + When locking the tables, it should be SQLCOM_END. + THD::decide_binlog_format which is called from "lock tables" + assumes that row_events will have 'sql_command' as SQLCOM_END. + */ + thd->lex->sql_command= SQLCOM_DELETE; + error= row_operations_scan_and_key_setup(); DBUG_RETURN(error); @@ -13134,6 +13225,17 @@ Update_rows_log_event::do_before_row_operations(const Slave_reporting_capability */ if (get_flags(STMT_END_F)) status_var_increment(thd->status_var.com_stat[SQLCOM_UPDATE]); + + /* + Let storage engines treat this event as an UPDATE command. + + Set 'sql_command' as SQLCOM_UPDATE after the tables are locked. + When locking the tables, it should be SQLCOM_END. + THD::decide_binlog_format which is called from "lock tables" + assumes that row_events will have 'sql_command' as SQLCOM_END. + */ + thd->lex->sql_command= SQLCOM_UPDATE; + error= row_operations_scan_and_key_setup(); DBUG_RETURN(error); diff --git a/mysql-wsrep-5.6/sql/log_event.h b/mysql-wsrep-5.6/sql/log_event.h index 86059035..d4884af6 100644 --- a/mysql-wsrep-5.6/sql/log_event.h +++ b/mysql-wsrep-5.6/sql/log_event.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -53,7 +53,9 @@ class String; typedef ulonglong sql_mode_t; typedef struct st_db_worker_hash_entry db_worker_hash_entry; - +#if defined(HAVE_REPLICATION) && !defined(MYSQL_CLIENT) +int ignored_error_code(int err_code); +#endif #define PREFIX_SQL_LOAD "SQL_LOAD-" /** @@ -1311,7 +1313,7 @@ public: } virtual bool write_data_header(IO_CACHE* file) { return 0; } - virtual bool write_data_body(IO_CACHE* file __attribute__((unused))) + virtual bool write_data_body(IO_CACHE* file MY_ATTRIBUTE((unused))) { return 0; } inline time_t get_time() { @@ -4520,7 +4522,7 @@ public: static bool binlog_row_logging_function(THD *thd, TABLE *table, bool is_transactional, const uchar *before_record - __attribute__((unused)), + MY_ATTRIBUTE((unused)), const uchar *after_record) { return thd->binlog_write_row(table, is_transactional, @@ -4660,7 +4662,7 @@ public: bool is_transactional, const uchar *before_record, const uchar *after_record - __attribute__((unused))) + MY_ATTRIBUTE((unused))) { return thd->binlog_delete_row(table, is_transactional, before_record, NULL); diff --git a/mysql-wsrep-5.6/sql/log_event_old.cc b/mysql-wsrep-5.6/sql/log_event_old.cc index d2be228b..49a14c00 100644 --- a/mysql-wsrep-5.6/sql/log_event_old.cc +++ b/mysql-wsrep-5.6/sql/log_event_old.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -126,16 +126,25 @@ Old_rows_log_event::do_apply_event(Old_rows_log_event *ev, const Relay_log_info /* When the open and locking succeeded, we check all tables to ensure that they still have the correct type. - - We can use a down cast here since we know that every table added - to the tables_to_lock is a RPL_TABLE_LIST. */ { - RPL_TABLE_LIST *ptr= rli->tables_to_lock; - for (uint i= 0 ; ptr&& (i< rli->tables_to_lock_count); - ptr= static_cast(ptr->next_global), i++) + TABLE_LIST *table_list_ptr= rli->tables_to_lock; + for (uint i=0 ; table_list_ptr&& (i< rli->tables_to_lock_count); + table_list_ptr= table_list_ptr->next_global, i++) { + /* + Please see comment in log_event.cc-Rows_log_event::do_apply_event() + function for the explanation of the below if condition + */ + if (table_list_ptr->parent_l) + continue; + /* + We can use a down cast here since we know that every table added + to the tables_to_lock is a RPL_TABLE_LIST(or child table which is + skipped above). + */ + RPL_TABLE_LIST *ptr=static_cast(table_list_ptr); DBUG_ASSERT(ptr->m_tabledef_valid); TABLE *conv_table; if (!ptr->m_tabledef.compatible_with(thd, const_cast(rli), @@ -169,7 +178,15 @@ Old_rows_log_event::do_apply_event(Old_rows_log_event *ev, const Relay_log_info */ TABLE_LIST *ptr= rli->tables_to_lock; for (uint i=0; ptr && (i < rli->tables_to_lock_count); ptr= ptr->next_global, i++) + { + /* + Please see comment in log_event.cc-Rows_log_event::do_apply_event() + function for the explanation of the below if condition + */ + if (ptr->parent_l) + continue; const_cast(rli)->m_table_map.set_table(ptr->table_id, ptr->table); + } #ifdef HAVE_QUERY_CACHE query_cache.invalidate_locked_for_write(rli->tables_to_lock); #endif @@ -1538,16 +1555,25 @@ int Old_rows_log_event::do_apply_event(Relay_log_info const *rli) /* When the open and locking succeeded, we check all tables to ensure that they still have the correct type. - - We can use a down cast here since we know that every table added - to the tables_to_lock is a RPL_TABLE_LIST. */ { - RPL_TABLE_LIST *ptr= rli->tables_to_lock; - for (uint i= 0 ; ptr&& (i< rli->tables_to_lock_count); - ptr= static_cast(ptr->next_global), i++) + TABLE_LIST *table_list_ptr= rli->tables_to_lock; + for (uint i=0; table_list_ptr&& (i< rli->tables_to_lock_count); + table_list_ptr= static_cast(table_list_ptr->next_global), i++) { + /* + Please see comment in log_event.cc-Rows_log_event::do_apply_event() + function for the explanation of the below if condition + */ + if (table_list_ptr->parent_l) + continue; + /* + We can use a down cast here since we know that every table added + to the tables_to_lock is a RPL_TABLE_LIST (or child table which is + skipped above). + */ + RPL_TABLE_LIST *ptr=static_cast(table_list_ptr); TABLE *conv_table; if (ptr->m_tabledef.compatible_with(thd, const_cast(rli), ptr->table, &conv_table)) diff --git a/mysql-wsrep-5.6/sql/log_event_old.h b/mysql-wsrep-5.6/sql/log_event_old.h index e6f3cc02..3995c811 100644 --- a/mysql-wsrep-5.6/sql/log_event_old.h +++ b/mysql-wsrep-5.6/sql/log_event_old.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -369,7 +369,7 @@ public: static bool binlog_row_logging_function(THD *thd, TABLE *table, bool is_transactional, const uchar *before_record - __attribute__((unused)), + MY_ATTRIBUTE((unused)), const uchar *after_record) { return thd->binlog_write_row(table, is_transactional, @@ -518,7 +518,7 @@ public: bool is_transactional, const uchar *before_record, const uchar *after_record - __attribute__((unused))) + MY_ATTRIBUTE((unused))) { return thd->binlog_delete_row(table, is_transactional, before_record, NULL); diff --git a/mysql-wsrep-5.6/sql/mdl.cc b/mysql-wsrep-5.6/sql/mdl.cc index 6f3d730e..8e622166 100644 --- a/mysql-wsrep-5.6/sql/mdl.cc +++ b/mysql-wsrep-5.6/sql/mdl.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -107,7 +107,7 @@ void MDL_key::init_psi_keys() { int i; int count; - PSI_stage_info *info __attribute__((unused)); + PSI_stage_info *info MY_ATTRIBUTE((unused)); count= array_elements(MDL_key::m_namespace_to_wait_state_name); for (i= 0; ikey.length(); diff --git a/mysql-wsrep-5.6/sql/mf_iocache.cc b/mysql-wsrep-5.6/sql/mf_iocache.cc index 5645580a..aeb58c5c 100644 --- a/mysql-wsrep-5.6/sql/mf_iocache.cc +++ b/mysql-wsrep-5.6/sql/mf_iocache.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -49,7 +49,7 @@ extern "C" { int _my_b_net_read(register IO_CACHE *info, uchar *Buffer, - size_t Count __attribute__((unused))) + size_t Count MY_ATTRIBUTE((unused))) { ulong read_length; NET *net= &(current_thd)->net; diff --git a/mysql-wsrep-5.6/sql/mysqld.cc b/mysql-wsrep-5.6/sql/mysqld.cc index aaa60ad9..7a8c9ed4 100644 --- a/mysql-wsrep-5.6/sql/mysqld.cc +++ b/mysql-wsrep-5.6/sql/mysqld.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify @@ -1332,7 +1332,7 @@ static void close_server_sock(); static void clean_up_mutexes(void); static void wait_for_signal_thread_to_end(void); static void create_pid_file(); -static void mysqld_exit(int exit_code) __attribute__((noreturn)); +static void mysqld_exit(int exit_code) MY_ATTRIBUTE((noreturn)); #endif static void delete_pid_file(myf flags); static void end_ssl(); @@ -1782,7 +1782,7 @@ static void __cdecl kill_server(int sig_ptr) #if defined(USE_ONE_SIGNAL_HAND) -pthread_handler_t kill_server_thread(void *arg __attribute__((unused))) +pthread_handler_t kill_server_thread(void *arg MY_ATTRIBUTE((unused))) { my_thread_init(); // Initialize new thread kill_server(0); @@ -2727,7 +2727,7 @@ void close_connection(THD *thd, uint sql_errno) /** Called when a thread is aborted. */ /* ARGSUSED */ -extern "C" sig_handler end_thread_signal(int sig __attribute__((unused))) +extern "C" sig_handler end_thread_signal(int sig MY_ATTRIBUTE((unused))) { THD *thd=current_thd; my_safe_printf_stderr("end_thread_signal %p", thd); @@ -2939,7 +2939,7 @@ void kill_blocked_pthreads() @todo One should have to fix that thr_alarm know about this thread too. */ -extern "C" sig_handler abort_thread(int sig __attribute__((unused))) +extern "C" sig_handler abort_thread(int sig MY_ATTRIBUTE((unused))) { THD *thd=current_thd; DBUG_ENTER("abort_thread"); @@ -3250,7 +3250,7 @@ static void start_signal_handler(void) /** This threads handles all signals and alarms. */ /* ARGSUSED */ -pthread_handler_t signal_hand(void *arg __attribute__((unused))) +pthread_handler_t signal_hand(void *arg MY_ATTRIBUTE((unused))) { sigset_t set; int sig; @@ -4237,6 +4237,22 @@ int init_common_variables() if (!opt_slow_logname || !*opt_slow_logname) opt_slow_logname= make_default_log_name(slow_logname_path, "-slow.log"); + if (opt_logname && + !is_valid_log_name(opt_logname, strlen(opt_logname))) + { + sql_print_error("Invalid value for --general_log_file: %s", + opt_logname); + return 1; + } + + if (opt_slow_logname && + !is_valid_log_name(opt_slow_logname, strlen(opt_slow_logname))) + { + sql_print_error("Invalid value for --slow_query_log_file: %s", + opt_slow_logname); + return 1; + } + #if defined(ENABLED_DEBUG_SYNC) /* Initialize the debug sync facility. See debug_sync.cc. */ if (debug_sync_init()) @@ -4671,7 +4687,7 @@ static int init_server_auto_options() /* load_defaults require argv[0] is not null */ char **argv= &name; int argc= 1; - if (!check_file_permissions(fname)) + if (!check_file_permissions(fname, false)) { /* Found a world writable file hence removing it as it is dangerous to write @@ -4702,6 +4718,24 @@ static int init_server_auto_options() sql_print_error("The server_uuid stored in auto.cnf file is not a valid UUID."); goto err; } + /* + Uuid::is_valid() cannot do strict check on the length as it will be + called by GTID::is_valid() as well (GTID = UUID:seq_no). We should + explicitly add the *length check* here in this function. + + If UUID length is less than '36' (UUID_LENGTH), that error case would have + got caught in above is_valid check. The below check is to make sure that + length is not greater than UUID_LENGTH i.e., there are no extra characters + (Garbage) at the end of the valid UUID. + */ + if (strlen(uuid) > UUID_LENGTH) + { + sql_print_error("Garbage characters found at the end of the server_uuid " + "value in auto.cnf file. It should be of length '%d' " + "(UUID_LENGTH). Clear it and restart the server. ", + UUID_LENGTH); + goto err; + } strcpy(server_uuid, uuid); } else @@ -4827,9 +4861,10 @@ static int init_server_components() proc_info_hook= set_thd_stage_info; -#ifdef WITH_PERFSCHEMA_STORAGE_ENGINE /* - Parsing the performance schema command line option may have reported + Parsing the performance schema command line option and + adjusting the values for options such as "open_files_limit", + "max_connections", and "table_cache_size" may have reported warnings/information messages. Now that the logger is finally available, and redirected to the proper file when the --log--error option is used, @@ -4837,7 +4872,6 @@ static int init_server_components() */ buffered_logs.print(); buffered_logs.cleanup(); -#endif /* WITH_PERFSCHEMA_STORAGE_ENGINE */ /* Now that the logger is available, redirect character set @@ -5189,8 +5223,14 @@ a file name for --log-bin-index option", opt_binlog_index_name); if (WSREP_ON) tc_log= &tc_log_dummy; else -#endif /* WITH_WSREP */ + /* + * wsrep hton grows total_ha_2pc count to 2, even in native mysql mode. + * Have to force using tc_log_dummy here, as tc_log_mmap segfaults + */ + tc_log= &tc_log_dummy; +#else tc_log= &tc_log_mmap; +#endif /* WITH_WSREP */ } else tc_log= &tc_log_dummy; @@ -9094,7 +9134,7 @@ static int mysql_init_variables(void) (void) strmake(mysql_home, tmpenv, sizeof(mysql_home)-1); #endif #ifdef WITH_WSREP - if (WSREP_ON && wsrep_init_vars()) + if (wsrep_init_vars()) return 1; #endif return 0; @@ -9102,7 +9142,7 @@ static int mysql_init_variables(void) my_bool mysqld_get_one_option(int optid, - const struct my_option *opt __attribute__((unused)), + const struct my_option *opt MY_ATTRIBUTE((unused)), char *argument) { switch(optid) { @@ -9118,6 +9158,7 @@ mysqld_get_one_option(int optid, break; case 'b': strmake(mysql_home,argument,sizeof(mysql_home)-1); + mysql_home_ptr= mysql_home; break; case 'C': if (default_collation_name == compiled_default_collation_name) diff --git a/mysql-wsrep-5.6/sql/mysqld.h b/mysql-wsrep-5.6/sql/mysqld.h index 88daae7d..cb58e689 100644 --- a/mysql-wsrep-5.6/sql/mysqld.h +++ b/mysql-wsrep-5.6/sql/mysqld.h @@ -718,7 +718,7 @@ enum enum_query_type it evaluates to. Should be used for error messages, so that they don't reveal values. */ - QT_NO_DATA_EXPANSION= (1 << 9), + QT_NO_DATA_EXPANSION= (1 << 9) }; /* query_id */ @@ -726,10 +726,10 @@ typedef int64 query_id_t; extern query_id_t global_query_id; extern my_atomic_rwlock_t global_query_id_lock; -void unireg_end(void) __attribute__((noreturn)); +void unireg_end(void) MY_ATTRIBUTE((noreturn)); /* increment query_id and return it. */ -inline __attribute__((warn_unused_result)) query_id_t next_query_id() +inline MY_ATTRIBUTE((warn_unused_result)) query_id_t next_query_id() { query_id_t id; my_atomic_rwlock_wrlock(&global_query_id_lock); @@ -742,7 +742,7 @@ inline __attribute__((warn_unused_result)) query_id_t next_query_id() TODO: Replace this with an inline function. */ #ifndef EMBEDDED_LIBRARY -extern "C" void unireg_abort(int exit_code) __attribute__((noreturn)); +extern "C" void unireg_abort(int exit_code) MY_ATTRIBUTE((noreturn)); #else extern "C" void unireg_clear(int exit_code); #define unireg_abort(exit_code) do { unireg_clear(exit_code); DBUG_RETURN(exit_code); } while(0) diff --git a/mysql-wsrep-5.6/sql/net_serv.cc b/mysql-wsrep-5.6/sql/net_serv.cc index 06a5bcb1..53c3034c 100644 --- a/mysql-wsrep-5.6/sql/net_serv.cc +++ b/mysql-wsrep-5.6/sql/net_serv.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -191,7 +191,7 @@ my_bool net_realloc(NET *net, size_t length) */ void net_clear(NET *net, - my_bool check_buffer __attribute__((unused))) + my_bool check_buffer MY_ATTRIBUTE((unused))) { DBUG_ENTER("net_clear"); @@ -238,21 +238,19 @@ my_bool net_flush(NET *net) */ static my_bool -net_should_retry(NET *net, uint *retry_count __attribute__((unused))) +net_should_retry(NET *net, uint *retry_count MY_ATTRIBUTE((unused))) { my_bool retry; -#if !defined(MYSQL_SERVER) && defined(THREAD_SAFE_CLIENT) +#ifndef MYSQL_SERVER /* - In the thread safe client library, interrupted I/O operations - are always retried. Otherwise, its either a timeout or a - unrecoverable error. + In the client library, interrupted I/O operations are always retried. + Otherwise, it's either a timeout or an unrecoverable error. */ retry= vio_should_retry(net->vio); #else /* - In the non-thread safe client library, or in the server, - interrupted I/O operations are retried up to a limit. + In the server, interrupted I/O operations are retried up to a limit. In this scenario, pthread_kill can be used to wake up (interrupt) threads waiting for I/O. */ @@ -1047,3 +1045,17 @@ void my_net_set_write_timeout(NET *net, uint timeout) DBUG_VOID_RETURN; } +#if defined(EXPORT_SYMVER16) +#ifndef EMBEDDED_LIBRARY +C_MODE_START + +// Hack to provide Fedora symbols + +my_bool mysql_net_realloc(NET *net, size_t length) +{ + return net_realloc(net, length); +} + +C_MODE_END +#endif +#endif // EXPORT_SYMVER16 diff --git a/mysql-wsrep-5.6/sql/opt_range.cc b/mysql-wsrep-5.6/sql/opt_range.cc index 95dd5370..9f4ecbe2 100644 --- a/mysql-wsrep-5.6/sql/opt_range.cc +++ b/mysql-wsrep-5.6/sql/opt_range.cc @@ -13030,9 +13030,16 @@ int QUICK_GROUP_MIN_MAX_SELECT::reset(void) } if (quick_prefix_select && quick_prefix_select->reset()) DBUG_RETURN(1); + result= head->file->ha_index_last(record); - if (result == HA_ERR_END_OF_FILE) - DBUG_RETURN(0); + if (result != 0) + { + if (result == HA_ERR_END_OF_FILE) + DBUG_RETURN(0); + else + DBUG_RETURN(result); + } + /* Save the prefix of the last group. */ key_copy(last_prefix, record, index_info, group_prefix_len); diff --git a/mysql-wsrep-5.6/sql/partition_info.cc b/mysql-wsrep-5.6/sql/partition_info.cc index c3a970d7..7859b11c 100644 --- a/mysql-wsrep-5.6/sql/partition_info.cc +++ b/mysql-wsrep-5.6/sql/partition_info.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -945,7 +945,7 @@ partition_element *partition_info::get_part_elem(const char *partition_name, */ static const char *get_part_name_from_elem(const char *name, size_t *length, - my_bool not_used __attribute__((unused))) + my_bool not_used MY_ATTRIBUTE((unused))) { *length= strlen(name); return name; diff --git a/mysql-wsrep-5.6/sql/password.c b/mysql-wsrep-5.6/sql/password.c index 4f4c8bc4..d8d2ca09 100644 --- a/mysql-wsrep-5.6/sql/password.c +++ b/mysql-wsrep-5.6/sql/password.c @@ -1,5 +1,5 @@ /* - Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -584,3 +584,18 @@ void make_password_from_salt(char *to, const uint8 *hash_stage2) octet2hex(to, (const char*) hash_stage2, SHA1_HASH_SIZE); } +#if defined(EXPORT_SYMVER16) +#ifndef EMBEDDED_LIBRARY + +// Hack to provide both libmysqlclient_16 and libmysqlclient_18 symbol versions + +#define SYM_16(_exportedsym) __asm__(".symver symver16_" #_exportedsym "," #_exportedsym "@libmysqlclient_16") + +void symver16_my_make_scrambled_password(char *to, const char *password, size_t pass_len) +{ + my_make_scrambled_password(to, password, pass_len); +} +SYM_16(my_make_scrambled_password); + +#endif +#endif /* EXPORT_SYMVER16 */ diff --git a/mysql-wsrep-5.6/sql/rpl_filter.cc b/mysql-wsrep-5.6/sql/rpl_filter.cc index 22cdf906..07b4926f 100644 --- a/mysql-wsrep-5.6/sql/rpl_filter.cc +++ b/mysql-wsrep-5.6/sql/rpl_filter.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -508,7 +508,7 @@ extern "C" uchar *get_table_key(const uchar *, size_t *, my_bool); extern "C" void free_table_ent(void* a); uchar *get_table_key(const uchar* a, size_t *len, - my_bool __attribute__((unused))) + my_bool MY_ATTRIBUTE((unused))) { TABLE_RULE_ENT *e= (TABLE_RULE_ENT *) a; diff --git a/mysql-wsrep-5.6/sql/rpl_info_dummy.cc b/mysql-wsrep-5.6/sql/rpl_info_dummy.cc index a8d0caf4..f95a39f1 100644 --- a/mysql-wsrep-5.6/sql/rpl_info_dummy.cc +++ b/mysql-wsrep-5.6/sql/rpl_info_dummy.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -21,7 +21,7 @@ Rpl_info_dummy::Rpl_info_dummy(const int nparam) { } -int Rpl_info_dummy::do_init_info(uint instance __attribute__((unused))) +int Rpl_info_dummy::do_init_info(uint instance MY_ATTRIBUTE((unused))) { return 0; } @@ -51,13 +51,13 @@ enum_return_check Rpl_info_dummy::do_check_info() return REPOSITORY_DOES_NOT_EXIST; } -enum_return_check Rpl_info_dummy::do_check_info(uint instance __attribute__((unused))) +enum_return_check Rpl_info_dummy::do_check_info(uint instance MY_ATTRIBUTE((unused))) { DBUG_ASSERT(!abort); return REPOSITORY_DOES_NOT_EXIST; } -int Rpl_info_dummy::do_flush_info(const bool force __attribute__((unused))) +int Rpl_info_dummy::do_flush_info(const bool force MY_ATTRIBUTE((unused))) { DBUG_ASSERT(!abort); return 0; @@ -85,105 +85,105 @@ uint Rpl_info_dummy::do_get_rpl_info_type() return INFO_REPOSITORY_DUMMY; } -bool Rpl_info_dummy::do_set_info(const int pos __attribute__((unused)), - const char *value __attribute__((unused))) +bool Rpl_info_dummy::do_set_info(const int pos MY_ATTRIBUTE((unused)), + const char *value MY_ATTRIBUTE((unused))) { DBUG_ASSERT(!abort); return FALSE; } -bool Rpl_info_dummy::do_set_info(const int pos __attribute__((unused)), - const uchar *value __attribute__((unused)), - const size_t size __attribute__((unused))) +bool Rpl_info_dummy::do_set_info(const int pos MY_ATTRIBUTE((unused)), + const uchar *value MY_ATTRIBUTE((unused)), + const size_t size MY_ATTRIBUTE((unused))) { DBUG_ASSERT(!abort); return FALSE; } -bool Rpl_info_dummy::do_set_info(const int pos __attribute__((unused)), - const ulong value __attribute__((unused))) +bool Rpl_info_dummy::do_set_info(const int pos MY_ATTRIBUTE((unused)), + const ulong value MY_ATTRIBUTE((unused))) { DBUG_ASSERT(!abort); return FALSE; } -bool Rpl_info_dummy::do_set_info(const int pos __attribute__((unused)), - const int value __attribute__((unused))) +bool Rpl_info_dummy::do_set_info(const int pos MY_ATTRIBUTE((unused)), + const int value MY_ATTRIBUTE((unused))) { DBUG_ASSERT(!abort); return FALSE; } -bool Rpl_info_dummy::do_set_info(const int pos __attribute__((unused)), - const float value __attribute__((unused))) +bool Rpl_info_dummy::do_set_info(const int pos MY_ATTRIBUTE((unused)), + const float value MY_ATTRIBUTE((unused))) { DBUG_ASSERT(!abort); return FALSE; } -bool Rpl_info_dummy::do_set_info(const int pos __attribute__((unused)), - const Dynamic_ids *value __attribute__((unused))) +bool Rpl_info_dummy::do_set_info(const int pos MY_ATTRIBUTE((unused)), + const Dynamic_ids *value MY_ATTRIBUTE((unused))) { DBUG_ASSERT(!abort); return FALSE; } -bool Rpl_info_dummy::do_get_info(const int pos __attribute__((unused)), - char *value __attribute__((unused)), - const size_t size __attribute__((unused)), - const char *default_value __attribute__((unused))) +bool Rpl_info_dummy::do_get_info(const int pos MY_ATTRIBUTE((unused)), + char *value MY_ATTRIBUTE((unused)), + const size_t size MY_ATTRIBUTE((unused)), + const char *default_value MY_ATTRIBUTE((unused))) { DBUG_ASSERT(!abort); return FALSE; } -bool Rpl_info_dummy::do_get_info(const int pos __attribute__((unused)), - uchar *value __attribute__((unused)), - const size_t size __attribute__((unused)), - const uchar *default_value __attribute__((unused))) +bool Rpl_info_dummy::do_get_info(const int pos MY_ATTRIBUTE((unused)), + uchar *value MY_ATTRIBUTE((unused)), + const size_t size MY_ATTRIBUTE((unused)), + const uchar *default_value MY_ATTRIBUTE((unused))) { DBUG_ASSERT(!abort); return FALSE; } -bool Rpl_info_dummy::do_get_info(const int pos __attribute__((unused)), - ulong *value __attribute__((unused)), - const ulong default_value __attribute__((unused))) +bool Rpl_info_dummy::do_get_info(const int pos MY_ATTRIBUTE((unused)), + ulong *value MY_ATTRIBUTE((unused)), + const ulong default_value MY_ATTRIBUTE((unused))) { DBUG_ASSERT(!abort); return FALSE; } -bool Rpl_info_dummy::do_get_info(const int pos __attribute__((unused)), - int *value __attribute__((unused)), - const int default_value __attribute__((unused))) +bool Rpl_info_dummy::do_get_info(const int pos MY_ATTRIBUTE((unused)), + int *value MY_ATTRIBUTE((unused)), + const int default_value MY_ATTRIBUTE((unused))) { DBUG_ASSERT(!abort); return FALSE; } -bool Rpl_info_dummy::do_get_info(const int pos __attribute__((unused)), - float *value __attribute__((unused)), - const float default_value __attribute__((unused))) +bool Rpl_info_dummy::do_get_info(const int pos MY_ATTRIBUTE((unused)), + float *value MY_ATTRIBUTE((unused)), + const float default_value MY_ATTRIBUTE((unused))) { DBUG_ASSERT(!abort); return FALSE; } -bool Rpl_info_dummy::do_get_info(const int pos __attribute__((unused)), - Dynamic_ids *value __attribute__((unused)), - const Dynamic_ids *default_value __attribute__((unused))) +bool Rpl_info_dummy::do_get_info(const int pos MY_ATTRIBUTE((unused)), + Dynamic_ids *value MY_ATTRIBUTE((unused)), + const Dynamic_ids *default_value MY_ATTRIBUTE((unused))) { DBUG_ASSERT(!abort); diff --git a/mysql-wsrep-5.6/sql/rpl_info_file.cc b/mysql-wsrep-5.6/sql/rpl_info_file.cc index 1f434e61..24b63bf8 100644 --- a/mysql-wsrep-5.6/sql/rpl_info_file.cc +++ b/mysql-wsrep-5.6/sql/rpl_info_file.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -438,7 +438,7 @@ bool Rpl_info_file::do_get_info(const int pos, float *value, } bool Rpl_info_file::do_get_info(const int pos, Dynamic_ids *value, - const Dynamic_ids *default_value __attribute__((unused))) + const Dynamic_ids *default_value MY_ATTRIBUTE((unused))) { /* Static buffer to use most of the times. However, if it is not big diff --git a/mysql-wsrep-5.6/sql/rpl_info_table.cc b/mysql-wsrep-5.6/sql/rpl_info_table.cc index 000c4cbe..28c8b2ce 100644 --- a/mysql-wsrep-5.6/sql/rpl_info_table.cc +++ b/mysql-wsrep-5.6/sql/rpl_info_table.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -600,7 +600,7 @@ bool Rpl_info_table::do_get_info(const int pos, char *value, const size_t size, } bool Rpl_info_table::do_get_info(const int pos, uchar *value, const size_t size, - const uchar *default_value __attribute__((unused))) + const uchar *default_value MY_ATTRIBUTE((unused))) { if (field_values->value[pos].length() == size) return (!memcpy((char *) value, (char *) @@ -661,7 +661,7 @@ bool Rpl_info_table::do_get_info(const int pos, float *value, } bool Rpl_info_table::do_get_info(const int pos, Dynamic_ids *value, - const Dynamic_ids *default_value __attribute__((unused))) + const Dynamic_ids *default_value MY_ATTRIBUTE((unused))) { if (value->unpack_dynamic_ids(field_values->value[pos].c_ptr_safe())) return TRUE; diff --git a/mysql-wsrep-5.6/sql/rpl_master.cc b/mysql-wsrep-5.6/sql/rpl_master.cc index fa5abbf0..503ad426 100644 --- a/mysql-wsrep-5.6/sql/rpl_master.cc +++ b/mysql-wsrep-5.6/sql/rpl_master.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -62,7 +62,7 @@ extern TYPELIB binlog_checksum_typelib; extern "C" uint32 *slave_list_key(SLAVE_INFO* si, size_t *len, - my_bool not_used __attribute__((unused))) + my_bool not_used MY_ATTRIBUTE((unused))) { *len = 4; return &si->server_id; @@ -738,7 +738,6 @@ bool com_binlog_dump(THD *thd, char *packet, uint packet_length) { DBUG_ENTER("com_binlog_dump"); ulong pos; - String slave_uuid; ushort flags= 0; const uchar* packet_position= (uchar *) packet; uint packet_bytes_todo= packet_length; @@ -759,8 +758,7 @@ bool com_binlog_dump(THD *thd, char *packet, uint packet_length) DBUG_PRINT("info", ("pos=%lu flags=%d server_id=%d", pos, flags, thd->server_id)); - get_slave_uuid(thd, &slave_uuid); - kill_zombie_dump_threads(&slave_uuid); + kill_zombie_dump_threads(thd); general_log_print(thd, thd->get_command(), "Log: '%s' Pos: %ld", packet + 10, (long) pos); @@ -783,7 +781,6 @@ bool com_binlog_dump_gtid(THD *thd, char *packet, uint packet_length) Before going GA, we need to make this protocol extensible without breaking compatitibilty. /Alfranio. */ - String slave_uuid; ushort flags= 0; uint32 data_size= 0; uint64 pos= 0; @@ -815,8 +812,7 @@ bool com_binlog_dump_gtid(THD *thd, char *packet, uint packet_length) DBUG_PRINT("info", ("Slave %d requested to read %s at position %llu gtid set " "'%s'.", thd->server_id, name, pos, gtid_string)); - get_slave_uuid(thd, &slave_uuid); - kill_zombie_dump_threads(&slave_uuid); + kill_zombie_dump_threads(thd); general_log_print(thd, thd->get_command(), "Log: '%s' Pos: %llu GTIDs: '%s'", name, pos, gtid_string); my_free(gtid_string); @@ -888,7 +884,7 @@ void mysql_binlog_send(THD* thd, char* log_ident, my_off_t pos, Diagnostics_area temp_da; Diagnostics_area *saved_da= thd->get_stmt_da(); thd->set_stmt_da(&temp_da); - bool was_killed_by_duplicate_slave_uuid= false; + bool was_killed_by_duplicate_slave_id= false; DBUG_ENTER("mysql_binlog_send"); DBUG_PRINT("enter",("log_ident: '%s' pos: %ld", log_ident, (long) pos)); @@ -1960,11 +1956,11 @@ end: reconnect anymore. */ mysql_mutex_lock(&thd->LOCK_thd_data); - was_killed_by_duplicate_slave_uuid= thd->duplicate_slave_uuid; + was_killed_by_duplicate_slave_id= thd->duplicate_slave_id; mysql_mutex_unlock(&thd->LOCK_thd_data); - if (was_killed_by_duplicate_slave_uuid) + if (was_killed_by_duplicate_slave_id) { - errmsg= "A slave with the same server_uuid as this slave " + errmsg= "A slave with the same server_uuid/server_id as this slave " "has connected to the master"; my_errno= ER_MASTER_FATAL_ERROR_READING_BINLOG; goto err; @@ -2056,41 +2052,58 @@ String *get_slave_uuid(THD *thd, String *value) /* Kill all Binlog_dump threads which previously talked to the same slave - ("same" means with the same server id). Indeed, if the slave stops, if the + ("same" means with the same UUID(for slave versions >= 5.6) or same server id + (for slave versions < 5.6). Indeed, if the slave stops, if the Binlog_dump thread is waiting (mysql_cond_wait) for binlog update, then it will keep existing until a query is written to the binlog. If the master is idle, then this could last long, and if the slave reconnects, we could have 2 Binlog_dump threads in SHOW PROCESSLIST, until a query is written to the binlog. To avoid this, when the slave reconnects and sends COM_BINLOG_DUMP, - the master kills any existing thread with the slave's server id (if this id is + the master kills any existing thread with the slave's UUID/server id (if this id is not zero; it will be true for real slaves, but false for mysqlbinlog when it sends COM_BINLOG_DUMP to get a remote binlog dump). SYNOPSIS kill_zombie_dump_threads() - slave_uuid the slave's UUID + @param thd newly connected dump thread object */ - -void kill_zombie_dump_threads(String *slave_uuid) +void kill_zombie_dump_threads(THD *thd) { - if (slave_uuid->length() == 0) + String slave_uuid; + get_slave_uuid(thd, &slave_uuid); + if (slave_uuid.length() == 0 && thd->server_id == 0) return; - DBUG_ASSERT(slave_uuid->length() == UUID_LENGTH); mysql_mutex_lock(&LOCK_thread_count); THD *tmp= NULL; Thread_iterator it= global_thread_list_begin(); Thread_iterator end= global_thread_list_end(); + bool is_zombie_thread= false; for (; it != end; ++it) { - if ((*it) != current_thd && ((*it)->get_command() == COM_BINLOG_DUMP || - (*it)->get_command() == COM_BINLOG_DUMP_GTID)) + if ((*it) != thd && ((*it)->get_command() == COM_BINLOG_DUMP || + (*it)->get_command() == COM_BINLOG_DUMP_GTID)) { String tmp_uuid; - if (get_slave_uuid((*it), &tmp_uuid) != NULL && - !strncmp(slave_uuid->c_ptr(), tmp_uuid.c_ptr(), UUID_LENGTH)) + get_slave_uuid((*it), &tmp_uuid); + if (slave_uuid.length()) + { + is_zombie_thread= (tmp_uuid.length() && + !strncmp(slave_uuid.c_ptr(), + tmp_uuid.c_ptr(), UUID_LENGTH)); + } + else + { + /* + Check if it is a 5.5 slave's dump thread i.e., server_id should be + same && dump thread should not contain 'UUID'. + */ + is_zombie_thread= (((*it)->server_id == thd->server_id) && + !tmp_uuid.length()); + } + if (is_zombie_thread) { tmp= *it; mysql_mutex_lock(&tmp->LOCK_thd_data); // Lock from delete @@ -2107,17 +2120,30 @@ void kill_zombie_dump_threads(String *slave_uuid) again. We just to do kill the thread ourselves. */ if (log_warnings > 1) - sql_print_information("While initializing dump thread for slave with " - "UUID <%s>, found a zombie dump thread with " - "the same UUID. Master is killing the zombie dump " - "thread(%lu).", slave_uuid->c_ptr(), tmp->thread_id); - tmp->duplicate_slave_uuid= true; + { + if (slave_uuid.length()) + { + sql_print_information("While initializing dump thread for slave with " + "UUID <%s>, found a zombie dump thread with the " + "same UUID. Master is killing the zombie dump " + "thread(%lu).", slave_uuid.c_ptr(), + tmp->thread_id); + } + else + { + sql_print_information("While initializing dump thread for slave with " + "server_id <%u>, found a zombie dump thread with the " + "same server_id. Master is killing the zombie dump " + "thread(%lu).", thd->server_id, + tmp->thread_id); + } + } + tmp->duplicate_slave_id= true; tmp->awake(THD::KILL_QUERY); mysql_mutex_unlock(&tmp->LOCK_thd_data); } } - /** Execute a RESET MASTER statement. diff --git a/mysql-wsrep-5.6/sql/rpl_master.h b/mysql-wsrep-5.6/sql/rpl_master.h index 94b76083..ff662b22 100644 --- a/mysql-wsrep-5.6/sql/rpl_master.h +++ b/mysql-wsrep-5.6/sql/rpl_master.h @@ -1,5 +1,5 @@ #ifndef RPL_MASTER_H_INCLUDED -/* Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -44,7 +44,7 @@ bool show_slave_hosts(THD* thd); String *get_slave_uuid(THD *thd, String *value); bool show_master_status(THD* thd); bool show_binlogs(THD* thd); -void kill_zombie_dump_threads(String *slave_uuid); +void kill_zombie_dump_threads(THD* thd); /** Process a COM_BINLOG_DUMP_GTID packet. diff --git a/mysql-wsrep-5.6/sql/rpl_mi.cc b/mysql-wsrep-5.6/sql/rpl_mi.cc index dba281f1..37c41e7d 100644 --- a/mysql-wsrep-5.6/sql/rpl_mi.cc +++ b/mysql-wsrep-5.6/sql/rpl_mi.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -542,7 +542,7 @@ bool Master_info::write_info(Rpl_info_handler *to) } bool Master_info::set_password(const char* password_arg, - int password_arg_size __attribute__((unused))) + int password_arg_size MY_ATTRIBUTE((unused))) { bool ret= true; DBUG_ENTER("Master_info::set_password"); diff --git a/mysql-wsrep-5.6/sql/rpl_rli.cc b/mysql-wsrep-5.6/sql/rpl_rli.cc index bf31ae45..08593b8f 100644 --- a/mysql-wsrep-5.6/sql/rpl_rli.cc +++ b/mysql-wsrep-5.6/sql/rpl_rli.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -77,7 +77,8 @@ Relay_log_info::Relay_log_info(bool is_slave_recovery cur_log_fd(-1), relay_log(&sync_relaylog_period), is_relay_log_recovery(is_slave_recovery), save_temporary_tables(0), - cur_log_old_open_count(0), group_relay_log_pos(0), event_relay_log_pos(0), + cur_log_old_open_count(0), error_on_rli_init_info(false), + group_relay_log_pos(0), event_relay_log_pos(0), group_master_log_pos(0), gtid_set(global_sid_map, global_sid_lock), log_space_total(0), ignore_log_space_limit(0), @@ -100,7 +101,7 @@ Relay_log_info::Relay_log_info(bool is_slave_recovery mts_group_status(MTS_NOT_IN_GROUP), reported_unsafe_warning(false), rli_description_event(NULL), sql_delay(0), sql_delay_end(0), m_flags(0), row_stmt_start_timestamp(0), - long_find_row_note_printed(false), error_on_rli_init_info(false) + long_find_row_note_printed(false) { DBUG_ENTER("Relay_log_info::Relay_log_info"); @@ -1343,9 +1344,7 @@ bool Relay_log_info::is_until_satisfied(THD *thd, Log_event *ev) break; case UNTIL_SQL_AFTER_MTS_GAPS: -#ifndef DBUG_OFF case UNTIL_DONE: -#endif /* TODO: this condition is actually post-execution or post-scheduling so the proper place to check it before SQL thread goes @@ -1360,9 +1359,7 @@ bool Relay_log_info::is_until_satisfied(THD *thd, Log_event *ev) "UNTIL SQL_AFTER_MTS_GAPS as it has " "processed all gap transactions left from " "the previous slave session."); -#ifndef DBUG_OFF until_condition= UNTIL_DONE; -#endif DBUG_RETURN(true); } else @@ -1920,7 +1917,11 @@ a file name for --relay-log-index option.", opt_relaylog_index_name); goto err; } - is_relay_log_recovery= FALSE; + /* + In case of MTS the recovery is deferred until the end of global_init_info. + */ + if (!mi->rli->mts_recovery_group_cnt) + is_relay_log_recovery= FALSE; DBUG_RETURN(error); err: diff --git a/mysql-wsrep-5.6/sql/rpl_rli.h b/mysql-wsrep-5.6/sql/rpl_rli.h index f6fdcac7..678d30e2 100644 --- a/mysql-wsrep-5.6/sql/rpl_rli.h +++ b/mysql-wsrep-5.6/sql/rpl_rli.h @@ -186,6 +186,13 @@ public: */ uint32 cur_log_old_open_count; + /* + If on init_info() call error_on_rli_init_info is true that means + that previous call to init_info() terminated with an error, RESET + SLAVE must be executed and the problem fixed manually. + */ + bool error_on_rli_init_info; + /* Let's call a group (of events) : - a transaction @@ -314,10 +321,7 @@ public: */ enum {UNTIL_NONE= 0, UNTIL_MASTER_POS, UNTIL_RELAY_POS, UNTIL_SQL_BEFORE_GTIDS, UNTIL_SQL_AFTER_GTIDS, - UNTIL_SQL_AFTER_MTS_GAPS -#ifndef DBUG_OFF - , UNTIL_DONE -#endif + UNTIL_SQL_AFTER_MTS_GAPS, UNTIL_DONE } until_condition; char until_log_name[FN_REFLEN]; @@ -979,12 +983,6 @@ private: time_t row_stmt_start_timestamp; bool long_find_row_note_printed; - /* - If on init_info() call error_on_rli_init_info is true that means - that previous call to init_info() terminated with an error, RESET - SLAVE must be executed and the problem fixed manually. - */ - bool error_on_rli_init_info; }; bool mysql_show_relaylog_events(THD* thd); diff --git a/mysql-wsrep-5.6/sql/rpl_rli_pdb.cc b/mysql-wsrep-5.6/sql/rpl_rli_pdb.cc index 7b03f1ba..2c2e1346 100644 --- a/mysql-wsrep-5.6/sql/rpl_rli_pdb.cc +++ b/mysql-wsrep-5.6/sql/rpl_rli_pdb.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -629,7 +629,7 @@ static mysql_cond_t slave_worker_hash_cond; extern "C" uchar *get_key(const uchar *record, size_t *length, - my_bool not_used __attribute__((unused))) + my_bool not_used MY_ATTRIBUTE((unused))) { DBUG_ENTER("get_key"); @@ -1490,7 +1490,7 @@ ulong Slave_committed_queue::move_queue_head(DYNAMIC_ARRAY *ws) Slave_worker *w_i; Slave_job_group *ptr_g, g; char grl_name[FN_REFLEN]; - ulong ind __attribute__((unused)); + ulong ind MY_ATTRIBUTE((unused)); #ifndef DBUG_OFF if (DBUG_EVALUATE_IF("check_slave_debug_group", 1, 0) && diff --git a/mysql-wsrep-5.6/sql/rpl_slave.cc b/mysql-wsrep-5.6/sql/rpl_slave.cc index 2fc70b8c..97a72f93 100644 --- a/mysql-wsrep-5.6/sql/rpl_slave.cc +++ b/mysql-wsrep-5.6/sql/rpl_slave.cc @@ -603,6 +603,51 @@ err: DBUG_RETURN(error); } +/* + Updates the master info based on the information stored in the + relay info and ignores relay logs previously retrieved by the IO + thread, which thus starts fetching again based on to the + master_log_pos and master_log_name. Eventually, the old + relay logs will be purged by the normal purge mechanism. + + When GTID's are enabled the "Retrieved GTID" set should be cleared + so that partial read events are discarded and they are + fetched once again + + @param mi pointer to Master_info instance +*/ +static void recover_relay_log(Master_info *mi) +{ + Relay_log_info *rli=mi->rli; + // Set Receiver Thread's positions as per the recovered Applier Thread. + mi->set_master_log_pos(max(BIN_LOG_HEADER_SIZE, + rli->get_group_master_log_pos())); + mi->set_master_log_name(rli->get_group_master_log_name()); + + sql_print_warning("Recovery from master pos %ld and file %s. " + "Previous relay log pos and relay log file had " + "been set to %lld, %s respectively.", + (ulong) mi->get_master_log_pos(), mi->get_master_log_name(), + rli->get_group_relay_log_pos(), rli->get_group_relay_log_name()); + + // Start with a fresh relay log. + rli->set_group_relay_log_name(rli->relay_log.get_log_fname()); + rli->set_event_relay_log_name(rli->relay_log.get_log_fname()); + rli->set_group_relay_log_pos(BIN_LOG_HEADER_SIZE); + rli->set_event_relay_log_pos(BIN_LOG_HEADER_SIZE); + /* + Clear the retrieved GTID set so that events that are written partially + will be fetched again. + */ + if (gtid_mode == GTID_MODE_ON) + { + global_sid_lock->wrlock(); + (const_cast(rli->get_gtid_set()))->clear(); + global_sid_lock->unlock(); + } +} + + /* Updates the master info based on the information stored in the relay info and ignores relay logs previously retrieved by the IO @@ -668,14 +713,7 @@ int init_recovery(Master_info* mi, const char** errmsg) rli->clear_mts_recovery_groups(); } else - { - error= 1; - sql_print_error("--relay-log-recovery cannot be executed when the slave " - "was stopped with an error or killed in MTS mode; " - "consider using RESET SLAVE or restart the server " - "with --relay-log-recovery = 0 followed by " - "START SLAVE UNTIL SQL_AFTER_MTS_GAPS"); - } + DBUG_RETURN(error); } } @@ -697,30 +735,112 @@ int init_recovery(Master_info* mi, const char** errmsg) if (error) DBUG_RETURN(error); } - mi->set_master_log_pos(max(BIN_LOG_HEADER_SIZE, - rli->get_group_master_log_pos())); - mi->set_master_log_name(rli->get_group_master_log_name()); + recover_relay_log(mi); + } + DBUG_RETURN(error); +} + +/* + Relay log recovery in the case of MTS, is handled by the following function. + Gaps in MTS execution are filled using implicit execution of + START SLAVE UNTIL SQL_AFTER_MTS_GAPS call. Once slave reaches a consistent + gapless state receiver thread's positions are initialized to applier thread's + positions and the old relay logs are discarded. This completes the recovery + process. - sql_print_warning("Recovery from master pos %ld and file %s. " - "Previous relay log pos and relay log file had " - "been set to %lld, %s respectively.", - (ulong) mi->get_master_log_pos(), mi->get_master_log_name(), - rli->get_group_relay_log_pos(), rli->get_group_relay_log_name()); + @param mi pointer to Master_info instance. - rli->set_group_relay_log_name(rli->relay_log.get_log_fname()); - rli->set_event_relay_log_name(rli->relay_log.get_log_fname()); - rli->set_group_relay_log_pos(BIN_LOG_HEADER_SIZE); - rli->set_event_relay_log_pos(BIN_LOG_HEADER_SIZE); + @retval 0 success + @retval 1 error +*/ +static inline int fill_mts_gaps_and_recover(Master_info* mi) +{ + DBUG_ENTER("fill_mts_gaps_and_recover"); + Relay_log_info *rli= mi->rli; + int recovery_error= 0; + rli->is_relay_log_recovery= FALSE; + rli->until_condition= Relay_log_info::UNTIL_SQL_AFTER_MTS_GAPS; + rli->opt_slave_parallel_workers= rli->recovery_parallel_workers; + sql_print_information("MTS recovery: starting coordinator thread to fill MTS " + "gaps."); + recovery_error= start_slave_thread( +#ifdef HAVE_PSI_INTERFACE + key_thread_slave_sql, +#endif + handle_slave_sql, &rli->run_lock, + &rli->run_lock, + &rli->start_cond, + &rli->slave_running, + &rli->slave_run_id, + mi); + + if (recovery_error) + { + sql_print_warning("MTS recovery: failed to start the coordinator " + "thread. Check the error log for additional" + " details."); + goto err; + } + mysql_mutex_lock(&rli->run_lock); + mysql_cond_wait(&rli->stop_cond, &rli->run_lock); + mysql_mutex_unlock(&rli->run_lock); + if (rli->until_condition != Relay_log_info::UNTIL_DONE) + { + sql_print_warning("MTS recovery: automatic recovery failed. Either the " + "slave server had stopped due to an error during an " + "earlier session or relay logs are corrupted." + "Fix the cause of the slave side error and restart the " + "slave server or consider using RESET SLAVE."); + goto err; } /* - Clear the retrieved GTID set so that events that are written partially - will be fetched again. - */ - global_sid_lock->wrlock(); - (const_cast(rli->get_gtid_set()))->clear(); - global_sid_lock->unlock(); - DBUG_RETURN(error); + We need a mutex while we are changing master info parameters to + keep other threads from reading bogus info + */ + mysql_mutex_lock(&mi->data_lock); + mysql_mutex_lock(&rli->data_lock); + recover_relay_log(mi); + + const char* msg; + if (rli->init_relay_log_pos(rli->get_group_relay_log_name(), + rli->get_group_relay_log_pos(), + false/*need_data_lock=false*/, + &msg, 0)) + { + char llbuf[22]; + sql_print_error("Failed to open the relay log '%s' (relay_log_pos %s).", + rli->get_group_relay_log_name(), + llstr(rli->get_group_relay_log_pos(), llbuf)); + + recovery_error=1; + mysql_mutex_unlock(&mi->data_lock); + mysql_mutex_unlock(&rli->data_lock); + goto err; + } + if (mi->flush_info(true) || rli->flush_info(true)) + { + recovery_error= 1; + mysql_mutex_unlock(&mi->data_lock); + mysql_mutex_unlock(&rli->data_lock); + goto err; + } + rli->inited=1; + rli->error_on_rli_init_info= false; + mysql_mutex_unlock(&mi->data_lock); + mysql_mutex_unlock(&rli->data_lock); + sql_print_information("MTS recovery: completed successfully.\n"); + DBUG_RETURN(recovery_error); +err: + /* + If recovery failed means we failed to initialize rli object in the case + of MTS. We should not allow the START SLAVE command to work as we do in + the case of STS. i.e if init_recovery call fails then we set inited=0. + */ + rli->end_info(); + rli->inited=0; + rli->error_on_rli_init_info= true; + DBUG_RETURN(recovery_error); } int global_init_info(Master_info* mi, bool ignore_if_no_info, int thread_mask) @@ -761,7 +881,10 @@ int global_init_info(Master_info* mi, bool ignore_if_no_info, int thread_mask) */ check_return= mi->check_info(); if (check_return == ERROR_CHECKING_REPOSITORY) + { + init_error= 1; goto end; + } if (!(ignore_if_no_info && check_return == REPOSITORY_DOES_NOT_EXIST)) { @@ -771,7 +894,10 @@ int global_init_info(Master_info* mi, bool ignore_if_no_info, int thread_mask) check_return= mi->rli->check_info(); if (check_return == ERROR_CHECKING_REPOSITORY) + { + init_error= 1; goto end; + } if (!(ignore_if_no_info && check_return == REPOSITORY_DOES_NOT_EXIST)) { if (((thread_mask & SLAVE_SQL) != 0 || !(mi->rli->inited)) @@ -793,7 +919,20 @@ end: mysql_mutex_unlock(&mi->rli->data_lock); mysql_mutex_unlock(&mi->data_lock); - DBUG_RETURN(check_return == ERROR_CHECKING_REPOSITORY || init_error); + + /* + Handling MTS Relay-log recovery after successful initialization of mi and + rli objects. + + MTS Relay-log recovery is handled by SSUG command. In order to start the + slave applier thread rli needs to be inited and mi->rli->data_lock should + be in released state. Hence we do the MTS recovery at this point of time + where both conditions are satisfied. + */ + if (!init_error && mi->rli->is_relay_log_recovery + && mi->rli->mts_recovery_group_cnt) + init_error= fill_mts_gaps_and_recover(mi); + DBUG_RETURN(init_error); } void end_info(Master_info* mi) @@ -1248,7 +1387,7 @@ terminate_slave_thread(THD *thd, while (*slave_running) // Should always be true { - int error __attribute__((unused)); + int error MY_ATTRIBUTE((unused)); DBUG_PRINT("loop", ("killing slave thread")); mysql_mutex_lock(&thd->LOCK_thd_data); @@ -1258,7 +1397,7 @@ terminate_slave_thread(THD *thd, EINVAL: invalid signal number (can't happen) ESRCH: thread already killed (can happen, should be ignored) */ - int err __attribute__((unused))= pthread_kill(thd->real_id, thr_client_alarm); + int err MY_ATTRIBUTE((unused))= pthread_kill(thd->real_id, thr_client_alarm); DBUG_ASSERT(err != EINVAL); #endif thd->awake(THD::NOT_KILLED); @@ -1709,6 +1848,10 @@ bool is_network_error(uint errorno) errorno == ER_CON_COUNT_ERROR || errorno == ER_SERVER_SHUTDOWN) return TRUE; +#ifdef WITH_WSREP + if (errorno == ER_UNKNOWN_COM_ERROR) + return TRUE; +#endif /* WITH_WSREP */ return FALSE; } @@ -1809,6 +1952,7 @@ int io_thread_init_commands(MYSQL *mysql, Master_info *mi) { char query[256]; int ret= 0; + DBUG_EXECUTE_IF("fake_5_5_version_slave", return ret;); sprintf(query, "SET @slave_uuid= '%s'", server_uuid); if (mysql_real_query(mysql, query, strlen(query)) @@ -3032,11 +3176,9 @@ bool show_slave_status(THD* thd, Master_info* mi) break; case Relay_log_info::UNTIL_SQL_AFTER_MTS_GAPS: until_type= "SQL_AFTER_MTS_GAPS"; -#ifndef DBUG_OFF case Relay_log_info::UNTIL_DONE: until_type= "DONE"; break; -#endif default: DBUG_ASSERT(0); } @@ -4104,10 +4246,9 @@ apply_event_and_update_pos(Log_event** ptr_ev, THD* thd, Relay_log_info* rli) rli->get_group_relay_log_pos(), rli->get_group_master_log_name(), rli->get_group_master_log_pos()); -#ifndef DBUG_OFF - /* + /* Few tests wait for UNTIL_SQL_AFTER_MTS_GAPS completion. - Due to exisiting convention the status won't change + Due to exisiting convention the status won't change prior to slave restarts. So making of UNTIL_SQL_AFTER_MTS_GAPS completion isdone here, and only in the debug build to make the test to catch the change @@ -4117,7 +4258,6 @@ apply_event_and_update_pos(Log_event** ptr_ev, THD* thd, Relay_log_info* rli) { rli->until_condition= Relay_log_info::UNTIL_DONE; } -#endif // reset the Worker tables to remove last slave session time info if ((error= rli->mts_finalize_recovery())) { @@ -4403,7 +4543,6 @@ static int exec_relay_log_event(THD* thd, Relay_log_info* rli) Hence deferred events wont be deleted here. They will be deleted in Deferred_log_events::rewind() funciton. */ - WSREP_DEBUG("apply_event_and_update_pos result: %d", exec_res); if (*ptr_ev) { DBUG_ASSERT(*ptr_ev == ev); // event remains to belong to Coordinator @@ -7691,9 +7830,9 @@ static IO_CACHE *reopen_relay_log(Relay_log_info *rli, const char **errmsg) /** Reads next event from the relay log. Should be called from the - slave IO thread. + slave SQL thread. - @param rli Relay_log_info structure for the slave IO thread. + @param rli Relay_log_info structure for the slave SQL thread. @return The event read, or NULL on error. If an error occurs, the error is reported through the sql_print_information() or @@ -7738,7 +7877,8 @@ static Log_event* next_event(Relay_log_info* rli) We just have a read only log that nobody else will be updating. */ bool hot_log; - if ((hot_log = (cur_log != &rli->cache_buf))) + if ((hot_log = (cur_log != &rli->cache_buf)) || + DBUG_EVALUATE_IF("force_sql_thread_error", 1, 0)) { DBUG_ASSERT(rli->cur_log_fd == -1); // foreign descriptor mysql_mutex_lock(log_lock); @@ -7747,7 +7887,8 @@ static Log_event* next_event(Relay_log_info* rli) Reading xxx_file_id is safe because the log will only be rotated when we hold relay_log.LOCK_log */ - if (rli->relay_log.get_open_count() != rli->cur_log_old_open_count) + if (rli->relay_log.get_open_count() != rli->cur_log_old_open_count && + DBUG_EVALUATE_IF("force_sql_thread_error", 0, 1)) { // The master has switched to a new log file; Reopen the old log file cur_log=reopen_relay_log(rli, &errmsg); @@ -7762,8 +7903,13 @@ static Log_event* next_event(Relay_log_info* rli) error during a write by the slave I/O thread may have closed it), we have to test it. */ - if (!my_b_inited(cur_log)) + if (!my_b_inited(cur_log) || + DBUG_EVALUATE_IF("force_sql_thread_error", 1, 0)) + { + if (hot_log) + mysql_mutex_unlock(log_lock); goto err; + } #ifndef DBUG_OFF { DBUG_PRINT("info", ("assertion skip %lu file pos %lu event relay log pos %lu file %s\n", @@ -8348,6 +8494,7 @@ bool rpl_master_has_bug(const Relay_log_info *rli, uint bug_id, bool report, (memcmp(fixed_in, master_ver, 3) > 0) && (pred == NULL || (*pred)(param))) { + enum loglevel report_level= INFORMATION_LEVEL; if (!report) return TRUE; // a short message for SHOW SLAVE STATUS (message length constraints) @@ -8356,25 +8503,35 @@ bool rpl_master_has_bug(const Relay_log_info *rli, uint bug_id, bool report, " so slave stops; check error log on slave" " for more info", MYF(0), bug_id); // a verbose message for the error log - rli->report(ERROR_LEVEL, ER_UNKNOWN_ERROR, - "According to the master's version ('%s')," - " it is probable that master suffers from this bug:" - " http://bugs.mysql.com/bug.php?id=%u" - " and thus replicating the current binary log event" - " may make the slave's data become different from the" - " master's data." - " To take no risk, slave refuses to replicate" - " this event and stops." - " We recommend that all updates be stopped on the" - " master and slave, that the data of both be" - " manually synchronized," - " that master's binary logs be deleted," - " that master be upgraded to a version at least" - " equal to '%d.%d.%d'. Then replication can be" - " restarted.", - rli->get_rli_description_event()->server_version, - bug_id, - fixed_in[0], fixed_in[1], fixed_in[2]); + if (!ignored_error_code(ER_UNKNOWN_ERROR)) + { + report_level= ERROR_LEVEL; + current_thd->is_slave_error= 1; + } + /* In case of ignored errors report warnings only if log_warnings > 1. */ + else if (log_warnings > 1) + report_level= WARNING_LEVEL; + + if (report_level != INFORMATION_LEVEL) + rli->report(report_level, ER_UNKNOWN_ERROR, + "According to the master's version ('%s')," + " it is probable that master suffers from this bug:" + " http://bugs.mysql.com/bug.php?id=%u" + " and thus replicating the current binary log event" + " may make the slave's data become different from the" + " master's data." + " To take no risk, slave refuses to replicate" + " this event and stops." + " We recommend that all updates be stopped on the" + " master and slave, that the data of both be" + " manually synchronized," + " that master's binary logs be deleted," + " that master be upgraded to a version at least" + " equal to '%d.%d.%d'. Then replication can be" + " restarted.", + rli->get_rli_description_event()->server_version, + bug_id, + fixed_in[0], fixed_in[1], fixed_in[2]); return TRUE; } } diff --git a/mysql-wsrep-5.6/sql/rpl_utility.cc b/mysql-wsrep-5.6/sql/rpl_utility.cc index 4b92ecd4..a085c423 100644 --- a/mysql-wsrep-5.6/sql/rpl_utility.cc +++ b/mysql-wsrep-5.6/sql/rpl_utility.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -350,7 +350,7 @@ uint32 table_def::calc_field_size(uint col, uchar *master_data) const return length; } -#ifndef MYSQL_CLIENT +#if defined(MYSQL_SERVER) && defined(HAVE_REPLICATION) /** */ static void show_sql_type(enum_field_types type, uint16 metadata, String *str, @@ -916,14 +916,26 @@ table_def::compatible_with(THD *thd, Relay_log_info *rli, const char *tbl_name= table->s->table_name.str; char source_buf[MAX_FIELD_WIDTH]; char target_buf[MAX_FIELD_WIDTH]; + enum loglevel report_level= INFORMATION_LEVEL; + String source_type(source_buf, sizeof(source_buf), &my_charset_latin1); String target_type(target_buf, sizeof(target_buf), &my_charset_latin1); show_sql_type(type(col), field_metadata(col), &source_type, field->charset()); field->sql_type(target_type); - rli->report(ERROR_LEVEL, ER_SLAVE_CONVERSION_FAILED, - ER(ER_SLAVE_CONVERSION_FAILED), - col, db_name, tbl_name, - source_type.c_ptr_safe(), target_type.c_ptr_safe()); + if (!ignored_error_code(ER_SLAVE_CONVERSION_FAILED)) + { + report_level= ERROR_LEVEL; + thd->is_slave_error= 1; + } + /* In case of ignored errors report warnings only if log_warnings > 1. */ + else if (log_warnings > 1) + report_level= WARNING_LEVEL; + + if (report_level != INFORMATION_LEVEL) + rli->report(report_level, ER_SLAVE_CONVERSION_FAILED, + ER(ER_SLAVE_CONVERSION_FAILED), + col, db_name, tbl_name, + source_type.c_ptr_safe(), target_type.c_ptr_safe()); return false; } } @@ -1061,10 +1073,23 @@ TABLE *table_def::create_conversion_table(THD *thd, Relay_log_info *rli, TABLE * err: if (conv_table == NULL) - rli->report(ERROR_LEVEL, ER_SLAVE_CANT_CREATE_CONVERSION, - ER(ER_SLAVE_CANT_CREATE_CONVERSION), - target_table->s->db.str, - target_table->s->table_name.str); + { + enum loglevel report_level= INFORMATION_LEVEL; + if (!ignored_error_code(ER_SLAVE_CANT_CREATE_CONVERSION)) + { + report_level= ERROR_LEVEL; + thd->is_slave_error= 1; + } + /* In case of ignored errors report warnings only if log_warnings > 1. */ + else if (log_warnings > 1) + report_level= WARNING_LEVEL; + + if (report_level != INFORMATION_LEVEL) + rli->report(report_level, ER_SLAVE_CANT_CREATE_CONVERSION, + ER(ER_SLAVE_CANT_CREATE_CONVERSION), + target_table->s->db.str, + target_table->s->table_name.str); + } DBUG_RETURN(conv_table); } @@ -1243,7 +1268,7 @@ bool event_checksum_test(uchar *event_buf, ulong event_len, uint8 alg) static uchar* hash_slave_rows_get_key(const uchar *record, size_t *length, - my_bool not_used __attribute__((unused))) + my_bool not_used MY_ATTRIBUTE((unused))) { DBUG_ENTER("get_key"); diff --git a/mysql-wsrep-5.6/sql/sp.cc b/mysql-wsrep-5.6/sql/sp.cc index 2ed06695..ade6664c 100644 --- a/mysql-wsrep-5.6/sql/sp.cc +++ b/mysql-wsrep-5.6/sql/sp.cc @@ -1,5 +1,5 @@ /* - Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -2553,8 +2553,9 @@ uint sp_get_flags_for_command(LEX *lex) bool sp_check_name(LEX_STRING *ident) { - if (!ident || !ident->str || !ident->str[0] || - ident->str[ident->length-1] == ' ') + DBUG_ASSERT(ident != NULL && ident->str != NULL); + + if (!ident->str[0] || ident->str[ident->length-1] == ' ') { my_error(ER_SP_WRONG_NAME, MYF(0), ident->str); return true; diff --git a/mysql-wsrep-5.6/sql/sql_acl.cc b/mysql-wsrep-5.6/sql/sql_acl.cc index 5a6e3ca9..c4d3980d 100644 --- a/mysql-wsrep-5.6/sql/sql_acl.cc +++ b/mysql-wsrep-5.6/sql/sql_acl.cc @@ -1,5 +1,5 @@ /* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. - +sql_authenticate This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. @@ -625,7 +625,7 @@ public: static uchar* acl_entry_get_key(acl_entry *entry, size_t *length, - my_bool not_used __attribute__((unused))) + my_bool not_used MY_ATTRIBUTE((unused))) { *length=(uint) entry->length; return (uchar*) entry->key; @@ -1673,7 +1673,7 @@ bool acl_getroot(Security_context *sctx, char *user, char *host, } static uchar* check_get_key(ACL_USER *buff, size_t *length, - my_bool not_used __attribute__((unused))) + my_bool not_used MY_ATTRIBUTE((unused))) { *length=buff->host.get_host_len(); return (uchar*) buff->host.get_host(); @@ -2872,9 +2872,14 @@ static int replace_user_table(THD *thd, TABLE *table, LEX_USER *combo, goto end; } - if (!combo->uses_identified_by_clause && - !combo->uses_identified_with_clause && - !combo->uses_identified_by_password_clause) + if ((!combo->uses_identified_by_clause && + !combo->uses_identified_with_clause && + !combo->uses_identified_by_password_clause) || + (combo->uses_identified_with_clause && + (!my_strcasecmp(system_charset_info, combo->plugin.str, + native_password_plugin_name.str) || + !my_strcasecmp(system_charset_info, combo->plugin.str, + old_password_plugin_name.str)))) { if (check_password_policy(NULL)) { @@ -3643,7 +3648,7 @@ public: static uchar* get_key_column(GRANT_COLUMN *buff, size_t *length, - my_bool not_used __attribute__((unused))) + my_bool not_used MY_ATTRIBUTE((unused))) { *length=buff->key_length; return (uchar*) buff->column; @@ -3836,7 +3841,7 @@ GRANT_TABLE::~GRANT_TABLE() static uchar* get_grant_table(GRANT_NAME *buff, size_t *length, - my_bool not_used __attribute__((unused))) + my_bool not_used MY_ATTRIBUTE((unused))) { *length=buff->key_length; return (uchar*) buff->hash_key; @@ -11087,6 +11092,27 @@ server_mpvio_update_thd(THD *thd, MPVIO_EXT *mpvio) thd->variables.sql_mode|= MODE_IGNORE_SPACE; } +/** + Assign priv_user and priv_host fields of the Security_context. + + @param sctx Security context, which priv_user and priv_host fields are + updated. + @param user Authenticated user data. +*/ +inline void +assign_priv_user_host(Security_context *sctx, const ACL_USER *user) +{ + if (user->user) + strmake(sctx->priv_user, user->user, USERNAME_LENGTH - 1); + else + *sctx->priv_user= 0; + + if (user->host.get_host()) + strmake(sctx->priv_host, user->host.get_host(), MAX_HOSTNAME - 1); + else + *sctx->priv_host= 0; +} + /** Perform the handshake, authorize the client and update thd sctx variables. @@ -11214,6 +11240,9 @@ acl_authenticate(THD *thd, uint com_change_user_pkt_len) res= CR_ERROR; } + if (mpvio.can_authenticate()) + assign_priv_user_host(sctx, acl_user); + if (res > CR_OK && mpvio.status != MPVIO_EXT::SUCCESS) { Host_errors errors; @@ -11296,15 +11325,7 @@ acl_authenticate(THD *thd, uint com_change_user_pkt_len) #endif sctx->master_access= acl_user->access; - if (acl_user->user) - strmake(sctx->priv_user, acl_user->user, USERNAME_LENGTH - 1); - else - *sctx->priv_user= 0; - - if (acl_user->host.get_host()) - strmake(sctx->priv_host, acl_user->host.get_host(), MAX_HOSTNAME - 1); - else - *sctx->priv_host= 0; + assign_priv_user_host(sctx, acl_user); #ifndef NO_EMBEDDED_ACCESS_CHECKS /* diff --git a/mysql-wsrep-5.6/sql/sql_analyse.cc b/mysql-wsrep-5.6/sql/sql_analyse.cc index 2b3d41de..f3a2570e 100644 --- a/mysql-wsrep-5.6/sql/sql_analyse.cc +++ b/mysql-wsrep-5.6/sql/sql_analyse.cc @@ -1,5 +1,5 @@ /* - Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -34,25 +34,25 @@ using std::min; using std::max; -int sortcmp2(void* cmp_arg __attribute__((unused)), +int sortcmp2(void* cmp_arg MY_ATTRIBUTE((unused)), const String *a,const String *b) { return sortcmp(a,b,a->charset()); } -int compare_double2(void* cmp_arg __attribute__((unused)), +int compare_double2(void* cmp_arg MY_ATTRIBUTE((unused)), const double *s, const double *t) { return compare_double(s,t); } -int compare_longlong2(void* cmp_arg __attribute__((unused)), +int compare_longlong2(void* cmp_arg MY_ATTRIBUTE((unused)), const longlong *s, const longlong *t) { return compare_longlong(s,t); } -int compare_ulonglong2(void* cmp_arg __attribute__((unused)), +int compare_ulonglong2(void* cmp_arg MY_ATTRIBUTE((unused)), const ulonglong *s, const ulonglong *t) { return compare_ulonglong(s,t); @@ -835,7 +835,7 @@ void field_str::get_opt_type(String *answer, ha_rows total_rows) void field_real::get_opt_type(String *answer, - ha_rows total_rows __attribute__((unused))) + ha_rows total_rows MY_ATTRIBUTE((unused))) { char buff[MAX_FIELD_WIDTH]; @@ -888,7 +888,7 @@ void field_real::get_opt_type(String *answer, void field_longlong::get_opt_type(String *answer, - ha_rows total_rows __attribute__((unused))) + ha_rows total_rows MY_ATTRIBUTE((unused))) { char buff[MAX_FIELD_WIDTH]; @@ -919,7 +919,7 @@ void field_longlong::get_opt_type(String *answer, void field_ulonglong::get_opt_type(String *answer, - ha_rows total_rows __attribute__((unused))) + ha_rows total_rows MY_ATTRIBUTE((unused))) { char buff[MAX_FIELD_WIDTH]; @@ -944,7 +944,7 @@ void field_ulonglong::get_opt_type(String *answer, void field_decimal::get_opt_type(String *answer, - ha_rows total_rows __attribute__((unused))) + ha_rows total_rows MY_ATTRIBUTE((unused))) { my_decimal zero; char buff[MAX_FIELD_WIDTH]; @@ -1022,7 +1022,7 @@ String *field_decimal::std(String *s, ha_rows rows) int collect_string(String *element, - element_count count __attribute__((unused)), + element_count count MY_ATTRIBUTE((unused)), TREE_INFO *info) { if (info->found) @@ -1037,7 +1037,7 @@ int collect_string(String *element, } // collect_string -int collect_real(double *element, element_count count __attribute__((unused)), +int collect_real(double *element, element_count count MY_ATTRIBUTE((unused)), TREE_INFO *info) { char buff[MAX_FIELD_WIDTH]; @@ -1078,7 +1078,7 @@ int collect_decimal(uchar *element, element_count count, int collect_longlong(longlong *element, - element_count count __attribute__((unused)), + element_count count MY_ATTRIBUTE((unused)), TREE_INFO *info) { char buff[MAX_FIELD_WIDTH]; @@ -1097,7 +1097,7 @@ int collect_longlong(longlong *element, int collect_ulonglong(ulonglong *element, - element_count count __attribute__((unused)), + element_count count MY_ATTRIBUTE((unused)), TREE_INFO *info) { char buff[MAX_FIELD_WIDTH]; diff --git a/mysql-wsrep-5.6/sql/sql_analyse.h b/mysql-wsrep-5.6/sql/sql_analyse.h index f2e097bb..b1027096 100644 --- a/mysql-wsrep-5.6/sql/sql_analyse.h +++ b/mysql-wsrep-5.6/sql/sql_analyse.h @@ -1,7 +1,7 @@ #ifndef SQL_ANALYSE_INCLUDED #define SQL_ANALYSE_INCLUDED -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -53,13 +53,13 @@ uint check_ulonglong(const char *str, uint length); bool get_ev_num_info(EV_NUM_INFO *ev_info, NUM_INFO *info, const char *num); bool test_if_number(NUM_INFO *info, const char *str, uint str_len); int compare_double(const double *s, const double *t); -int compare_double2(void* cmp_arg __attribute__((unused)), +int compare_double2(void* cmp_arg MY_ATTRIBUTE((unused)), const double *s, const double *t); int compare_longlong(const longlong *s, const longlong *t); -int compare_longlong2(void* cmp_arg __attribute__((unused)), +int compare_longlong2(void* cmp_arg MY_ATTRIBUTE((unused)), const longlong *s, const longlong *t); int compare_ulonglong(const ulonglong *s, const ulonglong *t); -int compare_ulonglong2(void* cmp_arg __attribute__((unused)), +int compare_ulonglong2(void* cmp_arg MY_ATTRIBUTE((unused)), const ulonglong *s, const ulonglong *t); int compare_decimal2(int* len, const char *s, const char *t); void free_string(String*); @@ -97,7 +97,7 @@ public: int collect_string(String *element, element_count count, TREE_INFO *info); -int sortcmp2(void* cmp_arg __attribute__((unused)), +int sortcmp2(void* cmp_arg MY_ATTRIBUTE((unused)), const String *a,const String *b); class field_str :public field_info @@ -120,9 +120,9 @@ public: void add(); void get_opt_type(String*, ha_rows); - String *get_min_arg(String *not_used __attribute__((unused))) + String *get_min_arg(String *not_used MY_ATTRIBUTE((unused))) { return &min_arg; } - String *get_max_arg(String *not_used __attribute__((unused))) + String *get_max_arg(String *not_used MY_ATTRIBUTE((unused))) { return &max_arg; } String *avg(String *s, ha_rows rows) { @@ -137,8 +137,8 @@ public: TREE_INFO *info); tree_walk_action collect_enum() { return (tree_walk_action) collect_string; } - String *std(String *s __attribute__((unused)), - ha_rows rows __attribute__((unused))) + String *std(String *s MY_ATTRIBUTE((unused)), + ha_rows rows MY_ATTRIBUTE((unused))) { return (String*) 0; } }; diff --git a/mysql-wsrep-5.6/sql/sql_audit.cc b/mysql-wsrep-5.6/sql/sql_audit.cc index ef14fefa..f31ccb50 100644 --- a/mysql-wsrep-5.6/sql/sql_audit.cc +++ b/mysql-wsrep-5.6/sql/sql_audit.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -494,7 +494,7 @@ static void event_class_dispatch(THD *thd, unsigned int event_class, /** There's at least one active audit plugin tracking the general events */ -bool is_any_audit_plugin_active(THD *thd __attribute__((unused))) +bool is_any_audit_plugin_active(THD *thd MY_ATTRIBUTE((unused))) { return (mysql_global_audit_mask[0] & MYSQL_AUDIT_GENERAL_CLASSMASK); } diff --git a/mysql-wsrep-5.6/sql/sql_audit.h b/mysql-wsrep-5.6/sql/sql_audit.h index 993068ca..39b9a19a 100644 --- a/mysql-wsrep-5.6/sql/sql_audit.h +++ b/mysql-wsrep-5.6/sql/sql_audit.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -37,7 +37,7 @@ extern void mysql_audit_acquire_plugins(THD *thd, uint event_class); #ifndef EMBEDDED_LIBRARY extern void mysql_audit_notify(THD *thd, uint event_class, uint event_subtype, ...); -bool is_any_audit_plugin_active(THD *thd __attribute__((unused))); +bool is_any_audit_plugin_active(THD *thd MY_ATTRIBUTE((unused))); #else #define mysql_audit_notify(...) #endif diff --git a/mysql-wsrep-5.6/sql/sql_base.cc b/mysql-wsrep-5.6/sql/sql_base.cc index 93d45168..c5bbd584 100644 --- a/mysql-wsrep-5.6/sql/sql_base.cc +++ b/mysql-wsrep-5.6/sql/sql_base.cc @@ -333,7 +333,7 @@ uint get_table_def_key(const TABLE_LIST *table_list, const char **key) *****************************************************************************/ extern "C" uchar *table_def_key(const uchar *record, size_t *length, - my_bool not_used __attribute__((unused))) + my_bool not_used MY_ATTRIBUTE((unused))) { TABLE_SHARE *entry=(TABLE_SHARE*) record; *length= entry->table_cache_key.length; @@ -994,7 +994,6 @@ bool close_cached_tables(THD *thd, TABLE_LIST *tables, while (found && ! thd->killed) { - WSREP_DEBUG("close_cached_tables, wait loop"); TABLE_SHARE *share; found= FALSE; /* @@ -4869,7 +4868,7 @@ end: } extern "C" uchar *schema_set_get_key(const uchar *record, size_t *length, - my_bool not_used __attribute__((unused))) + my_bool not_used MY_ATTRIBUTE((unused))) { TABLE_LIST *table=(TABLE_LIST*) record; *length= table->db_length; @@ -5482,6 +5481,15 @@ handle_view(THD *thd, Query_tables_list *prelocking_ctx, &table_list->view->sroutines_list, table_list->top_table()); } + + /* + If a trigger was defined on one of the associated tables then assign the + 'trg_event_map' value of the view to the next table in table_list. When a + Stored function is invoked, all the associated tables including the tables + associated with the trigger are prelocked. + */ + if (table_list->trg_event_map && table_list->next_global) + table_list->next_global->trg_event_map= table_list->trg_event_map; return FALSE; } diff --git a/mysql-wsrep-5.6/sql/sql_cache.cc b/mysql-wsrep-5.6/sql/sql_cache.cc index 31c83e75..17b46a65 100644 --- a/mysql-wsrep-5.6/sql/sql_cache.cc +++ b/mysql-wsrep-5.6/sql/sql_cache.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2013, 2015, Oracle and/or its affiliates. All rights +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify @@ -729,7 +729,7 @@ inline Query_cache_block_table * Query_cache_block::table(TABLE_COUNTER_TYPE n) extern "C" { uchar *query_cache_table_get_key(const uchar *record, size_t *length, - my_bool not_used __attribute__((unused))) + my_bool not_used MY_ATTRIBUTE((unused))) { Query_cache_block* table_block = (Query_cache_block*) record; *length = (table_block->used - table_block->headers_len() - diff --git a/mysql-wsrep-5.6/sql/sql_class.cc b/mysql-wsrep-5.6/sql/sql_class.cc index 3208e041..6fd51897 100644 --- a/mysql-wsrep-5.6/sql/sql_class.cc +++ b/mysql-wsrep-5.6/sql/sql_class.cc @@ -87,7 +87,7 @@ const char * const THD::DEFAULT_WHERE= "field list"; ****************************************************************************/ extern "C" uchar *get_var_key(user_var_entry *entry, size_t *length, - my_bool not_used __attribute__((unused))) + my_bool not_used MY_ATTRIBUTE((unused))) { *length= entry->entry_name.length(); return (uchar*) entry->entry_name.ptr(); @@ -854,7 +854,7 @@ extern "C" void wsrep_thd_set_query_state( extern "C" void wsrep_thd_set_conflict_state( THD *thd, enum wsrep_conflict_state state) { - thd->wsrep_conflict_state= state; + if (WSREP(thd)) thd->wsrep_conflict_state= state; } @@ -1117,7 +1117,7 @@ THD::THD(bool enable_plugins) owned_gtid_set(global_sid_map), main_da(0, false), m_stmt_da(&main_da), - duplicate_slave_uuid(false) + duplicate_slave_id(false) { ulong tmp; @@ -1215,7 +1215,8 @@ THD::THD(bool enable_plugins) wsrep_mysql_replicated = 0; wsrep_TOI_pre_query = NULL; wsrep_TOI_pre_query_len = 0; - wsrep_sync_wait_gtid= WSREP_GTID_UNDEFINED; + wsrep_sync_wait_gtid = WSREP_GTID_UNDEFINED; + wsrep_affected_rows = 0; #endif /* Call to init() below requires fully initialized Open_tables_state. */ reset_open_tables_state(); @@ -1624,7 +1625,8 @@ void THD::init(void) wsrep_mysql_replicated = 0; wsrep_TOI_pre_query = NULL; wsrep_TOI_pre_query_len = 0; - wsrep_sync_wait_gtid= WSREP_GTID_UNDEFINED; + wsrep_sync_wait_gtid = WSREP_GTID_UNDEFINED; + wsrep_affected_rows = 0; #endif binlog_row_event_extra_data= 0; @@ -2314,6 +2316,8 @@ void THD::cleanup_after_query() #ifdef WITH_WSREP wsrep_sync_wait_gtid= WSREP_GTID_UNDEFINED; + if (!in_active_multi_stmt_transaction()) + wsrep_affected_rows= 0; #endif /* WITH_WSREP */ } @@ -3314,7 +3318,7 @@ err: int -select_dump::prepare(List &list __attribute__((unused)), +select_dump::prepare(List &list MY_ATTRIBUTE((unused)), SELECT_LEX_UNIT *u) { unit= u; @@ -3726,7 +3730,7 @@ C_MODE_START static uchar * get_statement_id_as_hash_key(const uchar *record, size_t *key_length, - my_bool not_used __attribute__((unused))) + my_bool not_used MY_ATTRIBUTE((unused))) { const Statement *statement= (const Statement *) record; *key_length= sizeof(statement->id); @@ -3739,7 +3743,7 @@ static void delete_statement_as_hash_key(void *key) } static uchar *get_stmt_name_hash_key(Statement *entry, size_t *length, - my_bool not_used __attribute__((unused))) + my_bool not_used MY_ATTRIBUTE((unused))) { *length= entry->name.length; return (uchar*) entry->name.str; @@ -5045,7 +5049,7 @@ extern "C" uchar *xid_get_hash_key(const uchar *, size_t *, my_bool); extern "C" void xid_free_hash(void *); uchar *xid_get_hash_key(const uchar *ptr, size_t *length, - my_bool not_used __attribute__((unused))) + my_bool not_used MY_ATTRIBUTE((unused))) { *length=((XID_STATE*)ptr)->xid.key_length(); return ((XID_STATE*)ptr)->xid.key(); diff --git a/mysql-wsrep-5.6/sql/sql_class.h b/mysql-wsrep-5.6/sql/sql_class.h index 4b7b11eb..4f85e414 100644 --- a/mysql-wsrep-5.6/sql/sql_class.h +++ b/mysql-wsrep-5.6/sql/sql_class.h @@ -83,6 +83,7 @@ struct wsrep_thd_shadow { ulong tx_isolation; char *db; size_t db_length; + struct timeval user_time; }; #endif class Reprepare_observer; @@ -1583,6 +1584,8 @@ typedef I_List Item_change_list; /** Type of locked tables mode. See comment for THD::locked_tables_mode for complete description. + While adding new enum values add them to the getter method for this enum + declared below and defined in sql_class.cc as well. */ enum enum_locked_tables_mode @@ -1593,6 +1596,15 @@ enum enum_locked_tables_mode LTM_PRELOCKED_UNDER_LOCK_TABLES }; +#ifndef DBUG_OFF +/** + Getter for the enum enum_locked_tables_mode + @param locked_tables_mode enum for types of locked tables mode + + @return The string represantation of that enum value +*/ +const char * get_locked_tables_mode_name(enum_locked_tables_mode locked_tables_mode); +#endif /** Class that holds information about tables which were opened and locked @@ -3205,6 +3217,7 @@ public: void* wsrep_apply_format; bool wsrep_apply_toi; /* applier processing in TOI */ wsrep_gtid_t wsrep_sync_wait_gtid; + ulong wsrep_affected_rows; #endif /* WITH_WSREP */ /** Internal parser state. @@ -4214,11 +4227,12 @@ private: public: /** This is only used by master dump threads. - When the master receives a new connection from a slave with a UUID that - is already connected, it will set this flag TRUE before killing the old - slave connection. + When the master receives a new connection from a slave with a + UUID (for slave versions >= 5.6)/server_id(for slave versions < 5.6) + that is already connected, it will set this flag TRUE + before killing the old slave connection. */ - bool duplicate_slave_uuid; + bool duplicate_slave_id; }; diff --git a/mysql-wsrep-5.6/sql/sql_connect.cc b/mysql-wsrep-5.6/sql/sql_connect.cc index 9034a6e4..14702ecb 100644 --- a/mysql-wsrep-5.6/sql/sql_connect.cc +++ b/mysql-wsrep-5.6/sql/sql_connect.cc @@ -1,5 +1,5 @@ /* - Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -340,7 +340,7 @@ void release_user_connection(THD *thd) */ extern "C" uchar *get_key_conn(user_conn *buff, size_t *length, - my_bool not_used __attribute__((unused))) + my_bool not_used MY_ATTRIBUTE((unused))) { *length= buff->len; return (uchar*) buff->user; diff --git a/mysql-wsrep-5.6/sql/sql_cursor.cc b/mysql-wsrep-5.6/sql/sql_cursor.cc index 0c6b7e70..cd074a7d 100644 --- a/mysql-wsrep-5.6/sql/sql_cursor.cc +++ b/mysql-wsrep-5.6/sql/sql_cursor.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -47,7 +47,7 @@ public: int send_result_set_metadata(THD *thd, List &send_result_set_metadata); virtual bool is_open() const { return table != 0; } - virtual int open(JOIN *join __attribute__((unused))); + virtual int open(JOIN *join MY_ATTRIBUTE((unused))); virtual void fetch(ulong num_rows); virtual void close(); virtual ~Materialized_cursor(); @@ -277,7 +277,7 @@ end: } -int Materialized_cursor::open(JOIN *join __attribute__((unused))) +int Materialized_cursor::open(JOIN *join MY_ATTRIBUTE((unused))) { THD *thd= fake_unit.thd; int rc; diff --git a/mysql-wsrep-5.6/sql/sql_db.cc b/mysql-wsrep-5.6/sql/sql_db.cc index 2554332c..479fe77e 100644 --- a/mysql-wsrep-5.6/sql/sql_db.cc +++ b/mysql-wsrep-5.6/sql/sql_db.cc @@ -1,5 +1,5 @@ /* - Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -86,7 +86,7 @@ extern "C" uchar* dboptions_get_key(my_dbopt_t *opt, size_t *length, my_bool not_used); uchar* dboptions_get_key(my_dbopt_t *opt, size_t *length, - my_bool not_used __attribute__((unused))) + my_bool not_used MY_ATTRIBUTE((unused))) { *length= opt->name_length; return (uchar*) opt->name; diff --git a/mysql-wsrep-5.6/sql/sql_executor.cc b/mysql-wsrep-5.6/sql/sql_executor.cc index 448ab526..2808dc32 100644 --- a/mysql-wsrep-5.6/sql/sql_executor.cc +++ b/mysql-wsrep-5.6/sql/sql_executor.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -484,7 +484,7 @@ init_tmptable_sum_functions(Item_sum **func_ptr) static void update_tmptable_sum_func(Item_sum **func_ptr, - TABLE *tmp_table __attribute__((unused))) + TABLE *tmp_table MY_ATTRIBUTE((unused))) { Item_sum *func; while ((func= *(func_ptr++))) @@ -2256,7 +2256,7 @@ join_read_last_key(JOIN_TAB *tab) /* ARGSUSED */ static int -join_no_more_records(READ_RECORD *info __attribute__((unused))) +join_no_more_records(READ_RECORD *info MY_ATTRIBUTE((unused))) { return -1; } @@ -2858,7 +2858,7 @@ end_send(JOIN *join, JOIN_TAB *join_tab, bool end_of_records) /* ARGSUSED */ enum_nested_loop_state -end_send_group(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)), +end_send_group(JOIN *join, JOIN_TAB *join_tab MY_ATTRIBUTE((unused)), bool end_of_records) { int idx= -1; @@ -3856,7 +3856,7 @@ setup_copy_fields(THD *thd, TMP_TABLE_PARAM *param, Item *pos; List_iterator_fast li(all_fields); Copy_field *copy= NULL; - Copy_field *copy_start __attribute__((unused)); + Copy_field *copy_start MY_ATTRIBUTE((unused)); res_selected_fields.empty(); res_all_fields.empty(); List_iterator_fast itr(res_all_fields); diff --git a/mysql-wsrep-5.6/sql/sql_executor.h b/mysql-wsrep-5.6/sql/sql_executor.h index 654a6f95..bf929847 100644 --- a/mysql-wsrep-5.6/sql/sql_executor.h +++ b/mysql-wsrep-5.6/sql/sql_executor.h @@ -1,7 +1,7 @@ #ifndef SQL_EXECUTOR_INCLUDED #define SQL_EXECUTOR_INCLUDED -/* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify @@ -258,7 +258,7 @@ private: /** Write function that would be used for saving records in tmp table. */ Next_select_func write_func; enum_nested_loop_state put_record(bool end_of_records); - __attribute__((warn_unused_result)) + MY_ATTRIBUTE((warn_unused_result)) bool prepare_tmp_table(); }; diff --git a/mysql-wsrep-5.6/sql/sql_handler.cc b/mysql-wsrep-5.6/sql/sql_handler.cc index 707495be..5387eee9 100644 --- a/mysql-wsrep-5.6/sql/sql_handler.cc +++ b/mysql-wsrep-5.6/sql/sql_handler.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -89,7 +89,7 @@ static bool mysql_ha_open_table(THD *thd, TABLE_LIST *table); */ static char *mysql_ha_hash_get_key(TABLE_LIST *tables, size_t *key_len_p, - my_bool first __attribute__((unused))) + my_bool first MY_ATTRIBUTE((unused))) { *key_len_p= strlen(tables->alias) + 1 ; /* include '\0' in comparisons */ return tables->alias; diff --git a/mysql-wsrep-5.6/sql/sql_insert.cc b/mysql-wsrep-5.6/sql/sql_insert.cc index 2ad22038..31fbf8b3 100644 --- a/mysql-wsrep-5.6/sql/sql_insert.cc +++ b/mysql-wsrep-5.6/sql/sql_insert.cc @@ -1679,16 +1679,25 @@ int write_record(THD *thd, TABLE *table, COPY_INFO *info, COPY_INFO *update) insert_id_for_cur_row= table->file->insert_id_for_cur_row; else table->file->insert_id_for_cur_row= insert_id_for_cur_row; - bool is_duplicate_key_error; - if (table->file->is_fatal_error(error, HA_CHECK_DUP | HA_CHECK_FK_ERROR)) + + /* + If it is a FK constraint violation and 'ignore' flag is set, + report a warning instead of error. + */ + if (ignore_errors && !table->file->is_fatal_error(error, + HA_CHECK_FK_ERROR)) + goto ok_or_after_trg_err; + + if (table->file->is_fatal_error(error, HA_CHECK_DUP)) goto err; - is_duplicate_key_error= table->file->is_fatal_error(error, 0); - if (!is_duplicate_key_error) + + if (!table->file->is_fatal_error(error, 0)) { /* - We come here when we had an ignorable error which is not a duplicate - key error. In this we ignore error if ignore flag is set, otherwise - report error as usual. We will not do any duplicate key processing. + We come here when we have an ignorable error which is not a duplicate + key error or FK error(Ex: Partition related errors). In this case we + ignore the error if ignore flag is set, otherwise report error as usual. + We will not do any duplicate key processing. */ if (ignore_errors) goto ok_or_after_trg_err; /* Ignoring a not fatal error, return 0 */ diff --git a/mysql-wsrep-5.6/sql/sql_lex.cc b/mysql-wsrep-5.6/sql/sql_lex.cc index 5cca6037..29ef1791 100644 --- a/mysql-wsrep-5.6/sql/sql_lex.cc +++ b/mysql-wsrep-5.6/sql/sql_lex.cc @@ -3580,6 +3580,9 @@ void LEX::first_lists_tables_same() if (query_tables_last == &first_table->next_global) query_tables_last= first_table->prev_global; + if (query_tables_own_last == &first_table->next_global) + query_tables_own_last= first_table->prev_global; + if ((next= *first_table->prev_global= first_table->next_global)) next->prev_global= first_table->prev_global; /* include in new place */ diff --git a/mysql-wsrep-5.6/sql/sql_load.cc b/mysql-wsrep-5.6/sql/sql_load.cc index 4c30dfe6..92b3c6e4 100644 --- a/mysql-wsrep-5.6/sql/sql_load.cc +++ b/mysql-wsrep-5.6/sql/sql_load.cc @@ -209,7 +209,7 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, */ char *tdb= thd->db ? thd->db : db; // Result is never null ulong skip_lines= ex->skip_lines; - bool transactional_table __attribute__((unused)); + bool transactional_table MY_ATTRIBUTE((unused)); DBUG_ENTER("mysql_load"); /* @@ -1413,8 +1413,8 @@ READ_INFO::READ_INFO(File file_par, uint tot_length, const CHARSET_INFO *cs, set_if_bigger(length,line_start.length()); stack=stack_pos=(int*) sql_alloc(sizeof(int)*length); - if (!(buffer=(uchar*) my_malloc(buff_length+1,MYF(0)))) - error=1; /* purecov: inspected */ + if (!(buffer=(uchar*) my_malloc(buff_length+1,MYF(MY_WME)))) + error= true; /* purecov: inspected */ else { end_of_buff=buffer+buff_length; @@ -1607,37 +1607,50 @@ int READ_INFO::read_field() } } #ifdef USE_MB - if (my_mbcharlen(read_charset, chr) > 1 && - to + my_mbcharlen(read_charset, chr) <= end_of_buff) - { - uchar* p= to; - int ml, i; - *to++ = chr; - - ml= my_mbcharlen(read_charset, chr); + uint ml= my_mbcharlen(read_charset, chr); + if (ml == 0) + { + *to= '\0'; + my_error(ER_INVALID_CHARACTER_STRING, MYF(0), + read_charset->csname, buffer); + error= true; + return 1; + } - for (i= 1; i < ml; i++) + if (ml > 1 && + to + ml <= end_of_buff) { - chr= GET; - if (chr == my_b_EOF) + uchar* p= to; + *to++ = chr; + + for (uint i= 1; i < ml; i++) { - /* - Need to back up the bytes already ready from illformed - multi-byte char - */ - to-= i; - goto found_eof; + chr= GET; + if (chr == my_b_EOF) + { + /* + Need to back up the bytes already ready from illformed + multi-byte char + */ + to-= i; + goto found_eof; + } + *to++ = chr; } - *to++ = chr; - } - if (my_ismbchar(read_charset, + if (my_ismbchar(read_charset, (const char *)p, (const char *)to)) - continue; - for (i= 0; i < ml; i++) - PUSH(*--to); - chr= GET; - } + continue; + for (uint i= 0; i < ml; i++) + PUSH(*--to); + chr= GET; + } + else if (ml > 1) + { + // Buffer is too small, exit while loop, and reallocate. + PUSH(chr); + break; + } #endif *to++ = (uchar) chr; } @@ -1886,7 +1899,15 @@ int READ_INFO::read_value(int delim, String *val) for (chr= GET; my_tospace(chr) != delim && chr != my_b_EOF;) { #ifdef USE_MB - if (my_mbcharlen(read_charset, chr) > 1) + uint ml= my_mbcharlen(read_charset, chr); + if (ml == 0) + { + chr= my_b_EOF; + val->length(0); + return chr; + } + + if (ml > 1) { DBUG_PRINT("read_xml",("multi byte")); int i, ml= my_mbcharlen(read_charset, chr); diff --git a/mysql-wsrep-5.6/sql/sql_manager.cc b/mysql-wsrep-5.6/sql/sql_manager.cc index d2faf941..8b9d81ad 100644 --- a/mysql-wsrep-5.6/sql/sql_manager.cc +++ b/mysql-wsrep-5.6/sql/sql_manager.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -63,7 +63,7 @@ bool mysql_manager_submit(void (*action)()) return result; } -pthread_handler_t handle_manager(void *arg __attribute__((unused))) +pthread_handler_t handle_manager(void *arg MY_ATTRIBUTE((unused))) { int error = 0; struct timespec abstime; diff --git a/mysql-wsrep-5.6/sql/sql_optimizer.cc b/mysql-wsrep-5.6/sql/sql_optimizer.cc index a8427873..57014aa5 100644 --- a/mysql-wsrep-5.6/sql/sql_optimizer.cc +++ b/mysql-wsrep-5.6/sql/sql_optimizer.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1121,8 +1121,8 @@ public: { return (void*) sql_alloc((uint) size); } - static void operator delete(void *ptr __attribute__((unused)), - size_t size __attribute__((unused))) + static void operator delete(void *ptr MY_ATTRIBUTE((unused)), + size_t size MY_ATTRIBUTE((unused))) { TRASH(ptr, size); } Item *and_level; diff --git a/mysql-wsrep-5.6/sql/sql_parse.cc b/mysql-wsrep-5.6/sql/sql_parse.cc index e8baa144..19a8bee7 100644 --- a/mysql-wsrep-5.6/sql/sql_parse.cc +++ b/mysql-wsrep-5.6/sql/sql_parse.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -301,43 +301,37 @@ uint server_command_flags[COM_END+1]; void init_update_queries(void) { /* Initialize the server command flags array. */ -#ifdef WITH_WSREP memset(server_command_flags, 0, sizeof(server_command_flags)); - server_command_flags[COM_STATISTICS]= CF_SKIP_QUESTIONS | - CF_SKIP_WSREP_CHECK; - server_command_flags[COM_PING]= CF_SKIP_QUESTIONS | - CF_SKIP_WSREP_CHECK; - server_command_flags[COM_STMT_PREPARE]= CF_SKIP_QUESTIONS | - CF_SKIP_WSREP_CHECK; - server_command_flags[COM_STMT_EXECUTE]= CF_SKIP_WSREP_CHECK; - server_command_flags[COM_STMT_FETCH]= CF_SKIP_WSREP_CHECK; - server_command_flags[COM_STMT_CLOSE]= CF_SKIP_QUESTIONS | - CF_SKIP_WSREP_CHECK; - server_command_flags[COM_STMT_RESET]= CF_SKIP_QUESTIONS | - CF_SKIP_WSREP_CHECK; - server_command_flags[COM_STMT_SEND_LONG_DATA] = CF_SKIP_WSREP_CHECK; - - server_command_flags[COM_QUIT]= CF_SKIP_WSREP_CHECK; - server_command_flags[COM_PROCESS_INFO]= CF_SKIP_WSREP_CHECK; - server_command_flags[COM_PROCESS_KILL]= CF_SKIP_WSREP_CHECK; - server_command_flags[COM_SHUTDOWN]= CF_SKIP_WSREP_CHECK; - server_command_flags[COM_SLEEP]= CF_SKIP_WSREP_CHECK; - server_command_flags[COM_TIME]= CF_SKIP_WSREP_CHECK; - server_command_flags[COM_INIT_DB]= CF_SKIP_WSREP_CHECK; - server_command_flags[COM_END]= CF_SKIP_WSREP_CHECK; - /* - COM_QUERY and COM_SET_OPTION are allowed to pass the early COM_xxx filter, - they're checked later in mysql_execute_command(). - */ - server_command_flags[COM_QUERY]= CF_SKIP_WSREP_CHECK; - server_command_flags[COM_SET_OPTION]= CF_SKIP_WSREP_CHECK; -#else server_command_flags[COM_STATISTICS]= CF_SKIP_QUESTIONS; server_command_flags[COM_PING]= CF_SKIP_QUESTIONS; server_command_flags[COM_STMT_PREPARE]= CF_SKIP_QUESTIONS; server_command_flags[COM_STMT_CLOSE]= CF_SKIP_QUESTIONS; server_command_flags[COM_STMT_RESET]= CF_SKIP_QUESTIONS; +#ifdef WITH_WSREP + server_command_flags[COM_STATISTICS]|= CF_SKIP_WSREP_CHECK; + server_command_flags[COM_PING]|= CF_SKIP_WSREP_CHECK; + server_command_flags[COM_STMT_PREPARE]|= CF_SKIP_WSREP_CHECK; + server_command_flags[COM_STMT_EXECUTE]|= CF_SKIP_WSREP_CHECK; + server_command_flags[COM_STMT_FETCH]|= CF_SKIP_WSREP_CHECK; + server_command_flags[COM_STMT_CLOSE]|= CF_SKIP_WSREP_CHECK; + server_command_flags[COM_STMT_RESET]|= CF_SKIP_WSREP_CHECK; + server_command_flags[COM_STMT_SEND_LONG_DATA]|= CF_SKIP_WSREP_CHECK; + server_command_flags[COM_QUIT]|= CF_SKIP_WSREP_CHECK; + server_command_flags[COM_PROCESS_INFO]|= CF_SKIP_WSREP_CHECK; + server_command_flags[COM_PROCESS_KILL]|= CF_SKIP_WSREP_CHECK; + server_command_flags[COM_SHUTDOWN]|= CF_SKIP_WSREP_CHECK; + server_command_flags[COM_SLEEP]|= CF_SKIP_WSREP_CHECK; + server_command_flags[COM_TIME]|= CF_SKIP_WSREP_CHECK; + server_command_flags[COM_INIT_DB]|= CF_SKIP_WSREP_CHECK; + server_command_flags[COM_END]|= CF_SKIP_WSREP_CHECK; + + /* + COM_QUERY and COM_SET_OPTION are allowed to pass the early COM_xxx filter, + they're checked later in mysql_execute_command(). + */ + server_command_flags[COM_QUERY]|= CF_SKIP_WSREP_CHECK; + server_command_flags[COM_SET_OPTION]|= CF_SKIP_WSREP_CHECK; #endif /* WITH_WSREP */ /* Initialize the sql command flags array. */ @@ -1912,7 +1906,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd, { STATUS_VAR current_global_status_var; ulong uptime; - uint length __attribute__((unused)); + uint length MY_ATTRIBUTE((unused)); ulonglong queries_per_second1000; char buff[250]; uint buff_len= sizeof(buff); @@ -2081,7 +2075,7 @@ done: /* DTRACE instrumentation, end */ if (MYSQL_QUERY_DONE_ENABLED() || MYSQL_COMMAND_DONE_ENABLED()) { - int res __attribute__((unused)); + int res MY_ATTRIBUTE((unused)); res= (int) thd->is_error(); if (command == COM_QUERY) { @@ -6506,7 +6500,7 @@ long max_stack_used; - Passing to check_stack_overrun() prevents the compiler from removing it. */ bool check_stack_overrun(THD *thd, long margin, - uchar *buf __attribute__((unused))) + uchar *buf MY_ATTRIBUTE((unused))) { long stack_used; DBUG_ASSERT(thd == current_thd); @@ -6992,7 +6986,7 @@ static void wsrep_mysql_parse(THD *thd, char *rawbuf, uint length, void mysql_parse(THD *thd, char *rawbuf, uint length, Parser_state *parser_state) { - int error __attribute__((unused)); + int error MY_ATTRIBUTE((unused)); DBUG_ENTER("mysql_parse"); DBUG_EXECUTE_IF("parser_debug", turn_parser_debug_on();); diff --git a/mysql-wsrep-5.6/sql/sql_parse.h b/mysql-wsrep-5.6/sql/sql_parse.h index 867ab077..7c10ac4a 100644 --- a/mysql-wsrep-5.6/sql/sql_parse.h +++ b/mysql-wsrep-5.6/sql/sql_parse.h @@ -231,6 +231,7 @@ inline bool is_supported_parser_charset(const CHARSET_INFO *cs) #define WSREP_TO_ISOLATION_BEGIN(db_, table_, table_list_) #define WSREP_TO_ISOLATION_END +#define WSREP_TO_ISOLATION_BEGIN_WRTCHK(db_, table_, table_list_) #endif /* WITH_WSREP */ diff --git a/mysql-wsrep-5.6/sql/sql_planner.cc b/mysql-wsrep-5.6/sql/sql_planner.cc index 6c2d21b2..e6db9115 100644 --- a/mysql-wsrep-5.6/sql/sql_planner.cc +++ b/mysql-wsrep-5.6/sql/sql_planner.cc @@ -1516,7 +1516,7 @@ bool Optimize_table_order::greedy_search(table_map remaining_tables) join state will not be reverted back to its initial state because we don't "pop" tables already present in the partial plan. */ - bool is_interleave_error __attribute__((unused))= + bool is_interleave_error MY_ATTRIBUTE((unused))= check_interleaving_with_nj (best_table); /* This has been already checked by best_extension_by_limited_search */ DBUG_ASSERT(!is_interleave_error); diff --git a/mysql-wsrep-5.6/sql/sql_plugin.cc b/mysql-wsrep-5.6/sql/sql_plugin.cc index 99b15a16..36e9bb3f 100644 --- a/mysql-wsrep-5.6/sql/sql_plugin.cc +++ b/mysql-wsrep-5.6/sql/sql_plugin.cc @@ -1,5 +1,5 @@ /* - Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -528,8 +528,9 @@ static st_plugin_dl *plugin_dl_add(const LEX_STRING *dl, int report) if ((sym= dlsym(plugin_dl.handle, list_of_services[i].name))) { uint ver= (uint)(intptr)*(void**)sym; - if (ver > list_of_services[i].version || - (ver >> 8) < (list_of_services[i].version >> 8)) + if ((*(void**)sym) != list_of_services[i].service && /* already replaced */ + (ver > list_of_services[i].version || + (ver >> 8) < (list_of_services[i].version >> 8))) { char buf[MYSQL_ERRMSG_SIZE]; my_snprintf(buf, sizeof(buf), @@ -1215,7 +1216,7 @@ extern "C" uchar *get_bookmark_hash_key(const uchar *, size_t *, my_bool); uchar *get_plugin_hash_key(const uchar *buff, size_t *length, - my_bool not_used __attribute__((unused))) + my_bool not_used MY_ATTRIBUTE((unused))) { struct st_plugin_int *plugin= (st_plugin_int *)buff; *length= (uint)plugin->name.length; @@ -1224,7 +1225,7 @@ uchar *get_plugin_hash_key(const uchar *buff, size_t *length, uchar *get_bookmark_hash_key(const uchar *buff, size_t *length, - my_bool not_used __attribute__((unused))) + my_bool not_used MY_ATTRIBUTE((unused))) { struct st_bookmark *var= (st_bookmark *)buff; *length= var->name_len + 1; @@ -3399,7 +3400,7 @@ static void plugin_opt_set_limits(struct my_option *options, extern "C" my_bool get_one_plugin_option(int optid, const struct my_option *, char *); -my_bool get_one_plugin_option(int optid __attribute__((unused)), +my_bool get_one_plugin_option(int optid MY_ATTRIBUTE((unused)), const struct my_option *opt, char *argument) { @@ -3720,7 +3721,7 @@ static my_option *construct_help_options(MEM_ROOT *mem_root, static my_bool check_if_option_is_deprecated(int optid, const struct my_option *opt, - char *argument __attribute__((unused))) + char *argument MY_ATTRIBUTE((unused))) { if (optid == -1) { @@ -3770,7 +3771,7 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp, LEX_STRING plugin_name; char *varname; int error; - sys_var *v __attribute__((unused)); + sys_var *v MY_ATTRIBUTE((unused)); struct st_bookmark *var; uint len, count= EXTRA_OPTIONS; DBUG_ENTER("test_plugin_options"); diff --git a/mysql-wsrep-5.6/sql/sql_prepare.cc b/mysql-wsrep-5.6/sql/sql_prepare.cc index 32a0f24b..21cb3c76 100644 --- a/mysql-wsrep-5.6/sql/sql_prepare.cc +++ b/mysql-wsrep-5.6/sql/sql_prepare.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -399,7 +399,7 @@ static bool send_prep_stmt(Prepared_statement *stmt, uint columns) } #else static bool send_prep_stmt(Prepared_statement *stmt, - uint columns __attribute__((unused))) + uint columns MY_ATTRIBUTE((unused))) { THD *thd= stmt->thd; @@ -1183,7 +1183,7 @@ swap_parameter_array(Item_param **param_array_dst, static bool insert_params_from_vars(Prepared_statement *stmt, List& varnames, - String *query __attribute__((unused))) + String *query MY_ATTRIBUTE((unused))) { Item_param **begin= stmt->param_array; Item_param **end= begin + stmt->param_count; @@ -4028,7 +4028,10 @@ bool Prepared_statement::execute(String *expanded_query, bool open_cursor) /* Go! */ if (open_cursor) + { + lex->safe_to_cache_query= 0; error= mysql_open_cursor(thd, &result, &cursor); + } else { /* @@ -4547,7 +4550,7 @@ bool Protocol_local::store(const char *str, size_t length, /* Store MYSQL_TIME (in binary format) */ bool Protocol_local::store(MYSQL_TIME *time, - uint precision __attribute__((unused))) + uint precision MY_ATTRIBUTE((unused))) { return store_column(time, sizeof(MYSQL_TIME)); } @@ -4564,7 +4567,7 @@ bool Protocol_local::store_date(MYSQL_TIME *time) /** Store MYSQL_TIME (in binary format) */ bool Protocol_local::store_time(MYSQL_TIME *time, - uint precision __attribute__((unused))) + uint precision MY_ATTRIBUTE((unused))) { return store_column(time, sizeof(MYSQL_TIME)); } diff --git a/mysql-wsrep-5.6/sql/sql_select.cc b/mysql-wsrep-5.6/sql/sql_select.cc index 503d9aec..3a557b4a 100644 --- a/mysql-wsrep-5.6/sql/sql_select.cc +++ b/mysql-wsrep-5.6/sql/sql_select.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -3075,7 +3075,7 @@ bool JOIN_TAB::and_with_jt_and_sel_condition(Item *add_cond, uint line) */ bool JOIN_TAB::and_with_condition(Item *add_cond, uint line) { - Item *old_cond __attribute__((unused))= m_condition; + Item *old_cond MY_ATTRIBUTE((unused))= m_condition; if (and_conditions(&m_condition, add_cond)) return true; DBUG_PRINT("info", ("JOIN_TAB::m_condition extended. Change %p -> %p " diff --git a/mysql-wsrep-5.6/sql/sql_servers.cc b/mysql-wsrep-5.6/sql/sql_servers.cc index d11082ac..11ba354e 100644 --- a/mysql-wsrep-5.6/sql/sql_servers.cc +++ b/mysql-wsrep-5.6/sql/sql_servers.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -86,7 +86,7 @@ static void merge_server_struct(FOREIGN_SERVER *from, FOREIGN_SERVER *to); static uchar *servers_cache_get_key(FOREIGN_SERVER *server, size_t *length, - my_bool not_used __attribute__((unused))) + my_bool not_used MY_ATTRIBUTE((unused))) { DBUG_ENTER("servers_cache_get_key"); DBUG_PRINT("info", ("server_name_length %d server_name %s", diff --git a/mysql-wsrep-5.6/sql/sql_show.cc b/mysql-wsrep-5.6/sql/sql_show.cc index 9d6dad07..3219b995 100644 --- a/mysql-wsrep-5.6/sql/sql_show.cc +++ b/mysql-wsrep-5.6/sql/sql_show.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -372,7 +372,7 @@ ignore_db_dirs_init() static uchar * db_dirs_hash_get_key(const uchar *data, size_t *len_ret, - my_bool __attribute__((unused))) + my_bool MY_ATTRIBUTE((unused))) { LEX_STRING *e= (LEX_STRING *) data; @@ -2035,8 +2035,8 @@ public: { return (void*) sql_alloc((uint) size); } - static void operator delete(void *ptr __attribute__((unused)), - size_t size __attribute__((unused))) + static void operator delete(void *ptr MY_ATTRIBUTE((unused)), + size_t size MY_ATTRIBUTE((unused))) { TRASH(ptr, size); } ulong thread_id; diff --git a/mysql-wsrep-5.6/sql/sql_string.cc b/mysql-wsrep-5.6/sql/sql_string.cc index d152301e..02298cb1 100644 --- a/mysql-wsrep-5.6/sql/sql_string.cc +++ b/mysql-wsrep-5.6/sql/sql_string.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights * reserved. This program is free software; you can redistribute it and/or modify @@ -433,10 +433,11 @@ void String::strip_sp() bool String::append(const String &s) { - DBUG_ASSERT(!this->uses_buffer_owned_by(&s)); - DBUG_ASSERT(!s.uses_buffer_owned_by(this)); if (s.length()) { + DBUG_ASSERT(!this->uses_buffer_owned_by(&s)); + DBUG_ASSERT(!s.uses_buffer_owned_by(this)); + if (realloc(str_length+s.length())) return TRUE; memcpy(Ptr+str_length,s.ptr(),s.length()); diff --git a/mysql-wsrep-5.6/sql/sql_table.cc b/mysql-wsrep-5.6/sql/sql_table.cc index b90716ea..baee91c2 100644 --- a/mysql-wsrep-5.6/sql/sql_table.cc +++ b/mysql-wsrep-5.6/sql/sql_table.cc @@ -5567,7 +5567,7 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table, TABLE_LIST* src_table, */ create_info->used_fields|= HA_CREATE_USED_ENGINE; - int result __attribute__((unused))= + int result MY_ATTRIBUTE((unused))= store_create_info(thd, table, &query, create_info, TRUE /* show_database */); diff --git a/mysql-wsrep-5.6/sql/sql_time.cc b/mysql-wsrep-5.6/sql/sql_time.cc index 0349d894..b57649b0 100644 --- a/mysql-wsrep-5.6/sql/sql_time.cc +++ b/mysql-wsrep-5.6/sql/sql_time.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1187,7 +1187,7 @@ const char *get_date_time_format_str(KNOWN_DATE_TIME_FORMAT *format, @param OUT str String to conver to @param dec Number of fractional digits. */ -void make_time(const DATE_TIME_FORMAT *format __attribute__((unused)), +void make_time(const DATE_TIME_FORMAT *format MY_ATTRIBUTE((unused)), const MYSQL_TIME *l_time, String *str, uint dec) { uint length= (uint) my_time_to_str(l_time, (char*) str->ptr(), dec); @@ -1202,7 +1202,7 @@ void make_time(const DATE_TIME_FORMAT *format __attribute__((unused)), @param l_time DATE value @param OUT str String to conver to */ -void make_date(const DATE_TIME_FORMAT *format __attribute__((unused)), +void make_date(const DATE_TIME_FORMAT *format MY_ATTRIBUTE((unused)), const MYSQL_TIME *l_time, String *str) { uint length= (uint) my_date_to_str(l_time, (char*) str->ptr()); @@ -1218,7 +1218,7 @@ void make_date(const DATE_TIME_FORMAT *format __attribute__((unused)), @param OUT str String to conver to @param dec Number of fractional digits. */ -void make_datetime(const DATE_TIME_FORMAT *format __attribute__((unused)), +void make_datetime(const DATE_TIME_FORMAT *format MY_ATTRIBUTE((unused)), const MYSQL_TIME *l_time, String *str, uint dec) { uint length= (uint) my_datetime_to_str(l_time, (char*) str->ptr(), dec); diff --git a/mysql-wsrep-5.6/sql/sql_tmp_table.cc b/mysql-wsrep-5.6/sql/sql_tmp_table.cc index f664e8f8..1e966012 100644 --- a/mysql-wsrep-5.6/sql/sql_tmp_table.cc +++ b/mysql-wsrep-5.6/sql/sql_tmp_table.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -359,6 +359,7 @@ Field *create_tmp_field(THD *thd, TABLE *table,Item *item, Item::Type type, case Item::REF_ITEM: case Item::NULL_ITEM: case Item::VARBIN_ITEM: + case Item::PARAM_ITEM: if (make_copy_field) { DBUG_ASSERT(((Item_result_field*)item)->result_field); diff --git a/mysql-wsrep-5.6/sql/sql_udf.cc b/mysql-wsrep-5.6/sql/sql_udf.cc index a7c44d23..8527173e 100644 --- a/mysql-wsrep-5.6/sql/sql_udf.cc +++ b/mysql-wsrep-5.6/sql/sql_udf.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -94,7 +94,7 @@ static char *init_syms(udf_func *tmp, char *nm) extern "C" uchar* get_hash_key(const uchar *buff, size_t *length, - my_bool not_used __attribute__((unused))) + my_bool not_used MY_ATTRIBUTE((unused))) { udf_func *udf=(udf_func*) buff; *length=(uint) udf->name.length; diff --git a/mysql-wsrep-5.6/sql/sql_update.cc b/mysql-wsrep-5.6/sql/sql_update.cc index 5ee39eb4..5305fae6 100644 --- a/mysql-wsrep-5.6/sql/sql_update.cc +++ b/mysql-wsrep-5.6/sql/sql_update.cc @@ -452,7 +452,7 @@ int mysql_update(THD *thd, /* Update the table->file->stats.records number */ table->file->info(HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK); - table->mark_columns_needed_for_update(); + table->mark_columns_needed_for_update(false/*mark_binlog_columns=false*/); select= make_select(table, 0, 0, conds, 0, &error); { // Enter scope for optimizer trace wrapper @@ -530,7 +530,7 @@ int mysql_update(THD *thd, #ifdef WITH_PARTITION_STORAGE_ENGINE used_key_is_modified|= partition_key_modified(table, table->write_set); #endif - + table->mark_columns_per_binlog_row_image(); using_filesort= order && (need_sort||used_key_is_modified); if (thd->lex->describe) { @@ -1863,12 +1863,12 @@ multi_update::initialize_tables(JOIN *join) { if (safe_update_on_fly(thd, join->join_tab, table_ref, all_tables)) { - table->mark_columns_needed_for_update(); + table->mark_columns_needed_for_update(true/*mark_binlog_columns=true*/); table_to_update= table; // Update table on the fly continue; } } - table->mark_columns_needed_for_update(); + table->mark_columns_needed_for_update(true/*mark_binlog_columns=true*/); /* enable uncacheable flag if we update a view with check option diff --git a/mysql-wsrep-5.6/sql/sql_yacc.yy b/mysql-wsrep-5.6/sql/sql_yacc.yy index 1b94b6df..b2f54e25 100644 --- a/mysql-wsrep-5.6/sql/sql_yacc.yy +++ b/mysql-wsrep-5.6/sql/sql_yacc.yy @@ -113,18 +113,18 @@ int yylex(void *yylval, void *yythd);
   yyerrlab1:
   #if defined (__GNUC_MINOR__) && 2093 <= (__GNUC__ * 1000 + __GNUC_MINOR__)
-    __attribute__ ((__unused__))
+    MY_ATTRIBUTE ((__unused__))
   #endif
 
- This usage of __attribute__ is illegal, so we remove it. + This usage of MY_ATTRIBUTE is illegal, so we remove it. See the following references for details: http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00014.html http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14273 */ #if defined (__GNUC_MINOR__) && 2093 <= (__GNUC__ * 1000 + __GNUC_MINOR__) -#undef __attribute__ -#define __attribute__(X) +#undef MY_ATTRIBUTE +#define MY_ATTRIBUTE(X) #endif @@ -2515,6 +2515,11 @@ server_def: ident_or_text OPTIONS_SYM '(' server_options_list ')' { + if ($2.length == 0) + { + my_error(ER_WRONG_VALUE, MYF(0), "server name", ""); + MYSQL_YYABORT; + } Lex->server_options.server_name= $2.str; Lex->server_options.server_name_length= $2.length; Lex->server_options.scheme= $6.str; diff --git a/mysql-wsrep-5.6/sql/sys_vars.cc b/mysql-wsrep-5.6/sql/sys_vars.cc index 8f403d08..3d1b7aa1 100644 --- a/mysql-wsrep-5.6/sql/sys_vars.cc +++ b/mysql-wsrep-5.6/sql/sys_vars.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -3686,6 +3686,14 @@ static bool check_log_path(sys_var *self, THD *thd, set_var *var) if (!var->save_result.string_value.str) return true; + if (!is_valid_log_name(var->save_result.string_value.str, + var->save_result.string_value.length)) + { + my_error(ER_WRONG_VALUE_FOR_VAR, MYF(0), + self->name.str, var->save_result.string_value.str); + return true; + } + if (var->save_result.string_value.length > FN_REFLEN) { // path is too long my_error(ER_PATH_LENGTH, MYF(0), self->name.str); @@ -3732,7 +3740,7 @@ static bool check_log_path(sys_var *self, THD *thd, set_var *var) return false; } static bool fix_log(char** logname, const char* default_logname, - const char*ext, bool enabled, void (*reopen)(char*)) + const char*ext, bool enabled, bool (*reopen)(char*)) { if (!*logname) // SET ... = DEFAULT { @@ -3744,16 +3752,17 @@ static bool fix_log(char** logname, const char* default_logname, } logger.lock_exclusive(); mysql_mutex_unlock(&LOCK_global_system_variables); + bool error= false; if (enabled) - reopen(*logname); + error= reopen(*logname); logger.unlock(); mysql_mutex_lock(&LOCK_global_system_variables); - return false; + return error; } -static void reopen_general_log(char* name) +static bool reopen_general_log(char* name) { logger.get_log_file_handler()->close(0); - logger.get_log_file_handler()->open_query_log(name); + return logger.get_log_file_handler()->open_query_log(name); } static bool fix_general_log_file(sys_var *self, THD *thd, enum_var_type type) { @@ -3766,10 +3775,10 @@ static Sys_var_charptr Sys_general_log_path( IN_FS_CHARSET, DEFAULT(0), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(check_log_path), ON_UPDATE(fix_general_log_file)); -static void reopen_slow_log(char* name) +static bool reopen_slow_log(char* name) { logger.get_slow_log_file_handler()->close(0); - logger.get_slow_log_file_handler()->open_slow_log(name); + return logger.get_slow_log_file_handler()->open_slow_log(name); } static bool fix_slow_log_file(sys_var *self, THD *thd, enum_var_type type) { @@ -4399,13 +4408,14 @@ static Sys_var_charptr Sys_wsrep_start_position ( static Sys_var_ulong Sys_wsrep_max_ws_size ( "wsrep_max_ws_size", "Max write set size (bytes)", GLOBAL_VAR(wsrep_max_ws_size), CMD_LINE(REQUIRED_ARG), - /* Upper limit is 65K short of 4G to avoid overlows on 32-bit systems */ - VALID_RANGE(1024, WSREP_MAX_WS_SIZE), DEFAULT(1073741824UL), BLOCK_SIZE(1)); + VALID_RANGE(1024, WSREP_MAX_WS_SIZE), DEFAULT(WSREP_MAX_WS_SIZE), + BLOCK_SIZE(1), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0), + ON_UPDATE(wsrep_max_ws_size_update)); static Sys_var_ulong Sys_wsrep_max_ws_rows ( "wsrep_max_ws_rows", "Max number of rows in write set", GLOBAL_VAR(wsrep_max_ws_rows), CMD_LINE(REQUIRED_ARG), - VALID_RANGE(1, 1048576), DEFAULT(131072), BLOCK_SIZE(1)); + VALID_RANGE(0, 1048576), DEFAULT(0), BLOCK_SIZE(1)); static Sys_var_charptr Sys_wsrep_notify_cmd( "wsrep_notify_cmd", "", diff --git a/mysql-wsrep-5.6/sql/table.cc b/mysql-wsrep-5.6/sql/table.cc index 7481677e..b53a3e9d 100644 --- a/mysql-wsrep-5.6/sql/table.cc +++ b/mysql-wsrep-5.6/sql/table.cc @@ -1,5 +1,5 @@ /* - Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -210,7 +210,7 @@ View_creation_ctx * View_creation_ctx::create(THD *thd, /* Get column name from column hash */ static uchar *get_field_name(Field **buff, size_t *length, - my_bool not_used __attribute__((unused))) + my_bool not_used MY_ATTRIBUTE((unused))) { *length= (uint) strlen((*buff)->field_name); return (uchar*) (*buff)->field_name; @@ -5353,12 +5353,14 @@ void TABLE::mark_columns_needed_for_delete() @brief Mark columns needed for doing an update of a row + @param mark_binlog_columns if true, mark columns as per binlog_row_image + requirements. @details Some engines needs to have all columns in an update (to be able to build a complete row). If this is the case, we mark all not updated columns to be read. - If this is no the case, we do like in the delete case and mark + If this is not the case, we do like in the delete case and mark if neeed, either the primary key column or all columns to be read. (see mark_columns_needed_for_delete() for details) @@ -5366,17 +5368,30 @@ void TABLE::mark_columns_needed_for_delete() mark all USED key columns as 'to-be-read'. This allows the engine to loop over the given record to find all changed keys and doesn't have to retrieve the row again. - + Unlike other similar methods, it doesn't mark fields used by triggers, that is the responsibility of the caller to do, by using Table_triggers_list::mark_used_fields(TRG_EVENT_UPDATE)! + + Note: Marking additional columns as per binlog_row_image requirements will + influence query execution plan. For example in the case of + binlog_row_image=FULL the entire read_set and write_set needs to be flagged. + This will influence update query to think that 'used key is being modified' + and query will create a temporary table to process the update operation. + Which will result in performance degradation. Hence callers who don't want + their query execution to be influenced as per binlog_row_image requirements + can skip marking binlog specific columns here and they should make an + explicit call to 'mark_columns_per_binlog_row_image()' function to mark + binlog_row_image specific columns. */ -void TABLE::mark_columns_needed_for_update() +void TABLE::mark_columns_needed_for_update(bool mark_binlog_columns) { DBUG_ENTER("mark_columns_needed_for_update"); - mark_columns_per_binlog_row_image(); + + if (mark_binlog_columns) + mark_columns_per_binlog_row_image(); if (file->ha_table_flags() & HA_REQUIRES_KEY_COLUMNS_FOR_DELETE) { /* Mark all used key columns for read */ diff --git a/mysql-wsrep-5.6/sql/table.h b/mysql-wsrep-5.6/sql/table.h index ea790ec4..43e91246 100644 --- a/mysql-wsrep-5.6/sql/table.h +++ b/mysql-wsrep-5.6/sql/table.h @@ -1,7 +1,7 @@ #ifndef TABLE_INCLUDED #define TABLE_INCLUDED -/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1216,7 +1216,7 @@ public: void mark_columns_used_by_index_no_reset(uint index, MY_BITMAP *map); void mark_columns_used_by_index(uint index); void mark_auto_increment_column(void); - void mark_columns_needed_for_update(void); + void mark_columns_needed_for_update(bool mark_binlog_columns); void mark_columns_needed_for_delete(void); void mark_columns_needed_for_insert(void); void mark_columns_per_binlog_row_image(void); diff --git a/mysql-wsrep-5.6/sql/table_cache.cc b/mysql-wsrep-5.6/sql/table_cache.cc index cca5727c..e87b0a23 100644 --- a/mysql-wsrep-5.6/sql/table_cache.cc +++ b/mysql-wsrep-5.6/sql/table_cache.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -33,7 +33,7 @@ PSI_mutex_info Table_cache::m_mutex_keys[]= { extern "C" uchar *table_cache_key(const uchar *record, size_t *length, - my_bool not_used __attribute__((unused))) + my_bool not_used MY_ATTRIBUTE((unused))) { TABLE_SHARE *share= ((Table_cache_element*)record)->get_share(); *length= share->table_cache_key.length; diff --git a/mysql-wsrep-5.6/sql/tztime.cc b/mysql-wsrep-5.6/sql/tztime.cc index 1fc75dba..bb5249f7 100644 --- a/mysql-wsrep-5.6/sql/tztime.cc +++ b/mysql-wsrep-5.6/sql/tztime.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1490,7 +1490,7 @@ public: extern "C" uchar * my_tz_names_get_key(Tz_names_entry *entry, size_t *length, - my_bool not_used __attribute__((unused))) + my_bool not_used MY_ATTRIBUTE((unused))) { *length= entry->name.length(); return (uchar*) entry->name.ptr(); @@ -1499,7 +1499,7 @@ my_tz_names_get_key(Tz_names_entry *entry, size_t *length, extern "C" uchar * my_offset_tzs_get_key(Time_zone_offset *entry, size_t *length, - my_bool not_used __attribute__((unused))) + my_bool not_used MY_ATTRIBUTE((unused))) { *length= sizeof(long); return (uchar*) &entry->offset; diff --git a/mysql-wsrep-5.6/sql/udf_example.cc b/mysql-wsrep-5.6/sql/udf_example.cc index 1b1c92e7..3b22eb67 100644 --- a/mysql-wsrep-5.6/sql/udf_example.cc +++ b/mysql-wsrep-5.6/sql/udf_example.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -227,7 +227,7 @@ my_bool metaphon_init(UDF_INIT *initid, UDF_ARGS *args, char *message) ****************************************************************************/ -void metaphon_deinit(UDF_INIT *initid __attribute__((unused))) +void metaphon_deinit(UDF_INIT *initid MY_ATTRIBUTE((unused))) { } @@ -273,9 +273,9 @@ static char codes[26] = { #define NOGHTOF(x) (codes[(x) - 'A'] & 16) /* BDH */ -char *metaphon(UDF_INIT *initid __attribute__((unused)), +char *metaphon(UDF_INIT *initid MY_ATTRIBUTE((unused)), UDF_ARGS *args, char *result, unsigned long *length, - char *is_null, char *error __attribute__((unused))) + char *is_null, char *error MY_ATTRIBUTE((unused))) { const char *word=args->args[0]; const char *w_end; @@ -550,8 +550,8 @@ my_bool myfunc_double_init(UDF_INIT *initid, UDF_ARGS *args, char *message) } -double myfunc_double(UDF_INIT *initid __attribute__((unused)), UDF_ARGS *args, - char *is_null, char *error __attribute__((unused))) +double myfunc_double(UDF_INIT *initid MY_ATTRIBUTE((unused)), UDF_ARGS *args, + char *is_null, char *error MY_ATTRIBUTE((unused))) { unsigned long val = 0; unsigned long v = 0; @@ -589,9 +589,9 @@ double myfunc_double(UDF_INIT *initid __attribute__((unused)), UDF_ARGS *args, /* This function returns the sum of all arguments */ -longlong myfunc_int(UDF_INIT *initid __attribute__((unused)), UDF_ARGS *args, - char *is_null __attribute__((unused)), - char *error __attribute__((unused))) +longlong myfunc_int(UDF_INIT *initid MY_ATTRIBUTE((unused)), UDF_ARGS *args, + char *is_null MY_ATTRIBUTE((unused)), + char *error MY_ATTRIBUTE((unused))) { longlong val = 0; uint i; @@ -621,9 +621,9 @@ longlong myfunc_int(UDF_INIT *initid __attribute__((unused)), UDF_ARGS *args, At least one of _init/_deinit is needed unless the server is started with --allow_suspicious_udfs. */ -my_bool myfunc_int_init(UDF_INIT *initid __attribute__((unused)), - UDF_ARGS *args __attribute__((unused)), - char *message __attribute__((unused))) +my_bool myfunc_int_init(UDF_INIT *initid MY_ATTRIBUTE((unused)), + UDF_ARGS *args MY_ATTRIBUTE((unused)), + char *message MY_ATTRIBUTE((unused))) { return 0; } @@ -663,9 +663,9 @@ void sequence_deinit(UDF_INIT *initid) free(initid->ptr); } -longlong sequence(UDF_INIT *initid __attribute__((unused)), UDF_ARGS *args, - char *is_null __attribute__((unused)), - char *error __attribute__((unused))) +longlong sequence(UDF_INIT *initid MY_ATTRIBUTE((unused)), UDF_ARGS *args, + char *is_null MY_ATTRIBUTE((unused)), + char *error MY_ATTRIBUTE((unused))) { ulonglong val=0; if (args->arg_count) @@ -727,16 +727,16 @@ my_bool lookup_init(UDF_INIT *initid, UDF_ARGS *args, char *message) return 0; } -void lookup_deinit(UDF_INIT *initid __attribute__((unused))) +void lookup_deinit(UDF_INIT *initid MY_ATTRIBUTE((unused))) { #if !defined(HAVE_GETHOSTBYADDR_R) || !defined(HAVE_SOLARIS_STYLE_GETHOST) (void) pthread_mutex_destroy(&LOCK_hostname); #endif } -char *lookup(UDF_INIT *initid __attribute__((unused)), UDF_ARGS *args, +char *lookup(UDF_INIT *initid MY_ATTRIBUTE((unused)), UDF_ARGS *args, char *result, unsigned long *res_length, char *null_value, - char *error __attribute__((unused))) + char *error MY_ATTRIBUTE((unused))) { uint length; char name_buff[256]; @@ -807,16 +807,16 @@ my_bool reverse_lookup_init(UDF_INIT *initid, UDF_ARGS *args, char *message) return 0; } -void reverse_lookup_deinit(UDF_INIT *initid __attribute__((unused))) +void reverse_lookup_deinit(UDF_INIT *initid MY_ATTRIBUTE((unused))) { #if !defined(HAVE_GETHOSTBYADDR_R) || !defined(HAVE_SOLARIS_STYLE_GETHOST) (void) pthread_mutex_destroy(&LOCK_hostname); #endif } -char *reverse_lookup(UDF_INIT *initid __attribute__((unused)), UDF_ARGS *args, +char *reverse_lookup(UDF_INIT *initid MY_ATTRIBUTE((unused)), UDF_ARGS *args, char *result, unsigned long *res_length, - char *null_value, char *error __attribute__((unused))) + char *null_value, char *error MY_ATTRIBUTE((unused))) { #if defined(HAVE_GETHOSTBYADDR_R) && defined(HAVE_SOLARIS_STYLE_GETHOST) char name_buff[256]; @@ -970,8 +970,8 @@ avgcost_reset(UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* message) /* This is needed to get things to work in MySQL 4.1.1 and above */ void -avgcost_clear(UDF_INIT* initid, char* is_null __attribute__((unused)), - char* message __attribute__((unused))) +avgcost_clear(UDF_INIT* initid, char* is_null MY_ATTRIBUTE((unused)), + char* message MY_ATTRIBUTE((unused))) { struct avgcost_data* data = (struct avgcost_data*)initid->ptr; data->totalprice= 0.0; @@ -982,8 +982,8 @@ avgcost_clear(UDF_INIT* initid, char* is_null __attribute__((unused)), void avgcost_add(UDF_INIT* initid, UDF_ARGS* args, - char* is_null __attribute__((unused)), - char* message __attribute__((unused))) + char* is_null MY_ATTRIBUTE((unused)), + char* message MY_ATTRIBUTE((unused))) { if (args->args[0] && args->args[1]) { @@ -1029,8 +1029,8 @@ avgcost_add(UDF_INIT* initid, UDF_ARGS* args, double -avgcost( UDF_INIT* initid, UDF_ARGS* args __attribute__((unused)), - char* is_null, char* error __attribute__((unused))) +avgcost( UDF_INIT* initid, UDF_ARGS* args MY_ATTRIBUTE((unused)), + char* is_null, char* error MY_ATTRIBUTE((unused))) { struct avgcost_data* data = (struct avgcost_data*)initid->ptr; if (!data->count || !data->totalquantity) @@ -1063,10 +1063,10 @@ my_bool myfunc_argument_name_init(UDF_INIT *initid, UDF_ARGS *args, return 0; } -char *myfunc_argument_name(UDF_INIT *initid __attribute__((unused)), +char *myfunc_argument_name(UDF_INIT *initid MY_ATTRIBUTE((unused)), UDF_ARGS *args, char *result, unsigned long *length, char *null_value, - char *error __attribute__((unused))) + char *error MY_ATTRIBUTE((unused))) { if (!args->attributes[0]) { @@ -1094,9 +1094,9 @@ my_bool is_const_init(UDF_INIT *initid, UDF_ARGS *args, char *message) return 0; } -char * is_const(UDF_INIT *initid, UDF_ARGS *args __attribute__((unused)), +char * is_const(UDF_INIT *initid, UDF_ARGS *args MY_ATTRIBUTE((unused)), char *result, unsigned long *length, - char *is_null, char *error __attribute__((unused))) + char *is_null, char *error MY_ATTRIBUTE((unused))) { if (initid->ptr != 0) { sprintf(result, "const"); @@ -1135,9 +1135,9 @@ my_bool check_const_len_init(UDF_INIT *initid, UDF_ARGS *args, char *message) } extern "C" -char * check_const_len(UDF_INIT *initid, UDF_ARGS *args __attribute__((unused)), +char * check_const_len(UDF_INIT *initid, UDF_ARGS *args MY_ATTRIBUTE((unused)), char *result, unsigned long *length, - char *is_null, char *error __attribute__((unused))) + char *is_null, char *error MY_ATTRIBUTE((unused))) { strmov(result, initid->ptr); *length= (uint) strlen(result); @@ -1183,8 +1183,8 @@ void my_median_deinit(UDF_INIT* initid) } void my_median_add(UDF_INIT* initid, UDF_ARGS* args, - char* is_null __attribute__((unused)), - char* message __attribute__((unused))) + char* is_null MY_ATTRIBUTE((unused)), + char* message MY_ATTRIBUTE((unused))) { My_median_data *data= static_cast(static_cast(initid->ptr)); @@ -1197,8 +1197,8 @@ void my_median_add(UDF_INIT* initid, UDF_ARGS* args, } void my_median_clear(UDF_INIT* initid, UDF_ARGS* args, - char* is_null __attribute__((unused)), - char* message __attribute__((unused))) + char* is_null MY_ATTRIBUTE((unused)), + char* message MY_ATTRIBUTE((unused))) { My_median_data *data= static_cast(static_cast(initid->ptr)); @@ -1207,7 +1207,7 @@ void my_median_clear(UDF_INIT* initid, UDF_ARGS* args, longlong my_median(UDF_INIT* initid, UDF_ARGS* args, char* is_null, - char* message __attribute__((unused))) + char* message MY_ATTRIBUTE((unused))) { My_median_data *data= static_cast(static_cast(initid->ptr)); diff --git a/mysql-wsrep-5.6/sql/wsrep_applier.cc b/mysql-wsrep-5.6/sql/wsrep_applier.cc index ad2265c5..39324781 100644 --- a/mysql-wsrep-5.6/sql/wsrep_applier.cc +++ b/mysql-wsrep-5.6/sql/wsrep_applier.cc @@ -40,15 +40,8 @@ static Log_event* wsrep_read_log_event( const char *error= 0; Log_event *res= 0; - if (data_len > wsrep_max_ws_size) - { - error = "Event too big"; - goto err; - } - res= Log_event::read_log_event(buf, data_len, &error, description_event, 0); -err: if (!res) { DBUG_ASSERT(error != 0); diff --git a/mysql-wsrep-5.6/sql/wsrep_binlog.h b/mysql-wsrep-5.6/sql/wsrep_binlog.h index a7b680f6..c29d51ca 100644 --- a/mysql-wsrep-5.6/sql/wsrep_binlog.h +++ b/mysql-wsrep-5.6/sql/wsrep_binlog.h @@ -19,7 +19,7 @@ #include "sql_class.h" // THD, IO_CACHE #define HEAP_PAGE_SIZE 65536 /* 64K */ -#define WSREP_MAX_WS_SIZE (0xFFFFFFFFUL - HEAP_PAGE_SIZE) +#define WSREP_MAX_WS_SIZE 2147483647 /* 2GB */ /* Write the contents of a cache to a memory buffer. diff --git a/mysql-wsrep-5.6/sql/wsrep_hton.cc b/mysql-wsrep-5.6/sql/wsrep_hton.cc index 33667480..cbe8c0a0 100644 --- a/mysql-wsrep-5.6/sql/wsrep_hton.cc +++ b/mysql-wsrep-5.6/sql/wsrep_hton.cc @@ -38,11 +38,14 @@ enum wsrep_trx_status wsrep_run_wsrep_commit(THD *thd, handlerton *hton, */ void wsrep_cleanup_transaction(THD *thd) { + if (!WSREP(thd)) return; + if (wsrep_emulate_bin_log) thd_binlog_trx_reset(thd); thd->wsrep_ws_handle.trx_id= WSREP_UNDEFINED_TRX_ID; thd->wsrep_trx_meta.gtid= WSREP_GTID_UNDEFINED; thd->wsrep_trx_meta.depends_on= WSREP_SEQNO_UNDEFINED; thd->wsrep_exec_mode= LOCAL_STATE; + thd->wsrep_affected_rows= 0; return; } @@ -111,6 +114,8 @@ void wsrep_register_hton(THD* thd, bool all) */ void wsrep_post_commit(THD* thd, bool all) { + if (!WSREP(thd)) return; + switch (thd->wsrep_exec_mode) { case LOCAL_COMMIT: @@ -440,7 +445,8 @@ wsrep_run_wsrep_commit(THD *thd, handlerton *hton, bool all) "wsrep status (%d %d %d)", WSREP_QUERY(thd), thd->get_stmt_da()->affected_rows(), - stmt_has_updated_trans_table(thd), thd->variables.sql_log_bin, + stmt_has_updated_trans_table(thd->transaction.stmt.ha_list), + thd->variables.sql_log_bin, thd->wsrep_exec_mode, thd->wsrep_query_state, thd->wsrep_conflict_state); } diff --git a/mysql-wsrep-5.6/sql/wsrep_mysqld.cc b/mysql-wsrep-5.6/sql/wsrep_mysqld.cc index edceaa80..96004983 100644 --- a/mysql-wsrep-5.6/sql/wsrep_mysqld.cc +++ b/mysql-wsrep-5.6/sql/wsrep_mysqld.cc @@ -73,7 +73,7 @@ my_bool wsrep_slave_FK_checks = 0; // slave thread does FK checks * End configuration options */ -static const wsrep_uuid_t cluster_uuid = WSREP_UUID_UNDEFINED; +static wsrep_uuid_t cluster_uuid = WSREP_UUID_UNDEFINED; static char cluster_uuid_str[40]= { 0, }; static const char* cluster_status_str[WSREP_VIEW_MAX] = { @@ -186,8 +186,7 @@ wsrep_view_handler_cb (void* app_ctx, if (memcmp(&cluster_uuid, &view->state_id.uuid, sizeof(wsrep_uuid_t))) { - memcpy((wsrep_uuid_t*)&cluster_uuid, &view->state_id.uuid, - sizeof(cluster_uuid)); + memcpy(&cluster_uuid, &view->state_id.uuid, sizeof(cluster_uuid)); wsrep_uuid_print (&cluster_uuid, cluster_uuid_str, sizeof(cluster_uuid_str)); @@ -455,8 +454,7 @@ int wsrep_init() WSREP_ERROR("wsrep_load(%s) failed: %s (%d). Reverting to no provider.", wsrep_provider, strerror(rcode), rcode); strcpy((char*)wsrep_provider, WSREP_NONE); // damn it's a dirty hack - (void) wsrep_init(); - return rcode; + return wsrep_init(); } else /* this is for recursive call above */ { @@ -643,6 +641,9 @@ void wsrep_init_startup (bool first) wsrep_thr_lock_init(wsrep_thd_is_BF, wsrep_abort_thd, wsrep_debug, wsrep_convert_LOCK_to_trx, wsrep_on); + /* Skip replication start if dummy wsrep provider is loaded */ + if (!strcmp(wsrep_provider, WSREP_NONE)) return; + /* Skip replication start if no cluster address */ if (!wsrep_cluster_address || strlen(wsrep_cluster_address) == 0) return; diff --git a/mysql-wsrep-5.6/sql/wsrep_mysqld.h b/mysql-wsrep-5.6/sql/wsrep_mysqld.h index 8a25588b..bfc94af9 100644 --- a/mysql-wsrep-5.6/sql/wsrep_mysqld.h +++ b/mysql-wsrep-5.6/sql/wsrep_mysqld.h @@ -201,8 +201,10 @@ extern void wsrep_prepend_PATH (const char* path); /* Other global variables */ extern wsrep_seqno_t wsrep_locked_seqno; -#define WSREP_ON \ - (global_system_variables.wsrep_on) +#define WSREP_ON \ + ((global_system_variables.wsrep_on) && \ + wsrep_provider && \ + strcmp(wsrep_provider, WSREP_NONE)) #define WSREP(thd) \ (WSREP_ON && wsrep && (thd && thd->variables.wsrep_on)) diff --git a/mysql-wsrep-5.6/sql/wsrep_thd.cc b/mysql-wsrep-5.6/sql/wsrep_thd.cc index 9a64386a..07783893 100644 --- a/mysql-wsrep-5.6/sql/wsrep_thd.cc +++ b/mysql-wsrep-5.6/sql/wsrep_thd.cc @@ -172,6 +172,8 @@ static void wsrep_prepare_bf_thd(THD *thd, struct wsrep_thd_shadow* shadow) shadow->db = thd->db; shadow->db_length = thd->db_length; thd->reset_db(NULL, 0); + + shadow->user_time = thd->user_time; } static void wsrep_return_from_bf_mode(THD *thd, struct wsrep_thd_shadow* shadow) @@ -182,6 +184,7 @@ static void wsrep_return_from_bf_mode(THD *thd, struct wsrep_thd_shadow* shadow) thd->net.vio = shadow->vio; thd->variables.tx_isolation = shadow->tx_isolation; thd->reset_db(shadow->db, shadow->db_length); + thd->user_time = shadow->user_time; } void wsrep_replay_transaction(THD *thd) diff --git a/mysql-wsrep-5.6/sql/wsrep_var.cc b/mysql-wsrep-5.6/sql/wsrep_var.cc index 7993fc97..cb7c4fda 100644 --- a/mysql-wsrep-5.6/sql/wsrep_var.cc +++ b/mysql-wsrep-5.6/sql/wsrep_var.cc @@ -186,6 +186,32 @@ void wsrep_start_position_init (const char* val) wsrep_set_local_position (val, false); } +static int get_provider_option_value(const char* opts, + const char* opt_name, + ulong* opt_value) +{ + int ret= 1; + ulong opt_value_tmp; + char *opt_value_str, *s, *opts_copy= my_strdup(opts, MYF(MY_WME)); + + if ((opt_value_str= strstr(opts_copy, opt_name)) == NULL) + goto end; + opt_value_str= strtok_r(opt_value_str, "=", &s); + if (opt_value_str == NULL) goto end; + opt_value_str= strtok_r(NULL, ";", &s); + if (opt_value_str == NULL) goto end; + + opt_value_tmp= strtoul(opt_value_str, NULL, 10); + if (errno == ERANGE) goto end; + + *opt_value= opt_value_tmp; + ret= 0; + +end: + my_free(opts_copy); + return ret; +} + static bool refresh_provider_options() { WSREP_DEBUG("refresh_provider_options: %s", @@ -193,9 +219,11 @@ static bool refresh_provider_options() char* opts= wsrep->options_get(wsrep); if (opts) { - if (wsrep_provider_options) my_free((void *)wsrep_provider_options); - wsrep_provider_options = (char*)my_memdup(opts, strlen(opts) + 1, - MYF(MY_WME)); + wsrep_provider_options_init(opts); + get_provider_option_value(wsrep_provider_options, + (char*)"repl.max_ws_size", + &wsrep_max_ws_size); + free(opts); } else { @@ -561,6 +589,21 @@ bool wsrep_desync_update (sys_var *self, THD* thd, enum_var_type type) return false; } +bool wsrep_max_ws_size_update (sys_var *self, THD *thd, enum_var_type) +{ + char max_ws_size_opt[128]; + my_snprintf(max_ws_size_opt, sizeof(max_ws_size_opt), + "repl.max_ws_size=%d", wsrep_max_ws_size); + wsrep_status_t ret= wsrep->options_set(wsrep, max_ws_size_opt); + if (ret != WSREP_OK) + { + WSREP_ERROR("Set options returned %d", ret); + refresh_provider_options(); + return true; + } + return refresh_provider_options(); +} + /* * Status variables stuff below */ diff --git a/mysql-wsrep-5.6/sql/wsrep_var.h b/mysql-wsrep-5.6/sql/wsrep_var.h index da18854e..5030a677 100644 --- a/mysql-wsrep-5.6/sql/wsrep_var.h +++ b/mysql-wsrep-5.6/sql/wsrep_var.h @@ -81,6 +81,8 @@ extern bool wsrep_slave_threads_update UPDATE_ARGS; extern bool wsrep_desync_check CHECK_ARGS; extern bool wsrep_desync_update UPDATE_ARGS; +extern bool wsrep_max_ws_size_update UPDATE_ARGS; + extern bool wsrep_reject_queries_update UPDATE_ARGS; #endif /* WSREP_VAR_H */ diff --git a/mysql-wsrep-5.6/storage/archive/archive_reader.c b/mysql-wsrep-5.6/storage/archive/archive_reader.c index 2475418f..838479e6 100644 --- a/mysql-wsrep-5.6/storage/archive/archive_reader.c +++ b/mysql-wsrep-5.6/storage/archive/archive_reader.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -22,6 +22,7 @@ #include #include #include +#include // ORACLE_WELCOME_COPYRIGHT_NOTICE #define BUFFER_LEN 1024 #define ARCHIVE_ROW_HEADER_SIZE 4 @@ -292,7 +293,7 @@ end: static my_bool get_one_option(int optid, - const struct my_option *opt __attribute__((unused)), + const struct my_option *opt MY_ATTRIBUTE((unused)), char *argument) { switch (optid) { @@ -388,8 +389,8 @@ static struct my_option my_long_options[] = static void usage(void) { print_version(); - puts("Copyright 2007-2008 MySQL AB, 2008 Sun Microsystems, Inc."); - puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license\n"); + puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2007")); + puts("Read and modify Archive files directly\n"); printf("Usage: %s [OPTIONS] file_to_be_looked_at [file_for_backup]\n", my_progname); print_defaults("my", load_default_groups); diff --git a/mysql-wsrep-5.6/storage/blackhole/ha_blackhole.cc b/mysql-wsrep-5.6/storage/blackhole/ha_blackhole.cc index 1ec66df0..4a70b4d6 100644 --- a/mysql-wsrep-5.6/storage/blackhole/ha_blackhole.cc +++ b/mysql-wsrep-5.6/storage/blackhole/ha_blackhole.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -383,7 +383,7 @@ static void blackhole_free_key(st_blackhole_share *share) } static uchar* blackhole_get_key(st_blackhole_share *share, size_t *length, - my_bool not_used __attribute__((unused))) + my_bool not_used MY_ATTRIBUTE((unused))) { *length= share->table_name_length; return (uchar*) share->table_name; diff --git a/mysql-wsrep-5.6/storage/csv/ha_tina.cc b/mysql-wsrep-5.6/storage/csv/ha_tina.cc index 09de75a0..25c2199c 100644 --- a/mysql-wsrep-5.6/storage/csv/ha_tina.cc +++ b/mysql-wsrep-5.6/storage/csv/ha_tina.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -102,7 +102,7 @@ int sort_set (tina_set *a, tina_set *b) } static uchar* tina_get_key(TINA_SHARE *share, size_t *length, - my_bool not_used __attribute__((unused))) + my_bool not_used MY_ATTRIBUTE((unused))) { *length=share->table_name_length; return (uchar*) share->table_name; diff --git a/mysql-wsrep-5.6/storage/example/ha_example.cc b/mysql-wsrep-5.6/storage/example/ha_example.cc index 462dc8a7..6d508650 100644 --- a/mysql-wsrep-5.6/storage/example/ha_example.cc +++ b/mysql-wsrep-5.6/storage/example/ha_example.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -436,9 +436,9 @@ int ha_example::delete_row(const uchar *buf) */ int ha_example::index_read_map(uchar *buf, const uchar *key, - key_part_map keypart_map __attribute__((unused)), + key_part_map keypart_map MY_ATTRIBUTE((unused)), enum ha_rkey_function find_flag - __attribute__((unused))) + MY_ATTRIBUTE((unused))) { int rc; DBUG_ENTER("ha_example::index_read"); diff --git a/mysql-wsrep-5.6/storage/federated/ha_federated.cc b/mysql-wsrep-5.6/storage/federated/ha_federated.cc index 9af19365..5c17c873 100644 --- a/mysql-wsrep-5.6/storage/federated/ha_federated.cc +++ b/mysql-wsrep-5.6/storage/federated/ha_federated.cc @@ -425,7 +425,7 @@ static handler *federated_create_handler(handlerton *hton, /* Function we use in the creation of our hash to get key */ static uchar *federated_get_key(FEDERATED_SHARE *share, size_t *length, - my_bool not_used __attribute__ ((unused))) + my_bool not_used MY_ATTRIBUTE ((unused))) { *length= share->share_key_length; return (uchar*) share->share_key; @@ -2743,7 +2743,7 @@ int ha_federated::read_next(uchar *buf, MYSQL_RES *result) @param[in] record record data (unused) */ -void ha_federated::position(const uchar *record __attribute__ ((unused))) +void ha_federated::position(const uchar *record MY_ATTRIBUTE ((unused))) { DBUG_ENTER("ha_federated::position"); diff --git a/mysql-wsrep-5.6/storage/heap/hp_hash.c b/mysql-wsrep-5.6/storage/heap/hp_hash.c index a2958dbb..cba07f1e 100644 --- a/mysql-wsrep-5.6/storage/heap/hp_hash.c +++ b/mysql-wsrep-5.6/storage/heap/hp_hash.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -867,7 +867,7 @@ uint hp_rb_pack_key(HP_KEYDEF *keydef, uchar *key, const uchar *old, uint hp_rb_key_length(HP_KEYDEF *keydef, - const uchar *key __attribute__((unused))) + const uchar *key MY_ATTRIBUTE((unused))) { return keydef->length; } diff --git a/mysql-wsrep-5.6/storage/heap/hp_test2.c b/mysql-wsrep-5.6/storage/heap/hp_test2.c index 2abd03fa..007c1b6c 100644 --- a/mysql-wsrep-5.6/storage/heap/hp_test2.c +++ b/mysql-wsrep-5.6/storage/heap/hp_test2.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. reserved This program is free software; you can redistribute it and/or modify @@ -660,7 +660,7 @@ static int rnd(int max_value) } /* rnd */ -static sig_handler endprog(int sig_number __attribute__((unused))) +static sig_handler endprog(int sig_number MY_ATTRIBUTE((unused))) { { hp_panic(HA_PANIC_CLOSE); diff --git a/mysql-wsrep-5.6/storage/innobase/btr/btr0btr.cc b/mysql-wsrep-5.6/storage/innobase/btr/btr0btr.cc index 99bb4246..2c5e9a17 100644 --- a/mysql-wsrep-5.6/storage/innobase/btr/btr0btr.cc +++ b/mysql-wsrep-5.6/storage/innobase/btr/btr0btr.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1994, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. This program is free software; you can redistribute it and/or modify it under @@ -1102,7 +1102,7 @@ that the caller has made the reservation for free extents! @retval block, rw_lock_x_lock_count(&block->lock) == 1 if allocation succeeded (init_mtr == mtr, or the page was not previously freed in mtr) @retval block (not allocated or initialized) otherwise */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) buf_block_t* btr_page_alloc_low( /*===============*/ @@ -1971,7 +1971,7 @@ IBUF_BITMAP_FREE is unaffected by reorganization. @retval true if the operation was successful @retval false if it is a compressed page, and recompression failed */ -static __attribute__((nonnull)) +static MY_ATTRIBUTE((nonnull)) bool btr_page_reorganize_block( /*======================*/ @@ -2033,7 +2033,8 @@ btr_parse_page_reorganize( { ulint level; - ut_ad(ptr && end_ptr); + ut_ad(ptr != NULL); + ut_ad(end_ptr != NULL); /* If dealing with a compressed page the record has the compression level used during original compression written in @@ -2500,7 +2501,7 @@ func_exit: Returns TRUE if the insert fits on the appropriate half-page with the chosen split_rec. @return true if fits */ -static __attribute__((nonnull(1,3,4,6), warn_unused_result)) +static MY_ATTRIBUTE((nonnull(1,3,4,6), warn_unused_result)) bool btr_page_insert_fits( /*=================*/ @@ -2643,7 +2644,7 @@ btr_insert_on_non_leaf_level_func( /**************************************************************//** Attaches the halves of an index page on the appropriate level in an index tree. */ -static __attribute__((nonnull)) +static MY_ATTRIBUTE((nonnull)) void btr_attach_half_pages( /*==================*/ @@ -2779,7 +2780,7 @@ btr_attach_half_pages( /*************************************************************//** Determine if a tuple is smaller than any record on the page. @return TRUE if smaller */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) bool btr_page_tuple_smaller( /*===================*/ @@ -3355,7 +3356,7 @@ Removes a page from the level list of pages. /*************************************************************//** Removes a page from the level list of pages. */ -static __attribute__((nonnull)) +static MY_ATTRIBUTE((nonnull)) void btr_level_list_remove_func( /*=======================*/ @@ -3371,7 +3372,8 @@ btr_level_list_remove_func( ulint prev_page_no; ulint next_page_no; - ut_ad(page && mtr); + ut_ad(page != NULL); + ut_ad(mtr != NULL); ut_ad(mtr_memo_contains_page(mtr, page, MTR_MEMO_PAGE_X_FIX)); ut_ad(space == page_get_space_id(page)); /* Get the previous and next page numbers of page */ diff --git a/mysql-wsrep-5.6/storage/innobase/btr/btr0cur.cc b/mysql-wsrep-5.6/storage/innobase/btr/btr0cur.cc index eeed866d..abb6040f 100644 --- a/mysql-wsrep-5.6/storage/innobase/btr/btr0cur.cc +++ b/mysql-wsrep-5.6/storage/innobase/btr/btr0cur.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1994, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, Google Inc. Copyright (c) 2012, Facebook Inc. @@ -1084,7 +1084,7 @@ This has to be done either within the same mini-transaction, or by invoking ibuf_reset_free_bits() before mtr_commit(). @return pointer to inserted record if succeed, else NULL */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) rec_t* btr_cur_insert_if_possible( /*=======================*/ @@ -1127,7 +1127,7 @@ btr_cur_insert_if_possible( /*************************************************************//** For an insert, checks the locks and does the undo logging if desired. @return DB_SUCCESS, DB_WAIT_LOCK, DB_FAIL, or error number */ -UNIV_INLINE __attribute__((warn_unused_result, nonnull(2,3,5,6))) +UNIV_INLINE MY_ATTRIBUTE((warn_unused_result, nonnull(2,3,5,6))) dberr_t btr_cur_ins_lock_and_undo( /*======================*/ @@ -1653,7 +1653,7 @@ btr_cur_pessimistic_insert( /*************************************************************//** For an update, checks the locks and does the undo logging. @return DB_SUCCESS, DB_WAIT_LOCK, or error number */ -UNIV_INLINE __attribute__((warn_unused_result, nonnull(2,3,6,7))) +UNIV_INLINE MY_ATTRIBUTE((warn_unused_result, nonnull(2,3,6,7))) dberr_t btr_cur_upd_lock_and_undo( /*======================*/ @@ -1672,7 +1672,7 @@ btr_cur_upd_lock_and_undo( const rec_t* rec; dberr_t err; - ut_ad(thr || (flags & BTR_NO_LOCKING_FLAG)); + ut_ad((thr != NULL) || (flags & BTR_NO_LOCKING_FLAG)); rec = btr_cur_get_rec(cursor); index = cursor->index; @@ -2961,7 +2961,7 @@ btr_cur_del_mark_set_clust_rec( ut_ad(page_is_leaf(page_align(rec))); #ifdef UNIV_DEBUG - if (btr_cur_print_record_ops && thr) { + if (btr_cur_print_record_ops && (thr != NULL)) { btr_cur_trx_report(thr_get_trx(thr)->id, index, "del mark "); rec_print_new(stderr, rec, offsets); } @@ -3111,7 +3111,7 @@ btr_cur_del_mark_set_sec_rec( rec = btr_cur_get_rec(cursor); #ifdef UNIV_DEBUG - if (btr_cur_print_record_ops && thr) { + if (btr_cur_print_record_ops && (thr != NULL)) { btr_cur_trx_report(thr_get_trx(thr)->id, cursor->index, "del mark "); rec_print(stderr, rec, cursor->index); @@ -4994,7 +4994,7 @@ btr_free_externally_stored_field( ulint i, /*!< in: field number of field_ref; ignored if rec == NULL */ enum trx_rb_ctx rb_ctx, /*!< in: rollback context */ - mtr_t* local_mtr __attribute__((unused))) /*!< in: mtr + mtr_t* local_mtr MY_ATTRIBUTE((unused))) /*!< in: mtr containing the latch to data an an X-latch to the index tree */ { diff --git a/mysql-wsrep-5.6/storage/innobase/btr/btr0sea.cc b/mysql-wsrep-5.6/storage/innobase/btr/btr0sea.cc index df70f8a1..dd28f50f 100644 --- a/mysql-wsrep-5.6/storage/innobase/btr/btr0sea.cc +++ b/mysql-wsrep-5.6/storage/innobase/btr/btr0sea.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, Google Inc. Portions of this file contain modifications contributed and copyrighted by @@ -473,7 +473,7 @@ btr_search_update_block_hash_info( /*==============================*/ btr_search_t* info, /*!< in: search info */ buf_block_t* block, /*!< in: buffer block */ - btr_cur_t* cursor __attribute__((unused))) + btr_cur_t* cursor MY_ATTRIBUTE((unused))) /*!< in: cursor */ { #ifdef UNIV_SYNC_DEBUG diff --git a/mysql-wsrep-5.6/storage/innobase/buf/buf0buddy.cc b/mysql-wsrep-5.6/storage/innobase/buf/buf0buddy.cc index 958b3b5c..f2ab7321 100644 --- a/mysql-wsrep-5.6/storage/innobase/buf/buf0buddy.cc +++ b/mysql-wsrep-5.6/storage/innobase/buf/buf0buddy.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2006, 2013, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2006, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -112,7 +112,7 @@ buf_buddy_mem_invalid( /**********************************************************************//** Check if a buddy is stamped free. @return whether the buddy is free */ -UNIV_INLINE __attribute__((warn_unused_result)) +UNIV_INLINE MY_ATTRIBUTE((warn_unused_result)) bool buf_buddy_stamp_is_free( /*====================*/ @@ -225,7 +225,7 @@ Checks if a buf is free i.e.: in the zip_free[]. @retval BUF_BUDDY_STATE_FREE if fully free @retval BUF_BUDDY_STATE_USED if currently in use @retval BUF_BUDDY_STATE_PARTIALLY_USED if partially in use. */ -static __attribute__((warn_unused_result)) +static MY_ATTRIBUTE((warn_unused_result)) buf_buddy_state_t buf_buddy_is_free( /*==============*/ diff --git a/mysql-wsrep-5.6/storage/innobase/buf/buf0buf.cc b/mysql-wsrep-5.6/storage/innobase/buf/buf0buf.cc index 85e44294..6f206918 100644 --- a/mysql-wsrep-5.6/storage/innobase/buf/buf0buf.cc +++ b/mysql-wsrep-5.6/storage/innobase/buf/buf0buf.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, Google Inc. Portions of this file contain modifications contributed and copyrighted by @@ -3470,7 +3470,7 @@ buf_page_init_low( /********************************************************************//** Inits a page to the buffer buf_pool. */ -static __attribute__((nonnull)) +static MY_ATTRIBUTE((nonnull)) void buf_page_init( /*==========*/ diff --git a/mysql-wsrep-5.6/storage/innobase/buf/buf0dump.cc b/mysql-wsrep-5.6/storage/innobase/buf/buf0dump.cc index cb67381f..ed27a703 100644 --- a/mysql-wsrep-5.6/storage/innobase/buf/buf0dump.cc +++ b/mysql-wsrep-5.6/storage/innobase/buf/buf0dump.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2011, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2011, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -105,7 +105,7 @@ SELECT variable_value FROM information_schema.global_status WHERE variable_name = 'INNODB_BUFFER_POOL_DUMP_STATUS'; or by: SHOW STATUS LIKE 'innodb_buffer_pool_dump_status'; */ -static __attribute__((nonnull, format(printf, 2, 3))) +static MY_ATTRIBUTE((nonnull, format(printf, 2, 3))) void buf_dump_status( /*============*/ @@ -141,7 +141,7 @@ SELECT variable_value FROM information_schema.global_status WHERE variable_name = 'INNODB_BUFFER_POOL_LOAD_STATUS'; or by: SHOW STATUS LIKE 'innodb_buffer_pool_load_status'; */ -static __attribute__((nonnull, format(printf, 2, 3))) +static MY_ATTRIBUTE((nonnull, format(printf, 2, 3))) void buf_load_status( /*============*/ @@ -594,7 +594,7 @@ extern "C" UNIV_INTERN os_thread_ret_t DECLARE_THREAD(buf_dump_thread)( /*============================*/ - void* arg __attribute__((unused))) /*!< in: a dummy parameter + void* arg MY_ATTRIBUTE((unused))) /*!< in: a dummy parameter required by os_thread_create */ { ut_ad(!srv_read_only_mode); diff --git a/mysql-wsrep-5.6/storage/innobase/buf/buf0flu.cc b/mysql-wsrep-5.6/storage/innobase/buf/buf0flu.cc index 540d6383..1cdd1610 100644 --- a/mysql-wsrep-5.6/storage/innobase/buf/buf0flu.cc +++ b/mysql-wsrep-5.6/storage/innobase/buf/buf0flu.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -2384,7 +2384,7 @@ extern "C" UNIV_INTERN os_thread_ret_t DECLARE_THREAD(buf_flush_page_cleaner_thread)( /*==========================================*/ - void* arg __attribute__((unused))) + void* arg MY_ATTRIBUTE((unused))) /*!< in: a dummy parameter required by os_thread_create */ { diff --git a/mysql-wsrep-5.6/storage/innobase/buf/buf0lru.cc b/mysql-wsrep-5.6/storage/innobase/buf/buf0lru.cc index a1618020..13a91b7e 100644 --- a/mysql-wsrep-5.6/storage/innobase/buf/buf0lru.cc +++ b/mysql-wsrep-5.6/storage/innobase/buf/buf0lru.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2013, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -142,7 +142,7 @@ If a compressed page is freed other compressed pages may be relocated. caller needs to free the page to the free list @retval false if BUF_BLOCK_ZIP_PAGE was removed from page_hash. In this case the block is already returned to the buddy allocator. */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) bool buf_LRU_block_remove_hashed( /*========================*/ @@ -366,7 +366,7 @@ want to hog the CPU and resources. Release the buffer pool and block mutex and try to force a context switch. Then reacquire the same mutexes. The current page is "fixed" before the release of the mutexes and then "unfixed" again once we have reacquired the mutexes. */ -static __attribute__((nonnull)) +static MY_ATTRIBUTE((nonnull)) void buf_flush_yield( /*============*/ @@ -407,7 +407,7 @@ If we have hogged the resources for too long then release the buffer pool and flush list mutex and do a thread yield. Set the current page to "sticky" so that it is not relocated during the yield. @return true if yielded */ -static __attribute__((nonnull(1), warn_unused_result)) +static MY_ATTRIBUTE((nonnull(1), warn_unused_result)) bool buf_flush_try_yield( /*================*/ @@ -450,7 +450,7 @@ buf_flush_try_yield( Removes a single page from a given tablespace inside a specific buffer pool instance. @return true if page was removed. */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) bool buf_flush_or_remove_page( /*=====================*/ @@ -531,7 +531,7 @@ the list as they age towards the tail of the LRU. @retval DB_SUCCESS if all freed @retval DB_FAIL if not all freed @retval DB_INTERRUPTED if the transaction was interrupted */ -static __attribute__((nonnull(1), warn_unused_result)) +static MY_ATTRIBUTE((nonnull(1), warn_unused_result)) dberr_t buf_flush_or_remove_pages( /*======================*/ @@ -637,7 +637,7 @@ Remove or flush all the dirty pages that belong to a given tablespace inside a specific buffer pool instance. The pages will remain in the LRU list and will be evicted from the LRU list as they age and move towards the tail of the LRU list. */ -static __attribute__((nonnull(1))) +static MY_ATTRIBUTE((nonnull(1))) void buf_flush_dirty_pages( /*==================*/ @@ -677,7 +677,7 @@ buf_flush_dirty_pages( /******************************************************************//** Remove all pages that belong to a given tablespace inside a specific buffer pool instance when we are DISCARDing the tablespace. */ -static __attribute__((nonnull)) +static MY_ATTRIBUTE((nonnull)) void buf_LRU_remove_all_pages( /*=====================*/ @@ -825,7 +825,7 @@ buffer pool instance when we are deleting the data file(s) of that tablespace. The pages still remain a part of LRU and are evicted from the list as they age towards the tail of the LRU only if buf_remove is BUF_REMOVE_FLUSH_NO_WRITE. */ -static __attribute__((nonnull(1))) +static MY_ATTRIBUTE((nonnull(1))) void buf_LRU_remove_pages( /*=================*/ diff --git a/mysql-wsrep-5.6/storage/innobase/data/data0data.cc b/mysql-wsrep-5.6/storage/innobase/data/data0data.cc index 179de79b..593af089 100644 --- a/mysql-wsrep-5.6/storage/innobase/data/data0data.cc +++ b/mysql-wsrep-5.6/storage/innobase/data/data0data.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1994, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -67,7 +67,8 @@ dtuple_coll_cmp( ulint n_fields; ulint i; - ut_ad(tuple1 && tuple2); + ut_ad(tuple1 != NULL); + ut_ad(tuple2 != NULL); ut_ad(tuple1->magic_n == DATA_TUPLE_MAGIC_N); ut_ad(tuple2->magic_n == DATA_TUPLE_MAGIC_N); ut_ad(dtuple_check_typed(tuple1)); @@ -715,7 +716,7 @@ UNIV_INTERN void dtuple_convert_back_big_rec( /*========================*/ - dict_index_t* index __attribute__((unused)), /*!< in: index */ + dict_index_t* index MY_ATTRIBUTE((unused)), /*!< in: index */ dtuple_t* entry, /*!< in: entry whose data was put to vector */ big_rec_t* vector) /*!< in, own: big rec vector; it is freed in this function */ diff --git a/mysql-wsrep-5.6/storage/innobase/dict/dict0crea.cc b/mysql-wsrep-5.6/storage/innobase/dict/dict0crea.cc index 30523ff2..b3edfefb 100644 --- a/mysql-wsrep-5.6/storage/innobase/dict/dict0crea.cc +++ b/mysql-wsrep-5.6/storage/innobase/dict/dict0crea.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2014, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -246,7 +246,7 @@ dict_create_sys_columns_tuple( /***************************************************************//** Builds a table definition to insert. @return DB_SUCCESS or error code */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t dict_build_table_def_step( /*======================*/ @@ -573,7 +573,7 @@ dict_create_search_tuple( /***************************************************************//** Builds an index definition row to insert. @return DB_SUCCESS or error code */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t dict_build_index_def_step( /*======================*/ @@ -648,7 +648,7 @@ dict_build_field_def_step( /***************************************************************//** Creates an index tree for the index if it is not a member of a cluster. @return DB_SUCCESS or DB_OUT_OF_FILE_SPACE */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t dict_create_index_tree_step( /*========================*/ @@ -1464,7 +1464,7 @@ dict_create_or_check_foreign_constraint_tables(void) /****************************************************************//** Evaluate the given foreign key SQL statement. @return error code or DB_SUCCESS */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t dict_foreign_eval_sql( /*==================*/ @@ -1530,7 +1530,7 @@ dict_foreign_eval_sql( Add a single foreign key field definition to the data dictionary tables in the database. @return error code or DB_SUCCESS */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t dict_create_add_foreign_field_to_dictionary( /*========================================*/ diff --git a/mysql-wsrep-5.6/storage/innobase/dict/dict0dict.cc b/mysql-wsrep-5.6/storage/innobase/dict/dict0dict.cc index 35bf5058..b040bce0 100644 --- a/mysql-wsrep-5.6/storage/innobase/dict/dict0dict.cc +++ b/mysql-wsrep-5.6/storage/innobase/dict/dict0dict.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. This program is free software; you can redistribute it and/or modify it under @@ -5805,7 +5805,7 @@ dict_set_corrupted_index_cache_only( dict_index_t* index, /*!< in/out: index */ dict_table_t* table) /*!< in/out: table */ { - ut_ad(index); + ut_ad(index != NULL); ut_ad(mutex_own(&dict_sys->mutex)); ut_ad(!dict_table_is_comp(dict_sys->sys_tables)); ut_ad(!dict_table_is_comp(dict_sys->sys_indexes)); @@ -5815,8 +5815,9 @@ dict_set_corrupted_index_cache_only( if (dict_index_is_clust(index)) { dict_table_t* corrupt_table; - corrupt_table = table ? table : index->table; - ut_ad(!index->table || !table || index->table == table); + corrupt_table = (table != NULL) ? table : index->table; + ut_ad((index->table != NULL) || (table != NULL) + || index->table == table); if (corrupt_table) { corrupt_table->corrupted = TRUE; @@ -5896,11 +5897,6 @@ dict_table_get_index_on_name( { dict_index_t* index; - /* If name is NULL, just return */ - if (!name) { - return(NULL); - } - index = dict_table_get_first_index(table); while (index != NULL) { diff --git a/mysql-wsrep-5.6/storage/innobase/dict/dict0load.cc b/mysql-wsrep-5.6/storage/innobase/dict/dict0load.cc index 69211990..9dc63ff2 100644 --- a/mysql-wsrep-5.6/storage/innobase/dict/dict0load.cc +++ b/mysql-wsrep-5.6/storage/innobase/dict/dict0load.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -1744,7 +1744,7 @@ err_len: goto err_len; } type = mach_read_from_4(field); - if (type & (~0 << DICT_IT_BITS)) { + if (type & (~0U << DICT_IT_BITS)) { return("unknown SYS_INDEXES.TYPE bits"); } @@ -1783,7 +1783,7 @@ Loads definitions for table indexes. Adds them to the data dictionary cache. @return DB_SUCCESS if ok, DB_CORRUPTION if corruption of dictionary table or DB_UNSUPPORTED if table has unknown index type */ -static __attribute__((nonnull)) +static MY_ATTRIBUTE((nonnull)) dberr_t dict_load_indexes( /*==============*/ @@ -2531,6 +2531,7 @@ func_exit: /* the table->fts could be created in dict_load_column when a user defined FTS_DOC_ID is present, but no FTS */ + fts_optimize_remove_table(table); fts_free(table); } else { fts_optimize_add_table(table); @@ -2596,14 +2597,13 @@ dict_load_table_on_id( btr_pcur_open_on_user_rec(sys_table_ids, tuple, PAGE_CUR_GE, BTR_SEARCH_LEAF, &pcur, &mtr); -check_rec: rec = btr_pcur_get_rec(&pcur); if (page_rec_is_user_rec(rec)) { /*---------------------------------------------------*/ /* Now we have the record in the secondary index containing the table ID and NAME */ - +check_rec: field = rec_get_nth_field_old( rec, DICT_FLD__SYS_TABLE_IDS__ID, &len); ut_ad(len == 8); @@ -2613,12 +2613,14 @@ check_rec: if (rec_get_deleted_flag(rec, 0)) { /* Until purge has completed, there may be delete-marked duplicate records - for the same SYS_TABLES.ID. - Due to Bug #60049, some delete-marked - records may survive the purge forever. */ - if (btr_pcur_move_to_next(&pcur, &mtr)) { - - goto check_rec; + for the same SYS_TABLES.ID, but different + SYS_TABLES.NAME. */ + while (btr_pcur_move_to_next(&pcur, &mtr)) { + rec = btr_pcur_get_rec(&pcur); + + if (page_rec_is_user_rec(rec)) { + goto check_rec; + } } } else { /* Now we get the table name from the record */ @@ -2787,7 +2789,7 @@ dict_load_foreign_cols( /***********************************************************************//** Loads a foreign key constraint to the dictionary cache. @return DB_SUCCESS or error code */ -static __attribute__((nonnull(1), warn_unused_result)) +static MY_ATTRIBUTE((nonnull(1), warn_unused_result)) dberr_t dict_load_foreign( /*==============*/ diff --git a/mysql-wsrep-5.6/storage/innobase/dict/dict0mem.cc b/mysql-wsrep-5.6/storage/innobase/dict/dict0mem.cc index 846ce302..b39e1e17 100644 --- a/mysql-wsrep-5.6/storage/innobase/dict/dict0mem.cc +++ b/mysql-wsrep-5.6/storage/innobase/dict/dict0mem.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. This program is free software; you can redistribute it and/or modify it under @@ -264,7 +264,7 @@ dict_mem_table_add_col( /**********************************************************************//** Renames a column of a table in the data dictionary cache. */ -static __attribute__((nonnull)) +static MY_ATTRIBUTE((nonnull)) void dict_mem_table_col_rename_low( /*==========================*/ diff --git a/mysql-wsrep-5.6/storage/innobase/dict/dict0stats_bg.cc b/mysql-wsrep-5.6/storage/innobase/dict/dict0stats_bg.cc index 9e1f75a1..6f01c379 100644 --- a/mysql-wsrep-5.6/storage/innobase/dict/dict0stats_bg.cc +++ b/mysql-wsrep-5.6/storage/innobase/dict/dict0stats_bg.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2012, 2013, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2012, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -331,7 +331,7 @@ extern "C" UNIV_INTERN os_thread_ret_t DECLARE_THREAD(dict_stats_thread)( /*==============================*/ - void* arg __attribute__((unused))) /*!< in: a dummy parameter + void* arg MY_ATTRIBUTE((unused))) /*!< in: a dummy parameter required by os_thread_create */ { ut_a(!srv_read_only_mode); diff --git a/mysql-wsrep-5.6/storage/innobase/fil/fil0fil.cc b/mysql-wsrep-5.6/storage/innobase/fil/fil0fil.cc index 77c13538..5e1a9d6c 100644 --- a/mysql-wsrep-5.6/storage/innobase/fil/fil0fil.cc +++ b/mysql-wsrep-5.6/storage/innobase/fil/fil0fil.cc @@ -1875,7 +1875,7 @@ fil_set_max_space_id_if_bigger( Writes the flushed lsn and the latest archived log number to the page header of the first page of a data file of the system tablespace (space 0), which is uncompressed. */ -static __attribute__((warn_unused_result)) +static MY_ATTRIBUTE((warn_unused_result)) dberr_t fil_write_lsn_and_arch_no_to_file( /*==============================*/ @@ -1883,7 +1883,7 @@ fil_write_lsn_and_arch_no_to_file( ulint sum_of_sizes, /*!< in: combined size of previous files in space, in database pages */ lsn_t lsn, /*!< in: lsn to write */ - ulint arch_log_no __attribute__((unused))) + ulint arch_log_no MY_ATTRIBUTE((unused))) /*!< in: archived log number to write */ { byte* buf1; @@ -1970,7 +1970,7 @@ Checks the consistency of the first data page of a tablespace at database startup. @retval NULL on success, or if innodb_force_recovery is set @return pointer to an error message string */ -static __attribute__((warn_unused_result)) +static MY_ATTRIBUTE((warn_unused_result)) const char* fil_check_first_page( /*=================*/ diff --git a/mysql-wsrep-5.6/storage/innobase/fsp/fsp0fsp.cc b/mysql-wsrep-5.6/storage/innobase/fsp/fsp0fsp.cc index 0f8d6bcc..f09cbb03 100644 --- a/mysql-wsrep-5.6/storage/innobase/fsp/fsp0fsp.cc +++ b/mysql-wsrep-5.6/storage/innobase/fsp/fsp0fsp.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -93,7 +93,7 @@ fseg_n_reserved_pages_low( /********************************************************************//** Marks a page used. The page must reside within the extents of the given segment. */ -static __attribute__((nonnull)) +static MY_ATTRIBUTE((nonnull)) void fseg_mark_page_used( /*================*/ @@ -132,7 +132,7 @@ fsp_fill_free_list( ulint space, /*!< in: space */ fsp_header_t* header, /*!< in/out: space header */ mtr_t* mtr) /*!< in/out: mini-transaction */ - UNIV_COLD __attribute__((nonnull)); + UNIV_COLD MY_ATTRIBUTE((nonnull)); /**********************************************************************//** Allocates a single free page from a segment. This function implements the intelligent allocation strategy which tries to minimize file space @@ -161,7 +161,7 @@ fseg_alloc_free_page_low( in which the page should be initialized. If init_mtr!=mtr, but the page is already latched in mtr, do not initialize the page. */ - __attribute__((warn_unused_result, nonnull)); + MY_ATTRIBUTE((warn_unused_result, nonnull)); #endif /* !UNIV_HOTBACKUP */ /**********************************************************************//** @@ -425,7 +425,7 @@ descriptor resides is x-locked. This function no longer extends the data file. @return pointer to the extent descriptor, NULL if the page does not exist in the space or if the offset is >= the free limit */ -UNIV_INLINE __attribute__((nonnull, warn_unused_result)) +UNIV_INLINE MY_ATTRIBUTE((nonnull, warn_unused_result)) xdes_t* xdes_get_descriptor_with_space_hdr( /*===============================*/ @@ -487,7 +487,7 @@ is necessary to make the descriptor defined, as they are uninitialized above the free limit. @return pointer to the extent descriptor, NULL if the page does not exist in the space or if the offset exceeds the free limit */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) xdes_t* xdes_get_descriptor( /*================*/ @@ -614,7 +614,7 @@ byte* fsp_parse_init_file_page( /*=====================*/ byte* ptr, /*!< in: buffer */ - byte* end_ptr __attribute__((unused)), /*!< in: buffer end */ + byte* end_ptr MY_ATTRIBUTE((unused)), /*!< in: buffer end */ buf_block_t* block) /*!< in: block or NULL */ { ut_ad(ptr && end_ptr); @@ -850,7 +850,7 @@ fsp_header_get_tablespace_size(void) Tries to extend a single-table tablespace so that a page would fit in the data file. @return TRUE if success */ -static UNIV_COLD __attribute__((nonnull, warn_unused_result)) +static UNIV_COLD MY_ATTRIBUTE((nonnull, warn_unused_result)) ibool fsp_try_extend_data_file_with_pages( /*================================*/ @@ -882,7 +882,7 @@ fsp_try_extend_data_file_with_pages( /***********************************************************************//** Tries to extend the last data file of a tablespace if it is auto-extending. @return FALSE if not auto-extending */ -static UNIV_COLD __attribute__((nonnull)) +static UNIV_COLD MY_ATTRIBUTE((nonnull)) ibool fsp_try_extend_data_file( /*=====================*/ @@ -1064,7 +1064,8 @@ fsp_fill_free_list( ulint i; mtr_t ibuf_mtr; - ut_ad(header && mtr); + ut_ad(header != NULL); + ut_ad(mtr != NULL); ut_ad(page_offset(header) == FSP_HEADER_OFFSET); /* Check if we can fill free list from above the free list limit */ @@ -1236,7 +1237,7 @@ fsp_alloc_free_extent( /**********************************************************************//** Allocates a single free page from a space. */ -static __attribute__((nonnull)) +static MY_ATTRIBUTE((nonnull)) void fsp_alloc_from_free_frag( /*=====================*/ @@ -1327,7 +1328,7 @@ Allocates a single free page from a space. The page is marked as used. @retval block, rw_lock_x_lock_count(&block->lock) == 1 if allocation succeeded (init_mtr == mtr, or the page was not previously freed in mtr) @retval block (not allocated or initialized) otherwise */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) buf_block_t* fsp_alloc_free_page( /*================*/ @@ -1576,9 +1577,9 @@ fsp_seg_inode_page_get_nth_inode( /*=============================*/ page_t* page, /*!< in: segment inode page */ ulint i, /*!< in: inode index on page */ - ulint zip_size __attribute__((unused)), + ulint zip_size MY_ATTRIBUTE((unused)), /*!< in: compressed page size, or 0 */ - mtr_t* mtr __attribute__((unused))) + mtr_t* mtr MY_ATTRIBUTE((unused))) /*!< in/out: mini-transaction */ { ut_ad(i < FSP_SEG_INODES_PER_PAGE(zip_size)); @@ -1877,7 +1878,7 @@ fseg_get_nth_frag_page_no( /*======================*/ fseg_inode_t* inode, /*!< in: segment inode */ ulint n, /*!< in: slot index */ - mtr_t* mtr __attribute__((unused))) + mtr_t* mtr MY_ATTRIBUTE((unused))) /*!< in/out: mini-transaction */ { ut_ad(inode && mtr); @@ -2958,7 +2959,7 @@ fsp_get_available_space_in_free_extents( /********************************************************************//** Marks a page used. The page must reside within the extents of the given segment. */ -static __attribute__((nonnull)) +static MY_ATTRIBUTE((nonnull)) void fseg_mark_page_used( /*================*/ @@ -3030,7 +3031,8 @@ fseg_free_page_low( ib_id_t seg_id; ulint i; - ut_ad(seg_inode && mtr); + ut_ad(seg_inode != NULL); + ut_ad(mtr != NULL); ut_ad(mach_read_from_4(seg_inode + FSEG_MAGIC_N) == FSEG_MAGIC_N_VALUE); ut_ad(!((page_offset(seg_inode) - FSEG_ARR_OFFSET) % FSEG_INODE_SIZE)); @@ -3239,7 +3241,8 @@ fseg_free_extent( ulint descr_n_used; ulint i; - ut_ad(seg_inode && mtr); + ut_ad(seg_inode != NULL); + ut_ad(mtr != NULL); descr = xdes_get_descriptor(space, zip_size, page, mtr); diff --git a/mysql-wsrep-5.6/storage/innobase/fts/fts0blex.cc b/mysql-wsrep-5.6/storage/innobase/fts/fts0blex.cc index 7d0acb00..2d71934f 100644 --- a/mysql-wsrep-5.6/storage/innobase/fts/fts0blex.cc +++ b/mysql-wsrep-5.6/storage/innobase/fts/fts0blex.cc @@ -305,9 +305,9 @@ YY_BUFFER_STATE fts0b_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner YY_BUFFER_STATE fts0b_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); YY_BUFFER_STATE fts0b_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); -void *fts0balloc (yy_size_t , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) ); -void *fts0brealloc (void *,yy_size_t , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) ); -void fts0bfree (void * , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) ); +void *fts0balloc (yy_size_t , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) ); +void *fts0brealloc (void *,yy_size_t , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) ); +void fts0bfree (void * , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) ); #define yy_new_buffer fts0b_create_buffer @@ -347,7 +347,7 @@ typedef int yy_state_type; static yy_state_type yy_get_previous_state (yyscan_t yyscanner ); static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner); static int yy_get_next_buffer (yyscan_t yyscanner ); -static void yy_fatal_error (yyconst char msg[] , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) ); +static void yy_fatal_error (yyconst char msg[] , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) ); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. @@ -451,7 +451,7 @@ static yyconst flex_int16_t yy_chk[32] = #line 1 "fts0blex.l" /***************************************************************************** -Copyright (c) 2007, 2014, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2007, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -579,11 +579,11 @@ extern int fts0bwrap (yyscan_t yyscanner ); #endif #ifndef yytext_ptr -static void yy_flex_strncpy (char *,yyconst char *,int , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused))); +static void yy_flex_strncpy (char *,yyconst char *,int , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused))); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused))); +static int yy_flex_strlen (yyconst char * , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused))); #endif #ifndef YY_NO_INPUT @@ -1609,7 +1609,7 @@ YY_BUFFER_STATE fts0b_scan_bytes (yyconst char * yybytes, int _yybytes_len , y #define YY_EXIT_FAILURE 2 #endif -static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused))) +static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused))) { (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); @@ -1910,7 +1910,7 @@ int fts0blex_destroy (yyscan_t yyscanner) */ #ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused))) +static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused))) { register int i; for ( i = 0; i < n; ++i ) @@ -1919,7 +1919,7 @@ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yys #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused))) +static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused))) { register int n; for ( n = 0; s[n]; ++n ) @@ -1929,12 +1929,12 @@ static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner __at } #endif -void *fts0balloc (yy_size_t size , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused))) +void *fts0balloc (yy_size_t size , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused))) { return (void *) malloc( size ); } -void *fts0brealloc (void * ptr, yy_size_t size , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused))) +void *fts0brealloc (void * ptr, yy_size_t size , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused))) { /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those @@ -1946,7 +1946,7 @@ void *fts0brealloc (void * ptr, yy_size_t size , yyscan_t yyscanner return (void *) realloc( (char *) ptr, size ); } -void fts0bfree (void * ptr , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused))) +void fts0bfree (void * ptr , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused))) { free( (char *) ptr ); /* see fts0brealloc() for (char *) cast */ } diff --git a/mysql-wsrep-5.6/storage/innobase/fts/fts0fts.cc b/mysql-wsrep-5.6/storage/innobase/fts/fts0fts.cc index 25047b38..a0f0fab5 100644 --- a/mysql-wsrep-5.6/storage/innobase/fts/fts0fts.cc +++ b/mysql-wsrep-5.6/storage/innobase/fts/fts0fts.cc @@ -108,6 +108,7 @@ UNIV_INTERN mysql_pfs_key_t fts_pll_tokenize_mutex_key; /** variable to record innodb_fts_internal_tbl_name for information schema table INNODB_FTS_INSERTED etc. */ UNIV_INTERN char* fts_internal_tbl_name = NULL; +UNIV_INTERN char* fts_internal_tbl_name2 = NULL; /** InnoDB default stopword list: There are different versions of stopwords, the stop words listed @@ -265,13 +266,15 @@ FTS auxiliary INDEX table and clear the cache at the end. @param[in,out] sync sync state @param[in] unlock_cache whether unlock cache lock when write node @param[in] wait whether wait when a sync is in progress +@param[in] has_dict whether has dict operation lock @return DB_SUCCESS if all OK */ static dberr_t fts_sync( fts_sync_t* sync, bool unlock_cache, - bool wait); + bool wait, + bool has_dict); /****************************************************************//** Release all resources help by the words rb tree e.g., the node ilist. */ @@ -280,7 +283,7 @@ void fts_words_free( /*===========*/ ib_rbt_t* words) /*!< in: rb tree of words */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); #ifdef FTS_CACHE_SIZE_DEBUG /****************************************************************//** Read the max cache size parameter from the config table. */ @@ -302,7 +305,7 @@ fts_add_doc_by_id( /*==============*/ fts_trx_table_t*ftt, /*!< in: FTS trx table */ doc_id_t doc_id, /*!< in: doc id */ - ib_vector_t* fts_indexes __attribute__((unused))); + ib_vector_t* fts_indexes MY_ATTRIBUTE((unused))); /*!< in: affected fts indexes */ #ifdef FTS_DOC_STATS_DEBUG /****************************************************************//** @@ -317,7 +320,7 @@ fts_is_word_in_index( fts_table_t* fts_table, /*!< in: table instance */ const fts_string_t* word, /*!< in: the word to check */ ibool* found) /*!< out: TRUE if exists */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); #endif /* FTS_DOC_STATS_DEBUG */ /******************************************************************//** @@ -332,7 +335,7 @@ fts_update_sync_doc_id( const char* table_name, /*!< in: table name, or NULL */ doc_id_t doc_id, /*!< in: last document id */ trx_t* trx) /*!< in: update trx, or NULL */ - __attribute__((nonnull(1))); + MY_ATTRIBUTE((nonnull(1))); /****************************************************************//** This function loads the default InnoDB stopword list */ @@ -1075,13 +1078,12 @@ fts_words_free( } } -/*********************************************************************//** -Clear cache. */ +/** Clear cache. +@param[in,out] cache fts cache */ UNIV_INTERN void fts_cache_clear( -/*============*/ - fts_cache_t* cache) /*!< in: cache */ + fts_cache_t* cache) { ulint i; @@ -1477,7 +1479,7 @@ fts_cache_add_doc( /****************************************************************//** Drops a table. If the table can't be found we return a SUCCESS code. @return DB_SUCCESS or error code */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t fts_drop_table( /*===========*/ @@ -1519,7 +1521,7 @@ fts_drop_table( /****************************************************************//** Rename a single auxiliary table due to database name change. @return DB_SUCCESS or error code */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t fts_rename_one_aux_table( /*=====================*/ @@ -1628,7 +1630,7 @@ Drops the common ancillary tables needed for supporting an FTS index on the given table. row_mysql_lock_data_dictionary must have been called before this. @return DB_SUCCESS or error code */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t fts_drop_common_tables( /*===================*/ @@ -1755,7 +1757,7 @@ Drops FTS ancillary tables needed for supporting an FTS index on the given table. row_mysql_lock_data_dictionary must have been called before this. @return DB_SUCCESS or error code */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t fts_drop_all_index_tables( /*======================*/ @@ -2663,7 +2665,7 @@ fts_get_next_doc_id( This function fetch the Doc ID from CONFIG table, and compare with the Doc ID supplied. And store the larger one to the CONFIG table. @return DB_SUCCESS if OK */ -static __attribute__((nonnull)) +static MY_ATTRIBUTE((nonnull)) dberr_t fts_cmp_set_sync_doc_id( /*====================*/ @@ -2917,7 +2919,7 @@ fts_add( /*********************************************************************//** Do commit-phase steps necessary for the deletion of a row. @return DB_SUCCESS or error code */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t fts_delete( /*=======*/ @@ -3008,7 +3010,7 @@ fts_delete( /*********************************************************************//** Do commit-phase steps necessary for the modification of a row. @return DB_SUCCESS or error code */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t fts_modify( /*=======*/ @@ -3079,7 +3081,7 @@ fts_create_doc_id( The given transaction is about to be committed; do whatever is necessary from the FTS system's POV. @return DB_SUCCESS or error code */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t fts_commit_table( /*=============*/ @@ -3412,7 +3414,7 @@ fts_add_doc_by_id( /*==============*/ fts_trx_table_t*ftt, /*!< in: FTS trx table */ doc_id_t doc_id, /*!< in: doc id */ - ib_vector_t* fts_indexes __attribute__((unused))) + ib_vector_t* fts_indexes MY_ATTRIBUTE((unused))) /*!< in: affected fts indexes */ { mtr_t mtr; @@ -3532,7 +3534,7 @@ fts_add_doc_by_id( get_doc, clust_index, doc_pcur, offsets, &doc); if (doc.found) { - ibool success __attribute__((unused)); + ibool success MY_ATTRIBUTE((unused)); btr_pcur_store_position(doc_pcur, &mtr); mtr_commit(&mtr); @@ -3567,7 +3569,7 @@ fts_add_doc_by_id( DBUG_EXECUTE_IF( "fts_instrument_sync_debug", - fts_sync(cache->sync, true, true); + fts_sync(cache->sync, true, true, false); ); DEBUG_SYNC_C("fts_instrument_sync_request"); @@ -3641,7 +3643,7 @@ fts_get_max_doc_id( dict_table_t* table) /*!< in: user table */ { dict_index_t* index; - dict_field_t* dfield __attribute__((unused)) = NULL; + dict_field_t* dfield MY_ATTRIBUTE((unused)) = NULL; doc_id_t doc_id = 0; mtr_t mtr; btr_pcur_t pcur; @@ -3899,7 +3901,7 @@ fts_write_node( /*********************************************************************//** Add rows to the DELETED_CACHE table. @return DB_SUCCESS if all went well else error code*/ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t fts_sync_add_deleted_cache( /*=======================*/ @@ -3953,7 +3955,7 @@ fts_sync_add_deleted_cache( @param[in] index_cache index cache @param[in] unlock_cache whether unlock cache when write node @return DB_SUCCESS if all went well else error code */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t fts_sync_write_words( trx_t* trx, @@ -4089,7 +4091,7 @@ fts_sync_write_words( /*********************************************************************//** Write a single documents statistics to disk. @return DB_SUCCESS if all went well else error code */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t fts_sync_write_doc_stat( /*====================*/ @@ -4343,7 +4345,7 @@ fts_sync_begin( Run SYNC on the table, i.e., write out data from the index specific cache to the FTS aux INDEX table and FTS aux doc id stats table. @return DB_SUCCESS if all OK */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t fts_sync_index( /*===========*/ @@ -4379,13 +4381,11 @@ fts_sync_index( } /** Check if index cache has been synced completely -@param[in,out] sync sync state @param[in,out] index_cache index cache @return true if index is synced, otherwise false. */ static bool fts_sync_index_check( - fts_sync_t* sync, fts_index_cache_t* index_cache) { const ib_rbt_node_t* rbt_node; @@ -4408,14 +4408,36 @@ fts_sync_index_check( return(true); } -/*********************************************************************//** -Commit the SYNC, change state of processed doc ids etc. +/** Reset synced flag in index cache when rollback +@param[in,out] index_cache index cache */ +static +void +fts_sync_index_reset( + fts_index_cache_t* index_cache) +{ + const ib_rbt_node_t* rbt_node; + + for (rbt_node = rbt_first(index_cache->words); + rbt_node != NULL; + rbt_node = rbt_next(index_cache->words, rbt_node)) { + + fts_tokenizer_word_t* word; + word = rbt_value(fts_tokenizer_word_t, rbt_node); + + fts_node_t* fts_node; + fts_node = static_cast(ib_vector_last(word->nodes)); + + fts_node->synced = false; + } +} + +/** Commit the SYNC, change state of processed doc ids etc. +@param[in,out] sync sync state @return DB_SUCCESS if all OK */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t fts_sync_commit( -/*============*/ - fts_sync_t* sync) /*!< in: sync state */ + fts_sync_t* sync) { dberr_t error; trx_t* trx = sync->trx; @@ -4468,18 +4490,19 @@ fts_sync_commit( (double) n_nodes/ (double) elapsed_time); } + /* Avoid assertion in trx_free(). */ + trx->dict_operation_lock_mode = 0; trx_free_for_background(trx); return(error); } -/*********************************************************************//** -Rollback a sync operation */ +/** Rollback a sync operation +@param[in,out] sync sync state */ static void fts_sync_rollback( -/*==============*/ - fts_sync_t* sync) /*!< in: sync state */ + fts_sync_t* sync) { trx_t* trx = sync->trx; fts_cache_t* cache = sync->table->fts->cache; @@ -4491,6 +4514,10 @@ fts_sync_rollback( index_cache = static_cast( ib_vector_get(cache->indexes, i)); + /* Reset synced flag so nodes will not be skipped + in the next sync, see fts_sync_write_words(). */ + fts_sync_index_reset(index_cache); + for (j = 0; fts_index_selector[j].value; ++j) { if (index_cache->ins_graph[j] != NULL) { @@ -4516,6 +4543,9 @@ fts_sync_rollback( rw_lock_x_unlock(&cache->lock); fts_sql_rollback(trx); + + /* Avoid assertion in trx_free(). */ + trx->dict_operation_lock_mode = 0; trx_free_for_background(trx); } @@ -4524,13 +4554,15 @@ FTS auxiliary INDEX table and clear the cache at the end. @param[in,out] sync sync state @param[in] unlock_cache whether unlock cache lock when write node @param[in] wait whether wait when a sync is in progress +@param[in] has_dict whether has dict operation lock @return DB_SUCCESS if all OK */ static dberr_t fts_sync( fts_sync_t* sync, bool unlock_cache, - bool wait) + bool wait, + bool has_dict) { ulint i; dberr_t error = DB_SUCCESS; @@ -4559,6 +4591,12 @@ fts_sync( DEBUG_SYNC_C("fts_sync_begin"); fts_sync_begin(sync); + /* When sync in background, we hold dict operation lock + to prevent DDL like DROP INDEX, etc. */ + if (has_dict) { + sync->trx->dict_operation_lock_mode = RW_S_LATCH; + } + begin_sync: if (cache->total_size > fts_max_cache_size) { /* Avoid the case: sync never finish when @@ -4599,7 +4637,7 @@ begin_sync: ib_vector_get(cache->indexes, i)); if (index_cache->index->to_be_dropped - || fts_sync_index_check(sync, index_cache)) { + || fts_sync_index_check(index_cache)) { continue; } @@ -4614,6 +4652,7 @@ end_sync: } rw_lock_x_lock(&cache->lock); + sync->interrupted = false; sync->in_progress = false; os_event_set(sync->event); rw_lock_x_unlock(&cache->lock); @@ -4637,20 +4676,23 @@ FTS auxiliary INDEX table and clear the cache at the end. @param[in,out] table fts table @param[in] unlock_cache whether unlock cache when write node @param[in] wait whether wait for existing sync to finish +@param[in] has_dict whether has dict operation lock @return DB_SUCCESS on success, error code on failure. */ UNIV_INTERN dberr_t fts_sync_table( dict_table_t* table, bool unlock_cache, - bool wait) + bool wait, + bool has_dict) { dberr_t err = DB_SUCCESS; ut_ad(table->fts); if (!dict_table_is_discarded(table) && table->fts->cache) { - err = fts_sync(table->fts->cache->sync, unlock_cache, wait); + err = fts_sync(table->fts->cache->sync, + unlock_cache, wait, has_dict); } return(err); @@ -6169,7 +6211,7 @@ fts_update_hex_format_flag( /*********************************************************************//** Rename an aux table to HEX format. It's called when "%016llu" is used to format an object id in table name, which only happens in Windows. */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t fts_rename_one_aux_table_to_hex_format( /*===================================*/ @@ -6260,7 +6302,7 @@ Note the ids in tables are correct but the names are old ambiguous ones. This function should make sure that either all the parent table and aux tables are set DICT_TF2_FTS_AUX_HEX_NAME with flags2 or none of them are set */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t fts_rename_aux_tables_to_hex_format_low( /*====================================*/ @@ -6414,14 +6456,14 @@ fts_fake_hex_to_dec( { ib_id_t dec_id = 0; char tmp_id[FTS_AUX_MIN_TABLE_ID_LENGTH]; - int ret __attribute__((unused)); + int ret MY_ATTRIBUTE((unused)); ret = sprintf(tmp_id, UINT64PFx, id); ut_ad(ret == 16); #ifdef _WIN32 ret = sscanf(tmp_id, "%016llu", &dec_id); #else - ret = sscanf(tmp_id, "%016"PRIu64, &dec_id); + ret = sscanf(tmp_id, "%016" PRIu64, &dec_id); #endif /* _WIN32 */ ut_ad(ret == 1); @@ -6528,6 +6570,36 @@ fts_check_corrupt_index( return(0); } +/* Get parent table name if it's a fts aux table +@param[in] aux_table_name aux table name +@param[in] aux_table_len aux table length +@return parent table name, or NULL */ +char* +fts_get_parent_table_name( + const char* aux_table_name, + ulint aux_table_len) +{ + fts_aux_table_t aux_table; + char* parent_table_name = NULL; + + if (fts_is_aux_table_name(&aux_table, aux_table_name, aux_table_len)) { + dict_table_t* parent_table; + + parent_table = dict_table_open_on_id( + aux_table.parent_id, TRUE, DICT_TABLE_OP_NORMAL); + + if (parent_table != NULL) { + parent_table_name = mem_strdupl( + parent_table->name, + strlen(parent_table->name)); + + dict_table_close(parent_table, TRUE, FALSE); + } + } + + return(parent_table_name); +} + /** Check the validity of the parent table. @param[in] aux_table auxiliary table @return true if it is a valid table or false if it is not */ @@ -6736,7 +6808,7 @@ fts_drop_aux_table_from_vector( Check and drop all orphaned FTS auxiliary tables, those that don't have a parent table or FTS index defined on them. @return DB_SUCCESS or error code */ -static __attribute__((nonnull)) +static MY_ATTRIBUTE((nonnull)) void fts_check_and_drop_orphaned_tables( /*===============================*/ diff --git a/mysql-wsrep-5.6/storage/innobase/fts/fts0opt.cc b/mysql-wsrep-5.6/storage/innobase/fts/fts0opt.cc index 72c3c4fd..6c13603b 100644 --- a/mysql-wsrep-5.6/storage/innobase/fts/fts0opt.cc +++ b/mysql-wsrep-5.6/storage/innobase/fts/fts0opt.cc @@ -797,7 +797,7 @@ fts_zip_deflate_end( Read the words from the FTS INDEX. @return DB_SUCCESS if all OK, DB_TABLE_NOT_FOUND if no more indexes to search else error code */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t fts_index_fetch_words( /*==================*/ @@ -1131,7 +1131,7 @@ fts_optimize_lookup( /**********************************************************************//** Encode the word pos list into the node @return DB_SUCCESS or error code*/ -static __attribute__((nonnull)) +static MY_ATTRIBUTE((nonnull)) dberr_t fts_optimize_encode_node( /*=====================*/ @@ -1220,7 +1220,7 @@ fts_optimize_encode_node( /**********************************************************************//** Optimize the data contained in a node. @return DB_SUCCESS or error code*/ -static __attribute__((nonnull)) +static MY_ATTRIBUTE((nonnull)) dberr_t fts_optimize_node( /*==============*/ @@ -1318,7 +1318,7 @@ test_again: /**********************************************************************//** Determine the starting pos within the deleted doc id vector for a word. @return delete position */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) int fts_optimize_deleted_pos( /*=====================*/ @@ -1447,7 +1447,7 @@ fts_optimize_word( /**********************************************************************//** Update the FTS index table. This is a delete followed by an insert. @return DB_SUCCESS or error code */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t fts_optimize_write_word( /*====================*/ @@ -1550,7 +1550,7 @@ fts_word_free( /**********************************************************************//** Optimize the word ilist and rewrite data to the FTS index. @return status one of RESTART, EXIT, ERROR */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t fts_optimize_compact( /*=================*/ @@ -1645,7 +1645,7 @@ fts_optimize_create( /**********************************************************************//** Get optimize start time of an FTS index. @return DB_SUCCESS if all OK else error code */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t fts_optimize_get_index_start_time( /*==============================*/ @@ -1661,7 +1661,7 @@ fts_optimize_get_index_start_time( /**********************************************************************//** Set the optimize start time of an FTS index. @return DB_SUCCESS if all OK else error code */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t fts_optimize_set_index_start_time( /*==============================*/ @@ -1677,7 +1677,7 @@ fts_optimize_set_index_start_time( /**********************************************************************//** Get optimize end time of an FTS index. @return DB_SUCCESS if all OK else error code */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t fts_optimize_get_index_end_time( /*============================*/ @@ -1692,7 +1692,7 @@ fts_optimize_get_index_end_time( /**********************************************************************//** Set the optimize end time of an FTS index. @return DB_SUCCESS if all OK else error code */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t fts_optimize_set_index_end_time( /*============================*/ @@ -1912,7 +1912,7 @@ fts_optimize_set_next_word( Optimize is complete. Set the completion time, and reset the optimize start string for this FTS index to "". @return DB_SUCCESS if all OK */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t fts_optimize_index_completed( /*=========================*/ @@ -1952,7 +1952,7 @@ fts_optimize_index_completed( Read the list of words from the FTS auxiliary index that will be optimized in this pass. @return DB_SUCCESS if all OK */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t fts_optimize_index_read_words( /*==========================*/ @@ -2009,7 +2009,7 @@ fts_optimize_index_read_words( Run OPTIMIZE on the given FTS index. Note: this can take a very long time (hours). @return DB_SUCCESS if all OK */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t fts_optimize_index( /*===============*/ @@ -2080,7 +2080,7 @@ fts_optimize_index( /**********************************************************************//** Delete the document ids in the delete, and delete cache tables. @return DB_SUCCESS if all OK */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t fts_optimize_purge_deleted_doc_ids( /*===============================*/ @@ -2149,7 +2149,7 @@ fts_optimize_purge_deleted_doc_ids( /**********************************************************************//** Delete the document ids in the pending delete, and delete tables. @return DB_SUCCESS if all OK */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t fts_optimize_purge_deleted_doc_id_snapshot( /*=======================================*/ @@ -2199,7 +2199,7 @@ Copy the deleted doc ids that will be purged during this optimize run to the being deleted FTS auxiliary tables. The transaction is committed upon successfull copy and rolled back on DB_DUPLICATE_KEY error. @return DB_SUCCESS if all OK */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t fts_optimize_create_deleted_doc_id_snapshot( /*========================================*/ @@ -2237,7 +2237,7 @@ fts_optimize_create_deleted_doc_id_snapshot( Read in the document ids that are to be purged during optimize. The transaction is committed upon successfully read. @return DB_SUCCESS if all OK */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t fts_optimize_read_deleted_doc_id_snapshot( /*======================================*/ @@ -2274,7 +2274,7 @@ Optimze all the FTS indexes, skipping those that have already been optimized, since the FTS auxiliary indexes are not guaranteed to be of the same cardinality. @return DB_SUCCESS if all OK */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t fts_optimize_indexes( /*=================*/ @@ -2344,7 +2344,7 @@ fts_optimize_indexes( /*********************************************************************//** Cleanup the snapshot tables and the master deleted table. @return DB_SUCCESS if all OK */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t fts_optimize_purge_snapshot( /*========================*/ @@ -2373,7 +2373,7 @@ fts_optimize_purge_snapshot( /*********************************************************************//** Reset the start time to 0 so that a new optimize can be started. @return DB_SUCCESS if all OK */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t fts_optimize_reset_start_time( /*==========================*/ @@ -2412,7 +2412,7 @@ fts_optimize_reset_start_time( /*********************************************************************//** Run OPTIMIZE on the given table by a background thread. @return DB_SUCCESS if all OK */ -static __attribute__((nonnull)) +static MY_ATTRIBUTE((nonnull)) dberr_t fts_optimize_table_bk( /*==================*/ @@ -2759,6 +2759,7 @@ fts_optimize_new_table( empty_slot = i; } else if (slot->table->id == table->id) { /* Already exists in our optimize queue. */ + ut_ad(slot->table_id = table->id); return(FALSE); } } @@ -2976,15 +2977,24 @@ fts_optimize_sync_table( { dict_table_t* table = NULL; + /* Prevent DROP INDEX etc. from running when we are syncing + cache in background. */ + if (!rw_lock_s_lock_nowait(&dict_operation_lock, __FILE__, __LINE__)) { + /* Exit when fail to get dict operation lock. */ + return; + } + table = dict_table_open_on_id(table_id, FALSE, DICT_TABLE_OP_NORMAL); if (table) { if (dict_table_has_fts_index(table) && table->fts->cache) { - fts_sync_table(table, true, false); + fts_sync_table(table, true, false, true); } dict_table_close(table, FALSE, FALSE); } + + rw_lock_s_unlock(&dict_operation_lock); } /**********************************************************************//** diff --git a/mysql-wsrep-5.6/storage/innobase/fts/fts0que.cc b/mysql-wsrep-5.6/storage/innobase/fts/fts0que.cc index fcae6561..2c44a21a 100644 --- a/mysql-wsrep-5.6/storage/innobase/fts/fts0que.cc +++ b/mysql-wsrep-5.6/storage/innobase/fts/fts0que.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2007, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2007, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -287,7 +287,7 @@ fts_expand_query( dict_index_t* index, /*!< in: FTS index to search */ fts_query_t* query) /*!< in: query result, to be freed by the client */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*************************************************************//** This function finds documents that contain all words in a phrase or proximity search. And if proximity search, verify @@ -1128,7 +1128,7 @@ cont_search: /*****************************************************************//** Set difference. @return DB_SUCCESS if all go well */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t fts_query_difference( /*=================*/ @@ -1220,7 +1220,7 @@ fts_query_difference( /*****************************************************************//** Intersect the token doc ids with the current set. @return DB_SUCCESS if all go well */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t fts_query_intersect( /*================*/ @@ -1398,7 +1398,7 @@ fts_query_cache( /*****************************************************************//** Set union. @return DB_SUCCESS if all go well */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t fts_query_union( /*============*/ @@ -2014,7 +2014,7 @@ fts_query_select( Read the rows from the FTS index, that match word and where the doc id is between first and last doc id. @return DB_SUCCESS if all go well else error code */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t fts_query_find_term( /*================*/ @@ -2154,7 +2154,7 @@ fts_query_sum( /******************************************************************** Calculate the total documents that contain a particular word (term). @return DB_SUCCESS if all go well else error code */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t fts_query_total_docs_containing_term( /*=================================*/ @@ -2233,7 +2233,7 @@ fts_query_total_docs_containing_term( /******************************************************************** Get the total number of words in a documents. @return DB_SUCCESS if all go well else error code */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t fts_query_terms_in_document( /*========================*/ @@ -2314,7 +2314,7 @@ fts_query_terms_in_document( /*****************************************************************//** Retrieve the document and match the phrase tokens. @return DB_SUCCESS or error code */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t fts_query_match_document( /*=====================*/ @@ -2360,7 +2360,7 @@ fts_query_match_document( This function fetches the original documents and count the words in between matching words to see that is in specified distance @return DB_SUCCESS if all OK */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) bool fts_query_is_in_proximity_range( /*============================*/ @@ -2415,7 +2415,7 @@ fts_query_is_in_proximity_range( Iterate over the matched document ids and search the for the actual phrase in the text. @return DB_SUCCESS if all OK */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t fts_query_search_phrase( /*====================*/ @@ -2503,7 +2503,7 @@ func_exit: /*****************************************************************//** Text/Phrase search. @return DB_SUCCESS or error code */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t fts_query_phrase_search( /*====================*/ @@ -2754,7 +2754,7 @@ func_exit: /*****************************************************************//** Find the word and evaluate. @return DB_SUCCESS if all go well */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t fts_query_execute( /*==============*/ @@ -4123,7 +4123,7 @@ words in documents found in the first search pass will be used as search arguments to search the document again, thus "expand" the search result set. @return DB_SUCCESS if success, otherwise the error code */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t fts_expand_query( /*=============*/ diff --git a/mysql-wsrep-5.6/storage/innobase/fts/fts0tlex.cc b/mysql-wsrep-5.6/storage/innobase/fts/fts0tlex.cc index b744fbf0..d4d9b4c4 100644 --- a/mysql-wsrep-5.6/storage/innobase/fts/fts0tlex.cc +++ b/mysql-wsrep-5.6/storage/innobase/fts/fts0tlex.cc @@ -305,9 +305,9 @@ YY_BUFFER_STATE fts0t_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner YY_BUFFER_STATE fts0t_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); YY_BUFFER_STATE fts0t_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); -void *fts0talloc (yy_size_t , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) ); -void *fts0trealloc (void *,yy_size_t , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) ); -void fts0tfree (void * , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) ); +void *fts0talloc (yy_size_t , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) ); +void *fts0trealloc (void *,yy_size_t , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) ); +void fts0tfree (void * , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) ); #define yy_new_buffer fts0t_create_buffer @@ -347,7 +347,7 @@ typedef int yy_state_type; static yy_state_type yy_get_previous_state (yyscan_t yyscanner ); static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner); static int yy_get_next_buffer (yyscan_t yyscanner ); -static void yy_fatal_error (yyconst char msg[] , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) ); +static void yy_fatal_error (yyconst char msg[] , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) ); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. @@ -447,7 +447,7 @@ static yyconst flex_int16_t yy_chk[29] = #line 1 "fts0tlex.l" /***************************************************************************** -Copyright (c) 2007, 2014, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2007, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -575,11 +575,11 @@ extern int fts0twrap (yyscan_t yyscanner ); #endif #ifndef yytext_ptr -static void yy_flex_strncpy (char *,yyconst char *,int , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused))); +static void yy_flex_strncpy (char *,yyconst char *,int , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused))); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused))); +static int yy_flex_strlen (yyconst char * , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused))); #endif #ifndef YY_NO_INPUT @@ -1602,7 +1602,7 @@ YY_BUFFER_STATE fts0t_scan_bytes (yyconst char * yybytes, int _yybytes_len , y #define YY_EXIT_FAILURE 2 #endif -static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused))) +static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused))) { (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); @@ -1903,7 +1903,7 @@ int fts0tlex_destroy (yyscan_t yyscanner) */ #ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused))) +static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused))) { register int i; for ( i = 0; i < n; ++i ) @@ -1912,7 +1912,7 @@ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yys #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused))) +static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused))) { register int n; for ( n = 0; s[n]; ++n ) @@ -1922,12 +1922,12 @@ static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner __at } #endif -void *fts0talloc (yy_size_t size , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused))) +void *fts0talloc (yy_size_t size , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused))) { return (void *) malloc( size ); } -void *fts0trealloc (void * ptr, yy_size_t size , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused))) +void *fts0trealloc (void * ptr, yy_size_t size , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused))) { /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those @@ -1939,7 +1939,7 @@ void *fts0trealloc (void * ptr, yy_size_t size , yyscan_t yyscanner return (void *) realloc( (char *) ptr, size ); } -void fts0tfree (void * ptr , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused))) +void fts0tfree (void * ptr , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused))) { free( (char *) ptr ); /* see fts0trealloc() for (char *) cast */ } diff --git a/mysql-wsrep-5.6/storage/innobase/fts/make_parser.sh b/mysql-wsrep-5.6/storage/innobase/fts/make_parser.sh index 2c072914..52b63eff 100755 --- a/mysql-wsrep-5.6/storage/innobase/fts/make_parser.sh +++ b/mysql-wsrep-5.6/storage/innobase/fts/make_parser.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2007, 2011, Oracle and/or its affiliates. All Rights Reserved. +# Copyright (c) 2007, 2016, Oracle and/or its affiliates. All Rights Reserved. # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software @@ -22,15 +22,15 @@ make -f Makefile.query echo '#include "univ.i"' > $TMPF # This is to avoid compiler warning about unused parameters. -# FIXME: gcc extension "__attribute__" causing compilation errors on windows +# FIXME: gcc extension "MY_ATTRIBUTE" causing compilation errors on windows # platform. Quote them out for now. sed -e ' -s/^\(static.*void.*yy_fatal_error.*msg.*,\)\(.*yyscanner\)/\1 \2 __attribute__((unused))/; -s/^\(static.*void.*yy_flex_strncpy.*n.*,\)\(.*yyscanner\)/\1 \2 __attribute__((unused))/; -s/^\(static.*int.*yy_flex_strlen.*s.*,\)\(.*yyscanner\)/\1 \2 __attribute__((unused))/; -s/^\(\(static\|void\).*fts0[bt]alloc.*,\)\(.*yyscanner\)/\1 \3 __attribute__((unused))/; -s/^\(\(static\|void\).*fts0[bt]realloc.*,\)\(.*yyscanner\)/\1 \3 __attribute__((unused))/; -s/^\(\(static\|void\).*fts0[bt]free.*,\)\(.*yyscanner\)/\1 \3 __attribute__((unused))/; +s/^\(static.*void.*yy_fatal_error.*msg.*,\)\(.*yyscanner\)/\1 \2 MY_ATTRIBUTE((unused))/; +s/^\(static.*void.*yy_flex_strncpy.*n.*,\)\(.*yyscanner\)/\1 \2 MY_ATTRIBUTE((unused))/; +s/^\(static.*int.*yy_flex_strlen.*s.*,\)\(.*yyscanner\)/\1 \2 MY_ATTRIBUTE((unused))/; +s/^\(\(static\|void\).*fts0[bt]alloc.*,\)\(.*yyscanner\)/\1 \3 MY_ATTRIBUTE((unused))/; +s/^\(\(static\|void\).*fts0[bt]realloc.*,\)\(.*yyscanner\)/\1 \3 MY_ATTRIBUTE((unused))/; +s/^\(\(static\|void\).*fts0[bt]free.*,\)\(.*yyscanner\)/\1 \3 MY_ATTRIBUTE((unused))/; ' < fts0blex.cc >> $TMPF mv $TMPF fts0blex.cc @@ -38,12 +38,12 @@ mv $TMPF fts0blex.cc echo '#include "univ.i"' > $TMPF sed -e ' -s/^\(static.*void.*yy_fatal_error.*msg.*,\)\(.*yyscanner\)/\1 \2 __attribute__((unused))/; -s/^\(static.*void.*yy_flex_strncpy.*n.*,\)\(.*yyscanner\)/\1 \2 __attribute__((unused))/; -s/^\(static.*int.*yy_flex_strlen.*s.*,\)\(.*yyscanner\)/\1 \2 __attribute__((unused))/; -s/^\(\(static\|void\).*fts0[bt]alloc.*,\)\(.*yyscanner\)/\1 \3 __attribute__((unused))/; -s/^\(\(static\|void\).*fts0[bt]realloc.*,\)\(.*yyscanner\)/\1 \3 __attribute__((unused))/; -s/^\(\(static\|void\).*fts0[bt]free.*,\)\(.*yyscanner\)/\1 \3 __attribute__((unused))/; +s/^\(static.*void.*yy_fatal_error.*msg.*,\)\(.*yyscanner\)/\1 \2 MY_ATTRIBUTE((unused))/; +s/^\(static.*void.*yy_flex_strncpy.*n.*,\)\(.*yyscanner\)/\1 \2 MY_ATTRIBUTE((unused))/; +s/^\(static.*int.*yy_flex_strlen.*s.*,\)\(.*yyscanner\)/\1 \2 MY_ATTRIBUTE((unused))/; +s/^\(\(static\|void\).*fts0[bt]alloc.*,\)\(.*yyscanner\)/\1 \3 MY_ATTRIBUTE((unused))/; +s/^\(\(static\|void\).*fts0[bt]realloc.*,\)\(.*yyscanner\)/\1 \3 MY_ATTRIBUTE((unused))/; +s/^\(\(static\|void\).*fts0[bt]free.*,\)\(.*yyscanner\)/\1 \3 MY_ATTRIBUTE((unused))/; ' < fts0tlex.cc >> $TMPF mv $TMPF fts0tlex.cc diff --git a/mysql-wsrep-5.6/storage/innobase/handler/ha_innodb.cc b/mysql-wsrep-5.6/storage/innobase/handler/ha_innodb.cc index 834b0e30..c2b3e10d 100644 --- a/mysql-wsrep-5.6/storage/innobase/handler/ha_innodb.cc +++ b/mysql-wsrep-5.6/storage/innobase/handler/ha_innodb.cc @@ -1465,7 +1465,7 @@ thd_set_lock_wait_time( /********************************************************************//** Obtain the InnoDB transaction of a MySQL thread. @return reference to transaction pointer */ -__attribute__((warn_unused_result, nonnull)) +MY_ATTRIBUTE((warn_unused_result, nonnull)) static inline trx_t*& thd_to_trx( @@ -3553,7 +3553,7 @@ int innobase_end( /*=========*/ handlerton* hton, /*!< in/out: InnoDB handlerton */ - ha_panic_function type __attribute__((unused))) + ha_panic_function type MY_ATTRIBUTE((unused))) /*!< in: ha_panic() parameter */ { int err= 0; @@ -7027,6 +7027,7 @@ dberr_t ha_innobase::innobase_lock_autoinc(void) /*====================================*/ { + DBUG_ENTER("ha_innobase::innobase_lock_autoinc"); dberr_t error = DB_SUCCESS; ut_ad(!srv_read_only_mode); @@ -7061,6 +7062,8 @@ ha_innobase::innobase_lock_autoinc(void) /* Fall through to old style locking. */ case AUTOINC_OLD_STYLE_LOCKING: + DBUG_EXECUTE_IF("die_if_autoinc_old_lock_style_used", + ut_ad(0);); error = row_lock_table_autoinc_for_mysql(prebuilt); if (error == DB_SUCCESS) { @@ -7074,7 +7077,7 @@ ha_innobase::innobase_lock_autoinc(void) ut_error; } - return(error); + DBUG_RETURN(error); } /********************************************************************//** @@ -9728,7 +9731,7 @@ create_table_check_doc_id_col( /*****************************************************************//** Creates a table definition to an InnoDB database. */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) int create_table_def( /*=============*/ @@ -11172,6 +11175,25 @@ ha_innobase::discard_or_import_tablespace( /* Commit the transaction in order to release the table lock. */ trx_commit_for_mysql(prebuilt->trx); + if (err == DB_SUCCESS && !discard + && dict_stats_is_persistent_enabled(dict_table)) { + dberr_t ret; + + /* Adjust the persistent statistics. */ + ret = dict_stats_update(dict_table, + DICT_STATS_RECALC_PERSISTENT); + + if (ret != DB_SUCCESS) { + push_warning_printf( + ha_thd(), + Sql_condition::WARN_LEVEL_WARN, + ER_ALTER_INFO, + "Error updating stats for table '%s'" + " after table rebuild: %s", + dict_table->name, ut_strerr(ret)); + } + } + DBUG_RETURN(convert_error_code_to_mysql(err, dict_table->flags, NULL)); } @@ -11422,7 +11444,7 @@ innobase_drop_database( /*********************************************************************//** Renames an InnoDB table. @return DB_SUCCESS or error code */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t innobase_rename_table( /*==================*/ @@ -12489,7 +12511,7 @@ ha_innobase::optimize( if (innodb_optimize_fulltext_only) { if (prebuilt->table->fts && prebuilt->table->fts->cache && !dict_table_is_discarded(prebuilt->table)) { - fts_sync_table(prebuilt->table, false, true); + fts_sync_table(prebuilt->table, false, true, false); fts_optimize_table(prebuilt->table); } return(HA_ADMIN_OK); @@ -15648,7 +15670,12 @@ innodb_internal_table_update( my_free(old); } - fts_internal_tbl_name = *(char**) var_ptr; + fts_internal_tbl_name2 = *(char**) var_ptr; + if (fts_internal_tbl_name2 == NULL) { + fts_internal_tbl_name = const_cast("default"); + } else { + fts_internal_tbl_name = fts_internal_tbl_name2; + } } /****************************************************************//** @@ -16381,7 +16408,7 @@ static char* srv_buffer_pool_evict; Evict all uncompressed pages of compressed tables from the buffer pool. Keep the compressed pages in the buffer pool. @return whether all uncompressed pages were evicted */ -static __attribute__((warn_unused_result)) +static MY_ATTRIBUTE((warn_unused_result)) bool innodb_buffer_pool_evict_uncompressed(void) /*=======================================*/ @@ -16709,13 +16736,13 @@ void purge_run_now_set( /*==============*/ THD* thd /*!< in: thread handle */ - __attribute__((unused)), + MY_ATTRIBUTE((unused)), struct st_mysql_sys_var* var /*!< in: pointer to system variable */ - __attribute__((unused)), + MY_ATTRIBUTE((unused)), void* var_ptr /*!< out: where the formal string goes */ - __attribute__((unused)), + MY_ATTRIBUTE((unused)), const void* save) /*!< in: immediate result from check function */ { @@ -16732,13 +16759,13 @@ void purge_stop_now_set( /*===============*/ THD* thd /*!< in: thread handle */ - __attribute__((unused)), + MY_ATTRIBUTE((unused)), struct st_mysql_sys_var* var /*!< in: pointer to system variable */ - __attribute__((unused)), + MY_ATTRIBUTE((unused)), void* var_ptr /*!< out: where the formal string goes */ - __attribute__((unused)), + MY_ATTRIBUTE((unused)), const void* save) /*!< in: immediate result from check function */ { @@ -16754,13 +16781,13 @@ void checkpoint_now_set( /*===============*/ THD* thd /*!< in: thread handle */ - __attribute__((unused)), + MY_ATTRIBUTE((unused)), struct st_mysql_sys_var* var /*!< in: pointer to system variable */ - __attribute__((unused)), + MY_ATTRIBUTE((unused)), void* var_ptr /*!< out: where the formal string goes */ - __attribute__((unused)), + MY_ATTRIBUTE((unused)), const void* save) /*!< in: immediate result from check function */ { @@ -16781,13 +16808,13 @@ void buf_flush_list_now_set( /*===================*/ THD* thd /*!< in: thread handle */ - __attribute__((unused)), + MY_ATTRIBUTE((unused)), struct st_mysql_sys_var* var /*!< in: pointer to system variable */ - __attribute__((unused)), + MY_ATTRIBUTE((unused)), void* var_ptr /*!< out: where the formal string goes */ - __attribute__((unused)), + MY_ATTRIBUTE((unused)), const void* save) /*!< in: immediate result from check function */ { @@ -16884,13 +16911,13 @@ void buffer_pool_dump_now( /*=================*/ THD* thd /*!< in: thread handle */ - __attribute__((unused)), + MY_ATTRIBUTE((unused)), struct st_mysql_sys_var* var /*!< in: pointer to system variable */ - __attribute__((unused)), + MY_ATTRIBUTE((unused)), void* var_ptr /*!< out: where the formal string goes */ - __attribute__((unused)), + MY_ATTRIBUTE((unused)), const void* save) /*!< in: immediate result from check function */ { @@ -16907,13 +16934,13 @@ void buffer_pool_load_now( /*=================*/ THD* thd /*!< in: thread handle */ - __attribute__((unused)), + MY_ATTRIBUTE((unused)), struct st_mysql_sys_var* var /*!< in: pointer to system variable */ - __attribute__((unused)), + MY_ATTRIBUTE((unused)), void* var_ptr /*!< out: where the formal string goes */ - __attribute__((unused)), + MY_ATTRIBUTE((unused)), const void* save) /*!< in: immediate result from check function */ { @@ -16930,13 +16957,13 @@ void buffer_pool_load_abort( /*===================*/ THD* thd /*!< in: thread handle */ - __attribute__((unused)), + MY_ATTRIBUTE((unused)), struct st_mysql_sys_var* var /*!< in: pointer to system variable */ - __attribute__((unused)), + MY_ATTRIBUTE((unused)), void* var_ptr /*!< out: where the formal string goes */ - __attribute__((unused)), + MY_ATTRIBUTE((unused)), const void* save) /*!< in: immediate result from check function */ { @@ -16954,10 +16981,10 @@ which control InnoDB "status monitor" output to the error log. static void innodb_status_output_update( - THD* thd __attribute__((unused)), - struct st_mysql_sys_var* var __attribute__((unused)), - void* var_ptr __attribute__((unused)), - const void* save __attribute__((unused))) + THD* thd MY_ATTRIBUTE((unused)), + struct st_mysql_sys_var* var MY_ATTRIBUTE((unused)), + void* var_ptr MY_ATTRIBUTE((unused)), + const void* save MY_ATTRIBUTE((unused))) { *static_cast(var_ptr) = *static_cast(save); /* The lock timeout monitor thread also takes care of this @@ -17691,7 +17718,7 @@ static MYSQL_SYSVAR_BOOL(disable_sort_file_cache, srv_disable_sort_file_cache, "Whether to disable OS system file cache for sort I/O", NULL, NULL, FALSE); -static MYSQL_SYSVAR_STR(ft_aux_table, fts_internal_tbl_name, +static MYSQL_SYSVAR_STR(ft_aux_table, fts_internal_tbl_name2, PLUGIN_VAR_NOCMDARG, "FTS internal auxiliary table to be checked", innodb_internal_table_validate, diff --git a/mysql-wsrep-5.6/storage/innobase/handler/ha_innodb.h b/mysql-wsrep-5.6/storage/innobase/handler/ha_innodb.h index 45b8fd38..5990443d 100644 --- a/mysql-wsrep-5.6/storage/innobase/handler/ha_innodb.h +++ b/mysql-wsrep-5.6/storage/innobase/handler/ha_innodb.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2000, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2000, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -434,14 +434,14 @@ enum durability_properties thd_get_durability_property(const MYSQL_THD thd); @param off auto_increment_offset @param inc auto_increment_increment */ void thd_get_autoinc(const MYSQL_THD thd, ulong* off, ulong* inc) -__attribute__((nonnull)); +MY_ATTRIBUTE((nonnull)); /** Is strict sql_mode set. @param thd Thread object @return True if sql_mode has strict mode (all or trans), false otherwise. */ bool thd_is_strict_mode(const MYSQL_THD thd) -__attribute__((nonnull)); +MY_ATTRIBUTE((nonnull)); } /* extern "C" */ #ifdef WITH_WSREP @@ -511,7 +511,7 @@ innobase_index_name_is_reserved( const KEY* key_info, /*!< in: Indexes to be created */ ulint num_of_keys) /*!< in: Number of indexes to be created. */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*****************************************************************//** Determines InnoDB table flags. @@ -528,7 +528,7 @@ innobase_table_flags( outside system tablespace */ ulint* flags, /*!< out: DICT_TF flags */ ulint* flags2) /*!< out: DICT_TF2 flags */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*****************************************************************//** Validates the create options. We may build on this function @@ -545,7 +545,7 @@ create_options_are_invalid( columns and indexes */ HA_CREATE_INFO* create_info, /*!< in: create info. */ bool use_tablespace) /*!< in: srv_file_per_table */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*********************************************************************//** Retrieve the FTS Relevance Ranking result for doc with doc_id @@ -575,7 +575,7 @@ void innobase_fts_close_ranking( /*=======================*/ FT_INFO* fts_hdl) /*!< in: FTS handler */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*****************************************************************//** Initialize the table FTS stopword list @return TRUE if success */ @@ -586,7 +586,7 @@ innobase_fts_load_stopword( dict_table_t* table, /*!< in: Table has the FTS */ trx_t* trx, /*!< in: transaction */ THD* thd) /*!< in: current thread */ - __attribute__((nonnull(1,3), warn_unused_result)); + MY_ATTRIBUTE((nonnull(1,3), warn_unused_result)); /** Some defines for innobase_fts_check_doc_id_index() return value */ enum fts_doc_id_index_enum { @@ -608,7 +608,7 @@ innobase_fts_check_doc_id_index( that is being altered */ ulint* fts_doc_col_no) /*!< out: The column number for Doc ID */ - __attribute__((warn_unused_result)); + MY_ATTRIBUTE((warn_unused_result)); /*******************************************************************//** Check whether the table has a unique index with FTS_DOC_ID_INDEX_NAME @@ -621,7 +621,7 @@ innobase_fts_check_doc_id_index_in_def( /*===================================*/ ulint n_key, /*!< in: Number of keys */ const KEY* key_info) /*!< in: Key definitions */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*********************************************************************** @return version of the extended FTS API */ diff --git a/mysql-wsrep-5.6/storage/innobase/handler/handler0alter.cc b/mysql-wsrep-5.6/storage/innobase/handler/handler0alter.cc index 6a8aa9e7..540a8199 100644 --- a/mysql-wsrep-5.6/storage/innobase/handler/handler0alter.cc +++ b/mysql-wsrep-5.6/storage/innobase/handler/handler0alter.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2005, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2005, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -102,7 +102,7 @@ static const Alter_inplace_info::HA_ALTER_FLAGS INNOBASE_ALTER_NOREBUILD | Alter_inplace_info::ALTER_COLUMN_NAME; /* Report an InnoDB error to the client by invoking my_error(). */ -static UNIV_COLD __attribute__((nonnull)) +static UNIV_COLD MY_ATTRIBUTE((nonnull)) void my_error_innodb( /*============*/ @@ -199,13 +199,16 @@ innobase_fulltext_exist( Determine if ALTER TABLE needs to rebuild the table. @param ha_alter_info the DDL operation @return whether it is necessary to rebuild the table */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) bool innobase_need_rebuild( /*==================*/ const Alter_inplace_info* ha_alter_info) { - if (ha_alter_info->handler_flags + Alter_inplace_info::HA_ALTER_FLAGS alter_inplace_flags = + ha_alter_info->handler_flags & ~(INNOBASE_INPLACE_IGNORE); + + if (alter_inplace_flags == Alter_inplace_info::CHANGE_CREATE_OPTION && !(ha_alter_info->create_info->used_fields & (HA_CREATE_USED_ROW_FORMAT @@ -519,7 +522,7 @@ ha_innobase::check_if_supported_inplace_alter( /*************************************************************//** Initialize the dict_foreign_t structure with supplied info @return true if added, false if duplicate foreign->id */ -static __attribute__((nonnull(1,3,5,7))) +static MY_ATTRIBUTE((nonnull(1,3,5,7))) bool innobase_init_foreign( /*==================*/ @@ -608,7 +611,7 @@ innobase_init_foreign( /*************************************************************//** Check whether the foreign key options is legit @return true if it is */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) bool innobase_check_fk_option( /*=====================*/ @@ -640,7 +643,7 @@ innobase_check_fk_option( /*************************************************************//** Set foreign key options @return true if successfully set */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) bool innobase_set_foreign_key_option( /*============================*/ @@ -685,7 +688,7 @@ innobase_set_foreign_key_option( Check if a foreign key constraint can make use of an index that is being created. @return useable index, or NULL if none found */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) const KEY* innobase_find_equiv_index( /*======================*/ @@ -741,7 +744,7 @@ no_match: Find an index whose first fields are the columns in the array in the same order and is not marked for deletion @return matching index, NULL if not found */ -static __attribute__((nonnull(1,2,6), warn_unused_result)) +static MY_ATTRIBUTE((nonnull(1,2,6), warn_unused_result)) dict_index_t* innobase_find_fk_index( /*===================*/ @@ -788,7 +791,7 @@ next_rec: Create InnoDB foreign key structure from MySQL alter_info @retval true if successful @retval false on error (will call my_error()) */ -static __attribute__((nonnull(1,2,3,7,8), warn_unused_result)) +static MY_ATTRIBUTE((nonnull(1,2,3,7,8), warn_unused_result)) bool innobase_get_foreign_key_info( /*==========================*/ @@ -1273,7 +1276,7 @@ innobase_rec_reset( /*******************************************************************//** This function checks that index keys are sensible. @return 0 or error number */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) int innobase_check_index_keys( /*======================*/ @@ -1394,7 +1397,7 @@ name_ok: /*******************************************************************//** Create index field definition for key part */ -static __attribute__((nonnull(2,3))) +static MY_ATTRIBUTE((nonnull(2,3))) void innobase_create_index_field_def( /*============================*/ @@ -1441,7 +1444,7 @@ innobase_create_index_field_def( /*******************************************************************//** Create index definition for key */ -static __attribute__((nonnull)) +static MY_ATTRIBUTE((nonnull)) void innobase_create_index_def( /*======================*/ @@ -1725,7 +1728,7 @@ ELSE ENDIF @return key definitions */ -static __attribute__((nonnull, warn_unused_result, malloc)) +static MY_ATTRIBUTE((nonnull, warn_unused_result, malloc)) index_def_t* innobase_create_key_defs( /*=====================*/ @@ -1944,7 +1947,7 @@ created_clustered: /*******************************************************************//** Check each index column size, make sure they do not exceed the max limit @return true if index column size exceeds limit */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) bool innobase_check_column_length( /*=========================*/ @@ -2094,7 +2097,7 @@ online_retry_drop_indexes_low( /********************************************************************//** Drop any indexes that we were not able to free previously due to open table handles. */ -static __attribute__((nonnull)) +static MY_ATTRIBUTE((nonnull)) void online_retry_drop_indexes( /*======================*/ @@ -2124,7 +2127,7 @@ online_retry_drop_indexes( /********************************************************************//** Commit a dictionary transaction and drop any indexes that we were not able to free previously due to open table handles. */ -static __attribute__((nonnull)) +static MY_ATTRIBUTE((nonnull)) void online_retry_drop_indexes_with_trx( /*===============================*/ @@ -2153,7 +2156,7 @@ online_retry_drop_indexes_with_trx( @param drop_fk constraints being dropped @param n_drop_fk number of constraints that are being dropped @return whether the constraint is being dropped */ -inline __attribute__((pure, nonnull, warn_unused_result)) +inline MY_ATTRIBUTE((pure, nonnull, warn_unused_result)) bool innobase_dropping_foreign( /*======================*/ @@ -2180,7 +2183,7 @@ column that is being dropped or modified to NOT NULL. @retval true Not allowed (will call my_error()) @retval false Allowed */ -static __attribute__((pure, nonnull, warn_unused_result)) +static MY_ATTRIBUTE((pure, nonnull, warn_unused_result)) bool innobase_check_foreigns_low( /*========================*/ @@ -2280,7 +2283,7 @@ column that is being dropped or modified to NOT NULL. @retval true Not allowed (will call my_error()) @retval false Allowed */ -static __attribute__((pure, nonnull, warn_unused_result)) +static MY_ATTRIBUTE((pure, nonnull, warn_unused_result)) bool innobase_check_foreigns( /*====================*/ @@ -2325,7 +2328,7 @@ innobase_check_foreigns( @param dfield InnoDB data field to copy to @param field MySQL value for the column @param comp nonzero if in compact format */ -static __attribute__((nonnull)) +static MY_ATTRIBUTE((nonnull)) void innobase_build_col_map_add( /*=======================*/ @@ -2359,7 +2362,7 @@ adding columns. @param heap Memory heap where allocated @return array of integers, mapping column numbers in the table to column numbers in altered_table */ -static __attribute__((nonnull(1,2,3,4,5,7), warn_unused_result)) +static MY_ATTRIBUTE((nonnull(1,2,3,4,5,7), warn_unused_result)) const ulint* innobase_build_col_map( /*===================*/ @@ -2496,7 +2499,7 @@ innobase_drop_fts_index_table( @param user_table InnoDB table as it is before the ALTER operation @param heap Memory heap for the allocation @return array of new column names in rebuilt_table, or NULL if not renamed */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) const char** innobase_get_col_names( Alter_inplace_info* ha_alter_info, @@ -2559,7 +2562,7 @@ while preparing ALTER TABLE. @retval true Failure @retval false Success */ -static __attribute__((warn_unused_result, nonnull(1,2,3,4))) +static MY_ATTRIBUTE((warn_unused_result, nonnull(1,2,3,4))) bool prepare_inplace_alter_table_dict( /*=============================*/ @@ -3197,7 +3200,7 @@ err_exit: /* Check whether an index is needed for the foreign key constraint. If so, if it is dropped, is there an equivalent index can play its role. @return true if the index is needed and can't be dropped */ -static __attribute__((nonnull(1,2,3,5), warn_unused_result)) +static MY_ATTRIBUTE((nonnull(1,2,3,5), warn_unused_result)) bool innobase_check_foreign_key_index( /*=============================*/ @@ -3764,7 +3767,7 @@ err_exit: } if (!(ha_alter_info->handler_flags & INNOBASE_ALTER_DATA) - || (ha_alter_info->handler_flags + || ((ha_alter_info->handler_flags & ~INNOBASE_INPLACE_IGNORE) == Alter_inplace_info::CHANGE_CREATE_OPTION && !innobase_need_rebuild(ha_alter_info))) { @@ -3930,7 +3933,7 @@ ok_exit: DBUG_RETURN(false); } - if (ha_alter_info->handler_flags + if ((ha_alter_info->handler_flags & ~INNOBASE_INPLACE_IGNORE) == Alter_inplace_info::CHANGE_CREATE_OPTION && !innobase_need_rebuild(ha_alter_info)) { goto ok_exit; @@ -4073,7 +4076,7 @@ temparary index prefix @param locked TRUE=table locked, FALSE=may need to do a lazy drop @param trx the transaction */ -static __attribute__((nonnull)) +static MY_ATTRIBUTE((nonnull)) void innobase_rollback_sec_index( /*========================*/ @@ -4107,7 +4110,7 @@ during prepare, but might not be during commit). @retval true Failure @retval false Success */ -inline __attribute__((nonnull, warn_unused_result)) +inline MY_ATTRIBUTE((nonnull, warn_unused_result)) bool rollback_inplace_alter_table( /*=========================*/ @@ -4239,7 +4242,7 @@ func_exit: @param foreign_id Foreign key constraint identifier @retval true Failure @retval false Success */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) bool innobase_drop_foreign_try( /*======================*/ @@ -4296,7 +4299,7 @@ innobase_drop_foreign_try( @param new_clustered whether the table has been rebuilt @retval true Failure @retval false Success */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) bool innobase_rename_column_try( /*=======================*/ @@ -4505,7 +4508,7 @@ rename_foreign: @param table_name Table name in MySQL @retval true Failure @retval false Success */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) bool innobase_rename_columns_try( /*========================*/ @@ -4555,7 +4558,7 @@ as part of commit_cache_norebuild(). @param ha_alter_info Data used during in-place alter. @param table the TABLE @param user_table InnoDB table that was being altered */ -static __attribute__((nonnull)) +static MY_ATTRIBUTE((nonnull)) void innobase_rename_columns_cache( /*==========================*/ @@ -4599,7 +4602,7 @@ processed_field: @param altered_table MySQL table that is being altered @param old_table MySQL table as it is before the ALTER operation @return the next auto-increment value (0 if not present) */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) ulonglong commit_get_autoinc( /*===============*/ @@ -4681,7 +4684,7 @@ but do not touch the data dictionary cache. @retval true Failure @retval false Success */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) bool innobase_update_foreign_try( /*========================*/ @@ -4764,7 +4767,7 @@ after the changes to data dictionary tables were committed. @param ctx In-place ALTER TABLE context @param user_thd MySQL connection @return InnoDB error code (should always be DB_SUCCESS) */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t innobase_update_foreign_cache( /*==========================*/ @@ -4849,7 +4852,7 @@ when rebuilding the table. @retval true Failure @retval false Success */ -inline __attribute__((nonnull, warn_unused_result)) +inline MY_ATTRIBUTE((nonnull, warn_unused_result)) bool commit_try_rebuild( /*===============*/ @@ -5011,7 +5014,7 @@ commit_try_rebuild( /** Apply the changes made during commit_try_rebuild(), to the data dictionary cache and the file system. @param ctx In-place ALTER TABLE context */ -inline __attribute__((nonnull)) +inline MY_ATTRIBUTE((nonnull)) void commit_cache_rebuild( /*=================*/ @@ -5106,7 +5109,7 @@ when not rebuilding the table. @retval true Failure @retval false Success */ -inline __attribute__((nonnull, warn_unused_result)) +inline MY_ATTRIBUTE((nonnull, warn_unused_result)) bool commit_try_norebuild( /*=================*/ @@ -5216,7 +5219,7 @@ after a successful commit_try_norebuild() call. @param trx Data dictionary transaction object (will be started and committed) @return whether all replacements were found for dropped indexes */ -inline __attribute__((nonnull, warn_unused_result)) +inline MY_ATTRIBUTE((nonnull, warn_unused_result)) bool commit_cache_norebuild( /*===================*/ diff --git a/mysql-wsrep-5.6/storage/innobase/handler/i_s.cc b/mysql-wsrep-5.6/storage/innobase/handler/i_s.cc index 192003a1..a780ee5c 100644 --- a/mysql-wsrep-5.6/storage/innobase/handler/i_s.cc +++ b/mysql-wsrep-5.6/storage/innobase/handler/i_s.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2007, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2007, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -3004,15 +3004,26 @@ i_s_fts_deleted_generic_fill( DBUG_RETURN(0); } - deleted = fts_doc_ids_create(); + /* Prevent DDL to drop fts aux tables. */ + rw_lock_s_lock(&dict_operation_lock); user_table = dict_table_open_on_name( fts_internal_tbl_name, FALSE, FALSE, DICT_ERR_IGNORE_NONE); if (!user_table) { + rw_lock_s_unlock(&dict_operation_lock); + + DBUG_RETURN(0); + } else if (!dict_table_has_fts_index(user_table)) { + dict_table_close(user_table, FALSE, FALSE); + + rw_lock_s_unlock(&dict_operation_lock); + DBUG_RETURN(0); } + deleted = fts_doc_ids_create(); + trx = trx_allocate_for_background(); trx->op_info = "Select for FTS DELETE TABLE"; @@ -3040,6 +3051,8 @@ i_s_fts_deleted_generic_fill( dict_table_close(user_table, FALSE, FALSE); + rw_lock_s_unlock(&dict_operation_lock); + DBUG_RETURN(0); } @@ -3421,6 +3434,12 @@ i_s_fts_index_cache_fill( DBUG_RETURN(0); } + if (user_table->fts == NULL || user_table->fts->cache == NULL) { + dict_table_close(user_table, FALSE, FALSE); + + DBUG_RETURN(0); + } + cache = user_table->fts->cache; ut_a(cache); @@ -3859,10 +3878,15 @@ i_s_fts_index_table_fill( DBUG_RETURN(0); } + /* Prevent DDL to drop fts aux tables. */ + rw_lock_s_lock(&dict_operation_lock); + user_table = dict_table_open_on_name( fts_internal_tbl_name, FALSE, FALSE, DICT_ERR_IGNORE_NONE); if (!user_table) { + rw_lock_s_unlock(&dict_operation_lock); + DBUG_RETURN(0); } @@ -3875,6 +3899,8 @@ i_s_fts_index_table_fill( dict_table_close(user_table, FALSE, FALSE); + rw_lock_s_unlock(&dict_operation_lock); + DBUG_RETURN(0); } @@ -4012,16 +4038,25 @@ i_s_fts_config_fill( DBUG_RETURN(0); } + DEBUG_SYNC_C("i_s_fts_config_fille_check"); + fields = table->field; + /* Prevent DDL to drop fts aux tables. */ + rw_lock_s_lock(&dict_operation_lock); + user_table = dict_table_open_on_name( fts_internal_tbl_name, FALSE, FALSE, DICT_ERR_IGNORE_NONE); if (!user_table) { + rw_lock_s_unlock(&dict_operation_lock); + DBUG_RETURN(0); } else if (!dict_table_has_fts_index(user_table)) { dict_table_close(user_table, FALSE, FALSE); + rw_lock_s_unlock(&dict_operation_lock); + DBUG_RETURN(0); } @@ -4077,6 +4112,8 @@ i_s_fts_config_fill( dict_table_close(user_table, FALSE, FALSE); + rw_lock_s_unlock(&dict_operation_lock); + DBUG_RETURN(0); } diff --git a/mysql-wsrep-5.6/storage/innobase/ibuf/ibuf0ibuf.cc b/mysql-wsrep-5.6/storage/innobase/ibuf/ibuf0ibuf.cc index caf1f1a8..945611e6 100644 --- a/mysql-wsrep-5.6/storage/innobase/ibuf/ibuf0ibuf.cc +++ b/mysql-wsrep-5.6/storage/innobase/ibuf/ibuf0ibuf.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1997, 2014, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -657,7 +657,7 @@ byte* ibuf_parse_bitmap_init( /*===================*/ byte* ptr, /*!< in: buffer */ - byte* end_ptr __attribute__((unused)), /*!< in: buffer end */ + byte* end_ptr MY_ATTRIBUTE((unused)), /*!< in: buffer end */ buf_block_t* block, /*!< in: block or NULL */ mtr_t* mtr) /*!< in: mtr or NULL */ { @@ -2494,7 +2494,7 @@ ibuf_get_merge_page_nos_func( /*******************************************************************//** Get the matching records for space id. @return current rec or NULL */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) const rec_t* ibuf_get_user_rec( /*===============*/ @@ -2516,7 +2516,7 @@ ibuf_get_user_rec( Reads page numbers for a space id from an ibuf tree. @return a lower limit for the combined volume of records which will be merged */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) ulint ibuf_get_merge_pages( /*=================*/ @@ -2624,40 +2624,22 @@ ibuf_merge_pages( } /*********************************************************************//** -Get the table instance from the table id. -@return table instance */ -static __attribute__((warn_unused_result)) -dict_table_t* -ibuf_get_table( -/*===========*/ - table_id_t table_id) /*!< in: valid table id */ -{ - rw_lock_s_lock_func(&dict_operation_lock, 0, __FILE__, __LINE__); - - dict_table_t* table = dict_table_open_on_id( - table_id, FALSE, DICT_TABLE_OP_NORMAL); - - rw_lock_s_unlock_gen(&dict_operation_lock, 0); - - return(table); -} - -/*********************************************************************//** -Contracts insert buffer trees by reading pages to the buffer pool. -@return a lower limit for the combined size in bytes of entries which -will be merged from ibuf trees to the pages read, 0 if ibuf is -empty */ -static +Contracts insert buffer trees by reading pages referring to space_id +to the buffer pool. +@returns number of pages merged.*/ +UNIV_INTERN ulint ibuf_merge_space( /*=============*/ - ulint space, /*!< in: tablespace id to merge */ - ulint* n_pages)/*!< out: number of pages to which merged */ + ulint space) /*!< in: tablespace id to merge */ { mtr_t mtr; btr_pcur_t pcur; mem_heap_t* heap = mem_heap_create(512); dtuple_t* tuple = ibuf_search_tuple_build(space, 0, heap); + ulint n_pages = 0; + + ut_ad(space < SRV_LOG_SPACE_FIRST_ID); ibuf_mtr_start(&mtr); @@ -2689,50 +2671,47 @@ ibuf_merge_space( } else { sum_sizes = ibuf_get_merge_pages( - &pcur, space, IBUF_MAX_N_PAGES_MERGED, - &pages[0], &spaces[0], &versions[0], n_pages, - &mtr); + &pcur, space, IBUF_MAX_N_PAGES_MERGED, + &pages[0], &spaces[0], &versions[0], &n_pages, + &mtr); + ib_logf(IB_LOG_LEVEL_INFO,"\n Size of pages merged %lu" + ,sum_sizes); - ++sum_sizes; } ibuf_mtr_commit(&mtr); btr_pcur_close(&pcur); - if (sum_sizes > 0) { - - ut_a(*n_pages > 0 || sum_sizes == 1); + if (n_pages > 0) { #ifdef UNIV_DEBUG - ut_ad(*n_pages <= UT_ARR_SIZE(pages)); + ut_ad(n_pages <= UT_ARR_SIZE(pages)); - for (ulint i = 0; i < *n_pages; ++i) { + for (ulint i = 0; i < n_pages; ++i) { ut_ad(spaces[i] == space); ut_ad(i == 0 || versions[i] == versions[i - 1]); } #endif /* UNIV_DEBUG */ buf_read_ibuf_merge_pages( - true, spaces, versions, pages, *n_pages); + true, spaces, versions, pages, n_pages); } - return(sum_sizes); + return(n_pages); } -/*********************************************************************//** -Contracts insert buffer trees by reading pages to the buffer pool. +/** Contract the change buffer by reading pages to the buffer pool. +@param[out] n_pages number of pages merged +@param[in] sync whether the caller waits for +the issued reads to complete @return a lower limit for the combined size in bytes of entries which will be merged from ibuf trees to the pages read, 0 if ibuf is empty */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) ulint ibuf_merge( /*=======*/ - table_id_t table_id, /*!< in: if merge should be - done only for a specific - table, for all tables this - should be 0 */ ulint* n_pages, /*!< out: number of pages to which merged */ bool sync) /*!< in: TRUE if the caller @@ -2740,8 +2719,6 @@ ibuf_merge( read with the highest tablespace address to complete */ { - dict_table_t* table; - *n_pages = 0; /* We perform a dirty read of ibuf->empty, without latching @@ -2755,55 +2732,45 @@ ibuf_merge( } else if (ibuf_debug) { return(0); #endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */ - } else if (table_id == 0) { + } else { return(ibuf_merge_pages(n_pages, sync)); - } else if ((table = ibuf_get_table(table_id)) == 0) { - /* Table has been dropped. */ - return(0); } - - ulint volume = ibuf_merge_space(table->space, n_pages); - - dict_table_close(table, FALSE, FALSE); - - return(volume); } -/*********************************************************************//** -Contracts insert buffer trees by reading pages to the buffer pool. +/** Contract the change buffer by reading pages to the buffer pool. +@param[in] sync whether the caller waits for +the issued reads to complete @return a lower limit for the combined size in bytes of entries which -will be merged from ibuf trees to the pages read, 0 if ibuf is -empty */ +will be merged from ibuf trees to the pages read, 0 if ibuf is empty */ static ulint ibuf_contract( /*==========*/ - ibool sync) /*!< in: TRUE if the caller wants to wait for the + bool sync) /*!< in: TRUE if the caller wants to wait for the issued read with the highest tablespace address to complete */ { ulint n_pages; - return(ibuf_merge(0, &n_pages, sync)); + return(ibuf_merge_pages(&n_pages, sync)); } -/*********************************************************************//** -Contracts insert buffer trees by reading pages to the buffer pool. +/** Contract the change buffer by reading pages to the buffer pool. +@param[in] full If true, do a full contraction based +on PCT_IO(100). If false, the size of contract batch is determined +based on the current size of the change buffer. @return a lower limit for the combined size in bytes of entries which will be merged from ibuf trees to the pages read, 0 if ibuf is empty */ UNIV_INTERN ulint -ibuf_contract_in_background( -/*========================*/ - table_id_t table_id, /*!< in: if merge should be done only - for a specific table, for all tables - this should be 0 */ - ibool full) /*!< in: TRUE if the caller wants to - do a full contract based on PCT_IO(100). - If FALSE then the size of contract - batch is determined based on the - current size of the ibuf tree. */ +ibuf_merge_in_background( +/*=====================*/ + bool full) /*!< in: TRUE if the caller wants to + do a full contract based on PCT_IO(100). + If FALSE then the size of contract + batch is determined based on the + current size of the ibuf tree. */ { ulint sum_bytes = 0; ulint sum_pages = 0; @@ -2811,7 +2778,7 @@ ibuf_contract_in_background( ulint n_pages; #if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG - if (srv_ibuf_disable_background_merge && table_id == 0) { + if (srv_ibuf_disable_background_merge) { return(0); } #endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */ @@ -2840,7 +2807,7 @@ ibuf_contract_in_background( while (sum_pages < n_pages) { ulint n_bytes; - n_bytes = ibuf_merge(table_id, &n_pag2, FALSE); + n_bytes = ibuf_merge(&n_pag2, false); if (n_bytes == 0) { return(sum_bytes); @@ -3444,7 +3411,7 @@ ibuf_get_entry_counter_func( Buffer an operation in the insert/delete buffer, instead of doing it directly to the disk page, if this is possible. @return DB_SUCCESS, DB_STRONG_FAIL or other error */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t ibuf_insert_low( /*============*/ @@ -3511,8 +3478,7 @@ ibuf_insert_low( #ifdef UNIV_IBUF_DEBUG fputs("Ibuf too big\n", stderr); #endif - /* Use synchronous contract (== TRUE) */ - ibuf_contract(TRUE); + ibuf_contract(true); return(DB_STRONG_FAIL); } @@ -3935,7 +3901,7 @@ skip_watch: During merge, inserts to an index page a secondary index entry extracted from the insert buffer. @return newly inserted record */ -static __attribute__((nonnull)) +static MY_ATTRIBUTE((nonnull)) rec_t* ibuf_insert_to_index_page_low( /*==========================*/ @@ -4366,7 +4332,7 @@ ibuf_delete( /*********************************************************************//** Restores insert buffer tree cursor position @return TRUE if the position was restored; FALSE if not */ -static __attribute__((nonnull)) +static MY_ATTRIBUTE((nonnull)) ibool ibuf_restore_pos( /*=============*/ @@ -4421,7 +4387,7 @@ Deletes from ibuf the record on which pcur is positioned. If we have to resort to a pessimistic delete, this function commits mtr and closes the cursor. @return TRUE if mtr was committed and pcur closed in this operation */ -static __attribute__((warn_unused_result)) +static MY_ATTRIBUTE((warn_unused_result)) ibool ibuf_delete_rec( /*============*/ diff --git a/mysql-wsrep-5.6/storage/innobase/include/api0api.h b/mysql-wsrep-5.6/storage/innobase/include/api0api.h index e4c9c941..500bf4fe 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/api0api.h +++ b/mysql-wsrep-5.6/storage/innobase/include/api0api.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2011, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2011, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -36,7 +36,7 @@ InnoDB Native API #endif #if defined(__GNUC__) && (__GNUC__ > 2) && ! defined(__INTEL_COMPILER) -#define UNIV_NO_IGNORE __attribute__ ((warn_unused_result)) +#define UNIV_NO_IGNORE MY_ATTRIBUTE ((warn_unused_result)) #else #define UNIV_NO_IGNORE #endif /* __GNUC__ && __GNUC__ > 2 && !__INTEL_COMPILER */ diff --git a/mysql-wsrep-5.6/storage/innobase/include/btr0btr.h b/mysql-wsrep-5.6/storage/innobase/include/btr0btr.h index 305acf7e..d8a4545c 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/btr0btr.h +++ b/mysql-wsrep-5.6/storage/innobase/include/btr0btr.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1994, 2013, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. This program is free software; you can redistribute it and/or modify it under @@ -114,7 +114,7 @@ btr_corruption_report( /*==================*/ const buf_block_t* block, /*!< in: corrupted block */ const dict_index_t* index) /*!< in: index tree */ - UNIV_COLD __attribute__((nonnull)); + UNIV_COLD MY_ATTRIBUTE((nonnull)); /** Assert that a B-tree page is not corrupted. @param block buffer block containing a B-tree page @@ -156,7 +156,7 @@ btr_blob_dbg_add_blob( ulint page_no, /*!< in: start page of the column */ dict_index_t* index, /*!< in/out: index tree */ const char* ctx) /*!< in: context (for logging) */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /**************************************************************//** Display the references to off-page columns. This function is to be called from a debugger, @@ -166,7 +166,7 @@ void btr_blob_dbg_print( /*===============*/ const dict_index_t* index) /*!< in: index tree */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /**************************************************************//** Check that there are no references to off-page columns from or to the given page. Invoked when freeing or clearing a page. @@ -177,7 +177,7 @@ btr_blob_dbg_is_empty( /*==================*/ dict_index_t* index, /*!< in: index */ ulint page_no) /*!< in: page number */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /**************************************************************//** Modify the 'deleted' flag of a record. */ @@ -189,7 +189,7 @@ btr_blob_dbg_set_deleted_flag( dict_index_t* index, /*!< in/out: index */ const ulint* offsets,/*!< in: rec_get_offs(rec, index) */ ibool del) /*!< in: TRUE=deleted, FALSE=exists */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /**************************************************************//** Change the ownership of an off-page column. */ UNIV_INTERN @@ -201,7 +201,7 @@ btr_blob_dbg_owner( const ulint* offsets,/*!< in: rec_get_offs(rec, index) */ ulint i, /*!< in: ith field in rec */ ibool own) /*!< in: TRUE=owned, FALSE=disowned */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /** Assert that there are no BLOB references to or from the given page. */ # define btr_blob_dbg_assert_empty(index, page_no) \ ut_a(btr_blob_dbg_is_empty(index, page_no)) @@ -221,7 +221,7 @@ btr_root_get( /*=========*/ const dict_index_t* index, /*!< in: index tree */ mtr_t* mtr) /*!< in: mtr */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /**************************************************************//** Checks and adjusts the root node of a tree during IMPORT TABLESPACE. @@ -231,7 +231,7 @@ dberr_t btr_root_adjust_on_import( /*======================*/ const dict_index_t* index) /*!< in: index tree */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /**************************************************************//** Gets the height of the B-tree (the level of the root, when the leaf @@ -244,7 +244,7 @@ btr_height_get( /*===========*/ dict_index_t* index, /*!< in: index tree */ mtr_t* mtr) /*!< in/out: mini-transaction */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /**************************************************************//** Gets a buffer page and declares its latching order level. */ UNIV_INLINE @@ -306,7 +306,7 @@ index_id_t btr_page_get_index_id( /*==================*/ const page_t* page) /*!< in: index page */ - __attribute__((nonnull, pure, warn_unused_result)); + MY_ATTRIBUTE((nonnull, pure, warn_unused_result)); #ifndef UNIV_HOTBACKUP /********************************************************//** Gets the node level field in an index page. @@ -316,7 +316,7 @@ ulint btr_page_get_level_low( /*===================*/ const page_t* page) /*!< in: index page */ - __attribute__((nonnull, pure, warn_unused_result)); + MY_ATTRIBUTE((nonnull, pure, warn_unused_result)); #define btr_page_get_level(page, mtr) btr_page_get_level_low(page) /********************************************************//** Gets the next index page number. @@ -327,7 +327,7 @@ btr_page_get_next( /*==============*/ const page_t* page, /*!< in: index page */ mtr_t* mtr) /*!< in: mini-transaction handle */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /********************************************************//** Gets the previous index page number. @return prev page number */ @@ -337,7 +337,7 @@ btr_page_get_prev( /*==============*/ const page_t* page, /*!< in: index page */ mtr_t* mtr) /*!< in: mini-transaction handle */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*************************************************************//** Gets pointer to the previous user record in the tree. It is assumed that the caller has appropriate latches on the page and its neighbor. @@ -349,7 +349,7 @@ btr_get_prev_user_rec( rec_t* rec, /*!< in: record on leaf level */ mtr_t* mtr) /*!< in: mtr holding a latch on the page, and if needed, also to the previous page */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*************************************************************//** Gets pointer to the next user record in the tree. It is assumed that the caller has appropriate latches on the page and its neighbor. @@ -361,7 +361,7 @@ btr_get_next_user_rec( rec_t* rec, /*!< in: record on leaf level */ mtr_t* mtr) /*!< in: mtr holding a latch on the page, and if needed, also to the next page */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /**************************************************************//** Releases the latch on a leaf page and bufferunfixes it. */ UNIV_INLINE @@ -372,7 +372,7 @@ btr_leaf_page_release( ulint latch_mode, /*!< in: BTR_SEARCH_LEAF or BTR_MODIFY_LEAF */ mtr_t* mtr) /*!< in: mtr */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /**************************************************************//** Gets the child node file address in a node pointer. NOTE: the offsets array must contain all offsets for the record since @@ -386,7 +386,7 @@ btr_node_ptr_get_child_page_no( /*===========================*/ const rec_t* rec, /*!< in: node pointer record */ const ulint* offsets)/*!< in: array returned by rec_get_offsets() */ - __attribute__((nonnull, pure, warn_unused_result)); + MY_ATTRIBUTE((nonnull, pure, warn_unused_result)); /************************************************************//** Creates the root node for a new index tree. @return page number of the created root, FIL_NULL if did not succeed */ @@ -401,7 +401,7 @@ btr_create( index_id_t index_id,/*!< in: index id */ dict_index_t* index, /*!< in: index */ mtr_t* mtr) /*!< in: mini-transaction handle */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /************************************************************//** Frees a B-tree except the root page, which MUST be freed after this by calling btr_free_root. */ @@ -424,7 +424,7 @@ btr_free_root( or 0 for uncompressed pages */ ulint root_page_no, /*!< in: root page number */ mtr_t* mtr) /*!< in/out: mini-transaction */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*************************************************************//** Makes tree one level higher by splitting the root, and inserts the tuple. It is assumed that mtr contains an x-latch on the tree. @@ -447,7 +447,7 @@ btr_root_raise_and_insert( const dtuple_t* tuple, /*!< in: tuple to insert */ ulint n_ext, /*!< in: number of externally stored columns */ mtr_t* mtr) /*!< in: mtr */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*************************************************************//** Reorganizes an index page. @@ -473,7 +473,7 @@ btr_page_reorganize_low( page_cur_t* cursor, /*!< in/out: page cursor */ dict_index_t* index, /*!< in: the index tree of the page */ mtr_t* mtr) /*!< in/out: mini-transaction */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*************************************************************//** Reorganizes an index page. @@ -492,7 +492,7 @@ btr_page_reorganize( page_cur_t* cursor, /*!< in/out: page cursor */ dict_index_t* index, /*!< in: the index tree of the page */ mtr_t* mtr) /*!< in/out: mini-transaction */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*************************************************************//** Decides if the page should be split at the convergence point of inserts converging to left. @@ -505,7 +505,7 @@ btr_page_get_split_rec_to_left( rec_t** split_rec)/*!< out: if split recommended, the first record on upper half page, or NULL if tuple should be first */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*************************************************************//** Decides if the page should be split at the convergence point of inserts converging to right. @@ -518,7 +518,7 @@ btr_page_get_split_rec_to_right( rec_t** split_rec)/*!< out: if split recommended, the first record on upper half page, or NULL if tuple should be first */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*************************************************************//** Splits an index page to halves and inserts the tuple. It is assumed that mtr holds an x-latch to the index tree. NOTE: the tree x-latch is @@ -542,7 +542,7 @@ btr_page_split_and_insert( const dtuple_t* tuple, /*!< in: tuple to insert */ ulint n_ext, /*!< in: number of externally stored columns */ mtr_t* mtr) /*!< in: mtr */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*******************************************************//** Inserts a data tuple to a tree on a non-leaf level. It is assumed that mtr holds an x-latch on the tree. */ @@ -557,7 +557,7 @@ btr_insert_on_non_leaf_level_func( const char* file, /*!< in: file name */ ulint line, /*!< in: line where called */ mtr_t* mtr) /*!< in: mtr */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); # define btr_insert_on_non_leaf_level(f,i,l,t,m) \ btr_insert_on_non_leaf_level_func(f,i,l,t,__FILE__,__LINE__,m) #endif /* !UNIV_HOTBACKUP */ @@ -569,7 +569,7 @@ btr_set_min_rec_mark( /*=================*/ rec_t* rec, /*!< in/out: record */ mtr_t* mtr) /*!< in: mtr */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); #ifndef UNIV_HOTBACKUP /*************************************************************//** Deletes on the upper level the node pointer to a page. */ @@ -580,7 +580,7 @@ btr_node_ptr_delete( dict_index_t* index, /*!< in: index tree */ buf_block_t* block, /*!< in: page whose node pointer is deleted */ mtr_t* mtr) /*!< in: mtr */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); #ifdef UNIV_DEBUG /************************************************************//** Checks that the node pointer to a page is appropriate. @@ -592,7 +592,7 @@ btr_check_node_ptr( dict_index_t* index, /*!< in: index tree */ buf_block_t* block, /*!< in: index page */ mtr_t* mtr) /*!< in: mtr */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); #endif /* UNIV_DEBUG */ /*************************************************************//** Tries to merge the page first to the left immediate brother if such a @@ -615,7 +615,7 @@ btr_compress( ibool adjust, /*!< in: TRUE if should adjust the cursor position even if compression occurs */ mtr_t* mtr) /*!< in/out: mini-transaction */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*************************************************************//** Discards a page from a B-tree. This is used to remove the last record from a B-tree page: the whole page must be removed at the same time. This cannot @@ -627,7 +627,7 @@ btr_discard_page( btr_cur_t* cursor, /*!< in: cursor on the page to discard: not on the root page */ mtr_t* mtr) /*!< in: mtr */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); #endif /* !UNIV_HOTBACKUP */ /****************************************************************//** Parses the redo log record for setting an index record as the predefined @@ -642,7 +642,7 @@ btr_parse_set_min_rec_mark( ulint comp, /*!< in: nonzero=compact page format */ page_t* page, /*!< in: page or NULL */ mtr_t* mtr) /*!< in: mtr or NULL */ - __attribute__((nonnull(1,2), warn_unused_result)); + MY_ATTRIBUTE((nonnull(1,2), warn_unused_result)); /***********************************************************//** Parses a redo log record of reorganizing a page. @return end of log record or NULL */ @@ -656,7 +656,7 @@ btr_parse_page_reorganize( bool compressed,/*!< in: true if compressed page */ buf_block_t* block, /*!< in: page to be reorganized, or NULL */ mtr_t* mtr) /*!< in: mtr or NULL */ - __attribute__((nonnull(1,2,3), warn_unused_result)); + MY_ATTRIBUTE((nonnull(1,2,3), warn_unused_result)); #ifndef UNIV_HOTBACKUP /**************************************************************//** Gets the number of pages in a B-tree. @@ -669,7 +669,7 @@ btr_get_size( ulint flag, /*!< in: BTR_N_LEAF_PAGES or BTR_TOTAL_SIZE */ mtr_t* mtr) /*!< in/out: mini-transaction where index is s-latched */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /**************************************************************//** Allocates a new file page to be used in an index tree. NOTE: we assume that the caller has made the reservation for free extents! @@ -692,7 +692,7 @@ btr_page_alloc( mtr_t* init_mtr) /*!< in/out: mini-transaction for x-latching and initializing the page */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /**************************************************************//** Frees a file page used in an index tree. NOTE: cannot free field external storage pages because the page must contain info on its level. */ @@ -703,7 +703,7 @@ btr_page_free( dict_index_t* index, /*!< in: index tree */ buf_block_t* block, /*!< in: block to be freed, x-latched */ mtr_t* mtr) /*!< in: mtr */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /**************************************************************//** Frees a file page used in an index tree. Can be used also to BLOB external storage pages, because the page level 0 can be given as an @@ -716,7 +716,7 @@ btr_page_free_low( buf_block_t* block, /*!< in: block to be freed, x-latched */ ulint level, /*!< in: page level */ mtr_t* mtr) /*!< in: mtr */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); #ifdef UNIV_BTR_PRINT /*************************************************************//** Prints size info of a B-tree. */ @@ -725,7 +725,7 @@ void btr_print_size( /*===========*/ dict_index_t* index) /*!< in: index tree */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /**************************************************************//** Prints directories and other info of all nodes in the index. */ UNIV_INTERN @@ -735,7 +735,7 @@ btr_print_index( dict_index_t* index, /*!< in: index */ ulint width) /*!< in: print this many entries from start and end */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); #endif /* UNIV_BTR_PRINT */ /************************************************************//** Checks the size and number of fields in a record based on the definition of @@ -750,7 +750,7 @@ btr_index_rec_validate( ibool dump_on_error) /*!< in: TRUE if the function should print hex dump of record and page on error */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /**************************************************************//** Checks the consistency of an index tree. @return TRUE if ok */ @@ -760,7 +760,7 @@ btr_validate_index( /*===============*/ dict_index_t* index, /*!< in: index */ const trx_t* trx) /*!< in: transaction or 0 */ - __attribute__((nonnull(1), warn_unused_result)); + MY_ATTRIBUTE((nonnull(1), warn_unused_result)); #define BTR_N_LEAF_PAGES 1 #define BTR_TOTAL_SIZE 2 diff --git a/mysql-wsrep-5.6/storage/innobase/include/btr0btr.ic b/mysql-wsrep-5.6/storage/innobase/include/btr0btr.ic index 00f50b5d..2ad01259 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/btr0btr.ic +++ b/mysql-wsrep-5.6/storage/innobase/include/btr0btr.ic @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1994, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -159,10 +159,11 @@ ulint btr_page_get_next( /*==============*/ const page_t* page, /*!< in: index page */ - mtr_t* mtr __attribute__((unused))) + mtr_t* mtr MY_ATTRIBUTE((unused))) /*!< in: mini-transaction handle */ { - ut_ad(page && mtr); + ut_ad(page != NULL); + ut_ad(mtr != NULL); ut_ad(mtr_memo_contains_page(mtr, page, MTR_MEMO_PAGE_X_FIX) || mtr_memo_contains_page(mtr, page, MTR_MEMO_PAGE_S_FIX)); @@ -181,7 +182,8 @@ btr_page_set_next( ulint next, /*!< in: next page number */ mtr_t* mtr) /*!< in: mini-transaction handle */ { - ut_ad(page && mtr); + ut_ad(page != NULL); + ut_ad(mtr != NULL); if (page_zip) { mach_write_to_4(page + FIL_PAGE_NEXT, next); @@ -199,9 +201,10 @@ ulint btr_page_get_prev( /*==============*/ const page_t* page, /*!< in: index page */ - mtr_t* mtr __attribute__((unused))) /*!< in: mini-transaction handle */ + mtr_t* mtr MY_ATTRIBUTE((unused))) /*!< in: mini-transaction handle */ { - ut_ad(page && mtr); + ut_ad(page != NULL); + ut_ad(mtr != NULL); return(mach_read_from_4(page + FIL_PAGE_PREV)); } @@ -218,7 +221,8 @@ btr_page_set_prev( ulint prev, /*!< in: previous page number */ mtr_t* mtr) /*!< in: mini-transaction handle */ { - ut_ad(page && mtr); + ut_ad(page != NULL); + ut_ad(mtr != NULL); if (page_zip) { mach_write_to_4(page + FIL_PAGE_PREV, prev); diff --git a/mysql-wsrep-5.6/storage/innobase/include/btr0cur.h b/mysql-wsrep-5.6/storage/innobase/include/btr0cur.h index f1e4406f..89b54d06 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/btr0cur.h +++ b/mysql-wsrep-5.6/storage/innobase/include/btr0cur.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1994, 2014, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -186,7 +186,7 @@ btr_cur_open_at_index_side_func( const char* file, /*!< in: file name */ ulint line, /*!< in: line where called */ mtr_t* mtr) /*!< in/out: mini-transaction */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); #define btr_cur_open_at_index_side(f,i,l,c,lv,m) \ btr_cur_open_at_index_side_func(f,i,l,c,lv,__FILE__,__LINE__,m) /**********************************************************************//** @@ -235,7 +235,7 @@ btr_cur_optimistic_insert( compressed tablespace, the caller must mtr_commit(mtr) before latching any further pages */ - __attribute__((nonnull(2,3,4,5,6,7,10), warn_unused_result)); + MY_ATTRIBUTE((nonnull(2,3,4,5,6,7,10), warn_unused_result)); /*************************************************************//** Performs an insert on a page of an index tree. It is assumed that mtr holds an x-latch on the tree and on the cursor page. If the insert is @@ -266,7 +266,7 @@ btr_cur_pessimistic_insert( ulint n_ext, /*!< in: number of externally stored columns */ que_thr_t* thr, /*!< in: query thread or NULL */ mtr_t* mtr) /*!< in/out: mini-transaction */ - __attribute__((nonnull(2,3,4,5,6,7,10), warn_unused_result)); + MY_ATTRIBUTE((nonnull(2,3,4,5,6,7,10), warn_unused_result)); /*************************************************************//** See if there is enough place in the page modification log to log an update-in-place. @@ -293,7 +293,7 @@ btr_cur_update_alloc_zip_func( bool create, /*!< in: true=delete-and-insert, false=update-in-place */ mtr_t* mtr) /*!< in/out: mini-transaction */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); #ifdef UNIV_DEBUG # define btr_cur_update_alloc_zip(page_zip,cursor,index,offsets,len,cr,mtr) \ btr_cur_update_alloc_zip_func(page_zip,cursor,index,offsets,len,cr,mtr) @@ -325,7 +325,7 @@ btr_cur_update_in_place( is a secondary index, the caller must mtr_commit(mtr) before latching any further pages */ - __attribute__((warn_unused_result, nonnull)); + MY_ATTRIBUTE((warn_unused_result, nonnull)); /***********************************************************//** Writes a redo log record of updating a record in-place. */ UNIV_INTERN @@ -339,7 +339,7 @@ btr_cur_update_in_place_log( trx_id_t trx_id, /*!< in: transaction id */ roll_ptr_t roll_ptr, /*!< in: roll ptr */ mtr_t* mtr) /*!< in: mtr */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*************************************************************//** Tries to update a record on a page in an index tree. It is assumed that mtr holds an x-latch on the page. The operation does not succeed if there is too @@ -371,7 +371,7 @@ btr_cur_optimistic_update( is a secondary index, the caller must mtr_commit(mtr) before latching any further pages */ - __attribute__((warn_unused_result, nonnull)); + MY_ATTRIBUTE((warn_unused_result, nonnull)); /*************************************************************//** Performs an update of a record on a page of a tree. It is assumed that mtr holds an x-latch on the tree and on the cursor page. If the @@ -405,7 +405,7 @@ btr_cur_pessimistic_update( trx_id_t trx_id, /*!< in: transaction id */ mtr_t* mtr) /*!< in/out: mini-transaction; must be committed before latching any further pages */ - __attribute__((warn_unused_result, nonnull)); + MY_ATTRIBUTE((warn_unused_result, nonnull)); /***********************************************************//** Marks a clustered index record deleted. Writes an undo log record to undo log on this delete marking. Writes in the trx id field the id @@ -422,7 +422,7 @@ btr_cur_del_mark_set_clust_rec( const ulint* offsets,/*!< in: rec_get_offsets(rec) */ que_thr_t* thr, /*!< in: query thread */ mtr_t* mtr) /*!< in/out: mini-transaction */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /***********************************************************//** Sets a secondary index record delete mark to TRUE or FALSE. @return DB_SUCCESS, DB_LOCK_WAIT, or error number */ @@ -435,7 +435,7 @@ btr_cur_del_mark_set_sec_rec( ibool val, /*!< in: value to set */ que_thr_t* thr, /*!< in: query thread */ mtr_t* mtr) /*!< in/out: mini-transaction */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*************************************************************//** Tries to compress a page of the tree if it seems useful. It is assumed that mtr holds an x-latch on the tree and on the cursor page. To avoid @@ -453,7 +453,7 @@ btr_cur_compress_if_useful( ibool adjust, /*!< in: TRUE if should adjust the cursor position even if compression occurs */ mtr_t* mtr) /*!< in/out: mini-transaction */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*******************************************************//** Removes the record on which the tree cursor is positioned. It is assumed that the mtr has an x-latch on the page where the cursor is positioned, @@ -474,7 +474,7 @@ btr_cur_optimistic_delete_func( TRUE on a leaf page of a secondary index, the mtr must be committed before latching any further pages */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); # ifdef UNIV_DEBUG # define btr_cur_optimistic_delete(cursor, flags, mtr) \ btr_cur_optimistic_delete_func(cursor, flags, mtr) @@ -510,7 +510,7 @@ btr_cur_pessimistic_delete( ulint flags, /*!< in: BTR_CREATE_FLAG or 0 */ enum trx_rb_ctx rb_ctx, /*!< in: rollback context */ mtr_t* mtr) /*!< in: mtr */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); #endif /* !UNIV_HOTBACKUP */ /***********************************************************//** Parses a redo log record of updating a record in-place. @@ -603,7 +603,7 @@ btr_cur_disown_inherited_fields( const ulint* offsets,/*!< in: array returned by rec_get_offsets() */ const upd_t* update, /*!< in: update vector */ mtr_t* mtr) /*!< in/out: mini-transaction */ - __attribute__((nonnull(2,3,4,5,6))); + MY_ATTRIBUTE((nonnull(2,3,4,5,6))); /** Operation code for btr_store_big_rec_extern_fields(). */ enum blob_op { @@ -623,7 +623,7 @@ ibool btr_blob_op_is_update( /*==================*/ enum blob_op op) /*!< in: operation */ - __attribute__((warn_unused_result)); + MY_ATTRIBUTE((warn_unused_result)); /*******************************************************************//** Stores the fields in big_rec_vec to the tablespace and puts pointers to @@ -648,7 +648,7 @@ btr_store_big_rec_extern_fields( mtr_t* btr_mtr, /*!< in: mtr containing the latches to the clustered index */ enum blob_op op) /*! in: operation code */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*******************************************************************//** Frees the space in an externally stored field to the file space @@ -742,7 +742,7 @@ btr_push_update_extern_fields( dtuple_t* tuple, /*!< in/out: data tuple */ const upd_t* update, /*!< in: update vector */ mem_heap_t* heap) /*!< in: memory heap */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /***********************************************************//** Sets a secondary index record's delete mark to the given value. This function is only used by the insert buffer merge mechanism. */ diff --git a/mysql-wsrep-5.6/storage/innobase/include/btr0pcur.h b/mysql-wsrep-5.6/storage/innobase/include/btr0pcur.h index cfbaacf4..e5b40040 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/btr0pcur.h +++ b/mysql-wsrep-5.6/storage/innobase/include/btr0pcur.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -155,7 +155,7 @@ btr_pcur_open_at_index_side( ulint level, /*!< in: level to search for (0=leaf) */ mtr_t* mtr) /*!< in/out: mini-transaction */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /**************************************************************//** Gets the up_match value for a pcur after a search. @return number of matched fields at the cursor or to the right if diff --git a/mysql-wsrep-5.6/storage/innobase/include/btr0sea.h b/mysql-wsrep-5.6/storage/innobase/include/btr0sea.h index 848bde45..c95ca280 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/btr0sea.h +++ b/mysql-wsrep-5.6/storage/innobase/include/btr0sea.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2011, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -69,7 +69,7 @@ btr_search_t* btr_search_get_info( /*================*/ dict_index_t* index) /*!< in: index */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*****************************************************************//** Creates and initializes a search info struct. @return own: search info struct */ diff --git a/mysql-wsrep-5.6/storage/innobase/include/btr0types.h b/mysql-wsrep-5.6/storage/innobase/include/btr0types.h index c1a4531f..04b69d81 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/btr0types.h +++ b/mysql-wsrep-5.6/storage/innobase/include/btr0types.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2011, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -81,7 +81,7 @@ btr_blob_dbg_rbt_insert( dict_index_t* index, /*!< in/out: index tree */ const btr_blob_dbg_t* b, /*!< in: the reference */ const char* ctx) /*!< in: context (for logging) */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /** Remove from index->blobs a reference to an off-page column. @param index the index tree @@ -94,7 +94,7 @@ btr_blob_dbg_rbt_delete( dict_index_t* index, /*!< in/out: index tree */ const btr_blob_dbg_t* b, /*!< in: the reference */ const char* ctx) /*!< in: context (for logging) */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /**************************************************************//** Add to index->blobs any references to off-page columns from a record. @@ -107,7 +107,7 @@ btr_blob_dbg_add_rec( dict_index_t* index, /*!< in/out: index */ const ulint* offsets,/*!< in: offsets */ const char* ctx) /*!< in: context (for logging) */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /**************************************************************//** Remove from index->blobs any references to off-page columns from a record. @return number of references removed */ @@ -119,7 +119,7 @@ btr_blob_dbg_remove_rec( dict_index_t* index, /*!< in/out: index */ const ulint* offsets,/*!< in: offsets */ const char* ctx) /*!< in: context (for logging) */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /**************************************************************//** Count and add to index->blobs any references to off-page columns from records on a page. @@ -131,7 +131,7 @@ btr_blob_dbg_add( const page_t* page, /*!< in: rewritten page */ dict_index_t* index, /*!< in/out: index */ const char* ctx) /*!< in: context (for logging) */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /**************************************************************//** Count and remove from index->blobs any references to off-page columns from records on a page. @@ -144,7 +144,7 @@ btr_blob_dbg_remove( const page_t* page, /*!< in: b-tree page */ dict_index_t* index, /*!< in/out: index */ const char* ctx) /*!< in: context (for logging) */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /**************************************************************//** Restore in index->blobs any references to off-page columns Used when page reorganize fails due to compressed page overflow. */ @@ -156,7 +156,7 @@ btr_blob_dbg_restore( const page_t* page, /*!< in: copy of original page */ dict_index_t* index, /*!< in/out: index */ const char* ctx) /*!< in: context (for logging) */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /** Operation that processes the BLOB references of an index record @param[in] rec record on index page @@ -180,7 +180,7 @@ btr_blob_dbg_op( dict_index_t* index, /*!< in/out: index */ const char* ctx, /*!< in: context (for logging) */ const btr_blob_dbg_op_f op) /*!< in: operation on records */ - __attribute__((nonnull(1,3,4,5))); + MY_ATTRIBUTE((nonnull(1,3,4,5))); #else /* UNIV_BLOB_DEBUG */ # define btr_blob_dbg_add_rec(rec, index, offsets, ctx) ((void) 0) # define btr_blob_dbg_add(page, index, ctx) ((void) 0) diff --git a/mysql-wsrep-5.6/storage/innobase/include/buf0buddy.h b/mysql-wsrep-5.6/storage/innobase/include/buf0buddy.h index fab9a4b8..7fc44085 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/buf0buddy.h +++ b/mysql-wsrep-5.6/storage/innobase/include/buf0buddy.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2006, 2011, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2006, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -54,7 +54,7 @@ buf_buddy_alloc( storage was allocated from the LRU list and buf_pool->mutex was temporarily released */ - __attribute__((malloc, nonnull)); + MY_ATTRIBUTE((malloc, nonnull)); /**********************************************************************//** Deallocate a block. */ @@ -68,7 +68,7 @@ buf_buddy_free( be pointed to by the buffer pool */ ulint size) /*!< in: block size, up to UNIV_PAGE_SIZE */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); #ifndef UNIV_NONINL # include "buf0buddy.ic" diff --git a/mysql-wsrep-5.6/storage/innobase/include/buf0buddy.ic b/mysql-wsrep-5.6/storage/innobase/include/buf0buddy.ic index be2f9501..4352ebe8 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/buf0buddy.ic +++ b/mysql-wsrep-5.6/storage/innobase/include/buf0buddy.ic @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2006, 2011, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2006, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -50,7 +50,7 @@ buf_buddy_alloc_low( allocated from the LRU list and buf_pool->mutex was temporarily released */ - __attribute__((malloc, nonnull)); + MY_ATTRIBUTE((malloc, nonnull)); /**********************************************************************//** Deallocate a block. */ @@ -63,7 +63,7 @@ buf_buddy_free_low( pointed to by the buffer pool */ ulint i) /*!< in: index of buf_pool->zip_free[], or BUF_BUDDY_SIZES */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /**********************************************************************//** Get the index of buf_pool->zip_free[] for a given block size. diff --git a/mysql-wsrep-5.6/storage/innobase/include/buf0buf.h b/mysql-wsrep-5.6/storage/innobase/include/buf0buf.h index b669bd20..50c54e55 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/buf0buf.h +++ b/mysql-wsrep-5.6/storage/innobase/include/buf0buf.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2014, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -258,7 +258,7 @@ buf_relocate( buf_page_get_state(bpage) must be BUF_BLOCK_ZIP_DIRTY or BUF_BLOCK_ZIP_PAGE */ buf_page_t* dpage) /*!< in/out: destination control block */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*********************************************************************//** Gets the current size of buffer buf_pool in bytes. @return size in bytes */ @@ -289,7 +289,7 @@ UNIV_INLINE buf_page_t* buf_page_alloc_descriptor(void) /*===========================*/ - __attribute__((malloc)); + MY_ATTRIBUTE((malloc)); /********************************************************************//** Free a buf_page_t descriptor. */ UNIV_INLINE @@ -297,7 +297,7 @@ void buf_page_free_descriptor( /*=====================*/ buf_page_t* bpage) /*!< in: bpage descriptor to free. */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /********************************************************************//** Allocates a buffer block. @@ -534,7 +534,7 @@ ulint buf_page_get_freed_page_clock( /*==========================*/ const buf_page_t* bpage) /*!< in: block */ - __attribute__((pure)); + MY_ATTRIBUTE((pure)); /********************************************************************//** Reads the freed_page_clock of a buffer block. @return freed_page_clock */ @@ -543,7 +543,7 @@ ulint buf_block_get_freed_page_clock( /*===========================*/ const buf_block_t* block) /*!< in: block */ - __attribute__((pure)); + MY_ATTRIBUTE((pure)); /********************************************************************//** Tells if a block is still close enough to the MRU end of the LRU list @@ -606,7 +606,7 @@ buf_block_buf_fix_inc_func( ulint line, /*!< in: line */ # endif /* UNIV_SYNC_DEBUG */ buf_block_t* block) /*!< in/out: block to bufferfix */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*******************************************************************//** Increments the bufferfix count. */ @@ -652,7 +652,7 @@ buf_page_is_corrupted( const byte* read_buf, /*!< in: a database page */ ulint zip_size) /*!< in: size of compressed page; 0 for uncompressed pages */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /********************************************************************//** Checks if a page is all zeroes. @return TRUE if the page is all zeroes */ @@ -682,7 +682,7 @@ ulint buf_block_get_lock_hash_val( /*========================*/ const buf_block_t* block) /*!< in: block */ - __attribute__((pure)); + MY_ATTRIBUTE((pure)); #ifdef UNIV_DEBUG /*********************************************************************//** Finds a block in the buffer pool that points to a @@ -743,7 +743,7 @@ buf_page_print( ulint flags) /*!< in: 0 or BUF_PAGE_PRINT_NO_CRASH or BUF_PAGE_PRINT_NO_FULL */ - UNIV_COLD __attribute__((nonnull)); + UNIV_COLD MY_ATTRIBUTE((nonnull)); /********************************************************************//** Decompress a block. @return TRUE if successful */ @@ -870,7 +870,7 @@ enum buf_page_state buf_block_get_state( /*================*/ const buf_block_t* block) /*!< in: pointer to the control block */ - __attribute__((pure)); + MY_ATTRIBUTE((pure)); /*********************************************************************//** Sets the state of a block. */ UNIV_INLINE @@ -895,7 +895,7 @@ ibool buf_page_in_file( /*=============*/ const buf_page_t* bpage) /*!< in: pointer to control block */ - __attribute__((pure)); + MY_ATTRIBUTE((pure)); #ifndef UNIV_HOTBACKUP /*********************************************************************//** Determines if a block should be on unzip_LRU list. @@ -905,7 +905,7 @@ ibool buf_page_belongs_to_unzip_LRU( /*==========================*/ const buf_page_t* bpage) /*!< in: pointer to control block */ - __attribute__((pure)); + MY_ATTRIBUTE((pure)); /*********************************************************************//** Gets the mutex of a block. @@ -915,7 +915,7 @@ ib_mutex_t* buf_page_get_mutex( /*===============*/ const buf_page_t* bpage) /*!< in: pointer to control block */ - __attribute__((pure)); + MY_ATTRIBUTE((pure)); /*********************************************************************//** Get the flush type of a page. @@ -925,7 +925,7 @@ buf_flush_t buf_page_get_flush_type( /*====================*/ const buf_page_t* bpage) /*!< in: buffer page */ - __attribute__((pure)); + MY_ATTRIBUTE((pure)); /*********************************************************************//** Set the flush type of a page. */ UNIV_INLINE @@ -951,7 +951,7 @@ enum buf_io_fix buf_page_get_io_fix( /*================*/ const buf_page_t* bpage) /*!< in: pointer to the control block */ - __attribute__((pure)); + MY_ATTRIBUTE((pure)); /*********************************************************************//** Gets the io_fix state of a block. @return io_fix state */ @@ -960,7 +960,7 @@ enum buf_io_fix buf_block_get_io_fix( /*================*/ const buf_block_t* block) /*!< in: pointer to the control block */ - __attribute__((pure)); + MY_ATTRIBUTE((pure)); /*********************************************************************//** Sets the io_fix state of a block. */ UNIV_INLINE @@ -1006,7 +1006,7 @@ ibool buf_page_can_relocate( /*==================*/ const buf_page_t* bpage) /*!< control block being relocated */ - __attribute__((pure)); + MY_ATTRIBUTE((pure)); /*********************************************************************//** Determine if a block has been flagged old. @@ -1016,7 +1016,7 @@ ibool buf_page_is_old( /*============*/ const buf_page_t* bpage) /*!< in: control block */ - __attribute__((pure)); + MY_ATTRIBUTE((pure)); /*********************************************************************//** Flag a block old. */ UNIV_INLINE @@ -1033,7 +1033,7 @@ unsigned buf_page_is_accessed( /*=================*/ const buf_page_t* bpage) /*!< in: control block */ - __attribute__((nonnull, pure)); + MY_ATTRIBUTE((nonnull, pure)); /*********************************************************************//** Flag a block accessed. */ UNIV_INLINE @@ -1041,7 +1041,7 @@ void buf_page_set_accessed( /*==================*/ buf_page_t* bpage) /*!< in/out: control block */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*********************************************************************//** Gets the buf_block_t handle of a buffered file block if an uncompressed page frame exists, or NULL. Note: even though bpage is not declared a @@ -1052,7 +1052,7 @@ buf_block_t* buf_page_get_block( /*===============*/ buf_page_t* bpage) /*!< in: control block, or NULL */ - __attribute__((pure)); + MY_ATTRIBUTE((pure)); #endif /* !UNIV_HOTBACKUP */ #ifdef UNIV_DEBUG /*********************************************************************//** @@ -1063,7 +1063,7 @@ buf_frame_t* buf_block_get_frame( /*================*/ const buf_block_t* block) /*!< in: pointer to the control block */ - __attribute__((pure)); + MY_ATTRIBUTE((pure)); #else /* UNIV_DEBUG */ # define buf_block_get_frame(block) (block)->frame #endif /* UNIV_DEBUG */ @@ -1075,7 +1075,7 @@ ulint buf_page_get_space( /*===============*/ const buf_page_t* bpage) /*!< in: pointer to the control block */ - __attribute__((pure)); + MY_ATTRIBUTE((pure)); /*********************************************************************//** Gets the space id of a block. @return space id */ @@ -1084,7 +1084,7 @@ ulint buf_block_get_space( /*================*/ const buf_block_t* block) /*!< in: pointer to the control block */ - __attribute__((pure)); + MY_ATTRIBUTE((pure)); /*********************************************************************//** Gets the page number of a block. @return page number */ @@ -1093,7 +1093,7 @@ ulint buf_page_get_page_no( /*=================*/ const buf_page_t* bpage) /*!< in: pointer to the control block */ - __attribute__((pure)); + MY_ATTRIBUTE((pure)); /*********************************************************************//** Gets the page number of a block. @return page number */ @@ -1102,7 +1102,7 @@ ulint buf_block_get_page_no( /*==================*/ const buf_block_t* block) /*!< in: pointer to the control block */ - __attribute__((pure)); + MY_ATTRIBUTE((pure)); /*********************************************************************//** Gets the compressed page size of a block. @return compressed page size, or 0 */ @@ -1111,7 +1111,7 @@ ulint buf_page_get_zip_size( /*==================*/ const buf_page_t* bpage) /*!< in: pointer to the control block */ - __attribute__((pure)); + MY_ATTRIBUTE((pure)); /*********************************************************************//** Gets the compressed page size of a block. @return compressed page size, or 0 */ @@ -1120,7 +1120,7 @@ ulint buf_block_get_zip_size( /*===================*/ const buf_block_t* block) /*!< in: pointer to the control block */ - __attribute__((pure)); + MY_ATTRIBUTE((pure)); /*********************************************************************//** Gets the compressed page descriptor corresponding to an uncompressed page if applicable. */ @@ -1209,7 +1209,7 @@ buf_page_address_fold( /*==================*/ ulint space, /*!< in: space id */ ulint offset) /*!< in: offset of the page within space */ - __attribute__((const)); + MY_ATTRIBUTE((const)); /********************************************************************//** Calculates the index of a buffer pool to the buf_pool[] array. @return the position of the buffer pool in buf_pool[] */ @@ -1218,7 +1218,7 @@ ulint buf_pool_index( /*===========*/ const buf_pool_t* buf_pool) /*!< in: buffer pool */ - __attribute__((nonnull, const)); + MY_ATTRIBUTE((nonnull, const)); /******************************************************************//** Returns the buffer pool instance given a page instance @return buf_pool */ @@ -1358,7 +1358,7 @@ buf_pool_watch_is_sentinel( /*=======================*/ buf_pool_t* buf_pool, /*!< buffer pool instance */ const buf_page_t* bpage) /*!< in: block */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /****************************************************************//** Add watch for the given page to be read in. Caller must have the buffer pool @return NULL if watch set, block if the page is in the buffer pool */ @@ -1369,7 +1369,7 @@ buf_pool_watch_set( ulint space, /*!< in: space id */ ulint offset, /*!< in: page number */ ulint fold) /*!< in: buf_page_address_fold(space, offset) */ - __attribute__((warn_unused_result)); + MY_ATTRIBUTE((warn_unused_result)); /****************************************************************//** Stop watching if the page has been read in. buf_pool_watch_set(space,offset) must have returned NULL before. */ @@ -1390,7 +1390,7 @@ buf_pool_watch_occurred( /*====================*/ ulint space, /*!< in: space id */ ulint offset) /*!< in: page number */ - __attribute__((warn_unused_result)); + MY_ATTRIBUTE((warn_unused_result)); /********************************************************************//** Get total buffer pool statistics. */ UNIV_INTERN diff --git a/mysql-wsrep-5.6/storage/innobase/include/buf0flu.h b/mysql-wsrep-5.6/storage/innobase/include/buf0flu.h index f1167205..0c5812f8 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/buf0flu.h +++ b/mysql-wsrep-5.6/storage/innobase/include/buf0flu.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2013, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -85,7 +85,7 @@ buf_flush_page_try( /*===============*/ buf_pool_t* buf_pool, /*!< in/out: buffer pool instance */ buf_block_t* block) /*!< in/out: buffer control block */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); # endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */ /*******************************************************************//** This utility flushes dirty blocks from the end of the flush list of @@ -254,7 +254,7 @@ buf_flush_ready_for_flush( buf_page_t* bpage, /*!< in: buffer control block, must be buf_page_in_file(bpage) */ buf_flush_t flush_type)/*!< in: type of flush */ - __attribute__((warn_unused_result)); + MY_ATTRIBUTE((warn_unused_result)); #ifdef UNIV_DEBUG /******************************************************************//** diff --git a/mysql-wsrep-5.6/storage/innobase/include/buf0lru.h b/mysql-wsrep-5.6/storage/innobase/include/buf0lru.h index ecdaef68..b5d3fe02 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/buf0lru.h +++ b/mysql-wsrep-5.6/storage/innobase/include/buf0lru.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2013, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -93,7 +93,7 @@ buf_LRU_free_page( buf_page_t* bpage, /*!< in: block to be freed */ bool zip) /*!< in: true if should remove also the compressed page of an uncompressed page */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /******************************************************************//** Try to free a replaceable block. @return TRUE if found and freed */ @@ -105,7 +105,7 @@ buf_LRU_scan_and_free_block( ibool scan_all) /*!< in: scan whole LRU list if TRUE, otherwise scan only 'old' blocks. */ - __attribute__((nonnull,warn_unused_result)); + MY_ATTRIBUTE((nonnull,warn_unused_result)); /******************************************************************//** Returns a free block from the buf_pool. The block is taken off the free list. If it is empty, returns NULL. @@ -146,7 +146,7 @@ buf_block_t* buf_LRU_get_free_block( /*===================*/ buf_pool_t* buf_pool) /*!< in/out: buffer pool instance */ - __attribute__((nonnull,warn_unused_result)); + MY_ATTRIBUTE((nonnull,warn_unused_result)); /******************************************************************//** Determines if the unzip_LRU list should be used for evicting a victim instead of the general LRU list. @@ -229,7 +229,7 @@ buf_LRU_free_one_page( buf_page_t* bpage) /*!< in/out: block, must contain a file page and be in a state where it can be freed; there may or may not be a hash index to the page */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); #if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG /**********************************************************************//** diff --git a/mysql-wsrep-5.6/storage/innobase/include/data0data.h b/mysql-wsrep-5.6/storage/innobase/include/data0data.h index a548c7b8..1d954bfc 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/data0data.h +++ b/mysql-wsrep-5.6/storage/innobase/include/data0data.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1994, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -46,7 +46,7 @@ dtype_t* dfield_get_type( /*============*/ const dfield_t* field) /*!< in: SQL data field */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*********************************************************************//** Gets pointer to the data in a field. @return pointer to data */ @@ -55,7 +55,7 @@ void* dfield_get_data( /*============*/ const dfield_t* field) /*!< in: field */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); #else /* UNIV_DEBUG */ # define dfield_get_type(field) (&(field)->type) # define dfield_get_data(field) ((field)->data) @@ -68,7 +68,7 @@ dfield_set_type( /*============*/ dfield_t* field, /*!< in: SQL data field */ const dtype_t* type) /*!< in: pointer to data type struct */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*********************************************************************//** Gets length of field data. @return length of data; UNIV_SQL_NULL if SQL null data */ @@ -77,7 +77,7 @@ ulint dfield_get_len( /*===========*/ const dfield_t* field) /*!< in: field */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*********************************************************************//** Sets length in a field. */ UNIV_INLINE @@ -86,7 +86,7 @@ dfield_set_len( /*===========*/ dfield_t* field, /*!< in: field */ ulint len) /*!< in: length or UNIV_SQL_NULL */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*********************************************************************//** Determines if a field is SQL NULL @return nonzero if SQL null data */ @@ -95,7 +95,7 @@ ulint dfield_is_null( /*===========*/ const dfield_t* field) /*!< in: field */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*********************************************************************//** Determines if a field is externally stored @return nonzero if externally stored */ @@ -104,7 +104,7 @@ ulint dfield_is_ext( /*==========*/ const dfield_t* field) /*!< in: field */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*********************************************************************//** Sets the "external storage" flag */ UNIV_INLINE @@ -112,7 +112,7 @@ void dfield_set_ext( /*===========*/ dfield_t* field) /*!< in/out: field */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*********************************************************************//** Sets pointer to the data and length in a field. */ UNIV_INLINE @@ -122,7 +122,7 @@ dfield_set_data( dfield_t* field, /*!< in: field */ const void* data, /*!< in: data */ ulint len) /*!< in: length or UNIV_SQL_NULL */ - __attribute__((nonnull(1))); + MY_ATTRIBUTE((nonnull(1))); /*********************************************************************//** Sets a data field to SQL NULL. */ UNIV_INLINE @@ -130,7 +130,7 @@ void dfield_set_null( /*============*/ dfield_t* field) /*!< in/out: field */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /**********************************************************************//** Writes an SQL null field full of zeros. */ UNIV_INLINE @@ -139,7 +139,7 @@ data_write_sql_null( /*================*/ byte* data, /*!< in: pointer to a buffer of size len */ ulint len) /*!< in: SQL null size in bytes */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*********************************************************************//** Copies the data and len fields. */ UNIV_INLINE @@ -148,7 +148,7 @@ dfield_copy_data( /*=============*/ dfield_t* field1, /*!< out: field to copy to */ const dfield_t* field2) /*!< in: field to copy from */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*********************************************************************//** Copies a data field to another. */ UNIV_INLINE @@ -157,7 +157,7 @@ dfield_copy( /*========*/ dfield_t* field1, /*!< out: field to copy to */ const dfield_t* field2) /*!< in: field to copy from */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*********************************************************************//** Copies the data pointed to by a data field. */ UNIV_INLINE @@ -166,7 +166,7 @@ dfield_dup( /*=======*/ dfield_t* field, /*!< in/out: data field */ mem_heap_t* heap) /*!< in: memory heap where allocated */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); #ifndef UNIV_HOTBACKUP /*********************************************************************//** Tests if two data fields are equal. @@ -181,7 +181,7 @@ dfield_datas_are_binary_equal( const dfield_t* field2, /*!< in: field */ ulint len) /*!< in: maximum prefix to compare, or 0 to compare the whole field length */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*********************************************************************//** Tests if dfield data length and content is equal to the given. @return TRUE if equal */ @@ -192,7 +192,7 @@ dfield_data_is_binary_equal( const dfield_t* field, /*!< in: field */ ulint len, /*!< in: data length or UNIV_SQL_NULL */ const byte* data) /*!< in: data */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); #endif /* !UNIV_HOTBACKUP */ /*********************************************************************//** Gets number of fields in a data tuple. @@ -202,7 +202,7 @@ ulint dtuple_get_n_fields( /*================*/ const dtuple_t* tuple) /*!< in: tuple */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); #ifdef UNIV_DEBUG /*********************************************************************//** Gets nth field of a tuple. @@ -224,7 +224,7 @@ ulint dtuple_get_info_bits( /*=================*/ const dtuple_t* tuple) /*!< in: tuple */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*********************************************************************//** Sets info bits in a data tuple. */ UNIV_INLINE @@ -233,7 +233,7 @@ dtuple_set_info_bits( /*=================*/ dtuple_t* tuple, /*!< in: tuple */ ulint info_bits) /*!< in: info bits */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*********************************************************************//** Gets number of fields used in record comparisons. @return number of fields used in comparisons in rem0cmp.* */ @@ -242,7 +242,7 @@ ulint dtuple_get_n_fields_cmp( /*====================*/ const dtuple_t* tuple) /*!< in: tuple */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*********************************************************************//** Gets number of fields used in record comparisons. */ UNIV_INLINE @@ -252,7 +252,7 @@ dtuple_set_n_fields_cmp( dtuple_t* tuple, /*!< in: tuple */ ulint n_fields_cmp) /*!< in: number of fields used in comparisons in rem0cmp.* */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /* Estimate the number of bytes that are going to be allocated when creating a new dtuple_t object */ @@ -272,7 +272,7 @@ dtuple_create_from_mem( void* buf, /*!< in, out: buffer to use */ ulint buf_size, /*!< in: buffer size */ ulint n_fields) /*!< in: number of fields */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /**********************************************************//** Creates a data tuple to a memory heap. The default value for number @@ -286,7 +286,7 @@ dtuple_create( is created, DTUPLE_EST_ALLOC(n_fields) bytes will be allocated from this heap */ ulint n_fields)/*!< in: number of fields */ - __attribute__((nonnull, malloc)); + MY_ATTRIBUTE((nonnull, malloc)); /*********************************************************************//** Sets number of fields used in a tuple. Normally this is set in @@ -297,7 +297,7 @@ dtuple_set_n_fields( /*================*/ dtuple_t* tuple, /*!< in: tuple */ ulint n_fields) /*!< in: number of fields */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*********************************************************************//** Copies a data tuple to another. This is a shallow copy; if a deep copy is desired, dfield_dup() will have to be invoked on each field. @@ -309,7 +309,7 @@ dtuple_copy( const dtuple_t* tuple, /*!< in: tuple to copy from */ mem_heap_t* heap) /*!< in: memory heap where the tuple is created */ - __attribute__((nonnull, malloc)); + MY_ATTRIBUTE((nonnull, malloc)); /**********************************************************//** The following function returns the sum of data lengths of a tuple. The space occupied by the field structs or the tuple struct is not counted. @@ -320,7 +320,7 @@ dtuple_get_data_size( /*=================*/ const dtuple_t* tuple, /*!< in: typed data tuple */ ulint comp) /*!< in: nonzero=ROW_FORMAT=COMPACT */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*********************************************************************//** Computes the number of externally stored fields in a data tuple. @return number of fields */ @@ -329,7 +329,7 @@ ulint dtuple_get_n_ext( /*=============*/ const dtuple_t* tuple) /*!< in: tuple */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /************************************************************//** Compare two data tuples, respecting the collation of character fields. @return 1, 0 , -1 if tuple1 is greater, equal, less, respectively, @@ -340,7 +340,7 @@ dtuple_coll_cmp( /*============*/ const dtuple_t* tuple1, /*!< in: tuple 1 */ const dtuple_t* tuple2) /*!< in: tuple 2 */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /************************************************************//** Folds a prefix given as the number of fields of a tuple. @return the folded value */ @@ -353,7 +353,7 @@ dtuple_fold( ulint n_bytes,/*!< in: number of bytes to fold in an incomplete last field */ index_id_t tree_id)/*!< in: index tree id */ - __attribute__((nonnull, pure, warn_unused_result)); + MY_ATTRIBUTE((nonnull, pure, warn_unused_result)); /*******************************************************************//** Sets types of fields binary in a tuple. */ UNIV_INLINE @@ -362,7 +362,7 @@ dtuple_set_types_binary( /*====================*/ dtuple_t* tuple, /*!< in: data tuple */ ulint n) /*!< in: number of fields to set */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /**********************************************************************//** Checks if a dtuple contains an SQL null value. @return TRUE if some field is SQL null */ @@ -371,7 +371,7 @@ ibool dtuple_contains_null( /*=================*/ const dtuple_t* tuple) /*!< in: dtuple */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /**********************************************************//** Checks that a data field is typed. Asserts an error if not. @return TRUE if ok */ @@ -380,7 +380,7 @@ ibool dfield_check_typed( /*===============*/ const dfield_t* field) /*!< in: data field */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /**********************************************************//** Checks that a data tuple is typed. Asserts an error if not. @return TRUE if ok */ @@ -389,7 +389,7 @@ ibool dtuple_check_typed( /*===============*/ const dtuple_t* tuple) /*!< in: tuple */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /**********************************************************//** Checks that a data tuple is typed. @return TRUE if ok */ @@ -398,7 +398,7 @@ ibool dtuple_check_typed_no_assert( /*=========================*/ const dtuple_t* tuple) /*!< in: tuple */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); #ifdef UNIV_DEBUG /**********************************************************//** Validates the consistency of a tuple which must be complete, i.e, @@ -409,7 +409,7 @@ ibool dtuple_validate( /*============*/ const dtuple_t* tuple) /*!< in: tuple */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); #endif /* UNIV_DEBUG */ /*************************************************************//** Pretty prints a dfield value according to its data type. */ @@ -418,7 +418,7 @@ void dfield_print( /*=========*/ const dfield_t* dfield) /*!< in: dfield */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*************************************************************//** Pretty prints a dfield value according to its data type. Also the hex string is printed if a string contains non-printable characters. */ @@ -427,7 +427,7 @@ void dfield_print_also_hex( /*==================*/ const dfield_t* dfield) /*!< in: dfield */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /**********************************************************//** The following function prints the contents of a tuple. */ UNIV_INTERN @@ -436,7 +436,7 @@ dtuple_print( /*=========*/ FILE* f, /*!< in: output stream */ const dtuple_t* tuple) /*!< in: tuple */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /**************************************************************//** Moves parts of long fields in entry to the big record vector so that the size of tuple drops below the maximum record size allowed in the @@ -453,7 +453,7 @@ dtuple_convert_big_rec( dtuple_t* entry, /*!< in/out: index entry */ ulint* n_ext) /*!< in/out: number of externally stored columns */ - __attribute__((nonnull, malloc, warn_unused_result)); + MY_ATTRIBUTE((nonnull, malloc, warn_unused_result)); /**************************************************************//** Puts back to entry the data stored in vector. Note that to ensure the fields in entry can accommodate the data, vector must have been created @@ -466,7 +466,7 @@ dtuple_convert_back_big_rec( dtuple_t* entry, /*!< in: entry whose data was put to vector */ big_rec_t* vector) /*!< in, own: big rec vector; it is freed in this function */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /**************************************************************//** Frees the memory in a big rec vector. */ UNIV_INLINE @@ -475,7 +475,7 @@ dtuple_big_rec_free( /*================*/ big_rec_t* vector) /*!< in, own: big rec vector; it is freed in this function */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*######################################################################*/ diff --git a/mysql-wsrep-5.6/storage/innobase/include/data0data.ic b/mysql-wsrep-5.6/storage/innobase/include/data0data.ic index 6937d55d..11499ab9 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/data0data.ic +++ b/mysql-wsrep-5.6/storage/innobase/include/data0data.ic @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1994, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -56,7 +56,8 @@ dfield_set_type( dfield_t* field, /*!< in: SQL data field */ const dtype_t* type) /*!< in: pointer to data type struct */ { - ut_ad(field && type); + ut_ad(field != NULL); + ut_ad(type != NULL); field->type = *type; } @@ -194,7 +195,8 @@ dfield_copy_data( dfield_t* field1, /*!< out: field to copy to */ const dfield_t* field2) /*!< in: field to copy from */ { - ut_ad(field1 && field2); + ut_ad(field1 != NULL); + ut_ad(field2 != NULL); field1->data = field2->data; field1->len = field2->len; diff --git a/mysql-wsrep-5.6/storage/innobase/include/dict0boot.h b/mysql-wsrep-5.6/storage/innobase/include/dict0boot.h index a994c9d8..477e1150 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/dict0boot.h +++ b/mysql-wsrep-5.6/storage/innobase/include/dict0boot.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -95,7 +95,7 @@ UNIV_INTERN dberr_t dict_boot(void) /*===========*/ - __attribute__((warn_unused_result)); + MY_ATTRIBUTE((warn_unused_result)); /*****************************************************************//** Creates and initializes the data dictionary at the server bootstrap. @@ -104,7 +104,7 @@ UNIV_INTERN dberr_t dict_create(void) /*=============*/ - __attribute__((warn_unused_result)); + MY_ATTRIBUTE((warn_unused_result)); /*********************************************************************//** Check if a table id belongs to system table. @@ -114,7 +114,7 @@ bool dict_is_sys_table( /*==============*/ table_id_t id) /*!< in: table id to check */ - __attribute__((warn_unused_result)); + MY_ATTRIBUTE((warn_unused_result)); /* Space id and page no where the dictionary header resides */ #define DICT_HDR_SPACE 0 /* the SYSTEM tablespace */ diff --git a/mysql-wsrep-5.6/storage/innobase/include/dict0crea.h b/mysql-wsrep-5.6/storage/innobase/include/dict0crea.h index 67eab905..61469174 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/dict0crea.h +++ b/mysql-wsrep-5.6/storage/innobase/include/dict0crea.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2014, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -123,7 +123,7 @@ dict_create_add_foreign_id( incremented if used */ const char* name, /*!< in: table name */ dict_foreign_t* foreign)/*!< in/out: foreign key */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /** Adds the given set of foreign key objects to the dictionary tables in the database. This function does not modify the dictionary cache. The @@ -142,7 +142,7 @@ dict_create_add_foreigns_to_dictionary( const dict_foreign_set& local_fk_set, const dict_table_t* table, trx_t* trx) - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /****************************************************************//** Creates the tablespaces and datafiles system tables inside InnoDB at server bootstrap or server start if they are not found or are @@ -177,7 +177,7 @@ dict_create_add_foreign_to_dictionary( const char* name, /*!< in: table name */ const dict_foreign_t* foreign,/*!< in: foreign key */ trx_t* trx) /*!< in/out: dictionary transaction */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /* Table create node structure */ struct tab_node_t{ diff --git a/mysql-wsrep-5.6/storage/innobase/include/dict0crea.ic b/mysql-wsrep-5.6/storage/innobase/include/dict0crea.ic index 2d0d9dcb..1cbaa470 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/dict0crea.ic +++ b/mysql-wsrep-5.6/storage/innobase/include/dict0crea.ic @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -33,7 +33,7 @@ UNIV_INTERN bool row_is_mysql_tmp_table_name( /*========================*/ - const char* name) __attribute__((warn_unused_result)); + const char* name) MY_ATTRIBUTE((warn_unused_result)); /*!< in: table name in the form 'database/tablename' */ diff --git a/mysql-wsrep-5.6/storage/innobase/include/dict0dict.h b/mysql-wsrep-5.6/storage/innobase/include/dict0dict.h index dea4a9a2..533ddc3d 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/dict0dict.h +++ b/mysql-wsrep-5.6/storage/innobase/include/dict0dict.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. This program is free software; you can redistribute it and/or modify it under @@ -53,7 +53,7 @@ void dict_casedn_str( /*============*/ char* a) /*!< in/out: string to put in lower case */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /********************************************************************//** Get the database name length in a table name. @return database name length */ @@ -63,7 +63,7 @@ dict_get_db_name_len( /*=================*/ const char* name) /*!< in: table name in the form dbname '/' tablename */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*********************************************************************//** Open a table from its database and table name, this is currently used by foreign constraint parser to get the referenced table. @@ -107,7 +107,7 @@ dict_remove_db_name( /*================*/ const char* name) /*!< in: table name in the form dbname '/' tablename */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /** Operation to perform when opening a table */ enum dict_table_op_t { @@ -130,7 +130,7 @@ dict_table_open_on_id( table_id_t table_id, /*!< in: table id */ ibool dict_locked, /*!< in: TRUE=data dictionary locked */ dict_table_op_t table_op) /*!< in: operation to perform */ - __attribute__((warn_unused_result)); + MY_ATTRIBUTE((warn_unused_result)); /********************************************************************//** Decrements the count of open handles to a table. */ UNIV_INTERN @@ -142,7 +142,7 @@ dict_table_close( ibool try_drop) /*!< in: TRUE=try to drop any orphan indexes after an aborted online index creation */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /**********************************************************************//** Inits the data dictionary module. */ UNIV_INTERN @@ -167,7 +167,7 @@ ulint dict_col_get_mbminlen( /*==================*/ const dict_col_t* col) /*!< in: column */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*********************************************************************//** Gets the maximum number of bytes per character. @return maximum multi-byte char size, in bytes */ @@ -176,7 +176,7 @@ ulint dict_col_get_mbmaxlen( /*==================*/ const dict_col_t* col) /*!< in: column */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*********************************************************************//** Sets the minimum and maximum number of bytes per character. */ UNIV_INLINE @@ -188,7 +188,7 @@ dict_col_set_mbminmaxlen( character size, in bytes */ ulint mbmaxlen) /*!< in: minimum multi-byte character size, in bytes */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*********************************************************************//** Gets the column data type. */ UNIV_INLINE @@ -197,7 +197,7 @@ dict_col_copy_type( /*===============*/ const dict_col_t* col, /*!< in: column */ dtype_t* type) /*!< out: data type */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /**********************************************************************//** Determine bytes of column prefix to be stored in the undo log. Please note if the table format is UNIV_FORMAT_A (< UNIV_FORMAT_B), no prefix @@ -210,7 +210,7 @@ dict_max_field_len_store_undo( dict_table_t* table, /*!< in: table */ const dict_col_t* col) /*!< in: column which index prefix is based on */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); #endif /* !UNIV_HOTBACKUP */ #ifdef UNIV_DEBUG /*********************************************************************//** @@ -222,7 +222,7 @@ dict_col_type_assert_equal( /*=======================*/ const dict_col_t* col, /*!< in: column */ const dtype_t* type) /*!< in: data type */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); #endif /* UNIV_DEBUG */ #ifndef UNIV_HOTBACKUP /***********************************************************************//** @@ -233,7 +233,7 @@ ulint dict_col_get_min_size( /*==================*/ const dict_col_t* col) /*!< in: column */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /***********************************************************************//** Returns the maximum size of the column. @return maximum size */ @@ -242,7 +242,7 @@ ulint dict_col_get_max_size( /*==================*/ const dict_col_t* col) /*!< in: column */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /***********************************************************************//** Returns the size of a fixed size column, 0 if not a fixed size column. @return fixed size, or 0 */ @@ -252,7 +252,7 @@ dict_col_get_fixed_size( /*====================*/ const dict_col_t* col, /*!< in: column */ ulint comp) /*!< in: nonzero=ROW_FORMAT=COMPACT */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /***********************************************************************//** Returns the ROW_FORMAT=REDUNDANT stored SQL NULL size of a column. For fixed length types it is the fixed length of the type, otherwise 0. @@ -263,7 +263,7 @@ dict_col_get_sql_null_size( /*=======================*/ const dict_col_t* col, /*!< in: column */ ulint comp) /*!< in: nonzero=ROW_FORMAT=COMPACT */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*********************************************************************//** Gets the column number. @return col->ind, table column position (starting from 0) */ @@ -272,7 +272,7 @@ ulint dict_col_get_no( /*============*/ const dict_col_t* col) /*!< in: column */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*********************************************************************//** Gets the column position in the clustered index. */ UNIV_INLINE @@ -281,7 +281,7 @@ dict_col_get_clust_pos( /*===================*/ const dict_col_t* col, /*!< in: table column */ const dict_index_t* clust_index) /*!< in: clustered index */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /****************************************************************//** If the given column name is reserved for InnoDB system columns, return TRUE. @@ -291,7 +291,7 @@ ibool dict_col_name_is_reserved( /*======================*/ const char* name) /*!< in: column name */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /********************************************************************//** Acquire the autoinc lock. */ UNIV_INTERN @@ -299,7 +299,7 @@ void dict_table_autoinc_lock( /*====================*/ dict_table_t* table) /*!< in/out: table */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /********************************************************************//** Unconditionally set the autoinc counter. */ UNIV_INTERN @@ -308,7 +308,7 @@ dict_table_autoinc_initialize( /*==========================*/ dict_table_t* table, /*!< in/out: table */ ib_uint64_t value) /*!< in: next value to assign to a row */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /** Store autoinc value when the table is evicted. @param[in] table table evicted */ @@ -333,7 +333,7 @@ ib_uint64_t dict_table_autoinc_read( /*====================*/ const dict_table_t* table) /*!< in: table */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /********************************************************************//** Updates the autoinc counter if the value supplied is greater than the current value. */ @@ -344,7 +344,7 @@ dict_table_autoinc_update_if_greater( dict_table_t* table, /*!< in/out: table */ ib_uint64_t value) /*!< in: value which was assigned to a row */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /********************************************************************//** Release the autoinc lock. */ UNIV_INTERN @@ -352,7 +352,7 @@ void dict_table_autoinc_unlock( /*======================*/ dict_table_t* table) /*!< in/out: table */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); #endif /* !UNIV_HOTBACKUP */ /**********************************************************************//** Adds system columns to a table object. */ @@ -362,7 +362,7 @@ dict_table_add_system_columns( /*==========================*/ dict_table_t* table, /*!< in/out: table */ mem_heap_t* heap) /*!< in: temporary heap */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); #ifndef UNIV_HOTBACKUP /**********************************************************************//** Adds a table object to the dictionary cache. */ @@ -373,7 +373,7 @@ dict_table_add_to_cache( dict_table_t* table, /*!< in: table */ ibool can_be_evicted, /*!< in: TRUE if can be evicted*/ mem_heap_t* heap) /*!< in: temporary heap */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /**********************************************************************//** Removes a table object from the dictionary cache. */ UNIV_INTERN @@ -381,7 +381,7 @@ void dict_table_remove_from_cache( /*=========================*/ dict_table_t* table) /*!< in, own: table */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /**********************************************************************//** Removes a table object from the dictionary cache. */ UNIV_INTERN @@ -404,7 +404,7 @@ dict_table_rename_in_cache( /*!< in: in ALTER TABLE we want to preserve the original table name in constraints which reference it */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /**********************************************************************//** Removes an index from the dictionary cache. */ UNIV_INTERN @@ -413,7 +413,7 @@ dict_index_remove_from_cache( /*=========================*/ dict_table_t* table, /*!< in/out: table */ dict_index_t* index) /*!< in, own: index */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /**********************************************************************//** Change the id of a table object in the dictionary cache. This is used in DISCARD TABLESPACE. */ @@ -423,7 +423,7 @@ dict_table_change_id_in_cache( /*==========================*/ dict_table_t* table, /*!< in/out: table object already in cache */ table_id_t new_id) /*!< in: new id to set */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /**********************************************************************//** Removes a foreign constraint struct from the dictionary cache. */ UNIV_INTERN @@ -431,7 +431,7 @@ void dict_foreign_remove_from_cache( /*===========================*/ dict_foreign_t* foreign) /*!< in, own: foreign constraint */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /**********************************************************************//** Adds a foreign key constraint object to the dictionary cache. May free the object if there already is an object with the same identifier in. @@ -452,7 +452,7 @@ dict_foreign_add_to_cache( compatibility */ dict_err_ignore_t ignore_err) /*!< in: error to be ignored */ - __attribute__((nonnull(1), warn_unused_result)); + MY_ATTRIBUTE((nonnull(1), warn_unused_result)); /*********************************************************************//** Checks if a table is referenced by foreign keys. @return TRUE if table is referenced by a foreign key */ @@ -461,7 +461,7 @@ ibool dict_table_is_referenced_by_foreign_key( /*====================================*/ const dict_table_t* table) /*!< in: InnoDB table */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /**********************************************************************//** Replace the index passed in with another equivalent index in the foreign key lists of the table. @@ -475,7 +475,7 @@ dict_foreign_replace_index( /*!< in: column names, or NULL to use table->col_names */ const dict_index_t* index) /*!< in: index to be replaced */ - __attribute__((nonnull(1,3), warn_unused_result)); + MY_ATTRIBUTE((nonnull(1,3), warn_unused_result)); /**********************************************************************//** Determines whether a string starts with the specified keyword. @return TRUE if str starts with keyword */ @@ -486,7 +486,7 @@ dict_str_starts_with_keyword( THD* thd, /*!< in: MySQL thread handle */ const char* str, /*!< in: string to scan for keyword */ const char* keyword) /*!< in: keyword to look for */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*********************************************************************//** Scans a table create SQL string and adds to the data dictionary the foreign key constraints declared in the string. This function @@ -515,7 +515,7 @@ dict_create_foreign_constraints( ibool reject_fks) /*!< in: if TRUE, fail with error code DB_CANNOT_ADD_CONSTRAINT if any foreign keys are found. */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /**********************************************************************//** Parses the CONSTRAINT id's to be dropped in an ALTER TABLE statement. @return DB_SUCCESS or DB_CANNOT_DROP_CONSTRAINT if syntax error or the @@ -532,7 +532,7 @@ dict_foreign_parse_drop_constraints( to drop */ const char*** constraints_to_drop) /*!< out: id's of the constraints to drop */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /**********************************************************************//** Returns a table object and increments its open handle count. NOTE! This is a high-level function to be used mainly from outside the @@ -551,7 +551,7 @@ dict_table_open_on_name( dict_err_ignore_t ignore_err) /*!< in: error to be ignored when loading the table */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*********************************************************************//** Tries to find an index whose first fields are the columns in the array, @@ -580,7 +580,7 @@ dict_foreign_find_index( /*!< in: nonzero if none of the columns must be declared NOT NULL */ - __attribute__((nonnull(1,3), warn_unused_result)); + MY_ATTRIBUTE((nonnull(1,3), warn_unused_result)); /**********************************************************************//** Returns a column's name. @return column name. NOTE: not guaranteed to stay valid if table is @@ -591,7 +591,7 @@ dict_table_get_col_name( /*====================*/ const dict_table_t* table, /*!< in: table */ ulint col_nr) /*!< in: column number */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /**********************************************************************//** Prints a table data. */ UNIV_INTERN @@ -599,7 +599,7 @@ void dict_table_print( /*=============*/ dict_table_t* table) /*!< in: table */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /**********************************************************************//** Outputs info on foreign keys of a table. */ UNIV_INTERN @@ -613,7 +613,7 @@ dict_print_info_on_foreign_keys( FILE* file, /*!< in: file where to print */ trx_t* trx, /*!< in: transaction */ dict_table_t* table) /*!< in: table */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /**********************************************************************//** Outputs info on a foreign key of a table in a format suitable for CREATE TABLE. */ @@ -625,7 +625,7 @@ dict_print_info_on_foreign_key_in_create_format( trx_t* trx, /*!< in: transaction */ dict_foreign_t* foreign, /*!< in: foreign key constraint */ ibool add_newline) /*!< in: whether to add a newline */ - __attribute__((nonnull(1,3))); + MY_ATTRIBUTE((nonnull(1,3))); /********************************************************************//** Displays the names of the index and the table. */ UNIV_INTERN @@ -635,7 +635,7 @@ dict_index_name_print( FILE* file, /*!< in: output stream */ const trx_t* trx, /*!< in: transaction */ const dict_index_t* index) /*!< in: index to print */ - __attribute__((nonnull(1,3))); + MY_ATTRIBUTE((nonnull(1,3))); /*********************************************************************//** Tries to find an index whose first fields are the columns in the array, in the same order and is not marked for deletion and is not the same @@ -664,7 +664,7 @@ dict_foreign_qualify_index( /*!< in: nonzero if none of the columns must be declared NOT NULL */ - __attribute__((nonnull(1,3), warn_unused_result)); + MY_ATTRIBUTE((nonnull(1,3), warn_unused_result)); #ifdef UNIV_DEBUG /********************************************************************//** Gets the first index on the table (the clustered index). @@ -674,7 +674,7 @@ dict_index_t* dict_table_get_first_index( /*=======================*/ const dict_table_t* table) /*!< in: table */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /********************************************************************//** Gets the last index on the table. @return index, NULL if none exists */ @@ -683,7 +683,7 @@ dict_index_t* dict_table_get_last_index( /*=======================*/ const dict_table_t* table) /*!< in: table */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /********************************************************************//** Gets the next index on the table. @return index, NULL if none left */ @@ -692,7 +692,7 @@ dict_index_t* dict_table_get_next_index( /*======================*/ const dict_index_t* index) /*!< in: index */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); #else /* UNIV_DEBUG */ # define dict_table_get_first_index(table) UT_LIST_GET_FIRST((table)->indexes) # define dict_table_get_last_index(table) UT_LIST_GET_LAST((table)->indexes) @@ -721,7 +721,7 @@ ulint dict_index_is_clust( /*================*/ const dict_index_t* index) /*!< in: index */ - __attribute__((nonnull, pure, warn_unused_result)); + MY_ATTRIBUTE((nonnull, pure, warn_unused_result)); /********************************************************************//** Check whether the index is unique. @return nonzero for unique index, zero for other indexes */ @@ -730,7 +730,7 @@ ulint dict_index_is_unique( /*=================*/ const dict_index_t* index) /*!< in: index */ - __attribute__((nonnull, pure, warn_unused_result)); + MY_ATTRIBUTE((nonnull, pure, warn_unused_result)); /********************************************************************//** Check whether the index is the insert buffer tree. @return nonzero for insert buffer, zero for other indexes */ @@ -739,7 +739,7 @@ ulint dict_index_is_ibuf( /*===============*/ const dict_index_t* index) /*!< in: index */ - __attribute__((nonnull, pure, warn_unused_result)); + MY_ATTRIBUTE((nonnull, pure, warn_unused_result)); /********************************************************************//** Check whether the index is a secondary index or the insert buffer tree. @return nonzero for insert buffer, zero for other indexes */ @@ -748,7 +748,7 @@ ulint dict_index_is_sec_or_ibuf( /*======================*/ const dict_index_t* index) /*!< in: index */ - __attribute__((nonnull, pure, warn_unused_result)); + MY_ATTRIBUTE((nonnull, pure, warn_unused_result)); /************************************************************************ Gets the all the FTS indexes for the table. NOTE: must not be called for @@ -760,7 +760,7 @@ dict_table_get_all_fts_indexes( /* out: number of indexes collected */ dict_table_t* table, /* in: table */ ib_vector_t* indexes)/* out: vector for collecting FTS indexes */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /********************************************************************//** Gets the number of user-defined columns in a table in the dictionary cache. @@ -770,7 +770,7 @@ ulint dict_table_get_n_user_cols( /*=======================*/ const dict_table_t* table) /*!< in: table */ - __attribute__((nonnull, pure, warn_unused_result)); + MY_ATTRIBUTE((nonnull, pure, warn_unused_result)); /********************************************************************//** Gets the number of system columns in a table in the dictionary cache. @return number of system (e.g., ROW_ID) columns of a table */ @@ -779,7 +779,7 @@ ulint dict_table_get_n_sys_cols( /*======================*/ const dict_table_t* table) /*!< in: table */ - __attribute__((nonnull, pure, warn_unused_result)); + MY_ATTRIBUTE((nonnull, pure, warn_unused_result)); /********************************************************************//** Gets the number of all columns (also system) in a table in the dictionary cache. @@ -789,7 +789,7 @@ ulint dict_table_get_n_cols( /*==================*/ const dict_table_t* table) /*!< in: table */ - __attribute__((nonnull, pure, warn_unused_result)); + MY_ATTRIBUTE((nonnull, pure, warn_unused_result)); /********************************************************************//** Gets the approximately estimated number of rows in the table. @return estimated number of rows */ @@ -798,7 +798,7 @@ ib_uint64_t dict_table_get_n_rows( /*==================*/ const dict_table_t* table) /*!< in: table */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /********************************************************************//** Increment the number of rows in the table by one. Notice that this operation is not protected by any latch, the number is @@ -808,7 +808,7 @@ void dict_table_n_rows_inc( /*==================*/ dict_table_t* table) /*!< in/out: table */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /********************************************************************//** Decrement the number of rows in the table by one. Notice that this operation is not protected by any latch, the number is @@ -818,7 +818,7 @@ void dict_table_n_rows_dec( /*==================*/ dict_table_t* table) /*!< in/out: table */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); #ifdef UNIV_DEBUG /********************************************************************//** Gets the nth column of a table. @@ -829,7 +829,7 @@ dict_table_get_nth_col( /*===================*/ const dict_table_t* table, /*!< in: table */ ulint pos) /*!< in: position of column */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /********************************************************************//** Gets the given system column of a table. @return pointer to column object */ @@ -839,7 +839,7 @@ dict_table_get_sys_col( /*===================*/ const dict_table_t* table, /*!< in: table */ ulint sys) /*!< in: DATA_ROW_ID, ... */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); #else /* UNIV_DEBUG */ #define dict_table_get_nth_col(table, pos) \ ((table)->cols + (pos)) @@ -855,7 +855,7 @@ dict_table_get_sys_col_no( /*======================*/ const dict_table_t* table, /*!< in: table */ ulint sys) /*!< in: DATA_ROW_ID, ... */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); #ifndef UNIV_HOTBACKUP /********************************************************************//** Returns the minimum data size of an index record. @@ -865,7 +865,7 @@ ulint dict_index_get_min_size( /*====================*/ const dict_index_t* index) /*!< in: index */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); #endif /* !UNIV_HOTBACKUP */ /********************************************************************//** Check whether the table uses the compact page format. @@ -875,7 +875,7 @@ ibool dict_table_is_comp( /*===============*/ const dict_table_t* table) /*!< in: table */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /********************************************************************//** Determine the file format of a table. @return file format version */ @@ -884,7 +884,7 @@ ulint dict_table_get_format( /*==================*/ const dict_table_t* table) /*!< in: table */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /********************************************************************//** Determine the file format from a dict_table_t::flags. @return file format version */ @@ -893,7 +893,7 @@ ulint dict_tf_get_format( /*===============*/ ulint flags) /*!< in: dict_table_t::flags */ - __attribute__((warn_unused_result)); + MY_ATTRIBUTE((warn_unused_result)); /********************************************************************//** Set the various values in a dict_table_t::flags pointer. */ UNIV_INLINE @@ -904,7 +904,7 @@ dict_tf_set( rec_format_t format, /*!< in: file format */ ulint zip_ssize, /*!< in: zip shift size */ bool remote_path) /*!< in: table uses DATA DIRECTORY */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /********************************************************************//** Convert a 32 bit integer table flags to the 32 bit integer that is written into the tablespace header at the offset FSP_SPACE_FLAGS and is @@ -921,7 +921,7 @@ ulint dict_tf_to_fsp_flags( /*=================*/ ulint flags) /*!< in: dict_table_t::flags */ - __attribute__((const)); + MY_ATTRIBUTE((const)); /********************************************************************//** Extract the compressed page size from table flags. @return compressed page size, or 0 if not compressed */ @@ -930,7 +930,7 @@ ulint dict_tf_get_zip_size( /*=================*/ ulint flags) /*!< in: flags */ - __attribute__((const)); + MY_ATTRIBUTE((const)); /********************************************************************//** Check whether the table uses the compressed compact page format. @return compressed page size, or 0 if not compressed */ @@ -939,7 +939,7 @@ ulint dict_table_zip_size( /*================*/ const dict_table_t* table) /*!< in: table */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); #ifndef UNIV_HOTBACKUP /*********************************************************************//** Obtain exclusive locks on all index trees of the table. This is to prevent @@ -950,7 +950,7 @@ void dict_table_x_lock_indexes( /*======================*/ dict_table_t* table) /*!< in: table */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*********************************************************************//** Release the exclusive locks on all index tree. */ UNIV_INLINE @@ -958,7 +958,7 @@ void dict_table_x_unlock_indexes( /*========================*/ dict_table_t* table) /*!< in: table */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /********************************************************************//** Checks if a column is in the ordering columns of the clustered index of a table. Column prefixes are treated like whole columns. @@ -969,7 +969,7 @@ dict_table_col_in_clustered_key( /*============================*/ const dict_table_t* table, /*!< in: table */ ulint n) /*!< in: column number */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*******************************************************************//** Check if the table has an FTS index. @return TRUE if table has an FTS index */ @@ -978,7 +978,7 @@ ibool dict_table_has_fts_index( /*=====================*/ dict_table_t* table) /*!< in: table */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*******************************************************************//** Copies types of columns contained in table to tuple and sets all fields of the tuple to the SQL NULL value. This function should @@ -989,7 +989,7 @@ dict_table_copy_types( /*==================*/ dtuple_t* tuple, /*!< in/out: data tuple */ const dict_table_t* table) /*!< in: table */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /******************************************************************** Wait until all the background threads of the given table have exited, i.e., bg_threads == 0. Note: bg_threads_mutex must be reserved when @@ -1001,7 +1001,7 @@ dict_table_wait_for_bg_threads_to_exit( dict_table_t* table, /* in: table */ ulint delay) /* in: time in microseconds to wait between checks of bg_threads. */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /**********************************************************************//** Looks for an index with the given id. NOTE that we do not reserve the dictionary mutex: this function is for emergency purposes like @@ -1012,7 +1012,7 @@ dict_index_t* dict_index_find_on_id_low( /*======================*/ index_id_t id) /*!< in: index id */ - __attribute__((warn_unused_result)); + MY_ATTRIBUTE((warn_unused_result)); /**********************************************************************//** Make room in the table cache by evicting an unused table. The unused table should not be part of FK relationship and currently not used in any user @@ -1038,7 +1038,7 @@ dict_index_add_to_cache( ibool strict) /*!< in: TRUE=refuse to create the index if records could be too big to fit in an B-tree page */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /**********************************************************************//** Removes an index from the dictionary cache. */ UNIV_INTERN @@ -1047,7 +1047,7 @@ dict_index_remove_from_cache( /*=========================*/ dict_table_t* table, /*!< in/out: table */ dict_index_t* index) /*!< in, own: index */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); #endif /* !UNIV_HOTBACKUP */ /********************************************************************//** Gets the number of fields in the internal representation of an index, @@ -1060,7 +1060,7 @@ dict_index_get_n_fields( const dict_index_t* index) /*!< in: an internal representation of index (in the dictionary cache) */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /********************************************************************//** Gets the number of fields in the internal representation of an index that uniquely determine the position of an index entry in the index, if @@ -1073,7 +1073,7 @@ dict_index_get_n_unique( /*====================*/ const dict_index_t* index) /*!< in: an internal representation of index (in the dictionary cache) */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /********************************************************************//** Gets the number of fields in the internal representation of an index which uniquely determine the position of an index entry in the index, if @@ -1085,7 +1085,7 @@ dict_index_get_n_unique_in_tree( /*============================*/ const dict_index_t* index) /*!< in: an internal representation of index (in the dictionary cache) */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /********************************************************************//** Gets the number of user-defined ordering fields in the index. In the internal representation we add the row id to the ordering fields to make all indexes @@ -1098,7 +1098,7 @@ dict_index_get_n_ordering_defined_by_user( /*======================================*/ const dict_index_t* index) /*!< in: an internal representation of index (in the dictionary cache) */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); #ifdef UNIV_DEBUG /********************************************************************//** Gets the nth field of an index. @@ -1109,7 +1109,7 @@ dict_index_get_nth_field( /*=====================*/ const dict_index_t* index, /*!< in: index */ ulint pos) /*!< in: position of field */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); #else /* UNIV_DEBUG */ # define dict_index_get_nth_field(index, pos) ((index)->fields + (pos)) #endif /* UNIV_DEBUG */ @@ -1122,7 +1122,7 @@ dict_index_get_nth_col( /*===================*/ const dict_index_t* index, /*!< in: index */ ulint pos) /*!< in: position of the field */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /********************************************************************//** Gets the column number of the nth field in an index. @return column number */ @@ -1132,7 +1132,7 @@ dict_index_get_nth_col_no( /*======================*/ const dict_index_t* index, /*!< in: index */ ulint pos) /*!< in: position of the field */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /********************************************************************//** Looks for column n in an index. @return position in internal representation of the index; @@ -1143,7 +1143,7 @@ dict_index_get_nth_col_pos( /*=======================*/ const dict_index_t* index, /*!< in: index */ ulint n) /*!< in: column number */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /********************************************************************//** Looks for column n in an index. @return position in internal representation of the index; @@ -1156,7 +1156,7 @@ dict_index_get_nth_col_or_prefix_pos( ulint n, /*!< in: column number */ ibool inc_prefix) /*!< in: TRUE=consider column prefixes too */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /********************************************************************//** Returns TRUE if the index contains a column or a prefix of that column. @return TRUE if contains the column or its prefix */ @@ -1166,7 +1166,7 @@ dict_index_contains_col_or_prefix( /*==============================*/ const dict_index_t* index, /*!< in: index */ ulint n) /*!< in: column number */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /********************************************************************//** Looks for a matching field in an index. The column has to be the same. The column in index must be complete, or must contain a prefix longer than the @@ -1181,7 +1181,7 @@ dict_index_get_nth_field_pos( const dict_index_t* index, /*!< in: index from which to search */ const dict_index_t* index2, /*!< in: index */ ulint n) /*!< in: field number in index2 */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /********************************************************************//** Looks for column n position in the clustered index. @return position in internal representation of the clustered index */ @@ -1191,7 +1191,7 @@ dict_table_get_nth_col_pos( /*=======================*/ const dict_table_t* table, /*!< in: table */ ulint n) /*!< in: column number */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /********************************************************************//** Returns the position of a system column in an index. @return position, ULINT_UNDEFINED if not contained */ @@ -1201,7 +1201,7 @@ dict_index_get_sys_col_pos( /*=======================*/ const dict_index_t* index, /*!< in: index */ ulint type) /*!< in: DATA_ROW_ID, ... */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*******************************************************************//** Adds a column to index. */ UNIV_INTERN @@ -1212,7 +1212,7 @@ dict_index_add_col( const dict_table_t* table, /*!< in: table */ dict_col_t* col, /*!< in: column */ ulint prefix_len) /*!< in: column prefix length */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); #ifndef UNIV_HOTBACKUP /*******************************************************************//** Copies types of fields contained in index to tuple. */ @@ -1224,7 +1224,7 @@ dict_index_copy_types( const dict_index_t* index, /*!< in: index */ ulint n_fields) /*!< in: number of field types to copy */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); #endif /* !UNIV_HOTBACKUP */ /*********************************************************************//** Gets the field column. @@ -1234,7 +1234,7 @@ const dict_col_t* dict_field_get_col( /*===============*/ const dict_field_t* field) /*!< in: index field */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); #ifndef UNIV_HOTBACKUP /**********************************************************************//** Returns an index object if it is found in the dictionary cache. @@ -1245,7 +1245,7 @@ dict_index_t* dict_index_get_if_in_cache_low( /*===========================*/ index_id_t index_id) /*!< in: index id */ - __attribute__((warn_unused_result)); + MY_ATTRIBUTE((warn_unused_result)); #if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG /**********************************************************************//** Returns an index object if it is found in the dictionary cache. @@ -1255,7 +1255,7 @@ dict_index_t* dict_index_get_if_in_cache( /*=======================*/ index_id_t index_id) /*!< in: index id */ - __attribute__((warn_unused_result)); + MY_ATTRIBUTE((warn_unused_result)); #endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */ #ifdef UNIV_DEBUG /**********************************************************************//** @@ -1268,7 +1268,7 @@ dict_index_check_search_tuple( /*==========================*/ const dict_index_t* index, /*!< in: index tree */ const dtuple_t* tuple) /*!< in: tuple used in a search */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /** Whether and when to allow temporary index names */ enum check_name { /** Require all indexes to be complete. */ @@ -1288,7 +1288,7 @@ dict_table_check_for_dup_indexes( in this table */ enum check_name check) /*!< in: whether and when to allow temporary index names */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); #endif /* UNIV_DEBUG */ /**********************************************************************//** Builds a node pointer out of a physical record and a page number. @@ -1306,7 +1306,7 @@ dict_index_build_node_ptr( created */ ulint level) /*!< in: level of rec in tree: 0 means leaf level */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /**********************************************************************//** Copies an initial segment of a physical record, long enough to specify an index entry uniquely. @@ -1322,7 +1322,7 @@ dict_index_copy_rec_order_prefix( byte** buf, /*!< in/out: memory buffer for the copied prefix, or NULL */ ulint* buf_size)/*!< in/out: buffer size */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /**********************************************************************//** Builds a typed data tuple out of a physical record. @return own: data tuple */ @@ -1334,7 +1334,7 @@ dict_index_build_data_tuple( rec_t* rec, /*!< in: record for which to build data tuple */ ulint n_fields,/*!< in: number of data fields */ mem_heap_t* heap) /*!< in: memory heap where tuple created */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*********************************************************************//** Gets the space id of the root of the index tree. @return space id */ @@ -1343,7 +1343,7 @@ ulint dict_index_get_space( /*=================*/ const dict_index_t* index) /*!< in: index */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*********************************************************************//** Sets the space id of the root of the index tree. */ UNIV_INLINE @@ -1352,7 +1352,7 @@ dict_index_set_space( /*=================*/ dict_index_t* index, /*!< in/out: index */ ulint space) /*!< in: space id */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*********************************************************************//** Gets the page number of the root of the index tree. @return page number */ @@ -1361,7 +1361,7 @@ ulint dict_index_get_page( /*================*/ const dict_index_t* tree) /*!< in: index */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*********************************************************************//** Gets the read-write lock of the index tree. @return read-write lock */ @@ -1370,7 +1370,7 @@ rw_lock_t* dict_index_get_lock( /*================*/ dict_index_t* index) /*!< in: index */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /********************************************************************//** Returns free space reserved for future updates of records. This is relevant only in the case of many consecutive inserts, as updates @@ -1390,7 +1390,7 @@ enum online_index_status dict_index_get_online_status( /*=========================*/ const dict_index_t* index) /*!< in: secondary index */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /********************************************************************//** Sets the status of online index creation. */ UNIV_INLINE @@ -1399,7 +1399,7 @@ dict_index_set_online_status( /*=========================*/ dict_index_t* index, /*!< in/out: index */ enum online_index_status status) /*!< in: status */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /********************************************************************//** Determines if a secondary index is being or has been created online, or if the table is being rebuilt online, allowing concurrent modifications @@ -1413,7 +1413,7 @@ bool dict_index_is_online_ddl( /*=====================*/ const dict_index_t* index) /*!< in: index */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*********************************************************************//** Calculates the minimum record length in an index. */ UNIV_INTERN @@ -1421,7 +1421,7 @@ ulint dict_index_calc_min_rec_len( /*========================*/ const dict_index_t* index) /*!< in: index */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /********************************************************************//** Reserves the dictionary system mutex for MySQL. */ UNIV_INTERN @@ -1485,7 +1485,7 @@ dict_tables_have_same_db( dbname '/' tablename */ const char* name2) /*!< in: table name in the form dbname '/' tablename */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*********************************************************************//** Removes an index from the cache */ UNIV_INTERN @@ -1494,7 +1494,7 @@ dict_index_remove_from_cache( /*=========================*/ dict_table_t* table, /*!< in/out: table */ dict_index_t* index) /*!< in, own: index */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /**********************************************************************//** Get index by name @return index, NULL if does not exist */ @@ -1504,7 +1504,7 @@ dict_table_get_index_on_name( /*=========================*/ dict_table_t* table, /*!< in: table */ const char* name) /*!< in: name of the index to find */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /**********************************************************************//** In case there is more than one index with the same name return the index with the min(id). @@ -1515,7 +1515,7 @@ dict_table_get_index_on_name_and_min_id( /*====================================*/ dict_table_t* table, /*!< in: table */ const char* name) /*!< in: name of the index to find */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*************************************************************** Check whether a column exists in an FTS index. */ UNIV_INLINE @@ -1526,7 +1526,7 @@ dict_table_is_fts_column( the offset within the vector */ ib_vector_t* indexes,/* in: vector containing only FTS indexes */ ulint col_no) /* in: col number to search for */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /**********************************************************************//** Move a table to the non LRU end of the LRU list. */ UNIV_INTERN @@ -1534,7 +1534,7 @@ void dict_table_move_from_lru_to_non_lru( /*================================*/ dict_table_t* table) /*!< in: table to move from LRU to non-LRU */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /**********************************************************************//** Move a table to the LRU list from the non-LRU list. */ UNIV_INTERN @@ -1542,7 +1542,7 @@ void dict_table_move_from_non_lru_to_lru( /*================================*/ dict_table_t* table) /*!< in: table to move from non-LRU to LRU */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /**********************************************************************//** Move to the most recently used segment of the LRU list. */ UNIV_INTERN @@ -1550,7 +1550,7 @@ void dict_move_to_mru( /*=============*/ dict_table_t* table) /*!< in: table to move to MRU */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /** Maximum number of columns in a foreign key constraint. Please Note MySQL has a much lower limit on the number of columns allowed in a foreign key @@ -1674,7 +1674,7 @@ dict_table_schema_check( != DB_TABLE_NOT_FOUND is returned */ size_t errstr_sz) /*!< in: errstr size */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /* @} */ /*********************************************************************//** @@ -1692,7 +1692,7 @@ dict_fs2utf8( size_t db_utf8_size, /*!< in: dbname_utf8 size */ char* table_utf8, /*!< out: table name, e.g. aюbØc */ size_t table_utf8_size)/*!< in: table_utf8 size */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /**********************************************************************//** Closes the data dictionary module. */ @@ -1709,7 +1709,7 @@ ulint dict_table_is_corrupted( /*====================*/ const dict_table_t* table) /*!< in: table */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /**********************************************************************//** Check whether the index is corrupted. @@ -1719,7 +1719,7 @@ ulint dict_index_is_corrupted( /*====================*/ const dict_index_t* index) /*!< in: index */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); #endif /* !UNIV_HOTBACKUP */ /**********************************************************************//** @@ -1732,7 +1732,7 @@ dict_set_corrupted( dict_index_t* index, /*!< in/out: index */ trx_t* trx, /*!< in/out: transaction */ const char* ctx) /*!< in: context */ - UNIV_COLD __attribute__((nonnull)); + UNIV_COLD MY_ATTRIBUTE((nonnull)); /**********************************************************************//** Flags an index corrupted in the data dictionary cache only. This @@ -1744,7 +1744,7 @@ dict_set_corrupted_index_cache_only( /*================================*/ dict_index_t* index, /*!< in/out: index */ dict_table_t* table) /*!< in/out: table */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /**********************************************************************//** Flags a table with specified space_id corrupted in the table dictionary @@ -1764,7 +1764,7 @@ bool dict_tf_is_valid( /*=============*/ ulint flags) /*!< in: table flags */ - __attribute__((warn_unused_result)); + MY_ATTRIBUTE((warn_unused_result)); /********************************************************************//** Check if the tablespace for the table has been discarded. @@ -1774,7 +1774,7 @@ bool dict_table_is_discarded( /*====================*/ const dict_table_t* table) /*!< in: table to check */ - __attribute__((nonnull, pure, warn_unused_result)); + MY_ATTRIBUTE((nonnull, pure, warn_unused_result)); /********************************************************************//** Check if it is a temporary table. @@ -1784,7 +1784,7 @@ bool dict_table_is_temporary( /*====================*/ const dict_table_t* table) /*!< in: table to check */ - __attribute__((nonnull, pure, warn_unused_result)); + MY_ATTRIBUTE((nonnull, pure, warn_unused_result)); #ifndef UNIV_HOTBACKUP /*********************************************************************//** @@ -1795,7 +1795,7 @@ void dict_index_zip_success( /*===================*/ dict_index_t* index) /*!< in/out: index to be updated. */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*********************************************************************//** This function should be called whenever a page compression attempt fails. Updates the compression padding information. */ @@ -1804,7 +1804,7 @@ void dict_index_zip_failure( /*===================*/ dict_index_t* index) /*!< in/out: index to be updated. */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*********************************************************************//** Return the optimal page size, for which page will likely compress. @return page size beyond which page may not compress*/ @@ -1814,7 +1814,7 @@ dict_index_zip_pad_optimal_page_size( /*=================================*/ dict_index_t* index) /*!< in: index for which page size is requested */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*************************************************************//** Convert table flag to row format string. @return row format name */ diff --git a/mysql-wsrep-5.6/storage/innobase/include/dict0dict.ic b/mysql-wsrep-5.6/storage/innobase/include/dict0dict.ic index fac54d94..6fc6098f 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/dict0dict.ic +++ b/mysql-wsrep-5.6/storage/innobase/include/dict0dict.ic @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -80,7 +80,8 @@ dict_col_copy_type( const dict_col_t* col, /*!< in: column */ dtype_t* type) /*!< out: data type */ { - ut_ad(col && type); + ut_ad(col != NULL); + ut_ad(type != NULL); type->mtype = col->mtype; type->prtype = col->prtype; @@ -357,7 +358,7 @@ UNIV_INLINE ulint dict_table_get_n_sys_cols( /*======================*/ - const dict_table_t* table __attribute__((unused))) /*!< in: table */ + const dict_table_t* table MY_ATTRIBUTE((unused))) /*!< in: table */ { ut_ad(table); ut_ad(table->magic_n == DICT_TABLE_MAGIC_N); diff --git a/mysql-wsrep-5.6/storage/innobase/include/dict0load.h b/mysql-wsrep-5.6/storage/innobase/include/dict0load.h index 030190b1..dcbc3de8 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/dict0load.h +++ b/mysql-wsrep-5.6/storage/innobase/include/dict0load.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -243,7 +243,7 @@ dict_load_foreigns( bool check_charsets, /*!< in: whether to check charset compatibility */ dict_err_ignore_t ignore_err) /*!< in: error to be ignored */ - __attribute__((nonnull(1), warn_unused_result)); + MY_ATTRIBUTE((nonnull(1), warn_unused_result)); /********************************************************************//** Prints to the standard output information on all tables found in the data dictionary system table. */ diff --git a/mysql-wsrep-5.6/storage/innobase/include/dict0mem.h b/mysql-wsrep-5.6/storage/innobase/include/dict0mem.h index cec6e6d4..1dd7fda1 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/dict0mem.h +++ b/mysql-wsrep-5.6/storage/innobase/include/dict0mem.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. This program is free software; you can redistribute it and/or modify it under @@ -150,19 +150,19 @@ allows InnoDB to update_create_info() accordingly. */ /** Bit mask of the COMPACT field */ #define DICT_TF_MASK_COMPACT \ - ((~(~0 << DICT_TF_WIDTH_COMPACT)) \ + ((~(~0U << DICT_TF_WIDTH_COMPACT)) \ << DICT_TF_POS_COMPACT) /** Bit mask of the ZIP_SSIZE field */ #define DICT_TF_MASK_ZIP_SSIZE \ - ((~(~0 << DICT_TF_WIDTH_ZIP_SSIZE)) \ + ((~(~0U << DICT_TF_WIDTH_ZIP_SSIZE)) \ << DICT_TF_POS_ZIP_SSIZE) /** Bit mask of the ATOMIC_BLOBS field */ #define DICT_TF_MASK_ATOMIC_BLOBS \ - ((~(~0 << DICT_TF_WIDTH_ATOMIC_BLOBS)) \ + ((~(~0U << DICT_TF_WIDTH_ATOMIC_BLOBS)) \ << DICT_TF_POS_ATOMIC_BLOBS) /** Bit mask of the DATA_DIR field */ #define DICT_TF_MASK_DATA_DIR \ - ((~(~0 << DICT_TF_WIDTH_DATA_DIR)) \ + ((~(~0U << DICT_TF_WIDTH_DATA_DIR)) \ << DICT_TF_POS_DATA_DIR) /** Return the value of the COMPACT field */ @@ -196,7 +196,7 @@ for unknown bits in order to protect backward incompatibility. */ /* @{ */ /** Total number of bits in table->flags2. */ #define DICT_TF2_BITS 7 -#define DICT_TF2_BIT_MASK ~(~0 << DICT_TF2_BITS) +#define DICT_TF2_BIT_MASK ~(~0U << DICT_TF2_BITS) /** TEMPORARY; TRUE for tables from CREATE TEMPORARY TABLE. */ #define DICT_TF2_TEMPORARY 1 @@ -276,7 +276,7 @@ dict_mem_table_add_col( ulint mtype, /*!< in: main datatype */ ulint prtype, /*!< in: precise type */ ulint len) /*!< in: precision */ - __attribute__((nonnull(1))); + MY_ATTRIBUTE((nonnull(1))); /**********************************************************************//** Renames a column of a table in the data dictionary cache. */ UNIV_INTERN @@ -287,7 +287,7 @@ dict_mem_table_col_rename( unsigned nth_col,/*!< in: column index */ const char* from, /*!< in: old column name */ const char* to) /*!< in: new column name */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /**********************************************************************//** This function populates a dict_col_t memory structure with supplied information. */ diff --git a/mysql-wsrep-5.6/storage/innobase/include/dict0stats.h b/mysql-wsrep-5.6/storage/innobase/include/dict0stats.h index 186f90e3..35ee1a00 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/dict0stats.h +++ b/mysql-wsrep-5.6/storage/innobase/include/dict0stats.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2009, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2009, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -77,7 +77,7 @@ dict_stats_set_persistent( dict_table_t* table, /*!< in/out: table */ ibool ps_on, /*!< in: persistent stats explicitly enabled */ ibool ps_off) /*!< in: persistent stats explicitly disabled */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*********************************************************************//** Check whether persistent statistics is enabled for a given table. @@ -87,7 +87,7 @@ ibool dict_stats_is_persistent_enabled( /*=============================*/ const dict_table_t* table) /*!< in: table */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*********************************************************************//** Set the auto recalc flag for a given table (only honored for a persistent @@ -127,7 +127,7 @@ void dict_stats_deinit( /*==============*/ dict_table_t* table) /*!< in/out: table */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*********************************************************************//** Calculates new estimates for table and index statistics. The statistics @@ -179,7 +179,7 @@ void dict_stats_update_for_index( /*========================*/ dict_index_t* index) /*!< in/out: index */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*********************************************************************//** Renames a table in InnoDB persistent stats storage. diff --git a/mysql-wsrep-5.6/storage/innobase/include/dict0stats_bg.h b/mysql-wsrep-5.6/storage/innobase/include/dict0stats_bg.h index e866ab41..82cd2b46 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/dict0stats_bg.h +++ b/mysql-wsrep-5.6/storage/innobase/include/dict0stats_bg.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2012, 2013, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2012, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -74,7 +74,7 @@ bool dict_stats_stop_bg( /*===============*/ dict_table_t* table) /*!< in/out: table */ - __attribute__((warn_unused_result)); + MY_ATTRIBUTE((warn_unused_result)); /*****************************************************************//** Wait until background stats thread has stopped using the specified table. diff --git a/mysql-wsrep-5.6/storage/innobase/include/dyn0dyn.h b/mysql-wsrep-5.6/storage/innobase/include/dyn0dyn.h index 7f23302d..1bd10b6b 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/dyn0dyn.h +++ b/mysql-wsrep-5.6/storage/innobase/include/dyn0dyn.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -48,7 +48,7 @@ dyn_array_create( /*=============*/ dyn_array_t* arr) /*!< in/out memory buffer of size sizeof(dyn_array_t) */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /************************************************************//** Frees a dynamic array. */ UNIV_INLINE @@ -56,7 +56,7 @@ void dyn_array_free( /*===========*/ dyn_array_t* arr) /*!< in,own: dyn array */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*********************************************************************//** Makes room on top of a dyn array and returns a pointer to a buffer in it. After copying the elements, the caller must close the buffer using @@ -69,7 +69,7 @@ dyn_array_open( dyn_array_t* arr, /*!< in: dynamic array */ ulint size) /*!< in: size in bytes of the buffer; MUST be smaller than DYN_ARRAY_DATA_SIZE! */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*********************************************************************//** Closes the buffer returned by dyn_array_open. */ UNIV_INLINE @@ -78,7 +78,7 @@ dyn_array_close( /*============*/ dyn_array_t* arr, /*!< in: dynamic array */ const byte* ptr) /*!< in: end of used space */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*********************************************************************//** Makes room on top of a dyn array and returns a pointer to the added element. The caller must copy the element to @@ -90,7 +90,7 @@ dyn_array_push( /*===========*/ dyn_array_t* arr, /*!< in/out: dynamic array */ ulint size) /*!< in: size in bytes of the element */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /************************************************************//** Returns pointer to an element in dyn array. @return pointer to element */ @@ -101,7 +101,7 @@ dyn_array_get_element( const dyn_array_t* arr, /*!< in: dyn array */ ulint pos) /*!< in: position of element in bytes from array start */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /************************************************************//** Returns the size of stored data in a dyn array. @return data size in bytes */ @@ -110,7 +110,7 @@ ulint dyn_array_get_data_size( /*====================*/ const dyn_array_t* arr) /*!< in: dyn array */ - __attribute__((nonnull, warn_unused_result, pure)); + MY_ATTRIBUTE((nonnull, warn_unused_result, pure)); /************************************************************//** Gets the first block in a dyn array. @param arr dyn array @@ -144,7 +144,7 @@ ulint dyn_block_get_used( /*===============*/ const dyn_block_t* block) /*!< in: dyn array block */ - __attribute__((nonnull, warn_unused_result, pure)); + MY_ATTRIBUTE((nonnull, warn_unused_result, pure)); /********************************************************************//** Gets pointer to the start of data in a dyn array block. @return pointer to data */ @@ -153,7 +153,7 @@ byte* dyn_block_get_data( /*===============*/ const dyn_block_t* block) /*!< in: dyn array block */ - __attribute__((nonnull, warn_unused_result, pure)); + MY_ATTRIBUTE((nonnull, warn_unused_result, pure)); /********************************************************//** Pushes n bytes to a dyn array. */ UNIV_INLINE @@ -163,7 +163,7 @@ dyn_push_string( dyn_array_t* arr, /*!< in/out: dyn array */ const byte* str, /*!< in: string to write */ ulint len) /*!< in: string length */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*#################################################################*/ diff --git a/mysql-wsrep-5.6/storage/innobase/include/dyn0dyn.ic b/mysql-wsrep-5.6/storage/innobase/include/dyn0dyn.ic index 0296554e..f18f2e6d 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/dyn0dyn.ic +++ b/mysql-wsrep-5.6/storage/innobase/include/dyn0dyn.ic @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -36,7 +36,7 @@ dyn_block_t* dyn_array_add_block( /*================*/ dyn_array_t* arr) /*!< in/out: dyn array */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /********************************************************************//** Gets the number of used bytes in a dyn array block. diff --git a/mysql-wsrep-5.6/storage/innobase/include/fil0fil.h b/mysql-wsrep-5.6/storage/innobase/include/fil0fil.h index 43c91629..4d291384 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/fil0fil.h +++ b/mysql-wsrep-5.6/storage/innobase/include/fil0fil.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -233,7 +233,7 @@ fil_node_create( ulint id, /*!< in: space id where to append */ ibool is_raw) /*!< in: TRUE if a raw device or a raw disk partition */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); #ifdef UNIV_LOG_ARCHIVE /****************************************************************//** Drops files from the start of a file space, so that its size is cut by @@ -400,7 +400,7 @@ fil_read_first_page( lsn values in data files */ lsn_t* max_flushed_lsn) /*!< out: max of flushed lsn values in data files */ - __attribute__((warn_unused_result)); + MY_ATTRIBUTE((warn_unused_result)); /*******************************************************************//** Increments the count of pending operation, if space is not being deleted. @return TRUE if being deleted, and operation should be skipped */ @@ -488,7 +488,7 @@ dberr_t fil_discard_tablespace( /*===================*/ ulint id) /*!< in: space id */ - __attribute__((warn_unused_result)); + MY_ATTRIBUTE((warn_unused_result)); #endif /* !UNIV_HOTBACKUP */ /** Test if a tablespace file can be renamed to a new filepath by checking @@ -597,7 +597,7 @@ fil_create_new_single_table_tablespace( ulint size) /*!< in: the initial size of the tablespace file in pages, must be >= FIL_IBD_FILE_INITIAL_SIZE */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); #ifndef UNIV_HOTBACKUP /********************************************************************//** Tries to open a single-table tablespace and optionally checks the space id is @@ -631,7 +631,7 @@ fil_open_single_table_tablespace( const char* tablename, /*!< in: table name in the databasename/tablename format */ const char* filepath) /*!< in: tablespace filepath */ - __attribute__((nonnull(5), warn_unused_result)); + MY_ATTRIBUTE((nonnull(5), warn_unused_result)); #endif /* !UNIV_HOTBACKUP */ /********************************************************************//** @@ -780,7 +780,7 @@ fil_io( appropriately aligned */ void* message) /*!< in: message for aio handler if non-sync aio used, else ignored */ - __attribute__((nonnull(8))); + MY_ATTRIBUTE((nonnull(8))); /**********************************************************************//** Waits for an aio operation to complete. This function is used to write the handler for completed requests. The aio array of pending requests is divided @@ -975,7 +975,7 @@ fil_tablespace_iterate( dict_table_t* table, ulint n_io_buffers, PageCallback& callback) - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*******************************************************************//** Checks if a single-table tablespace for a given table name exists in the @@ -999,7 +999,7 @@ fil_get_space_names( /*================*/ space_name_list_t& space_name_list) /*!< in/out: Vector for collecting the names. */ - __attribute__((warn_unused_result)); + MY_ATTRIBUTE((warn_unused_result)); /** Generate redo log for swapping two .ibd files @param[in] old_table old table @@ -1014,7 +1014,7 @@ fil_mtr_rename_log( const dict_table_t* new_table, const char* tmp_name, mtr_t* mtr) - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*******************************************************************//** Finds the given page_no of the given space id from the double write buffer, diff --git a/mysql-wsrep-5.6/storage/innobase/include/fsp0fsp.h b/mysql-wsrep-5.6/storage/innobase/include/fsp0fsp.h index a587ccc9..099cb8ed 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/fsp0fsp.h +++ b/mysql-wsrep-5.6/storage/innobase/include/fsp0fsp.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -83,23 +83,23 @@ is found in a remote location, not the default data directory. */ /** Bit mask of the POST_ANTELOPE field */ #define FSP_FLAGS_MASK_POST_ANTELOPE \ - ((~(~0 << FSP_FLAGS_WIDTH_POST_ANTELOPE)) \ + ((~(~0U << FSP_FLAGS_WIDTH_POST_ANTELOPE)) \ << FSP_FLAGS_POS_POST_ANTELOPE) /** Bit mask of the ZIP_SSIZE field */ #define FSP_FLAGS_MASK_ZIP_SSIZE \ - ((~(~0 << FSP_FLAGS_WIDTH_ZIP_SSIZE)) \ + ((~(~0U << FSP_FLAGS_WIDTH_ZIP_SSIZE)) \ << FSP_FLAGS_POS_ZIP_SSIZE) /** Bit mask of the ATOMIC_BLOBS field */ #define FSP_FLAGS_MASK_ATOMIC_BLOBS \ - ((~(~0 << FSP_FLAGS_WIDTH_ATOMIC_BLOBS)) \ + ((~(~0U << FSP_FLAGS_WIDTH_ATOMIC_BLOBS)) \ << FSP_FLAGS_POS_ATOMIC_BLOBS) /** Bit mask of the PAGE_SSIZE field */ #define FSP_FLAGS_MASK_PAGE_SSIZE \ - ((~(~0 << FSP_FLAGS_WIDTH_PAGE_SSIZE)) \ + ((~(~0U << FSP_FLAGS_WIDTH_PAGE_SSIZE)) \ << FSP_FLAGS_POS_PAGE_SSIZE) /** Bit mask of the DATA_DIR field */ #define FSP_FLAGS_MASK_DATA_DIR \ - ((~(~0 << FSP_FLAGS_WIDTH_DATA_DIR)) \ + ((~(~0U << FSP_FLAGS_WIDTH_DATA_DIR)) \ << FSP_FLAGS_POS_DATA_DIR) /** Return the value of the POST_ANTELOPE field */ @@ -510,7 +510,7 @@ fseg_alloc_free_page_general( in which the page should be initialized. If init_mtr!=mtr, but the page is already latched in mtr, do not initialize the page. */ - __attribute__((warn_unused_result, nonnull)); + MY_ATTRIBUTE((warn_unused_result, nonnull)); /**********************************************************************//** Reserves free pages from a tablespace. All mini-transactions which may use several pages from the tablespace should call this function beforehand @@ -579,7 +579,7 @@ fseg_page_is_free( fseg_header_t* seg_header, /*!< in: segment header */ ulint space, /*!< in: space id */ ulint page) /*!< in: page offset */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /**********************************************************************//** Frees part of a segment. This function can be used to free a segment by repeatedly calling this function in different mini-transactions. @@ -675,7 +675,7 @@ bool fsp_flags_is_valid( /*===============*/ ulint flags) /*!< in: tablespace flags */ - __attribute__((warn_unused_result, const)); + MY_ATTRIBUTE((warn_unused_result, const)); /********************************************************************//** Determine if the tablespace is compressed from dict_table_t::flags. @return TRUE if compressed, FALSE if not compressed */ diff --git a/mysql-wsrep-5.6/storage/innobase/include/fts0ast.h b/mysql-wsrep-5.6/storage/innobase/include/fts0ast.h index b2380f78..50f62063 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/fts0ast.h +++ b/mysql-wsrep-5.6/storage/innobase/include/fts0ast.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2007, 2014, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2007, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -200,7 +200,7 @@ fts_ast_visit( and ignored processing an operator, currently we only ignore FTS_IGNORE operator */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*****************************************************************//** Process (nested) sub-expression, create a new result set to store the sub-expression result by processing nodes under current sub-expression @@ -213,7 +213,7 @@ fts_ast_visit_sub_exp( fts_ast_node_t* node, /*!< in: instance to traverse*/ fts_ast_callback visitor, /*!< in: callback */ void* arg) /*!< in: callback arg */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /******************************************************************** Create a lex instance.*/ UNIV_INTERN @@ -223,7 +223,7 @@ fts_lexer_create( ibool boolean_mode, /*!< in: query type */ const byte* query, /*!< in: query string */ ulint query_len) /*!< in: query string len */ - __attribute__((nonnull, malloc, warn_unused_result)); + MY_ATTRIBUTE((nonnull, malloc, warn_unused_result)); /******************************************************************** Free an fts_lexer_t instance.*/ UNIV_INTERN @@ -232,7 +232,7 @@ fts_lexer_free( /*===========*/ fts_lexer_t* fts_lexer) /*!< in: lexer instance to free */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /** Create an ast string object, with NUL-terminator, so the string diff --git a/mysql-wsrep-5.6/storage/innobase/include/fts0fts.h b/mysql-wsrep-5.6/storage/innobase/include/fts0fts.h index 9f7b0216..3e2f359b 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/fts0fts.h +++ b/mysql-wsrep-5.6/storage/innobase/include/fts0fts.h @@ -94,7 +94,10 @@ those defined in mysql file ft_global.h */ /** Threshold where our optimize thread automatically kicks in */ #define FTS_OPTIMIZE_THRESHOLD 10000000 -#define FTS_DOC_ID_MAX_STEP 10000 +/** Threshold to avoid exhausting of doc ids. Consecutive doc id difference +should not exceed FTS_DOC_ID_MAX_STEP */ +#define FTS_DOC_ID_MAX_STEP 65535 + /** Variable specifying the FTS parallel sort degree */ extern ulong fts_sort_pll_degree; @@ -372,6 +375,7 @@ extern bool fts_need_sync; /** Variable specifying the table that has Fulltext index to display its content through information schema table */ extern char* fts_internal_tbl_name; +extern char* fts_internal_tbl_name2; #define fts_que_graph_free(graph) \ do { \ @@ -408,7 +412,7 @@ fts_get_next_doc_id( /*================*/ const dict_table_t* table, /*!< in: table */ doc_id_t* doc_id) /*!< out: new document id */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*********************************************************************//** Update the next and last Doc ID in the CONFIG table to be the input "doc_id" value (+ 1). We would do so after each FTS index build or @@ -421,7 +425,7 @@ fts_update_next_doc_id( const dict_table_t* table, /*!< in: table */ const char* table_name, /*!< in: table name, or NULL */ doc_id_t doc_id) /*!< in: DOC ID to set */ - __attribute__((nonnull(2))); + MY_ATTRIBUTE((nonnull(2))); /******************************************************************//** Create a new document id . @@ -437,7 +441,7 @@ fts_create_doc_id( current row that is being inserted. */ mem_heap_t* heap) /*!< in: heap */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /******************************************************************//** Create a new fts_doc_ids_t. @return new fts_doc_ids_t. */ @@ -466,7 +470,7 @@ fts_trx_add_op( fts_row_state state, /*!< in: state of the row */ ib_vector_t* fts_indexes) /*!< in: FTS indexes affected (NULL=all) */ - __attribute__((nonnull(1,2))); + MY_ATTRIBUTE((nonnull(1,2))); /******************************************************************//** Free an FTS trx. */ @@ -491,7 +495,7 @@ fts_create_common_tables( index */ const char* name, /*!< in: table name */ bool skip_doc_id_index) /*!< in: Skip index on doc id */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /******************************************************************//** Wrapper function of fts_create_index_tables_low(), create auxiliary tables for an FTS index @@ -503,7 +507,7 @@ fts_create_index_tables( trx_t* trx, /*!< in: transaction handle */ const dict_index_t* index) /*!< in: the FTS index instance */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /******************************************************************//** Creates the column specific ancillary tables needed for supporting an FTS index on the given table. row_mysql_lock_data_dictionary must have @@ -519,7 +523,7 @@ fts_create_index_tables_low( instance */ const char* table_name, /*!< in: the table name */ table_id_t table_id) /*!< in: the table id */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /******************************************************************//** Add the FTS document id hidden column. */ UNIV_INTERN @@ -528,7 +532,7 @@ fts_add_doc_id_column( /*==================*/ dict_table_t* table, /*!< in/out: Table with FTS index */ mem_heap_t* heap) /*!< in: temporary memory heap, or NULL */ - __attribute__((nonnull(1))); + MY_ATTRIBUTE((nonnull(1))); /*********************************************************************//** Drops the ancillary tables needed for supporting an FTS index on the @@ -542,7 +546,7 @@ fts_drop_tables( trx_t* trx, /*!< in: transaction */ dict_table_t* table) /*!< in: table has the FTS index */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /******************************************************************//** The given transaction is about to be committed; do whatever is necessary from the FTS system's POV. @@ -552,7 +556,7 @@ dberr_t fts_commit( /*=======*/ trx_t* trx) /*!< in: transaction */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*******************************************************************//** FTS Query entry point. @@ -569,7 +573,7 @@ fts_query( in bytes */ fts_result_t** result) /*!< out: query result, to be freed by the caller.*/ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /******************************************************************//** Retrieve the FTS Relevance Ranking result for doc with doc_id @@ -687,7 +691,7 @@ dberr_t fts_optimize_table( /*===============*/ dict_table_t* table) /*!< in: table to optimiza */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /**********************************************************************//** Startup the optimize thread and create the work queue. */ @@ -713,7 +717,7 @@ fts_drop_index_tables( /*==================*/ trx_t* trx, /*!< in: transaction */ dict_index_t* index) /*!< in: Index to drop */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /******************************************************************//** Remove the table from the OPTIMIZER's list. We do wait for @@ -754,7 +758,7 @@ fts_savepoint_take( trx_t* trx, /*!< in: transaction */ fts_trx_t* fts_trx, /*!< in: fts transaction */ const char* name) /*!< in: savepoint name */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /**********************************************************************//** Refresh last statement savepoint. */ UNIV_INTERN @@ -762,7 +766,7 @@ void fts_savepoint_laststmt_refresh( /*===========================*/ trx_t* trx) /*!< in: transaction */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /**********************************************************************//** Release the savepoint data identified by name. */ UNIV_INTERN @@ -780,13 +784,12 @@ fts_cache_destroy( /*==============*/ fts_cache_t* cache); /*!< in: cache*/ -/*********************************************************************//** -Clear cache. */ +/** Clear cache. +@param[in,out] cache fts cache */ UNIV_INTERN void fts_cache_clear( -/*============*/ - fts_cache_t* cache); /*!< in: cache */ + fts_cache_t* cache); /*********************************************************************//** Initialize things in cache. */ @@ -821,6 +824,15 @@ void fts_drop_orphaned_tables(void); /*==========================*/ +/* Get parent table name if it's a fts aux table +@param[in] aux_table_name aux table name +@param[in] aux_table_len aux table length +@return parent table name, or NULL */ +char* +fts_get_parent_table_name( + const char* aux_table_name, + ulint aux_table_len); + /******************************************************************//** Since we do a horizontal split on the index table, we need to drop all the split tables. @@ -831,20 +843,22 @@ fts_drop_index_split_tables( /*========================*/ trx_t* trx, /*!< in: transaction */ dict_index_t* index) /*!< in: fts instance */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /** Run SYNC on the table, i.e., write out data from the cache to the FTS auxiliary INDEX table and clear the cache at the end. @param[in,out] table fts table @param[in] unlock_cache whether unlock cache when write node @param[in] wait whether wait for existing sync to finish +@param[in] has_dict whether has dict operation lock @return DB_SUCCESS on success, error code on failure. */ UNIV_INTERN dberr_t fts_sync_table( dict_table_t* table, bool unlock_cache, - bool wait); + bool wait, + bool has_dict); /****************************************************************//** Free the query graph but check whether dict_sys->mutex is already @@ -1023,7 +1037,7 @@ fts_drop_index( dict_table_t* table, /*!< in: Table where indexes are dropped */ dict_index_t* index, /*!< in: Index to be dropped */ trx_t* trx) /*!< in: Transaction for the drop */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /****************************************************************//** Rename auxiliary tables for all fts index for a table diff --git a/mysql-wsrep-5.6/storage/innobase/include/fts0priv.h b/mysql-wsrep-5.6/storage/innobase/include/fts0priv.h index b4d9e1d4..2d4e9d88 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/fts0priv.h +++ b/mysql-wsrep-5.6/storage/innobase/include/fts0priv.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2011, 2013, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2011, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -121,7 +121,7 @@ fts_parse_sql( fts_table_t* fts_table, /*!< in: FTS aux table */ pars_info_t* info, /*!< in: info struct, or NULL */ const char* sql) /*!< in: SQL string to evaluate */ - __attribute__((nonnull(3), malloc, warn_unused_result)); + MY_ATTRIBUTE((nonnull(3), malloc, warn_unused_result)); /******************************************************************//** Evaluate a parsed SQL statement @return DB_SUCCESS or error code */ @@ -131,7 +131,7 @@ fts_eval_sql( /*=========*/ trx_t* trx, /*!< in: transaction */ que_t* graph) /*!< in: Parsed statement */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /******************************************************************//** Construct the name of an ancillary FTS table for the given table. @return own: table name, must be freed with mem_free() */ @@ -141,7 +141,7 @@ fts_get_table_name( /*===============*/ const fts_table_t* fts_table) /*!< in: FTS aux table info */ - __attribute__((nonnull, malloc, warn_unused_result)); + MY_ATTRIBUTE((nonnull, malloc, warn_unused_result)); /******************************************************************//** Construct the column specification part of the SQL string for selecting the indexed FTS columns for the given table. Adds the necessary bound @@ -164,7 +164,7 @@ fts_get_select_columns_str( dict_index_t* index, /*!< in: FTS index */ pars_info_t* info, /*!< in/out: parser info */ mem_heap_t* heap) /*!< in: memory heap */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /** define for fts_doc_fetch_by_doc_id() "option" value, defines whether we want to get Doc whose ID is equal to or greater or smaller than supplied @@ -191,7 +191,7 @@ fts_doc_fetch_by_doc_id( callback, /*!< in: callback to read records */ void* arg) /*!< in: callback arg */ - __attribute__((nonnull(6))); + MY_ATTRIBUTE((nonnull(6))); /*******************************************************************//** Callback function for fetch that stores the text of an FTS document, @@ -203,7 +203,7 @@ fts_query_expansion_fetch_doc( /*==========================*/ void* row, /*!< in: sel_node_t* */ void* user_arg) /*!< in: fts_doc_t* */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /******************************************************************** Write out a single word's data as new entry/entries in the INDEX table. @return DB_SUCCESS if all OK. */ @@ -216,7 +216,7 @@ fts_write_node( fts_table_t* fts_table, /*!< in: the FTS aux index */ fts_string_t* word, /*!< in: word in UTF-8 */ fts_node_t* node) /*!< in: node columns */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*******************************************************************//** Tokenize a document. */ UNIV_INTERN @@ -227,7 +227,7 @@ fts_tokenize_document( tokenize */ fts_doc_t* result) /*!< out: if provided, save result tokens here */ - __attribute__((nonnull(1))); + MY_ATTRIBUTE((nonnull(1))); /*******************************************************************//** Continue to tokenize a document. */ @@ -241,7 +241,7 @@ fts_tokenize_document_next( tokens from this tokenization */ fts_doc_t* result) /*!< out: if provided, save result tokens here */ - __attribute__((nonnull(1))); + MY_ATTRIBUTE((nonnull(1))); /******************************************************************//** Initialize a document. */ UNIV_INTERN @@ -249,7 +249,7 @@ void fts_doc_init( /*=========*/ fts_doc_t* doc) /*!< in: doc to initialize */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /******************************************************************//** Do a binary search for a doc id in the array @@ -263,7 +263,7 @@ fts_bsearch( int lower, /*!< in: lower bound of array*/ int upper, /*!< in: upper bound of array*/ doc_id_t doc_id) /*!< in: doc id to lookup */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /******************************************************************//** Free document. */ UNIV_INTERN @@ -271,7 +271,7 @@ void fts_doc_free( /*=========*/ fts_doc_t* doc) /*!< in: document */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /******************************************************************//** Free fts_optimizer_word_t instanace.*/ UNIV_INTERN @@ -279,7 +279,7 @@ void fts_word_free( /*==========*/ fts_word_t* word) /*!< in: instance to free.*/ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /******************************************************************//** Read the rows from the FTS inde @return DB_SUCCESS or error code */ @@ -293,7 +293,7 @@ fts_index_fetch_nodes( const fts_string_t* word, /*!< in: the word to fetch */ fts_fetch_t* fetch) /*!< in: fetch callback.*/ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /******************************************************************//** Create a fts_optimizer_word_t instance. @return new instance */ @@ -304,7 +304,7 @@ fts_word_init( fts_word_t* word, /*!< in: word to initialize */ byte* utf8, /*!< in: UTF-8 string */ ulint len) /*!< in: length of string in bytes */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /******************************************************************//** Compare two fts_trx_table_t instances, we actually compare the table id's here. @@ -315,7 +315,7 @@ fts_trx_table_cmp( /*==============*/ const void* v1, /*!< in: id1 */ const void* v2) /*!< in: id2 */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /******************************************************************//** Compare a table id with a trx_table_t table id. @return < 0 if n1 < n2, 0 if n1 == n2, > 0 if n1 > n2 */ @@ -325,7 +325,7 @@ fts_trx_table_id_cmp( /*=================*/ const void* p1, /*!< in: id1 */ const void* p2) /*!< in: id2 */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /******************************************************************//** Commit a transaction. @return DB_SUCCESS if all OK */ @@ -334,7 +334,7 @@ dberr_t fts_sql_commit( /*===========*/ trx_t* trx) /*!< in: transaction */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /******************************************************************//** Rollback a transaction. @return DB_SUCCESS if all OK */ @@ -343,7 +343,7 @@ dberr_t fts_sql_rollback( /*=============*/ trx_t* trx) /*!< in: transaction */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /******************************************************************//** Parse an SQL string. %s is replaced with the table's id. Don't acquire the dict mutex @@ -355,7 +355,7 @@ fts_parse_sql_no_dict_lock( fts_table_t* fts_table, /*!< in: table with FTS index */ pars_info_t* info, /*!< in: parser info */ const char* sql) /*!< in: SQL string to evaluate */ - __attribute__((nonnull(3), malloc, warn_unused_result)); + MY_ATTRIBUTE((nonnull(3), malloc, warn_unused_result)); /******************************************************************//** Get value from config table. The caller must ensure that enough space is allocated for value to hold the column contents @@ -370,7 +370,7 @@ fts_config_get_value( this parameter name */ fts_string_t* value) /*!< out: value read from config table */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /******************************************************************//** Get value specific to an FTS index from the config table. The caller must ensure that enough space is allocated for value to hold the @@ -386,7 +386,7 @@ fts_config_get_index_value( this parameter name */ fts_string_t* value) /*!< out: value read from config table */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /******************************************************************//** Set the value in the config table for name. @return DB_SUCCESS or error code */ @@ -400,7 +400,7 @@ fts_config_set_value( this parameter name */ const fts_string_t* value) /*!< in: value to update */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /****************************************************************//** Set an ulint value in the config table. @return DB_SUCCESS if all OK else error code */ @@ -412,7 +412,7 @@ fts_config_set_ulint( fts_table_t* fts_table, /*!< in: the indexed FTS table */ const char* name, /*!< in: param name */ ulint int_value) /*!< in: value */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /******************************************************************//** Set the value specific to an FTS index in the config table. @return DB_SUCCESS or error code */ @@ -426,7 +426,7 @@ fts_config_set_index_value( this parameter name */ fts_string_t* value) /*!< out: value read from config table */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /******************************************************************//** Increment the value in the config table for column name. @return DB_SUCCESS or error code */ @@ -439,7 +439,7 @@ fts_config_increment_value( const char* name, /*!< in: increment config value for this parameter name */ ulint delta) /*!< in: increment by this much */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /******************************************************************//** Increment the per index value in the config table for column name. @return DB_SUCCESS or error code */ @@ -452,7 +452,7 @@ fts_config_increment_index_value( const char* name, /*!< in: increment config value for this parameter name */ ulint delta) /*!< in: increment by this much */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /******************************************************************//** Get an ulint value from the config table. @return DB_SUCCESS or error code */ @@ -464,7 +464,7 @@ fts_config_get_index_ulint( dict_index_t* index, /*!< in: FTS index */ const char* name, /*!< in: param name */ ulint* int_value) /*!< out: value */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /******************************************************************//** Set an ulint value int the config table. @return DB_SUCCESS or error code */ @@ -476,7 +476,7 @@ fts_config_set_index_ulint( dict_index_t* index, /*!< in: FTS index */ const char* name, /*!< in: param name */ ulint int_value) /*!< in: value */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /******************************************************************//** Get an ulint value from the config table. @return DB_SUCCESS or error code */ @@ -488,7 +488,7 @@ fts_config_get_ulint( fts_table_t* fts_table, /*!< in: the indexed FTS table */ const char* name, /*!< in: param name */ ulint* int_value) /*!< out: value */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /******************************************************************//** Search cache for word. @return the word node vector if found else NULL */ @@ -500,7 +500,7 @@ fts_cache_find_word( index_cache, /*!< in: cache to search */ const fts_string_t* text) /*!< in: word to search for */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /******************************************************************//** Check cache for deleted doc id. @return TRUE if deleted */ @@ -511,7 +511,7 @@ fts_cache_is_deleted_doc_id( const fts_cache_t* cache, /*!< in: cache ito search */ doc_id_t doc_id) /*!< in: doc id to search for */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /******************************************************************//** Append deleted doc ids to vector and sort the vector. */ UNIV_INTERN @@ -546,7 +546,7 @@ fts_get_total_word_count( trx_t* trx, /*!< in: transaction */ dict_index_t* index, /*!< in: for this index */ ulint* total) /*!< out: total words */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); #endif /******************************************************************//** Search the index specific cache for a particular FTS index. @@ -559,7 +559,7 @@ fts_find_index_cache( cache, /*!< in: cache to search */ const dict_index_t* index) /*!< in: index to search for */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /******************************************************************//** Write the table id to the given buffer (including final NUL). Buffer must be at least FTS_AUX_MIN_TABLE_ID_LENGTH bytes long. @@ -570,10 +570,10 @@ fts_write_object_id( /*================*/ ib_id_t id, /*!< in: a table/index id */ char* str, /*!< in: buffer to write the id to */ - bool hex_format __attribute__((unused))) + bool hex_format MY_ATTRIBUTE((unused))) /*!< in: true for fixed hex format, false for old ambiguous format */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /******************************************************************//** Read the table id from the string generated by fts_write_object_id(). @return TRUE if parse successful */ @@ -583,7 +583,7 @@ fts_read_object_id( /*===============*/ ib_id_t* id, /*!< out: a table id */ const char* str) /*!< in: buffer to read from */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /******************************************************************//** Get the table id. @return number of bytes written */ @@ -596,7 +596,7 @@ fts_get_table_id( char* table_id) /*!< out: table id, must be at least FTS_AUX_MIN_TABLE_ID_LENGTH bytes long */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /******************************************************************//** Add the table to add to the OPTIMIZER's list. */ UNIV_INTERN @@ -604,7 +604,7 @@ void fts_optimize_add_table( /*===================*/ dict_table_t* table) /*!< in: table to add */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /******************************************************************//** Optimize a table. */ UNIV_INTERN @@ -612,7 +612,7 @@ void fts_optimize_do_table( /*==================*/ dict_table_t* table) /*!< in: table to optimize */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /******************************************************************//** Construct the prefix name of an FTS table. @return own: table name, must be freed with mem_free() */ @@ -622,7 +622,7 @@ fts_get_table_name_prefix( /*======================*/ const fts_table_t* fts_table) /*!< in: Auxiliary table type */ - __attribute__((nonnull, malloc, warn_unused_result)); + MY_ATTRIBUTE((nonnull, malloc, warn_unused_result)); /******************************************************************//** Add node positions. */ UNIV_INTERN @@ -633,7 +633,7 @@ fts_cache_node_add_positions( fts_node_t* node, /*!< in: word node */ doc_id_t doc_id, /*!< in: doc id */ ib_vector_t* positions) /*!< in: fts_token_t::positions */ - __attribute__((nonnull(2,4))); + MY_ATTRIBUTE((nonnull(2,4))); /******************************************************************//** Create the config table name for retrieving index specific value. @@ -644,7 +644,7 @@ fts_config_create_index_param_name( /*===============================*/ const char* param, /*!< in: base name of param */ const dict_index_t* index) /*!< in: index for config */ - __attribute__((nonnull, malloc, warn_unused_result)); + MY_ATTRIBUTE((nonnull, malloc, warn_unused_result)); #ifndef UNIV_NONINL #include "fts0priv.ic" diff --git a/mysql-wsrep-5.6/storage/innobase/include/fts0priv.ic b/mysql-wsrep-5.6/storage/innobase/include/fts0priv.ic index 2d07c60f..88f2d67c 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/fts0priv.ic +++ b/mysql-wsrep-5.6/storage/innobase/include/fts0priv.ic @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2011, 2013, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2011, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -33,7 +33,7 @@ fts_write_object_id( /*================*/ ib_id_t id, /* in: a table/index id */ char* str, /* in: buffer to write the id to */ - bool hex_format __attribute__((unused))) + bool hex_format MY_ATTRIBUTE((unused))) /* in: true for fixed hex format, false for old ambiguous format */ { @@ -53,7 +53,7 @@ fts_write_object_id( /* Use this to construct old(5.6.14 and 5.7.3) windows ambiguous aux table names */ DBUG_EXECUTE_IF("innodb_test_wrong_windows_fts_aux_table_name", - return(sprintf(str, "%016"PRIu64, id));); + return(sprintf(str, "%016" PRIu64, id));); DBUG_EXECUTE_IF("innodb_test_wrong_fts_aux_table_name", return(sprintf(str, UINT64PFx, id));); @@ -66,7 +66,7 @@ fts_write_object_id( // FIXME: Use ut_snprintf(), so does following one. return(sprintf(str, "%016llu", id)); #else /* _WIN32 */ - return(sprintf(str, "%016"PRIu64, id)); + return(sprintf(str, "%016" PRIu64, id)); #endif /* _WIN32 */ } diff --git a/mysql-wsrep-5.6/storage/innobase/include/ha_prototypes.h b/mysql-wsrep-5.6/storage/innobase/include/ha_prototypes.h index ee5786d9..028372f4 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/ha_prototypes.h +++ b/mysql-wsrep-5.6/storage/innobase/include/ha_prototypes.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2006, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2006, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -135,7 +135,7 @@ enum durability_properties thd_requested_durability( /*=====================*/ const THD* thd) /*!< in: thread handle */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /******************************************************************//** Returns true if the transaction this thread is processing has edited @@ -176,7 +176,7 @@ innobase_mysql_cmp( const unsigned char* b, /*!< in: data field */ unsigned int b_length) /*!< in: data field length, not UNIV_SQL_NULL */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /**************************************************************//** Converts a MySQL type to an InnoDB type. Note that this function returns the 'mtype' of InnoDB. InnoDB differentiates between MySQL's old <= 4.1 @@ -192,7 +192,7 @@ get_innobase_type_from_mysql_type( and unsigned integer types are 'unsigned types' */ const void* field) /*!< in: MySQL Field */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /******************************************************************//** Get the variable length bounds of the given character set. */ @@ -307,7 +307,7 @@ innobase_get_stmt( /*==============*/ THD* thd, /*!< in: MySQL thread handle */ size_t* length) /*!< out: length of the SQL statement */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /******************************************************************//** This function is used to find the storage length in bytes of the first n characters for prefix indexes using a multibyte character set. The function @@ -333,7 +333,7 @@ enum icp_result innobase_index_cond( /*================*/ void* file) /*!< in/out: pointer to ha_innobase */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /******************************************************************//** Returns true if the thread supports XA, global value of innodb_supports_xa if thd is NULL. @@ -469,7 +469,7 @@ innobase_format_name( const char* name, /*!< in: index or table name to format */ ibool is_index_name) /*!< in: index name */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /** Corresponds to Sql_condition:enum_warning_level. */ enum ib_log_level_t { @@ -499,7 +499,7 @@ ib_errf( ib_uint32_t code, /*!< MySQL error code */ const char* format, /*!< printf format */ ...) /*!< Args */ - __attribute__((format(printf, 4, 5))); + MY_ATTRIBUTE((format(printf, 4, 5))); /******************************************************************//** Use this when the args are passed to the format string from @@ -530,7 +530,7 @@ ib_logf( ib_log_level_t level, /*!< in: warning level */ const char* format, /*!< printf format */ ...) /*!< Args */ - __attribute__((format(printf, 2, 3))); + MY_ATTRIBUTE((format(printf, 2, 3))); /******************************************************************//** Returns the NUL terminated value of glob_hostname. @@ -576,7 +576,7 @@ innobase_next_autoinc( ulonglong step, /*!< in: AUTOINC increment step */ ulonglong offset, /*!< in: AUTOINC offset */ ulonglong max_value) /*!< in: max value for type */ - __attribute__((pure, warn_unused_result)); + MY_ATTRIBUTE((pure, warn_unused_result)); /********************************************************************//** Get the upper limit of the MySQL integral and floating-point type. @@ -586,7 +586,7 @@ ulonglong innobase_get_int_col_max_value( /*===========================*/ const Field* field) /*!< in: MySQL field */ - __attribute__((nonnull, pure, warn_unused_result)); + MY_ATTRIBUTE((nonnull, pure, warn_unused_result)); /********************************************************************** Check if the length of the identifier exceeds the maximum allowed. diff --git a/mysql-wsrep-5.6/storage/innobase/include/handler0alter.h b/mysql-wsrep-5.6/storage/innobase/include/handler0alter.h index 66b963ae..3dd6c99e 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/handler0alter.h +++ b/mysql-wsrep-5.6/storage/innobase/include/handler0alter.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2005, 2013, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2005, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -32,7 +32,7 @@ innobase_rec_to_mysql( const dict_index_t* index, /*!< in: index */ const ulint* offsets)/*!< in: rec_get_offsets( rec, index, ...) */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*************************************************************//** Copies an InnoDB index entry to table->record[0]. */ @@ -43,7 +43,7 @@ innobase_fields_to_mysql( struct TABLE* table, /*!< in/out: MySQL table */ const dict_index_t* index, /*!< in: InnoDB index */ const dfield_t* fields) /*!< in: InnoDB index fields */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*************************************************************//** Copies an InnoDB row to table->record[0]. */ @@ -54,7 +54,7 @@ innobase_row_to_mysql( struct TABLE* table, /*!< in/out: MySQL table */ const dict_table_t* itab, /*!< in: InnoDB table */ const dtuple_t* row) /*!< in: InnoDB row */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*************************************************************//** Resets table->record[0]. */ @@ -63,7 +63,7 @@ void innobase_rec_reset( /*===============*/ struct TABLE* table) /*!< in/out: MySQL table */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /** Generate the next autoinc based on a snapshot of the session auto_increment_increment and auto_increment_offset variables. */ diff --git a/mysql-wsrep-5.6/storage/innobase/include/ibuf0ibuf.h b/mysql-wsrep-5.6/storage/innobase/include/ibuf0ibuf.h index 9c3b686c..3ee16f57 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/ibuf0ibuf.h +++ b/mysql-wsrep-5.6/storage/innobase/include/ibuf0ibuf.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1997, 2013, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -118,7 +118,7 @@ void ibuf_mtr_start( /*===========*/ mtr_t* mtr) /*!< out: mini-transaction */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /***************************************************************//** Commits an insert buffer mini-transaction. */ UNIV_INLINE @@ -126,7 +126,7 @@ void ibuf_mtr_commit( /*============*/ mtr_t* mtr) /*!< in/out: mini-transaction */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*********************************************************************//** Initializes an ibuf bitmap page. */ UNIV_INTERN @@ -252,7 +252,7 @@ ibool ibuf_inside( /*========*/ const mtr_t* mtr) /*!< in: mini-transaction */ - __attribute__((nonnull, pure)); + MY_ATTRIBUTE((nonnull, pure)); /***********************************************************************//** Checks if a page address is an ibuf bitmap page (level 3 page) address. @return TRUE if a bitmap page */ @@ -285,7 +285,7 @@ ibuf_page_low( is not one of the fixed address ibuf pages, or NULL, in which case a new transaction is created. */ - __attribute__((warn_unused_result)); + MY_ATTRIBUTE((warn_unused_result)); #ifdef UNIV_DEBUG /** Checks if a page is a level 2 or 3 page in the ibuf hierarchy of pages. Must not be called when recv_no_ibuf_operations==TRUE. @@ -364,23 +364,31 @@ void ibuf_delete_for_discarded_space( /*============================*/ ulint space); /*!< in: space id */ -/*********************************************************************//** -Contracts insert buffer trees by reading pages to the buffer pool. +/** Contract the change buffer by reading pages to the buffer pool. +@param[in] full If true, do a full contraction based +on PCT_IO(100). If false, the size of contract batch is determined +based on the current size of the change buffer. @return a lower limit for the combined size in bytes of entries which will be merged from ibuf trees to the pages read, 0 if ibuf is empty */ UNIV_INTERN ulint -ibuf_contract_in_background( -/*========================*/ - table_id_t table_id, /*!< in: if merge should be done only - for a specific table, for all tables - this should be 0 */ - ibool full); /*!< in: TRUE if the caller wants to - do a full contract based on PCT_IO(100). - If FALSE then the size of contract - batch is determined based on the - current size of the ibuf tree. */ +ibuf_merge_in_background( + bool full); /*!< in: TRUE if the caller wants to + do a full contract based on PCT_IO(100). + If FALSE then the size of contract + batch is determined based on the + current size of the ibuf tree. */ + +/** Contracts insert buffer trees by reading pages referring to space_id +to the buffer pool. +@returns number of pages merged.*/ +UNIV_INTERN +ulint +ibuf_merge_space( +/*=============*/ + ulint space); /*!< in: space id */ + #endif /* !UNIV_HOTBACKUP */ /*********************************************************************//** Parses a redo log record of an ibuf bitmap page init. @@ -445,7 +453,7 @@ ibuf_check_bitmap_on_import( /*========================*/ const trx_t* trx, /*!< in: transaction */ ulint space_id) /*!< in: tablespace identifier */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); #define IBUF_HEADER_PAGE_NO FSP_IBUF_HEADER_PAGE_NO #define IBUF_TREE_ROOT_PAGE_NO FSP_IBUF_TREE_ROOT_PAGE_NO diff --git a/mysql-wsrep-5.6/storage/innobase/include/lock0lock.h b/mysql-wsrep-5.6/storage/innobase/include/lock0lock.h index 385853bd..35474277 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/lock0lock.h +++ b/mysql-wsrep-5.6/storage/innobase/include/lock0lock.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2014, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -266,7 +266,7 @@ lock_rec_expl_exist_on_page( /*========================*/ ulint space, /*!< in: space id */ ulint page_no)/*!< in: page number */ - __attribute__((warn_unused_result)); + MY_ATTRIBUTE((warn_unused_result)); /*********************************************************************//** Checks if locks of other transactions prevent an immediate insert of a record. If they do, first tests if the query thread should anyway @@ -289,7 +289,7 @@ lock_rec_insert_check_and_lock( inserted record maybe should inherit LOCK_GAP type locks from the successor record */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*********************************************************************//** Checks if locks of other transactions prevent an immediate modify (update, delete mark, or delete unmark) of a clustered index record. If they do, @@ -310,7 +310,7 @@ lock_clust_rec_modify_check_and_lock( dict_index_t* index, /*!< in: clustered index */ const ulint* offsets,/*!< in: rec_get_offsets(rec, index) */ que_thr_t* thr) /*!< in: query thread */ - __attribute__((warn_unused_result, nonnull)); + MY_ATTRIBUTE((warn_unused_result, nonnull)); /*********************************************************************//** Checks if locks of other transactions prevent an immediate modify (delete mark or delete unmark) of a secondary index record. @@ -331,7 +331,7 @@ lock_sec_rec_modify_check_and_lock( que_thr_t* thr, /*!< in: query thread (can be NULL if BTR_NO_LOCKING_FLAG) */ mtr_t* mtr) /*!< in/out: mini-transaction */ - __attribute__((warn_unused_result, nonnull(2,3,4,6))); + MY_ATTRIBUTE((warn_unused_result, nonnull(2,3,4,6))); /*********************************************************************//** Like lock_clust_rec_read_check_and_lock(), but reads a secondary index record. @@ -418,7 +418,7 @@ lock_clust_rec_read_check_and_lock_alt( ulint gap_mode,/*!< in: LOCK_ORDINARY, LOCK_GAP, or LOCK_REC_NOT_GAP */ que_thr_t* thr) /*!< in: query thread */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*********************************************************************//** Checks that a record is seen in a consistent read. @return true if sees, or false if an earlier version of the record @@ -450,7 +450,7 @@ lock_sec_rec_cons_read_sees( should be read or passed over by a read cursor */ const read_view_t* view) /*!< in: consistent read view */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*********************************************************************//** Locks the specified database table in the mode given. If the lock cannot be granted immediately, the query thread is put to wait. @@ -465,7 +465,7 @@ lock_table( in dictionary cache */ enum lock_mode mode, /*!< in: lock mode */ que_thr_t* thr) /*!< in: query thread */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*********************************************************************//** Creates a table IX lock object for a resurrected transaction. */ UNIV_INTERN @@ -520,7 +520,7 @@ lock_rec_fold( /*==========*/ ulint space, /*!< in: space */ ulint page_no)/*!< in: page number */ - __attribute__((const)); + MY_ATTRIBUTE((const)); /*********************************************************************//** Calculates the hash value of a page file address: used in inserting or searching for a lock in the hash table. @@ -570,7 +570,7 @@ lock_is_table_exclusive( /*====================*/ const dict_table_t* table, /*!< in: table */ const trx_t* trx) /*!< in: transaction */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*********************************************************************//** Checks if a lock request lock1 has to wait for request lock2. @return TRUE if lock1 has to wait for lock2 to be removed */ @@ -594,7 +594,7 @@ lock_report_trx_id_insanity( dict_index_t* index, /*!< in: index */ const ulint* offsets, /*!< in: rec_get_offsets(rec, index) */ trx_id_t max_trx_id) /*!< in: trx_sys_get_max_trx_id() */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*********************************************************************//** Prints info of a table lock. */ UNIV_INTERN @@ -621,7 +621,7 @@ lock_print_info_summary( /*====================*/ FILE* file, /*!< in: file where to print */ ibool nowait) /*!< in: whether to wait for the lock mutex */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*********************************************************************//** Prints info of locks for each transaction. This function assumes that the caller holds the lock mutex and more importantly it will release the lock @@ -641,7 +641,7 @@ ulint lock_number_of_rows_locked( /*=======================*/ const trx_lock_t* trx_lock) /*!< in: transaction locks */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*******************************************************************//** Gets the type of a lock. Non-inline version for using outside of the @@ -799,7 +799,7 @@ dberr_t lock_trx_handle_wait( /*=================*/ trx_t* trx) /*!< in/out: trx lock state */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*********************************************************************//** Get the number of locks on a table. @return number of locks */ @@ -808,7 +808,7 @@ ulint lock_table_get_n_locks( /*===================*/ const dict_table_t* table) /*!< in: table */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); #ifdef UNIV_DEBUG /*********************************************************************//** Checks that a transaction id is sensible, i.e., not in the future. @@ -821,7 +821,7 @@ lock_check_trx_id_sanity( const rec_t* rec, /*!< in: user record */ dict_index_t* index, /*!< in: index */ const ulint* offsets) /*!< in: rec_get_offsets(rec, index) */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*******************************************************************//** Check if the transaction holds any locks on the sys tables or its records. @@ -831,7 +831,7 @@ const lock_t* lock_trx_has_sys_table_locks( /*=========================*/ const trx_t* trx) /*!< in: transaction to check */ - __attribute__((warn_unused_result)); + MY_ATTRIBUTE((warn_unused_result)); /*******************************************************************//** Check if the transaction holds an exclusive lock on a record. @@ -844,7 +844,7 @@ lock_trx_has_rec_x_lock( const dict_table_t* table, /*!< in: table to check */ const buf_block_t* block, /*!< in: buffer block of the record */ ulint heap_no)/*!< in: record heap number */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); #endif /* UNIV_DEBUG */ /** Lock modes and types */ diff --git a/mysql-wsrep-5.6/storage/innobase/include/lock0priv.h b/mysql-wsrep-5.6/storage/innobase/include/lock0priv.h index 9f7ab9f7..2d958483 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/lock0priv.h +++ b/mysql-wsrep-5.6/storage/innobase/include/lock0priv.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2007, 2011, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2007, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -117,7 +117,7 @@ lock_clust_rec_some_has_impl( const rec_t* rec, /*!< in: user record */ const dict_index_t* index, /*!< in: clustered index */ const ulint* offsets)/*!< in: rec_get_offsets(rec, index) */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); #ifndef UNIV_NONINL #include "lock0priv.ic" diff --git a/mysql-wsrep-5.6/storage/innobase/include/log0recv.h b/mysql-wsrep-5.6/storage/innobase/include/log0recv.h index 8ede49d4..f4c7b4ed 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/log0recv.h +++ b/mysql-wsrep-5.6/storage/innobase/include/log0recv.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1997, 2014, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -51,7 +51,7 @@ recv_read_checkpoint_info_for_backup( lsn_t* first_header_lsn) /*!< out: lsn of of the start of the first log file */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*******************************************************************//** Scans the log segment and n_bytes_scanned is set to the length of valid log scanned. */ diff --git a/mysql-wsrep-5.6/storage/innobase/include/mach0data.h b/mysql-wsrep-5.6/storage/innobase/include/mach0data.h index d0087f56..9859def0 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/mach0data.h +++ b/mysql-wsrep-5.6/storage/innobase/include/mach0data.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2009, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -53,7 +53,7 @@ ulint mach_read_from_1( /*=============*/ const byte* b) /*!< in: pointer to byte */ - __attribute__((nonnull, pure)); + MY_ATTRIBUTE((nonnull, pure)); /*******************************************************//** The following function is used to store data in two consecutive bytes. We store the most significant byte to the lower address. */ @@ -72,7 +72,7 @@ ulint mach_read_from_2( /*=============*/ const byte* b) /*!< in: pointer to two bytes */ - __attribute__((nonnull, pure)); + MY_ATTRIBUTE((nonnull, pure)); /********************************************************//** The following function is used to convert a 16-bit data item @@ -84,7 +84,7 @@ uint16 mach_encode_2( /*==========*/ ulint n) /*!< in: integer in machine-dependent format */ - __attribute__((const)); + MY_ATTRIBUTE((const)); /********************************************************//** The following function is used to convert a 16-bit data item from the canonical format, for fast bytewise equality test @@ -95,7 +95,7 @@ ulint mach_decode_2( /*==========*/ uint16 n) /*!< in: 16-bit integer in canonical format */ - __attribute__((const)); + MY_ATTRIBUTE((const)); /*******************************************************//** The following function is used to store data in 3 consecutive bytes. We store the most significant byte to the lowest address. */ @@ -114,7 +114,7 @@ ulint mach_read_from_3( /*=============*/ const byte* b) /*!< in: pointer to 3 bytes */ - __attribute__((nonnull, pure)); + MY_ATTRIBUTE((nonnull, pure)); /*******************************************************//** The following function is used to store data in four consecutive bytes. We store the most significant byte to the lowest address. */ @@ -133,7 +133,7 @@ ulint mach_read_from_4( /*=============*/ const byte* b) /*!< in: pointer to four bytes */ - __attribute__((nonnull, pure)); + MY_ATTRIBUTE((nonnull, pure)); /*********************************************************//** Writes a ulint in a compressed form (1..5 bytes). @return stored size in bytes */ @@ -151,7 +151,7 @@ ulint mach_get_compressed_size( /*=====================*/ ulint n) /*!< in: ulint integer to be stored */ - __attribute__((const)); + MY_ATTRIBUTE((const)); /*********************************************************//** Reads a ulint in a compressed form. @return read integer */ @@ -160,7 +160,7 @@ ulint mach_read_compressed( /*=================*/ const byte* b) /*!< in: pointer to memory from where to read */ - __attribute__((nonnull, pure)); + MY_ATTRIBUTE((nonnull, pure)); /*******************************************************//** The following function is used to store data in 6 consecutive bytes. We store the most significant byte to the lowest address. */ @@ -179,7 +179,7 @@ ib_uint64_t mach_read_from_6( /*=============*/ const byte* b) /*!< in: pointer to 6 bytes */ - __attribute__((nonnull, pure)); + MY_ATTRIBUTE((nonnull, pure)); /*******************************************************//** The following function is used to store data in 7 consecutive bytes. We store the most significant byte to the lowest address. */ @@ -198,7 +198,7 @@ ib_uint64_t mach_read_from_7( /*=============*/ const byte* b) /*!< in: pointer to 7 bytes */ - __attribute__((nonnull, pure)); + MY_ATTRIBUTE((nonnull, pure)); /*******************************************************//** The following function is used to store data in 8 consecutive bytes. We store the most significant byte to the lowest address. */ @@ -217,7 +217,7 @@ ib_uint64_t mach_read_from_8( /*=============*/ const byte* b) /*!< in: pointer to 8 bytes */ - __attribute__((nonnull, pure)); + MY_ATTRIBUTE((nonnull, pure)); /*********************************************************//** Writes a 64-bit integer in a compressed form (5..9 bytes). @return size in bytes */ @@ -243,7 +243,7 @@ ib_uint64_t mach_ull_read_compressed( /*=====================*/ const byte* b) /*!< in: pointer to memory from where to read */ - __attribute__((nonnull, pure)); + MY_ATTRIBUTE((nonnull, pure)); /*********************************************************//** Writes a 64-bit integer in a compressed form (1..11 bytes). @return size in bytes */ @@ -261,7 +261,7 @@ ulint mach_ull_get_much_compressed_size( /*==============================*/ ib_uint64_t n) /*!< in: 64-bit integer to be stored */ - __attribute__((const)); + MY_ATTRIBUTE((const)); /*********************************************************//** Reads a 64-bit integer in a compressed form. @return the value read */ @@ -270,7 +270,7 @@ ib_uint64_t mach_ull_read_much_compressed( /*==========================*/ const byte* b) /*!< in: pointer to memory from where to read */ - __attribute__((nonnull, pure)); + MY_ATTRIBUTE((nonnull, pure)); /*********************************************************//** Reads a ulint in a compressed form if the log record fully contains it. @return pointer to end of the stored field, NULL if not complete */ @@ -301,7 +301,7 @@ double mach_double_read( /*=============*/ const byte* b) /*!< in: pointer to memory from where to read */ - __attribute__((nonnull, pure)); + MY_ATTRIBUTE((nonnull, pure)); /*********************************************************//** Writes a double. It is stored in a little-endian format. */ UNIV_INLINE @@ -318,7 +318,7 @@ float mach_float_read( /*============*/ const byte* b) /*!< in: pointer to memory from where to read */ - __attribute__((nonnull, pure)); + MY_ATTRIBUTE((nonnull, pure)); /*********************************************************//** Writes a float. It is stored in a little-endian format. */ UNIV_INLINE @@ -336,7 +336,7 @@ mach_read_from_n_little_endian( /*===========================*/ const byte* buf, /*!< in: from where to read */ ulint buf_size) /*!< in: from how many bytes to read */ - __attribute__((nonnull, pure)); + MY_ATTRIBUTE((nonnull, pure)); /*********************************************************//** Writes a ulint in the little-endian format. */ UNIV_INLINE @@ -354,7 +354,7 @@ ulint mach_read_from_2_little_endian( /*===========================*/ const byte* buf) /*!< in: from where to read */ - __attribute__((nonnull, pure)); + MY_ATTRIBUTE((nonnull, pure)); /*********************************************************//** Writes a ulint in the little-endian format. */ UNIV_INLINE diff --git a/mysql-wsrep-5.6/storage/innobase/include/mem0mem.h b/mysql-wsrep-5.6/storage/innobase/include/mem0mem.h index f30034f3..de9b8b29 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/mem0mem.h +++ b/mysql-wsrep-5.6/storage/innobase/include/mem0mem.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1994, 2010, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -353,7 +353,7 @@ mem_heap_printf( /*============*/ mem_heap_t* heap, /*!< in: memory heap */ const char* format, /*!< in: format string */ - ...) __attribute__ ((format (printf, 2, 3))); + ...) MY_ATTRIBUTE ((format (printf, 2, 3))); #ifdef MEM_PERIODIC_CHECK /******************************************************************//** diff --git a/mysql-wsrep-5.6/storage/innobase/include/mem0mem.ic b/mysql-wsrep-5.6/storage/innobase/include/mem0mem.ic index 0d983d69..63e68150 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/mem0mem.ic +++ b/mysql-wsrep-5.6/storage/innobase/include/mem0mem.ic @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1994, 2010, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -476,9 +476,9 @@ void mem_heap_free_func( /*===============*/ mem_heap_t* heap, /*!< in, own: heap to be freed */ - const char* file_name __attribute__((unused)), + const char* file_name MY_ATTRIBUTE((unused)), /*!< in: file name where freed */ - ulint line __attribute__((unused))) + ulint line MY_ATTRIBUTE((unused))) { mem_block_t* block; mem_block_t* prev_block; diff --git a/mysql-wsrep-5.6/storage/innobase/include/mtr0mtr.h b/mysql-wsrep-5.6/storage/innobase/include/mtr0mtr.h index ed7fd76d..db4e028e 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/mtr0mtr.h +++ b/mysql-wsrep-5.6/storage/innobase/include/mtr0mtr.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2013, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. This program is free software; you can redistribute it and/or modify it under @@ -207,7 +207,7 @@ void mtr_start( /*======*/ mtr_t* mtr) /*!< out: mini-transaction */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /***************************************************************//** Commits a mini-transaction. */ UNIV_INTERN @@ -215,7 +215,7 @@ void mtr_commit( /*=======*/ mtr_t* mtr) /*!< in/out: mini-transaction */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /**********************************************************//** Sets and returns a savepoint in mtr. @return savepoint */ @@ -308,7 +308,7 @@ mtr_memo_release( mtr_t* mtr, /*!< in/out: mini-transaction */ void* object, /*!< in: object */ ulint type) /*!< in: object type: MTR_MEMO_S_LOCK, ... */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); #ifdef UNIV_DEBUG # ifndef UNIV_HOTBACKUP /**********************************************************//** @@ -321,7 +321,7 @@ mtr_memo_contains( mtr_t* mtr, /*!< in: mtr */ const void* object, /*!< in: object to search */ ulint type) /*!< in: type of object */ - __attribute__((warn_unused_result, nonnull)); + MY_ATTRIBUTE((warn_unused_result, nonnull)); /**********************************************************//** Checks if memo contains the given page. diff --git a/mysql-wsrep-5.6/storage/innobase/include/mtr0mtr.ic b/mysql-wsrep-5.6/storage/innobase/include/mtr0mtr.ic index a9f02430..3f897ae1 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/mtr0mtr.ic +++ b/mysql-wsrep-5.6/storage/innobase/include/mtr0mtr.ic @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2013, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -37,7 +37,7 @@ ibool mtr_block_dirtied( /*==============*/ const buf_block_t* block) /*!< in: block being x-fixed */ - __attribute__((nonnull,warn_unused_result)); + MY_ATTRIBUTE((nonnull,warn_unused_result)); /***************************************************************//** Starts a mini-transaction. */ diff --git a/mysql-wsrep-5.6/storage/innobase/include/os0file.h b/mysql-wsrep-5.6/storage/innobase/include/os0file.h index 13631732..f047302c 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/os0file.h +++ b/mysql-wsrep-5.6/storage/innobase/include/os0file.h @@ -1,6 +1,6 @@ /*********************************************************************** -Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2009, Percona Inc. Portions of this file contain modifications contributed and copyrighted @@ -529,7 +529,7 @@ os_file_create_simple_no_error_handling_func( OS_FILE_READ_ALLOW_DELETE; the last option is used by a backup program reading the file */ ibool* success)/*!< out: TRUE if succeed, FALSE if error */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /****************************************************************//** Tries to disable OS caching on an opened file descriptor. */ UNIV_INTERN @@ -563,7 +563,7 @@ os_file_create_func( function source code for the exact rules */ ulint type, /*!< in: OS_DATA_FILE or OS_LOG_FILE */ ibool* success)/*!< out: TRUE if succeed, FALSE if error */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /***********************************************************************//** Deletes a file. The file has to be closed before calling this. @return TRUE if success */ @@ -629,7 +629,7 @@ pfs_os_file_create_simple_func( ibool* success,/*!< out: TRUE if succeed, FALSE if error */ const char* src_file,/*!< in: file name where func invoked */ ulint src_line)/*!< in: line where the func invoked */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /****************************************************************//** NOTE! Please use the corresponding macro @@ -654,7 +654,7 @@ pfs_os_file_create_simple_no_error_handling_func( ibool* success,/*!< out: TRUE if succeed, FALSE if error */ const char* src_file,/*!< in: file name where func invoked */ ulint src_line)/*!< in: line where the func invoked */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /****************************************************************//** NOTE! Please use the corresponding macro os_file_create(), not directly @@ -682,7 +682,7 @@ pfs_os_file_create_func( ibool* success,/*!< out: TRUE if succeed, FALSE if error */ const char* src_file,/*!< in: file name where func invoked */ ulint src_line)/*!< in: line where the func invoked */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /***********************************************************************//** NOTE! Please use the corresponding macro os_file_close(), not directly @@ -861,7 +861,7 @@ os_offset_t os_file_get_size( /*=============*/ os_file_t file) /*!< in: handle to a file */ - __attribute__((warn_unused_result)); + MY_ATTRIBUTE((warn_unused_result)); /***********************************************************************//** Write the specified number of zeros to a newly created file. @return TRUE if success */ @@ -873,7 +873,7 @@ os_file_set_size( null-terminated string */ os_file_t file, /*!< in: handle to a file */ os_offset_t size) /*!< in: file size */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /***********************************************************************//** Truncates a file at its current position. @return TRUE if success */ diff --git a/mysql-wsrep-5.6/storage/innobase/include/os0thread.h b/mysql-wsrep-5.6/storage/innobase/include/os0thread.h index 37c54afa..9a1ada8f 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/os0thread.h +++ b/mysql-wsrep-5.6/storage/innobase/include/os0thread.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2011, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -125,7 +125,7 @@ os_thread_exit( /*===========*/ void* exit_value) /*!< in: exit value; in Windows this void* is cast as a DWORD */ - UNIV_COLD __attribute__((noreturn)); + UNIV_COLD MY_ATTRIBUTE((noreturn)); /*****************************************************************//** Returns the thread identifier of current thread. @return current thread identifier */ diff --git a/mysql-wsrep-5.6/storage/innobase/include/page0cur.h b/mysql-wsrep-5.6/storage/innobase/include/page0cur.h index b1ad49b4..f04667ff 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/page0cur.h +++ b/mysql-wsrep-5.6/storage/innobase/include/page0cur.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1994, 2013, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -180,7 +180,7 @@ page_cur_tuple_insert( mem_heap_t** heap, /*!< in/out: pointer to memory heap, or NULL */ ulint n_ext, /*!< in: number of externally stored columns */ mtr_t* mtr) /*!< in: mini-transaction handle, or NULL */ - __attribute__((nonnull(1,2,3,4,5), warn_unused_result)); + MY_ATTRIBUTE((nonnull(1,2,3,4,5), warn_unused_result)); #endif /* !UNIV_HOTBACKUP */ /***********************************************************//** Inserts a record next to page cursor. Returns pointer to inserted record if @@ -218,7 +218,7 @@ page_cur_insert_rec_low( const rec_t* rec, /*!< in: pointer to a physical record */ ulint* offsets,/*!< in/out: rec_get_offsets(rec, index) */ mtr_t* mtr) /*!< in: mini-transaction handle, or NULL */ - __attribute__((nonnull(1,2,3,4), warn_unused_result)); + MY_ATTRIBUTE((nonnull(1,2,3,4), warn_unused_result)); /***********************************************************//** Inserts a record next to page cursor on a compressed and uncompressed page. Returns pointer to inserted record if succeed, i.e., @@ -240,7 +240,7 @@ page_cur_insert_rec_zip( const rec_t* rec, /*!< in: pointer to a physical record */ ulint* offsets,/*!< in/out: rec_get_offsets(rec, index) */ mtr_t* mtr) /*!< in: mini-transaction handle, or NULL */ - __attribute__((nonnull(1,2,3,4), warn_unused_result)); + MY_ATTRIBUTE((nonnull(1,2,3,4), warn_unused_result)); /*************************************************************//** Copies records from page to a newly created page, from a given record onward, including that record. Infimum and supremum records are not copied. diff --git a/mysql-wsrep-5.6/storage/innobase/include/page0page.h b/mysql-wsrep-5.6/storage/innobase/include/page0page.h index 0bd0a009..0dd5bb53 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/page0page.h +++ b/mysql-wsrep-5.6/storage/innobase/include/page0page.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1994, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -165,7 +165,7 @@ page_t* page_align( /*=======*/ const void* ptr) /*!< in: pointer to page frame */ - __attribute__((const)); + MY_ATTRIBUTE((const)); /************************************************************//** Gets the offset within a page. @return offset from the start of the page */ @@ -174,7 +174,7 @@ ulint page_offset( /*========*/ const void* ptr) /*!< in: pointer to page frame */ - __attribute__((const)); + MY_ATTRIBUTE((const)); /*************************************************************//** Returns the max trx id field value. */ UNIV_INLINE @@ -232,7 +232,7 @@ page_header_get_offs( /*=================*/ const page_t* page, /*!< in: page */ ulint field) /*!< in: PAGE_FREE, ... */ - __attribute__((nonnull, pure)); + MY_ATTRIBUTE((nonnull, pure)); /*************************************************************//** Returns the pointer stored in the given header field, or NULL. */ @@ -292,7 +292,7 @@ page_rec_get_nth_const( /*===================*/ const page_t* page, /*!< in: page */ ulint nth) /*!< in: nth record */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /************************************************************//** Returns the nth record of the record list. This is the inverse function of page_rec_get_n_recs_before(). @@ -303,7 +303,7 @@ page_rec_get_nth( /*=============*/ page_t* page, /*< in: page */ ulint nth) /*!< in: nth record */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); #ifndef UNIV_HOTBACKUP /************************************************************//** @@ -316,7 +316,7 @@ rec_t* page_get_middle_rec( /*================*/ page_t* page) /*!< in: page */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*************************************************************//** Compares a data tuple to a physical record. Differs from the function cmp_dtuple_rec_with_match in the way that the record must reside on an @@ -524,7 +524,7 @@ bool page_is_leaf( /*=========*/ const page_t* page) /*!< in: page */ - __attribute__((nonnull, pure)); + MY_ATTRIBUTE((nonnull, pure)); /************************************************************//** Determine whether the page is empty. @return true if the page is empty (PAGE_N_RECS = 0) */ @@ -533,7 +533,7 @@ bool page_is_empty( /*==========*/ const page_t* page) /*!< in: page */ - __attribute__((nonnull, pure)); + MY_ATTRIBUTE((nonnull, pure)); /************************************************************//** Determine whether the page contains garbage. @return true if the page contains garbage (PAGE_GARBAGE is not 0) */ @@ -542,7 +542,7 @@ bool page_has_garbage( /*=============*/ const page_t* page) /*!< in: page */ - __attribute__((nonnull, pure)); + MY_ATTRIBUTE((nonnull, pure)); /************************************************************//** Gets the pointer to the next record on the page. @return pointer to next record */ @@ -614,7 +614,7 @@ ibool page_rec_is_user_rec_low( /*=====================*/ ulint offset) /*!< in: record offset on page */ - __attribute__((const)); + MY_ATTRIBUTE((const)); /************************************************************//** TRUE if the record is the supremum record on a page. @return TRUE if the supremum record */ @@ -623,7 +623,7 @@ ibool page_rec_is_supremum_low( /*=====================*/ ulint offset) /*!< in: record offset on page */ - __attribute__((const)); + MY_ATTRIBUTE((const)); /************************************************************//** TRUE if the record is the infimum record on a page. @return TRUE if the infimum record */ @@ -632,7 +632,7 @@ ibool page_rec_is_infimum_low( /*====================*/ ulint offset) /*!< in: record offset on page */ - __attribute__((const)); + MY_ATTRIBUTE((const)); /************************************************************//** TRUE if the record is a user record on the page. @@ -642,7 +642,7 @@ ibool page_rec_is_user_rec( /*=================*/ const rec_t* rec) /*!< in: record */ - __attribute__((const)); + MY_ATTRIBUTE((const)); /************************************************************//** TRUE if the record is the supremum record on a page. @return TRUE if the supremum record */ @@ -651,7 +651,7 @@ ibool page_rec_is_supremum( /*=================*/ const rec_t* rec) /*!< in: record */ - __attribute__((const)); + MY_ATTRIBUTE((const)); /************************************************************//** TRUE if the record is the infimum record on a page. @@ -661,7 +661,7 @@ ibool page_rec_is_infimum( /*================*/ const rec_t* rec) /*!< in: record */ - __attribute__((const)); + MY_ATTRIBUTE((const)); /***************************************************************//** Looks for the record which owns the given record. @return the owner record */ @@ -681,7 +681,7 @@ page_rec_write_field( ulint i, /*!< in: index of the field to update */ ulint val, /*!< in: value to write */ mtr_t* mtr) /*!< in/out: mini-transaction */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); #endif /* !UNIV_HOTBACKUP */ /************************************************************//** Returns the maximum combined size of records which can be inserted on top @@ -711,7 +711,7 @@ ulint page_get_free_space_of_empty( /*=========================*/ ulint comp) /*!< in: nonzero=compact page format */ - __attribute__((const)); + MY_ATTRIBUTE((const)); /**********************************************************//** Returns the base extra size of a physical record. This is the size of the fixed header, independent of the record size. @@ -797,7 +797,7 @@ page_create_zip( ulint level, /*!< in: the B-tree level of the page */ trx_id_t max_trx_id, /*!< in: PAGE_MAX_TRX_ID */ mtr_t* mtr) /*!< in/out: mini-transaction */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /**********************************************************//** Empty a previously created B-tree index page. */ UNIV_INTERN @@ -807,7 +807,7 @@ page_create_empty( buf_block_t* block, /*!< in/out: B-tree block */ dict_index_t* index, /*!< in: the index of the page */ mtr_t* mtr) /*!< in/out: mini-transaction */ - __attribute__((nonnull(1,2))); + MY_ATTRIBUTE((nonnull(1,2))); /*************************************************************//** Differs from page_copy_rec_list_end, because this function does not touch the lock table and max trx id on page or compress the page. @@ -846,7 +846,7 @@ page_copy_rec_list_end( rec_t* rec, /*!< in: record on page */ dict_index_t* index, /*!< in: record descriptor */ mtr_t* mtr) /*!< in: mtr */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*************************************************************//** Copies records from page to new_page, up to the given record, NOT including that record. Infimum and supremum records are not copied. @@ -868,7 +868,7 @@ page_copy_rec_list_start( rec_t* rec, /*!< in: record on page */ dict_index_t* index, /*!< in: record descriptor */ mtr_t* mtr) /*!< in: mtr */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*************************************************************//** Deletes records from a page from a given record onward, including that record. The infimum and supremum records are not deleted. */ @@ -885,7 +885,7 @@ page_delete_rec_list_end( records in the end of the chain to delete, or ULINT_UNDEFINED if not known */ mtr_t* mtr) /*!< in: mtr */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*************************************************************//** Deletes records from page, up to the given record, NOT including that record. Infimum and supremum records are not deleted. */ @@ -897,7 +897,7 @@ page_delete_rec_list_start( buf_block_t* block, /*!< in: buffer block of the page */ dict_index_t* index, /*!< in: record descriptor */ mtr_t* mtr) /*!< in: mtr */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*************************************************************//** Moves record list end to another page. Moved records include split_rec. @@ -918,7 +918,7 @@ page_move_rec_list_end( rec_t* split_rec, /*!< in: first record to move */ dict_index_t* index, /*!< in: record descriptor */ mtr_t* mtr) /*!< in: mtr */ - __attribute__((nonnull(1, 2, 4, 5))); + MY_ATTRIBUTE((nonnull(1, 2, 4, 5))); /*************************************************************//** Moves record list start to another page. Moved records do not include split_rec. @@ -938,7 +938,7 @@ page_move_rec_list_start( rec_t* split_rec, /*!< in: first record not to move */ dict_index_t* index, /*!< in: record descriptor */ mtr_t* mtr) /*!< in: mtr */ - __attribute__((nonnull(1, 2, 4, 5))); + MY_ATTRIBUTE((nonnull(1, 2, 4, 5))); /****************************************************************//** Splits a directory slot which owns too many records. */ UNIV_INTERN @@ -949,7 +949,7 @@ page_dir_split_slot( page_zip_des_t* page_zip,/*!< in/out: compressed page whose uncompressed part will be written, or NULL */ ulint slot_no)/*!< in: the directory slot */ - __attribute__((nonnull(1))); + MY_ATTRIBUTE((nonnull(1))); /*************************************************************//** Tries to balance the given directory slot with too few records with the upper neighbor, so that there are at least the minimum number @@ -962,7 +962,7 @@ page_dir_balance_slot( page_t* page, /*!< in/out: index page */ page_zip_des_t* page_zip,/*!< in/out: compressed page, or NULL */ ulint slot_no)/*!< in: the directory slot */ - __attribute__((nonnull(1))); + MY_ATTRIBUTE((nonnull(1))); /**********************************************************//** Parses a log record of a record list end or start deletion. @return end of log record or NULL */ diff --git a/mysql-wsrep-5.6/storage/innobase/include/page0types.h b/mysql-wsrep-5.6/storage/innobase/include/page0types.h index 95143a4b..19671276 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/page0types.h +++ b/mysql-wsrep-5.6/storage/innobase/include/page0types.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1994, 2013, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -129,7 +129,7 @@ page_zip_rec_set_deleted( page_zip_des_t* page_zip,/*!< in/out: compressed page */ const byte* rec, /*!< in: record on the uncompressed page */ ulint flag) /*!< in: the deleted flag (nonzero=TRUE) */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /**********************************************************************//** Write the "owned" flag of a record on a compressed page. The n_owned field @@ -141,7 +141,7 @@ page_zip_rec_set_owned( page_zip_des_t* page_zip,/*!< in/out: compressed page */ const byte* rec, /*!< in: record on the uncompressed page */ ulint flag) /*!< in: the owned flag (nonzero=TRUE) */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /**********************************************************************//** Shift the dense page directory when a record is deleted. */ @@ -154,7 +154,7 @@ page_zip_dir_delete( dict_index_t* index, /*!< in: index of rec */ const ulint* offsets,/*!< in: rec_get_offsets(rec) */ const byte* free) /*!< in: previous start of the free list */ - __attribute__((nonnull(1,2,3,4))); + MY_ATTRIBUTE((nonnull(1,2,3,4))); /**********************************************************************//** Add a slot to the dense page directory. */ @@ -165,5 +165,5 @@ page_zip_dir_add_slot( page_zip_des_t* page_zip, /*!< in/out: compressed page */ ulint is_clustered) /*!< in: nonzero for clustered index, zero for others */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); #endif diff --git a/mysql-wsrep-5.6/storage/innobase/include/page0zip.h b/mysql-wsrep-5.6/storage/innobase/include/page0zip.h index 9d3b78ed..3a23bcb7 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/page0zip.h +++ b/mysql-wsrep-5.6/storage/innobase/include/page0zip.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2005, 2013, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2005, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. This program is free software; you can redistribute it and/or modify it under @@ -58,7 +58,7 @@ ulint page_zip_get_size( /*==============*/ const page_zip_des_t* page_zip) /*!< in: compressed page */ - __attribute__((nonnull, pure)); + MY_ATTRIBUTE((nonnull, pure)); /**********************************************************************//** Set the size of a compressed page in bytes. */ UNIV_INLINE @@ -81,7 +81,7 @@ page_zip_rec_needs_ext( ulint n_fields, /*!< in: number of fields in the record; ignored if zip_size == 0 */ ulint zip_size) /*!< in: compressed page size in bytes, or 0 */ - __attribute__((const)); + MY_ATTRIBUTE((const)); /**********************************************************************//** Determine the guaranteed free space on an empty page. @@ -92,7 +92,7 @@ page_zip_empty_size( /*================*/ ulint n_fields, /*!< in: number of columns in the index */ ulint zip_size) /*!< in: compressed page size in bytes */ - __attribute__((const)); + MY_ATTRIBUTE((const)); #endif /* !UNIV_HOTBACKUP */ /**********************************************************************//** @@ -127,7 +127,7 @@ page_zip_compress( dict_index_t* index, /*!< in: index of the B-tree node */ ulint level, /*!< in: compression level */ mtr_t* mtr) /*!< in: mini-transaction, or NULL */ - __attribute__((nonnull(1,2,3))); + MY_ATTRIBUTE((nonnull(1,2,3))); /**********************************************************************//** Decompress a page. This function should tolerate errors on the compressed @@ -145,7 +145,7 @@ page_zip_decompress( FALSE=verify but do not copy some page header fields that should not change after page creation */ - __attribute__((nonnull(1,2))); + MY_ATTRIBUTE((nonnull(1,2))); #ifdef UNIV_DEBUG /**********************************************************************//** @@ -172,7 +172,7 @@ page_zip_validate_low( const dict_index_t* index, /*!< in: index of the page, if known */ ibool sloppy) /*!< in: FALSE=strict, TRUE=ignore the MIN_REC_FLAG */ - __attribute__((nonnull(1,2))); + MY_ATTRIBUTE((nonnull(1,2))); /**********************************************************************//** Check that the compressed and decompressed pages match. */ UNIV_INTERN @@ -182,7 +182,7 @@ page_zip_validate( const page_zip_des_t* page_zip,/*!< in: compressed page */ const page_t* page, /*!< in: uncompressed page */ const dict_index_t* index) /*!< in: index of the page, if known */ - __attribute__((nonnull(1,2))); + MY_ATTRIBUTE((nonnull(1,2))); #endif /* UNIV_ZIP_DEBUG */ /**********************************************************************//** @@ -195,7 +195,7 @@ page_zip_max_ins_size( /*==================*/ const page_zip_des_t* page_zip,/*!< in: compressed page */ ibool is_clust)/*!< in: TRUE if clustered index */ - __attribute__((nonnull, pure)); + MY_ATTRIBUTE((nonnull, pure)); /**********************************************************************//** Determine if enough space is available in the modification log. @@ -209,7 +209,7 @@ page_zip_available( ulint length, /*!< in: combined size of the record */ ulint create) /*!< in: nonzero=add the record to the heap */ - __attribute__((nonnull, pure)); + MY_ATTRIBUTE((nonnull, pure)); /**********************************************************************//** Write data to the uncompressed header portion of a page. The data must @@ -222,7 +222,7 @@ page_zip_write_header( const byte* str, /*!< in: address on the uncompressed page */ ulint length, /*!< in: length of the data */ mtr_t* mtr) /*!< in: mini-transaction, or NULL */ - __attribute__((nonnull(1,2))); + MY_ATTRIBUTE((nonnull(1,2))); /**********************************************************************//** Write an entire record on the compressed page. The data must already @@ -236,7 +236,7 @@ page_zip_write_rec( dict_index_t* index, /*!< in: the index the record belongs to */ const ulint* offsets,/*!< in: rec_get_offsets(rec, index) */ ulint create) /*!< in: nonzero=insert, zero=update */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /***********************************************************//** Parses a log record of writing a BLOB pointer of a record. @@ -265,7 +265,7 @@ page_zip_write_blob_ptr( ulint n, /*!< in: column index */ mtr_t* mtr) /*!< in: mini-transaction handle, or NULL if no logging is needed */ - __attribute__((nonnull(1,2,3,4))); + MY_ATTRIBUTE((nonnull(1,2,3,4))); /***********************************************************//** Parses a log record of writing the node pointer of a record. @@ -290,7 +290,7 @@ page_zip_write_node_ptr( ulint size, /*!< in: data size of rec */ ulint ptr, /*!< in: node pointer */ mtr_t* mtr) /*!< in: mini-transaction, or NULL */ - __attribute__((nonnull(1,2))); + MY_ATTRIBUTE((nonnull(1,2))); /**********************************************************************//** Write the trx_id and roll_ptr of a record on a B-tree leaf node page. */ @@ -304,7 +304,7 @@ page_zip_write_trx_id_and_roll_ptr( ulint trx_id_col,/*!< in: column number of TRX_ID in rec */ trx_id_t trx_id, /*!< in: transaction identifier */ roll_ptr_t roll_ptr)/*!< in: roll_ptr */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /**********************************************************************//** Write the "deleted" flag of a record on a compressed page. The flag must @@ -316,7 +316,7 @@ page_zip_rec_set_deleted( page_zip_des_t* page_zip,/*!< in/out: compressed page */ const byte* rec, /*!< in: record on the uncompressed page */ ulint flag) /*!< in: the deleted flag (nonzero=TRUE) */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /**********************************************************************//** Write the "owned" flag of a record on a compressed page. The n_owned field @@ -328,7 +328,7 @@ page_zip_rec_set_owned( page_zip_des_t* page_zip,/*!< in/out: compressed page */ const byte* rec, /*!< in: record on the uncompressed page */ ulint flag) /*!< in: the owned flag (nonzero=TRUE) */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /**********************************************************************//** Insert a record to the dense page directory. */ @@ -355,7 +355,7 @@ page_zip_dir_delete( const ulint* offsets, /*!< in: rec_get_offsets(rec) */ const byte* free) /*!< in: previous start of the free list */ - __attribute__((nonnull(1,2,3,4))); + MY_ATTRIBUTE((nonnull(1,2,3,4))); /**********************************************************************//** Add a slot to the dense page directory. */ @@ -366,7 +366,7 @@ page_zip_dir_add_slot( page_zip_des_t* page_zip, /*!< in/out: compressed page */ ulint is_clustered) /*!< in: nonzero for clustered index, zero for others */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /***********************************************************//** Parses a log record of writing to the header of a page. @@ -394,7 +394,7 @@ page_zip_write_header( const byte* str, /*!< in: address on the uncompressed page */ ulint length, /*!< in: length of the data */ mtr_t* mtr) /*!< in: mini-transaction, or NULL */ - __attribute__((nonnull(1,2))); + MY_ATTRIBUTE((nonnull(1,2))); /**********************************************************************//** Reorganize and compress a page. This is a low-level operation for @@ -417,7 +417,7 @@ page_zip_reorganize( m_start, m_end, m_nonempty */ dict_index_t* index, /*!< in: index of the B-tree node */ mtr_t* mtr) /*!< in: mini-transaction */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); #ifndef UNIV_HOTBACKUP /**********************************************************************//** Copy the records of a page byte for byte. Do not copy the page header @@ -436,7 +436,7 @@ page_zip_copy_recs( const page_t* src, /*!< in: page */ dict_index_t* index, /*!< in: index of the B-tree */ mtr_t* mtr) /*!< in: mini-transaction */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); #endif /* !UNIV_HOTBACKUP */ /**********************************************************************//** @@ -450,7 +450,7 @@ page_zip_parse_compress( byte* end_ptr,/*!< in: buffer end */ page_t* page, /*!< out: uncompressed page */ page_zip_des_t* page_zip)/*!< out: compressed page */ - __attribute__((nonnull(1,2))); + MY_ATTRIBUTE((nonnull(1,2))); /**********************************************************************//** Calculate the compressed page checksum. @@ -462,7 +462,7 @@ page_zip_calc_checksum( const void* data, /*!< in: compressed page */ ulint size, /*!< in: size of compressed page */ srv_checksum_algorithm_t algo) /*!< in: algorithm to use */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /**********************************************************************//** Verify a compressed page's checksum. @@ -496,7 +496,7 @@ page_zip_parse_compress_no_data( page_t* page, /*!< in: uncompressed page */ page_zip_des_t* page_zip, /*!< out: compressed page */ dict_index_t* index) /*!< in: index */ - __attribute__((nonnull(1,2))); + MY_ATTRIBUTE((nonnull(1,2))); /**********************************************************************//** Reset the counters used for filling diff --git a/mysql-wsrep-5.6/storage/innobase/include/pars0pars.h b/mysql-wsrep-5.6/storage/innobase/include/pars0pars.h index 65ff7533..73585c78 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/pars0pars.h +++ b/mysql-wsrep-5.6/storage/innobase/include/pars0pars.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -472,7 +472,7 @@ pars_complete_graph_for_exec( query graph, or NULL for dummy graph */ trx_t* trx, /*!< in: transaction handle */ mem_heap_t* heap) /*!< in: memory heap from which allocated */ - __attribute__((nonnull(2,3), warn_unused_result)); + MY_ATTRIBUTE((nonnull(2,3), warn_unused_result)); /****************************************************************//** Create parser info struct. @@ -628,7 +628,7 @@ pars_info_bind_ull_literal( pars_info_t* info, /*!< in: info struct */ const char* name, /*!< in: name */ const ib_uint64_t* val) /*!< in: value */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /****************************************************************//** Add bound id. */ diff --git a/mysql-wsrep-5.6/storage/innobase/include/read0read.h b/mysql-wsrep-5.6/storage/innobase/include/read0read.h index 980faddf..ae75cfac 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/read0read.h +++ b/mysql-wsrep-5.6/storage/innobase/include/read0read.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1997, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -82,7 +82,7 @@ read_view_sees_trx_id( /*==================*/ const read_view_t* view, /*!< in: read view */ trx_id_t trx_id) /*!< in: trx id */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*********************************************************************//** Prints a read view to stderr. */ UNIV_INTERN diff --git a/mysql-wsrep-5.6/storage/innobase/include/rem0cmp.h b/mysql-wsrep-5.6/storage/innobase/include/rem0cmp.h index cb3c85ac..65116229 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/rem0cmp.h +++ b/mysql-wsrep-5.6/storage/innobase/include/rem0cmp.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1994, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -174,7 +174,7 @@ cmp_dtuple_rec_with_match_low( bytes within the first field not completely matched; when function returns, contains the value for current comparison */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); #define cmp_dtuple_rec_with_match(tuple,rec,offsets,fields,bytes) \ cmp_dtuple_rec_with_match_low( \ tuple,rec,offsets,dtuple_get_n_fields_cmp(tuple),fields,bytes) @@ -218,7 +218,7 @@ cmp_rec_rec_simple( struct TABLE* table) /*!< in: MySQL table, for reporting duplicate key value if applicable, or NULL */ - __attribute__((nonnull(1,2,3,4), warn_unused_result)); + MY_ATTRIBUTE((nonnull(1,2,3,4), warn_unused_result)); /*************************************************************//** This function is used to compare two physical records. Only the common first fields are compared, and if an externally stored field is diff --git a/mysql-wsrep-5.6/storage/innobase/include/rem0rec.h b/mysql-wsrep-5.6/storage/innobase/include/rem0rec.h index 5dc49714..866493c8 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/rem0rec.h +++ b/mysql-wsrep-5.6/storage/innobase/include/rem0rec.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1994, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -98,7 +98,7 @@ rec_get_next_ptr_const( /*===================*/ const rec_t* rec, /*!< in: physical record */ ulint comp) /*!< in: nonzero=compact page format */ - __attribute__((nonnull, pure, warn_unused_result)); + MY_ATTRIBUTE((nonnull, pure, warn_unused_result)); /******************************************************//** The following function is used to get the pointer of the next chained record on the same page. @@ -109,7 +109,7 @@ rec_get_next_ptr( /*=============*/ rec_t* rec, /*!< in: physical record */ ulint comp) /*!< in: nonzero=compact page format */ - __attribute__((nonnull, pure, warn_unused_result)); + MY_ATTRIBUTE((nonnull, pure, warn_unused_result)); /******************************************************//** The following function is used to get the offset of the next chained record on the same page. @@ -120,7 +120,7 @@ rec_get_next_offs( /*==============*/ const rec_t* rec, /*!< in: physical record */ ulint comp) /*!< in: nonzero=compact page format */ - __attribute__((nonnull, pure, warn_unused_result)); + MY_ATTRIBUTE((nonnull, pure, warn_unused_result)); /******************************************************//** The following function is used to set the next record offset field of an old-style record. */ @@ -130,7 +130,7 @@ rec_set_next_offs_old( /*==================*/ rec_t* rec, /*!< in: old-style physical record */ ulint next) /*!< in: offset of the next record */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /******************************************************//** The following function is used to set the next record offset field of a new-style record. */ @@ -140,7 +140,7 @@ rec_set_next_offs_new( /*==================*/ rec_t* rec, /*!< in/out: new-style physical record */ ulint next) /*!< in: offset of the next record */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /******************************************************//** The following function is used to get the number of fields in an old-style record. @@ -150,7 +150,7 @@ ulint rec_get_n_fields_old( /*=================*/ const rec_t* rec) /*!< in: physical record */ - __attribute__((nonnull, pure, warn_unused_result)); + MY_ATTRIBUTE((nonnull, pure, warn_unused_result)); /******************************************************//** The following function is used to get the number of fields in a record. @@ -161,7 +161,7 @@ rec_get_n_fields( /*=============*/ const rec_t* rec, /*!< in: physical record */ const dict_index_t* index) /*!< in: record descriptor */ - __attribute__((nonnull, pure, warn_unused_result)); + MY_ATTRIBUTE((nonnull, pure, warn_unused_result)); /******************************************************//** The following function is used to get the number of records owned by the previous directory record. @@ -171,7 +171,7 @@ ulint rec_get_n_owned_old( /*================*/ const rec_t* rec) /*!< in: old-style physical record */ - __attribute__((nonnull, pure, warn_unused_result)); + MY_ATTRIBUTE((nonnull, pure, warn_unused_result)); /******************************************************//** The following function is used to set the number of owned records. */ UNIV_INLINE @@ -180,7 +180,7 @@ rec_set_n_owned_old( /*================*/ rec_t* rec, /*!< in: old-style physical record */ ulint n_owned) /*!< in: the number of owned */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /******************************************************//** The following function is used to get the number of records owned by the previous directory record. @@ -190,7 +190,7 @@ ulint rec_get_n_owned_new( /*================*/ const rec_t* rec) /*!< in: new-style physical record */ - __attribute__((nonnull, pure, warn_unused_result)); + MY_ATTRIBUTE((nonnull, pure, warn_unused_result)); /******************************************************//** The following function is used to set the number of owned records. */ UNIV_INLINE @@ -200,7 +200,7 @@ rec_set_n_owned_new( rec_t* rec, /*!< in/out: new-style physical record */ page_zip_des_t* page_zip,/*!< in/out: compressed page, or NULL */ ulint n_owned)/*!< in: the number of owned */ - __attribute__((nonnull(1))); + MY_ATTRIBUTE((nonnull(1))); /******************************************************//** The following function is used to retrieve the info bits of a record. @@ -211,7 +211,7 @@ rec_get_info_bits( /*==============*/ const rec_t* rec, /*!< in: physical record */ ulint comp) /*!< in: nonzero=compact page format */ - __attribute__((nonnull, pure, warn_unused_result)); + MY_ATTRIBUTE((nonnull, pure, warn_unused_result)); /******************************************************//** The following function is used to set the info bits of a record. */ UNIV_INLINE @@ -220,7 +220,7 @@ rec_set_info_bits_old( /*==================*/ rec_t* rec, /*!< in: old-style physical record */ ulint bits) /*!< in: info bits */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /******************************************************//** The following function is used to set the info bits of a record. */ UNIV_INLINE @@ -229,7 +229,7 @@ rec_set_info_bits_new( /*==================*/ rec_t* rec, /*!< in/out: new-style physical record */ ulint bits) /*!< in: info bits */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /******************************************************//** The following function retrieves the status bits of a new-style record. @return status bits */ @@ -238,7 +238,7 @@ ulint rec_get_status( /*===========*/ const rec_t* rec) /*!< in: physical record */ - __attribute__((nonnull, pure, warn_unused_result)); + MY_ATTRIBUTE((nonnull, pure, warn_unused_result)); /******************************************************//** The following function is used to set the status bits of a new-style record. */ @@ -248,7 +248,7 @@ rec_set_status( /*===========*/ rec_t* rec, /*!< in/out: physical record */ ulint bits) /*!< in: info bits */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /******************************************************//** The following function is used to retrieve the info and status @@ -260,7 +260,7 @@ rec_get_info_and_status_bits( /*=========================*/ const rec_t* rec, /*!< in: physical record */ ulint comp) /*!< in: nonzero=compact page format */ - __attribute__((nonnull, pure, warn_unused_result)); + MY_ATTRIBUTE((nonnull, pure, warn_unused_result)); /******************************************************//** The following function is used to set the info and status bits of a record. (Only compact records have status bits.) */ @@ -270,7 +270,7 @@ rec_set_info_and_status_bits( /*=========================*/ rec_t* rec, /*!< in/out: compact physical record */ ulint bits) /*!< in: info bits */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /******************************************************//** The following function tells if record is delete marked. @@ -281,7 +281,7 @@ rec_get_deleted_flag( /*=================*/ const rec_t* rec, /*!< in: physical record */ ulint comp) /*!< in: nonzero=compact page format */ - __attribute__((nonnull, pure, warn_unused_result)); + MY_ATTRIBUTE((nonnull, pure, warn_unused_result)); /******************************************************//** The following function is used to set the deleted bit. */ UNIV_INLINE @@ -290,7 +290,7 @@ rec_set_deleted_flag_old( /*=====================*/ rec_t* rec, /*!< in: old-style physical record */ ulint flag) /*!< in: nonzero if delete marked */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /******************************************************//** The following function is used to set the deleted bit. */ UNIV_INLINE @@ -300,7 +300,7 @@ rec_set_deleted_flag_new( rec_t* rec, /*!< in/out: new-style physical record */ page_zip_des_t* page_zip,/*!< in/out: compressed page, or NULL */ ulint flag) /*!< in: nonzero if delete marked */ - __attribute__((nonnull(1))); + MY_ATTRIBUTE((nonnull(1))); /******************************************************//** The following function tells if a new-style record is a node pointer. @return TRUE if node pointer */ @@ -309,7 +309,7 @@ ibool rec_get_node_ptr_flag( /*==================*/ const rec_t* rec) /*!< in: physical record */ - __attribute__((nonnull, pure, warn_unused_result)); + MY_ATTRIBUTE((nonnull, pure, warn_unused_result)); /******************************************************//** The following function is used to get the order number of an old-style record in the heap of the index page. @@ -319,7 +319,7 @@ ulint rec_get_heap_no_old( /*================*/ const rec_t* rec) /*!< in: physical record */ - __attribute__((nonnull, pure, warn_unused_result)); + MY_ATTRIBUTE((nonnull, pure, warn_unused_result)); /******************************************************//** The following function is used to set the heap number field in an old-style record. */ @@ -329,7 +329,7 @@ rec_set_heap_no_old( /*================*/ rec_t* rec, /*!< in: physical record */ ulint heap_no)/*!< in: the heap number */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /******************************************************//** The following function is used to get the order number of a new-style record in the heap of the index page. @@ -339,7 +339,7 @@ ulint rec_get_heap_no_new( /*================*/ const rec_t* rec) /*!< in: physical record */ - __attribute__((nonnull, pure, warn_unused_result)); + MY_ATTRIBUTE((nonnull, pure, warn_unused_result)); /******************************************************//** The following function is used to set the heap number field in a new-style record. */ @@ -349,7 +349,7 @@ rec_set_heap_no_new( /*================*/ rec_t* rec, /*!< in/out: physical record */ ulint heap_no)/*!< in: the heap number */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /******************************************************//** The following function is used to test whether the data offsets in the record are stored in one-byte or two-byte format. @@ -359,7 +359,7 @@ ibool rec_get_1byte_offs_flag( /*====================*/ const rec_t* rec) /*!< in: physical record */ - __attribute__((nonnull, pure, warn_unused_result)); + MY_ATTRIBUTE((nonnull, pure, warn_unused_result)); /******************************************************//** The following function is used to set the 1-byte offsets flag. */ @@ -369,7 +369,7 @@ rec_set_1byte_offs_flag( /*====================*/ rec_t* rec, /*!< in: physical record */ ibool flag) /*!< in: TRUE if 1byte form */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /******************************************************//** Returns the offset of nth field end if the record is stored in the 1-byte @@ -382,7 +382,7 @@ rec_1_get_field_end_info( /*=====================*/ const rec_t* rec, /*!< in: record */ ulint n) /*!< in: field index */ - __attribute__((nonnull, pure, warn_unused_result)); + MY_ATTRIBUTE((nonnull, pure, warn_unused_result)); /******************************************************//** Returns the offset of nth field end if the record is stored in the 2-byte @@ -396,7 +396,7 @@ rec_2_get_field_end_info( /*=====================*/ const rec_t* rec, /*!< in: record */ ulint n) /*!< in: field index */ - __attribute__((nonnull, pure, warn_unused_result)); + MY_ATTRIBUTE((nonnull, pure, warn_unused_result)); /******************************************************//** Returns nonzero if the field is stored off-page. @@ -408,7 +408,7 @@ rec_2_is_field_extern( /*==================*/ const rec_t* rec, /*!< in: record */ ulint n) /*!< in: field index */ - __attribute__((nonnull, pure, warn_unused_result)); + MY_ATTRIBUTE((nonnull, pure, warn_unused_result)); /******************************************************//** Determine how many of the first n columns in a compact @@ -421,7 +421,7 @@ rec_get_n_extern_new( const rec_t* rec, /*!< in: compact physical record */ const dict_index_t* index, /*!< in: record descriptor */ ulint n) /*!< in: number of columns to scan */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /******************************************************//** The following function determines the offsets to each field @@ -446,9 +446,9 @@ rec_get_offsets_func( #endif /* UNIV_DEBUG */ mem_heap_t** heap) /*!< in/out: memory heap */ #ifdef UNIV_DEBUG - __attribute__((nonnull(1,2,5,7),warn_unused_result)); + MY_ATTRIBUTE((nonnull(1,2,5,7),warn_unused_result)); #else /* UNIV_DEBUG */ - __attribute__((nonnull(1,2,5),warn_unused_result)); + MY_ATTRIBUTE((nonnull(1,2,5),warn_unused_result)); #endif /* UNIV_DEBUG */ #ifdef UNIV_DEBUG @@ -475,7 +475,7 @@ rec_get_offsets_reverse( 0=leaf node */ ulint* offsets)/*!< in/out: array consisting of offsets[0] allocated elements */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); #ifdef UNIV_DEBUG /************************************************************//** Validates offsets returned by rec_get_offsets(). @@ -488,7 +488,7 @@ rec_offs_validate( const dict_index_t* index, /*!< in: record descriptor or NULL */ const ulint* offsets)/*!< in: array returned by rec_get_offsets() */ - __attribute__((nonnull(3), warn_unused_result)); + MY_ATTRIBUTE((nonnull(3), warn_unused_result)); /************************************************************//** Updates debug data in offsets, in order to avoid bogus rec_offs_validate() failures. */ @@ -500,7 +500,7 @@ rec_offs_make_valid( const dict_index_t* index, /*!< in: record descriptor */ ulint* offsets)/*!< in: array returned by rec_get_offsets() */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); #else # define rec_offs_make_valid(rec, index, offsets) ((void) 0) #endif /* UNIV_DEBUG */ @@ -517,7 +517,7 @@ rec_get_nth_field_offs_old( ulint n, /*!< in: index of the field */ ulint* len) /*!< out: length of the field; UNIV_SQL_NULL if SQL null */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); #define rec_get_nth_field_old(rec, n, len) \ ((rec) + rec_get_nth_field_offs_old(rec, n, len)) /************************************************************//** @@ -531,7 +531,7 @@ rec_get_nth_field_size( /*===================*/ const rec_t* rec, /*!< in: record */ ulint n) /*!< in: index of the field */ - __attribute__((nonnull, pure, warn_unused_result)); + MY_ATTRIBUTE((nonnull, pure, warn_unused_result)); /************************************************************//** The following function is used to get an offset to the nth data field in a record. @@ -544,7 +544,7 @@ rec_get_nth_field_offs( ulint n, /*!< in: index of the field */ ulint* len) /*!< out: length of the field; UNIV_SQL_NULL if SQL null */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); #define rec_get_nth_field(rec, offsets, n, len) \ ((rec) + rec_get_nth_field_offs(offsets, n, len)) /******************************************************//** @@ -556,7 +556,7 @@ ulint rec_offs_comp( /*==========*/ const ulint* offsets)/*!< in: array returned by rec_get_offsets() */ - __attribute__((nonnull, pure, warn_unused_result)); + MY_ATTRIBUTE((nonnull, pure, warn_unused_result)); /******************************************************//** Determine if the offsets are for a record containing externally stored columns. @@ -566,7 +566,7 @@ ulint rec_offs_any_extern( /*================*/ const ulint* offsets)/*!< in: array returned by rec_get_offsets() */ - __attribute__((nonnull, pure, warn_unused_result)); + MY_ATTRIBUTE((nonnull, pure, warn_unused_result)); /******************************************************//** Determine if the offsets are for a record containing null BLOB pointers. @return first field containing a null BLOB pointer, or NULL if none found */ @@ -576,7 +576,7 @@ rec_offs_any_null_extern( /*=====================*/ const rec_t* rec, /*!< in: record */ const ulint* offsets) /*!< in: rec_get_offsets(rec) */ - __attribute__((nonnull, pure, warn_unused_result)); + MY_ATTRIBUTE((nonnull, pure, warn_unused_result)); /******************************************************//** Returns nonzero if the extern bit is set in nth field of rec. @return nonzero if externally stored */ @@ -586,7 +586,7 @@ rec_offs_nth_extern( /*================*/ const ulint* offsets,/*!< in: array returned by rec_get_offsets() */ ulint n) /*!< in: nth field */ - __attribute__((nonnull, pure, warn_unused_result)); + MY_ATTRIBUTE((nonnull, pure, warn_unused_result)); /******************************************************//** Returns nonzero if the SQL NULL bit is set in nth field of rec. @return nonzero if SQL NULL */ @@ -596,7 +596,7 @@ rec_offs_nth_sql_null( /*==================*/ const ulint* offsets,/*!< in: array returned by rec_get_offsets() */ ulint n) /*!< in: nth field */ - __attribute__((nonnull, pure, warn_unused_result)); + MY_ATTRIBUTE((nonnull, pure, warn_unused_result)); /******************************************************//** Gets the physical size of a field. @return length of field */ @@ -606,7 +606,7 @@ rec_offs_nth_size( /*==============*/ const ulint* offsets,/*!< in: array returned by rec_get_offsets() */ ulint n) /*!< in: nth field */ - __attribute__((nonnull, pure, warn_unused_result)); + MY_ATTRIBUTE((nonnull, pure, warn_unused_result)); /******************************************************//** Returns the number of extern bits set in a record. @@ -616,7 +616,7 @@ ulint rec_offs_n_extern( /*==============*/ const ulint* offsets)/*!< in: array returned by rec_get_offsets() */ - __attribute__((nonnull, pure, warn_unused_result)); + MY_ATTRIBUTE((nonnull, pure, warn_unused_result)); /***********************************************************//** This is used to modify the value of an already existing field in a record. The previous value must have exactly the same size as the new value. If len @@ -636,7 +636,7 @@ rec_set_nth_field( length as the previous value. If SQL null, previous value must be SQL null. */ - __attribute__((nonnull(1,2))); + MY_ATTRIBUTE((nonnull(1,2))); /**********************************************************//** The following function returns the data size of an old-style physical record, that is the sum of field lengths. SQL null fields @@ -648,7 +648,7 @@ ulint rec_get_data_size_old( /*==================*/ const rec_t* rec) /*!< in: physical record */ - __attribute__((nonnull, pure, warn_unused_result)); + MY_ATTRIBUTE((nonnull, pure, warn_unused_result)); /**********************************************************//** The following function returns the number of allocated elements for an array of offsets. @@ -658,7 +658,7 @@ ulint rec_offs_get_n_alloc( /*=================*/ const ulint* offsets)/*!< in: array for rec_get_offsets() */ - __attribute__((nonnull, pure, warn_unused_result)); + MY_ATTRIBUTE((nonnull, pure, warn_unused_result)); /**********************************************************//** The following function sets the number of allocated elements for an array of offsets. */ @@ -669,7 +669,7 @@ rec_offs_set_n_alloc( ulint* offsets, /*!< out: array for rec_get_offsets(), must be allocated */ ulint n_alloc) /*!< in: number of elements */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); #define rec_offs_init(offsets) \ rec_offs_set_n_alloc(offsets, (sizeof offsets) / sizeof *offsets) /**********************************************************//** @@ -680,7 +680,7 @@ ulint rec_offs_n_fields( /*==============*/ const ulint* offsets)/*!< in: array returned by rec_get_offsets() */ - __attribute__((nonnull, pure, warn_unused_result)); + MY_ATTRIBUTE((nonnull, pure, warn_unused_result)); /**********************************************************//** The following function returns the data size of a physical record, that is the sum of field lengths. SQL null fields @@ -692,7 +692,7 @@ ulint rec_offs_data_size( /*===============*/ const ulint* offsets)/*!< in: array returned by rec_get_offsets() */ - __attribute__((nonnull, pure, warn_unused_result)); + MY_ATTRIBUTE((nonnull, pure, warn_unused_result)); /**********************************************************//** Returns the total size of record minus data size of record. The value returned by the function is the distance from record @@ -703,7 +703,7 @@ ulint rec_offs_extra_size( /*================*/ const ulint* offsets)/*!< in: array returned by rec_get_offsets() */ - __attribute__((nonnull, pure, warn_unused_result)); + MY_ATTRIBUTE((nonnull, pure, warn_unused_result)); /**********************************************************//** Returns the total size of a physical record. @return size */ @@ -712,7 +712,7 @@ ulint rec_offs_size( /*==========*/ const ulint* offsets)/*!< in: array returned by rec_get_offsets() */ - __attribute__((nonnull, pure, warn_unused_result)); + MY_ATTRIBUTE((nonnull, pure, warn_unused_result)); #ifdef UNIV_DEBUG /**********************************************************//** Returns a pointer to the start of the record. @@ -723,7 +723,7 @@ rec_get_start( /*==========*/ const rec_t* rec, /*!< in: pointer to record */ const ulint* offsets)/*!< in: array returned by rec_get_offsets() */ - __attribute__((nonnull, pure, warn_unused_result)); + MY_ATTRIBUTE((nonnull, pure, warn_unused_result)); /**********************************************************//** Returns a pointer to the end of the record. @return pointer to end */ @@ -733,7 +733,7 @@ rec_get_end( /*========*/ const rec_t* rec, /*!< in: pointer to record */ const ulint* offsets)/*!< in: array returned by rec_get_offsets() */ - __attribute__((nonnull, pure, warn_unused_result)); + MY_ATTRIBUTE((nonnull, pure, warn_unused_result)); #else /* UNIV_DEBUG */ # define rec_get_start(rec, offsets) ((rec) - rec_offs_extra_size(offsets)) # define rec_get_end(rec, offsets) ((rec) + rec_offs_data_size(offsets)) @@ -748,7 +748,7 @@ rec_copy( void* buf, /*!< in: buffer */ const rec_t* rec, /*!< in: physical record */ const ulint* offsets)/*!< in: array returned by rec_get_offsets() */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); #ifndef UNIV_HOTBACKUP /**********************************************************//** Determines the size of a data tuple prefix in a temporary file. @@ -761,7 +761,7 @@ rec_get_converted_size_temp( const dfield_t* fields, /*!< in: array of data fields */ ulint n_fields,/*!< in: number of data fields */ ulint* extra) /*!< out: extra size */ - __attribute__((warn_unused_result, nonnull)); + MY_ATTRIBUTE((warn_unused_result, nonnull)); /******************************************************//** Determine the offset to each field in temporary file. @@ -774,7 +774,7 @@ rec_init_offsets_temp( const dict_index_t* index, /*!< in: record descriptor */ ulint* offsets)/*!< in/out: array of offsets; in: n=rec_offs_n_fields(offsets) */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*********************************************************//** Builds a temporary file record out of a data tuple. @@ -787,7 +787,7 @@ rec_convert_dtuple_to_temp( const dict_index_t* index, /*!< in: record descriptor */ const dfield_t* fields, /*!< in: array of data fields */ ulint n_fields) /*!< in: number of fields */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /**************************************************************//** Copies the first n fields of a physical record to a new physical record in @@ -805,7 +805,7 @@ rec_copy_prefix_to_buf( for the copied prefix, or NULL */ ulint* buf_size) /*!< in/out: buffer size */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /************************************************************//** Folds a prefix of a physical record to a ulint. @return the folded value */ @@ -821,7 +821,7 @@ rec_fold( ulint n_bytes, /*!< in: number of bytes to fold in an incomplete last field */ index_id_t tree_id) /*!< in: index tree id */ - __attribute__((nonnull, pure, warn_unused_result)); + MY_ATTRIBUTE((nonnull, pure, warn_unused_result)); #endif /* !UNIV_HOTBACKUP */ /*********************************************************//** Builds a physical record out of a data tuple and @@ -837,7 +837,7 @@ rec_convert_dtuple_to_rec( const dtuple_t* dtuple, /*!< in: data tuple */ ulint n_ext) /*!< in: number of externally stored columns */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /**********************************************************//** Returns the extra size of an old-style physical record if we know its data size and number of fields. @@ -849,7 +849,7 @@ rec_get_converted_extra_size( ulint data_size, /*!< in: data size */ ulint n_fields, /*!< in: number of fields */ ulint n_ext) /*!< in: number of externally stored columns */ - __attribute__((const)); + MY_ATTRIBUTE((const)); /**********************************************************//** Determines the size of a data tuple prefix in ROW_FORMAT=COMPACT. @return total size */ @@ -861,7 +861,7 @@ rec_get_converted_size_comp_prefix( const dfield_t* fields, /*!< in: array of data fields */ ulint n_fields,/*!< in: number of data fields */ ulint* extra) /*!< out: extra size */ - __attribute__((warn_unused_result, nonnull(1,2))); + MY_ATTRIBUTE((warn_unused_result, nonnull(1,2))); /**********************************************************//** Determines the size of a data tuple in ROW_FORMAT=COMPACT. @return total size */ @@ -877,7 +877,7 @@ rec_get_converted_size_comp( const dfield_t* fields, /*!< in: array of data fields */ ulint n_fields,/*!< in: number of data fields */ ulint* extra) /*!< out: extra size */ - __attribute__((nonnull(1,3))); + MY_ATTRIBUTE((nonnull(1,3))); /**********************************************************//** The following function returns the size of a data tuple when converted to a physical record. @@ -889,7 +889,7 @@ rec_get_converted_size( dict_index_t* index, /*!< in: record descriptor */ const dtuple_t* dtuple, /*!< in: data tuple */ ulint n_ext) /*!< in: number of externally stored columns */ - __attribute__((warn_unused_result, nonnull)); + MY_ATTRIBUTE((warn_unused_result, nonnull)); #ifndef UNIV_HOTBACKUP /**************************************************************//** Copies the first n fields of a physical record to a data tuple. @@ -904,7 +904,7 @@ rec_copy_prefix_to_dtuple( ulint n_fields, /*!< in: number of fields to copy */ mem_heap_t* heap) /*!< in: memory heap */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); #endif /* !UNIV_HOTBACKUP */ /***************************************************************//** Validates the consistency of a physical record. @@ -915,7 +915,7 @@ rec_validate( /*=========*/ const rec_t* rec, /*!< in: physical record */ const ulint* offsets)/*!< in: array returned by rec_get_offsets() */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /***************************************************************//** Prints an old-style physical record. */ UNIV_INTERN @@ -924,7 +924,7 @@ rec_print_old( /*==========*/ FILE* file, /*!< in: file where to print */ const rec_t* rec) /*!< in: physical record */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); #ifndef UNIV_HOTBACKUP /***************************************************************//** Prints a physical record in ROW_FORMAT=COMPACT. Ignores the @@ -936,7 +936,7 @@ rec_print_comp( FILE* file, /*!< in: file where to print */ const rec_t* rec, /*!< in: physical record */ const ulint* offsets)/*!< in: array returned by rec_get_offsets() */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /***************************************************************//** Prints a physical record. */ UNIV_INTERN @@ -946,7 +946,7 @@ rec_print_new( FILE* file, /*!< in: file where to print */ const rec_t* rec, /*!< in: physical record */ const ulint* offsets)/*!< in: array returned by rec_get_offsets() */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /***************************************************************//** Prints a physical record. */ UNIV_INTERN @@ -956,7 +956,7 @@ rec_print( FILE* file, /*!< in: file where to print */ const rec_t* rec, /*!< in: physical record */ const dict_index_t* index) /*!< in: record descriptor */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); # ifdef UNIV_DEBUG /************************************************************//** @@ -968,7 +968,7 @@ rec_get_trx_id( /*===========*/ const rec_t* rec, /*!< in: record */ const dict_index_t* index) /*!< in: clustered index */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); # endif /* UNIV_DEBUG */ #endif /* UNIV_HOTBACKUP */ diff --git a/mysql-wsrep-5.6/storage/innobase/include/rem0rec.ic b/mysql-wsrep-5.6/storage/innobase/include/rem0rec.ic index a539320d..5811a77a 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/rem0rec.ic +++ b/mysql-wsrep-5.6/storage/innobase/include/rem0rec.ic @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1994, 2013, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -1540,7 +1540,8 @@ rec_copy( ulint extra_len; ulint data_len; - ut_ad(rec && buf); + ut_ad(rec != NULL); + ut_ad(buf != NULL); ut_ad(rec_offs_validate(rec, NULL, offsets)); ut_ad(rec_validate(rec, offsets)); diff --git a/mysql-wsrep-5.6/storage/innobase/include/row0ftsort.h b/mysql-wsrep-5.6/storage/innobase/include/row0ftsort.h index 4e04a099..e949ba30 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/row0ftsort.h +++ b/mysql-wsrep-5.6/storage/innobase/include/row0ftsort.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2010, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2010, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -187,7 +187,7 @@ row_fts_psort_info_init( instantiated */ fts_psort_t** merge) /*!< out: parallel merge info to be instantiated */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /********************************************************************//** Clean up and deallocate FTS parallel sort structures, and close temparary merge sort files */ @@ -275,5 +275,5 @@ row_fts_merge_insert( fts_psort_t* psort_info, /*!< parallel sort info */ ulint id) /* !< in: which auxiliary table's data to insert to */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); #endif /* row0ftsort_h */ diff --git a/mysql-wsrep-5.6/storage/innobase/include/row0import.h b/mysql-wsrep-5.6/storage/innobase/include/row0import.h index aa46fdb7..a821c230 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/row0import.h +++ b/mysql-wsrep-5.6/storage/innobase/include/row0import.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2012, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -46,7 +46,7 @@ row_import_for_mysql( dict_table_t* table, /*!< in/out: table */ row_prebuilt_t* prebuilt) /*!< in: prebuilt struct in MySQL */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*****************************************************************//** Update the DICT_TF2_DISCARDED flag in SYS_TABLES. @@ -64,7 +64,7 @@ row_import_update_discarded_flag( bool dict_locked) /*!< in: Set to true if the caller already owns the dict_sys_t:: mutex. */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*****************************************************************//** Update the (space, root page) of a table's indexes from the values @@ -83,7 +83,7 @@ row_import_update_index_root( bool dict_locked) /*!< in: Set to true if the caller already owns the dict_sys_t:: mutex. */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); #ifndef UNIV_NONINL #include "row0import.ic" #endif diff --git a/mysql-wsrep-5.6/storage/innobase/include/row0ins.h b/mysql-wsrep-5.6/storage/innobase/include/row0ins.h index 2a892d2f..71ee3907 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/row0ins.h +++ b/mysql-wsrep-5.6/storage/innobase/include/row0ins.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -53,7 +53,7 @@ row_ins_check_foreign_constraint( table, else the referenced table */ dtuple_t* entry, /*!< in: index entry for index */ que_thr_t* thr) /*!< in: query thread */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*********************************************************************//** Creates an insert node struct. @return own: insert node struct */ @@ -98,7 +98,7 @@ row_ins_clust_index_entry_low( dtuple_t* entry, /*!< in/out: index entry to insert */ ulint n_ext, /*!< in: number of externally stored columns */ que_thr_t* thr) /*!< in: query thread or NULL */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /***************************************************************//** Tries to insert an entry into a secondary index. If a record with exactly the same fields is found, the other record is necessarily marked deleted. @@ -123,7 +123,7 @@ row_ins_sec_index_entry_low( trx_id_t trx_id, /*!< in: PAGE_MAX_TRX_ID during row_log_table_apply(), or 0 */ que_thr_t* thr) /*!< in: query thread */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /***************************************************************//** Tries to insert the externally stored fields (off-page columns) of a clustered index entry. @@ -142,7 +142,7 @@ row_ins_index_entry_big_rec_func( const void* thd, /*!< in: connection, or NULL */ #endif /* DBUG_OFF */ ulint line) /*!< in: line number of caller */ - __attribute__((nonnull(1,2,3,4,5,6), warn_unused_result)); + MY_ATTRIBUTE((nonnull(1,2,3,4,5,6), warn_unused_result)); #ifdef DBUG_OFF # define row_ins_index_entry_big_rec(e,big,ofs,heap,index,thd,file,line) \ row_ins_index_entry_big_rec_func(e,big,ofs,heap,index,file,line) @@ -164,7 +164,7 @@ row_ins_clust_index_entry( dtuple_t* entry, /*!< in/out: index entry to insert */ que_thr_t* thr, /*!< in: query thread */ ulint n_ext) /*!< in: number of externally stored columns */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /***************************************************************//** Inserts an entry into a secondary index. Tries first optimistic, then pessimistic descent down the tree. If the entry matches enough @@ -178,7 +178,7 @@ row_ins_sec_index_entry( dict_index_t* index, /*!< in: secondary index */ dtuple_t* entry, /*!< in/out: index entry to insert */ que_thr_t* thr) /*!< in: query thread */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /***********************************************************//** Inserts a row to a table. This is a high-level function used in SQL execution graphs. diff --git a/mysql-wsrep-5.6/storage/innobase/include/row0log.h b/mysql-wsrep-5.6/storage/innobase/include/row0log.h index 5eed390a..ec145565 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/row0log.h +++ b/mysql-wsrep-5.6/storage/innobase/include/row0log.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2011, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2011, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -54,7 +54,7 @@ row_log_allocate( const ulint* col_map,/*!< in: mapping of old column numbers to new ones, or NULL if !table */ const char* path) /*!< in: where to create temporary file */ - __attribute__((nonnull(1), warn_unused_result)); + MY_ATTRIBUTE((nonnull(1), warn_unused_result)); /******************************************************//** Free the row log for an index that was being created online. */ @@ -63,7 +63,7 @@ void row_log_free( /*=========*/ row_log_t*& log) /*!< in,own: row log */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /******************************************************//** Free the row log for an index on which online creation was aborted. */ @@ -72,7 +72,7 @@ void row_log_abort_sec( /*==============*/ dict_index_t* index) /*!< in/out: index (x-latched) */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /******************************************************//** Try to log an operation to a secondary index that is @@ -87,7 +87,7 @@ row_log_online_op_try( const dtuple_t* tuple, /*!< in: index tuple */ trx_id_t trx_id) /*!< in: transaction ID for insert, or 0 for delete */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /******************************************************//** Logs an operation to a secondary index that is (or was) being created. */ UNIV_INTERN @@ -98,7 +98,7 @@ row_log_online_op( const dtuple_t* tuple, /*!< in: index tuple */ trx_id_t trx_id) /*!< in: transaction ID for insert, or 0 for delete */ - UNIV_COLD __attribute__((nonnull)); + UNIV_COLD MY_ATTRIBUTE((nonnull)); /******************************************************//** Gets the error status of the online index rebuild log. @@ -109,7 +109,7 @@ row_log_table_get_error( /*====================*/ const dict_index_t* index) /*!< in: clustered index of a table that is being rebuilt online */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /******************************************************//** Logs a delete operation to a table that is being rebuilt. @@ -125,7 +125,7 @@ row_log_table_delete( const ulint* offsets,/*!< in: rec_get_offsets(rec,index) */ const byte* sys) /*!< in: DB_TRX_ID,DB_ROLL_PTR that should be logged, or NULL to use those in rec */ - UNIV_COLD __attribute__((nonnull(1,2,3))); + UNIV_COLD MY_ATTRIBUTE((nonnull(1,2,3))); /******************************************************//** Logs an update operation to a table that is being rebuilt. @@ -141,7 +141,7 @@ row_log_table_update( const ulint* offsets,/*!< in: rec_get_offsets(rec,index) */ const dtuple_t* old_pk) /*!< in: row_log_table_get_pk() before the update */ - UNIV_COLD __attribute__((nonnull(1,2,3))); + UNIV_COLD MY_ATTRIBUTE((nonnull(1,2,3))); /******************************************************//** Constructs the old PRIMARY KEY and DB_TRX_ID,DB_ROLL_PTR @@ -161,7 +161,7 @@ row_log_table_get_pk( byte* sys, /*!< out: DB_TRX_ID,DB_ROLL_PTR for row_log_table_delete(), or NULL */ mem_heap_t** heap) /*!< in/out: memory heap where allocated */ - UNIV_COLD __attribute__((nonnull(1,2,5), warn_unused_result)); + UNIV_COLD MY_ATTRIBUTE((nonnull(1,2,5), warn_unused_result)); /******************************************************//** Logs an insert to a table that is being rebuilt. @@ -175,7 +175,7 @@ row_log_table_insert( dict_index_t* index, /*!< in/out: clustered index, S-latched or X-latched */ const ulint* offsets)/*!< in: rec_get_offsets(rec,index) */ - UNIV_COLD __attribute__((nonnull)); + UNIV_COLD MY_ATTRIBUTE((nonnull)); /******************************************************//** Notes that a BLOB is being freed during online ALTER TABLE. */ UNIV_INTERN @@ -184,7 +184,7 @@ row_log_table_blob_free( /*====================*/ dict_index_t* index, /*!< in/out: clustered index, X-latched */ ulint page_no)/*!< in: starting page number of the BLOB */ - UNIV_COLD __attribute__((nonnull)); + UNIV_COLD MY_ATTRIBUTE((nonnull)); /******************************************************//** Notes that a BLOB is being allocated during online ALTER TABLE. */ UNIV_INTERN @@ -193,7 +193,7 @@ row_log_table_blob_alloc( /*=====================*/ dict_index_t* index, /*!< in/out: clustered index, X-latched */ ulint page_no)/*!< in: starting page number of the BLOB */ - UNIV_COLD __attribute__((nonnull)); + UNIV_COLD MY_ATTRIBUTE((nonnull)); /******************************************************//** Apply the row_log_table log to a table upon completing rebuild. @return DB_SUCCESS, or error code on failure */ @@ -206,7 +206,7 @@ row_log_table_apply( /*!< in: old table */ struct TABLE* table) /*!< in/out: MySQL table (for reporting duplicates) */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /******************************************************//** Get the latest transaction ID that has invoked row_log_online_op() @@ -217,7 +217,7 @@ trx_id_t row_log_get_max_trx( /*================*/ dict_index_t* index) /*!< in: index, must be locked */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /******************************************************//** Merge the row log to the index upon completing index creation. @@ -231,7 +231,7 @@ row_log_apply( dict_index_t* index, /*!< in/out: secondary index */ struct TABLE* table) /*!< in/out: MySQL table (for reporting duplicates) */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); #ifndef UNIV_NONINL #include "row0log.ic" diff --git a/mysql-wsrep-5.6/storage/innobase/include/row0merge.h b/mysql-wsrep-5.6/storage/innobase/include/row0merge.h index 06e9fec5..9d3395f3 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/row0merge.h +++ b/mysql-wsrep-5.6/storage/innobase/include/row0merge.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2005, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2005, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -127,7 +127,7 @@ row_merge_dup_report( /*=================*/ row_merge_dup_t* dup, /*!< in/out: for reporting duplicates */ const dfield_t* entry) /*!< in: duplicate index entry */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*********************************************************************//** Sets an exclusive lock on a table, for the duration of creating indexes. @return error code or DB_SUCCESS */ @@ -138,7 +138,7 @@ row_merge_lock_table( trx_t* trx, /*!< in/out: transaction */ dict_table_t* table, /*!< in: table to lock */ enum lock_mode mode) /*!< in: LOCK_X or LOCK_S */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*********************************************************************//** Drop indexes that were created before an error occurred. The data dictionary must have been locked exclusively by the caller, @@ -149,7 +149,7 @@ row_merge_drop_indexes_dict( /*========================*/ trx_t* trx, /*!< in/out: dictionary transaction */ table_id_t table_id)/*!< in: table identifier */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*********************************************************************//** Drop those indexes which were created before an error occurred. The data dictionary must have been locked exclusively by the caller, @@ -162,7 +162,7 @@ row_merge_drop_indexes( dict_table_t* table, /*!< in/out: table containing the indexes */ ibool locked) /*!< in: TRUE=table locked, FALSE=may need to do a lazy drop */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*********************************************************************//** Drop all partially created indexes during crash recovery. */ UNIV_INTERN @@ -178,7 +178,7 @@ UNIV_INTERN int row_merge_file_create_low( const char* path) - __attribute__((warn_unused_result)); + MY_ATTRIBUTE((warn_unused_result)); /*********************************************************************//** Destroy a merge file. And de-register the file from Performance Schema if UNIV_PFS_IO is defined. */ @@ -214,7 +214,7 @@ row_merge_rename_tables_dict( old_table->name */ const char* tmp_name, /*!< in: new name for old_table */ trx_t* trx) /*!< in/out: dictionary transaction */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*********************************************************************//** Rename an index in the dictionary that was created. The data @@ -228,7 +228,7 @@ row_merge_rename_index_to_add( trx_t* trx, /*!< in/out: transaction */ table_id_t table_id, /*!< in: table identifier */ index_id_t index_id) /*!< in: index identifier */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*********************************************************************//** Rename an index in the dictionary that is to be dropped. The data dictionary must have been locked exclusively by the caller, because @@ -241,7 +241,7 @@ row_merge_rename_index_to_drop( trx_t* trx, /*!< in/out: transaction */ table_id_t table_id, /*!< in: table identifier */ index_id_t index_id) /*!< in: index identifier */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*********************************************************************//** Create the index and load in to the dictionary. @return index, or NULL on error */ @@ -274,7 +274,7 @@ row_merge_drop_table( /*=================*/ trx_t* trx, /*!< in: transaction */ dict_table_t* table) /*!< in: table instance to drop */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*********************************************************************//** Build indexes on a table by reading a clustered index, creating a temporary file containing index entries, merge sorting @@ -307,7 +307,7 @@ row_merge_build_indexes( AUTO_INCREMENT column, or ULINT_UNDEFINED if none is added */ ib_sequence_t& sequence) /*!< in/out: autoinc sequence */ - __attribute__((nonnull(1,2,3,5,6,8), warn_unused_result)); + MY_ATTRIBUTE((nonnull(1,2,3,5,6,8), warn_unused_result)); /********************************************************************//** Write a buffer to a block. */ UNIV_INTERN @@ -317,7 +317,7 @@ row_merge_buf_write( const row_merge_buf_t* buf, /*!< in: sorted buffer */ const merge_file_t* of, /*!< in: output file */ row_merge_block_t* block) /*!< out: buffer for writing to file */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /********************************************************************//** Sort a buffer. */ UNIV_INTERN @@ -327,7 +327,7 @@ row_merge_buf_sort( row_merge_buf_t* buf, /*!< in/out: sort buffer */ row_merge_dup_t* dup) /*!< in/out: reporter of duplicates (NULL if non-unique index) */ - __attribute__((nonnull(1))); + MY_ATTRIBUTE((nonnull(1))); /********************************************************************//** Write a merge block to the file system. @return TRUE if request was successful, FALSE if fail */ @@ -347,7 +347,7 @@ row_merge_buf_t* row_merge_buf_empty( /*================*/ row_merge_buf_t* buf) /*!< in,own: sort buffer */ - __attribute__((warn_unused_result, nonnull)); + MY_ATTRIBUTE((warn_unused_result, nonnull)); /** Create a merge file in the given location. @param[out] merge_file merge file structure @@ -373,7 +373,7 @@ row_merge_sort( index entries */ row_merge_block_t* block, /*!< in/out: 3 buffers */ int* tmpfd) /*!< in/out: temporary file handle */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*********************************************************************//** Allocate a sort buffer. @return own: sort buffer */ @@ -382,7 +382,7 @@ row_merge_buf_t* row_merge_buf_create( /*=================*/ dict_index_t* index) /*!< in: secondary index */ - __attribute__((warn_unused_result, nonnull, malloc)); + MY_ATTRIBUTE((warn_unused_result, nonnull, malloc)); /*********************************************************************//** Deallocate a sort buffer. */ UNIV_INTERN @@ -390,7 +390,7 @@ void row_merge_buf_free( /*===============*/ row_merge_buf_t* buf) /*!< in,own: sort buffer to be freed */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*********************************************************************//** Destroy a merge file. */ UNIV_INTERN @@ -398,7 +398,7 @@ void row_merge_file_destroy( /*===================*/ merge_file_t* merge_file) /*!< in/out: merge file structure */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /********************************************************************//** Read a merge block from the file system. @return TRUE if request was successful, FALSE if fail */ @@ -428,5 +428,5 @@ row_merge_read_rec( or NULL on end of list (non-NULL on I/O error) */ ulint* offsets)/*!< out: offsets of mrec */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); #endif /* row0merge.h */ diff --git a/mysql-wsrep-5.6/storage/innobase/include/row0mysql.h b/mysql-wsrep-5.6/storage/innobase/include/row0mysql.h index 06c07002..fc1846b7 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/row0mysql.h +++ b/mysql-wsrep-5.6/storage/innobase/include/row0mysql.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2000, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2000, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -167,7 +167,7 @@ row_mysql_handle_errors( trx_t* trx, /*!< in: transaction */ que_thr_t* thr, /*!< in: query thread, or NULL */ trx_savept_t* savept) /*!< in: savepoint, or NULL */ - __attribute__((nonnull(1,2))); + MY_ATTRIBUTE((nonnull(1,2))); /********************************************************************//** Create a prebuilt struct for a MySQL table handle. @return own: a prebuilt struct */ @@ -209,7 +209,7 @@ row_lock_table_autoinc_for_mysql( /*=============================*/ row_prebuilt_t* prebuilt) /*!< in: prebuilt struct in the MySQL table handle */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*********************************************************************//** Sets a table lock on the table mentioned in prebuilt. @return error code or DB_SUCCESS */ @@ -225,7 +225,7 @@ row_lock_table_for_mysql( prebuilt->select_lock_type */ ulint mode) /*!< in: lock mode of table (ignored if table==NULL) */ - __attribute__((nonnull(1))); + MY_ATTRIBUTE((nonnull(1))); /*********************************************************************//** Does an insert for MySQL. @return error code or DB_SUCCESS */ @@ -236,7 +236,7 @@ row_insert_for_mysql( byte* mysql_rec, /*!< in: row in the MySQL format */ row_prebuilt_t* prebuilt) /*!< in: prebuilt struct in MySQL handle */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*********************************************************************//** Builds a dummy query graph used in selects. */ UNIV_INTERN @@ -276,7 +276,7 @@ row_update_for_mysql( the MySQL format */ row_prebuilt_t* prebuilt) /*!< in: prebuilt struct in MySQL handle */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*********************************************************************//** This can only be used when srv_locks_unsafe_for_binlog is TRUE or this session is using a READ COMMITTED or READ UNCOMMITTED isolation level. @@ -297,7 +297,7 @@ row_unlock_for_mysql( the records under pcur and clust_pcur, and we do not need to reposition the cursors. */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*********************************************************************//** Checks if a table name contains the string "/#sql" which denotes temporary tables in MySQL. @@ -306,7 +306,7 @@ UNIV_INTERN bool row_is_mysql_tmp_table_name( /*========================*/ - const char* name) __attribute__((warn_unused_result)); + const char* name) MY_ATTRIBUTE((warn_unused_result)); /*!< in: table name in the form 'database/tablename' */ @@ -331,7 +331,7 @@ row_update_cascade_for_mysql( upd_node_t* node, /*!< in: update node used in the cascade or set null operation */ dict_table_t* table) /*!< in: table where we do the operation */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*********************************************************************//** Locks the data dictionary exclusively for performing a table create or other data dictionary modification operation. */ @@ -387,7 +387,7 @@ row_create_table_for_mysql( added to the data dictionary cache) */ trx_t* trx, /*!< in/out: transaction */ bool commit) /*!< in: if true, commit the transaction */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*********************************************************************//** Does an index creation operation for MySQL. TODO: currently failure to create an index results in dropping the whole table! This is no problem @@ -406,7 +406,7 @@ row_create_index_for_mysql( index columns, which are then checked for not being too large. */ - __attribute__((nonnull(1,2), warn_unused_result)); + MY_ATTRIBUTE((nonnull(1,2), warn_unused_result)); /*********************************************************************//** Scans a table create SQL string and adds to the data dictionary the foreign key constraints declared in the string. This function @@ -432,7 +432,7 @@ row_table_add_foreign_constraints( ibool reject_fks) /*!< in: if TRUE, fail with error code DB_CANNOT_ADD_CONSTRAINT if any foreign keys are found. */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*********************************************************************//** The master thread in srv0srv.cc calls this regularly to drop tables which we must drop in background after queries to them have ended. Such lazy @@ -461,7 +461,7 @@ row_mysql_lock_table( dict_table_t* table, /*!< in: table to lock */ enum lock_mode mode, /*!< in: LOCK_X or LOCK_S */ const char* op_info) /*!< in: string for trx->op_info */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*********************************************************************//** Truncates a table for MySQL. @@ -472,7 +472,7 @@ row_truncate_table_for_mysql( /*=========================*/ dict_table_t* table, /*!< in: table handle */ trx_t* trx) /*!< in: transaction handle */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*********************************************************************//** Drops a table for MySQL. If the name of the dropped table ends in one of "innodb_monitor", "innodb_lock_monitor", "innodb_tablespace_monitor", @@ -491,7 +491,7 @@ row_drop_table_for_mysql( bool nonatomic = true) /*!< in: whether it is permitted to release and reacquire dict_operation_lock */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*********************************************************************//** Drop all temporary tables during crash recovery. */ UNIV_INTERN @@ -510,7 +510,7 @@ row_discard_tablespace_for_mysql( /*=============================*/ const char* name, /*!< in: table name */ trx_t* trx) /*!< in: transaction handle */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*****************************************************************//** Imports a tablespace. The space id in the .ibd file must match the space id of the table in the data dictionary. @@ -521,7 +521,7 @@ row_import_tablespace_for_mysql( /*============================*/ dict_table_t* table, /*!< in/out: table */ row_prebuilt_t* prebuilt) /*!< in: prebuilt struct in MySQL */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*********************************************************************//** Drops a database for MySQL. @return error code or DB_SUCCESS */ @@ -531,7 +531,7 @@ row_drop_database_for_mysql( /*========================*/ const char* name, /*!< in: database name which ends to '/' */ trx_t* trx) /*!< in: transaction handle */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*********************************************************************//** Renames a table for MySQL. @return error code or DB_SUCCESS */ @@ -543,7 +543,7 @@ row_rename_table_for_mysql( const char* new_name, /*!< in: new table name */ trx_t* trx, /*!< in/out: transaction */ bool commit) /*!< in: whether to commit trx */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*********************************************************************//** Checks that the index contains entries in an ascending order, unique constraint is not broken, and calculates the number of index entries @@ -558,7 +558,7 @@ row_check_index_for_mysql( const dict_index_t* index, /*!< in: index */ ulint* n_rows) /*!< out: number of entries seen in the consistent read */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*********************************************************************//** Determines if a table is a magic monitor table. @return true if monitor table */ @@ -568,7 +568,7 @@ row_is_magic_monitor_table( /*=======================*/ const char* table_name) /*!< in: name of the table, in the form database/table_name */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*********************************************************************//** Initialize this module */ UNIV_INTERN @@ -593,7 +593,7 @@ row_mysql_table_id_reassign( dict_table_t* table, /*!< in/out: table */ trx_t* trx, /*!< in/out: transaction */ table_id_t* new_id) /*!< out: new table id */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /* A struct describing a place for an individual column in the MySQL row format which is presented to the table handler in ha_innobase. diff --git a/mysql-wsrep-5.6/storage/innobase/include/row0purge.h b/mysql-wsrep-5.6/storage/innobase/include/row0purge.h index 888289a6..5df899bc 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/row0purge.h +++ b/mysql-wsrep-5.6/storage/innobase/include/row0purge.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1997, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -47,7 +47,7 @@ row_purge_node_create( que_thr_t* parent, /*!< in: parent node, i.e., a thr node */ mem_heap_t* heap) /*!< in: memory heap where created */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /***********************************************************//** Determines if it is possible to remove a secondary index entry. Removal is possible if the secondary index entry does not refer to any @@ -70,7 +70,7 @@ row_purge_poss_sec( purge_node_t* node, /*!< in/out: row purge node */ dict_index_t* index, /*!< in: secondary index */ const dtuple_t* entry) /*!< in: secondary index entry */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*************************************************************** Does the purge operation for a single undo log record. This is a high-level function used in an SQL execution graph. @@ -80,7 +80,7 @@ que_thr_t* row_purge_step( /*===========*/ que_thr_t* thr) /*!< in: query thread */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /* Purge node structure */ diff --git a/mysql-wsrep-5.6/storage/innobase/include/row0quiesce.h b/mysql-wsrep-5.6/storage/innobase/include/row0quiesce.h index 1d6d1129..35d8184d 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/row0quiesce.h +++ b/mysql-wsrep-5.6/storage/innobase/include/row0quiesce.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2012, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -43,7 +43,7 @@ row_quiesce_table_start( /*====================*/ dict_table_t* table, /*!< in: quiesce this table */ trx_t* trx) /*!< in/out: transaction/session */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*********************************************************************//** Set a table's quiesce state. @@ -55,7 +55,7 @@ row_quiesce_set_state( dict_table_t* table, /*!< in: quiesce this table */ ib_quiesce_t state, /*!< in: quiesce state to set */ trx_t* trx) /*!< in/out: transaction */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*********************************************************************//** Cleanup after table quiesce. */ @@ -65,7 +65,7 @@ row_quiesce_table_complete( /*=======================*/ dict_table_t* table, /*!< in: quiesce this table */ trx_t* trx) /*!< in/out: transaction/session */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); #ifndef UNIV_NONINL #include "row0quiesce.ic" diff --git a/mysql-wsrep-5.6/storage/innobase/include/row0row.h b/mysql-wsrep-5.6/storage/innobase/include/row0row.h index a4e5e0dd..b04068c5 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/row0row.h +++ b/mysql-wsrep-5.6/storage/innobase/include/row0row.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -47,7 +47,7 @@ row_get_trx_id_offset( /*==================*/ const dict_index_t* index, /*!< in: clustered index */ const ulint* offsets)/*!< in: record offsets */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*********************************************************************//** Reads the trx id field from a clustered index record. @return value of the field */ @@ -58,7 +58,7 @@ row_get_rec_trx_id( const rec_t* rec, /*!< in: record */ const dict_index_t* index, /*!< in: clustered index */ const ulint* offsets)/*!< in: rec_get_offsets(rec, index) */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*********************************************************************//** Reads the roll pointer field from a clustered index record. @return value of the field */ @@ -69,7 +69,7 @@ row_get_rec_roll_ptr( const rec_t* rec, /*!< in: record */ const dict_index_t* index, /*!< in: clustered index */ const ulint* offsets)/*!< in: rec_get_offsets(rec, index) */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*****************************************************************//** When an insert or purge to a table is performed, this function builds the entry to be inserted into or purged from an index on the table. @@ -88,7 +88,7 @@ row_build_index_entry_low( mem_heap_t* heap) /*!< in: memory heap from which the memory for the index entry is allocated */ - __attribute__((warn_unused_result, nonnull(1,3,4))); + MY_ATTRIBUTE((warn_unused_result, nonnull(1,3,4))); /*****************************************************************//** When an insert or purge to a table is performed, this function builds the entry to be inserted into or purged from an index on the table. @@ -107,7 +107,7 @@ row_build_index_entry( mem_heap_t* heap) /*!< in: memory heap from which the memory for the index entry is allocated */ - __attribute__((warn_unused_result, nonnull(1,3,4))); + MY_ATTRIBUTE((warn_unused_result, nonnull(1,3,4))); /*******************************************************************//** An inverse function to row_build_index_entry. Builds a row from a record in a clustered index. @@ -155,7 +155,7 @@ row_build( prefixes, or NULL */ mem_heap_t* heap) /*!< in: memory heap from which the memory needed is allocated */ - __attribute__((nonnull(2,3,9))); + MY_ATTRIBUTE((nonnull(2,3,9))); /*******************************************************************//** Converts an index record to a typed data tuple. @return index entry built; does not set info_bits, and the data fields @@ -171,7 +171,7 @@ row_rec_to_index_entry_low( stored columns */ mem_heap_t* heap) /*!< in: memory heap from which the memory needed is allocated */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*******************************************************************//** Converts an index record to a typed data tuple. NOTE that externally stored (often big) fields are NOT copied to heap. @@ -187,7 +187,7 @@ row_rec_to_index_entry( stored columns */ mem_heap_t* heap) /*!< in: memory heap from which the memory needed is allocated */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*******************************************************************//** Builds from a secondary index record a row reference with which we can search the clustered index record. @@ -210,7 +210,7 @@ row_build_row_ref( as long as the row reference is used! */ mem_heap_t* heap) /*!< in: memory heap from which the memory needed is allocated */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*******************************************************************//** Builds from a secondary index record a row reference with which we can search the clustered index record. */ @@ -232,7 +232,7 @@ row_build_row_ref_in_tuple( ulint* offsets,/*!< in: rec_get_offsets(rec, index) or NULL */ trx_t* trx) /*!< in: transaction or NULL */ - __attribute__((nonnull(1,2,3))); + MY_ATTRIBUTE((nonnull(1,2,3))); /*******************************************************************//** Builds from a secondary index record a row reference with which we can search the clustered index record. */ @@ -263,7 +263,7 @@ row_search_on_row_ref( const dict_table_t* table, /*!< in: table */ const dtuple_t* ref, /*!< in: row reference */ mtr_t* mtr) /*!< in/out: mtr */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*********************************************************************//** Fetches the clustered index record for a secondary index record. The latches on the secondary index record are preserved. @@ -277,7 +277,7 @@ row_get_clust_rec( dict_index_t* index, /*!< in: secondary index */ dict_index_t** clust_index,/*!< out: clustered index */ mtr_t* mtr) /*!< in: mtr */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /** Result of row_search_index_entry */ enum row_search_result { @@ -305,7 +305,7 @@ row_search_index_entry( btr_pcur_t* pcur, /*!< in/out: persistent cursor, which must be closed by the caller */ mtr_t* mtr) /*!< in: mtr */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); #define ROW_COPY_DATA 1 #define ROW_COPY_POINTERS 2 @@ -334,7 +334,7 @@ row_raw_format( char* buf, /*!< out: output buffer */ ulint buf_size) /*!< in: output buffer size in bytes */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); #ifndef UNIV_NONINL #include "row0row.ic" diff --git a/mysql-wsrep-5.6/storage/innobase/include/row0sel.h b/mysql-wsrep-5.6/storage/innobase/include/row0sel.h index c8be80f8..fd5bc755 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/row0sel.h +++ b/mysql-wsrep-5.6/storage/innobase/include/row0sel.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1997, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -168,7 +168,7 @@ row_search_for_mysql( then prebuilt must have a pcur with stored position! In opening of a cursor 'direction' should be 0. */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*******************************************************************//** Checks if MySQL at the moment is allowed for this table to retrieve a consistent read result, or store it to the query cache. @@ -190,7 +190,7 @@ row_search_max_autoinc( dict_index_t* index, /*!< in: index to search */ const char* col_name, /*!< in: autoinc column name */ ib_uint64_t* value) /*!< out: AUTOINC value read */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /** A structure for caching column values for prefetched rows */ struct sel_buf_t{ diff --git a/mysql-wsrep-5.6/storage/innobase/include/row0uins.h b/mysql-wsrep-5.6/storage/innobase/include/row0uins.h index ebf48812..89e334e5 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/row0uins.h +++ b/mysql-wsrep-5.6/storage/innobase/include/row0uins.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1997, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -46,7 +46,7 @@ dberr_t row_undo_ins( /*=========*/ undo_node_t* node) /*!< in: row undo node */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); #ifndef UNIV_NONINL #include "row0uins.ic" #endif diff --git a/mysql-wsrep-5.6/storage/innobase/include/row0umod.h b/mysql-wsrep-5.6/storage/innobase/include/row0umod.h index f89d5a33..4f1d8e1f 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/row0umod.h +++ b/mysql-wsrep-5.6/storage/innobase/include/row0umod.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1997, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -43,7 +43,7 @@ row_undo_mod( /*=========*/ undo_node_t* node, /*!< in: row undo node */ que_thr_t* thr) /*!< in: query thread */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); #ifndef UNIV_NONINL #include "row0umod.ic" diff --git a/mysql-wsrep-5.6/storage/innobase/include/row0upd.h b/mysql-wsrep-5.6/storage/innobase/include/row0upd.h index 27dedeb6..e59ec58b 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/row0upd.h +++ b/mysql-wsrep-5.6/storage/innobase/include/row0upd.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -91,7 +91,7 @@ upd_get_field_by_field_no( /*======================*/ const upd_t* update, /*!< in: update vector */ ulint no) /*!< in: field_no */ - __attribute__((nonnull, pure)); + MY_ATTRIBUTE((nonnull, pure)); /*********************************************************************//** Writes into the redo log the values of trx id and roll ptr and enough info to determine their positions within a clustered index record. @@ -174,7 +174,7 @@ bool row_upd_changes_disowned_external( /*==============================*/ const upd_t* update) /*!< in: update vector */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); #endif /* !UNIV_HOTBACKUP */ /***********************************************************//** Replaces the new column values stored in the update vector to the @@ -207,7 +207,7 @@ row_upd_build_sec_rec_difference_binary( const ulint* offsets,/*!< in: rec_get_offsets(rec, index) */ const dtuple_t* entry, /*!< in: entry to insert */ mem_heap_t* heap) /*!< in: memory heap from which allocated */ - __attribute__((warn_unused_result, nonnull)); + MY_ATTRIBUTE((warn_unused_result, nonnull)); /***************************************************************//** Builds an update vector from those fields, excluding the roll ptr and trx id fields, which in an index entry differ from a record that has @@ -227,7 +227,7 @@ row_upd_build_difference_binary( trx_t* trx, /*!< in: transaction (for diagnostics), or NULL */ mem_heap_t* heap) /*!< in: memory heap from which allocated */ - __attribute__((nonnull(1,2,3,7), warn_unused_result)); + MY_ATTRIBUTE((nonnull(1,2,3,7), warn_unused_result)); /***********************************************************//** Replaces the new column values stored in the update vector to the index entry given. */ @@ -250,7 +250,7 @@ row_upd_index_replace_new_col_vals_index_pos( does not work for non-clustered indexes. */ mem_heap_t* heap) /*!< in: memory heap for allocating and copying the new values */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /***********************************************************//** Replaces the new column values stored in the update vector to the index entry given. */ @@ -269,7 +269,7 @@ row_upd_index_replace_new_col_vals( an upd_field is the clustered index position */ mem_heap_t* heap) /*!< in: memory heap for allocating and copying the new values */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /***********************************************************//** Replaces the new column values stored in the update vector. */ UNIV_INTERN @@ -311,7 +311,7 @@ row_upd_changes_ord_field_binary_func( compile time */ const row_ext_t*ext) /*!< NULL, or prefixes of the externally stored columns in the old row */ - __attribute__((nonnull(1,2), warn_unused_result)); + MY_ATTRIBUTE((nonnull(1,2), warn_unused_result)); #ifdef UNIV_DEBUG # define row_upd_changes_ord_field_binary(index,update,thr,row,ext) \ row_upd_changes_ord_field_binary_func(index,update,thr,row,ext) @@ -338,7 +338,7 @@ row_upd_changes_doc_id( /*===================*/ dict_table_t* table, /*!< in: table */ upd_field_t* upd_field) /*!< in: field to check */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /***********************************************************//** Checks if an update vector changes an ordering field of an index record. This function is fast if the update vector is short or the number of ordering diff --git a/mysql-wsrep-5.6/storage/innobase/include/row0vers.h b/mysql-wsrep-5.6/storage/innobase/include/row0vers.h index 1df5b4d3..7b850215 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/row0vers.h +++ b/mysql-wsrep-5.6/storage/innobase/include/row0vers.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1997, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -110,7 +110,7 @@ row_vers_build_for_consistent_read( if the history is missing or the record does not exist in the view, that is, it was freshly inserted afterwards */ - __attribute__((nonnull(1,2,3,4,5,6,7))); + MY_ATTRIBUTE((nonnull(1,2,3,4,5,6,7))); /*****************************************************************//** Constructs the last committed version of a clustered index record, @@ -136,7 +136,7 @@ row_vers_build_for_semi_consistent_read( const rec_t** old_vers)/*!< out: rec, old version, or NULL if the record does not exist in the view, that is, it was freshly inserted afterwards */ - __attribute__((nonnull(1,2,3,4,5))); + MY_ATTRIBUTE((nonnull(1,2,3,4,5))); #ifndef UNIV_NONINL diff --git a/mysql-wsrep-5.6/storage/innobase/include/srv0srv.h b/mysql-wsrep-5.6/storage/innobase/include/srv0srv.h index e2c0ca68..7f2aeb12 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/srv0srv.h +++ b/mysql-wsrep-5.6/storage/innobase/include/srv0srv.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 1995, 2016, Oracle and/or its affiliates. All rights reserved. Copyright (c) 2008, 2009, Google Inc. Copyright (c) 2009, Percona Inc. @@ -738,7 +738,7 @@ UNIV_INTERN os_thread_ret_t DECLARE_THREAD(srv_purge_coordinator_thread)( /*=========================================*/ - void* arg __attribute__((unused))); /*!< in: a dummy parameter + void* arg MY_ATTRIBUTE((unused))); /*!< in: a dummy parameter required by os_thread_create */ /*********************************************************************//** @@ -748,7 +748,7 @@ UNIV_INTERN os_thread_ret_t DECLARE_THREAD(srv_worker_thread)( /*==============================*/ - void* arg __attribute__((unused))); /*!< in: a dummy parameter + void* arg MY_ATTRIBUTE((unused))); /*!< in: a dummy parameter required by os_thread_create */ } /* extern "C" */ diff --git a/mysql-wsrep-5.6/storage/innobase/include/srv0start.h b/mysql-wsrep-5.6/storage/innobase/include/srv0start.h index 40d502f4..963b767f 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/srv0start.h +++ b/mysql-wsrep-5.6/storage/innobase/include/srv0start.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -105,7 +105,7 @@ srv_path_copy( ulint dest_len, /*!< in: max bytes to copy */ const char* basedir, /*!< in: base directory */ const char* table_name) /*!< in: source table name */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*****************************************************************//** Get the meta-data filename from the table name. */ @@ -116,7 +116,7 @@ srv_get_meta_data_filename( dict_table_t* table, /*!< in: table */ char* filename, /*!< out: filename */ ulint max_len) /*!< in: filename max length */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /** Log sequence number at shutdown */ extern lsn_t srv_shutdown_lsn; diff --git a/mysql-wsrep-5.6/storage/innobase/include/sync0arr.h b/mysql-wsrep-5.6/storage/innobase/include/sync0arr.h index 15dbdcb5..a9e66f26 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/sync0arr.h +++ b/mysql-wsrep-5.6/storage/innobase/include/sync0arr.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2013, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -110,7 +110,7 @@ sync_array_print_long_waits( /*========================*/ os_thread_id_t* waiter, /*!< out: longest waiting thread */ const void** sema) /*!< out: longest-waited-for semaphore */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /********************************************************************//** Validates the integrity of the wait array. Checks that the number of reserved cells equals the count variable. */ diff --git a/mysql-wsrep-5.6/storage/innobase/include/sync0rw.h b/mysql-wsrep-5.6/storage/innobase/include/sync0rw.h index fdcbb1b6..6b1e99bb 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/sync0rw.h +++ b/mysql-wsrep-5.6/storage/innobase/include/sync0rw.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2014, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, Google Inc. Portions of this file contain modifications contributed and copyrighted by @@ -333,7 +333,7 @@ ibool rw_lock_s_lock_low( /*===============*/ rw_lock_t* lock, /*!< in: pointer to rw-lock */ - ulint pass __attribute__((unused)), + ulint pass MY_ATTRIBUTE((unused)), /*!< in: pass value; != 0, if the lock will be passed to another thread to unlock */ const char* file_name, /*!< in: file name where lock requested */ @@ -501,7 +501,7 @@ rw_lock_own( rw_lock_t* lock, /*!< in: rw-lock */ ulint lock_type) /*!< in: lock type: RW_LOCK_SHARED, RW_LOCK_EX */ - __attribute__((warn_unused_result)); + MY_ATTRIBUTE((warn_unused_result)); #endif /* UNIV_SYNC_DEBUG */ /******************************************************************//** Checks if somebody has locked the rw-lock in the specified mode. */ diff --git a/mysql-wsrep-5.6/storage/innobase/include/sync0rw.ic b/mysql-wsrep-5.6/storage/innobase/include/sync0rw.ic index bb05ae7d..f2d4215a 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/sync0rw.ic +++ b/mysql-wsrep-5.6/storage/innobase/include/sync0rw.ic @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2011, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, Google Inc. Portions of this file contain modifications contributed and copyrighted by @@ -306,7 +306,7 @@ ibool rw_lock_s_lock_low( /*===============*/ rw_lock_t* lock, /*!< in: pointer to rw-lock */ - ulint pass __attribute__((unused)), + ulint pass MY_ATTRIBUTE((unused)), /*!< in: pass value; != 0, if the lock will be passed to another thread to unlock */ const char* file_name, /*!< in: file name where lock requested */ diff --git a/mysql-wsrep-5.6/storage/innobase/include/sync0sync.h b/mysql-wsrep-5.6/storage/innobase/include/sync0sync.h index d6f8d8f5..95d9ef66 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/sync0sync.h +++ b/mysql-wsrep-5.6/storage/innobase/include/sync0sync.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, Google Inc. Copyright (c) 2012, Facebook Inc. @@ -400,7 +400,7 @@ ibool mutex_own( /*======*/ const ib_mutex_t* mutex) /*!< in: mutex */ - __attribute__((warn_unused_result)); + MY_ATTRIBUTE((warn_unused_result)); #endif /* UNIV_DEBUG */ #ifdef UNIV_SYNC_DEBUG /******************************************************************//** @@ -415,7 +415,7 @@ sync_thread_add_level( ulint level, /*!< in: level in the latching order; if SYNC_LEVEL_VARYING, nothing is done */ ibool relock) /*!< in: TRUE if re-entering an x-lock */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /******************************************************************//** Removes a latch from the thread level array if it is found there. @return TRUE if found in the array; it is no error if the latch is @@ -445,7 +445,7 @@ sync_thread_levels_nonempty_gen( /*============================*/ ibool dict_mutex_allowed) /*!< in: TRUE if dictionary mutex is allowed to be owned by the thread */ - __attribute__((warn_unused_result)); + MY_ATTRIBUTE((warn_unused_result)); /******************************************************************//** Checks if the level array for the current thread is empty, except for data dictionary latches. */ @@ -462,7 +462,7 @@ sync_thread_levels_nonempty_trx( ibool has_search_latch) /*!< in: TRUE if and only if the thread is supposed to hold btr_search_latch */ - __attribute__((warn_unused_result)); + MY_ATTRIBUTE((warn_unused_result)); /******************************************************************//** Gets the debug information for a reserved mutex. */ diff --git a/mysql-wsrep-5.6/storage/innobase/include/trx0rec.h b/mysql-wsrep-5.6/storage/innobase/include/trx0rec.h index 50da55d2..359937e3 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/trx0rec.h +++ b/mysql-wsrep-5.6/storage/innobase/include/trx0rec.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -86,7 +86,7 @@ ulint trx_undo_rec_get_offset( /*====================*/ undo_no_t undo_no) /*!< in: undo no read from node */ - __attribute__((const)); + MY_ATTRIBUTE((const)); /**********************************************************************//** Returns the start of the undo record data area. */ @@ -109,7 +109,7 @@ trx_undo_rec_get_pars( externally stored fild */ undo_no_t* undo_no, /*!< out: undo log record number */ table_id_t* table_id) /*!< out: table id */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*******************************************************************//** Builds a row reference from an undo log record. @return pointer to remaining part of undo record */ @@ -201,7 +201,7 @@ trx_undo_rec_get_partial_row( only in the assertion. */ mem_heap_t* heap) /*!< in: memory heap from which the memory needed is allocated */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /***********************************************************************//** Writes information to an undo log about an insert, update, or a delete marking of a clustered index record. This information is used in a rollback of the @@ -233,7 +233,7 @@ trx_undo_report_row_operation( inserted undo log record, 0 if BTR_NO_UNDO_LOG flag was specified */ - __attribute__((nonnull(3,4,10), warn_unused_result)); + MY_ATTRIBUTE((nonnull(3,4,10), warn_unused_result)); /******************************************************************//** Copies an undo record to heap. This function can be called if we know that the undo log record exists. @@ -244,7 +244,7 @@ trx_undo_get_undo_rec_low( /*======================*/ roll_ptr_t roll_ptr, /*!< in: roll pointer to record */ mem_heap_t* heap) /*!< in: memory heap where copied */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*******************************************************************//** Build a previous version of a clustered index record. The caller must hold a latch on the index page of the clustered index record. @@ -268,7 +268,7 @@ trx_undo_prev_version_build( rec_t** old_vers)/*!< out, own: previous version, or NULL if rec is the first inserted version, or if history data has been deleted */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); #endif /* !UNIV_HOTBACKUP */ /***********************************************************//** Parses a redo log record of adding an undo log record. diff --git a/mysql-wsrep-5.6/storage/innobase/include/trx0roll.h b/mysql-wsrep-5.6/storage/innobase/include/trx0roll.h index d5ab83d7..98a667b2 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/trx0roll.h +++ b/mysql-wsrep-5.6/storage/innobase/include/trx0roll.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2014, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -125,7 +125,7 @@ extern "C" UNIV_INTERN os_thread_ret_t DECLARE_THREAD(trx_rollback_or_clean_all_recovered)( /*================================================*/ - void* arg __attribute__((unused))); + void* arg MY_ATTRIBUTE((unused))); /*!< in: a dummy parameter required by os_thread_create */ /*********************************************************************//** @@ -152,7 +152,7 @@ dberr_t trx_rollback_for_mysql( /*===================*/ trx_t* trx) /*!< in/out: transaction */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*******************************************************************//** Rollback the latest SQL statement for MySQL. @return error code or DB_SUCCESS */ @@ -161,7 +161,7 @@ dberr_t trx_rollback_last_sql_stat_for_mysql( /*=================================*/ trx_t* trx) /*!< in/out: transaction */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*******************************************************************//** Rollback a transaction to a given savepoint or do a complete rollback. @return error code or DB_SUCCESS */ @@ -173,7 +173,7 @@ trx_rollback_to_savepoint( trx_savept_t* savept) /*!< in: pointer to savepoint undo number, if partial rollback requested, or NULL for complete rollback */ - __attribute__((nonnull(1))); + MY_ATTRIBUTE((nonnull(1))); /*******************************************************************//** Rolls back a transaction back to a named savepoint. Modifications after the savepoint are undone but InnoDB does NOT release the corresponding locks @@ -195,7 +195,7 @@ trx_rollback_to_savepoint_for_mysql( information to remove the binlog entries of the queries executed after the savepoint */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*******************************************************************//** Creates a named savepoint. If the transaction is not yet started, starts it. If there is already a savepoint of the same name, this call erases that old @@ -212,7 +212,7 @@ trx_savepoint_for_mysql( position corresponding to this connection at the time of the savepoint */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /*******************************************************************//** Releases a named savepoint. Savepoints which were set after this savepoint are deleted. @@ -224,7 +224,7 @@ trx_release_savepoint_for_mysql( /*============================*/ trx_t* trx, /*!< in: transaction handle */ const char* savepoint_name) /*!< in: savepoint name */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*******************************************************************//** Frees savepoint structs starting from savep. */ UNIV_INTERN diff --git a/mysql-wsrep-5.6/storage/innobase/include/trx0sys.h b/mysql-wsrep-5.6/storage/innobase/include/trx0sys.h index 28ed5bfa..534a04c0 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/trx0sys.h +++ b/mysql-wsrep-5.6/storage/innobase/include/trx0sys.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -270,7 +270,7 @@ ibool trx_in_trx_list( /*============*/ const trx_t* in_trx) /*!< in: transaction */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); #endif /* UNIV_DEBUG */ #if defined UNIV_DEBUG || defined UNIV_BLOB_LIGHT_DEBUG /***********************************************************//** @@ -281,7 +281,7 @@ ibool trx_assert_recovered( /*=================*/ trx_id_t trx_id) /*!< in: transaction identifier */ - __attribute__((warn_unused_result)); + MY_ATTRIBUTE((warn_unused_result)); #endif /* UNIV_DEBUG || UNIV_BLOB_LIGHT_DEBUG */ /*****************************************************************//** Updates the offset information about the end of the MySQL binlog entry diff --git a/mysql-wsrep-5.6/storage/innobase/include/trx0trx.h b/mysql-wsrep-5.6/storage/innobase/include/trx0trx.h index 6adbe2c9..4ea50526 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/trx0trx.h +++ b/mysql-wsrep-5.6/storage/innobase/include/trx0trx.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -103,7 +103,7 @@ void trx_free_prepared( /*==============*/ trx_t* trx) /*!< in, own: trx object */ - UNIV_COLD __attribute__((nonnull)); + UNIV_COLD MY_ATTRIBUTE((nonnull)); /********************************************************************//** Frees a transaction object for MySQL. */ UNIV_INTERN @@ -169,7 +169,7 @@ trx_start_for_ddl_low( /*==================*/ trx_t* trx, /*!< in/out: transaction */ trx_dict_op_t op) /*!< in: dictionary operation type */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); #ifdef UNIV_DEBUG #define trx_start_for_ddl(t, o) \ @@ -191,7 +191,7 @@ void trx_commit( /*=======*/ trx_t* trx) /*!< in/out: transaction */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /****************************************************************//** Commits a transaction and a mini-transaction. */ UNIV_INTERN @@ -201,7 +201,7 @@ trx_commit_low( trx_t* trx, /*!< in/out: transaction */ mtr_t* mtr) /*!< in/out: mini-transaction (will be committed), or NULL if trx made no modifications */ - __attribute__((nonnull(1))); + MY_ATTRIBUTE((nonnull(1))); /****************************************************************//** Cleans up a transaction at database startup. The cleanup is needed if the transaction already got to the middle of a commit when the database @@ -255,7 +255,7 @@ void trx_commit_complete_for_mysql( /*==========================*/ trx_t* trx) /*!< in/out: transaction */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /**********************************************************************//** Marks the latest SQL statement ended. */ UNIV_INTERN @@ -317,7 +317,7 @@ trx_print_low( /*!< in: length of trx->lock.trx_locks */ ulint heap_size) /*!< in: mem_heap_get_size(trx->lock.lock_heap) */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /**********************************************************************//** Prints info about a transaction. @@ -331,7 +331,7 @@ trx_print_latched( const trx_t* trx, /*!< in: transaction */ ulint max_query_len) /*!< in: max query length to print, or 0 to use the default max length */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /**********************************************************************//** Prints info about a transaction. @@ -344,7 +344,7 @@ trx_print( const trx_t* trx, /*!< in: transaction */ ulint max_query_len) /*!< in: max query length to print, or 0 to use the default max length */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); /**********************************************************************//** Determine if a transaction is a dictionary operation. @@ -354,7 +354,7 @@ enum trx_dict_op_t trx_get_dict_operation( /*===================*/ const trx_t* trx) /*!< in: transaction */ - __attribute__((pure)); + MY_ATTRIBUTE((pure)); /**********************************************************************//** Flag a transaction a dictionary operation. */ UNIV_INLINE @@ -383,7 +383,7 @@ trx_state_eq( if state != TRX_STATE_NOT_STARTED asserts that trx->state != TRX_STATE_NOT_STARTED */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); # ifdef UNIV_DEBUG /**********************************************************************//** Asserts that a transaction has been started. @@ -394,7 +394,7 @@ ibool trx_assert_started( /*===============*/ const trx_t* trx) /*!< in: transaction */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); # endif /* UNIV_DEBUG */ /**********************************************************************//** diff --git a/mysql-wsrep-5.6/storage/innobase/include/trx0undo.h b/mysql-wsrep-5.6/storage/innobase/include/trx0undo.h index 61b0dabb..0148cc61 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/trx0undo.h +++ b/mysql-wsrep-5.6/storage/innobase/include/trx0undo.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -73,7 +73,7 @@ bool trx_undo_trx_id_is_insert( /*======================*/ const byte* trx_id) /*!< in: DB_TRX_ID, followed by DB_ROLL_PTR */ - __attribute__((nonnull, pure, warn_unused_result)); + MY_ATTRIBUTE((nonnull, pure, warn_unused_result)); #endif /* !UNIV_HOTBACKUP */ /*****************************************************************//** Writes a roll ptr to an index page. In case that the size changes in @@ -214,7 +214,7 @@ trx_undo_add_page( mtr_t* mtr) /*!< in: mtr which does not have a latch to any undo log page; the caller must have reserved the rollback segment mutex */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /********************************************************************//** Frees the last undo log page. The caller must hold the rollback segment mutex. */ @@ -229,7 +229,7 @@ trx_undo_free_last_page_func( mtr_t* mtr) /*!< in/out: mini-transaction which does not have a latch to any undo log page or which has allocated the undo log page */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); #ifdef UNIV_DEBUG # define trx_undo_free_last_page(trx,undo,mtr) \ trx_undo_free_last_page_func(trx,undo,mtr) @@ -251,7 +251,7 @@ trx_undo_truncate_end_func( trx_undo_t* undo, /*!< in/out: undo log */ undo_no_t limit) /*!< in: all undo records with undo number >= this value should be truncated */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); #ifdef UNIV_DEBUG # define trx_undo_truncate_end(trx,undo,limit) \ trx_undo_truncate_end_func(trx,undo,limit) @@ -300,7 +300,7 @@ trx_undo_assign_undo( /*=================*/ trx_t* trx, /*!< in: transaction */ ulint type) /*!< in: TRX_UNDO_INSERT or TRX_UNDO_UPDATE */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); /******************************************************************//** Sets the state of the undo log segment at a transaction finish. @return undo log segment header page, x-latched */ @@ -350,7 +350,7 @@ void trx_undo_free_prepared( /*===================*/ trx_t* trx) /*!< in/out: PREPARED transaction */ - UNIV_COLD __attribute__((nonnull)); + UNIV_COLD MY_ATTRIBUTE((nonnull)); #endif /* !UNIV_HOTBACKUP */ /***********************************************************//** Parses the redo log entry of an undo log page initialization. diff --git a/mysql-wsrep-5.6/storage/innobase/include/univ.i b/mysql-wsrep-5.6/storage/innobase/include/univ.i index 8c325ecc..dfb59673 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/univ.i +++ b/mysql-wsrep-5.6/storage/innobase/include/univ.i @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1994, 2013, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, Google Inc. Portions of this file contain modifications contributed and copyrighted by @@ -249,7 +249,7 @@ that are only referenced from within InnoDB, not from MySQL. We disable the GCC visibility directive on all Sun operating systems because there is no easy way to get it to work. See http://bugs.mysql.com/bug.php?id=52263. */ #if defined(__GNUC__) && (__GNUC__ >= 4) && !defined(sun) || defined(__INTEL_COMPILER) -# define UNIV_INTERN __attribute__((visibility ("hidden"))) +# define UNIV_INTERN MY_ATTRIBUTE((visibility ("hidden"))) #else # define UNIV_INTERN #endif @@ -264,7 +264,7 @@ appears close together improving code locality of non-cold parts of program. The paths leading to call of cold functions within code are marked as unlikely by the branch prediction mechanism. optimize a rarely invoked function for size instead for speed. */ -# define UNIV_COLD __attribute__((cold)) +# define UNIV_COLD MY_ATTRIBUTE((cold)) #else # define UNIV_COLD /* empty */ #endif @@ -528,7 +528,7 @@ contains the sum of the following flag and the locally stored len. */ #if defined(__GNUC__) && (__GNUC__ > 2) && ! defined(__INTEL_COMPILER) #define HAVE_GCC_GT_2 /* Tell the compiler that variable/function is unused. */ -# define UNIV_UNUSED __attribute__ ((unused)) +# define UNIV_UNUSED MY_ATTRIBUTE ((unused)) #else # define UNIV_UNUSED #endif /* CHECK FOR GCC VER_GT_2 */ diff --git a/mysql-wsrep-5.6/storage/innobase/include/ut0byte.h b/mysql-wsrep-5.6/storage/innobase/include/ut0byte.h index 5bdd553c..4893ab9f 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/ut0byte.h +++ b/mysql-wsrep-5.6/storage/innobase/include/ut0byte.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1994, 2009, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -39,7 +39,7 @@ ut_ull_create( /*==========*/ ulint high, /*!< in: high-order 32 bits */ ulint low) /*!< in: low-order 32 bits */ - __attribute__((const)); + MY_ATTRIBUTE((const)); /********************************************************//** Rounds a 64-bit integer downward to a multiple of a power of 2. @@ -80,7 +80,7 @@ ut_align_down( /*==========*/ const void* ptr, /*!< in: pointer */ ulint align_no) /*!< in: align by this number */ - __attribute__((const)); + MY_ATTRIBUTE((const)); /*********************************************************//** The following function computes the offset of a pointer from the nearest aligned address. @@ -91,7 +91,7 @@ ut_align_offset( /*============*/ const void* ptr, /*!< in: pointer */ ulint align_no) /*!< in: align by this number */ - __attribute__((const)); + MY_ATTRIBUTE((const)); /*****************************************************************//** Gets the nth bit of a ulint. @return TRUE if nth bit is 1; 0th bit is defined to be the least significant */ diff --git a/mysql-wsrep-5.6/storage/innobase/include/ut0dbg.h b/mysql-wsrep-5.6/storage/innobase/include/ut0dbg.h index 6a4afe99..3f5baef0 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/ut0dbg.h +++ b/mysql-wsrep-5.6/storage/innobase/include/ut0dbg.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1994, 2009, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -59,7 +59,7 @@ ut_dbg_assertion_failed( const char* expr, /*!< in: the failed assertion */ const char* file, /*!< in: source file containing the assertion */ ulint line) /*!< in: line number of the assertion */ - UNIV_COLD __attribute__((nonnull(2))); + UNIV_COLD MY_ATTRIBUTE((nonnull(2))); /** Abort the execution. */ # define UT_DBG_PANIC abort() diff --git a/mysql-wsrep-5.6/storage/innobase/include/ut0mem.h b/mysql-wsrep-5.6/storage/innobase/include/ut0mem.h index af7eb4e9..81470358 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/ut0mem.h +++ b/mysql-wsrep-5.6/storage/innobase/include/ut0mem.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1994, 2011, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -87,7 +87,7 @@ ut_malloc_low( ulint n, /*!< in: number of bytes to allocate */ ibool assert_on_error) /*!< in: if TRUE, we crash mysqld if the memory cannot be allocated */ - __attribute__((malloc)); + MY_ATTRIBUTE((malloc)); /**********************************************************************//** Allocates memory. */ #define ut_malloc(n) ut_malloc_low(n, TRUE) diff --git a/mysql-wsrep-5.6/storage/innobase/include/ut0rnd.h b/mysql-wsrep-5.6/storage/innobase/include/ut0rnd.h index 53b76984..6ed3ee3b 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/ut0rnd.h +++ b/mysql-wsrep-5.6/storage/innobase/include/ut0rnd.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1994, 2009, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -96,7 +96,7 @@ ulint ut_fold_ull( /*========*/ ib_uint64_t d) /*!< in: 64-bit integer */ - __attribute__((const)); + MY_ATTRIBUTE((const)); /*************************************************************//** Folds a character string ending in the null character. @return folded value */ @@ -105,7 +105,7 @@ ulint ut_fold_string( /*===========*/ const char* str) /*!< in: null-terminated string */ - __attribute__((pure)); + MY_ATTRIBUTE((pure)); /***********************************************************//** Looks for a prime number slightly greater than the given argument. The prime is chosen so that it is not near any power of 2. @@ -115,7 +115,7 @@ ulint ut_find_prime( /*==========*/ ulint n) /*!< in: positive number > 100 */ - __attribute__((const)); + MY_ATTRIBUTE((const)); #endif /* !UNIV_INNOCHECKSUM */ @@ -128,7 +128,7 @@ ut_fold_ulint_pair( /*===============*/ ulint n1, /*!< in: ulint */ ulint n2) /*!< in: ulint */ - __attribute__((const)); + MY_ATTRIBUTE((const)); /*************************************************************//** Folds a binary string. @return folded value */ @@ -138,7 +138,7 @@ ut_fold_binary( /*===========*/ const byte* str, /*!< in: string of bytes */ ulint len) /*!< in: length */ - __attribute__((pure)); + MY_ATTRIBUTE((pure)); #ifndef UNIV_NONINL diff --git a/mysql-wsrep-5.6/storage/innobase/include/ut0ut.h b/mysql-wsrep-5.6/storage/innobase/include/ut0ut.h index 0caf379d..ef887ed5 100644 --- a/mysql-wsrep-5.6/storage/innobase/include/ut0ut.h +++ b/mysql-wsrep-5.6/storage/innobase/include/ut0ut.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1994, 2014, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -217,7 +217,7 @@ ulint ut_2_power_up( /*==========*/ ulint n) /*!< in: number != 0 */ - __attribute__((const)); + MY_ATTRIBUTE((const)); /** Determine how many bytes (groups of 8 bits) are needed to store the given number of bits. @@ -297,7 +297,7 @@ void ut_print_timestamp( /*===============*/ FILE* file) /*!< in: file where to print */ - UNIV_COLD __attribute__((nonnull)); + UNIV_COLD MY_ATTRIBUTE((nonnull)); #ifndef UNIV_INNOCHECKSUM @@ -485,7 +485,7 @@ ut_ulint_sort( ulint* aux_arr, /*!< in/out: aux array to use in sort */ ulint low, /*!< in: lower bound */ ulint high) /*!< in: upper bound */ - __attribute__((nonnull)); + MY_ATTRIBUTE((nonnull)); #ifndef UNIV_NONINL #include "ut0ut.ic" diff --git a/mysql-wsrep-5.6/storage/innobase/lock/lock0lock.cc b/mysql-wsrep-5.6/storage/innobase/lock/lock0lock.cc index 5bf09634..133e5130 100644 --- a/mysql-wsrep-5.6/storage/innobase/lock/lock0lock.cc +++ b/mysql-wsrep-5.6/storage/innobase/lock/lock0lock.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -413,7 +413,7 @@ ibool lock_rec_validate_page( /*===================*/ const buf_block_t* block) /*!< in: buffer block */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); #endif /* UNIV_DEBUG */ /* The lock system */ @@ -497,7 +497,7 @@ Checks that a transaction id is sensible, i.e., not in the future. #ifdef UNIV_DEBUG UNIV_INTERN #else -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) #endif bool lock_check_trx_id_sanity( @@ -1635,6 +1635,10 @@ static void wsrep_kill_victim(const trx_t * const trx, const lock_t *lock) { ut_ad(lock_mutex_own()); ut_ad(trx_mutex_own(lock->trx)); + + /* quit for native mysql */ + if (!wsrep_on(trx->mysql_thd)) return; + my_bool bf_this = wsrep_thd_is_BF(trx->mysql_thd, FALSE); my_bool bf_other = wsrep_thd_is_BF(lock->trx->mysql_thd, TRUE); @@ -1712,9 +1716,11 @@ lock_rec_other_has_conflicting( #ifdef WITH_WSREP if (lock_rec_has_to_wait(TRUE, trx, mode, lock, is_supremum)) { - trx_mutex_enter(lock->trx); - wsrep_kill_victim(trx, lock); - trx_mutex_exit(lock->trx); + if (wsrep_on(trx->mysql_thd)) { + trx_mutex_enter(lock->trx); + wsrep_kill_victim(trx, lock); + trx_mutex_exit(lock->trx); + } #else if (lock_rec_has_to_wait(trx, mode, lock, is_supremum)) { #endif /* WITH_WSREP */ @@ -2006,7 +2012,9 @@ lock_rec_create( #ifdef WITH_WSREP - if (c_lock && wsrep_thd_is_BF(trx->mysql_thd, FALSE)) { + if (c_lock && + wsrep_on(trx->mysql_thd) && + wsrep_thd_is_BF(trx->mysql_thd, FALSE)) { lock_t *hash = (lock_t *)c_lock->hash; lock_t *prev = NULL; @@ -3901,7 +3909,7 @@ lock_get_next_lock( ut_ad(heap_no == ULINT_UNDEFINED); ut_ad(lock_get_type_low(lock) == LOCK_TABLE); - lock = UT_LIST_GET_PREV(un_member.tab_lock.locks, lock); + lock = UT_LIST_GET_NEXT(un_member.tab_lock.locks, lock); } } while (lock != NULL && lock->trx->lock.deadlock_mark > ctx->mark_start); @@ -3951,7 +3959,8 @@ lock_get_first_lock( } else { *heap_no = ULINT_UNDEFINED; ut_ad(lock_get_type_low(lock) == LOCK_TABLE); - lock = UT_LIST_GET_PREV(un_member.tab_lock.locks, lock); + dict_table_t* table = lock->un_member.tab_lock.table; + lock = UT_LIST_GET_FIRST(table->locks); } ut_a(lock != NULL); @@ -4412,44 +4421,50 @@ lock_table_create( UT_LIST_ADD_LAST(trx_locks, trx->lock.trx_locks, lock); #ifdef WITH_WSREP - if (c_lock && wsrep_thd_is_BF(trx->mysql_thd, FALSE)) { - UT_LIST_INSERT_AFTER( - un_member.tab_lock.locks, table->locks, c_lock, lock); - } else { - UT_LIST_ADD_LAST(un_member.tab_lock.locks, table->locks, lock); - } + if(wsrep_on(trx->mysql_thd)) { + if (c_lock && wsrep_thd_is_BF(trx->mysql_thd, FALSE)) { + UT_LIST_INSERT_AFTER( + un_member.tab_lock.locks, table->locks, c_lock, lock); + } else { + UT_LIST_ADD_LAST( + un_member.tab_lock.locks, table->locks, lock); + } - if (c_lock) trx_mutex_enter(c_lock->trx); - if (c_lock && c_lock->trx->lock.que_state == TRX_QUE_LOCK_WAIT) { + if (c_lock) trx_mutex_enter(c_lock->trx); + if (c_lock && c_lock->trx->lock.que_state == TRX_QUE_LOCK_WAIT) { - c_lock->trx->lock.was_chosen_as_deadlock_victim = TRUE; + c_lock->trx->lock.was_chosen_as_deadlock_victim = TRUE; - if (wsrep_debug) wsrep_print_wait_locks(c_lock); + if (wsrep_debug) wsrep_print_wait_locks(c_lock); - /* have to release trx mutex for the duration of - victim lock release. This will eventually call - lock_grant, which wants to grant trx mutex again - */ - /* caller has trx_mutex, have to release for lock cancel */ - trx_mutex_exit(trx); - lock_cancel_waiting_and_release(c_lock->trx->lock.wait_lock); - trx_mutex_enter(trx); + /* have to release trx mutex for the duration of + victim lock release. This will eventually call + lock_grant, which wants to grant trx mutex again + */ + /* caller has trx_mutex, have to release for lock cancel */ + trx_mutex_exit(trx); + lock_cancel_waiting_and_release( + c_lock->trx->lock.wait_lock); + trx_mutex_enter(trx); - /* trx might not wait for c_lock, but some other lock - does not matter if wait_lock was released above - */ - if (c_lock->trx->lock.wait_lock == c_lock) { - lock_reset_lock_and_trx_wait(lock); - } + /* trx might not wait for c_lock, but some other lock + does not matter if wait_lock was released above + */ + if (c_lock->trx->lock.wait_lock == c_lock) { + lock_reset_lock_and_trx_wait(lock); + } - if (wsrep_debug) { - fprintf(stderr, "WSREP: c_lock canceled %llu\n", - (ulonglong) c_lock->trx->id); + if (wsrep_debug) { + fprintf(stderr, "WSREP: c_lock canceled %llu\n", + (ulonglong) c_lock->trx->id); + } } - } - if (c_lock) trx_mutex_exit(c_lock->trx); -#else + if (c_lock) trx_mutex_exit(c_lock->trx); + } else { +#endif /* WITH_WSREP */ UT_LIST_ADD_LAST(un_member.tab_lock.locks, table->locks, lock); +#ifdef WITH_WSREP + } #endif /* WITH_WSREP */ if (UNIV_UNLIKELY(type_mode & LOCK_WAIT)) { @@ -4734,11 +4749,14 @@ lock_table_other_has_incompatible( && (wait || !lock_get_wait(lock))) { #ifdef WITH_WSREP - if (wsrep_debug) - fprintf(stderr, "WSREP: table lock abort"); - trx_mutex_enter(lock->trx); - wsrep_kill_victim((trx_t *)trx, (lock_t *)lock); - trx_mutex_exit(lock->trx); + if (wsrep_on(trx->mysql_thd)) { + if (wsrep_debug) + fprintf(stderr, + "WSREP: table lock abort"); + trx_mutex_enter(lock->trx); + wsrep_kill_victim((trx_t *)trx, (lock_t *)lock); + trx_mutex_exit(lock->trx); + } #endif return(lock); } @@ -4766,7 +4784,8 @@ lock_table( dberr_t err; const lock_t* wait_for; - ut_ad(table && thr); + ut_ad(table != NULL); + ut_ad(thr != NULL); if (flags & BTR_NO_LOCKING_FLAG) { @@ -6168,7 +6187,7 @@ lock_validate_table_locks( /*********************************************************************//** Validate record locks up to a limit. @return lock at limit or NULL if no more locks in the hash bucket */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) const lock_t* lock_rec_validate( /*==============*/ diff --git a/mysql-wsrep-5.6/storage/innobase/lock/lock0wait.cc b/mysql-wsrep-5.6/storage/innobase/lock/lock0wait.cc index 9b8daf85..4d2b52db 100644 --- a/mysql-wsrep-5.6/storage/innobase/lock/lock0wait.cc +++ b/mysql-wsrep-5.6/storage/innobase/lock/lock0wait.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -515,7 +515,7 @@ extern "C" UNIV_INTERN os_thread_ret_t DECLARE_THREAD(lock_wait_timeout_thread)( /*=====================================*/ - void* arg __attribute__((unused))) + void* arg MY_ATTRIBUTE((unused))) /* in: a dummy parameter required by os_thread_create */ { diff --git a/mysql-wsrep-5.6/storage/innobase/log/log0log.cc b/mysql-wsrep-5.6/storage/innobase/log/log0log.cc index 3ff4a9d7..8ff8e39d 100644 --- a/mysql-wsrep-5.6/storage/innobase/log/log0log.cc +++ b/mysql-wsrep-5.6/storage/innobase/log/log0log.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2009, Google Inc. Portions of this file contain modifications contributed and copyrighted by @@ -975,7 +975,7 @@ log_group_init( ulint space_id, /*!< in: space id of the file space which contains the log files of this group */ - ulint archive_space_id __attribute__((unused))) + ulint archive_space_id MY_ATTRIBUTE((unused))) /*!< in: space id of the file space which contains some archived log files for this group; currently, only @@ -2352,7 +2352,7 @@ void log_archived_file_name_gen( /*=======================*/ char* buf, /*!< in: buffer where to write */ - ulint id __attribute__((unused)), + ulint id MY_ATTRIBUTE((unused)), /*!< in: group id; currently we only archive the first group */ ulint file_no)/*!< in: file number */ diff --git a/mysql-wsrep-5.6/storage/innobase/log/log0recv.cc b/mysql-wsrep-5.6/storage/innobase/log/log0recv.cc index ca07f898..85f4f6ea 100644 --- a/mysql-wsrep-5.6/storage/innobase/log/log0recv.cc +++ b/mysql-wsrep-5.6/storage/innobase/log/log0recv.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1997, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. This program is free software; you can redistribute it and/or modify it under @@ -328,7 +328,7 @@ extern "C" UNIV_INTERN os_thread_ret_t DECLARE_THREAD(recv_writer_thread)( /*===============================*/ - void* arg __attribute__((unused))) + void* arg MY_ATTRIBUTE((unused))) /*!< in: a dummy parameter required by os_thread_create */ { @@ -742,7 +742,7 @@ recv_check_cp_is_consistent( /********************************************************//** Looks for the maximum consistent checkpoint from the log groups. @return error code or DB_SUCCESS */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t recv_find_max_checkpoint( /*=====================*/ diff --git a/mysql-wsrep-5.6/storage/innobase/mem/mem0dbg.cc b/mysql-wsrep-5.6/storage/innobase/mem/mem0dbg.cc index 308c2979..a77785a3 100644 --- a/mysql-wsrep-5.6/storage/innobase/mem/mem0dbg.cc +++ b/mysql-wsrep-5.6/storage/innobase/mem/mem0dbg.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1994, 2011, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -248,7 +248,7 @@ void mem_field_erase( /*============*/ byte* buf, /*!< in: memory field */ - ulint n __attribute__((unused))) + ulint n MY_ATTRIBUTE((unused))) /*!< in: how many bytes the user requested */ { byte* usr_buf; @@ -450,7 +450,7 @@ void mem_heap_validate_or_print( /*=======================*/ mem_heap_t* heap, /*!< in: memory heap */ - byte* top __attribute__((unused)), + byte* top MY_ATTRIBUTE((unused)), /*!< in: calculate and validate only until this top pointer in the heap is reached, if this pointer is NULL, ignored */ diff --git a/mysql-wsrep-5.6/storage/innobase/mtr/mtr0mtr.cc b/mysql-wsrep-5.6/storage/innobase/mtr/mtr0mtr.cc index 869586bc..f60ec648 100644 --- a/mysql-wsrep-5.6/storage/innobase/mtr/mtr0mtr.cc +++ b/mysql-wsrep-5.6/storage/innobase/mtr/mtr0mtr.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2013, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -58,7 +58,7 @@ mtr_block_dirtied( /*****************************************************************//** Releases the item in the slot given. */ -static __attribute__((nonnull)) +static MY_ATTRIBUTE((nonnull)) void mtr_memo_slot_release_func( /*=======================*/ @@ -105,7 +105,7 @@ mtr_memo_slot_release_func( Releases the mlocks and other objects stored in an mtr memo. They are released in the order opposite to which they were pushed to the memo. */ -static __attribute__((nonnull)) +static MY_ATTRIBUTE((nonnull)) void mtr_memo_pop_all( /*=============*/ @@ -395,7 +395,7 @@ mtr_read_ulint( /*===========*/ const byte* ptr, /*!< in: pointer from where to read */ ulint type, /*!< in: MLOG_1BYTE, MLOG_2BYTES, MLOG_4BYTES */ - mtr_t* mtr __attribute__((unused))) + mtr_t* mtr MY_ATTRIBUTE((unused))) /*!< in: mini-transaction handle */ { ut_ad(mtr->state == MTR_ACTIVE); diff --git a/mysql-wsrep-5.6/storage/innobase/os/os0file.cc b/mysql-wsrep-5.6/storage/innobase/os/os0file.cc index 5212ce3b..1219716d 100644 --- a/mysql-wsrep-5.6/storage/innobase/os/os0file.cc +++ b/mysql-wsrep-5.6/storage/innobase/os/os0file.cc @@ -1,6 +1,6 @@ /*********************************************************************** -Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2009, Percona Inc. Portions of this file contain modifications contributed and copyrighted @@ -1481,11 +1481,11 @@ void os_file_set_nocache( /*================*/ int fd /*!< in: file descriptor to alter */ - __attribute__((unused)), + MY_ATTRIBUTE((unused)), const char* file_name /*!< in: used in the diagnostic message */ - __attribute__((unused)), - const char* operation_name __attribute__((unused))) + MY_ATTRIBUTE((unused)), + const char* operation_name MY_ATTRIBUTE((unused))) /*!< in: "open" or "create"; used in the diagnostic message */ { @@ -2372,7 +2372,7 @@ os_file_flush_func( /*******************************************************************//** Does a synchronous read operation in Posix. @return number of bytes read, -1 if error */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) ssize_t os_file_pread( /*==========*/ @@ -2483,7 +2483,7 @@ os_file_pread( /*******************************************************************//** Does a synchronous write operation in Posix. @return number of bytes written, -1 if error */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) ssize_t os_file_pwrite( /*===========*/ diff --git a/mysql-wsrep-5.6/storage/innobase/page/page0page.cc b/mysql-wsrep-5.6/storage/innobase/page/page0page.cc index cb2381df..95b8db0c 100644 --- a/mysql-wsrep-5.6/storage/innobase/page/page0page.cc +++ b/mysql-wsrep-5.6/storage/innobase/page/page0page.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1994, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. This program is free software; you can redistribute it and/or modify it under @@ -304,7 +304,7 @@ byte* page_parse_create( /*==============*/ byte* ptr, /*!< in: buffer */ - byte* end_ptr __attribute__((unused)), /*!< in: buffer end */ + byte* end_ptr MY_ATTRIBUTE((unused)), /*!< in: buffer end */ ulint comp, /*!< in: nonzero=compact page format */ buf_block_t* block, /*!< in: block or NULL */ mtr_t* mtr) /*!< in: mtr or NULL */ diff --git a/mysql-wsrep-5.6/storage/innobase/page/page0zip.cc b/mysql-wsrep-5.6/storage/innobase/page/page0zip.cc index e5176148..4da11e5d 100644 --- a/mysql-wsrep-5.6/storage/innobase/page/page0zip.cc +++ b/mysql-wsrep-5.6/storage/innobase/page/page0zip.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2005, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2005, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. This program is free software; you can redistribute it and/or modify it under @@ -119,7 +119,7 @@ Compare at most sizeof(field_ref_zero) bytes. independently of any UNIV_ debugging conditions. */ #if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG # include -__attribute__((format (printf, 1, 2))) +MY_ATTRIBUTE((format (printf, 1, 2))) /**********************************************************************//** Report a failure to decompress or compress. @return number of characters printed */ @@ -738,8 +738,8 @@ static void page_zip_free( /*==========*/ - void* opaque __attribute__((unused)), /*!< in: memory heap */ - void* address __attribute__((unused)))/*!< in: object to free */ + void* opaque MY_ATTRIBUTE((unused)), /*!< in: memory heap */ + void* address MY_ATTRIBUTE((unused)))/*!< in: object to free */ { } @@ -4769,7 +4769,8 @@ page_zip_parse_compress( ulint size; ulint trailer_size; - ut_ad(ptr && end_ptr); + ut_ad(ptr != NULL); + ut_ad(end_ptr != NULL); ut_ad(!page == !page_zip); if (UNIV_UNLIKELY(ptr + (2 + 2) > end_ptr)) { diff --git a/mysql-wsrep-5.6/storage/innobase/pars/lexyy.cc b/mysql-wsrep-5.6/storage/innobase/pars/lexyy.cc index 1c01becd..bfa8e2ea 100644 --- a/mysql-wsrep-5.6/storage/innobase/pars/lexyy.cc +++ b/mysql-wsrep-5.6/storage/innobase/pars/lexyy.cc @@ -295,7 +295,7 @@ static int yy_start = 0; /* start state number */ static int yy_did_buffer_switch_on_eof; void yyrestart (FILE *input_file ); -__attribute__((unused)) static void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ); +MY_ATTRIBUTE((unused)) static void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ); static YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ); void yy_delete_buffer (YY_BUFFER_STATE b ); void yy_flush_buffer (YY_BUFFER_STATE b ); @@ -916,7 +916,7 @@ char *yytext; #line 1 "pars0lex.l" /***************************************************************************** -Copyright (c) 1997, 2011, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -1027,7 +1027,7 @@ static int yy_init_globals (void ); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ -__attribute__((unused)) static int yylex_destroy (void ); +MY_ATTRIBUTE((unused)) static int yylex_destroy (void ); int yyget_debug (void ); @@ -2664,7 +2664,7 @@ static int yy_get_next_buffer (void) * @param new_buffer The new input buffer. * */ - __attribute__((unused)) static void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) + MY_ATTRIBUTE((unused)) static void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) { /* TODO. We should be able to replace this entire function body @@ -3042,7 +3042,7 @@ static int yy_init_globals (void) } /* yylex_destroy is for both reentrant and non-reentrant scanners. */ -__attribute__((unused)) static int yylex_destroy (void) +MY_ATTRIBUTE((unused)) static int yylex_destroy (void) { /* Pop the buffer stack, destroying each element. */ diff --git a/mysql-wsrep-5.6/storage/innobase/pars/make_flex.sh b/mysql-wsrep-5.6/storage/innobase/pars/make_flex.sh index 581fc234..c3db8aea 100755 --- a/mysql-wsrep-5.6/storage/innobase/pars/make_flex.sh +++ b/mysql-wsrep-5.6/storage/innobase/pars/make_flex.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (c) 1994, 2011, Oracle and/or its affiliates. All Rights Reserved. +# Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved. # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software @@ -33,15 +33,15 @@ sed -e ' s/'"$TMPFILE"'/'"$OUTFILE"'/; s/\(int offset = \)\((yy_c_buf_p) - (yytext_ptr)\);/\1(int)(\2);/; s/\(void yy\(restart\|_\(delete\|flush\)_buffer\)\)/static \1/; -s/\(void yy_switch_to_buffer\)/__attribute__((unused)) static \1/; -s/\(void yy\(push\|pop\)_buffer_state\)/__attribute__((unused)) static \1/; +s/\(void yy_switch_to_buffer\)/MY_ATTRIBUTE((unused)) static \1/; +s/\(void yy\(push\|pop\)_buffer_state\)/MY_ATTRIBUTE((unused)) static \1/; s/\(YY_BUFFER_STATE yy_create_buffer\)/static \1/; -s/\(\(int\|void\) yy[gs]et_\)/__attribute__((unused)) static \1/; +s/\(\(int\|void\) yy[gs]et_\)/MY_ATTRIBUTE((unused)) static \1/; s/\(void \*\?yy\(\(re\)\?alloc\|free\)\)/static \1/; s/\(extern \)\?\(int yy\(leng\|lineno\|_flex_debug\)\)/static \2/; -s/\(int yylex_destroy\)/__attribute__((unused)) static \1/; +s/\(int yylex_destroy\)/MY_ATTRIBUTE((unused)) static \1/; s/\(extern \)\?\(int yylex \)/UNIV_INTERN \2/; -s/^\(\(FILE\|char\) *\* *yyget\)/__attribute__((unused)) static \1/; +s/^\(\(FILE\|char\) *\* *yyget\)/MY_ATTRIBUTE((unused)) static \1/; s/^\(extern \)\?\(\(FILE\|char\) *\* *yy\)/static \2/; ' < $TMPFILE >> $OUTFILE diff --git a/mysql-wsrep-5.6/storage/innobase/pars/pars0pars.cc b/mysql-wsrep-5.6/storage/innobase/pars/pars0pars.cc index 655e5ba1..b116357c 100644 --- a/mysql-wsrep-5.6/storage/innobase/pars/pars0pars.cc +++ b/mysql-wsrep-5.6/storage/innobase/pars/pars0pars.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -1925,7 +1925,7 @@ pars_create_table( sym_node_t* column_defs, /*!< in: list of column names */ sym_node_t* compact, /* in: non-NULL if COMPACT table. */ sym_node_t* block_size, /* in: block size (can be NULL) */ - void* not_fit_in_memory __attribute__((unused))) + void* not_fit_in_memory MY_ATTRIBUTE((unused))) /*!< in: a non-NULL pointer means that this is a table which in simulations should be simulated as not fitting @@ -2141,7 +2141,7 @@ UNIV_INTERN que_fork_t* pars_stored_procedure_call( /*=======================*/ - sym_node_t* sym_node __attribute__((unused))) + sym_node_t* sym_node MY_ATTRIBUTE((unused))) /*!< in: stored procedure name */ { ut_error; @@ -2201,7 +2201,7 @@ UNIV_INTERN void yyerror( /*====*/ - const char* s __attribute__((unused))) + const char* s MY_ATTRIBUTE((unused))) /*!< in: error message string */ { ut_ad(s); diff --git a/mysql-wsrep-5.6/storage/innobase/rem/rem0cmp.cc b/mysql-wsrep-5.6/storage/innobase/rem/rem0cmp.cc index 426cf9e3..616ef322 100644 --- a/mysql-wsrep-5.6/storage/innobase/rem/rem0cmp.cc +++ b/mysql-wsrep-5.6/storage/innobase/rem/rem0cmp.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1994, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -75,7 +75,7 @@ cmp_debug_dtuple_rec_with_match( completely matched fields; when function returns, contains the value for current comparison */ - __attribute__((nonnull, warn_unused_result)); + MY_ATTRIBUTE((nonnull, warn_unused_result)); #endif /* UNIV_DEBUG */ /*************************************************************//** This function is used to compare two data fields for which the data type @@ -659,7 +659,10 @@ cmp_dtuple_rec_with_match_low( in current field */ int ret; /* return value */ - ut_ad(dtuple && rec && matched_fields && matched_bytes); + ut_ad(dtuple != NULL); + ut_ad(rec != NULL); + ut_ad(matched_fields != NULL); + ut_ad(matched_bytes != NULL); ut_ad(dtuple_check_typed(dtuple)); ut_ad(rec_offs_validate(rec, NULL, offsets)); @@ -920,7 +923,7 @@ Compare two physical record fields. @retval 1 if rec1 field is greater than rec2 @retval -1 if rec1 field is less than rec2 @retval 0 if rec1 field equals to rec2 */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) int cmp_rec_rec_simple_field( /*=====================*/ @@ -1139,7 +1142,9 @@ cmp_rec_rec_with_match( int ret = 0; /* return value */ ulint comp; - ut_ad(rec1 && rec2 && index); + ut_ad(rec1 != NULL); + ut_ad(rec2 != NULL); + ut_ad(index != NULL); ut_ad(rec_offs_validate(rec1, index, offsets1)); ut_ad(rec_offs_validate(rec2, index, offsets2)); ut_ad(rec_offs_comp(offsets1) == rec_offs_comp(offsets2)); @@ -1375,7 +1380,9 @@ cmp_debug_dtuple_rec_with_match( int ret; /* return value */ ulint cur_field; /* current field number */ - ut_ad(dtuple && rec && matched_fields); + ut_ad(dtuple != NULL); + ut_ad(rec != NULL); + ut_ad(matched_fields != NULL); ut_ad(dtuple_check_typed(dtuple)); ut_ad(rec_offs_validate(rec, NULL, offsets)); diff --git a/mysql-wsrep-5.6/storage/innobase/rem/rem0rec.cc b/mysql-wsrep-5.6/storage/innobase/rem/rem0rec.cc index 95402116..1164a2a7 100644 --- a/mysql-wsrep-5.6/storage/innobase/rem/rem0rec.cc +++ b/mysql-wsrep-5.6/storage/innobase/rem/rem0rec.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1994, 2013, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -244,7 +244,7 @@ rec_get_n_extern_new( Determine the offset to each field in a leaf-page record in ROW_FORMAT=COMPACT. This is a special case of rec_init_offsets() and rec_get_offsets_func(). */ -UNIV_INLINE __attribute__((nonnull)) +UNIV_INLINE MY_ATTRIBUTE((nonnull)) void rec_init_offsets_comp_ordinary( /*===========================*/ @@ -788,7 +788,7 @@ rec_get_nth_field_offs_old( /**********************************************************//** Determines the size of a data tuple prefix in ROW_FORMAT=COMPACT. @return total size */ -UNIV_INLINE __attribute__((warn_unused_result, nonnull(1,2))) +UNIV_INLINE MY_ATTRIBUTE((warn_unused_result, nonnull(1,2))) ulint rec_get_converted_size_comp_prefix_low( /*===================================*/ @@ -1133,7 +1133,7 @@ rec_convert_dtuple_to_rec_old( /*********************************************************//** Builds a ROW_FORMAT=COMPACT record out of a data tuple. */ -UNIV_INLINE __attribute__((nonnull)) +UNIV_INLINE MY_ATTRIBUTE((nonnull)) void rec_convert_dtuple_to_rec_comp( /*===========================*/ @@ -1341,7 +1341,9 @@ rec_convert_dtuple_to_rec( { rec_t* rec; - ut_ad(buf && index && dtuple); + ut_ad(buf != NULL); + ut_ad(index != NULL); + ut_ad(dtuple != NULL); ut_ad(dtuple_validate(dtuple)); ut_ad(dtuple_check_typed(dtuple)); diff --git a/mysql-wsrep-5.6/storage/innobase/row/row0ftsort.cc b/mysql-wsrep-5.6/storage/innobase/row/row0ftsort.cc index 1fc72bde..4fd3a510 100644 --- a/mysql-wsrep-5.6/storage/innobase/row/row0ftsort.cc +++ b/mysql-wsrep-5.6/storage/innobase/row/row0ftsort.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2010, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2010, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -512,8 +512,18 @@ row_merge_fts_doc_tokenize( dfield_dup(field, buf->heap); /* One variable length column, word with its lenght less than - fts_max_token_size, add one extra size and one extra byte */ - cur_len += 2; + fts_max_token_size, add one extra size and one extra byte. + + Since the max length for FTS token now is larger than 255, + so we will need to signify length byte itself, so only 1 to 128 + bytes can be used for 1 bytes, larger than that 2 bytes. */ + if (t_str.f_len < 128) { + /* Extra size is one byte. */ + cur_len += 2; + } else { + /* Extra size is two bytes. */ + cur_len += 3; + } /* Reserve one byte for the end marker of row_merge_block_t. */ if (buf->total_size + data_size[idx] + cur_len @@ -976,7 +986,7 @@ row_fts_start_parallel_merge( /********************************************************************//** Insert processed FTS data to auxillary index tables. @return DB_SUCCESS if insertion runs fine */ -static __attribute__((nonnull)) +static MY_ATTRIBUTE((nonnull)) dberr_t row_merge_write_fts_word( /*=====================*/ diff --git a/mysql-wsrep-5.6/storage/innobase/row/row0import.cc b/mysql-wsrep-5.6/storage/innobase/row/row0import.cc index 89496b41..eda89951 100644 --- a/mysql-wsrep-5.6/storage/innobase/row/row0import.cc +++ b/mysql-wsrep-5.6/storage/innobase/row/row0import.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2012, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2012, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -2179,7 +2179,7 @@ PageConverter::operator() ( Clean up after import tablespace failure, this function will acquire the dictionary latches on behalf of the transaction if the transaction hasn't already acquired them. */ -static __attribute__((nonnull)) +static MY_ATTRIBUTE((nonnull)) void row_import_discard_changes( /*=======================*/ @@ -2230,7 +2230,7 @@ row_import_discard_changes( /*****************************************************************//** Clean up after import tablespace. */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_import_cleanup( /*===============*/ @@ -2265,7 +2265,7 @@ row_import_cleanup( /*****************************************************************//** Report error during tablespace import. */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_import_error( /*=============*/ @@ -2293,7 +2293,7 @@ row_import_error( Adjust the root page index node and leaf node segment headers, update with the new space id. For all the table's secondary indexes. @return error code */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_import_adjust_root_pages_of_secondary_indexes( /*==============================================*/ @@ -2409,7 +2409,7 @@ row_import_adjust_root_pages_of_secondary_indexes( /*****************************************************************//** Ensure that dict_sys->row_id exceeds SELECT MAX(DB_ROW_ID). @return error code */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_import_set_sys_max_row_id( /*==========================*/ @@ -2559,7 +2559,7 @@ row_import_cfg_read_string( /*********************************************************************//** Write the meta data (index user fields) config file. @return DB_SUCCESS or error code. */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_import_cfg_read_index_fields( /*=============================*/ @@ -2642,7 +2642,7 @@ row_import_cfg_read_index_fields( Read the index names and root page numbers of the indexes and set the values. Row format [root_page_no, len of str, str ... ] @return DB_SUCCESS or error code. */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_import_read_index_data( /*=======================*/ @@ -2837,7 +2837,7 @@ row_import_read_indexes( /*********************************************************************//** Read the meta data (table columns) config file. Deserialise the contents of dict_col_t structure, along with the column name. */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_import_read_columns( /*====================*/ @@ -2962,7 +2962,7 @@ row_import_read_columns( /*****************************************************************//** Read the contents of the .cfg file. @return DB_SUCCESS or error code. */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_import_read_v1( /*===============*/ @@ -3128,7 +3128,7 @@ row_import_read_v1( /** Read the contents of the .cfg file. @return DB_SUCCESS or error code. */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_import_read_meta_data( /*======================*/ @@ -3171,7 +3171,7 @@ row_import_read_meta_data( /** Read the contents of the .cfg file. @return DB_SUCCESS or error code. */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_import_read_cfg( /*================*/ diff --git a/mysql-wsrep-5.6/storage/innobase/row/row0ins.cc b/mysql-wsrep-5.6/storage/innobase/row/row0ins.cc index 37eac249..12ca0a32 100644 --- a/mysql-wsrep-5.6/storage/innobase/row/row0ins.cc +++ b/mysql-wsrep-5.6/storage/innobase/row/row0ins.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -224,7 +224,7 @@ Does an insert operation by updating a delete-marked existing record in the index. This situation can occur if the delete-marked record is kept in the index for consistent reads. @return DB_SUCCESS or error code */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_ins_sec_index_entry_by_modify( /*==============================*/ @@ -319,7 +319,7 @@ Does an insert operation by delete unmarking and updating a delete marked existing record in the index. This situation can occur if the delete marked record is kept in the index for consistent reads. @return DB_SUCCESS, DB_FAIL, or error code */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_ins_clust_index_entry_by_modify( /*================================*/ @@ -427,7 +427,7 @@ row_ins_cascade_ancestor_updates_table( Returns the number of ancestor UPDATE or DELETE nodes of a cascaded update/delete node. @return number of ancestors */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) ulint row_ins_cascade_n_ancestors( /*========================*/ @@ -453,7 +453,7 @@ a cascaded update. can also be 0 if no foreign key fields changed; the returned value is ULINT_UNDEFINED if the column type in the child table is too short to fit the new value in the parent table: that means the update fails */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) ulint row_ins_cascade_calc_update_vec( /*============================*/ @@ -934,7 +934,7 @@ Perform referential actions or checks when a parent row is deleted or updated and the constraint had an ON DELETE or ON UPDATE condition which was not RESTRICT. @return DB_SUCCESS, DB_LOCK_WAIT, or error code */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_ins_foreign_check_on_constraint( /*================================*/ @@ -1774,7 +1774,7 @@ Otherwise does searches to the indexes of referenced tables and sets shared locks which lock either the success or the failure of a constraint. @return DB_SUCCESS or error code */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_ins_check_foreign_constraints( /*==============================*/ @@ -1915,7 +1915,7 @@ Scans a unique non-clustered index at a given index entry to determine whether a uniqueness violation has occurred for the key value of the entry. Set shared locks on possible duplicate records. @return DB_SUCCESS, DB_DUPLICATE_KEY, or DB_LOCK_WAIT */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_ins_scan_sec_index_for_duplicate( /*=================================*/ @@ -2057,7 +2057,7 @@ end_scan: @retval DB_SUCCESS_LOCKED_REC when rec is an exact match of entry or a newer version of entry (the entry should not be inserted) @retval DB_DUPLICATE_KEY when entry is a duplicate of rec */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_ins_duplicate_online( /*=====================*/ @@ -2098,7 +2098,7 @@ row_ins_duplicate_online( @retval DB_SUCCESS_LOCKED_REC when rec is an exact match of entry or a newer version of entry (the entry should not be inserted) @retval DB_DUPLICATE_KEY when entry is a duplicate of rec */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_ins_duplicate_error_in_clust_online( /*====================================*/ @@ -2141,7 +2141,7 @@ for a clustered index! record @retval DB_SUCCESS_LOCKED_REC if an exact match of the record was found in online table rebuild (flags & (BTR_KEEP_SYS_FLAG | BTR_NO_LOCKING_FLAG)) */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_ins_duplicate_error_in_clust( /*=============================*/ @@ -2559,7 +2559,7 @@ func_exit: /***************************************************************//** Starts a mini-transaction and checks if the index will be dropped. @return true if the index is to be dropped */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) bool row_ins_sec_mtr_start_and_check_if_aborted( /*=======================================*/ @@ -3000,7 +3000,7 @@ row_ins_index_entry( /***********************************************************//** Sets the values of the dtuple fields in entry from the values of appropriate columns in row. */ -static __attribute__((nonnull)) +static MY_ATTRIBUTE((nonnull)) void row_ins_index_entry_set_vals( /*=========================*/ @@ -3053,7 +3053,7 @@ row_ins_index_entry_set_vals( Inserts a single index entry to the table. @return DB_SUCCESS if operation successfully completed, else error code or DB_LOCK_WAIT */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_ins_index_entry_step( /*=====================*/ @@ -3176,7 +3176,7 @@ row_ins_get_row_from_select( Inserts a row to a table. @return DB_SUCCESS if operation successfully completed, else error code or DB_LOCK_WAIT */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_ins( /*====*/ diff --git a/mysql-wsrep-5.6/storage/innobase/row/row0log.cc b/mysql-wsrep-5.6/storage/innobase/row/row0log.cc index bb473ca9..54183759 100644 --- a/mysql-wsrep-5.6/storage/innobase/row/row0log.cc +++ b/mysql-wsrep-5.6/storage/innobase/row/row0log.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2011, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2011, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -201,7 +201,7 @@ struct row_log_t { /** Create the file or online log if it does not exist. @param[in,out] log online rebuild log @return file descriptor. */ -static __attribute__((warn_unused_result)) +static MY_ATTRIBUTE((warn_unused_result)) int row_log_tmpfile( row_log_t* log) @@ -217,7 +217,7 @@ row_log_tmpfile( /** Allocate the memory for the log buffer. @param[in,out] log_buf Buffer used for log operation @return TRUE if success, false if not */ -static __attribute__((warn_unused_result)) +static MY_ATTRIBUTE((warn_unused_result)) bool row_log_block_allocate( row_log_buf_t& log_buf) @@ -407,7 +407,7 @@ row_log_table_get_error( /******************************************************//** Starts logging an operation to a table that is being rebuilt. @return pointer to log, or NULL if no logging is necessary */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) byte* row_log_table_open( /*===============*/ @@ -442,7 +442,7 @@ err_exit: /******************************************************//** Stops logging an operation to a table that is being rebuilt. */ -static __attribute__((nonnull)) +static MY_ATTRIBUTE((nonnull)) void row_log_table_close_func( /*=====================*/ @@ -613,7 +613,7 @@ row_log_table_delete( &old_pk_extra_size); ut_ad(old_pk_extra_size < 0x100); - mrec_size = 4 + old_pk_size; + mrec_size = 6 + old_pk_size; /* Log enough prefix of the BLOB unless both the old and new table are in COMPACT or REDUNDANT format, @@ -643,8 +643,8 @@ row_log_table_delete( *b++ = static_cast(old_pk_extra_size); /* Log the size of external prefix we saved */ - mach_write_to_2(b, ext_size); - b += 2; + mach_write_to_4(b, ext_size); + b += 4; rec_convert_dtuple_to_temp( b + old_pk_extra_size, new_index, @@ -812,7 +812,7 @@ row_log_table_low_redundant( /******************************************************//** Logs an insert or update to a table that is being rebuilt. */ -static __attribute__((nonnull(1,2,3))) +static MY_ATTRIBUTE((nonnull(1,2,3))) void row_log_table_low( /*==============*/ @@ -1312,7 +1312,7 @@ row_log_table_blob_alloc( /******************************************************//** Converts a log record to a table row. @return converted row, or NULL if the conversion fails */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) const dtuple_t* row_log_table_apply_convert_mrec( /*=============================*/ @@ -1466,7 +1466,7 @@ blob_done: /******************************************************//** Replays an insert operation on a table that was rebuilt. @return DB_SUCCESS or error code */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_log_table_apply_insert_low( /*===========================*/ @@ -1548,7 +1548,7 @@ row_log_table_apply_insert_low( /******************************************************//** Replays an insert operation on a table that was rebuilt. @return DB_SUCCESS or error code */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_log_table_apply_insert( /*=======================*/ @@ -1600,7 +1600,7 @@ row_log_table_apply_insert( /******************************************************//** Deletes a record from a table that is being rebuilt. @return DB_SUCCESS or error code */ -static __attribute__((nonnull(1, 2, 4, 5), warn_unused_result)) +static MY_ATTRIBUTE((nonnull(1, 2, 4, 5), warn_unused_result)) dberr_t row_log_table_apply_delete_low( /*===========================*/ @@ -1698,7 +1698,7 @@ flag_ok: /******************************************************//** Replays a delete operation on a table that was rebuilt. @return DB_SUCCESS or error code */ -static __attribute__((nonnull(1, 3, 4, 5, 6, 7), warn_unused_result)) +static MY_ATTRIBUTE((nonnull(1, 3, 4, 5, 6, 7), warn_unused_result)) dberr_t row_log_table_apply_delete( /*=======================*/ @@ -1820,7 +1820,7 @@ all_done: /******************************************************//** Replays an update operation on a table that was rebuilt. @return DB_SUCCESS or error code */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_log_table_apply_update( /*=======================*/ @@ -2183,7 +2183,7 @@ func_exit_committed: Applies an operation to a table that was rebuilt. @return NULL on failure (mrec corruption) or when out of data; pointer to next record on success */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) const mrec_t* row_log_table_apply_op( /*===================*/ @@ -2268,14 +2268,14 @@ row_log_table_apply_op( break; case ROW_T_DELETE: - /* 1 (extra_size) + 2 (ext_size) + at least 1 (payload) */ - if (mrec + 4 >= mrec_end) { + /* 1 (extra_size) + 4 (ext_size) + at least 1 (payload) */ + if (mrec + 6 >= mrec_end) { return(NULL); } extra_size = *mrec++; - ext_size = mach_read_from_2(mrec); - mrec += 2; + ext_size = mach_read_from_4(mrec); + mrec += 4; ut_ad(mrec < mrec_end); /* We assume extra_size < 0x100 for the PRIMARY KEY prefix. @@ -2474,7 +2474,7 @@ row_log_table_apply_op( /******************************************************//** Applies operations to a table was rebuilt. @return DB_SUCCESS, or error code on failure */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_log_table_apply_ops( /*====================*/ @@ -2971,7 +2971,7 @@ row_log_get_max_trx( /******************************************************//** Applies an operation to a secondary index that was being created. */ -static __attribute__((nonnull)) +static MY_ATTRIBUTE((nonnull)) void row_log_apply_op_low( /*=================*/ @@ -3198,7 +3198,7 @@ func_exit: Applies an operation to a secondary index that was being created. @return NULL on failure (mrec corruption) or when out of data; pointer to next record on success */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) const mrec_t* row_log_apply_op( /*=============*/ @@ -3323,7 +3323,7 @@ corrupted: /******************************************************//** Applies operations to a secondary index that was being created. @return DB_SUCCESS, or error code on failure */ -static __attribute__((nonnull)) +static MY_ATTRIBUTE((nonnull)) dberr_t row_log_apply_ops( /*==============*/ diff --git a/mysql-wsrep-5.6/storage/innobase/row/row0merge.cc b/mysql-wsrep-5.6/storage/innobase/row/row0merge.cc index 20a73a9b..c094be8a 100644 --- a/mysql-wsrep-5.6/storage/innobase/row/row0merge.cc +++ b/mysql-wsrep-5.6/storage/innobase/row/row0merge.cc @@ -70,7 +70,7 @@ UNIV_INTERN char srv_disable_sort_file_cache; #ifdef UNIV_DEBUG /******************************************************//** Display a merge tuple. */ -static __attribute__((nonnull)) +static MY_ATTRIBUTE((nonnull)) void row_merge_tuple_print( /*==================*/ @@ -105,7 +105,7 @@ row_merge_tuple_print( /******************************************************//** Encode an index record. */ -static __attribute__((nonnull)) +static MY_ATTRIBUTE((nonnull)) void row_merge_buf_encode( /*=================*/ @@ -142,7 +142,7 @@ row_merge_buf_encode( /******************************************************//** Allocate a sort buffer. @return own: sort buffer */ -static __attribute__((malloc, nonnull)) +static MY_ATTRIBUTE((malloc, nonnull)) row_merge_buf_t* row_merge_buf_create_low( /*=====================*/ @@ -642,7 +642,7 @@ row_merge_dup_report( /*************************************************************//** Compare two tuples. @return 1, 0, -1 if a is greater, equal, less, respectively, than b */ -static __attribute__((warn_unused_result)) +static MY_ATTRIBUTE((warn_unused_result)) int row_merge_tuple_cmp( /*================*/ @@ -721,7 +721,7 @@ UT_SORT_FUNCTION_BODY(). /**********************************************************************//** Merge sort the tuple buffer in main memory. */ -static __attribute__((nonnull(4,5))) +static MY_ATTRIBUTE((nonnull(4,5))) void row_merge_tuple_sort( /*=================*/ @@ -1245,7 +1245,7 @@ row_merge_write_eof( @param[in,out] tmpfd temporary file handle @param[in] path path to create temporary file @return file descriptor, or -1 on failure */ -static __attribute__((warn_unused_result)) +static MY_ATTRIBUTE((warn_unused_result)) int row_merge_tmpfile_if_needed( int* tmpfd, @@ -1264,7 +1264,7 @@ row_merge_tmpfile_if_needed( @param[in] nrec number of records in the file @param[in] path path to create temporary files @return file descriptor, or -1 on failure */ -static __attribute__((warn_unused_result)) +static MY_ATTRIBUTE((warn_unused_result)) int row_merge_file_create_if_needed( merge_file_t* file, @@ -1310,7 +1310,7 @@ containing the index entries for the indexes to be built. @param[in,out] block file buffer @param[in,out] tmpfd temporary file handle return DB_SUCCESS or error */ -static __attribute__((nonnull(1,2,3,4,6,9,10,16), warn_unused_result)) +static MY_ATTRIBUTE((nonnull(1,2,3,4,6,9,10,16), warn_unused_result)) dberr_t row_merge_read_clustered_index( trx_t* trx, @@ -1987,7 +1987,7 @@ wait_again: /* Sync fts cache for other fts indexes to keep all fts indexes consistent in sync_doc_id. */ err = fts_sync_table(const_cast(new_table), - false, true); + false, true, false); if (err == DB_SUCCESS) { fts_update_next_doc_id( @@ -2028,7 +2028,7 @@ wait_again: /*************************************************************//** Merge two blocks of records on disk and write a bigger block. @return DB_SUCCESS or error code */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_merge_blocks( /*=============*/ @@ -2139,7 +2139,7 @@ done1: /*************************************************************//** Copy a block of index entries. @return TRUE on success, FALSE on failure */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) ibool row_merge_blocks_copy( /*==================*/ @@ -2212,7 +2212,7 @@ done0: /*************************************************************//** Merge disk files. @return DB_SUCCESS or error code */ -static __attribute__((nonnull)) +static MY_ATTRIBUTE((nonnull)) dberr_t row_merge( /*======*/ @@ -2398,7 +2398,7 @@ row_merge_sort( /*************************************************************//** Copy externally stored columns to the data tuple. */ -static __attribute__((nonnull)) +static MY_ATTRIBUTE((nonnull)) void row_merge_copy_blobs( /*=================*/ @@ -2443,7 +2443,7 @@ row_merge_copy_blobs( Read sorted file containing index data tuples and insert these data tuples to the index @return DB_SUCCESS or error number */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_merge_insert_index_tuples( /*==========================*/ @@ -3456,7 +3456,7 @@ row_merge_rename_tables_dict( /*********************************************************************//** Create and execute a query graph for creating an index. @return DB_SUCCESS or error code */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_merge_create_index_graph( /*=========================*/ diff --git a/mysql-wsrep-5.6/storage/innobase/row/row0mysql.cc b/mysql-wsrep-5.6/storage/innobase/row/row0mysql.cc index 3140e18a..11bef106 100644 --- a/mysql-wsrep-5.6/storage/innobase/row/row0mysql.cc +++ b/mysql-wsrep-5.6/storage/innobase/row/row0mysql.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2000, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2000, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -1419,9 +1419,12 @@ error_exit: } /* Difference between Doc IDs are restricted within - 4 bytes integer. See fts_get_encoded_len() */ + 4 bytes integer. See fts_get_encoded_len(). Consecutive + doc_ids difference should not exceed + FTS_DOC_ID_MAX_STEP value. */ - if (doc_id - next_doc_id >= FTS_DOC_ID_MAX_STEP) { + if (next_doc_id > 1 + && doc_id - next_doc_id >= FTS_DOC_ID_MAX_STEP) { fprintf(stderr, "InnoDB: Doc ID " UINT64PF " is too" " big. Its difference with largest" @@ -1678,7 +1681,8 @@ row_update_for_mysql( trx_t* trx = prebuilt->trx; ulint fk_depth = 0; - ut_ad(prebuilt && trx); + ut_ad(prebuilt != NULL); + ut_ad(trx != NULL); UT_NOT_USED(mysql_rec); if (prebuilt->table->ibd_file_missing) { @@ -1871,7 +1875,8 @@ row_unlock_for_mysql( btr_pcur_t* clust_pcur = &prebuilt->clust_pcur; trx_t* trx = prebuilt->trx; - ut_ad(prebuilt && trx); + ut_ad(prebuilt != NULL); + ut_ad(trx != NULL); if (UNIV_UNLIKELY (!srv_locks_unsafe_for_binlog @@ -2671,6 +2676,10 @@ loop: return(n_tables + n_tables_dropped); } + DBUG_EXECUTE_IF("row_drop_tables_in_background_sleep", + os_thread_sleep(5000000); + ); + table = dict_table_open_on_name(drop->table_name, FALSE, FALSE, DICT_ERR_IGNORE_NONE); @@ -2681,6 +2690,16 @@ loop: goto already_dropped; } + if (!table->to_be_dropped) { + /* There is a scenario: the old table is dropped + just after it's added into drop list, and new + table with the same name is created, then we try + to drop the new table in background. */ + dict_table_close(table, FALSE, FALSE); + + goto already_dropped; + } + ut_a(!table->can_be_evicted); dict_table_close(table, FALSE, FALSE); @@ -3940,6 +3959,13 @@ row_drop_table_for_mysql( } } + + DBUG_EXECUTE_IF("row_drop_table_add_to_background", + row_add_table_to_background_drop_list(table->name); + err = DB_SUCCESS; + goto funct_exit; + ); + /* TODO: could we replace the counter n_foreign_key_checks_running with lock checks on the table? Acquire here an exclusive lock on the table, and rewrite lock0lock.cc and the lock wait in srv0srv.cc so that @@ -4473,7 +4499,7 @@ row_mysql_drop_temp_tables(void) Drop all foreign keys in a database, see Bug#18942. Called at the end of row_drop_database_for_mysql(). @return error code or DB_SUCCESS */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t drop_all_foreign_keys_in_db( /*========================*/ @@ -4556,6 +4582,19 @@ loop: row_mysql_lock_data_dictionary(trx); while ((table_name = dict_get_first_table_name_in_db(name))) { + /* Drop parent table if it is a fts aux table, to + avoid accessing dropped fts aux tables in information + scheam when parent table still exists. + Note: Drop parent table will drop fts aux tables. */ + char* parent_table_name; + parent_table_name = fts_get_parent_table_name( + table_name, strlen(table_name)); + + if (parent_table_name != NULL) { + mem_free(table_name); + table_name = parent_table_name; + } + ut_a(memcmp(table_name, name, namelen) == 0); table = dict_table_open_on_name( @@ -4665,7 +4704,7 @@ loop: Checks if a table name contains the string "/#sql" which denotes temporary tables in MySQL. @return true if temporary table */ -UNIV_INTERN __attribute__((warn_unused_result)) +UNIV_INTERN MY_ATTRIBUTE((warn_unused_result)) bool row_is_mysql_tmp_table_name( /*========================*/ @@ -4679,7 +4718,7 @@ row_is_mysql_tmp_table_name( /****************************************************************//** Delete a single constraint. @return error code or DB_SUCCESS */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_delete_constraint_low( /*======================*/ @@ -4702,7 +4741,7 @@ row_delete_constraint_low( /****************************************************************//** Delete a single constraint. @return error code or DB_SUCCESS */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_delete_constraint( /*==================*/ diff --git a/mysql-wsrep-5.6/storage/innobase/row/row0purge.cc b/mysql-wsrep-5.6/storage/innobase/row/row0purge.cc index b26ba971..bc2e0b0e 100644 --- a/mysql-wsrep-5.6/storage/innobase/row/row0purge.cc +++ b/mysql-wsrep-5.6/storage/innobase/row/row0purge.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1997, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -69,7 +69,8 @@ row_purge_node_create( { purge_node_t* node; - ut_ad(parent && heap); + ut_ad(parent != NULL); + ut_ad(heap != NULL); node = static_cast( mem_heap_zalloc(heap, sizeof(*node))); @@ -120,7 +121,7 @@ row_purge_reposition_pcur( Removes a delete marked clustered index record if possible. @retval true if the row was not found, or it was successfully removed @retval false if the row was modified after the delete marking */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) bool row_purge_remove_clust_if_poss_low( /*===============================*/ @@ -202,7 +203,7 @@ marking. @retval true if the row was not found, or it was successfully removed @retval false the purge needs to be suspended because of running out of file space. */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) bool row_purge_remove_clust_if_poss( /*===========================*/ @@ -274,7 +275,7 @@ row_purge_poss_sec( Removes a secondary index entry if possible, by modifying the index tree. Does not try to buffer the delete. @return TRUE if success or if not found */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) ibool row_purge_remove_sec_if_poss_tree( /*==============================*/ @@ -396,7 +397,7 @@ Removes a secondary index entry without modifying the index tree, if possible. @retval true if success or if not found @retval false if row_purge_remove_sec_if_poss_tree() should be invoked */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) bool row_purge_remove_sec_if_poss_leaf( /*==============================*/ @@ -507,7 +508,7 @@ row_purge_remove_sec_if_poss_leaf( /***********************************************************//** Removes a secondary index entry if possible. */ -UNIV_INLINE __attribute__((nonnull(1,2))) +UNIV_INLINE MY_ATTRIBUTE((nonnull(1,2))) void row_purge_remove_sec_if_poss( /*=========================*/ @@ -554,7 +555,7 @@ Purges a delete marking of a record. @retval true if the row was not found, or it was successfully removed @retval false the purge needs to be suspended because of running out of file space */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) bool row_purge_del_mark( /*===============*/ @@ -745,7 +746,8 @@ row_purge_parse_undo_rec( ulint info_bits; ulint type; - ut_ad(node && thr); + ut_ad(node != NULL); + ut_ad(thr != NULL); ptr = trx_undo_rec_get_pars( undo_rec, &type, &node->cmpl_info, @@ -830,7 +832,7 @@ err_exit: /***********************************************************//** Purges the parsed record. @return true if purged, false if skipped */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) bool row_purge_record_func( /*==================*/ @@ -895,7 +897,7 @@ row_purge_record_func( Fetches an undo log record and does the purge for the recorded operation. If none left, or the current purge completed, returns the control to the parent node, which is always a query thread node. */ -static __attribute__((nonnull)) +static MY_ATTRIBUTE((nonnull)) void row_purge( /*======*/ diff --git a/mysql-wsrep-5.6/storage/innobase/row/row0quiesce.cc b/mysql-wsrep-5.6/storage/innobase/row/row0quiesce.cc index ecd6f479..583fbe60 100644 --- a/mysql-wsrep-5.6/storage/innobase/row/row0quiesce.cc +++ b/mysql-wsrep-5.6/storage/innobase/row/row0quiesce.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2012, 2014, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2012, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -37,7 +37,7 @@ Created 2012-02-08 by Sunny Bains. /*********************************************************************//** Write the meta data (index user fields) config file. @return DB_SUCCESS or error code. */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_quiesce_write_index_fields( /*===========================*/ @@ -97,7 +97,7 @@ row_quiesce_write_index_fields( /*********************************************************************//** Write the meta data config file index information. @return DB_SUCCESS or error code. */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_quiesce_write_indexes( /*======================*/ @@ -210,7 +210,7 @@ Write the meta data (table columns) config file. Serialise the contents of dict_col_t structure, along with the column name. All fields are serialized as ib_uint32_t. @return DB_SUCCESS or error code. */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_quiesce_write_table( /*====================*/ @@ -293,7 +293,7 @@ row_quiesce_write_table( /*********************************************************************//** Write the meta data config file header. @return DB_SUCCESS or error code. */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_quiesce_write_header( /*=====================*/ @@ -415,7 +415,7 @@ row_quiesce_write_header( /*********************************************************************//** Write the table meta data after quiesce. @return DB_SUCCESS or error code */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_quiesce_write_cfg( /*==================*/ @@ -530,10 +530,8 @@ row_quiesce_table_start( trx_purge_stop(); } - ut_a(table->id > 0); - for (ulint count = 0; - ibuf_contract_in_background(table->id, TRUE) != 0 + ibuf_merge_space(table->space) != 0 && !trx_is_interrupted(trx); ++count) { if (!(count % 20)) { diff --git a/mysql-wsrep-5.6/storage/innobase/row/row0row.cc b/mysql-wsrep-5.6/storage/innobase/row/row0row.cc index be786f95..96d25e15 100644 --- a/mysql-wsrep-5.6/storage/innobase/row/row0row.cc +++ b/mysql-wsrep-5.6/storage/innobase/row/row0row.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -240,7 +240,9 @@ row_build( ulint offsets_[REC_OFFS_NORMAL_SIZE]; rec_offs_init(offsets_); - ut_ad(index && rec && heap); + ut_ad(index != NULL); + ut_ad(rec != NULL); + ut_ad(heap != NULL); ut_ad(dict_index_is_clust(index)); ut_ad(!mutex_own(&trx_sys->mutex)); ut_ad(!col_map || col_table); @@ -409,7 +411,9 @@ row_rec_to_index_entry_low( ulint len; ulint rec_len; - ut_ad(rec && heap && index); + ut_ad(rec != NULL); + ut_ad(heap != NULL); + ut_ad(index != NULL); /* Because this function may be invoked by row0merge.cc on a record whose header is in different format, the check rec_offs_validate(rec, index, offsets) must be avoided here. */ @@ -464,7 +468,9 @@ row_rec_to_index_entry( byte* buf; const rec_t* copy_rec; - ut_ad(rec && heap && index); + ut_ad(rec != NULL); + ut_ad(heap != NULL); + ut_ad(index != NULL); ut_ad(rec_offs_validate(rec, index, offsets)); /* Take a copy of rec to heap */ @@ -523,7 +529,9 @@ row_build_row_ref( ulint* offsets = offsets_; rec_offs_init(offsets_); - ut_ad(index && rec && heap); + ut_ad(index != NULL); + ut_ad(rec != NULL); + ut_ad(heap != NULL); ut_ad(!dict_index_is_clust(index)); offsets = rec_get_offsets(rec, index, offsets, diff --git a/mysql-wsrep-5.6/storage/innobase/row/row0sel.cc b/mysql-wsrep-5.6/storage/innobase/row/row0sel.cc index b7bc3cff..42b1ab57 100644 --- a/mysql-wsrep-5.6/storage/innobase/row/row0sel.cc +++ b/mysql-wsrep-5.6/storage/innobase/row/row0sel.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1997, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, Google Inc. Portions of this file contain modifications contributed and copyrighted by @@ -675,7 +675,7 @@ sel_enqueue_prefetched_row( /*********************************************************************//** Builds a previous version of a clustered index record for a consistent read @return DB_SUCCESS or error code */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_sel_build_prev_vers( /*====================*/ @@ -710,7 +710,7 @@ row_sel_build_prev_vers( /*********************************************************************//** Builds the last committed version of a clustered index record for a semi-consistent read. */ -static __attribute__((nonnull)) +static MY_ATTRIBUTE((nonnull)) void row_sel_build_committed_vers_for_mysql( /*===================================*/ @@ -808,7 +808,7 @@ row_sel_test_other_conds( Retrieves the clustered index record corresponding to a record in a non-clustered index. Does the necessary locking. @return DB_SUCCESS or error code */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_sel_get_clust_rec( /*==================*/ @@ -1312,7 +1312,7 @@ func_exit: /*********************************************************************//** Performs a select step. @return DB_SUCCESS or error code */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_sel( /*====*/ @@ -2563,7 +2563,7 @@ row_sel_store_row_id_to_prebuilt( /**************************************************************//** Stores a non-SQL-NULL field in the MySQL format. The counterpart of this function is row_mysql_store_col_in_innobase_format() in row0mysql.cc. */ -static __attribute__((nonnull)) +static MY_ATTRIBUTE((nonnull)) void row_sel_field_store_in_mysql_format_func( /*=====================================*/ @@ -2752,7 +2752,7 @@ row_sel_field_store_in_mysql_format_func( #endif /* UNIV_DEBUG */ /**************************************************************//** Convert a field in the Innobase format to a field in the MySQL format. */ -static __attribute__((warn_unused_result)) +static MY_ATTRIBUTE((warn_unused_result)) ibool row_sel_store_mysql_field_func( /*===========================*/ @@ -2902,7 +2902,7 @@ Note that the template in prebuilt may advise us to copy only a few columns to mysql_rec, other columns are left blank. All columns may not be needed in the query. @return TRUE on success, FALSE if not all columns could be retrieved */ -static __attribute__((warn_unused_result)) +static MY_ATTRIBUTE((warn_unused_result)) ibool row_sel_store_mysql_rec( /*====================*/ @@ -2964,7 +2964,7 @@ row_sel_store_mysql_rec( /*********************************************************************//** Builds a previous version of a clustered index record for a consistent read @return DB_SUCCESS or error code */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_sel_build_prev_vers_for_mysql( /*==============================*/ @@ -3001,7 +3001,7 @@ Retrieves the clustered index record corresponding to a record in a non-clustered index. Does the necessary locking. Used in the MySQL interface. @return DB_SUCCESS, DB_SUCCESS_LOCKED_REC, or error code */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_sel_get_clust_rec_for_mysql( /*============================*/ diff --git a/mysql-wsrep-5.6/storage/innobase/row/row0uins.cc b/mysql-wsrep-5.6/storage/innobase/row/row0uins.cc index 849bf096..651042fb 100644 --- a/mysql-wsrep-5.6/storage/innobase/row/row0uins.cc +++ b/mysql-wsrep-5.6/storage/innobase/row/row0uins.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1997, 2014, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -61,7 +61,7 @@ introduced where a call to log_free_check() is bypassed. */ Removes a clustered index record. The pcur in node was positioned on the record, now it is detached. @return DB_SUCCESS or DB_OUT_OF_FILE_SPACE */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_undo_ins_remove_clust_rec( /*==========================*/ @@ -176,7 +176,7 @@ func_exit: /***************************************************************//** Removes a secondary index entry if found. @return DB_SUCCESS, DB_FAIL, or DB_OUT_OF_FILE_SPACE */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_undo_ins_remove_sec_low( /*========================*/ @@ -251,7 +251,7 @@ func_exit_no_pcur: Removes a secondary index entry from the index if found. Tries first optimistic, then pessimistic descent down the tree. @return DB_SUCCESS or DB_OUT_OF_FILE_SPACE */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_undo_ins_remove_sec( /*====================*/ @@ -350,7 +350,7 @@ close_table: /***************************************************************//** Removes secondary index records. @return DB_SUCCESS or DB_OUT_OF_FILE_SPACE */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_undo_ins_remove_sec_rec( /*========================*/ diff --git a/mysql-wsrep-5.6/storage/innobase/row/row0umod.cc b/mysql-wsrep-5.6/storage/innobase/row/row0umod.cc index 29252c78..4b44245b 100644 --- a/mysql-wsrep-5.6/storage/innobase/row/row0umod.cc +++ b/mysql-wsrep-5.6/storage/innobase/row/row0umod.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1997, 2014, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -72,7 +72,7 @@ introduced where a call to log_free_check() is bypassed. */ /***********************************************************//** Undoes a modify in a clustered index record. @return DB_SUCCESS, DB_FAIL, or error code: we may run out of file space */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_undo_mod_clust_low( /*===================*/ @@ -154,7 +154,7 @@ This is attempted when the record was inserted by updating a delete-marked record and there no longer exist transactions that would see the delete-marked record. @return DB_SUCCESS, DB_FAIL, or error code: we may run out of file space */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_undo_mod_remove_clust_low( /*==========================*/ @@ -243,7 +243,7 @@ row_undo_mod_remove_clust_low( Undoes a modify in a clustered index record. Sets also the node state for the next round of undo. @return DB_SUCCESS or error code: we may run out of file space */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_undo_mod_clust( /*===============*/ @@ -380,7 +380,7 @@ row_undo_mod_clust( /***********************************************************//** Delete marks or removes a secondary index entry if found. @return DB_SUCCESS, DB_FAIL, or DB_OUT_OF_FILE_SPACE */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_undo_mod_del_mark_or_remove_sec_low( /*====================================*/ @@ -516,7 +516,7 @@ not cause problems because in row0sel.cc, in queries we always retrieve the clustered index record or an earlier version of it, if the secondary index record through which we do the search is delete-marked. @return DB_SUCCESS or DB_OUT_OF_FILE_SPACE */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_undo_mod_del_mark_or_remove_sec( /*================================*/ @@ -549,7 +549,7 @@ fields but alphabetically they stayed the same, e.g., 'abc' -> 'aBc'. @retval DB_OUT_OF_FILE_SPACE when running out of tablespace @retval DB_DUPLICATE_KEY if the value was missing and an insert would lead to a duplicate exists */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_undo_mod_del_unmark_sec_and_undo_update( /*========================================*/ @@ -745,7 +745,7 @@ func_exit_no_pcur: /***********************************************************//** Flags a secondary index corrupted. */ -static __attribute__((nonnull)) +static MY_ATTRIBUTE((nonnull)) void row_undo_mod_sec_flag_corrupted( /*============================*/ @@ -777,7 +777,7 @@ row_undo_mod_sec_flag_corrupted( /***********************************************************//** Undoes a modify in secondary indexes when undo record type is UPD_DEL. @return DB_SUCCESS or DB_OUT_OF_FILE_SPACE */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_undo_mod_upd_del_sec( /*=====================*/ @@ -844,7 +844,7 @@ row_undo_mod_upd_del_sec( /***********************************************************//** Undoes a modify in secondary indexes when undo record type is DEL_MARK. @return DB_SUCCESS or DB_OUT_OF_FILE_SPACE */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_undo_mod_del_mark_sec( /*======================*/ @@ -912,7 +912,7 @@ row_undo_mod_del_mark_sec( /***********************************************************//** Undoes a modify in secondary indexes when undo record type is UPD_EXIST. @return DB_SUCCESS or DB_OUT_OF_FILE_SPACE */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_undo_mod_upd_exist_sec( /*=======================*/ @@ -1028,7 +1028,7 @@ row_undo_mod_upd_exist_sec( /***********************************************************//** Parses the row reference and other info in a modify undo log record. */ -static __attribute__((nonnull)) +static MY_ATTRIBUTE((nonnull)) void row_undo_mod_parse_undo_rec( /*========================*/ @@ -1105,7 +1105,8 @@ row_undo_mod( dberr_t err; ibool dict_locked; - ut_ad(node && thr); + ut_ad(node != NULL); + ut_ad(thr != NULL); ut_ad(node->state == UNDO_NODE_MODIFY); dict_locked = thr_get_trx(thr)->dict_operation_lock_mode == RW_X_LATCH; diff --git a/mysql-wsrep-5.6/storage/innobase/row/row0undo.cc b/mysql-wsrep-5.6/storage/innobase/row/row0undo.cc index 9977a1e8..149dc671 100644 --- a/mysql-wsrep-5.6/storage/innobase/row/row0undo.cc +++ b/mysql-wsrep-5.6/storage/innobase/row/row0undo.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1997, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -245,7 +245,7 @@ Fetches an undo log record and does the undo for the recorded operation. If none left, or a partial rollback completed, returns control to the parent node, which is always a query thread node. @return DB_SUCCESS if operation successfully completed, else error code */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_undo( /*=====*/ @@ -257,7 +257,8 @@ row_undo( roll_ptr_t roll_ptr; ibool locked_data_dict; - ut_ad(node && thr); + ut_ad(node != NULL); + ut_ad(thr != NULL); trx = node->trx; diff --git a/mysql-wsrep-5.6/storage/innobase/row/row0upd.cc b/mysql-wsrep-5.6/storage/innobase/row/row0upd.cc index 5a8987a8..6a79b1ec 100644 --- a/mysql-wsrep-5.6/storage/innobase/row/row0upd.cc +++ b/mysql-wsrep-5.6/storage/innobase/row/row0upd.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2014, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -209,7 +209,7 @@ NOTE that this function will temporarily commit mtr and lose the pcur position! @return DB_SUCCESS or an error code */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_upd_check_references_constraints( /*=================================*/ @@ -404,7 +404,7 @@ run_again: dict_table_open_on_name( foreign->referenced_table_name_lookup, FALSE, FALSE, DICT_ERR_IGNORE_NONE); - opened = TRUE; + opened = (foreign->referenced_table) ? TRUE : FALSE; } if (foreign->referenced_table) { @@ -427,7 +427,7 @@ run_again: ->n_foreign_key_checks_running); if (opened == TRUE) { - dict_table_close(foreign->referenced_table, TRUE, FALSE); + dict_table_close(foreign->referenced_table, FALSE, FALSE); opened = FALSE; } } @@ -766,7 +766,7 @@ row_upd_write_sys_vals_to_log( roll_ptr_t roll_ptr,/*!< in: roll ptr of the undo log record */ byte* log_ptr,/*!< pointer to a buffer of size > 20 opened in mlog */ - mtr_t* mtr __attribute__((unused))) /*!< in: mtr */ + mtr_t* mtr MY_ATTRIBUTE((unused))) /*!< in: mtr */ { ut_ad(dict_index_is_clust(index)); ut_ad(mtr); @@ -1801,7 +1801,7 @@ row_upd_store_row( Updates a secondary index entry of a row. @return DB_SUCCESS if operation successfully completed, else error code or DB_LOCK_WAIT */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_upd_sec_index_entry( /*====================*/ @@ -2040,7 +2040,7 @@ Updates the secondary index record if it is changed in the row update or deletes it if this is a delete. @return DB_SUCCESS if operation successfully completed, else error code or DB_LOCK_WAIT */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_upd_sec_step( /*=============*/ @@ -2073,7 +2073,7 @@ updated. We must mark them as inherited in entry, so that they are not freed in a rollback. A limited version of this function used to be called btr_cur_mark_dtuple_inherited_extern(). @return TRUE if any columns were inherited */ -static __attribute__((warn_unused_result)) +static MY_ATTRIBUTE((warn_unused_result)) ibool row_upd_clust_rec_by_insert_inherit_func( /*=====================================*/ @@ -2152,7 +2152,7 @@ fields of the clustered index record change. This should be quite rare in database applications. @return DB_SUCCESS if operation successfully completed, else error code or DB_LOCK_WAIT */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_upd_clust_rec_by_insert( /*========================*/ @@ -2311,7 +2311,7 @@ Updates a clustered index record of a row when the ordering fields do not change. @return DB_SUCCESS if operation successfully completed, else error code or DB_LOCK_WAIT */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_upd_clust_rec( /*==============*/ @@ -2470,7 +2470,7 @@ func_exit: /***********************************************************//** Delete marks a clustered index record. @return DB_SUCCESS if operation successfully completed, else error code */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_upd_del_mark_clust_rec( /*=======================*/ @@ -2563,7 +2563,7 @@ row_upd_del_mark_clust_rec( Updates the clustered index record. @return DB_SUCCESS if operation successfully completed, DB_LOCK_WAIT in case of a lock wait, else error code */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_upd_clust_step( /*===============*/ @@ -2771,7 +2771,7 @@ to this node, we assume that we have a persistent cursor which was on a record, and the position of the cursor is stored in the cursor. @return DB_SUCCESS if operation successfully completed, else error code or DB_LOCK_WAIT */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t row_upd( /*====*/ @@ -2780,7 +2780,8 @@ row_upd( { dberr_t err = DB_SUCCESS; - ut_ad(node && thr); + ut_ad(node != NULL); + ut_ad(thr != NULL); if (UNIV_LIKELY(node->in_mysql_interface)) { diff --git a/mysql-wsrep-5.6/storage/innobase/srv/srv0mon.cc b/mysql-wsrep-5.6/storage/innobase/srv/srv0mon.cc index 80c8f7fa..1aab9495 100644 --- a/mysql-wsrep-5.6/storage/innobase/srv/srv0mon.cc +++ b/mysql-wsrep-5.6/storage/innobase/srv/srv0mon.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2010, 2014, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2010, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. This program is free software; you can redistribute it and/or modify it under @@ -1347,7 +1347,10 @@ srv_mon_set_module_control( module */ set_current_module = FALSE; } else if (module_id == MONITOR_ALL_COUNTER) { - continue; + if (!(innodb_counter_info[ix].monitor_type + & MONITOR_GROUP_MODULE)) { + continue; + } } else { /* Hitting the next module, stop */ break; diff --git a/mysql-wsrep-5.6/storage/innobase/srv/srv0srv.cc b/mysql-wsrep-5.6/storage/innobase/srv/srv0srv.cc index 5e5a4029..c37d5e1f 100644 --- a/mysql-wsrep-5.6/storage/innobase/srv/srv0srv.cc +++ b/mysql-wsrep-5.6/storage/innobase/srv/srv0srv.cc @@ -1513,7 +1513,7 @@ extern "C" UNIV_INTERN os_thread_ret_t DECLARE_THREAD(srv_monitor_thread)( /*===============================*/ - void* arg __attribute__((unused))) + void* arg MY_ATTRIBUTE((unused))) /*!< in: a dummy parameter required by os_thread_create */ { @@ -1690,7 +1690,7 @@ extern "C" UNIV_INTERN os_thread_ret_t DECLARE_THREAD(srv_error_monitor_thread)( /*=====================================*/ - void* arg __attribute__((unused))) + void* arg MY_ATTRIBUTE((unused))) /*!< in: a dummy parameter required by os_thread_create */ { @@ -2131,7 +2131,7 @@ srv_master_do_active_tasks(void) /* Do an ibuf merge */ srv_main_thread_op_info = "doing insert buffer merge"; counter_time = ut_time_us(NULL); - ibuf_contract_in_background(0, FALSE); + ibuf_merge_in_background(false); MONITOR_INC_TIME_IN_MICRO_SECS( MONITOR_SRV_IBUF_MERGE_MICROSECOND, counter_time); @@ -2223,7 +2223,7 @@ srv_master_do_idle_tasks(void) /* Do an ibuf merge */ counter_time = ut_time_us(NULL); srv_main_thread_op_info = "doing insert buffer merge"; - ibuf_contract_in_background(0, TRUE); + ibuf_merge_in_background(true); MONITOR_INC_TIME_IN_MICRO_SECS( MONITOR_SRV_IBUF_MERGE_MICROSECOND, counter_time); @@ -2299,7 +2299,7 @@ srv_master_do_shutdown_tasks( /* Do an ibuf merge */ srv_main_thread_op_info = "doing insert buffer merge"; - n_bytes_merged = ibuf_contract_in_background(0, TRUE); + n_bytes_merged = ibuf_merge_in_background(true); /* Flush logs if needed */ srv_sync_log_buffer_in_background(); @@ -2339,7 +2339,7 @@ extern "C" UNIV_INTERN os_thread_ret_t DECLARE_THREAD(srv_master_thread)( /*==============================*/ - void* arg __attribute__((unused))) + void* arg MY_ATTRIBUTE((unused))) /*!< in: a dummy parameter required by os_thread_create */ { @@ -2483,7 +2483,7 @@ extern "C" UNIV_INTERN os_thread_ret_t DECLARE_THREAD(srv_worker_thread)( /*==============================*/ - void* arg __attribute__((unused))) /*!< in: a dummy parameter + void* arg MY_ATTRIBUTE((unused))) /*!< in: a dummy parameter required by os_thread_create */ { srv_slot_t* slot; @@ -2741,7 +2741,7 @@ extern "C" UNIV_INTERN os_thread_ret_t DECLARE_THREAD(srv_purge_coordinator_thread)( /*=========================================*/ - void* arg __attribute__((unused))) /*!< in: a dummy parameter + void* arg MY_ATTRIBUTE((unused))) /*!< in: a dummy parameter required by os_thread_create */ { srv_slot_t* slot; diff --git a/mysql-wsrep-5.6/storage/innobase/srv/srv0start.cc b/mysql-wsrep-5.6/storage/innobase/srv/srv0start.cc index 5a9aeb75..697107a1 100644 --- a/mysql-wsrep-5.6/storage/innobase/srv/srv0start.cc +++ b/mysql-wsrep-5.6/storage/innobase/srv/srv0start.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved. Copyright (c) 2008, Google Inc. Copyright (c) 2009, Percona Inc. @@ -509,7 +509,7 @@ UNIV_INTERN void srv_normalize_path_for_win( /*=======================*/ - char* str __attribute__((unused))) /*!< in/out: null-terminated + char* str MY_ATTRIBUTE((unused))) /*!< in/out: null-terminated character string */ { #ifdef __WIN__ @@ -526,7 +526,7 @@ srv_normalize_path_for_win( /*********************************************************************//** Creates a log file. @return DB_SUCCESS or error code */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t create_log_file( /*============*/ @@ -733,7 +733,7 @@ create_log_files_rename( /*********************************************************************//** Opens a log file. @return DB_SUCCESS or error code */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t open_log_file( /*==========*/ @@ -761,7 +761,7 @@ open_log_file( /*********************************************************************//** Creates or opens database data files and closes them. @return DB_SUCCESS or error code */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t open_or_create_data_files( /*======================*/ diff --git a/mysql-wsrep-5.6/storage/innobase/sync/sync0sync.cc b/mysql-wsrep-5.6/storage/innobase/sync/sync0sync.cc index 3ca495aa..4df35053 100644 --- a/mysql-wsrep-5.6/storage/innobase/sync/sync0sync.cc +++ b/mysql-wsrep-5.6/storage/innobase/sync/sync0sync.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, Google Inc. Portions of this file contain modifications contributed and copyrighted by @@ -387,10 +387,10 @@ ulint mutex_enter_nowait_func( /*====================*/ ib_mutex_t* mutex, /*!< in: pointer to mutex */ - const char* file_name __attribute__((unused)), + const char* file_name MY_ATTRIBUTE((unused)), /*!< in: file name where mutex requested */ - ulint line __attribute__((unused))) + ulint line MY_ATTRIBUTE((unused))) /*!< in: line where requested */ { ut_ad(mutex_validate(mutex)); diff --git a/mysql-wsrep-5.6/storage/innobase/trx/trx0purge.cc b/mysql-wsrep-5.6/storage/innobase/trx/trx0purge.cc index 56d46311..efc600d1 100644 --- a/mysql-wsrep-5.6/storage/innobase/trx/trx0purge.cc +++ b/mysql-wsrep-5.6/storage/innobase/trx/trx0purge.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -913,7 +913,7 @@ Fetches the next undo log record from the history list to purge. It must be released with the corresponding release function. @return copy of an undo log record or pointer to trx_purge_dummy_rec, if the whole undo log can skipped in purge; NULL if none left */ -static __attribute__((warn_unused_result, nonnull)) +static MY_ATTRIBUTE((warn_unused_result, nonnull)) trx_undo_rec_t* trx_purge_fetch_next_rec( /*=====================*/ diff --git a/mysql-wsrep-5.6/storage/innobase/trx/trx0rec.cc b/mysql-wsrep-5.6/storage/innobase/trx/trx0rec.cc index a698b37c..868a8a6c 100644 --- a/mysql-wsrep-5.6/storage/innobase/trx/trx0rec.cc +++ b/mysql-wsrep-5.6/storage/innobase/trx/trx0rec.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -1132,7 +1132,7 @@ trx_undo_rec_get_partial_row( /***********************************************************************//** Erases the unused undo log page end. @return TRUE if the page contained something, FALSE if it was empty */ -static __attribute__((nonnull)) +static MY_ATTRIBUTE((nonnull)) ibool trx_undo_erase_page_end( /*====================*/ @@ -1158,7 +1158,7 @@ byte* trx_undo_parse_erase_page_end( /*==========================*/ byte* ptr, /*!< in: buffer */ - byte* end_ptr __attribute__((unused)), /*!< in: buffer end */ + byte* end_ptr MY_ATTRIBUTE((unused)), /*!< in: buffer end */ page_t* page, /*!< in: page or NULL */ mtr_t* mtr) /*!< in: mtr or NULL */ { @@ -1441,7 +1441,7 @@ NOTE: the caller must have latches on the clustered index page. @retval true if the undo log has been truncated and we cannot fetch the old version @retval false if the undo log record is available */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) bool trx_undo_get_undo_rec( /*==================*/ @@ -1469,7 +1469,7 @@ trx_undo_get_undo_rec( #ifdef UNIV_DEBUG #define ATTRIB_USED_ONLY_IN_DEBUG #else /* UNIV_DEBUG */ -#define ATTRIB_USED_ONLY_IN_DEBUG __attribute__((unused)) +#define ATTRIB_USED_ONLY_IN_DEBUG MY_ATTRIBUTE((unused)) #endif /* UNIV_DEBUG */ /*******************************************************************//** diff --git a/mysql-wsrep-5.6/storage/innobase/trx/trx0roll.cc b/mysql-wsrep-5.6/storage/innobase/trx/trx0roll.cc index ae9095d1..306b982b 100644 --- a/mysql-wsrep-5.6/storage/innobase/trx/trx0roll.cc +++ b/mysql-wsrep-5.6/storage/innobase/trx/trx0roll.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2014, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -339,7 +339,7 @@ the row, these locks are naturally released in the rollback. Savepoints which were set after this savepoint are deleted. @return if no savepoint of the name found then DB_NO_SAVEPOINT, otherwise DB_SUCCESS */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t trx_rollback_to_savepoint_for_mysql_low( /*====================================*/ @@ -804,7 +804,7 @@ extern "C" UNIV_INTERN os_thread_ret_t DECLARE_THREAD(trx_rollback_or_clean_all_recovered)( /*================================================*/ - void* arg __attribute__((unused))) + void* arg MY_ATTRIBUTE((unused))) /*!< in: a dummy parameter required by os_thread_create */ { diff --git a/mysql-wsrep-5.6/storage/innobase/trx/trx0trx.cc b/mysql-wsrep-5.6/storage/innobase/trx/trx0trx.cc index 5390f6dc..dc09e288 100644 --- a/mysql-wsrep-5.6/storage/innobase/trx/trx0trx.cc +++ b/mysql-wsrep-5.6/storage/innobase/trx/trx0trx.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -967,7 +967,7 @@ trx_serialisation_number_get( /****************************************************************//** Assign the transaction its history serialisation number and write the update UNDO log record to the assigned rollback segment. */ -static __attribute__((nonnull)) +static MY_ATTRIBUTE((nonnull)) void trx_write_serialisation_history( /*============================*/ @@ -1054,7 +1054,7 @@ trx_write_serialisation_history( /******************************************************************** Finalize a transaction containing updates for a FTS table. */ -static __attribute__((nonnull)) +static MY_ATTRIBUTE((nonnull)) void trx_finalize_for_fts_table( /*=======================*/ @@ -1087,7 +1087,7 @@ trx_finalize_for_fts_table( /******************************************************************//** Finalize a transaction containing updates to FTS tables. */ -static __attribute__((nonnull)) +static MY_ATTRIBUTE((nonnull)) void trx_finalize_for_fts( /*=================*/ @@ -1154,7 +1154,7 @@ trx_flush_log_if_needed_low( /**********************************************************************//** If required, flushes the log to disk based on the value of innodb_flush_log_at_trx_commit. */ -static __attribute__((nonnull)) +static MY_ATTRIBUTE((nonnull)) void trx_flush_log_if_needed( /*====================*/ @@ -1169,7 +1169,7 @@ trx_flush_log_if_needed( /****************************************************************//** Commits a transaction in memory. */ -static __attribute__((nonnull)) +static MY_ATTRIBUTE((nonnull)) void trx_commit_in_memory( /*=================*/ @@ -2169,7 +2169,7 @@ which is in the prepared state @return trx on match, the trx->xid will be invalidated; note that the trx may have been committed, unless the caller is holding lock_sys->mutex */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) trx_t* trx_get_trx_by_xid_low( /*===================*/ diff --git a/mysql-wsrep-5.6/storage/innobase/trx/trx0undo.cc b/mysql-wsrep-5.6/storage/innobase/trx/trx0undo.cc index 290271c6..2ddb35d5 100644 --- a/mysql-wsrep-5.6/storage/innobase/trx/trx0undo.cc +++ b/mysql-wsrep-5.6/storage/innobase/trx/trx0undo.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -419,11 +419,11 @@ trx_undo_page_init( Creates a new undo log segment in file. @return DB_SUCCESS if page creation OK possible error codes are: DB_TOO_MANY_CONCURRENT_TRXS DB_OUT_OF_FILE_SPACE */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t trx_undo_seg_create( /*================*/ - trx_rseg_t* rseg __attribute__((unused)),/*!< in: rollback segment */ + trx_rseg_t* rseg MY_ATTRIBUTE((unused)),/*!< in: rollback segment */ trx_rsegf_t* rseg_hdr,/*!< in: rollback segment header, page x-latched */ ulint type, /*!< in: type of the segment: TRX_UNDO_INSERT or @@ -443,7 +443,9 @@ trx_undo_seg_create( ibool success; dberr_t err = DB_SUCCESS; - ut_ad(mtr && id && rseg_hdr); + ut_ad(mtr != NULL); + ut_ad(id != NULL); + ut_ad(rseg_hdr != NULL); ut_ad(mutex_own(&(rseg->mutex))); /* fputs(type == TRX_UNDO_INSERT @@ -827,7 +829,7 @@ byte* trx_undo_parse_discard_latest( /*==========================*/ byte* ptr, /*!< in: buffer */ - byte* end_ptr __attribute__((unused)), /*!< in: buffer end */ + byte* end_ptr MY_ATTRIBUTE((unused)), /*!< in: buffer end */ page_t* page, /*!< in: page or NULL */ mtr_t* mtr) /*!< in: mtr or NULL */ { @@ -1557,7 +1559,7 @@ Creates a new undo log. @return DB_SUCCESS if successful in creating the new undo lob object, possible error codes are: DB_TOO_MANY_CONCURRENT_TRXS DB_OUT_OF_FILE_SPACE DB_OUT_OF_MEMORY */ -static __attribute__((nonnull, warn_unused_result)) +static MY_ATTRIBUTE((nonnull, warn_unused_result)) dberr_t trx_undo_create( /*============*/ diff --git a/mysql-wsrep-5.6/storage/myisam/ft_boolean_search.c b/mysql-wsrep-5.6/storage/myisam/ft_boolean_search.c index bf30ec37..661917a7 100644 --- a/mysql-wsrep-5.6/storage/myisam/ft_boolean_search.c +++ b/mysql-wsrep-5.6/storage/myisam/ft_boolean_search.c @@ -332,7 +332,7 @@ static int _ftb_parse_query(FTB *ftb, uchar *query, uint len, } -static int _ftb_no_dupes_cmp(const void* not_used __attribute__((unused)), +static int _ftb_no_dupes_cmp(const void* not_used MY_ATTRIBUTE((unused)), const void *a,const void *b) { return CMP_NUM((*((my_off_t*)a)), (*((my_off_t*)b))); @@ -643,7 +643,7 @@ typedef struct st_my_ftb_phrase_param static int ftb_phrase_add_word(MYSQL_FTPARSER_PARAM *param, char *word, int word_len, - MYSQL_FTPARSER_BOOLEAN_INFO *boolean_info __attribute__((unused))) + MYSQL_FTPARSER_BOOLEAN_INFO *boolean_info MY_ATTRIBUTE((unused))) { MY_FTB_PHRASE_PARAM *phrase_param= param->mysql_ftparam; FT_WORD *w= (FT_WORD *)phrase_param->document->data; @@ -901,7 +901,7 @@ typedef struct st_my_ftb_find_param static int ftb_find_relevance_add_word(MYSQL_FTPARSER_PARAM *param, char *word, int len, - MYSQL_FTPARSER_BOOLEAN_INFO *boolean_info __attribute__((unused))) + MYSQL_FTPARSER_BOOLEAN_INFO *boolean_info MY_ATTRIBUTE((unused))) { MY_FTB_FIND_PARAM *ftb_param= param->mysql_ftparam; FT_INFO *ftb= ftb_param->ftb; diff --git a/mysql-wsrep-5.6/storage/myisam/ft_nlq_search.c b/mysql-wsrep-5.6/storage/myisam/ft_nlq_search.c index 67a7fae1..1503a889 100644 --- a/mysql-wsrep-5.6/storage/myisam/ft_nlq_search.c +++ b/mysql-wsrep-5.6/storage/myisam/ft_nlq_search.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -51,7 +51,7 @@ typedef struct st_ft_superdoc double tmp_weight; } FT_SUPERDOC; -static int FT_SUPERDOC_cmp(void* cmp_arg __attribute__((unused)), +static int FT_SUPERDOC_cmp(void* cmp_arg MY_ATTRIBUTE((unused)), FT_SUPERDOC *p1, FT_SUPERDOC *p2) { if (p1->doc.dpos < p2->doc.dpos) @@ -189,7 +189,7 @@ do_skip: static int walk_and_copy(FT_SUPERDOC *from, - uint32 count __attribute__((unused)), FT_DOC **to) + uint32 count MY_ATTRIBUTE((unused)), FT_DOC **to) { DBUG_ENTER("walk_and_copy"); from->doc.weight+=from->tmp_weight*from->word_ptr->weight; @@ -200,7 +200,7 @@ static int walk_and_copy(FT_SUPERDOC *from, } static int walk_and_push(FT_SUPERDOC *from, - uint32 count __attribute__((unused)), QUEUE *best) + uint32 count MY_ATTRIBUTE((unused)), QUEUE *best) { DBUG_ENTER("walk_and_copy"); from->doc.weight+=from->tmp_weight*from->word_ptr->weight; @@ -210,7 +210,7 @@ static int walk_and_push(FT_SUPERDOC *from, } -static int FT_DOC_cmp(void *unused __attribute__((unused)), +static int FT_DOC_cmp(void *unused MY_ATTRIBUTE((unused)), FT_DOC *a, FT_DOC *b) { double c= b->weight - a->weight; @@ -345,8 +345,8 @@ int ft_nlq_read_next(FT_INFO *handler, char *record) float ft_nlq_find_relevance(FT_INFO *handler, - uchar *record __attribute__((unused)), - uint length __attribute__((unused))) + uchar *record MY_ATTRIBUTE((unused)), + uint length MY_ATTRIBUTE((unused))) { int a,b,c; FT_DOC *docs=handler->doc; diff --git a/mysql-wsrep-5.6/storage/myisam/ft_parser.c b/mysql-wsrep-5.6/storage/myisam/ft_parser.c index 2ef63c8a..564d6aa2 100644 --- a/mysql-wsrep-5.6/storage/myisam/ft_parser.c +++ b/mysql-wsrep-5.6/storage/myisam/ft_parser.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify @@ -259,7 +259,7 @@ void ft_parse_init(TREE *wtree, const CHARSET_INFO *cs) static int ft_add_word(MYSQL_FTPARSER_PARAM *param, char *word, int word_len, - MYSQL_FTPARSER_BOOLEAN_INFO *boolean_info __attribute__((unused))) + MYSQL_FTPARSER_BOOLEAN_INFO *boolean_info MY_ATTRIBUTE((unused))) { TREE *wtree; FT_WORD w; diff --git a/mysql-wsrep-5.6/storage/myisam/ft_stopwords.c b/mysql-wsrep-5.6/storage/myisam/ft_stopwords.c index 4f290e78..bee8f279 100644 --- a/mysql-wsrep-5.6/storage/myisam/ft_stopwords.c +++ b/mysql-wsrep-5.6/storage/myisam/ft_stopwords.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -30,7 +30,7 @@ typedef struct st_ft_stopwords static TREE *stopwords3=NULL; -static int FT_STOPWORD_cmp(void* cmp_arg __attribute__((unused)), +static int FT_STOPWORD_cmp(void* cmp_arg MY_ATTRIBUTE((unused)), FT_STOPWORD *w1, FT_STOPWORD *w2) { return ha_compare_text(ft_stopword_cs, @@ -39,7 +39,7 @@ static int FT_STOPWORD_cmp(void* cmp_arg __attribute__((unused)), } static void FT_STOPWORD_free(FT_STOPWORD *w, TREE_FREE action, - void *arg __attribute__((unused))) + void *arg MY_ATTRIBUTE((unused))) { if (action == free_free) my_free((void*)w->pos); diff --git a/mysql-wsrep-5.6/storage/myisam/ha_myisam.cc b/mysql-wsrep-5.6/storage/myisam/ha_myisam.cc index 5ae923ae..80d20ace 100644 --- a/mysql-wsrep-5.6/storage/myisam/ha_myisam.cc +++ b/mysql-wsrep-5.6/storage/myisam/ha_myisam.cc @@ -1,5 +1,5 @@ /* - Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1089,24 +1089,36 @@ int ha_myisam::repair(THD *thd, MI_CHECK ¶m, bool do_optimize) /* TODO: respect myisam_repair_threads variable */ my_snprintf(buf, 40, "Repair with %d threads", my_count_bits(key_map)); thd_proc_info(thd, buf); + /* + The new file is created with the right stats, so we can skip + copying file stats from old to new. + */ error = mi_repair_parallel(¶m, file, fixed_name, - param.testflag & T_QUICK); + param.testflag & T_QUICK, TRUE); thd_proc_info(thd, "Repair done"); // to reset proc_info, as // it was pointing to local buffer } else { thd_proc_info(thd, "Repair by sorting"); + /* + The new file is created with the right stats, so we can skip + copying file stats from old to new. + */ error = mi_repair_by_sort(¶m, file, fixed_name, - param.testflag & T_QUICK); + param.testflag & T_QUICK, TRUE); } } else { thd_proc_info(thd, "Repair with keycache"); param.testflag &= ~T_REP_BY_SORT; + /* + The new file is created with the right stats, so we can skip + copying file stats from old to new. + */ error= mi_repair(¶m, file, fixed_name, - param.testflag & T_QUICK); + param.testflag & T_QUICK, TRUE); } #ifdef HAVE_MMAP if (remap) @@ -1122,7 +1134,11 @@ int ha_myisam::repair(THD *thd, MI_CHECK ¶m, bool do_optimize) { optimize_done=1; thd_proc_info(thd, "Sorting index"); - error=mi_sort_index(¶m,file,fixed_name); + /* + The new file is created with the right stats, so we can skip + copying file stats from old to new. + */ + error=mi_sort_index(¶m,file,fixed_name, TRUE); } if (!statistics_done && (local_testflag & T_STATISTICS)) { @@ -1725,8 +1741,8 @@ int ha_myisam::index_last(uchar *buf) } int ha_myisam::index_next_same(uchar *buf, - const uchar *key __attribute__((unused)), - uint length __attribute__((unused))) + const uchar *key MY_ATTRIBUTE((unused)), + uint length MY_ATTRIBUTE((unused))) { int error; DBUG_ASSERT(inited==INDEX); diff --git a/mysql-wsrep-5.6/storage/myisam/mi_check.c b/mysql-wsrep-5.6/storage/myisam/mi_check.c index 5b40a120..fa93d0e8 100644 --- a/mysql-wsrep-5.6/storage/myisam/mi_check.c +++ b/mysql-wsrep-5.6/storage/myisam/mi_check.c @@ -1,5 +1,5 @@ /* - Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1512,7 +1512,7 @@ static int mi_drop_all_indexes(MI_CHECK *param, MI_INFO *info, my_bool force) /* Save new datafile-name in temp_filename */ int mi_repair(MI_CHECK *param, register MI_INFO *info, - char * name, int rep_quick) + char * name, int rep_quick, my_bool no_copy_stat) { int error,got_error; ha_rows start_records,new_header_length; @@ -1726,6 +1726,11 @@ err: /* Replace the actual file with the temporary file */ if (new_file >= 0) { + myf flags= 0; + if (param->testflag & T_BACKUP_DATA) + flags |= MY_REDEL_MAKE_BACKUP; + if (no_copy_stat) + flags |= MY_REDEL_NO_COPY_STAT; mysql_file_close(new_file, MYF(0)); info->dfile=new_file= -1; /* @@ -1744,8 +1749,7 @@ err: info->s->file_map= NULL; } if (change_to_newfile(share->data_file_name, MI_NAME_DEXT, DATA_TMP_EXT, - (param->testflag & T_BACKUP_DATA ? - MYF(MY_REDEL_MAKE_BACKUP): MYF(0))) || + flags) || mi_open_datafile(info,share,name,-1)) got_error=1; @@ -1902,7 +1906,7 @@ int movepoint(register MI_INFO *info, uchar *record, my_off_t oldpos, /* Tell system that we want all memory for our cache */ -void lock_memory(MI_CHECK *param __attribute__((unused))) +void lock_memory(MI_CHECK *param MY_ATTRIBUTE((unused))) { #ifdef SUN_OS /* Key-cacheing thrases on sun 4.1 */ if (param->opt_lock_memory) @@ -1933,7 +1937,8 @@ int flush_blocks(MI_CHECK *param, KEY_CACHE *key_cache, File file) /* Sort index for more efficent reads */ -int mi_sort_index(MI_CHECK *param, register MI_INFO *info, char * name) +int mi_sort_index(MI_CHECK *param, register MI_INFO *info, char * name, + my_bool no_copy_stat) { reg2 uint key; reg1 MI_KEYDEF *keyinfo; @@ -2010,7 +2015,7 @@ int mi_sort_index(MI_CHECK *param, register MI_INFO *info, char * name) share->kfile = -1; (void) mysql_file_close(new_file, MYF(MY_WME)); if (change_to_newfile(share->index_file_name, MI_NAME_IEXT, INDEX_TMP_EXT, - MYF(0)) || + no_copy_stat ? MYF(MY_REDEL_NO_COPY_STAT) : MYF(0)) || mi_open_keyfile(share)) goto err2; info->lock_type= F_UNLCK; /* Force mi_readinfo to lock */ @@ -2215,6 +2220,8 @@ err: info MyISAM handler to repair name Name of table (for warnings) rep_quick set to <> 0 if we should not change data file + no_copy_stat Don't copy file stats from old to new file, + assume that new file was created with correct stats RESULT 0 ok @@ -2222,7 +2229,7 @@ err: */ int mi_repair_by_sort(MI_CHECK *param, register MI_INFO *info, - const char * name, int rep_quick) + const char * name, int rep_quick, my_bool no_copy_stat) { int got_error; uint i; @@ -2549,11 +2556,15 @@ err: /* Replace the actual file with the temporary file */ if (new_file >= 0) { + myf flags= 0; + if (param->testflag & T_BACKUP_DATA) + flags |= MY_REDEL_MAKE_BACKUP; + if (no_copy_stat) + flags |= MY_REDEL_NO_COPY_STAT; mysql_file_close(new_file, MYF(0)); info->dfile=new_file= -1; if (change_to_newfile(share->data_file_name,MI_NAME_DEXT, DATA_TMP_EXT, - (param->testflag & T_BACKUP_DATA ? - MYF(MY_REDEL_MAKE_BACKUP): MYF(0))) || + flags) || mi_open_datafile(info,share,name,-1)) got_error=1; } @@ -2601,6 +2612,8 @@ err: info MyISAM handler to repair name Name of table (for warnings) rep_quick set to <> 0 if we should not change data file + no_copy_stat Don't copy file stats from old to new file, + assume that new file was created with correct stats DESCRIPTION Same as mi_repair_by_sort but do it multithreaded @@ -2635,7 +2648,7 @@ err: */ int mi_repair_parallel(MI_CHECK *param, register MI_INFO *info, - const char * name, int rep_quick) + const char * name, int rep_quick, my_bool no_copy_stat) { int got_error; uint i,key, total_key_length, istep; @@ -3082,11 +3095,15 @@ err: /* Replace the actual file with the temporary file */ if (new_file >= 0) { + myf flags= 0; + if (param->testflag & T_BACKUP_DATA) + flags |= MY_REDEL_MAKE_BACKUP; + if (no_copy_stat) + flags |= MY_REDEL_NO_COPY_STAT; mysql_file_close(new_file, MYF(0)); info->dfile=new_file= -1; if (change_to_newfile(share->data_file_name, MI_NAME_DEXT, DATA_TMP_EXT, - (param->testflag & T_BACKUP_DATA ? - MYF(MY_REDEL_MAKE_BACKUP): MYF(0))) || + flags) || mi_open_datafile(info,share,name,-1)) got_error=1; } diff --git a/mysql-wsrep-5.6/storage/myisam/mi_extrafunc.h b/mysql-wsrep-5.6/storage/myisam/mi_extrafunc.h index 21097967..4ae7fa93 100644 --- a/mysql-wsrep-5.6/storage/myisam/mi_extrafunc.h +++ b/mysql-wsrep-5.6/storage/myisam/mi_extrafunc.h @@ -1,5 +1,4 @@ -/* Copyright (c) 2000-2006 MySQL AB, 2009 Sun Microsystems, Inc. - Use is subject to license terms. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -14,9 +13,9 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -void _mi_report_crashed(MI_INFO *file __attribute__((unused)), - const char *message __attribute__((unused)), - const char *sfile __attribute__((unused)), - uint sline __attribute__((unused))) +void _mi_report_crashed(MI_INFO *file MY_ATTRIBUTE((unused)), + const char *message MY_ATTRIBUTE((unused)), + const char *sfile MY_ATTRIBUTE((unused)), + uint sline MY_ATTRIBUTE((unused))) { } diff --git a/mysql-wsrep-5.6/storage/myisam/mi_keycache.c b/mysql-wsrep-5.6/storage/myisam/mi_keycache.c index d5de9865..7d910dfb 100644 --- a/mysql-wsrep-5.6/storage/myisam/mi_keycache.c +++ b/mysql-wsrep-5.6/storage/myisam/mi_keycache.c @@ -1,5 +1,4 @@ -/* Copyright (c) 2003-2008 MySQL AB, 2009 Sun Microsystems, Inc. - Use is subject to license terms. +/* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -48,7 +47,7 @@ */ int mi_assign_to_key_cache(MI_INFO *info, - ulonglong key_map __attribute__((unused)), + ulonglong key_map MY_ATTRIBUTE((unused)), KEY_CACHE *key_cache) { int error= 0; diff --git a/mysql-wsrep-5.6/storage/myisam/mi_open.c b/mysql-wsrep-5.6/storage/myisam/mi_open.c index ccb32115..ac25be90 100644 --- a/mysql-wsrep-5.6/storage/myisam/mi_open.c +++ b/mysql-wsrep-5.6/storage/myisam/mi_open.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1229,7 +1229,7 @@ exist a dup()-like call that would give us two different file descriptors. *************************************************************************/ int mi_open_datafile(MI_INFO *info, MYISAM_SHARE *share, const char *org_name, - File file_to_dup __attribute__((unused))) + File file_to_dup MY_ATTRIBUTE((unused))) { char *data_name= share->data_file_name; char real_data_name[FN_REFLEN]; diff --git a/mysql-wsrep-5.6/storage/myisam/mi_packrec.c b/mysql-wsrep-5.6/storage/myisam/mi_packrec.c index 8770720d..11615810 100644 --- a/mysql-wsrep-5.6/storage/myisam/mi_packrec.c +++ b/mysql-wsrep-5.6/storage/myisam/mi_packrec.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1009,7 +1009,7 @@ static void uf_zerofill_normal(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff, uchar * } static void uf_constant(MI_COLUMNDEF *rec, - MI_BIT_BUFF *bit_buff __attribute__((unused)), + MI_BIT_BUFF *bit_buff MY_ATTRIBUTE((unused)), uchar *to, uchar *end) { @@ -1027,8 +1027,8 @@ static void uf_intervall(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff, uchar *to, /*ARGSUSED*/ -static void uf_zero(MI_COLUMNDEF *rec __attribute__((unused)), - MI_BIT_BUFF *bit_buff __attribute__((unused)), +static void uf_zero(MI_COLUMNDEF *rec MY_ATTRIBUTE((unused)), + MI_BIT_BUFF *bit_buff MY_ATTRIBUTE((unused)), uchar *to, uchar *end) { memset(to, 0, (end-to)); @@ -1058,7 +1058,7 @@ static void uf_blob(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff, static void uf_varchar1(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff, - uchar *to, uchar *end __attribute__((unused))) + uchar *to, uchar *end MY_ATTRIBUTE((unused))) { if (get_bit(bit_buff)) to[0]= 0; /* Zero lengths */ @@ -1072,7 +1072,7 @@ static void uf_varchar1(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff, static void uf_varchar2(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff, - uchar *to, uchar *end __attribute__((unused))) + uchar *to, uchar *end MY_ATTRIBUTE((unused))) { if (get_bit(bit_buff)) to[0]=to[1]=0; /* Zero lengths */ @@ -1607,7 +1607,7 @@ static int _mi_read_mempack_record(MI_INFO *info, my_off_t filepos, uchar *buf) static int _mi_read_rnd_mempack_record(MI_INFO *info, uchar *buf, register my_off_t filepos, my_bool skip_deleted_blocks - __attribute__((unused))) + MY_ATTRIBUTE((unused))) { MI_BLOCK_INFO block_info; MYISAM_SHARE *share=info->s; diff --git a/mysql-wsrep-5.6/storage/myisam/mi_search.c b/mysql-wsrep-5.6/storage/myisam/mi_search.c index 7978f73d..b13c421b 100644 --- a/mysql-wsrep-5.6/storage/myisam/mi_search.c +++ b/mysql-wsrep-5.6/storage/myisam/mi_search.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -180,7 +180,7 @@ err: int _mi_bin_search(MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *page, uchar *key, uint key_len, uint comp_flag, uchar **ret_pos, - uchar *buff __attribute__((unused)), my_bool *last_key) + uchar *buff MY_ATTRIBUTE((unused)), my_bool *last_key) { reg4 int start,mid,end,save_end; int flag; @@ -1420,9 +1420,9 @@ int _mi_search_last(register MI_INFO *info, register MI_KEYDEF *keyinfo, int _mi_calc_static_key_length(MI_KEYDEF *keyinfo,uint nod_flag, - uchar *next_pos __attribute__((unused)), - uchar *org_key __attribute__((unused)), - uchar *prev_key __attribute__((unused)), + uchar *next_pos MY_ATTRIBUTE((unused)), + uchar *org_key MY_ATTRIBUTE((unused)), + uchar *prev_key MY_ATTRIBUTE((unused)), uchar *key, MI_KEY_PARAM *s_temp) { s_temp->key=key; @@ -1433,9 +1433,9 @@ _mi_calc_static_key_length(MI_KEYDEF *keyinfo,uint nod_flag, int _mi_calc_var_key_length(MI_KEYDEF *keyinfo,uint nod_flag, - uchar *next_pos __attribute__((unused)), - uchar *org_key __attribute__((unused)), - uchar *prev_key __attribute__((unused)), + uchar *next_pos MY_ATTRIBUTE((unused)), + uchar *org_key MY_ATTRIBUTE((unused)), + uchar *prev_key MY_ATTRIBUTE((unused)), uchar *key, MI_KEY_PARAM *s_temp) { s_temp->key=key; @@ -1825,7 +1825,7 @@ _mi_calc_bin_pack_key_length(MI_KEYDEF *keyinfo,uint nod_flag,uchar *next_key, /* store key without compression */ -void _mi_store_static_key(MI_KEYDEF *keyinfo __attribute__((unused)), +void _mi_store_static_key(MI_KEYDEF *keyinfo MY_ATTRIBUTE((unused)), register uchar *key_pos, register MI_KEY_PARAM *s_temp) { @@ -1840,7 +1840,7 @@ void _mi_store_static_key(MI_KEYDEF *keyinfo __attribute__((unused)), { *((pos)++) = (uchar) ((length) >> 8); *((pos)++) = (uchar) (length); } } -void _mi_store_var_pack_key(MI_KEYDEF *keyinfo __attribute__((unused)), +void _mi_store_var_pack_key(MI_KEYDEF *keyinfo MY_ATTRIBUTE((unused)), register uchar *key_pos, register MI_KEY_PARAM *s_temp) { @@ -1903,7 +1903,7 @@ void _mi_store_var_pack_key(MI_KEYDEF *keyinfo __attribute__((unused)), /* variable length key with prefix compression */ -void _mi_store_bin_pack_key(MI_KEYDEF *keyinfo __attribute__((unused)), +void _mi_store_bin_pack_key(MI_KEYDEF *keyinfo MY_ATTRIBUTE((unused)), register uchar *key_pos, register MI_KEY_PARAM *s_temp) { diff --git a/mysql-wsrep-5.6/storage/myisam/mi_static.c b/mysql-wsrep-5.6/storage/myisam/mi_static.c index f6cc6536..899d08af 100644 --- a/mysql-wsrep-5.6/storage/myisam/mi_static.c +++ b/mysql-wsrep-5.6/storage/myisam/mi_static.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -41,7 +41,7 @@ ulonglong myisam_max_temp_length= MAX_FILE_SIZE; ulong myisam_data_pointer_size=4; ulonglong myisam_mmap_size= SIZE_T_MAX, myisam_mmap_used= 0; -static int always_valid(const char *filename __attribute__((unused))) +static int always_valid(const char *filename MY_ATTRIBUTE((unused))) { return 0; } diff --git a/mysql-wsrep-5.6/storage/myisam/mi_test1.c b/mysql-wsrep-5.6/storage/myisam/mi_test1.c index 17888f7d..7db493da 100644 --- a/mysql-wsrep-5.6/storage/myisam/mi_test1.c +++ b/mysql-wsrep-5.6/storage/myisam/mi_test1.c @@ -1,5 +1,5 @@ /* - Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -586,8 +586,8 @@ static struct my_option my_long_options[] = static my_bool -get_one_option(int optid, const struct my_option *opt __attribute__((unused)), - char *argument __attribute__((unused))) +get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)), + char *argument MY_ATTRIBUTE((unused))) { switch(optid) { case 'a': diff --git a/mysql-wsrep-5.6/storage/myisam/myisam_ftdump.c b/mysql-wsrep-5.6/storage/myisam/myisam_ftdump.c index 01737c54..5d00b5ad 100644 --- a/mysql-wsrep-5.6/storage/myisam/myisam_ftdump.c +++ b/mysql-wsrep-5.6/storage/myisam/myisam_ftdump.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -226,8 +226,8 @@ err: static my_bool -get_one_option(int optid, const struct my_option *opt __attribute__((unused)), - char *argument __attribute__((unused))) +get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)), + char *argument MY_ATTRIBUTE((unused))) { switch(optid) { case 'd': diff --git a/mysql-wsrep-5.6/storage/myisam/myisamchk.c b/mysql-wsrep-5.6/storage/myisam/myisamchk.c index d6fab482..f32d830e 100644 --- a/mysql-wsrep-5.6/storage/myisam/myisamchk.c +++ b/mysql-wsrep-5.6/storage/myisam/myisamchk.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -466,7 +466,7 @@ TYPELIB myisam_stats_method_typelib= { static my_bool get_one_option(int optid, - const struct my_option *opt __attribute__((unused)), + const struct my_option *opt MY_ATTRIBUTE((unused)), char *argument) { switch (optid) { @@ -994,14 +994,18 @@ static int myisamchk(MI_CHECK *param, char * filename) info->s->state.key_map, param->force_sort)) { + /* + The new file might not be created with the right stats depending + on how myisamchk is run, so we must copy file stats from old to new. + */ if (param->testflag & T_REP_BY_SORT) - error=mi_repair_by_sort(param,info,filename,rep_quick); + error= mi_repair_by_sort(param, info, filename, rep_quick, FALSE); else - error=mi_repair_parallel(param,info,filename,rep_quick); + error= mi_repair_parallel(param, info, filename, rep_quick, FALSE); state_updated=1; } else if (param->testflag & T_REP_ANY) - error=mi_repair(param, info,filename,rep_quick); + error= mi_repair(param, info, filename, rep_quick, FALSE); } if (!error && param->testflag & T_SORT_RECORDS) { @@ -1041,12 +1045,12 @@ static int myisamchk(MI_CHECK *param, char * filename) { if (param->verbose) puts("Table had a compressed index; We must now recreate the index"); - error=mi_repair_by_sort(param,info,filename,1); + error= mi_repair_by_sort(param, info, filename, 1, FALSE); } } } if (!error && param->testflag & T_SORT_INDEX) - error=mi_sort_index(param,info,filename); + error= mi_sort_index(param, info, filename, FALSE); if (!error) share->state.changed&= ~(STATE_CHANGED | STATE_CRASHED | STATE_CRASHED_ON_REPAIR); @@ -1711,7 +1715,7 @@ err: static int not_killed= 0; -volatile int *killed_ptr(MI_CHECK *param __attribute__((unused))) +volatile int *killed_ptr(MI_CHECK *param MY_ATTRIBUTE((unused))) { return ¬_killed; /* always NULL */ } @@ -1719,7 +1723,7 @@ volatile int *killed_ptr(MI_CHECK *param __attribute__((unused))) /* print warnings and errors */ /* VARARGS */ -void mi_check_print_info(MI_CHECK *param __attribute__((unused)), +void mi_check_print_info(MI_CHECK *param MY_ATTRIBUTE((unused)), const char *fmt,...) { va_list args; diff --git a/mysql-wsrep-5.6/storage/myisam/myisamlog.c b/mysql-wsrep-5.6/storage/myisam/myisamlog.c index 157d10fc..fc37b222 100644 --- a/mysql-wsrep-5.6/storage/myisam/myisamlog.c +++ b/mysql-wsrep-5.6/storage/myisam/myisamlog.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -695,7 +695,7 @@ static int read_string(IO_CACHE *file, register uchar* *to, register uint length } /* read_string */ -static int file_info_compare(void* cmp_arg __attribute__((unused)), +static int file_info_compare(void* cmp_arg MY_ATTRIBUTE((unused)), void *a, void *b) { long lint; @@ -709,7 +709,7 @@ static int file_info_compare(void* cmp_arg __attribute__((unused)), /* ARGSUSED */ static int test_if_open (struct file_info *key, - element_count count __attribute__((unused)), + element_count count MY_ATTRIBUTE((unused)), struct test_if_open_param *param) { if (!strcmp(key->name,param->name) && key->id > param->max_id) @@ -737,7 +737,7 @@ static void fix_blob_pointers(MI_INFO *info, uchar *record) /* ARGSUSED */ static int test_when_accessed (struct file_info *key, - element_count count __attribute__((unused)), + element_count count MY_ATTRIBUTE((unused)), struct st_access_param *access_param) { if (key->accessed < access_param->min_accessed && ! key->closed) diff --git a/mysql-wsrep-5.6/storage/myisam/myisampack.c b/mysql-wsrep-5.6/storage/myisam/myisampack.c index 327aa6cb..48ced206 100644 --- a/mysql-wsrep-5.6/storage/myisam/myisampack.c +++ b/mysql-wsrep-5.6/storage/myisam/myisampack.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -29,6 +29,7 @@ #endif #include #include +#include // ORACLE_WELCOME_COPYRIGHT_NOTICE #if SIZEOF_LONG_LONG > 4 #define BITS_SAVED 64 @@ -130,7 +131,7 @@ static void free_counts_and_tree_and_queue(HUFF_TREE *huff_trees, uint trees, HUFF_COUNTS *huff_counts, uint fields); -static int compare_tree(void* cmp_arg __attribute__((unused)), +static int compare_tree(void* cmp_arg MY_ATTRIBUTE((unused)), const uchar *s,const uchar *t); static int get_statistic(PACK_MRG_INFO *mrg,HUFF_COUNTS *huff_counts); static void check_counts(HUFF_COUNTS *huff_counts,uint trees, @@ -300,9 +301,7 @@ static void print_version(void) static void usage(void) { print_version(); - puts("Copyright 2002-2008 MySQL AB, 2008 Sun Microsystems, Inc."); - puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,"); - puts("and you are welcome to modify and redistribute it under the GPL license\n"); + puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2002")); puts("Pack a MyISAM-table to take much less space."); puts("Keys are not updated, you must run myisamchk -rq on the datafile"); @@ -317,7 +316,7 @@ static void usage(void) static my_bool -get_one_option(int optid, const struct my_option *opt __attribute__((unused)), +get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)), char *argument) { uint length; @@ -1176,7 +1175,7 @@ static int get_statistic(PACK_MRG_INFO *mrg,HUFF_COUNTS *huff_counts) DBUG_RETURN(error != HA_ERR_END_OF_FILE); } -static int compare_huff_elements(void *not_used __attribute__((unused)), +static int compare_huff_elements(void *not_used MY_ATTRIBUTE((unused)), uchar *a, uchar *b) { return *((my_off_t*) a) < *((my_off_t*) b) ? -1 : @@ -1693,7 +1692,7 @@ static int make_huff_tree(HUFF_TREE *huff_tree, HUFF_COUNTS *huff_counts) return 0; } -static int compare_tree(void* cmp_arg __attribute__((unused)), +static int compare_tree(void* cmp_arg MY_ATTRIBUTE((unused)), register const uchar *s, register const uchar *t) { uint length; diff --git a/mysql-wsrep-5.6/storage/myisam/rt_test.c b/mysql-wsrep-5.6/storage/myisam/rt_test.c index 45c42a25..64812295 100644 --- a/mysql-wsrep-5.6/storage/myisam/rt_test.c +++ b/mysql-wsrep-5.6/storage/myisam/rt_test.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -79,7 +79,7 @@ static double rt_data[]= -1 }; -int main(int argc __attribute__((unused)),char *argv[] __attribute__((unused))) +int main(int argc MY_ATTRIBUTE((unused)),char *argv[] MY_ATTRIBUTE((unused))) { MY_INIT(argv[0]); exit(run_test("rt_test")); @@ -367,7 +367,7 @@ static int read_with_pos (MI_INFO * file,int silent) static void print_record(uchar * record, - my_off_t offs __attribute__((unused)), + my_off_t offs MY_ATTRIBUTE((unused)), const char * tail) { int i; @@ -420,7 +420,7 @@ static void create_record(uchar *record,uint rownr) } #else -int main(int argc __attribute__((unused)),char *argv[] __attribute__((unused))) +int main(int argc MY_ATTRIBUTE((unused)),char *argv[] MY_ATTRIBUTE((unused))) { exit(0); } diff --git a/mysql-wsrep-5.6/storage/myisam/sort.c b/mysql-wsrep-5.6/storage/myisam/sort.c index 7ce22e85..f28e7802 100644 --- a/mysql-wsrep-5.6/storage/myisam/sort.c +++ b/mysql-wsrep-5.6/storage/myisam/sort.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -886,7 +886,7 @@ static int write_merge_key_varlen(MI_SORT_PARAM *info, } -static int write_merge_key(MI_SORT_PARAM *info __attribute__((unused)), +static int write_merge_key(MI_SORT_PARAM *info MY_ATTRIBUTE((unused)), IO_CACHE *to_file, uchar *key, uint sort_length, uint count) { diff --git a/mysql-wsrep-5.6/storage/myisam/sp_key.c b/mysql-wsrep-5.6/storage/myisam/sp_key.c index d42f27bb..4a6cd8d8 100644 --- a/mysql-wsrep-5.6/storage/myisam/sp_key.c +++ b/mysql-wsrep-5.6/storage/myisam/sp_key.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -118,7 +118,7 @@ static int sp_mbr_from_wkb(uchar *wkb, uint size, uint n_dims, double *mbr) */ static int sp_add_point_to_mbr(uchar *(*wkb), uchar *end, uint n_dims, - uchar byte_order __attribute__((unused)), + uchar byte_order MY_ATTRIBUTE((unused)), double *mbr) { double ord; diff --git a/mysql-wsrep-5.6/storage/myisam/sp_test.c b/mysql-wsrep-5.6/storage/myisam/sp_test.c index 04b4f88e..8c61f2c9 100644 --- a/mysql-wsrep-5.6/storage/myisam/sp_test.c +++ b/mysql-wsrep-5.6/storage/myisam/sp_test.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -40,7 +40,7 @@ static void rtree_PrintWKB(uchar *wkb, uint n_dims); static char blob_key[MAX_REC_LENGTH]; -int main(int argc __attribute__((unused)),char *argv[]) +int main(int argc MY_ATTRIBUTE((unused)),char *argv[]) { MY_INIT(argv[0]); exit(run_test("sp_test")); @@ -487,7 +487,7 @@ static void rtree_PrintWKB(uchar *wkb, uint n_dims) } #else -int main(int argc __attribute__((unused)),char *argv[] __attribute__((unused))) +int main(int argc MY_ATTRIBUTE((unused)),char *argv[] MY_ATTRIBUTE((unused))) { exit(0); } diff --git a/mysql-wsrep-5.6/storage/myisammrg/ha_myisammrg.cc b/mysql-wsrep-5.6/storage/myisammrg/ha_myisammrg.cc index 354f2329..4bb33b8c 100644 --- a/mysql-wsrep-5.6/storage/myisammrg/ha_myisammrg.cc +++ b/mysql-wsrep-5.6/storage/myisammrg/ha_myisammrg.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -347,7 +347,7 @@ CPP_UNNAMED_NS_END and adds a child list of TABLE_LIST to the parent handler. */ -int ha_myisammrg::open(const char *name, int mode __attribute__((unused)), +int ha_myisammrg::open(const char *name, int mode MY_ATTRIBUTE((unused)), uint test_if_locked_arg) { DBUG_ENTER("ha_myisammrg::open"); @@ -1183,8 +1183,8 @@ int ha_myisammrg::index_last(uchar * buf) } int ha_myisammrg::index_next_same(uchar * buf, - const uchar *key __attribute__((unused)), - uint length __attribute__((unused))) + const uchar *key MY_ATTRIBUTE((unused)), + uint length MY_ATTRIBUTE((unused))) { int error; DBUG_ASSERT(this->file->children_attached); diff --git a/mysql-wsrep-5.6/storage/ndb/include/ndb_global.h b/mysql-wsrep-5.6/storage/ndb/include/ndb_global.h index bd930915..02a85238 100644 --- a/mysql-wsrep-5.6/storage/ndb/include/ndb_global.h +++ b/mysql-wsrep-5.6/storage/ndb/include/ndb_global.h @@ -1,5 +1,5 @@ /* - Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -251,19 +251,19 @@ extern "C" { #endif /** - * __attribute__((noreturn)) was introduce in gcc 2.5 + * MY_ATTRIBUTE((noreturn)) was introduce in gcc 2.5 */ #if (GCC_VERSION >= 2005) -#define ATTRIBUTE_NORETURN __attribute__((noreturn)) +#define ATTRIBUTE_NORETURN MY_ATTRIBUTE((noreturn)) #else #define ATTRIBUTE_NORETURN #endif /** - * __attribute__((noinline)) was introduce in gcc 3.1 + * MY_ATTRIBUTE((noinline)) was introduce in gcc 3.1 */ #if (GCC_VERSION >= 3001) -#define ATTRIBUTE_NOINLINE __attribute__((noinline)) +#define ATTRIBUTE_NOINLINE MY_ATTRIBUTE((noinline)) #else #define ATTRIBUTE_NOINLINE #endif diff --git a/mysql-wsrep-5.6/storage/ndb/include/util/ndb_opts.h b/mysql-wsrep-5.6/storage/ndb/include/util/ndb_opts.h index 060e97fc..f443f1e6 100644 --- a/mysql-wsrep-5.6/storage/ndb/include/util/ndb_opts.h +++ b/mysql-wsrep-5.6/storage/ndb/include/util/ndb_opts.h @@ -1,5 +1,5 @@ /* - Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -123,7 +123,7 @@ void ndb_opt_set_usage_funcs(void (*short_usage)(void), void (*usage)(void)); my_bool ndb_std_get_one_option(int optid, - const struct my_option *opt __attribute__((unused)), + const struct my_option *opt MY_ATTRIBUTE((unused)), char *argument); void ndb_usage(void (*usagefunc)(void), const char *load_default_groups[], diff --git a/mysql-wsrep-5.6/storage/ndb/src/common/util/ndb_opts.c b/mysql-wsrep-5.6/storage/ndb/src/common/util/ndb_opts.c index 37276a92..eaf5fc03 100644 --- a/mysql-wsrep-5.6/storage/ndb/src/common/util/ndb_opts.c +++ b/mysql-wsrep-5.6/storage/ndb/src/common/util/ndb_opts.c @@ -1,5 +1,5 @@ /* - Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -82,8 +82,8 @@ void ndb_usage(void (*usagefunc)(void), const char *load_default_groups[], my_bool ndb_std_get_one_option(int optid, - const struct my_option *opt __attribute__((unused)), - char *argument __attribute__((unused))) + const struct my_option *opt MY_ATTRIBUTE((unused)), + char *argument MY_ATTRIBUTE((unused))) { switch (optid) { #ifndef DBUG_OFF diff --git a/mysql-wsrep-5.6/storage/ndb/src/cw/cpcd/main.cpp b/mysql-wsrep-5.6/storage/ndb/src/cw/cpcd/main.cpp index 0c253fbe..777ffcbe 100644 --- a/mysql-wsrep-5.6/storage/ndb/src/cw/cpcd/main.cpp +++ b/mysql-wsrep-5.6/storage/ndb/src/cw/cpcd/main.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -63,7 +63,7 @@ static struct my_option my_long_options[] = }; static my_bool -get_one_option(int optid, const struct my_option *opt __attribute__((unused)), +get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)), char *argument) { return 0; diff --git a/mysql-wsrep-5.6/storage/ndb/tools/restore/restore_main.cpp b/mysql-wsrep-5.6/storage/ndb/tools/restore/restore_main.cpp index a464fadc..02f83695 100644 --- a/mysql-wsrep-5.6/storage/ndb/tools/restore/restore_main.cpp +++ b/mysql-wsrep-5.6/storage/ndb/tools/restore/restore_main.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -415,7 +415,7 @@ static void usage() } static my_bool -get_one_option(int optid, const struct my_option *opt __attribute__((unused)), +get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)), char *argument) { #ifndef DBUG_OFF diff --git a/mysql-wsrep-5.6/storage/perfschema/table_events_statements.cc b/mysql-wsrep-5.6/storage/perfschema/table_events_statements.cc index 69315848..233994dc 100644 --- a/mysql-wsrep-5.6/storage/perfschema/table_events_statements.cc +++ b/mysql-wsrep-5.6/storage/perfschema/table_events_statements.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -340,11 +340,17 @@ void table_events_statements_common::make_row_part_1(PFS_events_statements *stat CHARSET_INFO *cs= get_charset(statement->m_sqltext_cs_number, MYF(0)); size_t valid_length= statement->m_sqltext_length; - if (cs->mbmaxlen > 1) + if (cs != NULL) { - int well_formed_error; - valid_length= cs->cset->well_formed_len(cs, statement->m_sqltext, statement->m_sqltext + valid_length, - valid_length, &well_formed_error); + if (cs->mbmaxlen > 1) + { + int well_formed_error; + valid_length= cs->cset->well_formed_len(cs, + statement->m_sqltext, + statement->m_sqltext + valid_length, + valid_length, + &well_formed_error); + } } m_row.m_sqltext.set_charset(cs); diff --git a/mysql-wsrep-5.6/strings/conf_to_src.c b/mysql-wsrep-5.6/strings/conf_to_src.c index 102febca..25b1ff22 100644 --- a/mysql-wsrep-5.6/strings/conf_to_src.c +++ b/mysql-wsrep-5.6/strings/conf_to_src.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -145,8 +145,8 @@ static int add_collation(CHARSET_INFO *cs) static void -default_reporter(enum loglevel level __attribute__ ((unused)), - const char *format __attribute__ ((unused)), +default_reporter(enum loglevel level MY_ATTRIBUTE ((unused)), + const char *format MY_ATTRIBUTE ((unused)), ...) { } @@ -271,7 +271,7 @@ static void fprint_copyright(FILE *file) { fprintf(file, -"/* Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.\n" +"/* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.\n" "\n" " This program is free software; you can redistribute it and/or modify\n" " it under the terms of the GNU General Public License as published by\n" @@ -290,7 +290,7 @@ fprint_copyright(FILE *file) int -main(int argc, char **argv __attribute__((unused))) +main(int argc, char **argv MY_ATTRIBUTE((unused))) { CHARSET_INFO ncs; CHARSET_INFO *cs; diff --git a/mysql-wsrep-5.6/strings/ctype-big5.c b/mysql-wsrep-5.6/strings/ctype-big5.c index e2206d11..8838aa7e 100644 --- a/mysql-wsrep-5.6/strings/ctype-big5.c +++ b/mysql-wsrep-5.6/strings/ctype-big5.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -872,7 +872,7 @@ static int my_strnncoll_big5_internal(const uchar **a_res, /* Compare strings */ -static int my_strnncoll_big5(const CHARSET_INFO *cs __attribute__((unused)), +static int my_strnncoll_big5(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const uchar *a, size_t a_length, const uchar *b, size_t b_length, my_bool b_is_prefix) @@ -885,7 +885,7 @@ static int my_strnncoll_big5(const CHARSET_INFO *cs __attribute__((unused)), /* compare strings, ignore end space */ -static int my_strnncollsp_big5(const CHARSET_INFO* cs __attribute__((unused)), +static int my_strnncollsp_big5(const CHARSET_INFO* cs MY_ATTRIBUTE((unused)), const uchar *a, size_t a_length, const uchar *b, size_t b_length, my_bool diff_if_only_endspace_difference) @@ -957,14 +957,14 @@ my_strnxfrm_big5(const CHARSET_INFO *cs, } -static uint ismbchar_big5(const CHARSET_INFO *cs __attribute__((unused)), +static uint ismbchar_big5(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const char* p, const char *e) { return (isbig5head(*(p)) && (e)-(p)>1 && isbig5tail(*((p)+1))? 2: 0); } -static uint mbcharlen_big5(const CHARSET_INFO *cs __attribute__((unused)), +static uint mbcharlen_big5(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), uint c) { return (isbig5head(c)? 2 : 1); @@ -6742,7 +6742,7 @@ static int func_uni_big5_onechar(int code){ static int -my_wc_mb_big5(const CHARSET_INFO *cs __attribute__((unused)), +my_wc_mb_big5(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), my_wc_t wc, uchar *s, uchar *e) { @@ -6771,7 +6771,7 @@ my_wc_mb_big5(const CHARSET_INFO *cs __attribute__((unused)), static int -my_mb_wc_big5(const CHARSET_INFO *cs __attribute__((unused)), +my_mb_wc_big5(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), my_wc_t *pwc,const uchar *s,const uchar *e) { @@ -6801,7 +6801,7 @@ my_mb_wc_big5(const CHARSET_INFO *cs __attribute__((unused)), CP950 and HKSCS additional characters are also accepted. */ static -size_t my_well_formed_len_big5(const CHARSET_INFO *cs __attribute__((unused)), +size_t my_well_formed_len_big5(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const char *b, const char *e, size_t pos, int *error) { diff --git a/mysql-wsrep-5.6/strings/ctype-bin.c b/mysql-wsrep-5.6/strings/ctype-bin.c index dd681ed5..cea6db2f 100644 --- a/mysql-wsrep-5.6/strings/ctype-bin.c +++ b/mysql-wsrep-5.6/strings/ctype-bin.c @@ -1,5 +1,5 @@ /* Copyright (c) 2002 MySQL AB & tommy@valley.ne.jp - Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public @@ -69,13 +69,13 @@ static uchar bin_char_array[] = static my_bool my_coll_init_8bit_bin(CHARSET_INFO *cs, - MY_CHARSET_LOADER *loader __attribute__((unused))) + MY_CHARSET_LOADER *loader MY_ATTRIBUTE((unused))) { cs->max_sort_char=255; return FALSE; } -static int my_strnncoll_binary(const CHARSET_INFO *cs __attribute__((unused)), +static int my_strnncoll_binary(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const uchar *s, size_t slen, const uchar *t, size_t tlen, my_bool t_is_prefix) @@ -86,8 +86,8 @@ static int my_strnncoll_binary(const CHARSET_INFO *cs __attribute__((unused)), } -size_t my_lengthsp_binary(const CHARSET_INFO *cs __attribute__((unused)), - const char *ptr __attribute__((unused)), +size_t my_lengthsp_binary(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), + const char *ptr MY_ATTRIBUTE((unused)), size_t length) { return length; @@ -117,18 +117,18 @@ size_t my_lengthsp_binary(const CHARSET_INFO *cs __attribute__((unused)), */ static int my_strnncollsp_binary(const CHARSET_INFO *cs - __attribute__((unused)), + MY_ATTRIBUTE((unused)), const uchar *s, size_t slen, const uchar *t, size_t tlen, my_bool diff_if_only_endspace_difference - __attribute__((unused))) + MY_ATTRIBUTE((unused))) { return my_strnncoll_binary(cs,s,slen,t,tlen,0); } static int my_strnncoll_8bit_bin(const CHARSET_INFO *cs - __attribute__((unused)), + MY_ATTRIBUTE((unused)), const uchar *s, size_t slen, const uchar *t, size_t tlen, my_bool t_is_prefix) @@ -165,7 +165,7 @@ static int my_strnncoll_8bit_bin(const CHARSET_INFO *cs */ static int my_strnncollsp_8bit_bin(const CHARSET_INFO *cs - __attribute__((unused)), + MY_ATTRIBUTE((unused)), const uchar *a, size_t a_length, const uchar *b, size_t b_length, my_bool diff_if_only_endspace_difference) @@ -214,41 +214,41 @@ static int my_strnncollsp_8bit_bin(const CHARSET_INFO *cs /* This function is used for all conversion functions */ -static size_t my_case_str_bin(const CHARSET_INFO *cs __attribute__((unused)), - char *str __attribute__((unused))) +static size_t my_case_str_bin(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), + char *str MY_ATTRIBUTE((unused))) { return 0; } -static size_t my_case_bin(const CHARSET_INFO *cs __attribute__((unused)), - char *src __attribute__((unused)), +static size_t my_case_bin(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), + char *src MY_ATTRIBUTE((unused)), size_t srclen, - char *dst __attribute__((unused)), - size_t dstlen __attribute__((unused))) + char *dst MY_ATTRIBUTE((unused)), + size_t dstlen MY_ATTRIBUTE((unused))) { return srclen; } -static int my_strcasecmp_bin(const CHARSET_INFO *cs __attribute__((unused)), +static int my_strcasecmp_bin(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const char *s, const char *t) { return strcmp(s,t); } -uint my_mbcharlen_8bit(const CHARSET_INFO *cs __attribute__((unused)), - uint c __attribute__((unused))) +uint my_mbcharlen_8bit(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), + uint c MY_ATTRIBUTE((unused))) { return 1; } -static int my_mb_wc_bin(const CHARSET_INFO *cs __attribute__((unused)), +static int my_mb_wc_bin(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), my_wc_t *wc, const uchar *str, - const uchar *end __attribute__((unused))) + const uchar *end MY_ATTRIBUTE((unused))) { if (str >= end) return MY_CS_TOOSMALL; @@ -258,10 +258,10 @@ static int my_mb_wc_bin(const CHARSET_INFO *cs __attribute__((unused)), } -static int my_wc_mb_bin(const CHARSET_INFO *cs __attribute__((unused)), +static int my_wc_mb_bin(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), my_wc_t wc, uchar *s, - uchar *e __attribute__((unused))) + uchar *e MY_ATTRIBUTE((unused))) { if (s >= e) return MY_CS_TOOSMALL; @@ -275,7 +275,7 @@ static int my_wc_mb_bin(const CHARSET_INFO *cs __attribute__((unused)), } -void my_hash_sort_8bit_bin(const CHARSET_INFO *cs __attribute__((unused)), +void my_hash_sort_8bit_bin(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const uchar *key, size_t len, ulong *nr1, ulong *nr2) { @@ -296,7 +296,7 @@ void my_hash_sort_8bit_bin(const CHARSET_INFO *cs __attribute__((unused)), } -void my_hash_sort_bin(const CHARSET_INFO *cs __attribute__((unused)), +void my_hash_sort_bin(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const uchar *key, size_t len,ulong *nr1, ulong *nr2) { const uchar *pos = key; @@ -428,7 +428,7 @@ my_strnxfrm_8bit_bin(const CHARSET_INFO *cs, static -uint my_instr_bin(const CHARSET_INFO *cs __attribute__((unused)), +uint my_instr_bin(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const char *b, size_t b_length, const char *s, size_t s_length, my_match_t *match, uint nmatch) diff --git a/mysql-wsrep-5.6/strings/ctype-cp932.c b/mysql-wsrep-5.6/strings/ctype-cp932.c index a366fbb6..4909d205 100644 --- a/mysql-wsrep-5.6/strings/ctype-cp932.c +++ b/mysql-wsrep-5.6/strings/ctype-cp932.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -182,13 +182,13 @@ static uchar sort_order_cp932[]= (0x80<=(c) && (c)<=0xfc)) -static uint ismbchar_cp932(const CHARSET_INFO *cs __attribute__((unused)), +static uint ismbchar_cp932(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const char* p, const char *e) { return (iscp932head((uchar) *p) && (e-p)>1 && iscp932tail((uchar)p[1]) ? 2: 0); } -static uint mbcharlen_cp932(const CHARSET_INFO *cs __attribute__((unused)), +static uint mbcharlen_cp932(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), uint c) { return (iscp932head((uchar) c) ? 2 : 1); @@ -1742,7 +1742,7 @@ static int my_strnncoll_cp932_internal(const CHARSET_INFO *cs, } -static int my_strnncoll_cp932(const CHARSET_INFO *cs __attribute__((unused)), +static int my_strnncoll_cp932(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const uchar *a, size_t a_length, const uchar *b, size_t b_length, my_bool b_is_prefix) @@ -1755,11 +1755,11 @@ static int my_strnncoll_cp932(const CHARSET_INFO *cs __attribute__((unused)), static int my_strnncollsp_cp932(const CHARSET_INFO *cs - __attribute__((unused)), + MY_ATTRIBUTE((unused)), const uchar *a, size_t a_length, const uchar *b, size_t b_length, my_bool diff_if_only_endspace_difference - __attribute__((unused))) + MY_ATTRIBUTE((unused))) { const uchar *a_end= a + a_length; const uchar *b_end= b + b_length; @@ -34601,7 +34601,7 @@ static uint16 unicode_to_cp932[65536]= */ static int -my_mb_wc_cp932(const CHARSET_INFO *cs __attribute__((unused)), +my_mb_wc_cp932(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), my_wc_t *pwc, const uchar *s, const uchar *e){ int hi; @@ -34645,7 +34645,7 @@ my_mb_wc_cp932(const CHARSET_INFO *cs __attribute__((unused)), @retval MY_CS_ILUNI If the Unicode character does not exist in CP932 */ static int -my_wc_mb_cp932(const CHARSET_INFO *cs __attribute__((unused)), +my_wc_mb_cp932(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), my_wc_t wc, uchar *s, uchar *e) { int code; @@ -34685,7 +34685,7 @@ my_wc_mb_cp932(const CHARSET_INFO *cs __attribute__((unused)), static -size_t my_numcells_cp932(const CHARSET_INFO *cs __attribute__((unused)), +size_t my_numcells_cp932(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const char *str, const char *str_end) { size_t clen= 0; @@ -34720,7 +34720,7 @@ size_t my_numcells_cp932(const CHARSET_INFO *cs __attribute__((unused)), static size_t my_well_formed_len_cp932(const CHARSET_INFO *cs - __attribute__((unused)), + MY_ATTRIBUTE((unused)), const char *b, const char *e, size_t pos, int *error) { diff --git a/mysql-wsrep-5.6/strings/ctype-czech.c b/mysql-wsrep-5.6/strings/ctype-czech.c index ad5df8b0..74b371fa 100644 --- a/mysql-wsrep-5.6/strings/ctype-czech.c +++ b/mysql-wsrep-5.6/strings/ctype-czech.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -228,7 +228,7 @@ while (1) \ the length of the strings being specified */ -static int my_strnncoll_czech(const CHARSET_INFO *cs __attribute__((unused)), +static int my_strnncoll_czech(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const uchar *s1, size_t len1, const uchar *s2, size_t len2, my_bool s2_is_prefix) @@ -266,7 +266,7 @@ int my_strnncollsp_czech(const CHARSET_INFO *cs, const uchar *s, size_t slen, const uchar *t, size_t tlen, my_bool diff_if_only_endspace_difference - __attribute__((unused))) + MY_ATTRIBUTE((unused))) { for ( ; slen && s[slen-1] == ' ' ; slen--); for ( ; tlen && t[tlen-1] == ' ' ; tlen--); @@ -279,7 +279,7 @@ int my_strnncollsp_czech(const CHARSET_INFO *cs, */ static size_t my_strnxfrmlen_czech(const CHARSET_INFO *cs - __attribute__((unused)), size_t len) + MY_ATTRIBUTE((unused)), size_t len) { return len * 4 + 4; } @@ -291,9 +291,9 @@ my_strnxfrmlen_czech(const CHARSET_INFO *cs */ static size_t -my_strnxfrm_czech(const CHARSET_INFO *cs __attribute__((unused)), +my_strnxfrm_czech(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), uchar *dest, size_t len, - uint nweights_arg __attribute__((unused)), + uint nweights_arg MY_ATTRIBUTE((unused)), const uchar *src, size_t srclen, uint flags) { int value; @@ -369,7 +369,7 @@ my_strnxfrm_czech(const CHARSET_INFO *cs __attribute__((unused)), static my_bool my_like_range_czech(const CHARSET_INFO *cs - __attribute__((unused)), + MY_ATTRIBUTE((unused)), const char *ptr,size_t ptr_length, pbool escape, pbool w_one, pbool w_many, size_t res_length, char *min_str, diff --git a/mysql-wsrep-5.6/strings/ctype-euc_kr.c b/mysql-wsrep-5.6/strings/ctype-euc_kr.c index 1fa941c8..a1ff2fe6 100644 --- a/mysql-wsrep-5.6/strings/ctype-euc_kr.c +++ b/mysql-wsrep-5.6/strings/ctype-euc_kr.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -202,7 +202,7 @@ static uchar sort_order_euc_kr[]= iseuc_kr_tail3(c)) -static uint ismbchar_euc_kr(const CHARSET_INFO *cs __attribute__((unused)), +static uint ismbchar_euc_kr(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const char* p, const char *e) { return ((*(uchar*)(p)<0x80)? 0:\ @@ -210,7 +210,7 @@ static uint ismbchar_euc_kr(const CHARSET_INFO *cs __attribute__((unused)), 0); } -static uint mbcharlen_euc_kr(const CHARSET_INFO *cs __attribute__((unused)), +static uint mbcharlen_euc_kr(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), uint c) { return (iseuc_kr_head(c) ? 2 : 1); @@ -9877,7 +9877,7 @@ static int func_uni_ksc5601_onechar(int code){ static int -my_wc_mb_euc_kr(const CHARSET_INFO *cs __attribute__((unused)), +my_wc_mb_euc_kr(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), my_wc_t wc, uchar *s, uchar *e) { int code; @@ -9905,7 +9905,7 @@ my_wc_mb_euc_kr(const CHARSET_INFO *cs __attribute__((unused)), static int -my_mb_wc_euc_kr(const CHARSET_INFO *cs __attribute__((unused)), +my_mb_wc_euc_kr(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), my_wc_t *pwc, const uchar *s, const uchar *e) { @@ -9934,7 +9934,7 @@ my_mb_wc_euc_kr(const CHARSET_INFO *cs __attribute__((unused)), Returns well formed length of a EUC-KR string. */ static size_t -my_well_formed_len_euckr(const CHARSET_INFO *cs __attribute__((unused)), +my_well_formed_len_euckr(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const char *b, const char *e, size_t pos, int *error) { diff --git a/mysql-wsrep-5.6/strings/ctype-eucjpms.c b/mysql-wsrep-5.6/strings/ctype-eucjpms.c index dc9cc5b2..a2009700 100644 --- a/mysql-wsrep-5.6/strings/ctype-eucjpms.c +++ b/mysql-wsrep-5.6/strings/ctype-eucjpms.c @@ -1,5 +1,5 @@ /* Copyright (c) 2002 MySQL AB & tommy@valley.ne.jp - Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public @@ -185,7 +185,7 @@ static uchar sort_order_eucjpms[]= #define iseucjpms_ss3(c) (((c)&0xff) == 0x8f) -static uint ismbchar_eucjpms(const CHARSET_INFO *cs __attribute__((unused)), +static uint ismbchar_eucjpms(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const char* p, const char *e) { return ((*(uchar*)(p)<0x80)? 0:\ @@ -195,7 +195,7 @@ static uint ismbchar_eucjpms(const CHARSET_INFO *cs __attribute__((unused)), 0); } -static uint mbcharlen_eucjpms(const CHARSET_INFO *cs __attribute__((unused)), +static uint mbcharlen_eucjpms(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), uint c) { return (iseucjpms(c)? 2: iseucjpms_ss2(c)? 2: iseucjpms_ss3(c)? 3: 1); @@ -67311,7 +67311,7 @@ static uint16 unicode_to_jisx0212_eucjpms[65536]= @retval MY_CS_ILSEQ If a wrong byte sequence was found */ static int -my_mb_wc_eucjpms(const CHARSET_INFO *cs __attribute__((unused)), +my_mb_wc_eucjpms(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), my_wc_t *pwc, const uchar *s, const uchar *e) { int hi; @@ -67371,7 +67371,7 @@ my_mb_wc_eucjpms(const CHARSET_INFO *cs __attribute__((unused)), @retval MY_CS_ILUNI If the Unicode character does not exist in EUCJPMS */ static int -my_wc_mb_eucjpms(const CHARSET_INFO *cs __attribute__((unused)), +my_wc_mb_eucjpms(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), my_wc_t wc, uchar *s, uchar *e) { int jp; @@ -67427,7 +67427,7 @@ my_wc_mb_eucjpms(const CHARSET_INFO *cs __attribute__((unused)), static size_t my_well_formed_len_eucjpms(const CHARSET_INFO *cs - __attribute__((unused)), + MY_ATTRIBUTE((unused)), const char *beg, const char *end, size_t pos, int *error) { @@ -67475,7 +67475,7 @@ size_t my_well_formed_len_eucjpms(const CHARSET_INFO *cs static -size_t my_numcells_eucjpms(const CHARSET_INFO *cs __attribute__((unused)), +size_t my_numcells_eucjpms(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const char *str, const char *str_end) { size_t clen; diff --git a/mysql-wsrep-5.6/strings/ctype-gb2312.c b/mysql-wsrep-5.6/strings/ctype-gb2312.c index 173e0783..36bd5de6 100644 --- a/mysql-wsrep-5.6/strings/ctype-gb2312.c +++ b/mysql-wsrep-5.6/strings/ctype-gb2312.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -165,13 +165,13 @@ static uchar sort_order_gb2312[]= #define isgb2312tail(c) (0xa1<=(uchar)(c) && (uchar)(c)<=0xfe) -static uint ismbchar_gb2312(const CHARSET_INFO *cs __attribute__((unused)), +static uint ismbchar_gb2312(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const char* p, const char *e) { return (isgb2312head(*(p)) && (e)-(p)>1 && isgb2312tail(*((p)+1))? 2: 0); } -static uint mbcharlen_gb2312(const CHARSET_INFO *cs __attribute__((unused)), +static uint mbcharlen_gb2312(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), uint c) { return (isgb2312head(c)? 2 : 1); @@ -6282,7 +6282,7 @@ static int func_uni_gb2312_onechar(int code){ static int -my_wc_mb_gb2312(const CHARSET_INFO *cs __attribute__((unused)), +my_wc_mb_gb2312(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), my_wc_t wc, uchar *s, uchar *e) { int code; @@ -6310,7 +6310,7 @@ my_wc_mb_gb2312(const CHARSET_INFO *cs __attribute__((unused)), static int -my_mb_wc_gb2312(const CHARSET_INFO *cs __attribute__((unused)), +my_mb_wc_gb2312(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), my_wc_t *pwc, const uchar *s, const uchar *e){ int hi; @@ -6337,7 +6337,7 @@ my_mb_wc_gb2312(const CHARSET_INFO *cs __attribute__((unused)), Returns well formed length of a EUC-KR string. */ static size_t -my_well_formed_len_gb2312(const CHARSET_INFO *cs __attribute__((unused)), +my_well_formed_len_gb2312(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const char *b, const char *e, size_t pos, int *error) { diff --git a/mysql-wsrep-5.6/strings/ctype-gbk.c b/mysql-wsrep-5.6/strings/ctype-gbk.c index 222154de..52c14c49 100644 --- a/mysql-wsrep-5.6/strings/ctype-gbk.c +++ b/mysql-wsrep-5.6/strings/ctype-gbk.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -3475,7 +3475,7 @@ int my_strnncoll_gbk_internal(const uchar **a_res, const uchar **b_res, -int my_strnncoll_gbk(const CHARSET_INFO *cs __attribute__((unused)), +int my_strnncoll_gbk(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const uchar *a, size_t a_length, const uchar *b, size_t b_length, my_bool b_is_prefix) @@ -3486,7 +3486,7 @@ int my_strnncoll_gbk(const CHARSET_INFO *cs __attribute__((unused)), } -static int my_strnncollsp_gbk(const CHARSET_INFO * cs __attribute__((unused)), +static int my_strnncollsp_gbk(const CHARSET_INFO * cs MY_ATTRIBUTE((unused)), const uchar *a, size_t a_length, const uchar *b, size_t b_length, my_bool diff_if_only_endspace_difference) @@ -3558,13 +3558,13 @@ my_strnxfrm_gbk(const CHARSET_INFO *cs, } -static uint ismbchar_gbk(const CHARSET_INFO *cs __attribute__((unused)), +static uint ismbchar_gbk(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const char* p, const char *e) { return (isgbkhead(*(p)) && (e)-(p)>1 && isgbktail(*((p)+1))? 2: 0); } -static uint mbcharlen_gbk(const CHARSET_INFO *cs __attribute__((unused)), +static uint mbcharlen_gbk(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), uint c) { return (isgbkhead(c)? 2 : 1); @@ -10675,7 +10675,7 @@ static int func_uni_gbk_onechar(int code){ } static int -my_wc_mb_gbk(const CHARSET_INFO *cs __attribute__((unused)), +my_wc_mb_gbk(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), my_wc_t wc, uchar *s, uchar *e) { int code; @@ -10701,7 +10701,7 @@ my_wc_mb_gbk(const CHARSET_INFO *cs __attribute__((unused)), } static int -my_mb_wc_gbk(const CHARSET_INFO *cs __attribute__((unused)), +my_mb_wc_gbk(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), my_wc_t *pwc, const uchar *s, const uchar *e) { int hi; @@ -10732,7 +10732,7 @@ my_mb_wc_gbk(const CHARSET_INFO *cs __attribute__((unused)), Returns well formed length of a GBK string. */ static -size_t my_well_formed_len_gbk(const CHARSET_INFO *cs __attribute__((unused)), +size_t my_well_formed_len_gbk(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const char *b, const char *e, size_t pos, int *error) { diff --git a/mysql-wsrep-5.6/strings/ctype-latin1.c b/mysql-wsrep-5.6/strings/ctype-latin1.c index 2ba6ffb8..d053fcf4 100644 --- a/mysql-wsrep-5.6/strings/ctype-latin1.c +++ b/mysql-wsrep-5.6/strings/ctype-latin1.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -356,10 +356,10 @@ NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL }; static -int my_mb_wc_latin1(const CHARSET_INFO *cs __attribute__((unused)), +int my_mb_wc_latin1(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), my_wc_t *wc, const uchar *str, - const uchar *end __attribute__((unused))) + const uchar *end MY_ATTRIBUTE((unused))) { if (str >= end) return MY_CS_TOOSMALL; @@ -369,10 +369,10 @@ int my_mb_wc_latin1(const CHARSET_INFO *cs __attribute__((unused)), } static -int my_wc_mb_latin1(const CHARSET_INFO *cs __attribute__((unused)), +int my_wc_mb_latin1(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), my_wc_t wc, uchar *str, - uchar *end __attribute__((unused))) + uchar *end MY_ATTRIBUTE((unused))) { uchar *pl; @@ -547,7 +547,7 @@ uchar combo2map[]={ static int my_strnncoll_latin1_de(const CHARSET_INFO *cs - __attribute__((unused)), + MY_ATTRIBUTE((unused)), const uchar *a, size_t a_length, const uchar *b, size_t b_length, my_bool b_is_prefix) @@ -589,7 +589,7 @@ static int my_strnncoll_latin1_de(const CHARSET_INFO *cs static int my_strnncollsp_latin1_de(const CHARSET_INFO *cs - __attribute__((unused)), + MY_ATTRIBUTE((unused)), const uchar *a, size_t a_length, const uchar *b, size_t b_length, my_bool diff_if_only_endspace_difference) @@ -683,7 +683,7 @@ my_strnxfrm_latin1_de(const CHARSET_INFO *cs, } -void my_hash_sort_latin1_de(const CHARSET_INFO *cs __attribute__((unused)), +void my_hash_sort_latin1_de(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const uchar *key, size_t len, ulong *nr1, ulong *nr2) { diff --git a/mysql-wsrep-5.6/strings/ctype-mb.c b/mysql-wsrep-5.6/strings/ctype-mb.c index afb180e4..faac2c94 100644 --- a/mysql-wsrep-5.6/strings/ctype-mb.c +++ b/mysql-wsrep-5.6/strings/ctype-mb.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -74,8 +74,8 @@ get_case_info_for_ch(const CHARSET_INFO *cs, uint page, uint offs) For character sets which don't change octet length in case conversion. */ size_t my_caseup_mb(const CHARSET_INFO *cs, char *src, size_t srclen, - char *dst __attribute__((unused)), - size_t dstlen __attribute__((unused))) + char *dst MY_ATTRIBUTE((unused)), + size_t dstlen MY_ATTRIBUTE((unused))) { register uint32 l; register char *srcend= src + srclen; @@ -109,8 +109,8 @@ size_t my_caseup_mb(const CHARSET_INFO *cs, char *src, size_t srclen, size_t my_casedn_mb(const CHARSET_INFO *cs, char *src, size_t srclen, - char *dst __attribute__((unused)), - size_t dstlen __attribute__((unused))) + char *dst MY_ATTRIBUTE((unused)), + size_t dstlen MY_ATTRIBUTE((unused))) { register uint32 l; register char *srcend= src + srclen; @@ -155,7 +155,7 @@ size_t my_casedn_mb(const CHARSET_INFO *cs, char *src, size_t srclen, static size_t my_casefold_mb_varlen(const CHARSET_INFO *cs, char *src, size_t srclen, - char *dst, size_t dstlen __attribute__((unused)), + char *dst, size_t dstlen MY_ATTRIBUTE((unused)), uchar *map, size_t is_upper) { @@ -373,7 +373,7 @@ int my_wildcmp_mb(const CHARSET_INFO *cs, } -size_t my_numchars_mb(const CHARSET_INFO *cs __attribute__((unused)), +size_t my_numchars_mb(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const char *pos, const char *end) { register size_t count= 0; @@ -387,7 +387,7 @@ size_t my_numchars_mb(const CHARSET_INFO *cs __attribute__((unused)), } -size_t my_charpos_mb(const CHARSET_INFO *cs __attribute__((unused)), +size_t my_charpos_mb(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const char *pos, const char *end, size_t length) { const char *start= pos; @@ -482,7 +482,7 @@ uint my_instr_mb(const CHARSET_INFO *cs, /* BINARY collations handlers for MB charsets */ int -my_strnncoll_mb_bin(const CHARSET_INFO *cs __attribute__((unused)), +my_strnncoll_mb_bin(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const uchar *s, size_t slen, const uchar *t, size_t tlen, my_bool t_is_prefix) @@ -519,7 +519,7 @@ my_strnncoll_mb_bin(const CHARSET_INFO *cs __attribute__((unused)), */ int -my_strnncollsp_mb_bin(const CHARSET_INFO *cs __attribute__((unused)), +my_strnncollsp_mb_bin(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const uchar *a, size_t a_length, const uchar *b, size_t b_length, my_bool diff_if_only_endspace_difference) @@ -670,7 +670,7 @@ pad: int -my_strcasecmp_mb_bin(const CHARSET_INFO *cs __attribute__((unused)), +my_strcasecmp_mb_bin(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const char *s, const char *t) { return strcmp(s,t); @@ -678,7 +678,7 @@ my_strcasecmp_mb_bin(const CHARSET_INFO *cs __attribute__((unused)), void -my_hash_sort_mb_bin(const CHARSET_INFO *cs __attribute__((unused)), +my_hash_sort_mb_bin(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const uchar *key, size_t len,ulong *nr1, ulong *nr2) { const uchar *pos = key; diff --git a/mysql-wsrep-5.6/strings/ctype-simple.c b/mysql-wsrep-5.6/strings/ctype-simple.c index ae1c99f4..5a5c363b 100644 --- a/mysql-wsrep-5.6/strings/ctype-simple.c +++ b/mysql-wsrep-5.6/strings/ctype-simple.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -216,8 +216,8 @@ size_t my_casedn_str_8bit(const CHARSET_INFO *cs,char *str) size_t my_caseup_8bit(const CHARSET_INFO *cs, char *src, size_t srclen, - char *dst __attribute__((unused)), - size_t dstlen __attribute__((unused))) + char *dst MY_ATTRIBUTE((unused)), + size_t dstlen MY_ATTRIBUTE((unused))) { char *end= src + srclen; register uchar *map= cs->to_upper; @@ -229,8 +229,8 @@ size_t my_caseup_8bit(const CHARSET_INFO *cs, char *src, size_t srclen, size_t my_casedn_8bit(const CHARSET_INFO *cs, char *src, size_t srclen, - char *dst __attribute__((unused)), - size_t dstlen __attribute__((unused))) + char *dst MY_ATTRIBUTE((unused)), + size_t dstlen MY_ATTRIBUTE((unused))) { char *end= src + srclen; register uchar *map=cs->to_lower; @@ -251,7 +251,7 @@ int my_strcasecmp_8bit(const CHARSET_INFO *cs,const char *s, const char *t) int my_mb_wc_8bit(const CHARSET_INFO *cs,my_wc_t *wc, const uchar *str, - const uchar *end __attribute__((unused))) + const uchar *end MY_ATTRIBUTE((unused))) { if (str >= end) return MY_CS_TOOSMALL; @@ -288,8 +288,8 @@ int my_wc_mb_8bit(const CHARSET_INFO *cs,my_wc_t wc, end buffer must be checked. */ -size_t my_snprintf_8bit(const CHARSET_INFO *cs __attribute__((unused)), - char* to, size_t n __attribute__((unused)), +size_t my_snprintf_8bit(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), + char* to, size_t n MY_ATTRIBUTE((unused)), const char* fmt, ...) { va_list args; @@ -506,7 +506,7 @@ noconv: } -longlong my_strntoll_8bit(const CHARSET_INFO *cs __attribute__((unused)), +longlong my_strntoll_8bit(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const char *nptr, size_t l, int base, char **endptr,int *err) { @@ -714,7 +714,7 @@ noconv: */ -double my_strntod_8bit(const CHARSET_INFO *cs __attribute__((unused)), +double my_strntod_8bit(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), char *str, size_t length, char **end, int *err) { @@ -731,7 +731,7 @@ double my_strntod_8bit(const CHARSET_INFO *cs __attribute__((unused)), Assume len >= 1 */ -size_t my_long10_to_str_8bit(const CHARSET_INFO *cs __attribute__((unused)), +size_t my_long10_to_str_8bit(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), char *dst, size_t len, int radix, long int val) { char buffer[66]; @@ -773,7 +773,7 @@ size_t my_long10_to_str_8bit(const CHARSET_INFO *cs __attribute__((unused)), size_t my_longlong10_to_str_8bit(const CHARSET_INFO *cs - __attribute__((unused)), + MY_ATTRIBUTE((unused)), char *dst, size_t len, int radix, longlong val) { @@ -1030,37 +1030,37 @@ size_t my_scan_8bit(const CHARSET_INFO *cs, const char *str, const char *end, } -void my_fill_8bit(const CHARSET_INFO *cs __attribute__((unused)), +void my_fill_8bit(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), char *s, size_t l, int fill) { memset(s, fill, l); } -size_t my_numchars_8bit(const CHARSET_INFO *cs __attribute__((unused)), +size_t my_numchars_8bit(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const char *b, const char *e) { return (size_t) (e - b); } -size_t my_numcells_8bit(const CHARSET_INFO *cs __attribute__((unused)), +size_t my_numcells_8bit(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const char *b, const char *e) { return (size_t) (e - b); } -size_t my_charpos_8bit(const CHARSET_INFO *cs __attribute__((unused)), - const char *b __attribute__((unused)), - const char *e __attribute__((unused)), +size_t my_charpos_8bit(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), + const char *b MY_ATTRIBUTE((unused)), + const char *e MY_ATTRIBUTE((unused)), size_t pos) { return pos; } -size_t my_well_formed_len_8bit(const CHARSET_INFO *cs __attribute__((unused)), +size_t my_well_formed_len_8bit(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const char *start, const char *end, size_t nchars, int *error) { @@ -1070,7 +1070,7 @@ size_t my_well_formed_len_8bit(const CHARSET_INFO *cs __attribute__((unused)), } -size_t my_lengthsp_8bit(const CHARSET_INFO *cs __attribute__((unused)), +size_t my_lengthsp_8bit(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const char *ptr, size_t length) { const char *end; @@ -1274,14 +1274,14 @@ static void set_max_sort_char(CHARSET_INFO *cs) static my_bool my_coll_init_simple(CHARSET_INFO *cs, - MY_CHARSET_LOADER *loader __attribute__((unused))) + MY_CHARSET_LOADER *loader MY_ATTRIBUTE((unused))) { set_max_sort_char(cs); return FALSE; } -longlong my_strtoll10_8bit(const CHARSET_INFO *cs __attribute__((unused)), +longlong my_strtoll10_8bit(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const char *nptr, char **endptr, int *error) { return my_strtoll10(nptr, endptr, error); @@ -1387,7 +1387,7 @@ static ulonglong d10[DIGITS_IN_ULONGLONG]= */ ulonglong -my_strntoull10rnd_8bit(const CHARSET_INFO *cs __attribute__((unused)), +my_strntoull10rnd_8bit(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const char *str, size_t length, int unsigned_flag, char **endptr, int *error) { @@ -1665,17 +1665,17 @@ ret_too_big: -my_bool my_propagate_simple(const CHARSET_INFO *cs __attribute__((unused)), - const uchar *str __attribute__((unused)), - size_t length __attribute__((unused))) +my_bool my_propagate_simple(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), + const uchar *str MY_ATTRIBUTE((unused)), + size_t length MY_ATTRIBUTE((unused))) { return 1; } -my_bool my_propagate_complex(const CHARSET_INFO *cs __attribute__((unused)), - const uchar *str __attribute__((unused)), - size_t length __attribute__((unused))) +my_bool my_propagate_complex(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), + const uchar *str MY_ATTRIBUTE((unused)), + size_t length MY_ATTRIBUTE((unused))) { return 0; } diff --git a/mysql-wsrep-5.6/strings/ctype-sjis.c b/mysql-wsrep-5.6/strings/ctype-sjis.c index a2e57aa2..bba397bb 100644 --- a/mysql-wsrep-5.6/strings/ctype-sjis.c +++ b/mysql-wsrep-5.6/strings/ctype-sjis.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -182,13 +182,13 @@ static uchar sort_order_sjis[]= (0x80<=(c) && (c)<=0xfc)) -static uint ismbchar_sjis(const CHARSET_INFO *cs __attribute__((unused)), +static uint ismbchar_sjis(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const char* p, const char *e) { return (issjishead((uchar) *p) && (e-p)>1 && issjistail((uchar)p[1]) ? 2: 0); } -static uint mbcharlen_sjis(const CHARSET_INFO *cs __attribute__((unused)), +static uint mbcharlen_sjis(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), uint c) { return (issjishead((uchar) c) ? 2 : 1); @@ -1112,7 +1112,7 @@ static int my_strnncoll_sjis_internal(const CHARSET_INFO *cs, } -static int my_strnncoll_sjis(const CHARSET_INFO *cs __attribute__((unused)), +static int my_strnncoll_sjis(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const uchar *a, size_t a_length, const uchar *b, size_t b_length, my_bool b_is_prefix) @@ -1124,7 +1124,7 @@ static int my_strnncoll_sjis(const CHARSET_INFO *cs __attribute__((unused)), } -static int my_strnncollsp_sjis(const CHARSET_INFO *cs __attribute__((unused)), +static int my_strnncollsp_sjis(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const uchar *a, size_t a_length, const uchar *b, size_t b_length, my_bool diff_if_only_endspace_difference) @@ -33968,7 +33968,7 @@ static uint16 unicode_to_sjis[65536]= @retval MY_CS_ILSEQ If a wrong byte sequence was found */ static int -my_mb_wc_sjis(const CHARSET_INFO *cs __attribute__((unused)), +my_mb_wc_sjis(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), my_wc_t *pwc, const uchar *s, const uchar *e){ int hi; @@ -34012,7 +34012,7 @@ my_mb_wc_sjis(const CHARSET_INFO *cs __attribute__((unused)), @retval MY_CS_ILUNI If the Unicode character does not exist in SJIS */ static int -my_wc_mb_sjis(const CHARSET_INFO *cs __attribute__((unused)), +my_wc_mb_sjis(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), my_wc_t wc, uchar *s, uchar *e) { int code; @@ -34061,7 +34061,7 @@ mb: static -size_t my_numcells_sjis(const CHARSET_INFO *cs __attribute__((unused)), +size_t my_numcells_sjis(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const char *str, const char *str_end) { size_t clen; @@ -34094,7 +34094,7 @@ size_t my_numcells_sjis(const CHARSET_INFO *cs __attribute__((unused)), CP932 additional characters are also accepted. */ static -size_t my_well_formed_len_sjis(const CHARSET_INFO *cs __attribute__((unused)), +size_t my_well_formed_len_sjis(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const char *b, const char *e, size_t pos, int *error) { diff --git a/mysql-wsrep-5.6/strings/ctype-tis620.c b/mysql-wsrep-5.6/strings/ctype-tis620.c index dd575d3c..7c7eff9b 100644 --- a/mysql-wsrep-5.6/strings/ctype-tis620.c +++ b/mysql-wsrep-5.6/strings/ctype-tis620.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -526,7 +526,7 @@ static size_t thai2sortable(uchar *tstr, size_t len) */ static -int my_strnncoll_tis620(const CHARSET_INFO *cs __attribute__((unused)), +int my_strnncoll_tis620(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const uchar *s1, size_t len1, const uchar *s2, size_t len2, my_bool s2_is_prefix) @@ -556,7 +556,7 @@ int my_strnncoll_tis620(const CHARSET_INFO *cs __attribute__((unused)), static -int my_strnncollsp_tis620(const CHARSET_INFO * cs __attribute__((unused)), +int my_strnncollsp_tis620(const CHARSET_INFO * cs MY_ATTRIBUTE((unused)), const uchar *a0, size_t a_length, const uchar *b0, size_t b_length, my_bool diff_if_only_endspace_difference) @@ -841,10 +841,10 @@ NULL,NULL,NULL,NULL,NULL,NULL,NULL,plFF static -int my_mb_wc_tis620(const CHARSET_INFO *cs __attribute__((unused)), +int my_mb_wc_tis620(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), my_wc_t *wc, const uchar *str, - const uchar *end __attribute__((unused))) + const uchar *end MY_ATTRIBUTE((unused))) { if (str >= end) return MY_CS_TOOSMALL; @@ -854,10 +854,10 @@ int my_mb_wc_tis620(const CHARSET_INFO *cs __attribute__((unused)), } static -int my_wc_mb_tis620(const CHARSET_INFO *cs __attribute__((unused)), +int my_wc_mb_tis620(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), my_wc_t wc, uchar *str, - uchar *end __attribute__((unused))) + uchar *end MY_ATTRIBUTE((unused))) { uchar *pl; diff --git a/mysql-wsrep-5.6/strings/ctype-ucs2.c b/mysql-wsrep-5.6/strings/ctype-ucs2.c index 48709100..e27ff74c 100644 --- a/mysql-wsrep-5.6/strings/ctype-ucs2.c +++ b/mysql-wsrep-5.6/strings/ctype-ucs2.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public @@ -64,8 +64,8 @@ my_bincmp(const uchar *s, const uchar *se, static size_t -my_caseup_str_mb2_or_mb4(const CHARSET_INFO * cs __attribute__((unused)), - char * s __attribute__((unused))) +my_caseup_str_mb2_or_mb4(const CHARSET_INFO * cs MY_ATTRIBUTE((unused)), + char * s MY_ATTRIBUTE((unused))) { DBUG_ASSERT(0); return 0; @@ -73,8 +73,8 @@ my_caseup_str_mb2_or_mb4(const CHARSET_INFO * cs __attribute__((unused)), static size_t -my_casedn_str_mb2_or_mb4(const CHARSET_INFO *cs __attribute__((unused)), - char * s __attribute__((unused))) +my_casedn_str_mb2_or_mb4(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), + char * s MY_ATTRIBUTE((unused))) { DBUG_ASSERT(0); return 0; @@ -82,9 +82,9 @@ my_casedn_str_mb2_or_mb4(const CHARSET_INFO *cs __attribute__((unused)), static int -my_strcasecmp_mb2_or_mb4(const CHARSET_INFO *cs __attribute__((unused)), - const char *s __attribute__((unused)), - const char *t __attribute__((unused))) +my_strcasecmp_mb2_or_mb4(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), + const char *s MY_ATTRIBUTE((unused)), + const char *t MY_ATTRIBUTE((unused))) { DBUG_ASSERT(0); return 0; @@ -1047,7 +1047,7 @@ my_vsnprintf_mb2(char *dst, size_t n, const char* fmt, va_list ap) static size_t -my_snprintf_mb2(const CHARSET_INFO *cs __attribute__((unused)), +my_snprintf_mb2(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), char* to, size_t n, const char* fmt, ...) { size_t retval; @@ -1060,7 +1060,7 @@ my_snprintf_mb2(const CHARSET_INFO *cs __attribute__((unused)), static size_t -my_lengthsp_mb2(const CHARSET_INFO *cs __attribute__((unused)), +my_lengthsp_mb2(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const char *ptr, size_t length) { const char *end= ptr + length; @@ -1102,7 +1102,7 @@ my_lengthsp_mb2(const CHARSET_INFO *cs __attribute__((unused)), ((c & 3) << 8) + d + 0x10000) static int -my_utf16_uni(const CHARSET_INFO *cs __attribute__((unused)), +my_utf16_uni(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), my_wc_t *pwc, const uchar *s, const uchar *e) { if (s + 2 > e) @@ -1135,7 +1135,7 @@ my_utf16_uni(const CHARSET_INFO *cs __attribute__((unused)), static int -my_uni_utf16(const CHARSET_INFO *cs __attribute__((unused)), +my_uni_utf16(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), my_wc_t wc, uchar *s, uchar *e) { if (wc <= 0xFFFF) @@ -1201,8 +1201,8 @@ my_tosort_utf16(MY_UNICASE_INFO *uni_plane, my_wc_t *wc) static size_t my_caseup_utf16(const CHARSET_INFO *cs, char *src, size_t srclen, - char *dst __attribute__((unused)), - size_t dstlen __attribute__((unused))) + char *dst MY_ATTRIBUTE((unused)), + size_t dstlen MY_ATTRIBUTE((unused))) { my_wc_t wc; int res; @@ -1246,8 +1246,8 @@ my_hash_sort_utf16(const CHARSET_INFO *cs, const uchar *s, size_t slen, static size_t my_casedn_utf16(const CHARSET_INFO *cs, char *src, size_t srclen, - char *dst __attribute__((unused)), - size_t dstlen __attribute__((unused))) + char *dst MY_ATTRIBUTE((unused)), + size_t dstlen MY_ATTRIBUTE((unused))) { my_wc_t wc; int res; @@ -1415,8 +1415,8 @@ my_ismbchar_utf16(const CHARSET_INFO *cs, const char *b, const char *e) static uint -my_mbcharlen_utf16(const CHARSET_INFO *cs __attribute__((unused)), - uint c __attribute__((unused))) +my_mbcharlen_utf16(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), + uint c MY_ATTRIBUTE((unused))) { DBUG_ASSERT(0); return MY_UTF16_HIGH_HEAD(c) ? 4 : 2; @@ -1749,7 +1749,7 @@ CHARSET_INFO my_charset_utf16_bin= static int -my_utf16le_uni(const CHARSET_INFO *cs __attribute__((unused)), +my_utf16le_uni(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), my_wc_t *pwc, const uchar *s, const uchar *e) { my_wc_t lo; @@ -1779,7 +1779,7 @@ my_utf16le_uni(const CHARSET_INFO *cs __attribute__((unused)), static int -my_uni_utf16le(const CHARSET_INFO *cs __attribute__((unused)), +my_uni_utf16le(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), my_wc_t wc, uchar *s, uchar *e) { if (wc < MY_UTF16_SURROGATE_HIGH_FIRST || @@ -1806,7 +1806,7 @@ my_uni_utf16le(const CHARSET_INFO *cs __attribute__((unused)), static size_t -my_lengthsp_utf16le(const CHARSET_INFO *cs __attribute__((unused)), +my_lengthsp_utf16le(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const char *ptr, size_t length) { const char *end= ptr + length; @@ -1922,7 +1922,7 @@ CHARSET_INFO my_charset_utf16le_bin= #ifdef HAVE_CHARSET_utf32 static int -my_utf32_uni(const CHARSET_INFO *cs __attribute__((unused)), +my_utf32_uni(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), my_wc_t *pwc, const uchar *s, const uchar *e) { if (s + 4 > e) @@ -1933,7 +1933,7 @@ my_utf32_uni(const CHARSET_INFO *cs __attribute__((unused)), static int -my_uni_utf32(const CHARSET_INFO *cs __attribute__((unused)), +my_uni_utf32(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), my_wc_t wc, uchar *s, uchar *e) { if (s + 4 > e) @@ -1983,8 +1983,8 @@ my_tosort_utf32(MY_UNICASE_INFO *uni_plane, my_wc_t *wc) static size_t my_caseup_utf32(const CHARSET_INFO *cs, char *src, size_t srclen, - char *dst __attribute__((unused)), - size_t dstlen __attribute__((unused))) + char *dst MY_ATTRIBUTE((unused)), + size_t dstlen MY_ATTRIBUTE((unused))) { my_wc_t wc; int res; @@ -2039,8 +2039,8 @@ my_hash_sort_utf32(const CHARSET_INFO *cs, const uchar *s, size_t slen, static size_t my_casedn_utf32(const CHARSET_INFO *cs, char *src, size_t srclen, - char *dst __attribute__((unused)), - size_t dstlen __attribute__((unused))) + char *dst MY_ATTRIBUTE((unused)), + size_t dstlen MY_ATTRIBUTE((unused))) { my_wc_t wc; int res; @@ -2198,7 +2198,7 @@ my_strnncollsp_utf32(const CHARSET_INFO *cs, static size_t -my_strnxfrmlen_utf32(const CHARSET_INFO *cs __attribute__((unused)), +my_strnxfrmlen_utf32(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), size_t len) { return len / 2; @@ -2206,17 +2206,17 @@ my_strnxfrmlen_utf32(const CHARSET_INFO *cs __attribute__((unused)), static uint -my_ismbchar_utf32(const CHARSET_INFO *cs __attribute__((unused)), - const char *b __attribute__((unused)), - const char *e __attribute__((unused))) +my_ismbchar_utf32(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), + const char *b MY_ATTRIBUTE((unused)), + const char *e MY_ATTRIBUTE((unused))) { return 4; } static uint -my_mbcharlen_utf32(const CHARSET_INFO *cs __attribute__((unused)) , - uint c __attribute__((unused))) +my_mbcharlen_utf32(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)) , + uint c MY_ATTRIBUTE((unused))) { return 4; } @@ -2312,7 +2312,7 @@ my_vsnprintf_utf32(char *dst, size_t n, const char* fmt, va_list ap) static size_t -my_snprintf_utf32(const CHARSET_INFO *cs __attribute__((unused)), +my_snprintf_utf32(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), char* to, size_t n, const char* fmt, ...) { size_t retval; @@ -2325,7 +2325,7 @@ my_snprintf_utf32(const CHARSET_INFO *cs __attribute__((unused)), static longlong -my_strtoll10_utf32(const CHARSET_INFO *cs __attribute__((unused)), +my_strtoll10_utf32(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const char *nptr, char **endptr, int *error) { const char *s, *end, *start, *n_end, *true_end; @@ -2495,7 +2495,7 @@ no_conv: static size_t -my_numchars_utf32(const CHARSET_INFO *cs __attribute__((unused)), +my_numchars_utf32(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const char *b, const char *e) { return (size_t) (e - b) / 4; @@ -2503,7 +2503,7 @@ my_numchars_utf32(const CHARSET_INFO *cs __attribute__((unused)), static size_t -my_charpos_utf32(const CHARSET_INFO *cs __attribute__((unused)), +my_charpos_utf32(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const char *b, const char *e, size_t pos) { size_t string_length= (size_t) (e - b); @@ -2512,7 +2512,7 @@ my_charpos_utf32(const CHARSET_INFO *cs __attribute__((unused)), static size_t -my_well_formed_len_utf32(const CHARSET_INFO *cs __attribute__((unused)), +my_well_formed_len_utf32(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const char *b, const char *e, size_t nchars, int *error) { @@ -2565,7 +2565,7 @@ void my_fill_utf32(const CHARSET_INFO *cs, static size_t -my_lengthsp_utf32(const CHARSET_INFO *cs __attribute__((unused)), +my_lengthsp_utf32(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const char *ptr, size_t length) { const char *end= ptr + length; @@ -2643,11 +2643,11 @@ my_utf32_get(const uchar *s) static int -my_strnncollsp_utf32_bin(const CHARSET_INFO *cs __attribute__((unused)), +my_strnncollsp_utf32_bin(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const uchar *s, size_t slen, const uchar *t, size_t tlen, my_bool diff_if_only_endspace_difference - __attribute__((unused))) + MY_ATTRIBUTE((unused))) { const uchar *se, *te; size_t minlen; @@ -2910,7 +2910,7 @@ static uchar to_upper_ucs2[] = { }; -static int my_ucs2_uni(const CHARSET_INFO *cs __attribute__((unused)), +static int my_ucs2_uni(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), my_wc_t * pwc, const uchar *s, const uchar *e) { if (s+2 > e) /* Need 2 characters */ @@ -2920,7 +2920,7 @@ static int my_ucs2_uni(const CHARSET_INFO *cs __attribute__((unused)), return 2; } -static int my_uni_ucs2(const CHARSET_INFO *cs __attribute__((unused)) , +static int my_uni_ucs2(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)) , my_wc_t wc, uchar *r, uchar *e) { if ( r+2 > e ) @@ -2963,8 +2963,8 @@ my_tosort_ucs2(MY_UNICASE_INFO *uni_plane, my_wc_t *wc) static size_t my_caseup_ucs2(const CHARSET_INFO *cs, char *src, size_t srclen, - char *dst __attribute__((unused)), - size_t dstlen __attribute__((unused))) + char *dst MY_ATTRIBUTE((unused)), + size_t dstlen MY_ATTRIBUTE((unused))) { my_wc_t wc; int res; @@ -3008,8 +3008,8 @@ static void my_hash_sort_ucs2(const CHARSET_INFO *cs, const uchar *s, static size_t my_casedn_ucs2(const CHARSET_INFO *cs, char *src, size_t srclen, - char *dst __attribute__((unused)), - size_t dstlen __attribute__((unused))) + char *dst MY_ATTRIBUTE((unused)), + size_t dstlen MY_ATTRIBUTE((unused))) { my_wc_t wc; int res; @@ -3030,7 +3030,7 @@ static size_t my_casedn_ucs2(const CHARSET_INFO *cs, char *src, size_t srclen, static void -my_fill_ucs2(const CHARSET_INFO *cs __attribute__((unused)), +my_fill_ucs2(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), char *s, size_t l, int fill) { DBUG_ASSERT(fill <= 0xFFFF); @@ -3101,11 +3101,11 @@ static int my_strnncoll_ucs2(const CHARSET_INFO *cs, > 0 a > b */ -static int my_strnncollsp_ucs2(const CHARSET_INFO *cs __attribute__((unused)), +static int my_strnncollsp_ucs2(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const uchar *s, size_t slen, const uchar *t, size_t tlen, my_bool diff_if_only_endspace_difference - __attribute__((unused))) + MY_ATTRIBUTE((unused))) { const uchar *se, *te; size_t minlen; @@ -3152,23 +3152,23 @@ static int my_strnncollsp_ucs2(const CHARSET_INFO *cs __attribute__((unused)), } -static uint my_ismbchar_ucs2(const CHARSET_INFO *cs __attribute__((unused)), - const char *b __attribute__((unused)), - const char *e __attribute__((unused))) +static uint my_ismbchar_ucs2(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), + const char *b MY_ATTRIBUTE((unused)), + const char *e MY_ATTRIBUTE((unused))) { return 2; } -static uint my_mbcharlen_ucs2(const CHARSET_INFO *cs __attribute__((unused)) , - uint c __attribute__((unused))) +static uint my_mbcharlen_ucs2(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)) , + uint c MY_ATTRIBUTE((unused))) { return 2; } static -size_t my_numchars_ucs2(const CHARSET_INFO *cs __attribute__((unused)), +size_t my_numchars_ucs2(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const char *b, const char *e) { return (size_t) (e-b)/2; @@ -3176,9 +3176,9 @@ size_t my_numchars_ucs2(const CHARSET_INFO *cs __attribute__((unused)), static -size_t my_charpos_ucs2(const CHARSET_INFO *cs __attribute__((unused)), - const char *b __attribute__((unused)), - const char *e __attribute__((unused)), +size_t my_charpos_ucs2(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), + const char *b MY_ATTRIBUTE((unused)), + const char *e MY_ATTRIBUTE((unused)), size_t pos) { size_t string_length= (size_t) (e - b); @@ -3187,7 +3187,7 @@ size_t my_charpos_ucs2(const CHARSET_INFO *cs __attribute__((unused)), static -size_t my_well_formed_len_ucs2(const CHARSET_INFO *cs __attribute__((unused)), +size_t my_well_formed_len_ucs2(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const char *b, const char *e, size_t nchars, int *error) { @@ -3255,11 +3255,11 @@ int my_strnncoll_ucs2_bin(const CHARSET_INFO *cs, } static int my_strnncollsp_ucs2_bin(const CHARSET_INFO *cs - __attribute__((unused)), + MY_ATTRIBUTE((unused)), const uchar *s, size_t slen, const uchar *t, size_t tlen, my_bool diff_if_only_endspace_difference - __attribute__((unused))) + MY_ATTRIBUTE((unused))) { const uchar *se, *te; size_t minlen; @@ -3303,7 +3303,7 @@ static int my_strnncollsp_ucs2_bin(const CHARSET_INFO *cs static -void my_hash_sort_ucs2_bin(const CHARSET_INFO *cs __attribute__((unused)), +void my_hash_sort_ucs2_bin(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const uchar *key, size_t len,ulong *nr1, ulong *nr2) { const uchar *pos = key; diff --git a/mysql-wsrep-5.6/strings/ctype-ujis.c b/mysql-wsrep-5.6/strings/ctype-ujis.c index 5f7c36e6..6b8443fa 100644 --- a/mysql-wsrep-5.6/strings/ctype-ujis.c +++ b/mysql-wsrep-5.6/strings/ctype-ujis.c @@ -1,5 +1,5 @@ /* Copyright (c) 2002 MySQL AB & tommy@valley.ne.jp - Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public @@ -184,7 +184,7 @@ static uchar sort_order_ujis[]= #define isujis_ss3(c) (((c)&0xff) == 0x8f) -static uint ismbchar_ujis(const CHARSET_INFO *cs __attribute__((unused)), +static uint ismbchar_ujis(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const char* p, const char *e) { return ((*(uchar*)(p)<0x80)? 0:\ @@ -194,7 +194,7 @@ static uint ismbchar_ujis(const CHARSET_INFO *cs __attribute__((unused)), 0); } -static uint mbcharlen_ujis(const CHARSET_INFO *cs __attribute__((unused)), +static uint mbcharlen_ujis(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), uint c) { return (isujis(c)? 2: isujis_ss2(c)? 2: isujis_ss3(c)? 3: 1); @@ -210,7 +210,7 @@ static uint mbcharlen_ujis(const CHARSET_INFO *cs __attribute__((unused)), */ static -size_t my_well_formed_len_ujis(const CHARSET_INFO *cs __attribute__((unused)), +size_t my_well_formed_len_ujis(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const char *beg, const char *end, size_t pos, int *error) { @@ -260,7 +260,7 @@ size_t my_well_formed_len_ujis(const CHARSET_INFO *cs __attribute__((unused)), static -size_t my_numcells_eucjp(const CHARSET_INFO *cs __attribute__((unused)), +size_t my_numcells_eucjp(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const char *str, const char *str_end) { size_t clen; @@ -65880,7 +65880,7 @@ static uint16 unicode_to_jisx0212_eucjp[65536]= @retval MY_CS_ILSEQ If a wrong byte sequence was found */ static int -my_mb_wc_euc_jp(const CHARSET_INFO *cs __attribute__((unused)), +my_mb_wc_euc_jp(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), my_wc_t *pwc, const uchar *s, const uchar *e) { int hi; @@ -65940,7 +65940,7 @@ my_mb_wc_euc_jp(const CHARSET_INFO *cs __attribute__((unused)), @retval MY_CS_ILUNI If the Unicode character does not exist in UJIS */ static int -my_wc_mb_euc_jp(const CHARSET_INFO *cs __attribute__((unused)), +my_wc_mb_euc_jp(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), my_wc_t wc, uchar *s, uchar *e) { int jp; @@ -67181,7 +67181,7 @@ get_case_info_for_ch(const CHARSET_INFO *cs, uint plane, uint page, uint offs) static size_t my_casefold_ujis(const CHARSET_INFO *cs, char *src, size_t srclen, - char *dst, size_t dstlen __attribute__((unused)), + char *dst, size_t dstlen MY_ATTRIBUTE((unused)), uchar *map, size_t is_upper) { diff --git a/mysql-wsrep-5.6/strings/ctype-utf8.c b/mysql-wsrep-5.6/strings/ctype-utf8.c index 563109ee..e4d1faa2 100644 --- a/mysql-wsrep-5.6/strings/ctype-utf8.c +++ b/mysql-wsrep-5.6/strings/ctype-utf8.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public @@ -5327,7 +5327,7 @@ static inline int bincmp(const uchar *s, const uchar *se, } -static int my_utf8_uni(const CHARSET_INFO *cs __attribute__((unused)), +static int my_utf8_uni(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), my_wc_t * pwc, const uchar *s, const uchar *e) { uchar c; @@ -5438,7 +5438,7 @@ static int my_utf8_uni(const CHARSET_INFO *cs __attribute__((unused)), for example, for a null-terminated string */ static int my_utf8_uni_no_range(const CHARSET_INFO *cs - __attribute__((unused)), + MY_ATTRIBUTE((unused)), my_wc_t * pwc, const uchar *s) { uchar c; @@ -5479,7 +5479,7 @@ static int my_utf8_uni_no_range(const CHARSET_INFO *cs } -static int my_uni_utf8 (const CHARSET_INFO *cs __attribute__((unused)), +static int my_uni_utf8 (const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), my_wc_t wc, uchar *r, uchar *e) { int count; @@ -5529,7 +5529,7 @@ static int my_uni_utf8 (const CHARSET_INFO *cs __attribute__((unused)), The same as above, but without range check. */ static int my_uni_utf8_no_range(const CHARSET_INFO *cs - __attribute__((unused)), + MY_ATTRIBUTE((unused)), my_wc_t wc, uchar *r) { int count; @@ -5955,7 +5955,7 @@ int my_wildcmp_utf8(const CHARSET_INFO *cs, static -size_t my_strnxfrmlen_utf8(const CHARSET_INFO *cs __attribute__((unused)), +size_t my_strnxfrmlen_utf8(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), size_t len) { return (len * 2 + 2) / 3; @@ -5963,7 +5963,7 @@ size_t my_strnxfrmlen_utf8(const CHARSET_INFO *cs __attribute__((unused)), static -int my_valid_mbcharlen_utf8(const CHARSET_INFO *cs __attribute__((unused)), +int my_valid_mbcharlen_utf8(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const uchar *s, const uchar *e) { uchar c; @@ -6050,7 +6050,7 @@ static uint my_ismbchar_utf8(const CHARSET_INFO *cs,const char *b, return (res>1) ? res : 0; } -static uint my_mbcharlen_utf8(const CHARSET_INFO *cs __attribute__((unused)), +static uint my_mbcharlen_utf8(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), uint c) { if (c < 0x80) @@ -7575,7 +7575,7 @@ static char filename_safe_char[128]= #define MY_FILENAME_ESCAPE '@' static int -my_mb_wc_filename(const CHARSET_INFO *cs __attribute__((unused)), +my_mb_wc_filename(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), my_wc_t *pwc, const uchar *s, const uchar *e) { int byte1, byte2; @@ -7635,7 +7635,7 @@ my_mb_wc_filename(const CHARSET_INFO *cs __attribute__((unused)), static int -my_wc_mb_filename(const CHARSET_INFO *cs __attribute__((unused)), +my_wc_mb_filename(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), my_wc_t wc, uchar *s, uchar *e) { int code; @@ -7898,7 +7898,7 @@ bincmp_utf8mb4(const uchar *s, const uchar *se, static int -my_mb_wc_utf8mb4(const CHARSET_INFO *cs __attribute__((unused)), +my_mb_wc_utf8mb4(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), my_wc_t * pwc, const uchar *s, const uchar *e) { uchar c; @@ -7984,7 +7984,7 @@ my_mb_wc_utf8mb4(const CHARSET_INFO *cs __attribute__((unused)), for example, for a null-terminated string */ static int -my_mb_wc_utf8mb4_no_range(const CHARSET_INFO *cs __attribute__((unused)), +my_mb_wc_utf8mb4_no_range(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), my_wc_t *pwc, const uchar *s) { uchar c; @@ -8039,7 +8039,7 @@ my_mb_wc_utf8mb4_no_range(const CHARSET_INFO *cs __attribute__((unused)), static int -my_wc_mb_utf8mb4(const CHARSET_INFO *cs __attribute__((unused)), +my_wc_mb_utf8mb4(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), my_wc_t wc, uchar *r, uchar *e) { int count; @@ -8075,7 +8075,7 @@ my_wc_mb_utf8mb4(const CHARSET_INFO *cs __attribute__((unused)), The same as above, but without range check. */ static int -my_wc_mb_utf8mb4_no_range(const CHARSET_INFO *cs __attribute__((unused)), +my_wc_mb_utf8mb4_no_range(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), my_wc_t wc, uchar *r) { int count; @@ -8514,7 +8514,7 @@ my_wildcmp_utf8mb4(const CHARSET_INFO *cs, static size_t -my_strnxfrmlen_utf8mb4(const CHARSET_INFO *cs __attribute__((unused)), +my_strnxfrmlen_utf8mb4(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), size_t len) { /* TODO: fix when working on WL "Unicode new version" */ @@ -8523,7 +8523,7 @@ my_strnxfrmlen_utf8mb4(const CHARSET_INFO *cs __attribute__((unused)), static int -my_valid_mbcharlen_utf8mb4(const CHARSET_INFO *cs __attribute__((unused)), +my_valid_mbcharlen_utf8mb4(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const uchar *s, const uchar *e) { uchar c; @@ -8605,7 +8605,7 @@ my_ismbchar_utf8mb4(const CHARSET_INFO *cs, const char *b, const char *e) static uint -my_mbcharlen_utf8mb4(const CHARSET_INFO *cs __attribute__((unused)), uint c) +my_mbcharlen_utf8mb4(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), uint c) { if (c < 0x80) return 1; diff --git a/mysql-wsrep-5.6/strings/ctype-win1250ch.c b/mysql-wsrep-5.6/strings/ctype-win1250ch.c index 8c563bbc..5753a496 100644 --- a/mysql-wsrep-5.6/strings/ctype-win1250ch.c +++ b/mysql-wsrep-5.6/strings/ctype-win1250ch.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -436,7 +436,7 @@ static struct wordvalue doubles[] = { #define IS_END(p, src, len) (((char *)p - (char *)src) >= (len)) static int my_strnncoll_win1250ch(const CHARSET_INFO *cs - __attribute__((unused)), + MY_ATTRIBUTE((unused)), const uchar *s1, size_t len1, const uchar *s2, size_t len2, my_bool s2_is_prefix) @@ -471,7 +471,7 @@ int my_strnncollsp_win1250ch(const CHARSET_INFO *cs, const uchar *s, size_t slen, const uchar *t, size_t tlen, my_bool diff_if_only_endspace_difference - __attribute__((unused))) + MY_ATTRIBUTE((unused))) { for ( ; slen && s[slen-1] == ' ' ; slen--); for ( ; tlen && t[tlen-1] == ' ' ; tlen--); @@ -480,9 +480,9 @@ int my_strnncollsp_win1250ch(const CHARSET_INFO *cs, static size_t -my_strnxfrm_win1250ch(const CHARSET_INFO *cs __attribute__((unused)), +my_strnxfrm_win1250ch(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), uchar *dest, size_t len, - uint nweights_arg __attribute__((unused)), + uint nweights_arg MY_ATTRIBUTE((unused)), const uchar *src, size_t srclen, uint flags) { int value; @@ -614,7 +614,7 @@ static uchar like_range_prefix_max_win1250ch[]= */ static my_bool -my_like_range_win1250ch(const CHARSET_INFO *cs __attribute__((unused)), +my_like_range_win1250ch(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), const char *ptr, size_t ptr_length, pbool escape, pbool w_one, pbool w_many, size_t res_length, diff --git a/mysql-wsrep-5.6/support-files/MacOSX/ReadMe.txt b/mysql-wsrep-5.6/support-files/MacOSX/ReadMe.txt deleted file mode 100644 index 246e4d95..00000000 --- a/mysql-wsrep-5.6/support-files/MacOSX/ReadMe.txt +++ /dev/null @@ -1,7 +0,0 @@ - -You can find information about how to install on Mac OS X at - - http://dev.mysql.com/doc/refman/5.1/en/mac-os-x-installation.html - -The MySQL Reference Manual is also available in various formats on -http://dev.mysql.com/doc. diff --git a/mysql-wsrep-5.6/support-files/mysql.server.sh b/mysql-wsrep-5.6/support-files/mysql.server.sh index 41013fe2..3f9ca946 100644 --- a/mysql-wsrep-5.6/support-files/mysql.server.sh +++ b/mysql-wsrep-5.6/support-files/mysql.server.sh @@ -289,7 +289,7 @@ case "$mode" in then # Give extra arguments to mysqld with the my.cnf file. This script # may be overwritten at next upgrade. - $bindir/mysqld_safe --datadir="$datadir" --pid-file="$mysqld_pid_file_path" $other_args >/dev/null 2>&1 & + $bindir/mysqld_safe --datadir="$datadir" --pid-file="$mysqld_pid_file_path" $other_args >/dev/null & wait_for_pid created "$!" "$mysqld_pid_file_path"; return_value=$? # Make lock for RedHat / SuSE diff --git a/mysql-wsrep-5.6/support-files/mysql.spec.sh b/mysql-wsrep-5.6/support-files/mysql.spec.sh index ccc8caca..7b13592f 100644 --- a/mysql-wsrep-5.6/support-files/mysql.spec.sh +++ b/mysql-wsrep-5.6/support-files/mysql.spec.sh @@ -1,4 +1,4 @@ -# Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -199,9 +199,9 @@ BuildRequires: gperf procps time %global compatch mysql-5173-charset-dir.patch %endif -# mysql-wsrep-5.5 has libmysqlclient.so.18, as have 5.6 and 5.7; +# mysql-wsrep-5.5 has libmysqlclient.so.18, as has 5.6; # same as preinstalled mariadb-libs, so we currently need no libs-compat on RHEL 7. -# This becomes relevant with a MySQL 5.8 (or higher) that has a libmysqlclient.so.19 or higher. +# This becomes relevant with a MySQL 5.7 (or higher) that has a libmysqlclient.so.20 or higher. # # %%if 0%%{?rhel} == 7 # %%global compatver 5.5.45 @@ -330,12 +330,12 @@ Obsoletes: MySQL-server Obsoletes: MySQL-server-advanced %endif Obsoletes: mysql-server < %{version}-%{release} -Obsoletes: mysql-server-advanced +Obsoletes: mysql-server-advanced mysql-community-server Obsoletes: MySQL-server-classic MySQL-server-community MySQL-server-enterprise Obsoletes: MySQL-server-advanced-gpl MySQL-server-enterprise-gpl %if 0%{?rhel} # RedHat has /usr/share/mysql/* in a separate package -Obsoletes: mysql-common +Obsoletes: mysql-common mysql-community-common %endif Provides: mysql-server = %{version}-%{release} Provides: mysql-server%{?_isa} = %{version}-%{release} @@ -381,6 +381,7 @@ Obsoletes: MySQL-client-advanced %endif Obsoletes: mysql < %{version}-%{release} Obsoletes: mysql-advanced < %{version}-%{release} +Obsoletes: mysql-community-client Obsoletes: MySQL-client-classic MySQL-client-community MySQL-client-enterprise Obsoletes: MySQL-client-advanced-gpl MySQL-client-enterprise-gpl Provides: mysql = %{version}-%{release} @@ -409,10 +410,10 @@ Requires: MySQL-client perl Obsoletes: MySQL-test-advanced %endif Obsoletes: mysql-test < %{version}-%{release} -Obsoletes: mysql-test-advanced +Obsoletes: mysql-test-advanced mysql-community-test Obsoletes: MySQL-test-classic MySQL-test-community MySQL-test-enterprise Obsoletes: MySQL-test-advanced-gpl MySQL-test-enterprise-gpl -Obsoletes: mysql-bench +Obsoletes: mysql-bench mysql-community-bench Obsoletes: MySQL-bench Provides: mysql-test = %{version}-%{release} Provides: mysql-test%{?_isa} = %{version}-%{release} @@ -438,6 +439,7 @@ Obsoletes: MySQL-devel-advanced %endif Obsoletes: mysql-devel < %{version}-%{release} Obsoletes: mysql-embedded-devel mysql-devel-advanced mysql-embedded-devel-advanced +Obsoletes: mysql-community-devel Obsoletes: MySQL-devel-classic MySQL-devel-community MySQL-devel-enterprise Obsoletes: MySQL-devel-advanced-gpl MySQL-devel-enterprise-gpl Provides: mysql-devel = %{version}-%{release} @@ -468,7 +470,7 @@ Obsoletes: MySQL-shared-pro-gpl-cert Obsoletes: MySQL-shared-classic MySQL-shared-community MySQL-shared-enterprise Obsoletes: MySQL-shared-advanced-gpl MySQL-shared-enterprise-gpl # RHEL uses other names: -Obsoletes: mysql-libs +Obsoletes: mysql-libs mysql-community-libs # Necessary on RHEL 7, no harm on other platforms: Obsoletes: mariadb-libs @@ -488,6 +490,7 @@ Obsoletes: mysql-wsrep-libs-compat%{previous_suffix} Provides: mysql-libs-compat = %{version} Provides: mysql-libs-compat%{?_isa} = %{version} Obsoletes: mysql-libs-compat < %{version} +Obsoletes: mysql-community-libs-compat Provides: MySQL-shared-compat%{?_isa} = %{version} Obsoletes: MySQL-shared-compat < %{version} @@ -495,6 +498,7 @@ Obsoletes: MySQL-shared-compat < %{version} # Directly, we replace "libs" only; but RedHat "client" and "server" need files from "libs" Provides: mysql-libs = %{compatver} Obsoletes: mysql-libs < %{version} +Obsoletes: mysql-community-libs %if 0%{?rhel} > 6 # Dealing with RHEL 7 and upwards (and compatible ...) @@ -529,7 +533,7 @@ Requires: MySQL-devel Obsoletes: MySQL-embedded-advanced %endif Obsoletes: mysql-embedded < %{version}-%{release} -Obsoletes: mysql-embedded-advanced +Obsoletes: mysql-embedded-advanced mysql-community-embedded Obsoletes: MySQL-embedded-pro Obsoletes: MySQL-embedded-classic MySQL-embedded-community MySQL-embedded-enterprise Obsoletes: MySQL-embedded-advanced-gpl MySQL-embedded-enterprise-gpl @@ -1500,6 +1504,11 @@ echo "=====" >> $STATUS_HISTORY # merging BK trees) ############################################################################## %changelog +* Fri Jun 10 2016 Joerg Bruehe +- Add missing "obsoletes" directives to handle Oracle's yum repository. +- Fix comment about SO version of libmysqlclient.so. +- Modify some changelog dates to match Oracle's (reduce differences). + * Fri Oct 30 2015 Joerg Bruehe - Combine "plugins.files" and "datadir.files" into one, it seems rpmbuild 4.4 (used on SLES 11) cannot handle two "-f" directives for one "%%files" section. @@ -1646,7 +1655,7 @@ echo "=====" >> $STATUS_HISTORY not in an RPM upgrade. This affects both the "mkdir" and the call of "mysql_install_db". -* Thu Feb 10 2011 Joerg Bruehe +* Wed Feb 09 2011 Joerg Bruehe - Fix bug#56581: If an installation deviates from the default file locations ("datadir" and "pid-file"), the mechanism to detect a running server (on upgrade) @@ -1767,7 +1776,7 @@ echo "=====" >> $STATUS_HISTORY - Fix some problems with the directives around "tcmalloc" (experimental), remove erroneous traces of the InnoDB plugin (that is 5.1 only). -* Fri Oct 09 2009 Magnus Blaudd +* Tue Oct 06 2009 Magnus Blaudd - Removed mysql_fix_privilege_tables @@ -1964,7 +1973,7 @@ echo "=====" >> $STATUS_HISTORY - Set $LDFLAGS from $MYSQL_BUILD_LDFLAGS -* Wed Mar 08 2006 Kent Boortz +* Tue Mar 07 2006 Kent Boortz - Changed product name from "Community Edition" to "Community Server" @@ -2212,7 +2221,7 @@ echo "=====" >> $STATUS_HISTORY - marked /etc/logrotate.d/mysql as a config file (BUG 2156) -* Fri Dec 12 2003 Lenz Grimmer +* Sat Dec 13 2003 Lenz Grimmer - fixed file permissions (BUG 1672) @@ -2354,7 +2363,7 @@ echo "=====" >> $STATUS_HISTORY - Added separate libmysql_r directory; now both a threaded and non-threaded library is shipped. -* Wed Sep 29 1999 David Axmark +* Tue Sep 28 1999 David Axmark - Added the support-files/my-example.cnf to the docs directory. diff --git a/mysql-wsrep-5.6/tests/mysql_client_fw.c b/mysql-wsrep-5.6/tests/mysql_client_fw.c index 0dd83ae5..d478ccb9 100644 --- a/mysql-wsrep-5.6/tests/mysql_client_fw.c +++ b/mysql-wsrep-5.6/tests/mysql_client_fw.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights +/* Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights * reserved. This program is free software; you can redistribute it and/or modify @@ -1265,7 +1265,7 @@ static struct my_tests_st *get_my_tests(); /* To be defined in main .c file */ static struct my_tests_st *my_testlist= 0; static my_bool -get_one_option(int optid, const struct my_option *opt __attribute__((unused)), +get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)), char *argument) { switch (optid) { diff --git a/mysql-wsrep-5.6/tests/mysql_client_test.c b/mysql-wsrep-5.6/tests/mysql_client_test.c index e21b9f28..04ba0138 100644 --- a/mysql-wsrep-5.6/tests/mysql_client_test.c +++ b/mysql-wsrep-5.6/tests/mysql_client_test.c @@ -19488,6 +19488,77 @@ static void test_bug17883203() } +/* + Bug#22559575: "the statement (1) has no open cursor" pops + sometimes with prepared+query_cache +*/ + +static void bug22559575_base(unsigned long type) +{ + MYSQL_STMT *stmt; + int rc; + const char stmt_text[] ="SELECT a FROM t22559575"; + MYSQL_RES *prepare_meta = NULL; + MYSQL_BIND bind[1]; + short data; + unsigned long length; + + stmt = mysql_stmt_init(mysql); + check_stmt(stmt); + if (type == CURSOR_TYPE_READ_ONLY) + { + rc = mysql_stmt_attr_set(stmt, STMT_ATTR_CURSOR_TYPE, (const void*)&type); + check_execute(stmt, rc); + } + rc = mysql_stmt_prepare(stmt, stmt_text, strlen(stmt_text)); + check_execute(stmt, rc); + prepare_meta = mysql_stmt_result_metadata(stmt); + DIE_UNLESS(prepare_meta != NULL); + rc= mysql_stmt_execute(stmt); + check_execute(stmt, rc); + + memset(bind, 0, sizeof(bind)); + bind[0].buffer_type= MYSQL_TYPE_SHORT; + bind[0].buffer= (void *)&data; + bind[0].length= &length; + rc= mysql_stmt_bind_result(stmt, bind); + check_execute(stmt, rc); + + rc= mysql_stmt_store_result(stmt); + check_execute(stmt, rc); + + rc= mysql_stmt_fetch(stmt); + check_execute(stmt, rc); + DIE_UNLESS(data == 1); + + mysql_free_result(prepare_meta); + rc= mysql_stmt_close(stmt); + check_execute(stmt, rc); +} + +static void test_bug22559575() +{ + int rc; + + rc= mysql_query(mysql, "CREATE TABLE t22559575(a SMALLINT)"); + myquery(rc); + rc= mysql_query(mysql, "INSERT INTO t22559575 VALUES (1)"); + myquery(rc); + + /* Should not cache */ + bug22559575_base(CURSOR_TYPE_READ_ONLY); + bug22559575_base(CURSOR_TYPE_READ_ONLY); + /* Should save to cache */ + bug22559575_base(CURSOR_TYPE_NO_CURSOR); + /* Should use cache */ + bug22559575_base(CURSOR_TYPE_NO_CURSOR); + /* should not use cache */ + bug22559575_base(CURSOR_TYPE_READ_ONLY); + + rc= mysql_query(mysql, "DROP TABLE t22559575"); + myquery(rc); +} + static struct my_tests_st my_tests[]= { { "disable_query_logs", disable_query_logs }, { "test_view_sp_list_fields", test_view_sp_list_fields }, @@ -19765,6 +19836,7 @@ static struct my_tests_st my_tests[]= { { "test_bug17512527", test_bug17512527}, { "test_bug20810928", test_bug20810928 }, { "test_bug17883203", test_bug17883203 }, + { "test_bug22559575", test_bug22559575 }, { 0, 0 } }; diff --git a/mysql-wsrep-5.6/tests/thread_test.c b/mysql-wsrep-5.6/tests/thread_test.c index 5d79fb17..3fb2fc5b 100644 --- a/mysql-wsrep-5.6/tests/thread_test.c +++ b/mysql-wsrep-5.6/tests/thread_test.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -29,9 +29,9 @@ static char *database,*host,*user,*password,*unix_socket,*query; uint tcp_port; #ifndef __WIN__ -void *test_thread(void *arg __attribute__((unused))) +void *test_thread(void *arg MY_ATTRIBUTE((unused))) #else -unsigned __stdcall test_thread(void *arg __attribute__((unused))) +unsigned __stdcall test_thread(void *arg MY_ATTRIBUTE((unused))) #endif { MYSQL *mysql; @@ -134,7 +134,7 @@ static void usage() static my_bool -get_one_option(int optid, const struct my_option *opt __attribute__((unused)), +get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)), char *argument) { switch (optid) { diff --git a/mysql-wsrep-5.6/unittest/CMakeLists.txt b/mysql-wsrep-5.6/unittest/CMakeLists.txt index f3aa8dab..678e020f 100644 --- a/mysql-wsrep-5.6/unittest/CMakeLists.txt +++ b/mysql-wsrep-5.6/unittest/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -13,8 +13,10 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +ADD_SUBDIRECTORY(gunit) + ADD_CUSTOM_TARGET( test-unit - COMMAND perl ${CMAKE_CURRENT_SOURCE_DIR}/unit.pl run . + COMMAND ctest WORKING_DIRECTORY ${CMAKE_BINARY_DIR} ) diff --git a/mysql-wsrep-5.6/unittest/README.txt b/mysql-wsrep-5.6/unittest/README.txt deleted file mode 100644 index 625aa765..00000000 --- a/mysql-wsrep-5.6/unittest/README.txt +++ /dev/null @@ -1,52 +0,0 @@ - -Unit tests directory structure ------------------------------- - -This is the current structure of the unit tests. More directories -will be added over time. - -mytap Source for the MyTAP library -mysys Tests for mysys components - base64-t.c Unit test for base64 encoding functions -examples Example unit tests. - core-t.c Example of raising a signal in the middle of the test - THIS TEST WILL STOP ALL FURTHER TESTING! - simple-t.c Example of a standard TAP unit test - skip-t.c Example where some test points are skipped - skip_all-t.c Example of a test where the entire test is skipped - todo-t.c Example where test contain test points that are TODO - no_plan-t.c Example of a test with no plan (avoid this) - - -Executing unit tests --------------------- - -To make and execute all unit tests in the directory: - - make test - -Observe that the tests in the examples/ directory are just various -examples of tests and are not expected to pass. - - -Adding unit tests ------------------ - -Add a file with a name of the format "foo-t.c" to the appropriate -directory and add the following to the Makefile.am in that directory -(where ... denotes stuff already there): - - noinst_PROGRAMS = ... foo-t - -Note, it's important to have "-t" at the end of the filename, otherwise the -test won't be executed by 'make test' ! - - -Documentation -------------- - -The generated documentation is temporarily placed at: - - http://www.kindahl.net/mytap/doc/ - -I will move it to a better place once I figure out where and how. diff --git a/mysql-wsrep-5.6/unittest/gunit/rpl_group_set-t.cc b/mysql-wsrep-5.6/unittest/gunit/rpl_group_set-t.cc index 81ad1b82..c56211ef 100644 --- a/mysql-wsrep-5.6/unittest/gunit/rpl_group_set-t.cc +++ b/mysql-wsrep-5.6/unittest/gunit/rpl_group_set-t.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -472,9 +472,9 @@ TEST_F(GroupTest, Group_containers) push_errtext(); \ for (int method_i= 0, combination_i= 0; method_i < MAX_METHOD; method_i++) { \ for (int sid_map_i= 0; sid_map_i < MAX_SID_MAP; sid_map_i++, combination_i++) { \ - Gtid_set >id_set __attribute__((unused))= \ + Gtid_set >id_set MY_ATTRIBUTE((unused))= \ containers[combination_i]->gtid_set; \ - Sid_map *&sid_map __attribute__((unused))= \ + Sid_map *&sid_map MY_ATTRIBUTE((unused))= \ sid_maps[sid_map_i]; \ append_errtext(__LINE__, \ "sid_map_i=%d method_i=%d combination_i=%d", \ @@ -489,13 +489,13 @@ TEST_F(GroupTest, Group_containers) for (int end_i= 0; end_i < MAX_END; end_i++) { \ for (int empty_i= 0; empty_i < MAX_EMPTY; empty_i++) { \ for (int anon_i= 0; anon_i < MAX_ANON; anon_i++, combination_i++) { \ - Gtid_set >id_set __attribute__((unused))= \ + Gtid_set >id_set MY_ATTRIBUTE((unused))= \ containers[combination_i]->gtid_set; \ - Group_cache &stmt_cache __attribute__((unused))= \ + Group_cache &stmt_cache MY_ATTRIBUTE((unused))= \ containers[combination_i]->stmt_cache; \ - Group_cache &trx_cache __attribute__((unused))= \ + Group_cache &trx_cache MY_ATTRIBUTE((unused))= \ containers[combination_i]->trx_cache; \ - Group_log_state &group_log_state __attribute__((unused))= \ + Group_log_state &group_log_state MY_ATTRIBUTE((unused))= \ containers[combination_i]->group_log_state; \ append_errtext(__LINE__, \ "type_i=%d end_i=%d empty_i=%d " \ diff --git a/mysql-wsrep-5.6/unittest/gunit/yassl/CMakeLists.txt b/mysql-wsrep-5.6/unittest/gunit/yassl/CMakeLists.txt index fc5464bd..674ede55 100644 --- a/mysql-wsrep-5.6/unittest/gunit/yassl/CMakeLists.txt +++ b/mysql-wsrep-5.6/unittest/gunit/yassl/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -30,3 +30,4 @@ STRING(REGEX REPLACE "-Werror( |$)" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") ADD_EXECUTABLE(yassl-t yassl-t.cc) TARGET_LINK_LIBRARIES(yassl-t gunit_small sqlgunitlib strings dbug regex) TARGET_LINK_LIBRARIES(yassl-t ${LIBSOCKET}) +ADD_TEST(yassl yassl-t) diff --git a/mysql-wsrep-5.6/unittest/mytap/tap.h b/mysql-wsrep-5.6/unittest/mytap/tap.h index 506c4fe0..979479ba 100644 --- a/mysql-wsrep-5.6/unittest/mytap/tap.h +++ b/mysql-wsrep-5.6/unittest/mytap/tap.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -126,7 +126,7 @@ void plan(int const count); */ void ok(int const pass, char const *fmt, ...) - __attribute__((format(printf,2,3))); + MY_ATTRIBUTE((format(printf,2,3))); /** @@ -169,7 +169,7 @@ void ok1(int const pass); */ void skip(int how_many, char const *reason, ...) - __attribute__((format(printf,2,3))); + MY_ATTRIBUTE((format(printf,2,3))); /** @@ -218,7 +218,7 @@ void skip(int how_many, char const *reason, ...) */ void diag(char const *fmt, ...) - __attribute__((format(printf,1,2))); + MY_ATTRIBUTE((format(printf,1,2))); /** @@ -240,7 +240,7 @@ void diag(char const *fmt, ...) */ void BAIL_OUT(char const *fmt, ...) - __attribute__((noreturn, format(printf,1,2))); + MY_ATTRIBUTE((noreturn, format(printf,1,2))); /** @@ -271,7 +271,7 @@ int exit_status(void); */ void skip_all(char const *reason, ...) - __attribute__((noreturn, format(printf, 1, 2))); + MY_ATTRIBUTE((noreturn, format(printf, 1, 2))); /** @@ -296,7 +296,7 @@ void skip_all(char const *reason, ...) */ void todo_start(char const *message, ...) - __attribute__((format(printf, 1, 2))); + MY_ATTRIBUTE((format(printf, 1, 2))); /** diff --git a/mysql-wsrep-5.6/unittest/unit.pl b/mysql-wsrep-5.6/unittest/unit.pl deleted file mode 100644 index 2c9efa32..00000000 --- a/mysql-wsrep-5.6/unittest/unit.pl +++ /dev/null @@ -1,136 +0,0 @@ -#!/usr/bin/perl -# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -use File::Find; -use Getopt::Long; - -use strict; - -sub run_cmd (@); - -my %dispatch = ( - "run" => \&run_cmd, -); - -=head1 NAME - -unit - Run unit tests in directory - -=head1 SYNOPSIS - - unit [--[no]big] [--[no]verbose] run [tests to run] - -=cut - -my $big= $ENV{'MYTAP_CONFIG'} eq 'big'; - -my $opt_verbose; -my $result = GetOptions ( - "big!" => \$big, - "verbose!" => \$opt_verbose, -); - -$ENV{'MYTAP_CONFIG'} = $big ? 'big' : ''; - -my $cmd = shift; - -if (defined $cmd && exists $dispatch{$cmd}) { - $dispatch{$cmd}->(@ARGV); -} else { - print "Unknown command", (defined $cmd ? " $cmd" : ""), ".\n"; - print "Available commands are: ", join(", ", keys %dispatch), "\n"; -} - -=head2 run - -Run all unit tests in the current directory and all subdirectories. - -=cut - -BEGIN { - # Test::Harness have been extensively rewritten in newer perl - # versions and is now just a backward compatibility wrapper - # (with a bug causing the HARNESS_PERL_SWITCHES to be mangled) - # Prefer to use TAP::Harness directly if available - if (eval "use TAP::Harness; 1") { - eval 'sub NEW_HARNESS { 1 }'; - warn "using TAP::Harness"; - } else { - eval "use Test::Harness; 1" or die "couldn't find Test::Harness!"; - eval 'sub NEW_HARNESS { 0 }'; - } -} - -sub _find_test_files (@) { - my @dirs = @_; - my @files; - find sub { - $File::Find::prune = 1 if /^SCCS$/; - $File::Find::prune = 1 if /^.libs$/; - push(@files, $File::Find::name) if -x _ && (/-t\z/ || /-t\.exe\z/); - }, @dirs; - return @files; -} - -sub run_cmd (@) { - my @files; - - # If no directories were supplied, we add all directories in the - # current directory except 'mytap' since it is not part of the - # test suite. - if (@_ == 0) { - # Ignore these directories - my @ignore = qw(mytap SCCS); - - # Build an expression from the directories above that tests if a - # directory should be included in the list or not. - my $ignore = join(' && ', map { '$_ ne ' . "'$_'"} @ignore); - - # Open and read the directory. Filter out all files, hidden - # directories, and directories named above. - opendir(DIR, ".") or die "Cannot open '.': $!\n"; - @_ = grep { -d $_ && $_ !~ /^\..*/ && eval $ignore } readdir(DIR); - closedir(DIR); - } - - print "Running tests: @_\n"; - - foreach my $name (@_) { - push(@files, _find_test_files $name) if -d $name; - push(@files, $name) if -f $name; - } - - if (@files > 0) { - # Removing the first './' from the file names - foreach (@files) { s!^\./!! } - - if (NEW_HARNESS()) - { - my %args = ( exec => [ ], verbosity => $opt_verbose ); - my $harness = TAP::Harness->new( \%args ); - my $aggreg= $harness->runtests(@files); - # Signal failure to calling scripts - exit(1) if $aggreg->get_status() ne 'PASS'; - } - else - { - $ENV{'HARNESS_VERBOSE'} = $opt_verbose; - $ENV{'HARNESS_PERL_SWITCHES'} .= ' -e "exec @ARGV"'; - runtests(@files); - } - } -} - diff --git a/mysql-wsrep-5.6/vio/test-sslclient.c b/mysql-wsrep-5.6/vio/test-sslclient.c index 93fdb063..bb67723c 100644 --- a/mysql-wsrep-5.6/vio/test-sslclient.c +++ b/mysql-wsrep-5.6/vio/test-sslclient.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -40,7 +40,7 @@ fatal_error( const char* r) } int -main( int argc __attribute__((unused)), +main( int argc MY_ATTRIBUTE((unused)), char** argv) { char client_key[] = "../SSL/client-key.pem", client_cert[] = "../SSL/client-cert.pem"; diff --git a/mysql-wsrep-5.6/vio/test-sslserver.c b/mysql-wsrep-5.6/vio/test-sslserver.c index c81dc03d..62e4e4c3 100644 --- a/mysql-wsrep-5.6/vio/test-sslserver.c +++ b/mysql-wsrep-5.6/vio/test-sslserver.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -75,7 +75,7 @@ client_thread( void* arg) } int -main(int argc __attribute__((unused)), char** argv) +main(int argc MY_ATTRIBUTE((unused)), char** argv) { char server_key[] = "../SSL/server-key.pem", server_cert[] = "../SSL/server-cert.pem"; diff --git a/mysql-wsrep-5.6/vio/vio.c b/mysql-wsrep-5.6/vio/vio.c index 206d94e9..1381b30b 100644 --- a/mysql-wsrep-5.6/vio/vio.c +++ b/mysql-wsrep-5.6/vio/vio.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -37,16 +37,16 @@ @retval 1 The requested I/O event has occurred. */ -static int no_io_wait(Vio *vio __attribute__((unused)), - enum enum_vio_io_event event __attribute__((unused)), - int timeout __attribute__((unused))) +static int no_io_wait(Vio *vio MY_ATTRIBUTE((unused)), + enum enum_vio_io_event event MY_ATTRIBUTE((unused)), + int timeout MY_ATTRIBUTE((unused))) { return 1; } #endif -static my_bool has_no_data(Vio *vio __attribute__((unused))) +static my_bool has_no_data(Vio *vio MY_ATTRIBUTE((unused))) { return FALSE; } @@ -177,7 +177,7 @@ static void vio_init(Vio *vio, enum enum_vio_type type, */ my_bool vio_reset(Vio* vio, enum enum_vio_type type, - my_socket sd, void *ssl __attribute__((unused)), uint flags) + my_socket sd, void *ssl MY_ATTRIBUTE((unused)), uint flags) { int ret= FALSE; Vio new_vio; diff --git a/mysql-wsrep-5.6/vio/viosocket.c b/mysql-wsrep-5.6/vio/viosocket.c index 744a8fe3..48998fab 100644 --- a/mysql-wsrep-5.6/vio/viosocket.c +++ b/mysql-wsrep-5.6/vio/viosocket.c @@ -1,5 +1,5 @@ /* - Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -29,7 +29,7 @@ # include #endif -int vio_errno(Vio *vio __attribute__((unused))) +int vio_errno(Vio *vio MY_ATTRIBUTE((unused))) { /* These transport types are not Winsock based. */ #ifdef _WIN32 @@ -247,8 +247,8 @@ static int vio_set_blocking(Vio *vio, my_bool status) int vio_socket_timeout(Vio *vio, - uint which __attribute__((unused)), - my_bool old_mode __attribute__((unused))) + uint which MY_ATTRIBUTE((unused)), + my_bool old_mode MY_ATTRIBUTE((unused))) { int ret= 0; DBUG_ENTER("vio_socket_timeout"); @@ -314,7 +314,7 @@ int vio_socket_timeout(Vio *vio, } -int vio_fastsend(Vio * vio __attribute__((unused))) +int vio_fastsend(Vio * vio MY_ATTRIBUTE((unused))) { int r=0; DBUG_ENTER("vio_fastsend"); @@ -735,7 +735,7 @@ static my_bool socket_peek_read(Vio *vio, uint *bytes) int vio_io_wait(Vio *vio, enum enum_vio_io_event event, int timeout) { int ret; - short revents __attribute__((unused)) = 0; + short revents MY_ATTRIBUTE((unused)) = 0; struct pollfd pfd; my_socket sd= mysql_socket_getfd(vio->mysql_socket); MYSQL_SOCKET_WAIT_VARIABLES(locker, state) /* no ';' */ diff --git a/mysql-wsrep-5.6/vio/viosslfactories.c b/mysql-wsrep-5.6/vio/viosslfactories.c index aef87003..46087f47 100644 --- a/mysql-wsrep-5.6/vio/viosslfactories.c +++ b/mysql-wsrep-5.6/vio/viosslfactories.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -253,7 +253,7 @@ new_VioSSLFd(const char *key_file, const char *cert_file, } /* Load certs from the trusted ca */ - if (SSL_CTX_load_verify_locations(ssl_fd->ssl_context, ca_file, ca_path) == 0) + if (SSL_CTX_load_verify_locations(ssl_fd->ssl_context, ca_file, ca_path) <= 0) { DBUG_PRINT("warning", ("SSL_CTX_load_verify_locations failed")); if (ca_file || ca_path) diff --git a/mysql-wsrep-5.6/wsrep/wsrep_dummy.c b/mysql-wsrep-5.6/wsrep/wsrep_dummy.c index bab5329d..5f1ea63c 100644 --- a/mysql-wsrep-5.6/wsrep/wsrep_dummy.c +++ b/mysql-wsrep-5.6/wsrep/wsrep_dummy.c @@ -86,7 +86,7 @@ static wsrep_status_t dummy_options_set( static char* dummy_options_get (wsrep_t* w) { WSREP_DBUG_ENTER(w); - return WSREP_DUMMY(w)->options; + return strdup(WSREP_DUMMY(w)->options); } static wsrep_status_t dummy_connect( diff --git a/mysql-wsrep-5.6/wsrep/wsrep_loader.c b/mysql-wsrep-5.6/wsrep/wsrep_loader.c index c330c777..904f9a1c 100644 --- a/mysql-wsrep-5.6/wsrep/wsrep_loader.c +++ b/mysql-wsrep-5.6/wsrep/wsrep_loader.c @@ -37,6 +37,22 @@ static wsrep_log_cb_t logger = default_logger; * Library loader **************************************************************************/ +static int wsrep_check_iface_version(const char* found, const char* iface_ver) +{ + const size_t msg_len = 128; + char msg[128]; + + if (strcmp(found, iface_ver)) { + snprintf (msg, msg_len, + "provider interface version mismatch: need '%s', found '%s'", + iface_ver, found); + logger (WSREP_LOG_ERROR, msg); + return EINVAL; + } + + return 0; +} + static int verify(const wsrep_t *wh, const char *iface_ver) { const size_t msg_len = 128; @@ -51,13 +67,8 @@ static int verify(const wsrep_t *wh, const char *iface_ver) VERIFY(wh); VERIFY(wh->version); - if (strcmp(wh->version, iface_ver)) { - snprintf (msg, msg_len, - "provider interface version mismatch: need '%s', found '%s'", - iface_ver, wh->version); - logger (WSREP_LOG_ERROR, msg); + if (wsrep_check_iface_version(wh->version, iface_ver)) return EINVAL; - } VERIFY(wh->init); VERIFY(wh->options_set); @@ -108,6 +119,15 @@ static wsrep_loader_fun wsrep_dlf(void *dlh, const char *sym) return alias.dlfun; } +static int wsrep_check_version_symbol(void *dlh) +{ + char** dlversion = NULL; + dlversion = (char**) dlsym(dlh, "wsrep_interface_version"); + if (dlversion == NULL) + return 0; + return wsrep_check_iface_version(*dlversion, WSREP_INTERFACE_VERSION); +} + extern int wsrep_dummy_loader(wsrep_t *w); int wsrep_load(const char *spec, wsrep_t **hptr, wsrep_log_cb_t log_cb) @@ -154,6 +174,11 @@ int wsrep_load(const char *spec, wsrep_t **hptr, wsrep_log_cb_t log_cb) goto out; } + if (wsrep_check_version_symbol(dlh) != 0) { + ret = EINVAL; + goto out; + } + if ((ret = (*dlfun)(*hptr)) != 0) { snprintf(msg, msg_len, "wsrep_load(): loader failed: %s", strerror(ret)); -- 2.45.2