Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

here comes an MySQL bug between MySQL 5.6.20 & MySQL5.6.34 #284

Closed
pengan1990 opened this issue Mar 17, 2017 · 4 comments
Closed

here comes an MySQL bug between MySQL 5.6.20 & MySQL5.6.34 #284

pengan1990 opened this issue Mar 17, 2017 · 4 comments
Milestone

Comments

@pengan1990
Copy link

for MySQL5.6.20 have not compatible with MySQL5.5, so it will no kill zombie thread without the slave uuid

mysql5 6 20

mysql5 6 34

@pengan1990
Copy link
Author

fix this bug for using set @slave_uuid="${uuid}" command before dump

@agapple
Copy link
Member

agapple commented Mar 17, 2017

我看一下,可能也是因为这个很多用户反馈链接异常断开的一个问题

@agapple agapple added this to the v1.0.24 milestone Mar 17, 2017
@yangdehua
Copy link

可以参考下MySQL源码的实现,在建立IO线程到Master的时候,会设置一下uuid

/**
Set user variables after connecting to the master.

@param mysql MYSQL to request uuid from master.
@param mi Master_info to set master_uuid

@return 0: Success, 1: Fatal error, 2: Network error.
*/
int io_thread_init_commands(MYSQL *mysql, Master_info *mi)
{
char query[256];
int ret= 0;

sprintf(query, "SET @slave_uuid= '%s'", server_uuid);
if (mysql_real_query(mysql, query, strlen(query))
&& !check_io_slave_killed(mi->info_thd, mi, NULL))
goto err;

agapple added a commit that referenced this issue Apr 1, 2017
@agapple
Copy link
Member

agapple commented Apr 1, 2017

看了mysql5.6的源码,它应该是兼容了mysql5.5 client的serverId的dump,如果没有设置slave_uuid默认也会是基于serverId进行判断. 增加slave_uuid之后可以避免对于slaveId不同的强依赖

@agapple agapple closed this as completed Apr 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants