Below is the list of changes that have just been committed into a
4.0 repository of sasha. When sasha does a push, they will be propogated to
the main repository and within 24 hours after the push to the public repository.
For information on how to access the public repository
see http://www.mysql.com/doc/I/n/Installing_source_tree.html
ChangeSet@stripped, 2001-07-13 16:05:19-06:00, sasha@stripped
fixed coredump in mysql_reconnect()
libmysql/libmysql.c
1.61 01/07/13 16:05:18 sasha@stripped +19 -0
fixed coredump in mysql_reconnect()
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: sasha
# Host: mysql.sashanet.com
# Root: /home/sasha/src/bk/mysql-4.0
--- 1.60/libmysql/libmysql.c Wed Jul 4 00:39:55 2001
+++ 1.61/libmysql/libmysql.c Fri Jul 13 16:05:18 2001
@@ -1845,6 +1845,23 @@
DBUG_RETURN(0);
}
+/* needed when we move MYSQL structure to a different address */
+static void mysql_fix_pointers(MYSQL* mysql, MYSQL* old_mysql)
+{
+ MYSQL *tmp, *tmp_prev;
+ if (mysql->master == old_mysql)
+ mysql->master = mysql;
+ if (mysql->last_used_con == old_mysql)
+ mysql->last_used_con = mysql;
+ if (mysql->last_used_slave == old_mysql)
+ mysql->last_used_slave = mysql;
+ for (tmp_prev = mysql, tmp = mysql->next_slave;
+ tmp != old_mysql;tmp = tmp->next_slave)
+ {
+ tmp_prev = tmp;
+ }
+ tmp_prev->next_slave = mysql;
+}
static my_bool mysql_reconnect(MYSQL *mysql)
{
@@ -1860,6 +1877,7 @@
}
mysql_init(&tmp_mysql);
tmp_mysql.options=mysql->options;
+ tmp_mysql.rpl_pivot = mysql->rpl_pivot;
if (!mysql_real_connect(&tmp_mysql,mysql->host,mysql->user,mysql->passwd,
mysql->db, mysql->port, mysql->unix_socket,
mysql->client_flag))
@@ -1869,6 +1887,7 @@
bzero((char*) &mysql->options,sizeof(mysql->options));
mysql_close(mysql);
*mysql=tmp_mysql;
+ mysql_fix_pointers(mysql, &tmp_mysql); /* adjust connection pointers */
net_clear(&mysql->net);
mysql->affected_rows= ~(my_ulonglong) 0;
DBUG_RETURN(0);
| Thread |
|---|
| • bk commit into 4.0 tree | sasha | 13 Jul |