Skip to content

Commit

Permalink
and more
Browse files Browse the repository at this point in the history
  • Loading branch information
vuvova committed Mar 28, 2024
1 parent 66b8d30 commit 86d55e3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sql/sql_connect.cc
Expand Up @@ -46,6 +46,7 @@
#include <ssl_compat.h>

#include "../storage/perfschema/pfs_server.h"
extern my_bool pfs_enabled;

HASH global_user_stats, global_client_stats, global_table_stats;
HASH global_index_stats;
Expand Down Expand Up @@ -1412,6 +1413,7 @@ void do_handle_one_connection(CONNECT *connect, bool put_in_cache)

while (thd_is_connection_alive(thd))
{
DBUG_ASSERT(PSI_CALL_get_thread() || !pfs_enabled || !pfs_param.m_thread_sizing || !pfs_param.m_thread_class_sizing);
if (mysql_audit_release_required(thd))
mysql_audit_release(thd);
if (do_command(thd))
Expand Down Expand Up @@ -1572,7 +1574,6 @@ THD *CONNECT::create_thd(THD *thd)
/* Attach PSI instrumentation to the new THD */

PSI_thread *psi= PSI_CALL_get_thread();
extern my_bool pfs_enabled;
DBUG_ASSERT(psi || !pfs_enabled || !pfs_param.m_thread_sizing || !pfs_param.m_thread_class_sizing);
PSI_CALL_set_thread_os_id(psi);
PSI_CALL_set_thread_THD(psi, thd);
Expand Down
5 changes: 5 additions & 0 deletions sql/sql_table.cc
Expand Up @@ -88,6 +88,9 @@ class Enable_wsrep_ctas_guard
#endif /* WITH_WSREP */
#include "sql_debug.h"

#include "../storage/perfschema/pfs_server.h"
extern my_bool pfs_enabled;

#ifdef __WIN__
#include <io.h>
#endif
Expand Down Expand Up @@ -5949,6 +5952,8 @@ mysql_rename_table(handlerton *base, const LEX_CSTRING *old_db,
old_db->str, old_name->str, new_db->str,
new_name->str));

DBUG_ASSERT(PSI_CALL_get_thread() || !pfs_enabled || !pfs_param.m_thread_sizing || !pfs_param.m_thread_class_sizing);

// Temporarily disable foreign key checks
if (flags & NO_FK_CHECKS)
thd->variables.option_bits|= OPTION_NO_FOREIGN_KEY_CHECKS;
Expand Down

0 comments on commit 86d55e3

Please sign in to comment.