mirror of
https://github.com/MariaDB/server.git
synced 2025-01-28 01:34:17 +01:00
c39877071a
mysql-test-run auto-disables all optional plugins. mysql-test/include/default_client.cnf: no @OPT.plugindir anymore mysql-test/include/default_mysqld.cnf: don't disable plugins manually - mtr can do it better mysql-test/suite/innodb/t/innodb_bug47167.test: mtr now uses suite-dir as an include path mysql-test/suite/innodb/t/innodb_file_format.test: mtr now uses suite-dir as an include path mysql-test/t/partition_binlog.test: this test uses partitions storage/example/mysql-test/mtr/t/source.result: update results. as mysqltest includes the correct overlayed include storage/innobase/handler/ha_innodb.cc: the assert is wrong
59 lines
2.3 KiB
Text
59 lines
2.3 KiB
Text
#
|
|
# Bug#35807 - INSTALL PLUGIN replicates row-based, but not stmt-based
|
|
#
|
|
# The test verifies that INSTALL PLUGIN and UNINSTALL PLUGIN
|
|
# work with replication.
|
|
#
|
|
# The test tries to install and uninstall a plugin on master,
|
|
# and verifies that it does not affect the slave,
|
|
# and that it does not add anything to the binlog.
|
|
|
|
--source include/not_embedded.inc
|
|
--source include/have_log_bin.inc
|
|
--source include/have_example_plugin.inc
|
|
|
|
# Initialize replication.
|
|
--source include/master-slave.inc
|
|
--echo Verify that example engine is not installed.
|
|
SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE ENGINE='EXAMPLE';
|
|
--echo Get binlog position before install plugin.
|
|
let $before_pos = query_get_value("SHOW MASTER STATUS", Position, 1);
|
|
--echo Install example engine.
|
|
--replace_regex /\.dll/.so/
|
|
eval INSTALL PLUGIN example SONAME '$HA_EXAMPLE_SO';
|
|
--echo Get binlog position after install plugin.
|
|
let $after_pos = query_get_value("SHOW MASTER STATUS", Position, 1);
|
|
--echo Compute the difference of the binlog positions.
|
|
--echo Should be zero as install plugin should not be replicated.
|
|
--disable_query_log
|
|
eval SELECT $after_pos - $before_pos AS Delta;
|
|
--enable_query_log
|
|
--echo Verify that example engine is installed.
|
|
SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE ENGINE='EXAMPLE';
|
|
# Wait for slave to catch up with master.
|
|
sync_slave_with_master;
|
|
#
|
|
--echo connection slave: Verify that example engine is not installed.
|
|
connection slave;
|
|
SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE ENGINE='EXAMPLE';
|
|
#
|
|
--echo connection master: Uninstall example engine.
|
|
connection master;
|
|
--echo Get binlog position before uninstall plugin.
|
|
let $before_pos = query_get_value("SHOW MASTER STATUS", Position, 1);
|
|
UNINSTALL PLUGIN example;
|
|
--echo Get binlog position after uninstall plugin.
|
|
let $after_pos = query_get_value("SHOW MASTER STATUS", Position, 1);
|
|
--echo Compute the difference of the binlog positions.
|
|
--echo Should be zero as uninstall plugin should not be replicated.
|
|
--disable_query_log
|
|
eval SELECT $after_pos - $before_pos AS Delta;
|
|
--enable_query_log
|
|
--echo Verify that example engine is not installed.
|
|
SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE ENGINE='EXAMPLE';
|
|
# Wait for slave to catch up with master.
|
|
sync_slave_with_master;
|
|
#
|
|
# Cleanup
|
|
--source include/rpl_end.inc
|
|
--echo End of test
|