mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Bug#28386 the general log is incomplete
The problem is that the commands COM_STMT_CLOSE, COM_STMT_RESET, COM_STMT_SEND_LONG_DATA weren't being logged to the general log. The solution is to log the general log the aforementioned commands.
This commit is contained in:
@@ -2533,6 +2533,8 @@ void mysql_stmt_reset(THD *thd, char *packet)
|
||||
|
||||
stmt->state= Query_arena::PREPARED;
|
||||
|
||||
general_log_print(thd, thd->command, NullS);
|
||||
|
||||
my_ok(thd);
|
||||
|
||||
DBUG_VOID_RETURN;
|
||||
@@ -2562,6 +2564,7 @@ void mysql_stmt_close(THD *thd, char *packet)
|
||||
*/
|
||||
DBUG_ASSERT(! (stmt->flags & (uint) Prepared_statement::IS_IN_USE));
|
||||
(void) stmt->deallocate();
|
||||
general_log_print(thd, thd->command, NullS);
|
||||
|
||||
thd->main_da.disable_status();
|
||||
|
||||
@@ -2669,6 +2672,9 @@ void mysql_stmt_get_longdata(THD *thd, char *packet, ulong packet_length)
|
||||
stmt->last_errno= ER_OUTOFMEMORY;
|
||||
sprintf(stmt->last_error, ER(ER_OUTOFMEMORY), 0);
|
||||
}
|
||||
|
||||
general_log_print(thd, thd->command, NullS);
|
||||
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user