[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@3.140.195.205: ~ $
# Test replication, when using special non-replicated tables.
#
# This test involve special statements that use non-replicated tables.
# Changes affecting non replicated tables are never written to the binlog.
# Executing these statements may or may not work, as the statements involved
# are edge cases.
# In MIXED or ROW binlog format, execution should succeed,
# and only partial data (the rows affecting replicated tables only)
# should be written to the binlog.
# In STATEMENT binlog format, execution should
# raise a warning (ER_BINLOG_UNSAFE_STATEMENT) if a non replicated table is
# only read from, or fail with an error (ER_BINLOG_STMT_MODE_AND_NO_REPL_TABLES)
# if a non replicated table is written to.
#
# SHOW ERRORS will print in the
# test .result file the exact outcome.

RESET MASTER;

--disable_warnings
drop database if exists my_replicated_db;
--enable_warnings

call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");

create database my_replicated_db;

create table my_replicated_db.my_tx_table(a bigint) engine = innodb;
create table my_replicated_db.my_non_tx_table(a bigint) engine = myisam;
create table my_replicated_db.my_bh_table(a bigint) engine = blackhole;

use test;
drop table if exists marker_start;

use my_replicated_db;

insert into my_tx_table(a)
  values (1000), (2000), (3000);

insert into my_non_tx_table(a)
  values (1000), (2000), (3000);

insert into my_bh_table(a)
  values (1000), (2000), (3000);

use test;
drop table if exists marker_insert_select;

use my_replicated_db;

# Note:
# The queries used here do not make any sense (no semantic).
# What this test is interrested in, is check the behavior
# when replicating queries that mix both:
# - non replicated tables
# - replicated tables

insert into my_tx_table(a)
  select thread_id from performance_schema.threads;

insert into my_non_tx_table(a)
  select thread_id from performance_schema.threads;

insert into my_bh_table(a)
  select thread_id from performance_schema.threads;

# For the information_schema,
# no error is enforced yet.
# Documenting the current behavior

insert into my_tx_table(a)
  select id from information_schema.processlist;

insert into my_non_tx_table(a)
  select id from information_schema.processlist;

insert into my_bh_table(a)
  select id from information_schema.processlist;

insert into my_tx_table(a)
  select thread_id from mysql.general_log;

insert into my_non_tx_table(a)
  select thread_id from mysql.general_log;

insert into my_bh_table(a)
  select thread_id from mysql.general_log;

insert into my_tx_table(a)
  select thread_id from mysql.slow_log;

insert into my_non_tx_table(a)
  select thread_id from mysql.slow_log;

insert into my_bh_table(a)
  select thread_id from mysql.slow_log;

insert into my_tx_table(a)
  select Relay_log_pos from mysql.slave_relay_log_info;

insert into my_non_tx_table(a)
  select Relay_log_pos from mysql.slave_relay_log_info;

insert into my_bh_table(a)
  select Relay_log_pos from mysql.slave_relay_log_info;

insert into my_tx_table(a)
  select Master_log_pos from mysql.slave_master_info;

insert into my_non_tx_table(a)
  select Master_log_pos from mysql.slave_master_info;

insert into my_bh_table(a)
  select Master_log_pos from mysql.slave_master_info;

insert into my_tx_table(a)
  select Relay_log_pos from mysql.slave_worker_info;

insert into my_non_tx_table(a)
  select Relay_log_pos from mysql.slave_worker_info;

insert into my_bh_table(a)
  select Relay_log_pos from mysql.slave_worker_info;

use test;
drop table if exists marker_multi_update;

use my_replicated_db;

--error 0, ER_BINLOG_STMT_MODE_AND_NO_REPL_TABLES
update my_tx_table, performance_schema.setup_instruments
  set my_tx_table.a = my_tx_table.a + 1,
  performance_schema.setup_instruments.timed= 'NO';

--error 0, ER_BINLOG_STMT_MODE_AND_NO_REPL_TABLES
update my_non_tx_table, performance_schema.setup_instruments
  set my_non_tx_table.a = my_non_tx_table.a + 1,
  performance_schema.setup_instruments.timed= 'NO';

--error 0, ER_BINLOG_STMT_MODE_AND_NO_REPL_TABLES
update my_bh_table, performance_schema.setup_instruments
  set my_bh_table.a = my_bh_table.a + 1,
  performance_schema.setup_instruments.timed= 'NO';

use test;
drop table if exists marker_multi_delete;

use my_replicated_db;

insert into performance_schema.setup_actors
  values ('FOO', 'FOO', 'FOO');

--error 0, ER_BINLOG_STMT_MODE_AND_NO_REPL_TABLES
delete my_tx_table.*, performance_schema.setup_actors.*
  from my_tx_table, performance_schema.setup_actors
  where my_tx_table.a != 1000
  or performance_schema.setup_actors.role='FOO';

insert into performance_schema.setup_actors
  values ('BAR', 'BAR', 'BAR');

--error 0, ER_BINLOG_STMT_MODE_AND_NO_REPL_TABLES
delete my_non_tx_table.*, performance_schema.setup_actors.*
  from my_non_tx_table, performance_schema.setup_actors
  where my_non_tx_table.a != 1000
  or performance_schema.setup_actors.role='BAR';

insert into performance_schema.setup_actors
  values ('BAZ', 'BAZ', 'BAZ');

--error 0, ER_BINLOG_STMT_MODE_AND_NO_REPL_TABLES
delete my_bh_table.*, performance_schema.setup_actors.*
  from my_bh_table, performance_schema.setup_actors
  where my_bh_table.a != 1000
  or performance_schema.setup_actors.role='BAZ';

use test;
drop table if exists marker_end;

drop database my_replicated_db;

--source include/show_binlog_events.inc

# Restore performance_schema.setup_actors, damaged by this script

truncate table performance_schema.setup_actors;
insert into performance_schema.setup_actors values ('%', '%', '%');


Filemanager

Name Type Size Permission Actions
binlog_edge_common.inc File 5.46 KB 0644
binlog_ok_common.inc File 3.9 KB 0644
cleanup_helper.inc File 356 B 0644
connection_cleanup.inc File 794 B 0644
connection_load.inc File 6.1 KB 0644
connection_setup.inc File 3.01 KB 0644
digest_cleanup.inc File 387 B 0644
digest_execution.inc File 3.96 KB 0644
digest_setup.inc File 618 B 0644
disable_instruments.inc File 548 B 0644
enable_instruments.inc File 549 B 0644
event_aggregate_cleanup.inc File 1.62 KB 0644
event_aggregate_load.inc File 24.49 KB 0644
event_aggregate_setup.inc File 13.05 KB 0644
have_aligned_memory.inc File 548 B 0644
hostcache_dump.inc File 1.13 KB 0644
hostcache_set_state.inc File 651 B 0644
privilege.inc File 4.91 KB 0644
rpl_statements_truncate.inc File 683 B 0644
schema.inc File 2.54 KB 0644
setup_helper.inc File 1.1 KB 0644
sizing_auto.inc File 958 B 0644
socket_check1.inc File 4.63 KB 0644
socket_event.inc File 6.94 KB 0644
socket_event_dbg.inc File 2.95 KB 0644
socket_ipv6.inc File 2.98 KB 0644
socket_summary_check.inc File 8.18 KB 0644
socket_summary_check_dbg.inc File 8.37 KB 0644
stage_cleanup.inc File 915 B 0644
stage_setup.inc File 3.86 KB 0644
start_server_common.inc File 4.29 KB 0644
table_aggregate_cleanup.inc File 1.52 KB 0644
table_aggregate_load.inc File 13.96 KB 0644
table_aggregate_setup.inc File 8.82 KB 0644
table_io_basic_dml.inc File 1.1 KB 0644
table_io_cleanup_helper.inc File 336 B 0644
table_io_result_helper.inc File 702 B 0644
table_io_setup_helper.inc File 1.76 KB 0644
upgrade_check.inc File 435 B 0644
wait_for_pfs_thread_count.inc File 710 B 0644
wait_till_sleep.inc File 590 B 0644