-
Joao Gramacho authored
OPTION IS CHANGED Problem and analysis: After changing relay-log parameter content, a plug-in using the channel service interface can make the server to fail when calling channel_create(). The channel service interface has introduced the change_master() function parameter "preserve_log" in order to tell change_master() to not purge the current relay logs for a channel regardless of the channel parameters to be changed. This is making change_master() function to reach a situation that is impossible without using the channel service interface. In the situation where a relay log info repository was "broken" because of the change of relay-log parameter, doing a RESET SLAVE is enough to purge all channel relay logs (that it assumes as missing because of the relay-log change), and creating new ones with the new relay-log parameter. As a plug-in may call the channel_create() function telling it to preserve the relay logs, it would lead to a server failure because the server will assume the relay log files to exist (and they may exist, but with another name because of the relay-log parameter change). Fix: When the relay log repository is not initialized yet (not used or has failed to initialize properly), the change_master function should not respect the preserve_logs parameter used by channel_create() function. Note: fixed also an issue in the channel service interface that was setting the use of GTID auto positions even when asked to let it as default in a change master operation.
Joao Gramacho authoredOPTION IS CHANGED Problem and analysis: After changing relay-log parameter content, a plug-in using the channel service interface can make the server to fail when calling channel_create(). The channel service interface has introduced the change_master() function parameter "preserve_log" in order to tell change_master() to not purge the current relay logs for a channel regardless of the channel parameters to be changed. This is making change_master() function to reach a situation that is impossible without using the channel service interface. In the situation where a relay log info repository was "broken" because of the change of relay-log parameter, doing a RESET SLAVE is enough to purge all channel relay logs (that it assumes as missing because of the relay-log change), and creating new ones with the new relay-log parameter. As a plug-in may call the channel_create() function telling it to preserve the relay logs, it would lead to a server failure because the server will assume the relay log files to exist (and they may exist, but with another name because of the relay-log parameter change). Fix: When the relay log repository is not initialized yet (not used or has failed to initialize properly), the change_master function should not respect the preserve_logs parameter used by channel_create() function. Note: fixed also an issue in the channel service interface that was setting the use of GTID auto positions even when asked to let it as default in a change master operation.
Loading