mariadb/mysql-test/suite/rpl/t
unknown 06c49d571b Bug#27606 GRANT statement should be replicated with DEFINER information
"Grantor" columns' data is lost when replicating mysql.tables_priv.
Slave SQL thread used its default user ''@'' as the grantor of GRANT|REVOKE
statements executing on it.

In this patch, current user is put in query log event for all GRANT and REVOKE
statement, SQL thread uses the user in query log event as grantor.


mysql-test/suite/rpl/r/rpl_do_grant.result:
  Add test for this bug.
mysql-test/suite/rpl/t/rpl_do_grant.test:
  Add test for this bug.
sql/log_event.cc:
  Refactoring THD::current_user_used and related functions.
  current_user_used is used to judge if current user should be
  binlogged in query log event. So it is better to call it m_binlog_invoker.
  The related functions are renamed too.
sql/sql_class.cc:
  Refactoring THD::current_user_used and related functions.
  current_user_used is used to judge if current user should be
  binlogged in query log event. So it is better to call it m_binlog_invoker.
  The related functions are renamed too.
sql/sql_class.h:
  Refactoring THD::current_user_used and related functions.
  current_user_used is used to judge if current user should be
  binlogged in query log event. So it is better to call it m_binlog_invoker.
  The related functions are renamed too.
sql/sql_parse.cc:
  Call binlog_invoker() for GRANT and REVOKE statements.
2010-10-23 20:55:44 +08:00
..
disabled.def BUG#55675 rpl.rpl_log_pos fails sporadically with error binlog truncated in the middle 2010-09-10 11:49:57 +01:00
rpl000010-slave.opt
rpl000010.test
rpl000011.test
rpl000013.test
rpl000017-slave.opt
rpl000017-slave.sh
rpl000017.test
rpl_alter.test Bug#56226 Table map set to 0 after altering MyISAM table 2010-10-11 11:08:49 +08:00
rpl_alter_db.test
rpl_auto_increment-master.opt
rpl_auto_increment.test
rpl_auto_increment_11932.test
rpl_auto_increment_update_failure.test
rpl_begin_commit_rollback-master.opt Bug #50407 mysqlbinlog --database=X produces bad output for SAVEPOINTs 2010-03-28 19:57:33 +08:00
rpl_begin_commit_rollback-slave.opt
rpl_begin_commit_rollback.test Bug #50407 mysqlbinlog --database=X produces bad output for SAVEPOINTs 2010-03-28 19:57:33 +08:00
rpl_binlog_corruption-master.opt
rpl_binlog_corruption.test
rpl_binlog_grant.test Bug #49741 test files contain explicit references to bin/relay-log positions 2010-05-24 21:54:08 +08:00
rpl_binlog_max_cache_size.test Bug#55375 Transaction bigger than max_binlog_cache_size crashes slave 2010-10-09 15:05:43 +08:00
rpl_binlog_query_filter_rules-master.opt
rpl_binlog_query_filter_rules.test
rpl_bit.test
rpl_bit_npk.test
rpl_blackhole.test
rpl_bug26395.test
rpl_bug31076.test
rpl_bug33931.test Bug #49741 test files contain explicit references to bin/relay-log positions 2010-05-24 21:54:08 +08:00
rpl_bug38694-slave.opt
rpl_bug38694.test
rpl_change_master.test Bug #49741 test files contain explicit references to bin/relay-log positions 2010-05-24 21:54:08 +08:00
rpl_charset.test
rpl_charset_sjis.test
rpl_circular_for_4_hosts.cnf
rpl_circular_for_4_hosts.test Bug #46827 rpl_circular_for_4_hosts failed on PB2 2009-12-16 12:41:15 +08:00
rpl_colSize.test
rpl_commit_after_flush.test
rpl_concurrency_error-master.opt
rpl_concurrency_error.test
rpl_conditional_comments.test BUG#49124 Security issue with /*!-versioned */ SQL statements on Slave 2010-07-29 11:00:57 +08:00
rpl_create_database-master.opt
rpl_create_database-slave.opt
rpl_create_database.test
rpl_create_if_not_exists.test WL#5370 Keep forward-compatibility when changing 2010-08-18 12:56:06 +08:00
rpl_create_tmp_table_if_not_exists.test
rpl_critical_errors.test Bug #49741 test files contain explicit references to bin/relay-log positions 2010-05-24 21:54:08 +08:00
rpl_cross_version-master.opt
rpl_cross_version.test
rpl_current_user.cnf The following statements support the CURRENT_USER() where a user is needed. 2010-07-04 12:02:49 +08:00
rpl_current_user.test The following statements support the CURRENT_USER() where a user is needed. 2010-07-04 12:02:49 +08:00
rpl_ddl.test
rpl_deadlock_innodb-slave.opt
rpl_deadlock_innodb.test
rpl_delete_no_where.test
rpl_do_grant.test Bug#27606 GRANT statement should be replicated with DEFINER information 2010-10-23 20:55:44 +08:00
rpl_drop.test BUG#55625 RBR breaks on failing 'CREATE TABLE' 2010-08-02 20:48:56 +01:00
rpl_drop_db.test
rpl_drop_if_exists.test
rpl_drop_temp-slave.opt
rpl_drop_temp.test Bug #49137 Replication failure on SBR/MBR + multi-table DROP TEMPORARY TABLE 2009-12-31 12:04:19 +08:00
rpl_drop_view.test
rpl_dual_pos_advance-master.opt
rpl_dual_pos_advance.test Bug #49741 test files contain explicit references to bin/relay-log positions 2010-05-24 21:54:08 +08:00
rpl_EE_err.test
rpl_empty_master_crash-master.opt
rpl_empty_master_crash.test Bug #49741 test files contain explicit references to bin/relay-log positions 2010-05-24 21:54:08 +08:00
rpl_err_ignoredtable-slave.opt
rpl_err_ignoredtable.test
rpl_events.test Bug #50095 Multi statement including CREATE EVENT causes rotten binlog entry 2010-03-28 16:37:47 +08:00
rpl_extraCol_innodb.test
rpl_extraCol_myisam.test
rpl_extraColmaster_innodb.test
rpl_extraColmaster_myisam.test
rpl_failed_optimize-master.opt
rpl_failed_optimize.test
rpl_filter_tables_not_exist-slave.opt
rpl_filter_tables_not_exist.test Bug #49741 test files contain explicit references to bin/relay-log positions 2010-05-24 21:54:08 +08:00
rpl_flushlog_loop-master.opt
rpl_flushlog_loop-master.sh
rpl_flushlog_loop-slave.opt
rpl_flushlog_loop-slave.sh
rpl_flushlog_loop.test Bug #49741 test files contain explicit references to bin/relay-log positions 2010-05-24 21:54:08 +08:00
rpl_foreign_key_innodb.test
rpl_found_rows.test
rpl_free_items-slave.opt
rpl_free_items.test
rpl_geometry.test Bug#48776 row based replication breaks with spatial / geometry types, cause crashes! 2010-01-05 14:25:29 +08:00
rpl_get_lock.test
rpl_get_master_version_and_clock-slave.opt
rpl_get_master_version_and_clock.test Bug #49741 test files contain explicit references to bin/relay-log positions 2010-05-24 21:54:08 +08:00
rpl_grant.test Bug #49741 test files contain explicit references to bin/relay-log positions 2010-05-24 21:54:08 +08:00
rpl_idempotency-slave.opt
rpl_idempotency.test
rpl_ignore_grant-slave.opt
rpl_ignore_grant.test
rpl_ignore_revoke-slave.opt
rpl_ignore_revoke.test
rpl_ignore_table-slave.opt
rpl_ignore_table.test
rpl_ignore_table_update-slave.opt
rpl_ignore_table_update.test
rpl_incident-master.opt
rpl_incident.test Bug #49741 test files contain explicit references to bin/relay-log positions 2010-05-24 21:54:08 +08:00
rpl_init_slave-slave.opt
rpl_init_slave.test
rpl_init_slave_errors.test
rpl_innodb-master.opt
rpl_innodb.test
rpl_innodb_bug28430-master.opt
rpl_innodb_bug28430-slave.opt
rpl_innodb_bug28430.test
rpl_innodb_bug30888.test
rpl_innodb_mixed_ddl.test
rpl_innodb_mixed_dml.test
rpl_insert.test
rpl_insert_id.test
rpl_insert_id_pk.test
rpl_insert_ignore.test
rpl_insert_select.test
rpl_invoked_features.test
rpl_killed_ddl-master.opt
rpl_killed_ddl.test Bug#47638 The rpl_killed_ddl test fails on Windows 2009-12-21 14:14:45 +08:00
rpl_known_bugs_detection-master.opt
rpl_known_bugs_detection.test Bug #49741 test files contain explicit references to bin/relay-log positions 2010-05-24 21:54:08 +08:00
rpl_LD_INFILE.test
rpl_load_from_master-slave.opt
rpl_load_from_master.test
rpl_load_table_from_master.test
rpl_loaddata.test
rpl_loaddata_charset.test
rpl_loaddata_concurrent.test Postfix 2009-12-16 12:25:46 +08:00
rpl_loaddata_fatal-slave.opt
rpl_loaddata_fatal.test Bug #34283 mysqlbinlog leaves tmpfile after termination if binlog contains load data infile 2010-08-03 10:22:19 +08:00
rpl_loaddata_m-master.opt
rpl_loaddata_m.test
rpl_loaddata_map-master.opt
rpl_loaddata_map-slave.opt
rpl_loaddata_map.test Bug #34283 mysqlbinlog leaves tmpfile after termination if binlog contains load data infile 2010-08-03 10:22:19 +08:00
rpl_loaddata_s-slave.opt
rpl_loaddata_s.test
rpl_loaddata_simple.test
rpl_loaddata_symlink-master.opt Bug #43913 rpl_cross_version can't pass on conflicts complainig clash with --slave-load-tm 2009-11-28 12:43:16 +08:00
rpl_loaddata_symlink-master.sh Bug #43913 rpl_cross_version can't pass on conflicts complainig clash with --slave-load-tm 2009-11-28 12:43:16 +08:00
rpl_loaddata_symlink-slave.opt Bug #43913 rpl_cross_version can't pass on conflicts complainig clash with --slave-load-tm 2009-11-28 12:43:16 +08:00
rpl_loaddata_symlink-slave.sh Bug #43913 rpl_cross_version can't pass on conflicts complainig clash with --slave-load-tm 2009-11-28 12:43:16 +08:00
rpl_loaddata_symlink.test Bug #50061 Test "rpl_loaddata_symlink" uses a Unix-specific "run-slave" script 2010-02-05 14:49:01 +08:00
rpl_loaddatalocal.test
rpl_loadfile.test
rpl_locale.test
rpl_log_pos.test Bug #49741 test files contain explicit references to bin/relay-log positions 2010-05-24 21:54:08 +08:00
rpl_manual_change_index_file.test Postfix 2010-01-08 23:32:40 +08:00
rpl_many_optimize.test
rpl_master_pos_wait.test
rpl_misc_functions-slave.sh
rpl_misc_functions.test BUG#49222: Mark RAND() as unsafe 2010-01-13 10:00:03 +01:00
rpl_mixed_bit_pk.test
rpl_mixed_ddl_dml.test
rpl_multi_delete-slave.opt
rpl_multi_delete.test
rpl_multi_delete2-slave.opt
rpl_multi_delete2.test
rpl_multi_engine.test
rpl_multi_update.test
rpl_multi_update2-slave.opt
rpl_multi_update2.test
rpl_multi_update3.test
rpl_multi_update4-slave.opt
rpl_multi_update4.test
rpl_mysql_upgrade.test
rpl_name_const.test
rpl_nondeterministic_functions.test BUG#49222: Mark RAND() as unsafe 2010-01-13 10:00:03 +01:00
rpl_not_null_innodb.test
rpl_not_null_myisam.test
rpl_optimize.test BUG#49222: Mark RAND() as unsafe 2010-01-13 10:00:03 +01:00
rpl_packet-master.opt
rpl_packet-slave.opt
rpl_packet.test BUG#55322: SHOW BINLOG EVENTS increases @@SESSION.MAX_ALLOWED_PACKET 2010-07-20 17:27:13 +02:00
rpl_plugin_load-master.opt
rpl_plugin_load-slave.opt
rpl_plugin_load.test
rpl_ps.test
rpl_rbr_to_sbr.test Bug #49741 test files contain explicit references to bin/relay-log positions 2010-05-24 21:54:08 +08:00
rpl_read_only.test
rpl_relay_space_innodb.test
rpl_relay_space_myisam.test
rpl_relayrotate-slave.opt
rpl_relayrotate.test
rpl_relayspace-slave.opt
rpl_relayspace.test
rpl_replicate_do-slave.opt
rpl_replicate_do.test Bug #49741 test files contain explicit references to bin/relay-log positions 2010-05-24 21:54:08 +08:00
rpl_replicate_ignore_db-slave.opt
rpl_replicate_ignore_db.test
rpl_report-slave.opt
rpl_report.test
rpl_rewrt_db-slave.opt
rpl_rewrt_db.test
rpl_rotate_logs-slave.opt
rpl_rotate_logs-slave.sh
rpl_rotate_logs.cnf
rpl_rotate_logs.test Bug #49741 test files contain explicit references to bin/relay-log positions 2010-05-24 21:54:08 +08:00
rpl_row_001.test
rpl_row_4_bytes-master.opt
rpl_row_4_bytes.test
rpl_row_basic_2myisam.test
rpl_row_basic_3innodb.test
rpl_row_basic_8partition.test
rpl_row_basic_11bugs-master.opt
rpl_row_basic_11bugs.test Bug #49741 test files contain explicit references to bin/relay-log positions 2010-05-24 21:54:08 +08:00
rpl_row_blob_innodb.test
rpl_row_blob_myisam.test
rpl_row_colSize.test
rpl_row_conflicts.test
rpl_row_create_table.test WL#5370 Keep forward-compatibility when changing 2010-08-18 12:56:06 +08:00
rpl_row_delayed_ins.test
rpl_row_drop.test Bug #49741 test files contain explicit references to bin/relay-log positions 2010-05-24 21:54:08 +08:00
rpl_row_err_daisychain-master.opt
rpl_row_err_daisychain-slave.opt
rpl_row_find_row.test BUG#53893: RBR: nullable unique key can lead to out-of-sync slave 2010-06-02 23:26:12 +01:00
rpl_row_flsh_tbls.test
rpl_row_func001.test
rpl_row_func002.test
rpl_row_func003.test
rpl_row_inexist_tbl.test
rpl_row_insert_delayed.test
rpl_row_log-master.opt
rpl_row_log-slave.opt
rpl_row_log.test
rpl_row_log_innodb-master.opt
rpl_row_log_innodb.test
rpl_row_max_relay_size.test
rpl_row_mysqlbinlog-master.opt
rpl_row_mysqlbinlog.test
rpl_row_NOW.test
rpl_row_rec_comp_innodb.test BUG#52868: Wrong handling of NULL value during update, replication out 2010-04-21 13:47:55 +01:00
rpl_row_rec_comp_myisam.test BUG#52868: Wrong handling of NULL value during update, replication out 2010-04-21 13:47:55 +01:00
rpl_row_reset_slave.test
rpl_row_sp001.test
rpl_row_sp002_innodb.test
rpl_row_sp003.test
rpl_row_sp005.test
rpl_row_sp006_InnoDB.test
rpl_row_sp007_innodb.test
rpl_row_sp008.test
rpl_row_sp009.test
rpl_row_sp010.test
rpl_row_sp011.test
rpl_row_sp012.test
rpl_row_stop_middle_update-master.opt
rpl_row_stop_middle_update-slave.opt
rpl_row_stop_middle_update.test
rpl_row_tabledefs_2myisam.test
rpl_row_tabledefs_3innodb.test
rpl_row_tbl_metadata.test Bug #56753 mtr silently ignores junk after backticks 2010-09-15 14:56:22 +02:00
rpl_row_trig001.test
rpl_row_trig002.test
rpl_row_trig003.test
rpl_row_trig004.test
rpl_row_trunc_temp.test
rpl_row_unsafe_funcs.test
rpl_row_until.test Bug #49741 test files contain explicit references to bin/relay-log positions 2010-05-24 21:54:08 +08:00
rpl_row_USER.test
rpl_row_UUID.test
rpl_row_view01.test
rpl_row_wide_table.test
rpl_server_id.test
rpl_server_id1.test
rpl_server_id2-slave.opt
rpl_server_id2.test
rpl_session_var.test
rpl_set_charset.test
rpl_set_null_innodb.test BUG#49481: RBR: MyISAM and bit fields may cause slave to stop on delete: 2010-01-21 17:20:24 +00:00
rpl_set_null_myisam.test BUG#49481: RBR: MyISAM and bit fields may cause slave to stop on delete: 2010-01-21 17:20:24 +00:00
rpl_sf.test
rpl_show_slave_running.test bug#51648 2010-03-22 07:50:19 +02:00
rpl_skip_error-slave.opt
rpl_skip_error.test Bug #49741 test files contain explicit references to bin/relay-log positions 2010-05-24 21:54:08 +08:00
rpl_slave_grp_exec.test
rpl_slave_load_in.test
rpl_slave_load_remove_tmpfile-slave.opt
rpl_slave_load_remove_tmpfile.test Bug #34283 mysqlbinlog leaves tmpfile after termination if binlog contains load data infile 2010-08-03 10:22:19 +08:00
rpl_slave_load_tmpdir_not_exist-slave.opt
rpl_slave_load_tmpdir_not_exist.test
rpl_slave_skip.test Bug #49741 test files contain explicit references to bin/relay-log positions 2010-05-24 21:54:08 +08:00
rpl_slave_status.test
rpl_slow_query_log-slave.opt BUG#48632: Fix for Bug #23300 Has Not Been Backported 2010-02-05 17:01:09 +00:00
rpl_slow_query_log.test BUG#50620: Adding an index to a table prevents slave from logging 2010-02-05 17:48:01 +00:00
rpl_sp-master.opt
rpl_sp-slave.opt
rpl_sp.test Bug #49741 test files contain explicit references to bin/relay-log positions 2010-05-24 21:54:08 +08:00
rpl_sp004.test
rpl_sp_effects-master.opt
rpl_sp_effects-slave.opt
rpl_sp_effects.test
rpl_sporadic_master-master.opt
rpl_sporadic_master.test
rpl_ssl.test Bug #49741 test files contain explicit references to bin/relay-log positions 2010-05-24 21:54:08 +08:00
rpl_ssl1.test Bug #49741 test files contain explicit references to bin/relay-log positions 2010-05-24 21:54:08 +08:00
rpl_start_stop_slave-slave.opt
rpl_start_stop_slave.test
rpl_stm_000001.test
rpl_stm_auto_increment_bug33029.test
rpl_stm_binlog_direct-master.opt BUG#46364 MyISAM transbuffer problems (NTM problem) 2010-01-20 19:08:16 +00:00
rpl_stm_binlog_direct.test BUG#46364 MyISAM transbuffer problems (NTM problem) 2010-01-20 19:08:16 +00:00
rpl_stm_conflicts.test
rpl_stm_create_if_not_exists.test WL#5370 Keep forward-compatibility when changing 2010-08-18 12:56:06 +08:00
rpl_stm_EE_err2.test
rpl_stm_flsh_tbls.test
rpl_stm_insert_delayed.test
rpl_stm_loadfile.test
rpl_stm_log-master.opt
rpl_stm_log-slave.opt
rpl_stm_log.test Bug #34283 mysqlbinlog leaves tmpfile after termination if binlog contains load data infile 2010-08-03 10:22:19 +08:00
rpl_stm_max_relay_size.test
rpl_stm_mixing_engines.test BUG#49522: Replication problem with mixed MyISAM/InnoDB 2010-05-07 18:48:35 +01:00
rpl_stm_multi_query.test
rpl_stm_no_op.test
rpl_stm_reset_slave.test
rpl_stm_sql_mode.test BUG#51055: Replication failure on duplicate key + traditional SQL 2010-03-04 10:18:06 +00:00
rpl_stm_until.test Bug #49741 test files contain explicit references to bin/relay-log positions 2010-05-24 21:54:08 +08:00
rpl_stop_slave.test Bug#56118 STOP SLAVE does not wait till trx with CREATE TMP TABLE ends, 2010-10-16 20:03:44 +08:00
rpl_switch_stm_row_mixed.test
rpl_temp_table.test
rpl_temp_table_mix_row.test Bug#55478 Row events wrongly apply on the temporary table of the same name 2010-10-21 13:43:19 +08:00
rpl_temporary.test merge from 5.0 with bug@49740 fixes 2009-12-17 16:50:45 +02:00
rpl_temporary_errors-slave.opt
rpl_temporary_errors.test merge mysql-5.1-bugteam (local) --> mysql-5.1-bugteam 2010-06-17 01:25:07 +01:00
rpl_timezone-master.opt
rpl_timezone-slave.opt
rpl_timezone.test Bug#47017 rpl_timezone fails on PB-2 with mismatch error 2009-12-16 20:53:56 +01:00
rpl_tmp_table_and_DDL.test BUG#53621: check_testcase fails for rpl_do_grant in mysql-5.1-bugteam 2010-05-13 16:40:31 +01:00
rpl_trigger.test BUG#49222: Mark RAND() as unsafe 2010-01-13 10:00:03 +01:00
rpl_trunc_temp.test
rpl_truncate_2myisam.test
rpl_truncate_3innodb.test
rpl_typeconv-slave.opt BUG#49618: Field length stored incorrectly in binary log 2010-03-17 15:28:49 +01:00
rpl_typeconv_innodb.test BUG#49618: Field length stored incorrectly in binary log 2010-03-17 15:28:49 +01:00
rpl_udf-master.opt
rpl_udf-slave.opt
rpl_udf.test
rpl_user.test Revert a patch for Bug#48231, which introduced valgrind warnings. 2010-02-02 16:38:44 +03:00
rpl_user_variables.test
rpl_variables.test
rpl_variables_stm.test
rpl_view.test