[MDEV-9990] change default_storage_engine does not affect the replication connection Created: 2016-04-26  Updated: 2016-05-27  Resolved: 2016-05-27

Status: Closed
Project: MariaDB Server
Component/s: Replication
Affects Version/s: 10.0.20
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: dennis Assignee: Unassigned
Resolution: Incomplete Votes: 0
Labels: default_engine, need_feedback
Environment:

OS: Redhat 7.0



 Description   

1. I install two mariadb server with default_storage_engine=innodb in the my.cnf
2. I install the tokudb plugin on each mariadb, and use "show engines" to check the install of tokudb engine
3. Set up the replication between the two mariadb server
4. modify the master my.cnf file to add default_storage_engine=tokudb and restart master
5. execute "set global default_storage_engine=tokudb" on slave
6. execute "create table t1(c1 int);" on master
we will get a tokudb table t1 on master, but a innodb table t1 on slave
7. restart the replication on slave
8. execute "create table t2(c1 int);" on master
we will get a tokudb table t2 on master, but a innodb table t2 on slave
9. modify the slave my.cnf file to add default_storage_engine=tokudb and restart slave
10. execute "create table t3(c1 int);" on master
we will get a tokudb table t3 on master, but a tokudb table t3 on slave



 Comments   
Comment by Elena Stepanova [ 2016-04-26 ]

Hi,

The behavior on step 6 is correct and expected: default_storage_engine is both a global and a session variable, which means that when you change the global value, only new sessions (connections) can pick it up. Slave threads are already running, so they are using the old default value.

The behavior on step 7 is incorrect, but I cannot reproduce it, so it requires clarification.
What exactly do you mean by "restart replication"? I would assume it's STOP SLAVE/START SLAVE, but maybe you mean something different?

Are you using parallel replication? If so, can it be that the specified version 10.0.20 is incorrect, and in fact you are running an earlier MariaDB 10.0.x release?

In early 10.0 versions STOP SLAVE/START SLAVE would not restart parallel slave working threads, so the explanation above regarding step 6 would apply to them also. But by 10.0.20 it was fixed, so even with parallel replication you should have the new default engine after replication restart. I tried it with 10.0.20 and got TokuDB at step 7.

Comment by Elena Stepanova [ 2016-05-27 ]

Please comment to re-open if you have further information on the issue

Generated at Thu Feb 08 07:38:50 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.