summaryrefslogtreecommitdiff
path: root/sql/sql_class.cc
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2005-03-09 19:22:30 +0100
committerunknown <serg@serg.mylan>2005-03-09 19:22:30 +0100
commitd1b3c64b230e35dccf33ac7bb70bdd52f779536b (patch)
treef16bb48edb46705380ea8ac84c64b53a1a81b163 /sql/sql_class.cc
parentcd4961830ef37a6c4470ec22fecdf308fc307a46 (diff)
downloadmariadb-git-d1b3c64b230e35dccf33ac7bb70bdd52f779536b.tar.gz
after merge fixes
mysql-test/r/fulltext.result: after merge - test results updated sql/sql_class.cc: protection
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r--sql/sql_class.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index bac3e42ed62..e8879e8c66f 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -1781,7 +1781,11 @@ void TMP_TABLE_PARAM::init()
void thd_increment_bytes_sent(ulong length)
{
- current_thd->status_var.bytes_sent+= length;
+ THD *thd=current_thd;
+ if (likely(thd))
+ { /* current_thd==0 when close_connection() calls net_send_error() */
+ thd->status_var.bytes_sent+= length;
+ }
}