summaryrefslogtreecommitdiff
path: root/sql/log.cc
diff options
context:
space:
mode:
authorunknown <monty@donna.mysql.com>2000-11-18 23:13:48 +0200
committerunknown <monty@donna.mysql.com>2000-11-18 23:13:48 +0200
commit5dae19b394e3385c0e48d896fec1174437f2308a (patch)
tree287897ebd815b64a05c0ca7076beccd5245a2f8d /sql/log.cc
parent469fce643c6f71c3bcaaa62454604fbb30bcbacc (diff)
downloadmariadb-git-5dae19b394e3385c0e48d896fec1174437f2308a.tar.gz
Fixed some reported bugs
BUILD/compile-alpha-cxx: Building on Alpha with Compaq C and C+++ Docs/manual.texi: Changelogs and update of links myisam/mi_key.c: Fixed multi_part keys where first part where of TEXT/BLOB type mysys/Makefile.am: Makefile.am now works with Compaq make sql-bench/Results/ATIS-mysql-Linux_2.2.13_SMP_alpha: New benchmark results sql-bench/Results/RUN-mysql-Linux_2.2.13_SMP_alpha: New benchmark results sql-bench/Results/alter-table-mysql-Linux_2.2.13_SMP_alpha: New benchmark results sql-bench/Results/big-tables-mysql-Linux_2.2.13_SMP_alpha: New benchmark results sql-bench/Results/connect-mysql-Linux_2.2.13_SMP_alpha: New benchmark results sql-bench/Results/create-mysql-Linux_2.2.13_SMP_alpha: New benchmark results sql-bench/Results/insert-mysql-Linux_2.2.13_SMP_alpha: New benchmark results sql-bench/Results/select-mysql-Linux_2.2.13_SMP_alpha: New benchmark results sql-bench/Results/wisconsin-mysql-Linux_2.2.13_SMP_alpha: New benchmark results sql-bench/test-select.sh: Made the count_distinct_big test a bit smaller sql/log.cc: Changed the slow log format to have more information by default sql/mysqld.cc: false->FALSE sql/share/german/errmsg.sys: Update of messages sql/share/german/errmsg.txt: Update of messages sql/sql_base.cc: Fixed SELECT DISTINCT * sql/sql_insert.cc: Cleanup sql/sql_table.cc: Added logging of DROP of temporary tables vio/VioFd.cc: false -> FALSE vio/VioSSL.cc: false -> FALSE vio/VioSSLFactoriesFd.cc: false -> FALSE vio/VioSocket.cc: false -> FALSE
Diffstat (limited to 'sql/log.cc')
-rw-r--r--sql/log.cc12
1 files changed, 5 insertions, 7 deletions
diff --git a/sql/log.cc b/sql/log.cc
index 3563b7b1a08..2dda594ea59 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -703,7 +703,7 @@ void MYSQL_LOG::write(THD *thd,const char *query, uint query_length,
VOID(pthread_mutex_unlock(&LOCK_log));
return;
}
- if (specialflag & SPECIAL_LONG_LOG_FORMAT)
+ if ((specialflag & SPECIAL_LONG_LOG_FORMAT) || query_start)
{
current_time=time(NULL);
if (current_time != last_time)
@@ -724,28 +724,26 @@ void MYSQL_LOG::write(THD *thd,const char *query, uint query_length,
if (my_b_write(&log_file, (byte*) buff,24))
error=errno;
}
- if (my_b_printf(&log_file, "# User@Host: %s [%s] @ %s [%s]\n",
+ if (my_b_printf(&log_file, "# User@Host: %s[%s] @ %s [%s]\n",
thd->priv_user,
thd->user,
thd->host ? thd->host : "",
- thd->ip ? thd->ip : ""))
+ thd->ip ? thd->ip : "") == (uint) -1)
error=errno;
}
if (query_start)
{
/* For slow query log */
- if (!(specialflag & SPECIAL_LONG_LOG_FORMAT))
- current_time=time(NULL);
if (my_b_printf(&log_file,
"# Time: %lu Lock_time: %lu Rows_sent: %lu\n",
(ulong) (current_time - query_start),
(ulong) (thd->time_after_lock - query_start),
- (ulong) thd->sent_row_count))
+ (ulong) thd->sent_row_count) == (uint) -1)
error=errno;
}
if (thd->db && strcmp(thd->db,db))
{ // Database changed
- if (my_b_printf(&log_file,"use %s;\n",thd->db))
+ if (my_b_printf(&log_file,"use %s;\n",thd->db) == (uint) -1)
error=errno;
strmov(db,thd->db);
}