summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
diff options
context:
space:
mode:
authorunknown <davi@moksha.com.br>2007-10-18 15:47:22 -0300
committerunknown <davi@moksha.com.br>2007-10-18 15:47:22 -0300
commitd5b8136292faff8128c1fb83cafeb37ba829cb34 (patch)
treec48c478eb6050debd953bd107cc2e91a4dfe723c /sql/sql_parse.cc
parent1d5fd522f7f1841767658c36d989a198eec359d8 (diff)
parente56bf76c3dd467d29b3dad8dc3ebbdb7a14cad87 (diff)
downloadmariadb-git-d5b8136292faff8128c1fb83cafeb37ba829cb34.tar.gz
Merge moksha.com.br:/Users/davi/mysql/bugs/21557-5.1
into moksha.com.br:/Users/davi/mysql/mysql-5.1-runtime sql/sp_head.cc: Auto merged sql/sql_parse.cc: Auto merged
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r--sql/sql_parse.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 4856332631a..4d8beb6f67d 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -782,7 +782,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
packet, packet_length, thd->charset());
if (!mysql_change_db(thd, &tmp, FALSE))
{
- general_log_print(thd, command, "%s",thd->db);
+ general_log_write(thd, command, thd->db, thd->db_length);
send_ok(thd);
}
break;
@@ -980,10 +980,9 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
break; // fatal error is set
char *packet_end= thd->query + thd->query_length;
/* 'b' stands for 'buffer' parameter', special for 'my_snprintf' */
- const char *format= "%.*b";
const char* found_semicolon= NULL;
- general_log_print(thd, command, format, thd->query_length, thd->query);
+ general_log_write(thd, command, thd->query, thd->query_length);
DBUG_PRINT("query",("%-.4096s",thd->query));
if (!(specialflag & SPECIAL_NO_PRIOR))
@@ -1142,7 +1141,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
ER(ER_LOCK_OR_ACTIVE_TRANSACTION), MYF(0));
break;
}
- general_log_print(thd, command, db.str);
+ general_log_write(thd, command, db.str, db.length);
mysql_rm_db(thd, db.str, 0, 0);
break;
}