summaryrefslogtreecommitdiff
path: root/sql-common/client.c
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2009-11-11 20:31:28 -0800
committerIgor Babaev <igor@askmonty.org>2009-11-11 20:31:28 -0800
commite4e1ae0d13da399d53bd91df791b149f3eae796b (patch)
tree850b7b3404210b6bad604ad33b5c9a7437253dbe /sql-common/client.c
parent99d8d4402080270289f00465309c7c40c2e5d566 (diff)
parentd749c7e60061fd328e95f74d2d77fc59312da3b1 (diff)
downloadmariadb-git-e4e1ae0d13da399d53bd91df791b149f3eae796b.tar.gz
Merge of the patch introducing virtual columns into maria-5.2
Diffstat (limited to 'sql-common/client.c')
-rw-r--r--sql-common/client.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/sql-common/client.c b/sql-common/client.c
index af44b6d2615..c290525a1c0 100644
--- a/sql-common/client.c
+++ b/sql-common/client.c
@@ -482,6 +482,15 @@ HANDLE create_shared_memory(MYSQL *mysql,NET *net, uint connect_timeout)
int i;
/*
+ If this is NULL, somebody freed the MYSQL* options. mysql_close()
+ is a good candidate. We don't just silently (re)set it to
+ def_shared_memory_base_name as that would create really confusing/buggy
+ behavior if the user passed in a different name on the command-line or
+ in a my.cnf.
+ */
+ DBUG_ASSERT(shared_memory_base_name != NULL);
+
+ /*
get enough space base-name + '_' + longest suffix we might ever send
*/
if (!(tmp= (char *)my_malloc(strlen(shared_memory_base_name) + 32L, MYF(MY_FAE))))
@@ -933,6 +942,9 @@ void end_server(MYSQL *mysql)
{
init_sigpipe_variables
DBUG_PRINT("info",("Net: %s", vio_description(mysql->net.vio)));
+#ifdef MYSQL_SERVER
+ slave_io_thread_detach_vio();
+#endif
set_sigpipe(mysql);
vio_delete(mysql->net.vio);
reset_sigpipe(mysql);
@@ -1851,7 +1863,7 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
uint port, const char *unix_socket,ulong client_flag)
{
char buff[NAME_LEN+USERNAME_LENGTH+100];
- char *end,*host_info;
+ char *end,*host_info= NULL;
my_socket sock;
in_addr_t ip_addr;
struct sockaddr_in sock_addr;
@@ -1869,7 +1881,6 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
#endif
init_sigpipe_variables
DBUG_ENTER("mysql_real_connect");
- LINT_INIT(host_info);
DBUG_PRINT("enter",("host: %s db: %s user: %s",
host ? host : "(Null)",