diff --git a/sql/log.cc b/sql/log.cc index b6c842e551d..ab3277fe58b 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -963,6 +963,7 @@ bool MYSQL_LOG::write(THD *thd,const char *query, uint query_length, end=strxmov(buff, "# administrator command: ", command_name[thd->command], NullS); query_length=(ulong) (end-buff); + query=buff; } if (my_b_write(&log_file, (byte*) query,query_length) || my_b_write(&log_file, (byte*) ";\n",2) ||