Commit 28f35b26 authored by serg@serg.mysql.com's avatar serg@serg.mysql.com

bug in libmysql.c:mysql_reconnect() fixed

parent 85f2167a
......@@ -1572,13 +1572,13 @@ static my_bool mysql_reconnect(MYSQL *mysql)
}
mysql_init(&tmp_mysql);
tmp_mysql.options=mysql->options;
bzero((char*) &mysql->options,sizeof(mysql->options));
if (!mysql_real_connect(&tmp_mysql,mysql->host,mysql->user,mysql->passwd,
mysql->db, mysql->port, mysql->unix_socket,
mysql->client_flag))
DBUG_RETURN(1);
tmp_mysql.free_me=mysql->free_me;
mysql->free_me=0;
bzero((char*) &mysql->options,sizeof(mysql->options));
mysql_close(mysql);
*mysql=tmp_mysql;
net_clear(&mysql->net);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment