summaryrefslogtreecommitdiff
path: root/sql/mysqld.cc
diff options
context:
space:
mode:
authorunknown <thek@adventure.(none)>2007-11-21 10:02:44 +0100
committerunknown <thek@adventure.(none)>2007-11-21 10:02:44 +0100
commit1ae0237f24c5f207e30bb29945fbb55f87192722 (patch)
tree9cc345d443abf70f4e6a97c4ba23463f0e6a5d35 /sql/mysqld.cc
parent001c78e29e7a917bad4d64673e84230768d936ad (diff)
parentbb681dbc883343ed2c503c15833720f8da499317 (diff)
downloadmariadb-git-1ae0237f24c5f207e30bb29945fbb55f87192722.tar.gz
Merge adventure.(none):/home/thek/Development/cpp/bug31153/my50-bug31153
into adventure.(none):/home/thek/Development/cpp/mysql-5.0-runtime sql/mysqld.cc: Auto merged sql/sp_head.cc: Auto merged sql/sp_head.h: Auto merged sql/sql_base.cc: Auto merged sql/sql_yacc.yy: Manual merge.
Diffstat (limited to 'sql/mysqld.cc')
-rw-r--r--sql/mysqld.cc14
1 files changed, 12 insertions, 2 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index c128aeaa47d..ad93fd56fae 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -2502,7 +2502,12 @@ static int my_message_sql(uint error, const char *str, myf MyFlags)
thd->query_error= 1; // needed to catch query errors during replication
if (!thd->no_warnings_for_error)
+ {
+ thd->no_warnings_for_error= TRUE;
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_ERROR, error, str);
+ thd->no_warnings_for_error= FALSE;
+ }
+
/*
thd->lex->current_select == 0 if lex structure is not inited
(not query command (COM_QUERY))
@@ -4308,8 +4313,13 @@ pthread_handler_t handle_connections_sockets(void *arg __attribute__((unused)))
sock == unix_sock ? VIO_LOCALHOST: 0)) ||
my_net_init(&thd->net,vio_tmp))
{
- if (vio_tmp)
- vio_delete(vio_tmp);
+ /*
+ Only delete the temporary vio if we didn't already attach it to the
+ NET object. The destructor in THD will delete any initialized net
+ structure.
+ */
+ if (vio_tmp && thd->net.vio != vio_tmp)
+ vio_delete(vio_tmp);
else
{
(void) shutdown(new_sock, SHUT_RDWR);