summaryrefslogtreecommitdiff
path: root/libmysql
diff options
context:
space:
mode:
authorunknown <guilhem@mysql.com>2003-10-31 23:20:23 +0100
committerunknown <guilhem@mysql.com>2003-10-31 23:20:23 +0100
commitb920ab261e7aea61a7b8a5b950faafa1ce719d4c (patch)
tree498d4bfea3f5514d76aac06dd4120c7aa8b1a02c /libmysql
parent40ed42e14a7911a879c11e0b23b0730d763f6651 (diff)
downloadmariadb-git-b920ab261e7aea61a7b8a5b950faafa1ce719d4c.tar.gz
4 small items in this:
- when we don't have in_addr_t, use uint32. - a forgotten initialization of slave_proxy_id in sql/log_event.cc (was not really "forgot", was "we needn't init it there", but there was one case where we needed...). - made slave_proxy_id always meaningful in THD and Log_event, so we can rely more on it (no need to test if it's meaningful). THD::slave_proxy_id is equal to THD::thread_id except for the slave SQL thread. - clean up the slave's temporary table (i.e. free their memory) when slave server shuts down. extra/resolveip.c: removed #define as it is simpler to put it in my_net.h (because we need the #define elsewhere) include/my_net.h: When in_addr_t is not defined, use uint32. libmysql/libmysql.c: using in_addr_t is more generic. libmysql/manager.c: using in_addr_t is more generic. mysql-test/t/rpl_chain_temp_table.test: comments sql/log_event.cc: * Had forgot to initialize slave_proxy_id in the event constructor (char* buf...). Initializing is in fact only needed for Create_file_log_event, because it uses slave_proxy_id even if it does not write an event to the binlog (it uses slave_proxy_id to write it to SQL-LOAD.info). * When we write events we now always write slave_proxy_id, which is now always meaningful (as thd->slave_proxy_id is now always meaningful, see change in sql_class.cc). sql/mini_client.cc: in_addr_t is more generic. sql/slave.cc: A RELAY_LOG_INFO method to free the slave's temporary tables from memory at slave's server shutdown. It is called by end_slave(), which is called by close_connections(), which is called when the server terminates (close_connections() is just before clean_up(); putting the call in clean_up() was buggy, as active_mi is already deleted by close_connections(). sql/slave.h: new method sql/sql_class.cc: By default we set THD::slave_proxy_id to THD::thread_id, so THD::slave_proxy_id is always meaningful (not 0). It's always the same as the thread id except for the slave SQL thread.
Diffstat (limited to 'libmysql')
-rw-r--r--libmysql/libmysql.c2
-rw-r--r--libmysql/manager.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c
index d8966b30fb9..5d809adf36a 100644
--- a/libmysql/libmysql.c
+++ b/libmysql/libmysql.c
@@ -1623,7 +1623,7 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user,
char buff[NAME_LEN+USERNAME_LENGTH+100],charset_name_buff[16];
char *end,*host_info,*charset_name;
my_socket sock;
- uint32 ip_addr;
+ in_addr_t ip_addr;
struct sockaddr_in sock_addr;
ulong pkt_length;
NET *net= &mysql->net;
diff --git a/libmysql/manager.c b/libmysql/manager.c
index d4bd8d5520b..1a4ac718ef9 100644
--- a/libmysql/manager.c
+++ b/libmysql/manager.c
@@ -90,7 +90,7 @@ MYSQL_MANAGER* STDCALL mysql_manager_connect(MYSQL_MANAGER* con,
{
my_socket sock;
struct sockaddr_in sock_addr;
- uint32 ip_addr;
+ in_addr_t ip_addr;
char msg_buf[MAX_MYSQL_MANAGER_MSG];
int msg_len;
Vio* vio;