| 1 |
# This test verifies that the channel service interface cannot be used when: |
| 2 |
# 1) The server is configured with a server id = 0 |
| 3 |
# 2) The relay log info repository is set to FILE |
| 4 |
# 3) The master info repository is set to FILE |
| 5 |
|
| 6 |
--source include/have_debug.inc |
| 7 |
--source include/have_binlog_format_mixed.inc |
| 8 |
--source include/have_replication_observers_example_plugin.inc |
| 9 |
|
| 10 |
--disable_warnings ER_WARN_DEPRECATED_SYNTAX ONCE |
| 11 |
SET @saved_master_info_repository = @@GLOBAL.master_info_repository; |
| 12 |
--disable_warnings ER_WARN_DEPRECATED_SYNTAX ONCE |
| 13 |
SET @saved_relay_log_info_repository = @@GLOBAL.relay_log_info_repository; |
| 14 |
# Install the replication observers example plugin |
| 15 |
|
| 16 |
--source include/install_replication_observers_example.inc |
| 17 |
|
| 18 |
CALL mtr.add_suppression('For the creation of replication channels the server *'); |
| 19 |
CALL mtr.add_suppression('For the creation of replication channels the connection metadata *'); |
| 20 |
|
| 21 |
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB; |
| 22 |
|
| 23 |
SET @original_slave_server_id= @@GLOBAL.server_id; |
| 24 |
|
| 25 |
# Execute a query that on a server hook will execute a test that verifies that |
| 26 |
# the channel service interface was not properly initialized (server-id = 0). |
| 27 |
|
| 28 |
SET @debug_saved= @@GLOBAL.DEBUG; |
| 29 |
SET @@GLOBAL.DEBUG= '+d,validate_replication_observers_plugin_server_channels_init'; |
| 30 |
|
| 31 |
SET @@GLOBAL.server_id= 0; |
| 32 |
|
| 33 |
--eval INSERT INTO t1 VALUES(1) |
| 34 |
|
| 35 |
# Check that the interface still fails with the relay log info repository set to |
| 36 |
# FILE |
| 37 |
|
| 38 |
SET @@GLOBAL.server_id= @original_slave_server_id; |
| 39 |
SET @@GLOBAL.relay_log_info_repository='FILE'; |
| 40 |
SET @@GLOBAL.master_info_repository='TABLE'; |
| 41 |
|
| 42 |
--eval INSERT INTO t1 VALUES(2) |
| 43 |
|
| 44 |
# Check that the interface still fails with the master info repository set to |
| 45 |
# FILE |
| 46 |
|
| 47 |
SET @@GLOBAL.relay_log_info_repository='TABLE'; |
| 48 |
SET @@GLOBAL.master_info_repository='FILE'; |
| 49 |
|
| 50 |
--eval INSERT INTO t1 VALUES(3) |
| 51 |
|
| 52 |
# Clean |
| 53 |
|
| 54 |
--disable_warnings ER_WARN_DEPRECATED_SYNTAX ONCE |
| 55 |
SET @@GLOBAL.master_info_repository = @saved_master_info_repository; |
| 56 |
--disable_warnings ER_WARN_DEPRECATED_SYNTAX ONCE |
| 57 |
SET @@GLOBAL.relay_log_info_repository = @saved_relay_log_info_repository; |
| 58 |
SET @@GLOBAL.DEBUG= @debug_saved; |
| 59 |
DROP TABLE t1; |
| 60 |
|
| 61 |
--source include/uninstall_replication_observers_example.inc |