diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2022-01-28 11:57:52 +0100 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2022-01-28 11:57:52 +0100 |
commit | 880d54355432d6135a77c1cff3f15977947b3107 (patch) | |
tree | 01909a9746b303312049e8f59d3410e84e4747dd /storage/perfschema | |
parent | 430d60d1fc01958f2a503d01b24154672a4189bf (diff) | |
parent | 157e66273b83119fe4837693899b2b2ef84de02c (diff) | |
download | mariadb-git-880d54355432d6135a77c1cff3f15977947b3107.tar.gz |
Merge branch 'merge-perfschema-5.7' into 10.5
Diffstat (limited to 'storage/perfschema')
254 files changed, 903 insertions, 903 deletions
diff --git a/storage/perfschema/CMakeLists.txt b/storage/perfschema/CMakeLists.txt index 894c4585013..59a110103b4 100644 --- a/storage/perfschema/CMakeLists.txt +++ b/storage/perfschema/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2009, 2019, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2021, Oracle and/or its affiliates. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/cursor_by_account.cc b/storage/perfschema/cursor_by_account.cc index 1b208e00d65..38359cb24aa 100644 --- a/storage/perfschema/cursor_by_account.cc +++ b/storage/perfschema/cursor_by_account.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2011, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/cursor_by_account.h b/storage/perfschema/cursor_by_account.h index d689cf6c524..1f6d65adc98 100644 --- a/storage/perfschema/cursor_by_account.h +++ b/storage/perfschema/cursor_by_account.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2011, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/cursor_by_host.cc b/storage/perfschema/cursor_by_host.cc index 6aa3423c0d1..26bdbc457f8 100644 --- a/storage/perfschema/cursor_by_host.cc +++ b/storage/perfschema/cursor_by_host.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2011, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/cursor_by_host.h b/storage/perfschema/cursor_by_host.h index 8f256156b1f..45a2fb894c1 100644 --- a/storage/perfschema/cursor_by_host.h +++ b/storage/perfschema/cursor_by_host.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2011, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/cursor_by_thread.cc b/storage/perfschema/cursor_by_thread.cc index 5d56794bf94..f8a4fa243ce 100644 --- a/storage/perfschema/cursor_by_thread.cc +++ b/storage/perfschema/cursor_by_thread.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2011, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/cursor_by_thread.h b/storage/perfschema/cursor_by_thread.h index 1fd803d906c..24578fd44f1 100644 --- a/storage/perfschema/cursor_by_thread.h +++ b/storage/perfschema/cursor_by_thread.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2011, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/cursor_by_thread_connect_attr.cc b/storage/perfschema/cursor_by_thread_connect_attr.cc index b4462a8d748..f87ce7059fb 100644 --- a/storage/perfschema/cursor_by_thread_connect_attr.cc +++ b/storage/perfschema/cursor_by_thread_connect_attr.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/cursor_by_thread_connect_attr.h b/storage/perfschema/cursor_by_thread_connect_attr.h index 7aa31115b30..4a18bdc5b7a 100644 --- a/storage/perfschema/cursor_by_thread_connect_attr.h +++ b/storage/perfschema/cursor_by_thread_connect_attr.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2012, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/cursor_by_user.cc b/storage/perfschema/cursor_by_user.cc index 7699bcf1fc8..4300f61f04f 100644 --- a/storage/perfschema/cursor_by_user.cc +++ b/storage/perfschema/cursor_by_user.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2011, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/cursor_by_user.h b/storage/perfschema/cursor_by_user.h index d31f886170c..1bbb06d2c18 100644 --- a/storage/perfschema/cursor_by_user.h +++ b/storage/perfschema/cursor_by_user.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2011, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/ha_perfschema.cc b/storage/perfschema/ha_perfschema.cc index da0c2c0813b..c0fa80b8e0d 100644 --- a/storage/perfschema/ha_perfschema.cc +++ b/storage/perfschema/ha_perfschema.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -320,8 +320,8 @@ int ha_perfschema::rnd_init(bool scan) int result; DBUG_ENTER("ha_perfschema::rnd_init"); - DBUG_ASSERT(m_table_share); - DBUG_ASSERT(m_table_share->m_open_table != NULL); + assert(m_table_share); + assert(m_table_share->m_open_table != NULL); stats.records= 0; if (m_table == NULL) @@ -339,7 +339,7 @@ int ha_perfschema::rnd_init(bool scan) int ha_perfschema::rnd_end(void) { DBUG_ENTER("ha_perfschema::rnd_end"); - DBUG_ASSERT(m_table); + assert(m_table); delete m_table; m_table= NULL; DBUG_RETURN(0); @@ -371,7 +371,7 @@ void ha_perfschema::position(const uchar *record) { DBUG_ENTER("ha_perfschema::position"); - DBUG_ASSERT(m_table); + assert(m_table); m_table->get_position(ref); DBUG_VOID_RETURN; } @@ -396,7 +396,7 @@ int ha_perfschema::rnd_pos(uchar *buf, uchar *pos) int ha_perfschema::info(uint flag) { DBUG_ENTER("ha_perfschema::info"); - DBUG_ASSERT(m_table_share); + assert(m_table_share); if (flag & HA_STATUS_VARIABLE) stats.records= m_table_share->get_row_count(); if (flag & HA_STATUS_CONST) @@ -415,7 +415,7 @@ int ha_perfschema::delete_all_rows(void) if (is_executed_by_slave()) DBUG_RETURN(0); - DBUG_ASSERT(m_table_share); + assert(m_table_share); if (m_table_share->m_delete_all_rows) result= m_table_share->m_delete_all_rows(); else diff --git a/storage/perfschema/ha_perfschema.h b/storage/perfschema/ha_perfschema.h index 690bf8d13a6..f3d84a3e264 100644 --- a/storage/perfschema/ha_perfschema.h +++ b/storage/perfschema/ha_perfschema.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -232,8 +232,8 @@ private: */ bool is_executed_by_slave() const { - DBUG_ASSERT(table != NULL); - DBUG_ASSERT(table->in_use != NULL); + assert(table != NULL); + assert(table->in_use != NULL); return table->in_use->slave_thread; } diff --git a/storage/perfschema/pfs.cc b/storage/perfschema/pfs.cc index 48641ab1c68..4e3d4f551a0 100644 --- a/storage/perfschema/pfs.cc +++ b/storage/perfschema/pfs.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -92,9 +92,9 @@ static void report_memory_accounting_error( old_thread->m_thread_internal_id, old_thread->m_class->m_name); - DBUG_ASSERT(strcmp(new_thread->m_class->m_name, "thread/sql/event_worker") != 0); - DBUG_ASSERT(strcmp(new_thread->m_class->m_name, "thread/sql/event_scheduler") != 0); - DBUG_ASSERT(strcmp(new_thread->m_class->m_name, "thread/sql/one_connection") != 0); + assert(strcmp(new_thread->m_class->m_name, "thread/sql/event_worker") != 0); + assert(strcmp(new_thread->m_class->m_name, "thread/sql/event_scheduler") != 0); + assert(strcmp(new_thread->m_class->m_name, "thread/sql/one_connection") != 0); } #endif /* PFS_PARANOID */ @@ -1367,16 +1367,16 @@ bool THR_PFS_initialized= false; static inline PFS_thread* my_thread_get_THR_PFS() { - DBUG_ASSERT(THR_PFS_initialized); + assert(THR_PFS_initialized); PFS_thread *thread= static_cast<PFS_thread*>(my_get_thread_local(THR_PFS)); - DBUG_ASSERT(thread == NULL || sanitize_thread(thread) != NULL); + assert(thread == NULL || sanitize_thread(thread) != NULL); return thread; } static inline void my_thread_set_THR_PFS(PFS_thread *pfs) { - DBUG_ASSERT(THR_PFS_initialized); + assert(THR_PFS_initialized); my_set_thread_local(THR_PFS, pfs); } @@ -1554,8 +1554,8 @@ static int build_prefix(const LEX_CSTRING *prefix, const char *category, size_t len; \ size_t full_length; \ \ - DBUG_ASSERT(category != NULL); \ - DBUG_ASSERT(info != NULL); \ + assert(category != NULL); \ + assert(info != NULL); \ if (unlikely(build_prefix(&PREFIX, category, \ formatted_name, &prefix_length)) || \ ! pfs_initialized) \ @@ -1567,8 +1567,8 @@ static int build_prefix(const LEX_CSTRING *prefix, const char *category, \ for (; count>0; count--, info++) \ { \ - DBUG_ASSERT(info->m_key != NULL); \ - DBUG_ASSERT(info->m_name != NULL); \ + assert(info->m_key != NULL); \ + assert(info->m_name != NULL); \ len= strlen(info->m_name); \ full_length= prefix_length + len; \ if (likely(full_length <= PFS_MAX_INFO_NAME_LENGTH)) \ @@ -1620,8 +1620,8 @@ void pfs_register_rwlock_v1(const char *category, size_t len; size_t full_length; - DBUG_ASSERT(category != NULL); - DBUG_ASSERT(info != NULL); + assert(category != NULL); + assert(info != NULL); if (build_prefix(&rwlock_instrument_prefix, category, rw_formatted_name, &rw_prefix_length) || build_prefix(&sxlock_instrument_prefix, category, @@ -1635,8 +1635,8 @@ void pfs_register_rwlock_v1(const char *category, for (; count>0; count--, info++) { - DBUG_ASSERT(info->m_key != NULL); - DBUG_ASSERT(info->m_name != NULL); + assert(info->m_key != NULL); + assert(info->m_name != NULL); len= strlen(info->m_name); if (info->m_flags & PSI_RWLOCK_FLAG_SX) @@ -1724,8 +1724,8 @@ void pfs_register_stage_v1(const char *category, size_t full_length; PSI_stage_info_v1 *info; - DBUG_ASSERT(category != NULL); - DBUG_ASSERT(info_array != NULL); + assert(category != NULL); + assert(info_array != NULL); if (unlikely(build_prefix(&stage_instrument_prefix, category, formatted_name, &prefix_length)) || ! pfs_initialized) @@ -1770,8 +1770,8 @@ void pfs_register_statement_v1(const char *category, size_t len; size_t full_length; - DBUG_ASSERT(category != NULL); - DBUG_ASSERT(info != NULL); + assert(category != NULL); + assert(info != NULL); if (unlikely(build_prefix(&statement_instrument_prefix, category, formatted_name, &prefix_length)) || ! pfs_initialized) @@ -1839,7 +1839,7 @@ void pfs_destroy_mutex_v1(PSI_mutex* mutex) { PFS_mutex *pfs= reinterpret_cast<PFS_mutex*> (mutex); - DBUG_ASSERT(pfs != NULL); + assert(pfs != NULL); destroy_mutex(pfs); } @@ -1862,7 +1862,7 @@ void pfs_destroy_rwlock_v1(PSI_rwlock* rwlock) { PFS_rwlock *pfs= reinterpret_cast<PFS_rwlock*> (rwlock); - DBUG_ASSERT(pfs != NULL); + assert(pfs != NULL); destroy_rwlock(pfs); } @@ -1885,7 +1885,7 @@ void pfs_destroy_cond_v1(PSI_cond* cond) { PFS_cond *pfs= reinterpret_cast<PFS_cond*> (cond); - DBUG_ASSERT(pfs != NULL); + assert(pfs != NULL); destroy_cond(pfs); } @@ -2004,7 +2004,7 @@ pfs_rebind_table_v1(PSI_table_share *share, const void *identity, PSI_table *tab PFS_table *pfs= reinterpret_cast<PFS_table*> (table); if (likely(pfs != NULL)) { - DBUG_ASSERT(pfs->m_thread_owner == NULL); + assert(pfs->m_thread_owner == NULL); if (unlikely(! pfs->m_share->m_enabled)) { @@ -2088,7 +2088,7 @@ void pfs_destroy_socket_v1(PSI_socket *socket) { PFS_socket *pfs= reinterpret_cast<PFS_socket*> (socket); - DBUG_ASSERT(pfs != NULL); + assert(pfs != NULL); destroy_socket(pfs); } @@ -2337,9 +2337,9 @@ void pfs_set_thread_user_v1(const char *user, int user_len) pfs_dirty_state dirty_state; PFS_thread *pfs= my_thread_get_THR_PFS(); - DBUG_ASSERT((user != NULL) || (user_len == 0)); - DBUG_ASSERT(user_len >= 0); - DBUG_ASSERT((uint) user_len <= sizeof(pfs->m_username)); + assert((user != NULL) || (user_len == 0)); + assert(user_len >= 0); + assert((uint) user_len <= sizeof(pfs->m_username)); if (unlikely(pfs == NULL)) return; @@ -2395,11 +2395,11 @@ void pfs_set_thread_account_v1(const char *user, int user_len, pfs_dirty_state dirty_state; PFS_thread *pfs= my_thread_get_THR_PFS(); - DBUG_ASSERT((user != NULL) || (user_len == 0)); - DBUG_ASSERT(user_len >= 0); - DBUG_ASSERT((uint) user_len <= sizeof(pfs->m_username)); - DBUG_ASSERT((host != NULL) || (host_len == 0)); - DBUG_ASSERT(host_len >= 0); + assert((user != NULL) || (user_len == 0)); + assert(user_len >= 0); + assert((uint) user_len <= sizeof(pfs->m_username)); + assert((host != NULL) || (host_len == 0)); + assert(host_len >= 0); host_len= MY_MIN(host_len, static_cast<int>(sizeof(pfs->m_hostname))); @@ -2457,9 +2457,9 @@ void pfs_set_thread_db_v1(const char* db, int db_len) { PFS_thread *pfs= my_thread_get_THR_PFS(); - DBUG_ASSERT((db != NULL) || (db_len == 0)); - DBUG_ASSERT(db_len >= 0); - DBUG_ASSERT((uint) db_len <= sizeof(pfs->m_dbname)); + assert((db != NULL) || (db_len == 0)); + assert(db_len >= 0); + assert((uint) db_len <= sizeof(pfs->m_dbname)); if (likely(pfs != NULL)) { @@ -2480,8 +2480,8 @@ void pfs_set_thread_command_v1(int command) { PFS_thread *pfs= my_thread_get_THR_PFS(); - DBUG_ASSERT(command >= 0); - DBUG_ASSERT(command <= (int) COM_END); + assert(command >= 0); + assert(command <= (int) COM_END); if (likely(pfs != NULL)) { @@ -2536,7 +2536,7 @@ void pfs_set_thread_info_v1(const char* info, uint info_len) pfs_dirty_state dirty_state; PFS_thread *pfs= my_thread_get_THR_PFS(); - DBUG_ASSERT((info != NULL) || (info_len == 0)); + assert((info != NULL) || (info_len == 0)); if (likely(pfs != NULL)) { @@ -2609,12 +2609,12 @@ pfs_start_mutex_wait_v1(PSI_mutex_locker_state *state, const char *src_file, uint src_line) { PFS_mutex *pfs_mutex= reinterpret_cast<PFS_mutex*> (mutex); - DBUG_ASSERT((int) op >= 0); - DBUG_ASSERT((uint) op < array_elements(mutex_operation_map)); - DBUG_ASSERT(state != NULL); + assert((int) op >= 0); + assert((uint) op < array_elements(mutex_operation_map)); + assert(state != NULL); - DBUG_ASSERT(pfs_mutex != NULL); - DBUG_ASSERT(pfs_mutex->m_class != NULL); + assert(pfs_mutex != NULL); + assert(pfs_mutex->m_class != NULL); if (! pfs_mutex->m_enabled) return NULL; @@ -2708,31 +2708,31 @@ pfs_start_rwlock_wait_v1(PSI_rwlock_locker_state *state, const char *src_file, uint src_line) { PFS_rwlock *pfs_rwlock= reinterpret_cast<PFS_rwlock*> (rwlock); - DBUG_ASSERT(static_cast<int> (op) >= 0); - DBUG_ASSERT(static_cast<uint> (op) < array_elements(rwlock_operation_map)); - DBUG_ASSERT(state != NULL); - DBUG_ASSERT(pfs_rwlock != NULL); - DBUG_ASSERT(pfs_rwlock->m_class != NULL); + assert(static_cast<int> (op) >= 0); + assert(static_cast<uint> (op) < array_elements(rwlock_operation_map)); + assert(state != NULL); + assert(pfs_rwlock != NULL); + assert(pfs_rwlock->m_class != NULL); /* Operations supported for READ WRITE LOCK */ - DBUG_ASSERT( pfs_rwlock->m_class->is_shared_exclusive() - || (op == PSI_RWLOCK_READLOCK) - || (op == PSI_RWLOCK_WRITELOCK) - || (op == PSI_RWLOCK_TRYREADLOCK) - || (op == PSI_RWLOCK_TRYWRITELOCK) - ); + assert( pfs_rwlock->m_class->is_shared_exclusive() + || (op == PSI_RWLOCK_READLOCK) + || (op == PSI_RWLOCK_WRITELOCK) + || (op == PSI_RWLOCK_TRYREADLOCK) + || (op == PSI_RWLOCK_TRYWRITELOCK) + ); /* Operations supported for SHARED EXCLUSIVE LOCK */ - DBUG_ASSERT( ! pfs_rwlock->m_class->is_shared_exclusive() - || (op == PSI_RWLOCK_SHAREDLOCK) - || (op == PSI_RWLOCK_SHAREDEXCLUSIVELOCK) - || (op == PSI_RWLOCK_EXCLUSIVELOCK) - || (op == PSI_RWLOCK_TRYSHAREDLOCK) - || (op == PSI_RWLOCK_TRYSHAREDEXCLUSIVELOCK) - || (op == PSI_RWLOCK_TRYEXCLUSIVELOCK) - ); + assert( ! pfs_rwlock->m_class->is_shared_exclusive() + || (op == PSI_RWLOCK_SHAREDLOCK) + || (op == PSI_RWLOCK_SHAREDEXCLUSIVELOCK) + || (op == PSI_RWLOCK_EXCLUSIVELOCK) + || (op == PSI_RWLOCK_TRYSHAREDLOCK) + || (op == PSI_RWLOCK_TRYSHAREDEXCLUSIVELOCK) + || (op == PSI_RWLOCK_TRYEXCLUSIVELOCK) + ); if (! pfs_rwlock->m_enabled) return NULL; @@ -2821,10 +2821,10 @@ pfs_start_rwlock_rdwait_v1(PSI_rwlock_locker_state *state, PSI_rwlock_operation op, const char *src_file, uint src_line) { - DBUG_ASSERT((op == PSI_RWLOCK_READLOCK) || - (op == PSI_RWLOCK_TRYREADLOCK) || - (op == PSI_RWLOCK_SHAREDLOCK) || - (op == PSI_RWLOCK_TRYSHAREDLOCK)); + assert((op == PSI_RWLOCK_READLOCK) || + (op == PSI_RWLOCK_TRYREADLOCK) || + (op == PSI_RWLOCK_SHAREDLOCK) || + (op == PSI_RWLOCK_TRYSHAREDLOCK)); return pfs_start_rwlock_wait_v1(state, rwlock, op, src_file, src_line); } @@ -2835,12 +2835,12 @@ pfs_start_rwlock_wrwait_v1(PSI_rwlock_locker_state *state, PSI_rwlock_operation op, const char *src_file, uint src_line) { - DBUG_ASSERT((op == PSI_RWLOCK_WRITELOCK) || - (op == PSI_RWLOCK_TRYWRITELOCK) || - (op == PSI_RWLOCK_SHAREDEXCLUSIVELOCK) || - (op == PSI_RWLOCK_TRYSHAREDEXCLUSIVELOCK) || - (op == PSI_RWLOCK_EXCLUSIVELOCK) || - (op == PSI_RWLOCK_TRYEXCLUSIVELOCK)); + assert((op == PSI_RWLOCK_WRITELOCK) || + (op == PSI_RWLOCK_TRYWRITELOCK) || + (op == PSI_RWLOCK_SHAREDEXCLUSIVELOCK) || + (op == PSI_RWLOCK_TRYSHAREDEXCLUSIVELOCK) || + (op == PSI_RWLOCK_EXCLUSIVELOCK) || + (op == PSI_RWLOCK_TRYEXCLUSIVELOCK)); return pfs_start_rwlock_wait_v1(state, rwlock, op, src_file, src_line); } @@ -2867,11 +2867,11 @@ pfs_start_cond_wait_v1(PSI_cond_locker_state *state, in start_cond_wait_v1() and end_cond_wait_v1(). */ PFS_cond *pfs_cond= reinterpret_cast<PFS_cond*> (cond); - DBUG_ASSERT(static_cast<int> (op) >= 0); - DBUG_ASSERT(static_cast<uint> (op) < array_elements(cond_operation_map)); - DBUG_ASSERT(state != NULL); - DBUG_ASSERT(pfs_cond != NULL); - DBUG_ASSERT(pfs_cond->m_class != NULL); + assert(static_cast<int> (op) >= 0); + assert(static_cast<uint> (op) < array_elements(cond_operation_map)); + assert(state != NULL); + assert(pfs_cond != NULL); + assert(pfs_cond->m_class != NULL); if (! pfs_cond->m_enabled) return NULL; @@ -2984,7 +2984,7 @@ static inline PFS_TL_LOCK_TYPE lock_flags_to_lock_type(uint flags) case TL_READ_DEFAULT: case TL_WRITE_DEFAULT: default: - DBUG_ASSERT(false); + assert(false); } /* Dead code */ @@ -2993,7 +2993,7 @@ static inline PFS_TL_LOCK_TYPE lock_flags_to_lock_type(uint flags) static inline PFS_TL_LOCK_TYPE external_lock_flags_to_lock_type(uint flags) { - DBUG_ASSERT(flags == F_RDLCK || flags == F_WRLCK); + assert(flags == F_RDLCK || flags == F_WRLCK); return (flags == F_RDLCK ? PFS_TL_READ_EXTERNAL : PFS_TL_WRITE_EXTERNAL); } @@ -3008,12 +3008,12 @@ pfs_start_table_io_wait_v1(PSI_table_locker_state *state, uint index, const char *src_file, uint src_line) { - DBUG_ASSERT(static_cast<int> (op) >= 0); - DBUG_ASSERT(static_cast<uint> (op) < array_elements(table_io_operation_map)); - DBUG_ASSERT(state != NULL); + assert(static_cast<int> (op) >= 0); + assert(static_cast<uint> (op) < array_elements(table_io_operation_map)); + assert(state != NULL); PFS_table *pfs_table= reinterpret_cast<PFS_table*> (table); - DBUG_ASSERT(pfs_table != NULL); - DBUG_ASSERT(pfs_table->m_share != NULL); + assert(pfs_table != NULL); + assert(pfs_table->m_share != NULL); if (! pfs_table->m_io_enabled) return NULL; @@ -3110,13 +3110,13 @@ pfs_start_table_lock_wait_v1(PSI_table_locker_state *state, ulong op_flags, const char *src_file, uint src_line) { - DBUG_ASSERT(state != NULL); - DBUG_ASSERT((op == PSI_TABLE_LOCK) || (op == PSI_TABLE_EXTERNAL_LOCK)); + assert(state != NULL); + assert((op == PSI_TABLE_LOCK) || (op == PSI_TABLE_EXTERNAL_LOCK)); PFS_table *pfs_table= reinterpret_cast<PFS_table*> (table); - DBUG_ASSERT(pfs_table != NULL); - DBUG_ASSERT(pfs_table->m_share != NULL); + assert(pfs_table != NULL); + assert(pfs_table->m_share != NULL); if (! pfs_table->m_lock_enabled) return NULL; @@ -3146,10 +3146,10 @@ pfs_start_table_lock_wait_v1(PSI_table_locker_state *state, break; default: lock_type= PFS_TL_READ; - DBUG_ASSERT(false); + assert(false); } - DBUG_ASSERT((uint) lock_type < array_elements(table_lock_operation_map)); + assert((uint) lock_type < array_elements(table_lock_operation_map)); uint flags; ulonglong timer_start= 0; @@ -3239,9 +3239,9 @@ pfs_get_thread_file_name_locker_v1(PSI_file_locker_state *state, PSI_file_operation op, const char *name, const void *identity) { - DBUG_ASSERT(static_cast<int> (op) >= 0); - DBUG_ASSERT(static_cast<uint> (op) < array_elements(file_operation_map)); - DBUG_ASSERT(state != NULL); + assert(static_cast<int> (op) >= 0); + assert(static_cast<uint> (op) < array_elements(file_operation_map)); + assert(state != NULL); if (psi_unlikely(! flag_global_instrumentation)) return NULL; @@ -3316,13 +3316,13 @@ pfs_get_thread_file_stream_locker_v1(PSI_file_locker_state *state, PSI_file *file, PSI_file_operation op) { PFS_file *pfs_file= reinterpret_cast<PFS_file*> (file); - DBUG_ASSERT(static_cast<int> (op) >= 0); - DBUG_ASSERT(static_cast<uint> (op) < array_elements(file_operation_map)); - DBUG_ASSERT(state != NULL); + assert(static_cast<int> (op) >= 0); + assert(static_cast<uint> (op) < array_elements(file_operation_map)); + assert(state != NULL); if (unlikely(pfs_file == NULL)) return NULL; - DBUG_ASSERT(pfs_file->m_class != NULL); + assert(pfs_file->m_class != NULL); PFS_file_class *klass= pfs_file->m_class; if (! pfs_file->m_enabled) @@ -3409,9 +3409,9 @@ pfs_get_thread_file_descriptor_locker_v1(PSI_file_locker_state *state, File file, PSI_file_operation op) { int index= static_cast<int> (file); - DBUG_ASSERT(static_cast<int> (op) >= 0); - DBUG_ASSERT(static_cast<uint> (op) < array_elements(file_operation_map)); - DBUG_ASSERT(state != NULL); + assert(static_cast<int> (op) >= 0); + assert(static_cast<uint> (op) < array_elements(file_operation_map)); + assert(state != NULL); if (unlikely((index < 0) || (index >= file_handle_max))) return NULL; @@ -3434,7 +3434,7 @@ pfs_get_thread_file_descriptor_locker_v1(PSI_file_locker_state *state, if (! pfs_file->m_enabled) return NULL; - DBUG_ASSERT(pfs_file->m_class != NULL); + assert(pfs_file->m_class != NULL); PFS_file_class *klass= pfs_file->m_class; /* Needed for the LF_HASH */ @@ -3518,13 +3518,13 @@ pfs_start_socket_wait_v1(PSI_socket_locker_state *state, size_t count, const char *src_file, uint src_line) { - DBUG_ASSERT(static_cast<int> (op) >= 0); - DBUG_ASSERT(static_cast<uint> (op) < array_elements(socket_operation_map)); - DBUG_ASSERT(state != NULL); + assert(static_cast<int> (op) >= 0); + assert(static_cast<uint> (op) < array_elements(socket_operation_map)); + assert(state != NULL); PFS_socket *pfs_socket= reinterpret_cast<PFS_socket*> (socket); - DBUG_ASSERT(pfs_socket != NULL); - DBUG_ASSERT(pfs_socket->m_class != NULL); + assert(pfs_socket != NULL); + assert(pfs_socket->m_class != NULL); if (!pfs_socket->m_enabled || pfs_socket->m_idle) return NULL; @@ -3640,7 +3640,7 @@ void pfs_unlock_mutex_v1(PSI_mutex *mutex) { PFS_mutex *pfs_mutex= reinterpret_cast<PFS_mutex*> (mutex); - DBUG_ASSERT(pfs_mutex != NULL); + assert(pfs_mutex != NULL); /* Note that this code is still protected by the instrumented mutex, @@ -3676,10 +3676,10 @@ void pfs_unlock_mutex_v1(PSI_mutex *mutex) void pfs_unlock_rwlock_v1(PSI_rwlock *rwlock) { PFS_rwlock *pfs_rwlock= reinterpret_cast<PFS_rwlock*> (rwlock); - DBUG_ASSERT(pfs_rwlock != NULL); - DBUG_ASSERT(pfs_rwlock == sanitize_rwlock(pfs_rwlock)); - DBUG_ASSERT(pfs_rwlock->m_class != NULL); - DBUG_ASSERT(pfs_rwlock->m_lock.is_populated()); + assert(pfs_rwlock != NULL); + assert(pfs_rwlock == sanitize_rwlock(pfs_rwlock)); + assert(pfs_rwlock->m_class != NULL); + assert(pfs_rwlock->m_lock.is_populated()); bool last_writer= false; bool last_reader= false; @@ -3756,7 +3756,7 @@ void pfs_signal_cond_v1(PSI_cond* cond) #ifdef PFS_LATER PFS_cond *pfs_cond= reinterpret_cast<PFS_cond*> (cond); - DBUG_ASSERT(pfs_cond != NULL); + assert(pfs_cond != NULL); pfs_cond->m_cond_stat.m_signal_count++; #endif @@ -3771,7 +3771,7 @@ void pfs_broadcast_cond_v1(PSI_cond* cond) #ifdef PFS_LATER PFS_cond *pfs_cond= reinterpret_cast<PFS_cond*> (cond); - DBUG_ASSERT(pfs_cond != NULL); + assert(pfs_cond != NULL); pfs_cond->m_cond_stat.m_broadcast_count++; #endif @@ -3784,7 +3784,7 @@ void pfs_broadcast_cond_v1(PSI_cond* cond) PSI_idle_locker* pfs_start_idle_wait_v1(PSI_idle_locker_state* state, const char *src_file, uint src_line) { - DBUG_ASSERT(state != NULL); + assert(state != NULL); if (psi_unlikely(! flag_global_instrumentation)) return NULL; @@ -3805,7 +3805,7 @@ pfs_start_idle_wait_v1(PSI_idle_locker_state* state, const char *src_file, uint state->m_thread= reinterpret_cast<PSI_thread *> (pfs_thread); flags= STATE_FLAG_THREAD; - DBUG_ASSERT(pfs_thread->m_events_statements_count == 0); + assert(pfs_thread->m_events_statements_count == 0); if (global_idle_class.m_timed) { @@ -3870,7 +3870,7 @@ pfs_start_idle_wait_v1(PSI_idle_locker_state* state, const char *src_file, uint void pfs_end_idle_wait_v1(PSI_idle_locker* locker) { PSI_idle_locker_state *state= reinterpret_cast<PSI_idle_locker_state*> (locker); - DBUG_ASSERT(state != NULL); + assert(state != NULL); ulonglong timer_end= 0; ulonglong wait_time= 0; @@ -3902,7 +3902,7 @@ void pfs_end_idle_wait_v1(PSI_idle_locker* locker) if (flags & STATE_FLAG_EVENT) { PFS_events_waits *wait= reinterpret_cast<PFS_events_waits*> (state->m_wait); - DBUG_ASSERT(wait != NULL); + assert(wait != NULL); wait->m_timer_end= timer_end; wait->m_end_event_id= thread->m_event_id; @@ -3912,7 +3912,7 @@ void pfs_end_idle_wait_v1(PSI_idle_locker* locker) insert_events_waits_history_long(wait); thread->m_events_waits_current--; - DBUG_ASSERT(wait == thread->m_events_waits_current); + assert(wait == thread->m_events_waits_current); } } @@ -3935,13 +3935,13 @@ void pfs_end_idle_wait_v1(PSI_idle_locker* locker) void pfs_end_mutex_wait_v1(PSI_mutex_locker* locker, int rc) { PSI_mutex_locker_state *state= reinterpret_cast<PSI_mutex_locker_state*> (locker); - DBUG_ASSERT(state != NULL); + assert(state != NULL); ulonglong timer_end= 0; ulonglong wait_time= 0; PFS_mutex *mutex= reinterpret_cast<PFS_mutex *> (state->m_mutex); - DBUG_ASSERT(mutex != NULL); + assert(mutex != NULL); PFS_thread *thread= reinterpret_cast<PFS_thread *> (state->m_thread); uint flags= state->m_flags; @@ -3971,8 +3971,8 @@ void pfs_end_mutex_wait_v1(PSI_mutex_locker* locker, int rc) event_name_array= thread->write_instr_class_waits_stats(); uint index= mutex->m_class->m_event_name_index; - DBUG_ASSERT(index <= wait_class_max); - DBUG_ASSERT(sanitize_thread(thread) != NULL); + assert(index <= wait_class_max); + assert(sanitize_thread(thread) != NULL); if (flags & STATE_FLAG_TIMED) { @@ -3988,7 +3988,7 @@ void pfs_end_mutex_wait_v1(PSI_mutex_locker* locker, int rc) if (flags & STATE_FLAG_EVENT) { PFS_events_waits *wait= reinterpret_cast<PFS_events_waits*> (state->m_wait); - DBUG_ASSERT(wait != NULL); + assert(wait != NULL); wait->m_timer_end= timer_end; wait->m_end_event_id= thread->m_event_id; @@ -3998,7 +3998,7 @@ void pfs_end_mutex_wait_v1(PSI_mutex_locker* locker, int rc) insert_events_waits_history_long(wait); thread->m_events_waits_current--; - DBUG_ASSERT(wait == thread->m_events_waits_current); + assert(wait == thread->m_events_waits_current); } } } @@ -4010,13 +4010,13 @@ void pfs_end_mutex_wait_v1(PSI_mutex_locker* locker, int rc) void pfs_end_rwlock_rdwait_v1(PSI_rwlock_locker* locker, int rc) { PSI_rwlock_locker_state *state= reinterpret_cast<PSI_rwlock_locker_state*> (locker); - DBUG_ASSERT(state != NULL); + assert(state != NULL); ulonglong timer_end= 0; ulonglong wait_time= 0; PFS_rwlock *rwlock= reinterpret_cast<PFS_rwlock *> (state->m_rwlock); - DBUG_ASSERT(rwlock != NULL); + assert(rwlock != NULL); if (state->m_flags & STATE_FLAG_TIMED) { @@ -4049,7 +4049,7 @@ void pfs_end_rwlock_rdwait_v1(PSI_rwlock_locker* locker, int rc) if (state->m_flags & STATE_FLAG_THREAD) { PFS_thread *thread= reinterpret_cast<PFS_thread *> (state->m_thread); - DBUG_ASSERT(thread != NULL); + assert(thread != NULL); PFS_single_stat *event_name_array; event_name_array= thread->write_instr_class_waits_stats(); @@ -4069,7 +4069,7 @@ void pfs_end_rwlock_rdwait_v1(PSI_rwlock_locker* locker, int rc) if (state->m_flags & STATE_FLAG_EVENT) { PFS_events_waits *wait= reinterpret_cast<PFS_events_waits*> (state->m_wait); - DBUG_ASSERT(wait != NULL); + assert(wait != NULL); wait->m_timer_end= timer_end; wait->m_end_event_id= thread->m_event_id; @@ -4079,7 +4079,7 @@ void pfs_end_rwlock_rdwait_v1(PSI_rwlock_locker* locker, int rc) insert_events_waits_history_long(wait); thread->m_events_waits_current--; - DBUG_ASSERT(wait == thread->m_events_waits_current); + assert(wait == thread->m_events_waits_current); } } } @@ -4091,13 +4091,13 @@ void pfs_end_rwlock_rdwait_v1(PSI_rwlock_locker* locker, int rc) void pfs_end_rwlock_wrwait_v1(PSI_rwlock_locker* locker, int rc) { PSI_rwlock_locker_state *state= reinterpret_cast<PSI_rwlock_locker_state*> (locker); - DBUG_ASSERT(state != NULL); + assert(state != NULL); ulonglong timer_end= 0; ulonglong wait_time= 0; PFS_rwlock *rwlock= reinterpret_cast<PFS_rwlock *> (state->m_rwlock); - DBUG_ASSERT(rwlock != NULL); + assert(rwlock != NULL); PFS_thread *thread= reinterpret_cast<PFS_thread *> (state->m_thread); if (state->m_flags & STATE_FLAG_TIMED) @@ -4148,7 +4148,7 @@ void pfs_end_rwlock_wrwait_v1(PSI_rwlock_locker* locker, int rc) if (state->m_flags & STATE_FLAG_EVENT) { PFS_events_waits *wait= reinterpret_cast<PFS_events_waits*> (state->m_wait); - DBUG_ASSERT(wait != NULL); + assert(wait != NULL); wait->m_timer_end= timer_end; wait->m_end_event_id= thread->m_event_id; @@ -4158,7 +4158,7 @@ void pfs_end_rwlock_wrwait_v1(PSI_rwlock_locker* locker, int rc) insert_events_waits_history_long(wait); thread->m_events_waits_current--; - DBUG_ASSERT(wait == thread->m_events_waits_current); + assert(wait == thread->m_events_waits_current); } } } @@ -4170,7 +4170,7 @@ void pfs_end_rwlock_wrwait_v1(PSI_rwlock_locker* locker, int rc) void pfs_end_cond_wait_v1(PSI_cond_locker* locker, int rc) { PSI_cond_locker_state *state= reinterpret_cast<PSI_cond_locker_state*> (locker); - DBUG_ASSERT(state != NULL); + assert(state != NULL); ulonglong timer_end= 0; ulonglong wait_time= 0; @@ -4194,7 +4194,7 @@ void pfs_end_cond_wait_v1(PSI_cond_locker* locker, int rc) if (state->m_flags & STATE_FLAG_THREAD) { PFS_thread *thread= reinterpret_cast<PFS_thread *> (state->m_thread); - DBUG_ASSERT(thread != NULL); + assert(thread != NULL); PFS_single_stat *event_name_array; event_name_array= thread->write_instr_class_waits_stats(); @@ -4214,7 +4214,7 @@ void pfs_end_cond_wait_v1(PSI_cond_locker* locker, int rc) if (state->m_flags & STATE_FLAG_EVENT) { PFS_events_waits *wait= reinterpret_cast<PFS_events_waits*> (state->m_wait); - DBUG_ASSERT(wait != NULL); + assert(wait != NULL); wait->m_timer_end= timer_end; wait->m_end_event_id= thread->m_event_id; @@ -4224,7 +4224,7 @@ void pfs_end_cond_wait_v1(PSI_cond_locker* locker, int rc) insert_events_waits_history_long(wait); thread->m_events_waits_current--; - DBUG_ASSERT(wait == thread->m_events_waits_current); + assert(wait == thread->m_events_waits_current); } } } @@ -4236,19 +4236,19 @@ void pfs_end_cond_wait_v1(PSI_cond_locker* locker, int rc) void pfs_end_table_io_wait_v1(PSI_table_locker* locker, ulonglong numrows) { PSI_table_locker_state *state= reinterpret_cast<PSI_table_locker_state*> (locker); - DBUG_ASSERT(state != NULL); + assert(state != NULL); ulonglong timer_end= 0; ulonglong wait_time= 0; PFS_table *table= reinterpret_cast<PFS_table *> (state->m_table); - DBUG_ASSERT(table != NULL); + assert(table != NULL); PFS_single_stat *stat; PFS_table_io_stat *table_io_stat; - DBUG_ASSERT((state->m_index < table->m_share->m_key_count) || - (state->m_index == MAX_INDEXES)); + assert((state->m_index < table->m_share->m_key_count) || + (state->m_index == MAX_INDEXES)); table_io_stat= & table->m_table_stat.m_index_stat[state->m_index]; table_io_stat->m_has_data= true; @@ -4268,7 +4268,7 @@ void pfs_end_table_io_wait_v1(PSI_table_locker* locker, ulonglong numrows) stat= & table_io_stat->m_delete; break; default: - DBUG_ASSERT(false); + assert(false); stat= NULL; break; } @@ -4289,7 +4289,7 @@ void pfs_end_table_io_wait_v1(PSI_table_locker* locker, ulonglong numrows) if (flags & STATE_FLAG_THREAD) { PFS_thread *thread= reinterpret_cast<PFS_thread *> (state->m_thread); - DBUG_ASSERT(thread != NULL); + assert(thread != NULL); PFS_single_stat *event_name_array; event_name_array= thread->write_instr_class_waits_stats(); @@ -4310,7 +4310,7 @@ void pfs_end_table_io_wait_v1(PSI_table_locker* locker, ulonglong numrows) if (flags & STATE_FLAG_EVENT) { PFS_events_waits *wait= reinterpret_cast<PFS_events_waits*> (state->m_wait); - DBUG_ASSERT(wait != NULL); + assert(wait != NULL); wait->m_timer_end= timer_end; wait->m_end_event_id= thread->m_event_id; @@ -4321,7 +4321,7 @@ void pfs_end_table_io_wait_v1(PSI_table_locker* locker, ulonglong numrows) insert_events_waits_history_long(wait); thread->m_events_waits_current--; - DBUG_ASSERT(wait == thread->m_events_waits_current); + assert(wait == thread->m_events_waits_current); } } @@ -4335,13 +4335,13 @@ void pfs_end_table_io_wait_v1(PSI_table_locker* locker, ulonglong numrows) void pfs_end_table_lock_wait_v1(PSI_table_locker* locker) { PSI_table_locker_state *state= reinterpret_cast<PSI_table_locker_state*> (locker); - DBUG_ASSERT(state != NULL); + assert(state != NULL); ulonglong timer_end= 0; ulonglong wait_time= 0; PFS_table *table= reinterpret_cast<PFS_table *> (state->m_table); - DBUG_ASSERT(table != NULL); + assert(table != NULL); PFS_single_stat *stat= & table->m_table_stat.m_lock_stat.m_stat[state->m_index]; @@ -4361,7 +4361,7 @@ void pfs_end_table_lock_wait_v1(PSI_table_locker* locker) if (flags & STATE_FLAG_THREAD) { PFS_thread *thread= reinterpret_cast<PFS_thread *> (state->m_thread); - DBUG_ASSERT(thread != NULL); + assert(thread != NULL); PFS_single_stat *event_name_array; event_name_array= thread->write_instr_class_waits_stats(); @@ -4382,7 +4382,7 @@ void pfs_end_table_lock_wait_v1(PSI_table_locker* locker) if (flags & STATE_FLAG_EVENT) { PFS_events_waits *wait= reinterpret_cast<PFS_events_waits*> (state->m_wait); - DBUG_ASSERT(wait != NULL); + assert(wait != NULL); wait->m_timer_end= timer_end; wait->m_end_event_id= thread->m_event_id; @@ -4392,7 +4392,7 @@ void pfs_end_table_lock_wait_v1(PSI_table_locker* locker) insert_events_waits_history_long(wait); thread->m_events_waits_current--; - DBUG_ASSERT(wait == thread->m_events_waits_current); + assert(wait == thread->m_events_waits_current); } } @@ -4429,7 +4429,7 @@ pfs_end_file_open_wait_v1(PSI_file_locker *locker, void *result) { PSI_file_locker_state *state= reinterpret_cast<PSI_file_locker_state*> (locker); - DBUG_ASSERT(state != NULL); + assert(state != NULL); switch (state->m_operation) { @@ -4450,7 +4450,7 @@ pfs_end_file_open_wait_v1(PSI_file_locker *locker, } break; default: - DBUG_ASSERT(false); + assert(false); break; } @@ -4469,7 +4469,7 @@ void pfs_end_file_open_wait_and_bind_to_descriptor_v1 PFS_file *pfs_file= NULL; int index= (int) file; PSI_file_locker_state *state= reinterpret_cast<PSI_file_locker_state*> (locker); - DBUG_ASSERT(state != NULL); + assert(state != NULL); if (index >= 0) { @@ -4503,9 +4503,9 @@ void pfs_end_file_open_wait_and_bind_to_descriptor_v1 void pfs_end_temp_file_open_wait_and_bind_to_descriptor_v1 (PSI_file_locker *locker, File file, const char *filename) { - DBUG_ASSERT(filename != NULL); + assert(filename != NULL); PSI_file_locker_state *state= reinterpret_cast<PSI_file_locker_state*> (locker); - DBUG_ASSERT(state != NULL); + assert(state != NULL); /* Set filename that was generated during creation of temporary file. */ state->m_name= filename; @@ -4530,7 +4530,7 @@ void pfs_start_file_wait_v1(PSI_file_locker *locker, { ulonglong timer_start= 0; PSI_file_locker_state *state= reinterpret_cast<PSI_file_locker_state*> (locker); - DBUG_ASSERT(state != NULL); + assert(state != NULL); uint flags= state->m_flags; @@ -4543,7 +4543,7 @@ void pfs_start_file_wait_v1(PSI_file_locker *locker, if (flags & STATE_FLAG_EVENT) { PFS_events_waits *wait= reinterpret_cast<PFS_events_waits*> (state->m_wait); - DBUG_ASSERT(wait != NULL); + assert(wait != NULL); wait->m_timer_start= timer_start; wait->m_source_file= src_file; @@ -4560,7 +4560,7 @@ void pfs_end_file_wait_v1(PSI_file_locker *locker, size_t byte_count) { PSI_file_locker_state *state= reinterpret_cast<PSI_file_locker_state*> (locker); - DBUG_ASSERT(state != NULL); + assert(state != NULL); PFS_file *file= reinterpret_cast<PFS_file *> (state->m_file); PFS_file_class *klass= reinterpret_cast<PFS_file_class *> (state->m_class); PFS_thread *thread= reinterpret_cast<PFS_thread *> (state->m_thread); @@ -4611,7 +4611,7 @@ void pfs_end_file_wait_v1(PSI_file_locker *locker, byte_stat= &file_stat->m_io_stat.m_misc; break; default: - DBUG_ASSERT(false); + assert(false); byte_stat= NULL; break; } @@ -4632,7 +4632,7 @@ void pfs_end_file_wait_v1(PSI_file_locker *locker, if (flags & STATE_FLAG_THREAD) { - DBUG_ASSERT(thread != NULL); + assert(thread != NULL); PFS_single_stat *event_name_array; event_name_array= thread->write_instr_class_waits_stats(); @@ -4652,7 +4652,7 @@ void pfs_end_file_wait_v1(PSI_file_locker *locker, if (state->m_flags & STATE_FLAG_EVENT) { PFS_events_waits *wait= reinterpret_cast<PFS_events_waits*> (state->m_wait); - DBUG_ASSERT(wait != NULL); + assert(wait != NULL); wait->m_timer_end= timer_end; wait->m_number_of_bytes= bytes; @@ -4667,7 +4667,7 @@ void pfs_end_file_wait_v1(PSI_file_locker *locker, insert_events_waits_history_long(wait); thread->m_events_waits_current--; - DBUG_ASSERT(wait == thread->m_events_waits_current); + assert(wait == thread->m_events_waits_current); } } } @@ -4685,7 +4685,7 @@ void pfs_start_file_close_wait_v1(PSI_file_locker *locker, uint len; PFS_file *pfs_file; PSI_file_locker_state *state= reinterpret_cast<PSI_file_locker_state*> (locker); - DBUG_ASSERT(state != NULL); + assert(state != NULL); switch (state->m_operation) { @@ -4700,7 +4700,7 @@ void pfs_start_file_close_wait_v1(PSI_file_locker *locker, case PSI_FILE_CLOSE: break; default: - DBUG_ASSERT(false); + assert(false); break; } @@ -4716,7 +4716,7 @@ void pfs_start_file_close_wait_v1(PSI_file_locker *locker, void pfs_end_file_close_wait_v1(PSI_file_locker *locker, int rc) { PSI_file_locker_state *state= reinterpret_cast<PSI_file_locker_state*> (locker); - DBUG_ASSERT(state != NULL); + assert(state != NULL); pfs_end_file_wait_v1(locker, 0); @@ -4733,7 +4733,7 @@ void pfs_end_file_close_wait_v1(PSI_file_locker *locker, int rc) { if (file->m_temporary) { - DBUG_ASSERT(file->m_file_stat.m_open_count <= 1); + assert(file->m_file_stat.m_open_count <= 1); destroy_file(thread, file); } else @@ -4749,7 +4749,7 @@ void pfs_end_file_close_wait_v1(PSI_file_locker *locker, int rc) destroy_file(thread, file); break; default: - DBUG_ASSERT(false); + assert(false); break; } } @@ -4764,8 +4764,8 @@ void pfs_end_file_rename_wait_v1(PSI_file_locker *locker, const char *old_name, const char *new_name, int rc) { PSI_file_locker_state *state= reinterpret_cast<PSI_file_locker_state*> (locker); - DBUG_ASSERT(state != NULL); - DBUG_ASSERT(state->m_operation == PSI_FILE_RENAME); + assert(state != NULL); + assert(state->m_operation == PSI_FILE_RENAME); if (rc == 0) { @@ -5164,11 +5164,11 @@ pfs_refine_statement_v1(PSI_statement_locker *locker, PSI_statement_locker_state *state= reinterpret_cast<PSI_statement_locker_state*> (locker); if (state == NULL) return NULL; - DBUG_ASSERT(state->m_class != NULL); + assert(state->m_class != NULL); PFS_statement_class *klass; /* Only refine statements for mutable instrumentation */ klass= reinterpret_cast<PFS_statement_class*> (state->m_class); - DBUG_ASSERT(klass->is_mutable()); + assert(klass->is_mutable()); klass= find_statement_class(key); uint flags= state->m_flags; @@ -5179,7 +5179,7 @@ pfs_refine_statement_v1(PSI_statement_locker *locker, if (flags & STATE_FLAG_THREAD) { PFS_thread *pfs_thread= reinterpret_cast<PFS_thread *> (state->m_thread); - DBUG_ASSERT(pfs_thread != NULL); + assert(pfs_thread != NULL); if (pfs_thread->m_events_statements_count > 0) pfs_thread->m_events_statements_count--; } @@ -5194,7 +5194,7 @@ pfs_refine_statement_v1(PSI_statement_locker *locker, if (flags & STATE_FLAG_EVENT) { PFS_events_statements *pfs= reinterpret_cast<PFS_events_statements*> (state->m_statement); - DBUG_ASSERT(pfs != NULL); + assert(pfs != NULL); /* mutate EVENTS_STATEMENTS_CURRENT.EVENT_NAME */ pfs->m_event.m_class= klass; @@ -5210,7 +5210,7 @@ void pfs_start_statement_v1(PSI_statement_locker *locker, const char *src_file, uint src_line) { PSI_statement_locker_state *state= reinterpret_cast<PSI_statement_locker_state*> (locker); - DBUG_ASSERT(state != NULL); + assert(state != NULL); uint flags= state->m_flags; ulonglong timer_start= 0; @@ -5222,7 +5222,7 @@ void pfs_start_statement_v1(PSI_statement_locker *locker, } compile_time_assert(PSI_SCHEMA_NAME_LEN == NAME_LEN); - DBUG_ASSERT(db_len <= sizeof(state->m_schema_name)); + assert(db_len <= sizeof(state->m_schema_name)); if (db_len > 0) memcpy(state->m_schema_name, db, db_len); @@ -5231,13 +5231,13 @@ void pfs_start_statement_v1(PSI_statement_locker *locker, if (flags & STATE_FLAG_EVENT) { PFS_events_statements *pfs= reinterpret_cast<PFS_events_statements*> (state->m_statement); - DBUG_ASSERT(pfs != NULL); + assert(pfs != NULL); pfs->m_event.m_timer_start= timer_start; pfs->m_event.m_source_file= src_file; pfs->m_event.m_source_line= src_line; - DBUG_ASSERT(db_len <= sizeof(pfs->m_current_schema_name)); + assert(db_len <= sizeof(pfs->m_current_schema_name)); if (db_len > 0) memcpy(pfs->m_current_schema_name, db, db_len); pfs->m_current_schema_name_length= db_len; @@ -5248,7 +5248,7 @@ void pfs_set_statement_text_v1(PSI_statement_locker *locker, const char *text, uint text_len) { PSI_statement_locker_state *state= reinterpret_cast<PSI_statement_locker_state*> (locker); - DBUG_ASSERT(state != NULL); + assert(state != NULL); if (state->m_discarded) return; @@ -5256,7 +5256,7 @@ void pfs_set_statement_text_v1(PSI_statement_locker *locker, if (state->m_flags & STATE_FLAG_EVENT) { PFS_events_statements *pfs= reinterpret_cast<PFS_events_statements*> (state->m_statement); - DBUG_ASSERT(pfs != NULL); + assert(pfs != NULL); if (text_len > pfs_max_sqltext) { text_len= (uint)pfs_max_sqltext; @@ -5283,7 +5283,7 @@ void pfs_set_statement_text_v1(PSI_statement_locker *locker, { \ PFS_events_statements *pfs; \ pfs= reinterpret_cast<PFS_events_statements*> (state->m_statement); \ - DBUG_ASSERT(pfs != NULL); \ + assert(pfs != NULL); \ pfs->ATTR= VALUE; \ } \ return; @@ -5300,7 +5300,7 @@ void pfs_set_statement_text_v1(PSI_statement_locker *locker, { \ PFS_events_statements *pfs; \ pfs= reinterpret_cast<PFS_events_statements*> (state->m_statement); \ - DBUG_ASSERT(pfs != NULL); \ + assert(pfs != NULL); \ pfs->ATTR+= VALUE; \ } \ return; @@ -5403,14 +5403,14 @@ void pfs_end_statement_v1(PSI_statement_locker *locker, void *stmt_da) { PSI_statement_locker_state *state= reinterpret_cast<PSI_statement_locker_state*> (locker); Diagnostics_area *da= reinterpret_cast<Diagnostics_area*> (stmt_da); - DBUG_ASSERT(state != NULL); - DBUG_ASSERT(da != NULL); + assert(state != NULL); + assert(da != NULL); if (state->m_discarded) return; PFS_statement_class *klass= reinterpret_cast<PFS_statement_class *> (state->m_class); - DBUG_ASSERT(klass != NULL); + assert(klass != NULL); ulonglong timer_end= 0; ulonglong wait_time= 0; @@ -5437,7 +5437,7 @@ void pfs_end_statement_v1(PSI_statement_locker *locker, void *stmt_da) if (flags & STATE_FLAG_THREAD) { PFS_thread *thread= reinterpret_cast<PFS_thread *> (state->m_thread); - DBUG_ASSERT(thread != NULL); + assert(thread != NULL); event_name_array= thread->write_instr_class_statements_stats(); /* Aggregate to EVENTS_STATEMENTS_SUMMARY_BY_THREAD_BY_EVENT_NAME */ stat= & event_name_array[index]; @@ -5458,7 +5458,7 @@ void pfs_end_statement_v1(PSI_statement_locker *locker, void *stmt_da) if (flags & STATE_FLAG_EVENT) { PFS_events_statements *pfs= reinterpret_cast<PFS_events_statements*> (state->m_statement); - DBUG_ASSERT(pfs != NULL); + assert(pfs != NULL); pfs_dirty_state dirty_state; thread->m_stmt_lock.allocated_to_dirty(& dirty_state); @@ -5514,7 +5514,7 @@ void pfs_end_statement_v1(PSI_statement_locker *locker, void *stmt_da) if (thread->m_flag_events_statements_history_long) insert_events_statements_history_long(pfs); - DBUG_ASSERT(thread->m_events_statements_count > 0); + assert(thread->m_events_statements_count > 0); thread->m_events_statements_count--; thread->m_stmt_lock.dirty_to_allocated(& dirty_state); } @@ -5783,7 +5783,7 @@ static inline enum_object_type sp_type_to_object_type(uint sp_type) case SP_TYPE_EVENT: return OBJECT_TYPE_EVENT; default: - DBUG_ASSERT(false); + assert(false); /* Dead code */ return NO_OBJECT_TYPE; } @@ -5829,7 +5829,7 @@ void pfs_release_sp_share_v1(PSI_sp_share* sp_share) PSI_sp_locker* pfs_start_sp_v1(PSI_sp_locker_state *state, PSI_sp_share *sp_share) { - DBUG_ASSERT(state != NULL); + assert(state != NULL); if (! flag_global_instrumentation) return NULL; @@ -5867,7 +5867,7 @@ PSI_sp_locker* pfs_start_sp_v1(PSI_sp_locker_state *state, void pfs_end_sp_v1(PSI_sp_locker *locker) { PSI_sp_locker_state *state= reinterpret_cast<PSI_sp_locker_state*> (locker); - DBUG_ASSERT(state != NULL); + assert(state != NULL); ulonglong timer_end; ulonglong wait_time; @@ -5918,7 +5918,7 @@ pfs_get_thread_transaction_locker_v1(PSI_transaction_locker_state *state, my_bool read_only, my_bool autocommit) { - DBUG_ASSERT(state != NULL); + assert(state != NULL); if (!flag_global_instrumentation) return NULL; @@ -6006,7 +6006,7 @@ void pfs_start_transaction_v1(PSI_transaction_locker *locker, const char *src_file, uint src_line) { PSI_transaction_locker_state *state= reinterpret_cast<PSI_transaction_locker_state*> (locker); - DBUG_ASSERT(state != NULL); + assert(state != NULL); uint flags= state->m_flags; ulonglong timer_start= 0; @@ -6020,7 +6020,7 @@ void pfs_start_transaction_v1(PSI_transaction_locker *locker, if (flags & STATE_FLAG_EVENT) { PFS_events_transactions *pfs= reinterpret_cast<PFS_events_transactions*> (state->m_transaction); - DBUG_ASSERT(pfs != NULL); + assert(pfs != NULL); pfs->m_timer_start= timer_start; pfs->m_source_file= src_file; @@ -6036,9 +6036,9 @@ void pfs_set_transaction_gtid_v1(PSI_transaction_locker *locker, const void *gtid_spec) { PSI_transaction_locker_state *state= reinterpret_cast<PSI_transaction_locker_state*> (locker); - DBUG_ASSERT(state != NULL); - DBUG_ASSERT(sid != NULL); - DBUG_ASSERT(gtid_spec != NULL); + assert(state != NULL); + assert(sid != NULL); + assert(gtid_spec != NULL); if (state->m_flags & STATE_FLAG_EVENT) { @@ -6054,13 +6054,13 @@ void pfs_set_transaction_xid_v1(PSI_transaction_locker *locker, int xa_state) { PSI_transaction_locker_state *state= reinterpret_cast<PSI_transaction_locker_state*> (locker); - DBUG_ASSERT(state != NULL); + assert(state != NULL); if (state->m_flags & STATE_FLAG_EVENT) { PFS_events_transactions *pfs= reinterpret_cast<PFS_events_transactions*> (state->m_transaction); - DBUG_ASSERT(pfs != NULL); - DBUG_ASSERT(xid != NULL); + assert(pfs != NULL); + assert(xid != NULL); pfs->m_xid= *(PSI_xid *)xid; pfs->m_xa_state= (enum_xa_transaction_state)xa_state; @@ -6073,12 +6073,12 @@ void pfs_set_transaction_xa_state_v1(PSI_transaction_locker *locker, int xa_state) { PSI_transaction_locker_state *state= reinterpret_cast<PSI_transaction_locker_state*> (locker); - DBUG_ASSERT(state != NULL); + assert(state != NULL); if (state->m_flags & STATE_FLAG_EVENT) { PFS_events_transactions *pfs= reinterpret_cast<PFS_events_transactions*> (state->m_transaction); - DBUG_ASSERT(pfs != NULL); + assert(pfs != NULL); pfs->m_xa_state= (enum_xa_transaction_state)xa_state; pfs->m_xa= true; @@ -6089,15 +6089,15 @@ void pfs_set_transaction_xa_state_v1(PSI_transaction_locker *locker, void pfs_set_transaction_trxid_v1(PSI_transaction_locker *locker, const ulonglong *trxid) { - DBUG_ASSERT(trxid != NULL); + assert(trxid != NULL); PSI_transaction_locker_state *state= reinterpret_cast<PSI_transaction_locker_state*> (locker); - DBUG_ASSERT(state != NULL); + assert(state != NULL); if (state->m_flags & STATE_FLAG_EVENT) { PFS_events_transactions *pfs= reinterpret_cast<PFS_events_transactions*> (state->m_transaction); - DBUG_ASSERT(pfs != NULL); + assert(pfs != NULL); if (pfs->m_trxid == 0) pfs->m_trxid= *trxid; @@ -6114,7 +6114,7 @@ void pfs_set_transaction_trxid_v1(PSI_transaction_locker *locker, { \ PFS_events_transactions *pfs; \ pfs= reinterpret_cast<PFS_events_transactions*> (state->m_transaction); \ - DBUG_ASSERT(pfs != NULL); \ + assert(pfs != NULL); \ pfs->ATTR+= VALUE; \ } \ return; @@ -6141,7 +6141,7 @@ void pfs_inc_transaction_release_savepoint_v1(PSI_transaction_locker *locker, void pfs_end_transaction_v1(PSI_transaction_locker *locker, my_bool commit) { PSI_transaction_locker_state *state= reinterpret_cast<PSI_transaction_locker_state*> (locker); - DBUG_ASSERT(state != NULL); + assert(state != NULL); ulonglong timer_end= 0; ulonglong wait_time= 0; @@ -6158,7 +6158,7 @@ void pfs_end_transaction_v1(PSI_transaction_locker *locker, my_bool commit) if (flags & STATE_FLAG_THREAD) { PFS_thread *pfs_thread= reinterpret_cast<PFS_thread *> (state->m_thread); - DBUG_ASSERT(pfs_thread != NULL); + assert(pfs_thread != NULL); /* Aggregate to EVENTS_TRANSACTIONS_SUMMARY_BY_THREAD_BY_EVENT_NAME */ stat= &pfs_thread->write_instr_class_transactions_stats()[GLOBAL_TRANSACTION_INDEX]; @@ -6166,7 +6166,7 @@ void pfs_end_transaction_v1(PSI_transaction_locker *locker, my_bool commit) if (flags & STATE_FLAG_EVENT) { PFS_events_transactions *pfs= reinterpret_cast<PFS_events_transactions*> (state->m_transaction); - DBUG_ASSERT(pfs != NULL); + assert(pfs != NULL); /* events_transactions_current may have been cleared while the transaction was active */ if (unlikely(pfs->m_class == NULL)) @@ -6222,10 +6222,10 @@ void pfs_end_transaction_v1(PSI_transaction_locker *locker, my_bool commit) void pfs_end_socket_wait_v1(PSI_socket_locker *locker, size_t byte_count) { PSI_socket_locker_state *state= reinterpret_cast<PSI_socket_locker_state*> (locker); - DBUG_ASSERT(state != NULL); + assert(state != NULL); PFS_socket *socket= reinterpret_cast<PFS_socket *>(state->m_socket); - DBUG_ASSERT(socket != NULL); + assert(socket != NULL); ulonglong timer_end= 0; ulonglong wait_time= 0; @@ -6260,7 +6260,7 @@ void pfs_end_socket_wait_v1(PSI_socket_locker *locker, size_t byte_count) byte_stat= &socket->m_socket_stat.m_io_stat.m_misc; break; default: - DBUG_ASSERT(false); + assert(false); byte_stat= NULL; break; } @@ -6284,9 +6284,9 @@ void pfs_end_socket_wait_v1(PSI_socket_locker *locker, size_t byte_count) if (flags & STATE_FLAG_EVENT) { PFS_thread *thread= reinterpret_cast<PFS_thread *>(state->m_thread); - DBUG_ASSERT(thread != NULL); + assert(thread != NULL); PFS_events_waits *wait= reinterpret_cast<PFS_events_waits*> (state->m_wait); - DBUG_ASSERT(wait != NULL); + assert(wait != NULL); wait->m_timer_end= timer_end; wait->m_end_event_id= thread->m_event_id; @@ -6298,17 +6298,17 @@ void pfs_end_socket_wait_v1(PSI_socket_locker *locker, size_t byte_count) insert_events_waits_history_long(wait); thread->m_events_waits_current--; - DBUG_ASSERT(wait == thread->m_events_waits_current); + assert(wait == thread->m_events_waits_current); } } void pfs_set_socket_state_v1(PSI_socket *socket, PSI_socket_state state) { - DBUG_ASSERT((state == PSI_SOCKET_STATE_IDLE) || (state == PSI_SOCKET_STATE_ACTIVE)); + assert((state == PSI_SOCKET_STATE_IDLE) || (state == PSI_SOCKET_STATE_ACTIVE)); PFS_socket *pfs= reinterpret_cast<PFS_socket*>(socket); - DBUG_ASSERT(pfs != NULL); - DBUG_ASSERT(pfs->m_idle || (state == PSI_SOCKET_STATE_IDLE)); - DBUG_ASSERT(!pfs->m_idle || (state == PSI_SOCKET_STATE_ACTIVE)); + assert(pfs != NULL); + assert(pfs->m_idle || (state == PSI_SOCKET_STATE_IDLE)); + assert(!pfs->m_idle || (state == PSI_SOCKET_STATE_ACTIVE)); pfs->m_idle= (state == PSI_SOCKET_STATE_IDLE); } @@ -6321,7 +6321,7 @@ void pfs_set_socket_info_v1(PSI_socket *socket, socklen_t addr_len) { PFS_socket *pfs= reinterpret_cast<PFS_socket*>(socket); - DBUG_ASSERT(pfs != NULL); + assert(pfs != NULL); /** Set socket descriptor */ if (fd != NULL) @@ -6347,7 +6347,7 @@ void pfs_set_socket_info_v1(PSI_socket *socket, void pfs_set_socket_thread_owner_v1(PSI_socket *socket) { PFS_socket *pfs_socket= reinterpret_cast<PFS_socket*>(socket); - DBUG_ASSERT(pfs_socket != NULL); + assert(pfs_socket != NULL); pfs_socket->m_thread_owner= my_thread_get_THR_PFS(); } @@ -6356,7 +6356,7 @@ pfs_digest_start_v1(PSI_statement_locker *locker) { PSI_statement_locker_state *statement_state; statement_state= reinterpret_cast<PSI_statement_locker_state*> (locker); - DBUG_ASSERT(statement_state != NULL); + assert(statement_state != NULL); if (statement_state->m_discarded) return NULL; @@ -6373,8 +6373,8 @@ void pfs_digest_end_v1(PSI_digest_locker *locker, const sql_digest_storage *dige { PSI_statement_locker_state *statement_state; statement_state= reinterpret_cast<PSI_statement_locker_state*> (locker); - DBUG_ASSERT(statement_state != NULL); - DBUG_ASSERT(digest != NULL); + assert(statement_state != NULL); + assert(digest != NULL); if (statement_state->m_discarded) return; @@ -6413,7 +6413,7 @@ void pfs_execute_prepared_stmt_v1 (PSI_statement_locker *locker, PSI_prepared_stmt* ps) { PSI_statement_locker_state *state= reinterpret_cast<PSI_statement_locker_state*> (locker); - DBUG_ASSERT(state != NULL); + assert(state != NULL); state->m_parent_prepared_stmt= ps; state->m_in_prepare= false; @@ -6445,7 +6445,7 @@ int pfs_set_thread_connect_attrs_v1(const char *buffer, uint length, { PFS_thread *thd= my_thread_get_THR_PFS(); - DBUG_ASSERT(buffer != NULL); + assert(buffer != NULL); if (likely(thd != NULL) && session_connect_attrs_size_per_thread > 0) { @@ -6482,7 +6482,7 @@ void pfs_register_memory_v1(const char *category, PSI_memory_key pfs_memory_alloc_v1(PSI_memory_key key, size_t size, PSI_thread **owner) { PFS_thread ** owner_thread= reinterpret_cast<PFS_thread**>(owner); - DBUG_ASSERT(owner_thread != NULL); + assert(owner_thread != NULL); if (! flag_global_instrumentation) { @@ -6552,7 +6552,7 @@ PSI_memory_key pfs_memory_alloc_v1(PSI_memory_key key, size_t size, PSI_thread * PSI_memory_key pfs_memory_realloc_v1(PSI_memory_key key, size_t old_size, size_t new_size, PSI_thread **owner) { PFS_thread ** owner_thread_hdl= reinterpret_cast<PFS_thread**>(owner); - DBUG_ASSERT(owner != NULL); + assert(owner != NULL); PFS_memory_class *klass= find_memory_class(key); if (klass == NULL) @@ -6630,7 +6630,7 @@ PSI_memory_key pfs_memory_realloc_v1(PSI_memory_key key, size_t old_size, size_t PSI_memory_key pfs_memory_claim_v1(PSI_memory_key key, size_t size, PSI_thread **owner) { PFS_thread ** owner_thread= reinterpret_cast<PFS_thread**>(owner); - DBUG_ASSERT(owner_thread != NULL); + assert(owner_thread != NULL); PFS_memory_class *klass= find_memory_class(key); if (klass == NULL) @@ -6762,7 +6762,7 @@ void pfs_unlock_table_v1(PSI_table *table) { PFS_table *pfs_table= reinterpret_cast<PFS_table*> (table); - DBUG_ASSERT(pfs_table != NULL); + assert(pfs_table != NULL); pfs_table->m_internal_lock= PFS_TL_NONE; return; @@ -6806,7 +6806,7 @@ void pfs_set_metadata_lock_status_v1(PSI_metadata_lock *lock, opaque_mdl_status mdl_status) { PFS_metadata_lock *pfs= reinterpret_cast<PFS_metadata_lock*> (lock); - DBUG_ASSERT(pfs != NULL); + assert(pfs != NULL); pfs->m_mdl_status= mdl_status; } @@ -6814,7 +6814,7 @@ void pfs_destroy_metadata_lock_v1(PSI_metadata_lock *lock) { PFS_metadata_lock *pfs= reinterpret_cast<PFS_metadata_lock*> (lock); - DBUG_ASSERT(pfs != NULL); + assert(pfs != NULL); destroy_metadata_lock(pfs); } @@ -6825,8 +6825,8 @@ pfs_start_metadata_wait_v1(PSI_metadata_locker_state *state, uint src_line) { PFS_metadata_lock *pfs_lock= reinterpret_cast<PFS_metadata_lock*> (lock); - DBUG_ASSERT(state != NULL); - DBUG_ASSERT(pfs_lock != NULL); + assert(state != NULL); + assert(pfs_lock != NULL); if (! pfs_lock->m_enabled) return NULL; @@ -6915,7 +6915,7 @@ pfs_end_metadata_wait_v1(PSI_metadata_locker *locker, int rc) { PSI_metadata_locker_state *state= reinterpret_cast<PSI_metadata_locker_state*> (locker); - DBUG_ASSERT(state != NULL); + assert(state != NULL); ulonglong timer_end= 0; ulonglong wait_time= 0; @@ -6949,7 +6949,7 @@ pfs_end_metadata_wait_v1(PSI_metadata_locker *locker, if (flags & STATE_FLAG_EVENT) { PFS_events_waits *wait= reinterpret_cast<PFS_events_waits*> (state->m_wait); - DBUG_ASSERT(wait != NULL); + assert(wait != NULL); wait->m_timer_end= timer_end; wait->m_end_event_id= thread->m_event_id; @@ -6959,7 +6959,7 @@ pfs_end_metadata_wait_v1(PSI_metadata_locker *locker, insert_events_waits_history_long(wait); thread->m_events_waits_current--; - DBUG_ASSERT(wait == thread->m_events_waits_current); + assert(wait == thread->m_events_waits_current); } } else diff --git a/storage/perfschema/pfs.h b/storage/perfschema/pfs.h index 69b23be4206..3525f27724f 100644 --- a/storage/perfschema/pfs.h +++ b/storage/perfschema/pfs.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/pfs_account.cc b/storage/perfschema/pfs_account.cc index b6090d064c9..abf31a6bc55 100644 --- a/storage/perfschema/pfs_account.cc +++ b/storage/perfschema/pfs_account.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -74,9 +74,9 @@ static uchar *account_hash_get_key(const uchar *entry, size_t *length, const PFS_account *account; const void *result; typed_entry= reinterpret_cast<const PFS_account* const *> (entry); - DBUG_ASSERT(typed_entry != NULL); + assert(typed_entry != NULL); account= *typed_entry; - DBUG_ASSERT(account != NULL); + assert(account != NULL); *length= account->m_key.m_key_length; result= account->m_key.m_hash_key; return const_cast<uchar*> (reinterpret_cast<const uchar*> (result)); @@ -123,8 +123,8 @@ static void set_account_key(PFS_account_key *key, const char *user, uint user_length, const char *host, uint host_length) { - DBUG_ASSERT(user_length <= USERNAME_LENGTH); - DBUG_ASSERT(host_length <= HOSTNAME_LENGTH); + assert(user_length <= USERNAME_LENGTH); + assert(host_length <= HOSTNAME_LENGTH); char *ptr= &key->m_hash_key[0]; if (user_length > 0) @@ -653,7 +653,7 @@ void purge_account(PFS_thread *thread, PFS_account *account) account->m_key.m_key_length)); if (entry && (entry != MY_ERRPTR)) { - DBUG_ASSERT(*entry == account); + assert(*entry == account); if (account->get_refcount() == 0) { lf_hash_delete(&account_hash, pins, diff --git a/storage/perfschema/pfs_account.h b/storage/perfschema/pfs_account.h index 8a966f4c4a9..c98ff5d2740 100644 --- a/storage/perfschema/pfs_account.h +++ b/storage/perfschema/pfs_account.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/pfs_atomic.h b/storage/perfschema/pfs_atomic.h index 959b66dccb2..52c96527c3f 100644 --- a/storage/perfschema/pfs_atomic.h +++ b/storage/perfschema/pfs_atomic.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2009, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/pfs_autosize.cc b/storage/perfschema/pfs_autosize.cc index 024f5519c0e..65d0458220a 100644 --- a/storage/perfschema/pfs_autosize.cc +++ b/storage/perfschema/pfs_autosize.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2012, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -253,15 +253,15 @@ void pfs_automated_sizing(PFS_global_param *param) heuristic= estimate_hints(param); apply_heuristic(param, heuristic); - DBUG_ASSERT(param->m_events_waits_history_sizing >= 0); - DBUG_ASSERT(param->m_events_waits_history_long_sizing >= 0); - DBUG_ASSERT(param->m_events_stages_history_sizing >= 0); - DBUG_ASSERT(param->m_events_stages_history_long_sizing >= 0); - DBUG_ASSERT(param->m_events_statements_history_sizing >= 0); - DBUG_ASSERT(param->m_events_statements_history_long_sizing >= 0); - DBUG_ASSERT(param->m_events_transactions_history_sizing >= 0); - DBUG_ASSERT(param->m_events_transactions_history_long_sizing >= 0); - DBUG_ASSERT(param->m_session_connect_attrs_sizing >= 0); + assert(param->m_events_waits_history_sizing >= 0); + assert(param->m_events_waits_history_long_sizing >= 0); + assert(param->m_events_stages_history_sizing >= 0); + assert(param->m_events_stages_history_long_sizing >= 0); + assert(param->m_events_statements_history_sizing >= 0); + assert(param->m_events_statements_history_long_sizing >= 0); + assert(param->m_events_transactions_history_sizing >= 0); + assert(param->m_events_transactions_history_long_sizing >= 0); + assert(param->m_session_connect_attrs_sizing >= 0); } else { diff --git a/storage/perfschema/pfs_buffer_container.cc b/storage/perfschema/pfs_buffer_container.cc index cd87cb247e2..7d1d74541d1 100644 --- a/storage/perfschema/pfs_buffer_container.cc +++ b/storage/perfschema/pfs_buffer_container.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2014, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/pfs_buffer_container.h b/storage/perfschema/pfs_buffer_container.h index 141cbdf2999..5baed2f872c 100644 --- a/storage/perfschema/pfs_buffer_container.h +++ b/storage/perfschema/pfs_buffer_container.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2014, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -159,7 +159,7 @@ public: void free_array(array_type *array) { - DBUG_ASSERT(array->m_max > 0); + assert(array->m_max > 0); PFS_FREE_ARRAY(m_builtin_class, array->m_max, sizeof(T), array->m_ptr); @@ -259,7 +259,7 @@ public: iterator_type iterate(uint index) { - DBUG_ASSERT(index <= m_max); + assert(index <= m_max); return PFS_buffer_iterator<T, U, V>(this, index); } @@ -319,7 +319,7 @@ public: inline value_type* get(uint index) { - DBUG_ASSERT(index < m_max); + assert(index < m_max); value_type *pfs= m_array.m_ptr + index; if (pfs->m_lock.is_populated()) @@ -364,7 +364,7 @@ public: private: value_type* scan_next(uint & index, uint * found_index) { - DBUG_ASSERT(index <= m_max); + assert(index <= m_max); value_type *pfs_first= m_array.get_first(); value_type *pfs= pfs_first + index; @@ -480,9 +480,9 @@ public: m_full= false; } - DBUG_ASSERT(m_max_page_count <= PFS_PAGE_COUNT); - DBUG_ASSERT(0 < m_last_page_size); - DBUG_ASSERT(m_last_page_size <= PFS_PAGE_SIZE); + assert(m_max_page_count <= PFS_PAGE_COUNT); + assert(0 < m_last_page_size); + assert(m_last_page_size <= PFS_PAGE_SIZE); pthread_mutex_init(& m_critical_section, NULL); return 0; @@ -693,7 +693,7 @@ public: // ================================================================== } - DBUG_ASSERT(array != NULL); + assert(array != NULL); pfs= array->allocate(dirty_state); if (pfs != NULL) { @@ -754,7 +754,7 @@ public: iterator_type iterate(uint index) { - DBUG_ASSERT(index <= m_max); + assert(index <= m_max); return PFS_buffer_scalable_iterator<T, PFS_PAGE_SIZE, PFS_PAGE_COUNT, U, V>(this, index); } @@ -862,7 +862,7 @@ public: value_type* get(uint index) { - DBUG_ASSERT(index < m_max); + assert(index < m_max); uint index_1= index / PFS_PAGE_SIZE; array_type *page= m_pages[index_1]; @@ -959,13 +959,13 @@ private: { if (page_index + 1 < m_max_page_count) return PFS_PAGE_SIZE; - DBUG_ASSERT(page_index + 1 == m_max_page_count); + assert(page_index + 1 == m_max_page_count); return m_last_page_size; } value_type* scan_next(uint & index, uint * found_index) { - DBUG_ASSERT(index <= m_max); + assert(index <= m_max); uint index_1= index / PFS_PAGE_SIZE; uint index_2= index % PFS_PAGE_SIZE; @@ -1180,7 +1180,7 @@ public: value_type *allocate(pfs_dirty_state *dirty_state, uint partition) { - DBUG_ASSERT(partition < PFS_PARTITION_COUNT); + assert(partition < PFS_PARTITION_COUNT); return m_partitions[partition]->allocate(dirty_state); } @@ -1309,7 +1309,7 @@ private: value_type* scan_next(uint & partition_index, uint & sub_index, uint * found_partition, uint * found_sub_index) { value_type *record= NULL; - DBUG_ASSERT(partition_index < PFS_PARTITION_COUNT); + assert(partition_index < PFS_PARTITION_COUNT); while (partition_index < PFS_PARTITION_COUNT) { diff --git a/storage/perfschema/pfs_builtin_memory.cc b/storage/perfschema/pfs_builtin_memory.cc index 676a9094976..354de87f05f 100644 --- a/storage/perfschema/pfs_builtin_memory.cc +++ b/storage/perfschema/pfs_builtin_memory.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2014, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/pfs_builtin_memory.h b/storage/perfschema/pfs_builtin_memory.h index 1c00275d5b9..2c9da9dd4a0 100644 --- a/storage/perfschema/pfs_builtin_memory.h +++ b/storage/perfschema/pfs_builtin_memory.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2014, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/pfs_column_types.h b/storage/perfschema/pfs_column_types.h index e4577fdb22e..146c9c8054e 100644 --- a/storage/perfschema/pfs_column_types.h +++ b/storage/perfschema/pfs_column_types.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/pfs_column_values.cc b/storage/perfschema/pfs_column_values.cc index 9ce9b3b416d..02c939d4274 100644 --- a/storage/perfschema/pfs_column_values.cc +++ b/storage/perfschema/pfs_column_values.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/pfs_column_values.h b/storage/perfschema/pfs_column_values.h index ea3d9eb97c3..b06f7a0130b 100644 --- a/storage/perfschema/pfs_column_values.h +++ b/storage/perfschema/pfs_column_values.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/pfs_con_slice.cc b/storage/perfschema/pfs_con_slice.cc index 3733ad9e3d0..eaa65d524ba 100644 --- a/storage/perfschema/pfs_con_slice.cc +++ b/storage/perfschema/pfs_con_slice.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/pfs_con_slice.h b/storage/perfschema/pfs_con_slice.h index 56497ffe771..f28c40f884c 100644 --- a/storage/perfschema/pfs_con_slice.h +++ b/storage/perfschema/pfs_con_slice.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/pfs_defaults.cc b/storage/perfschema/pfs_defaults.cc index 0b615773089..522beb890eb 100644 --- a/storage/perfschema/pfs_defaults.cc +++ b/storage/perfschema/pfs_defaults.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/pfs_defaults.h b/storage/perfschema/pfs_defaults.h index 7751b55b83b..34ac1b0955a 100644 --- a/storage/perfschema/pfs_defaults.h +++ b/storage/perfschema/pfs_defaults.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/pfs_digest.cc b/storage/perfschema/pfs_digest.cc index 6f0b93f9393..43375c753dd 100644 --- a/storage/perfschema/pfs_digest.cc +++ b/storage/perfschema/pfs_digest.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -152,9 +152,9 @@ static uchar *digest_hash_get_key(const uchar *entry, size_t *length, const PFS_statements_digest_stat *digest; const void *result; typed_entry= reinterpret_cast<const PFS_statements_digest_stat*const*>(entry); - DBUG_ASSERT(typed_entry != NULL); + assert(typed_entry != NULL); digest= *typed_entry; - DBUG_ASSERT(digest != NULL); + assert(digest != NULL); *length= sizeof (PFS_digest_key); result= & digest->m_digest_key; return const_cast<uchar*> (reinterpret_cast<const uchar*> (result)); @@ -204,7 +204,7 @@ find_or_create_digest(PFS_thread *thread, const char *schema_name, uint schema_name_length) { - DBUG_ASSERT(digest_storage != NULL); + assert(digest_storage != NULL); if (statements_digest_stat_array == NULL) return NULL; @@ -282,7 +282,7 @@ search: } /* Add a new record in digest stat array. */ - DBUG_ASSERT(safe_index < digest_max); + assert(safe_index < digest_max); pfs= &statements_digest_stat_array[safe_index]; if (pfs->m_lock.is_free()) diff --git a/storage/perfschema/pfs_digest.h b/storage/perfschema/pfs_digest.h index 39fe6109c20..e99bdfebf57 100644 --- a/storage/perfschema/pfs_digest.h +++ b/storage/perfschema/pfs_digest.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2011, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/pfs_engine_table.cc b/storage/perfschema/pfs_engine_table.cc index c0b91cbb3b0..afd69ba8920 100644 --- a/storage/perfschema/pfs_engine_table.cc +++ b/storage/perfschema/pfs_engine_table.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2019, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -146,13 +146,13 @@ bool PFS_table_context::initialize(void) { /* Restore context from TLS. */ PFS_table_context *context= static_cast<PFS_table_context *>(my_get_thread_local(m_thr_key)); - DBUG_ASSERT(context != NULL); + assert(context != NULL); if(context) { m_last_version= context->m_current_version; m_map= context->m_map; - DBUG_ASSERT(m_map_size == context->m_map_size); + assert(m_map_size == context->m_map_size); m_map_size= context->m_map_size; } } @@ -160,7 +160,7 @@ bool PFS_table_context::initialize(void) { /* Check that TLS is not in use. */ PFS_table_context *context= static_cast<PFS_table_context *>(my_get_thread_local(m_thr_key)); - //DBUG_ASSERT(context == NULL); + //assert(context == NULL); context= this; @@ -525,28 +525,28 @@ void PFS_engine_table::get_normalizer(PFS_instr_class *instr_class) void PFS_engine_table::set_field_long(Field *f, long value) { - DBUG_ASSERT(f->real_type() == MYSQL_TYPE_LONG); + assert(f->real_type() == MYSQL_TYPE_LONG); Field_long *f2= (Field_long*) f; f2->store(value, false); } void PFS_engine_table::set_field_ulong(Field *f, ulong value) { - DBUG_ASSERT(f->real_type() == MYSQL_TYPE_LONG); + assert(f->real_type() == MYSQL_TYPE_LONG); Field_long *f2= (Field_long*) f; f2->store(value, true); } void PFS_engine_table::set_field_longlong(Field *f, longlong value) { - DBUG_ASSERT(f->real_type() == MYSQL_TYPE_LONGLONG); + assert(f->real_type() == MYSQL_TYPE_LONGLONG); Field_longlong *f2= (Field_longlong*) f; f2->store(value, false); } void PFS_engine_table::set_field_ulonglong(Field *f, ulonglong value) { - DBUG_ASSERT(f->real_type() == MYSQL_TYPE_LONGLONG); + assert(f->real_type() == MYSQL_TYPE_LONGLONG); Field_longlong *f2= (Field_longlong*) f; f2->store(value, true); } @@ -554,7 +554,7 @@ void PFS_engine_table::set_field_ulonglong(Field *f, ulonglong value) void PFS_engine_table::set_field_char_utf8(Field *f, const char* str, uint len) { - DBUG_ASSERT(f->real_type() == MYSQL_TYPE_STRING); + assert(f->real_type() == MYSQL_TYPE_STRING); Field_string *f2= (Field_string*) f; f2->store(str, len, &my_charset_utf8mb3_bin); } @@ -564,7 +564,7 @@ void PFS_engine_table::set_field_varchar(Field *f, const char* str, uint len) { - DBUG_ASSERT(f->real_type() == MYSQL_TYPE_VARCHAR); + assert(f->real_type() == MYSQL_TYPE_VARCHAR); Field_varstring *f2= (Field_varstring*) f; f2->store(str, len, cs); } @@ -572,7 +572,7 @@ void PFS_engine_table::set_field_varchar(Field *f, void PFS_engine_table::set_field_varchar_utf8(Field *f, const char* str, uint len) { - DBUG_ASSERT(f->real_type() == MYSQL_TYPE_VARCHAR); + assert(f->real_type() == MYSQL_TYPE_VARCHAR); Field_varstring *f2= (Field_varstring*) f; f2->store(str, len, &my_charset_utf8mb3_bin); } @@ -580,7 +580,7 @@ void PFS_engine_table::set_field_varchar_utf8(Field *f, const char* str, void PFS_engine_table::set_field_longtext_utf8(Field *f, const char* str, uint len) { - DBUG_ASSERT(f->real_type() == MYSQL_TYPE_BLOB); + assert(f->real_type() == MYSQL_TYPE_BLOB); Field_blob *f2= (Field_blob*) f; f2->store(str, len, &my_charset_utf8mb3_bin); } @@ -588,14 +588,14 @@ void PFS_engine_table::set_field_longtext_utf8(Field *f, const char* str, void PFS_engine_table::set_field_blob(Field *f, const char* val, uint len) { - DBUG_ASSERT(f->real_type() == MYSQL_TYPE_BLOB); + assert(f->real_type() == MYSQL_TYPE_BLOB); Field_blob *f2= (Field_blob*) f; f2->store(val, len, &my_charset_utf8mb3_bin); } void PFS_engine_table::set_field_enum(Field *f, ulonglong value) { - DBUG_ASSERT(f->real_type() == MYSQL_TYPE_ENUM); + assert(f->real_type() == MYSQL_TYPE_ENUM); Field_enum *f2= (Field_enum*) f; f2->store_type(value); } @@ -609,14 +609,14 @@ void PFS_engine_table::set_field_timestamp(Field *f, ulonglong value) void PFS_engine_table::set_field_double(Field *f, double value) { - DBUG_ASSERT(f->real_type() == MYSQL_TYPE_DOUBLE); + assert(f->real_type() == MYSQL_TYPE_DOUBLE); Field_double *f2= (Field_double*) f; f2->store(value); } ulonglong PFS_engine_table::get_field_enum(Field *f) { - DBUG_ASSERT(f->real_type() == MYSQL_TYPE_ENUM); + assert(f->real_type() == MYSQL_TYPE_ENUM); Field_enum *f2= (Field_enum*) f; return f2->val_int(); } @@ -624,7 +624,7 @@ ulonglong PFS_engine_table::get_field_enum(Field *f) String* PFS_engine_table::get_field_char_utf8(Field *f, String *val) { - DBUG_ASSERT(f->real_type() == MYSQL_TYPE_STRING); + assert(f->real_type() == MYSQL_TYPE_STRING); Field_string *f2= (Field_string*) f; val= f2->val_str(NULL, val); return val; @@ -633,7 +633,7 @@ PFS_engine_table::get_field_char_utf8(Field *f, String *val) String* PFS_engine_table::get_field_varchar_utf8(Field *f, String *val) { - DBUG_ASSERT(f->real_type() == MYSQL_TYPE_VARCHAR); + assert(f->real_type() == MYSQL_TYPE_VARCHAR); Field_varstring *f2= (Field_varstring*) f; val= f2->val_str(NULL, val); return val; @@ -729,7 +729,7 @@ static bool allow_drop_table_privilege() { return false; } - DBUG_ASSERT(thd->lex != NULL); + assert(thd->lex != NULL); if ((thd->lex->sql_command != SQLCOM_TRUNCATE) && (thd->lex->sql_command != SQLCOM_GRANT)) { return false; diff --git a/storage/perfschema/pfs_engine_table.h b/storage/perfschema/pfs_engine_table.h index 883ff07c36c..925a2186a92 100644 --- a/storage/perfschema/pfs_engine_table.h +++ b/storage/perfschema/pfs_engine_table.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/pfs_events.h b/storage/perfschema/pfs_events.h index 6d4a28936ff..fbe65d6ebad 100644 --- a/storage/perfschema/pfs_events.h +++ b/storage/perfschema/pfs_events.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/pfs_events_stages.cc b/storage/perfschema/pfs_events_stages.cc index e5a6b9a2007..087e5a1c55f 100644 --- a/storage/perfschema/pfs_events_stages.cc +++ b/storage/perfschema/pfs_events_stages.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -101,7 +101,7 @@ void insert_events_stages_history(PFS_thread *thread, PFS_events_stages *stage) if (unlikely(events_stages_history_per_thread == 0)) return; - DBUG_ASSERT(thread->m_stages_history != NULL); + assert(thread->m_stages_history != NULL); uint index= thread->m_stages_history_index; @@ -133,7 +133,7 @@ void insert_events_stages_history_long(PFS_events_stages *stage) if (unlikely(events_stages_history_long_size == 0)) return; - DBUG_ASSERT(events_stages_history_long_array != NULL); + assert(events_stages_history_long_array != NULL); uint index= PFS_atomic::add_u32(&events_stages_history_long_index.m_u32, 1); diff --git a/storage/perfschema/pfs_events_stages.h b/storage/perfschema/pfs_events_stages.h index 0b7d27ded82..eeae350ddf4 100644 --- a/storage/perfschema/pfs_events_stages.h +++ b/storage/perfschema/pfs_events_stages.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/pfs_events_statements.cc b/storage/perfschema/pfs_events_statements.cc index 7c1ac8b1d5b..37b179e8924 100644 --- a/storage/perfschema/pfs_events_statements.cc +++ b/storage/perfschema/pfs_events_statements.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -179,7 +179,7 @@ void insert_events_statements_history(PFS_thread *thread, PFS_events_statements if (unlikely(events_statements_history_per_thread == 0)) return; - DBUG_ASSERT(thread->m_statements_history != NULL); + assert(thread->m_statements_history != NULL); uint index= thread->m_statements_history_index; @@ -211,7 +211,7 @@ void insert_events_statements_history_long(PFS_events_statements *statement) if (unlikely(events_statements_history_long_size == 0)) return ; - DBUG_ASSERT(events_statements_history_long_array != NULL); + assert(events_statements_history_long_array != NULL); uint index= PFS_atomic::add_u32(&events_statements_history_long_index.m_u32, 1); diff --git a/storage/perfschema/pfs_events_statements.h b/storage/perfschema/pfs_events_statements.h index a21e1c4980c..2b2426ef7d1 100644 --- a/storage/perfschema/pfs_events_statements.h +++ b/storage/perfschema/pfs_events_statements.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/pfs_events_transactions.cc b/storage/perfschema/pfs_events_transactions.cc index 884234913e8..8b83b71c96b 100644 --- a/storage/perfschema/pfs_events_transactions.cc +++ b/storage/perfschema/pfs_events_transactions.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2013, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -101,7 +101,7 @@ void insert_events_transactions_history(PFS_thread *thread, PFS_events_transacti if (unlikely(events_transactions_history_per_thread == 0)) return; - DBUG_ASSERT(thread->m_transactions_history != NULL); + assert(thread->m_transactions_history != NULL); uint index= thread->m_transactions_history_index; @@ -133,7 +133,7 @@ void insert_events_transactions_history_long(PFS_events_transactions *transactio if (unlikely(events_transactions_history_long_size == 0)) return ; - DBUG_ASSERT(events_transactions_history_long_array != NULL); + assert(events_transactions_history_long_array != NULL); uint index= PFS_atomic::add_u32(&events_transactions_history_long_index.m_u32, 1); @@ -252,7 +252,7 @@ bool xid_printable(PSI_xid *xid, size_t offset, size_t length) if (xid->is_null()) return false; - DBUG_ASSERT(offset + length <= MYSQL_XIDDATASIZE); + assert(offset + length <= MYSQL_XIDDATASIZE); unsigned char *c= (unsigned char*)&xid->data + offset; diff --git a/storage/perfschema/pfs_events_transactions.h b/storage/perfschema/pfs_events_transactions.h index dc4fd8b0b60..57e57e70210 100644 --- a/storage/perfschema/pfs_events_transactions.h +++ b/storage/perfschema/pfs_events_transactions.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2013, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/pfs_events_waits.cc b/storage/perfschema/pfs_events_waits.cc index b51ee5fd2c8..14f6d743764 100644 --- a/storage/perfschema/pfs_events_waits.cc +++ b/storage/perfschema/pfs_events_waits.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/pfs_events_waits.h b/storage/perfschema/pfs_events_waits.h index 87e43459d00..8a7355f2d32 100644 --- a/storage/perfschema/pfs_events_waits.h +++ b/storage/perfschema/pfs_events_waits.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.. Copyright (c) 2017, 2019, MariaDB Corporation. This program is free software; you can redistribute it and/or modify diff --git a/storage/perfschema/pfs_global.cc b/storage/perfschema/pfs_global.cc index 26cb693d441..1f9d24eea4e 100644 --- a/storage/perfschema/pfs_global.cc +++ b/storage/perfschema/pfs_global.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify @@ -59,8 +59,8 @@ bool pfs_initialized= false; */ void *pfs_malloc(PFS_builtin_memory_class *klass, size_t size, myf flags) { - DBUG_ASSERT(klass != NULL); - DBUG_ASSERT(size > 0); + assert(klass != NULL); + assert(size > 0); void *ptr= NULL; @@ -137,9 +137,9 @@ void pfs_free(PFS_builtin_memory_class *klass, size_t size, void *ptr) */ void *pfs_malloc_array(PFS_builtin_memory_class *klass, size_t n, size_t size, myf flags) { - DBUG_ASSERT(klass != NULL); - DBUG_ASSERT(n > 0); - DBUG_ASSERT(size > 0); + assert(klass != NULL); + assert(n > 0); + assert(size > 0); void *ptr= NULL; size_t array_size= n * size; /* Check for overflow before allocating. */ @@ -172,7 +172,7 @@ void pfs_free_array(PFS_builtin_memory_class *klass, size_t n, size_t size, void return; size_t array_size= n * size; /* Overflow should have been detected by pfs_malloc_array. */ - DBUG_ASSERT(!is_overflow(array_size, n, size)); + assert(!is_overflow(array_size, n, size)); return pfs_free(klass, array_size, ptr); } @@ -215,9 +215,9 @@ uint pfs_get_socket_address(char *host, const struct sockaddr_storage *src_addr, socklen_t src_len) { - DBUG_ASSERT(host); - DBUG_ASSERT(src_addr); - DBUG_ASSERT(port); + assert(host); + assert(src_addr); + assert(port); memset(host, 0, host_len); *port= 0; diff --git a/storage/perfschema/pfs_global.h b/storage/perfschema/pfs_global.h index d26e81adae7..48a5587839e 100644 --- a/storage/perfschema/pfs_global.h +++ b/storage/perfschema/pfs_global.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -175,7 +175,7 @@ inline uint randomized_index(const void *ptr, uint max_size) seed2= seed1*seed1; seed1= result; - DBUG_ASSERT(result < max_size); + assert(result < max_size); return result; } diff --git a/storage/perfschema/pfs_host.cc b/storage/perfschema/pfs_host.cc index b896215efda..7d7af7700c2 100644 --- a/storage/perfschema/pfs_host.cc +++ b/storage/perfschema/pfs_host.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -71,9 +71,9 @@ static uchar *host_hash_get_key(const uchar *entry, size_t *length, const PFS_host *host; const void *result; typed_entry= reinterpret_cast<const PFS_host* const *> (entry); - DBUG_ASSERT(typed_entry != NULL); + assert(typed_entry != NULL); host= *typed_entry; - DBUG_ASSERT(host != NULL); + assert(host != NULL); *length= host->m_key.m_key_length; result= host->m_key.m_hash_key; return const_cast<uchar*> (reinterpret_cast<const uchar*> (result)); @@ -119,7 +119,7 @@ static LF_PINS* get_host_hash_pins(PFS_thread *thread) static void set_host_key(PFS_host_key *key, const char *host, uint host_length) { - DBUG_ASSERT(host_length <= HOSTNAME_LENGTH); + assert(host_length <= HOSTNAME_LENGTH); char *ptr= &key->m_hash_key[0]; if (host_length > 0) @@ -328,7 +328,7 @@ void purge_host(PFS_thread *thread, PFS_host *host) host->m_key.m_hash_key, host->m_key.m_key_length)); if (entry && (entry != MY_ERRPTR)) { - DBUG_ASSERT(*entry == host); + assert(*entry == host); if (host->get_refcount() == 0) { lf_hash_delete(&host_hash, pins, diff --git a/storage/perfschema/pfs_host.h b/storage/perfschema/pfs_host.h index 3781988237b..71ef0d7f5ad 100644 --- a/storage/perfschema/pfs_host.h +++ b/storage/perfschema/pfs_host.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/pfs_instr.cc b/storage/perfschema/pfs_instr.cc index cd82014696c..41b1b24295a 100644 --- a/storage/perfschema/pfs_instr.cc +++ b/storage/perfschema/pfs_instr.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -107,7 +107,7 @@ int init_instruments(const PFS_global_param *param) uint index; /* Make sure init_event_name_sizing is called */ - DBUG_ASSERT(wait_class_max != 0); + assert(wait_class_max != 0); file_handle_max= param->m_file_handle_sizing; file_handle_full= false; @@ -259,9 +259,9 @@ static uchar *filename_hash_get_key(const uchar *entry, size_t *length, const PFS_file *file; const void *result; typed_entry= reinterpret_cast<const PFS_file* const *> (entry); - DBUG_ASSERT(typed_entry != NULL); + assert(typed_entry != NULL); file= *typed_entry; - DBUG_ASSERT(file != NULL); + assert(file != NULL); *length= file->m_filename_length; result= file->m_filename; return const_cast<uchar*> (reinterpret_cast<const uchar*> (result)); @@ -328,7 +328,7 @@ PFS_mutex* create_mutex(PFS_mutex_class *klass, const void *identity) */ void destroy_mutex(PFS_mutex *pfs) { - DBUG_ASSERT(pfs != NULL); + assert(pfs != NULL); PFS_mutex_class *klass= pfs->m_class; /* Aggregate to EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME */ klass->m_mutex_stat.aggregate(& pfs->m_mutex_stat); @@ -376,7 +376,7 @@ PFS_rwlock* create_rwlock(PFS_rwlock_class *klass, const void *identity) */ void destroy_rwlock(PFS_rwlock *pfs) { - DBUG_ASSERT(pfs != NULL); + assert(pfs != NULL); PFS_rwlock_class *klass= pfs->m_class; /* Aggregate to EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME */ klass->m_rwlock_stat.aggregate(& pfs->m_rwlock_stat); @@ -420,7 +420,7 @@ PFS_cond* create_cond(PFS_cond_class *klass, const void *identity) */ void destroy_cond(PFS_cond *pfs) { - DBUG_ASSERT(pfs != NULL); + assert(pfs != NULL); PFS_cond_class *klass= pfs->m_class; /* Aggregate to EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME */ klass->m_cond_stat.aggregate(& pfs->m_cond_stat); @@ -651,14 +651,14 @@ PFS_metadata_lock *sanitize_metadata_lock(PFS_metadata_lock *unsafe) */ void destroy_thread(PFS_thread *pfs) { - DBUG_ASSERT(pfs != NULL); + assert(pfs != NULL); pfs->reset_session_connect_attrs(); if (pfs->m_account != NULL) { pfs->m_account->release(); pfs->m_account= NULL; - DBUG_ASSERT(pfs->m_user == NULL); - DBUG_ASSERT(pfs->m_host == NULL); + assert(pfs->m_user == NULL); + assert(pfs->m_host == NULL); } else { @@ -752,7 +752,7 @@ find_or_create_file(PFS_thread *thread, PFS_file_class *klass, { PFS_file *pfs; - DBUG_ASSERT(klass != NULL || ! create); + assert(klass != NULL || ! create); LF_PINS *pins= get_filename_hash_pins(thread); if (unlikely(pins == NULL)) @@ -927,7 +927,7 @@ void find_and_rename_file(PFS_thread *thread, const char *old_filename, { PFS_file *pfs; - DBUG_ASSERT(thread != NULL); + assert(thread != NULL); LF_PINS *pins= get_filename_hash_pins(thread); if (unlikely(pins == NULL)) @@ -1070,7 +1070,7 @@ void find_and_rename_file(PFS_thread *thread, const char *old_filename, */ void release_file(PFS_file *pfs) { - DBUG_ASSERT(pfs != NULL); + assert(pfs != NULL); pfs->m_file_stat.m_open_count--; } @@ -1081,8 +1081,8 @@ void release_file(PFS_file *pfs) */ void destroy_file(PFS_thread *thread, PFS_file *pfs) { - DBUG_ASSERT(thread != NULL); - DBUG_ASSERT(pfs != NULL); + assert(thread != NULL); + assert(pfs != NULL); PFS_file_class *klass= pfs->m_class; /* Aggregate to FILE_SUMMARY_BY_EVENT_NAME */ @@ -1093,7 +1093,7 @@ void destroy_file(PFS_thread *thread, PFS_file *pfs) klass->m_singleton= NULL; LF_PINS *pins= get_filename_hash_pins(thread); - DBUG_ASSERT(pins != NULL); + assert(pins != NULL); lf_hash_delete(&pfs_filename_hash, pins, pfs->m_filename, pfs->m_filename_length); @@ -1187,8 +1187,8 @@ void PFS_table::safe_aggregate_io(const TABLE_SHARE *optional_server_share, PFS_table_stat *table_stat, PFS_table_share *table_share) { - DBUG_ASSERT(table_stat != NULL); - DBUG_ASSERT(table_share != NULL); + assert(table_stat != NULL); + assert(table_share != NULL); uint key_count= sanitize_index_count(table_share->m_key_count); @@ -1196,7 +1196,7 @@ void PFS_table::safe_aggregate_io(const TABLE_SHARE *optional_server_share, PFS_table_io_stat *from_stat; uint index; - DBUG_ASSERT(key_count <= MAX_INDEXES); + assert(key_count <= MAX_INDEXES); /* Aggregate stats for each index, if any */ for (index= 0; index < key_count; index++) @@ -1250,8 +1250,8 @@ void PFS_table::safe_aggregate_io(const TABLE_SHARE *optional_server_share, void PFS_table::safe_aggregate_lock(PFS_table_stat *table_stat, PFS_table_share *table_share) { - DBUG_ASSERT(table_stat != NULL); - DBUG_ASSERT(table_share != NULL); + assert(table_stat != NULL); + assert(table_share != NULL); PFS_table_lock_stat *from_stat= & table_stat->m_lock_stat; @@ -1273,7 +1273,7 @@ void PFS_table::safe_aggregate_lock(PFS_table_stat *table_stat, */ void destroy_table(PFS_table *pfs) { - DBUG_ASSERT(pfs != NULL); + assert(pfs != NULL); pfs->m_share->dec_refcount(); global_table_container.deallocate(pfs); } @@ -1341,7 +1341,7 @@ PFS_socket* create_socket(PFS_socket_class *klass, const my_socket *fd, */ void destroy_socket(PFS_socket *pfs) { - DBUG_ASSERT(pfs != NULL); + assert(pfs != NULL); PFS_socket_class *klass= pfs->m_class; /* Aggregate to SOCKET_SUMMARY_BY_EVENT_NAME */ @@ -1408,7 +1408,7 @@ PFS_metadata_lock* create_metadata_lock(void *identity, void destroy_metadata_lock(PFS_metadata_lock *pfs) { - DBUG_ASSERT(pfs != NULL); + assert(pfs != NULL); global_mdl_container.deallocate(pfs); } @@ -1635,8 +1635,8 @@ void aggregate_all_statements(PFS_statement_stat *from_array, void aggregate_all_transactions(PFS_transaction_stat *from_array, PFS_transaction_stat *to_array) { - DBUG_ASSERT(from_array != NULL); - DBUG_ASSERT(to_array != NULL); + assert(from_array != NULL); + assert(to_array != NULL); if (from_array->count() > 0) { @@ -1649,9 +1649,9 @@ void aggregate_all_transactions(PFS_transaction_stat *from_array, PFS_transaction_stat *to_array_1, PFS_transaction_stat *to_array_2) { - DBUG_ASSERT(from_array != NULL); - DBUG_ASSERT(to_array_1 != NULL); - DBUG_ASSERT(to_array_2 != NULL); + assert(from_array != NULL); + assert(to_array_1 != NULL); + assert(to_array_2 != NULL); if (from_array->count() > 0) { @@ -2160,9 +2160,9 @@ void clear_thread_account(PFS_thread *thread) void set_thread_account(PFS_thread *thread) { - DBUG_ASSERT(thread->m_account == NULL); - DBUG_ASSERT(thread->m_user == NULL); - DBUG_ASSERT(thread->m_host == NULL); + assert(thread->m_account == NULL); + assert(thread->m_user == NULL); + assert(thread->m_host == NULL); thread->m_account= find_or_create_account(thread, thread->m_username, diff --git a/storage/perfschema/pfs_instr.h b/storage/perfschema/pfs_instr.h index ec7dff7d350..e09cc7a1cf0 100644 --- a/storage/perfschema/pfs_instr.h +++ b/storage/perfschema/pfs_instr.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/pfs_instr_class.cc b/storage/perfschema/pfs_instr_class.cc index 3b59375c7fc..971ee7ca00f 100644 --- a/storage/perfschema/pfs_instr_class.cc +++ b/storage/perfschema/pfs_instr_class.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. Copyright (c) 2020, MariaDB Corporation. This program is free software; you can redistribute it and/or modify @@ -410,9 +410,9 @@ static uchar *table_share_hash_get_key(const uchar *entry, size_t *length, const PFS_table_share *share; const void *result; typed_entry= reinterpret_cast<const PFS_table_share* const *> (entry); - DBUG_ASSERT(typed_entry != NULL); + assert(typed_entry != NULL); share= *typed_entry; - DBUG_ASSERT(share != NULL); + assert(share != NULL); *length= share->m_key.m_key_length; result= &share->m_key.m_hash_key[0]; return const_cast<uchar*> (reinterpret_cast<const uchar*> (result)); @@ -471,8 +471,8 @@ static void set_table_share_key(PFS_table_share_key *key, const char *schema_name, size_t schema_name_length, const char *table_name, size_t table_name_length) { - DBUG_ASSERT(schema_name_length <= NAME_LEN); - DBUG_ASSERT(table_name_length <= NAME_LEN); + assert(schema_name_length <= NAME_LEN); + assert(table_name_length <= NAME_LEN); char *saved_schema_name; char *saved_table_name; @@ -586,7 +586,7 @@ void PFS_table_share::destroy_lock_stat() PFS_table_share_index* PFS_table_share::find_index_stat(uint index) const { - DBUG_ASSERT(index <= MAX_INDEXES); + assert(index <= MAX_INDEXES); PFS_table_share *that= const_cast<PFS_table_share*>(this); void *addr= & that->m_race_index_stat[index]; @@ -610,7 +610,7 @@ PFS_table_share::find_index_stat(uint index) const PFS_table_share_index* PFS_table_share::find_or_create_index_stat(const TABLE_SHARE *server_share, uint index) { - DBUG_ASSERT(index <= MAX_INDEXES); + assert(index <= MAX_INDEXES); void *addr= & this->m_race_index_stat[index]; void * volatile * typed_addr= static_cast<void * volatile *>(addr); @@ -763,7 +763,7 @@ int init_table_share_index_stat(uint index_stat_sizing) PFS_table_share_index* create_table_share_index_stat(const TABLE_SHARE *server_share, uint server_index) { - DBUG_ASSERT((server_share != NULL) || (server_index == MAX_INDEXES)); + assert((server_share != NULL) || (server_index == MAX_INDEXES)); PFS_table_share_index *pfs= NULL; pfs_dirty_state dirty_state; @@ -1005,7 +1005,7 @@ static void init_instr_class(PFS_instr_class *klass, int flags, PFS_class_type class_type) { - DBUG_ASSERT(name_length <= PFS_MAX_INFO_NAME_LENGTH); + assert(name_length <= PFS_MAX_INFO_NAME_LENGTH); memset(klass, 0, sizeof(PFS_instr_class)); strncpy(klass->m_name, name, name_length); klass->m_name[PFS_MAX_INFO_NAME_LENGTH - 1]= '\0'; @@ -1062,7 +1062,7 @@ static void configure_instr_class(PFS_instr_class *entry) if ((entry->m_name_length == NAME_LENGTH) && \ (strncmp(entry->m_name, NAME, NAME_LENGTH) == 0)) \ { \ - DBUG_ASSERT(entry->m_flags == flags); \ + assert(entry->m_flags == flags); \ return (INDEX + 1); \ } \ } @@ -1316,7 +1316,7 @@ PFS_thread_key register_thread_class(const char *name, uint name_length, if (index < thread_class_max) { entry= &thread_class_array[index]; - DBUG_ASSERT(name_length <= PFS_MAX_INFO_NAME_LENGTH); + assert(name_length <= PFS_MAX_INFO_NAME_LENGTH); strncpy(entry->m_name, name, name_length); entry->m_name_length= name_length; entry->m_enabled= true; @@ -1883,7 +1883,7 @@ void PFS_table_share::sum_io(PFS_single_stat *result, uint key_count) uint index; PFS_table_share_index *stat; - DBUG_ASSERT(key_count <= MAX_INDEXES); + assert(key_count <= MAX_INDEXES); /* Sum stats for each index, if any */ for (index= 0; index < key_count; index++) @@ -1931,7 +1931,7 @@ void PFS_table_share::aggregate_lock(void) void release_table_share(PFS_table_share *pfs) { - DBUG_ASSERT(pfs->get_refcount() > 0); + assert(pfs->get_refcount() > 0); pfs->dec_refcount(); } diff --git a/storage/perfschema/pfs_instr_class.h b/storage/perfschema/pfs_instr_class.h index 573cfe33ffb..b8ff8497241 100644 --- a/storage/perfschema/pfs_instr_class.h +++ b/storage/perfschema/pfs_instr_class.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -172,13 +172,13 @@ struct PFS_instr_class bool is_progress() const { - DBUG_ASSERT(m_type == PFS_CLASS_STAGE); + assert(m_type == PFS_CLASS_STAGE); return m_flags & PSI_FLAG_STAGE_PROGRESS; } bool is_shared_exclusive() const { - DBUG_ASSERT(m_type == PFS_CLASS_RWLOCK); + assert(m_type == PFS_CLASS_RWLOCK); return m_flags & PSI_RWLOCK_FLAG_SX; } diff --git a/storage/perfschema/pfs_lock.h b/storage/perfschema/pfs_lock.h index 3730e61ced7..4c1674c5e67 100644 --- a/storage/perfschema/pfs_lock.h +++ b/storage/perfschema/pfs_lock.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2009, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -173,7 +173,7 @@ struct pfs_lock { uint32 copy= copy_version_state(); /* Make sure the record was ALLOCATED. */ - DBUG_ASSERT((copy & STATE_MASK) == PFS_LOCK_ALLOCATED); + assert((copy & STATE_MASK) == PFS_LOCK_ALLOCATED); /* Keep the same version, set the DIRTY state */ uint32 new_val= (copy & VERSION_MASK) + PFS_LOCK_DIRTY; /* We own the record, no need to use compare and swap. */ @@ -191,7 +191,7 @@ struct pfs_lock void dirty_to_allocated(const pfs_dirty_state *copy) { /* Make sure the record was DIRTY. */ - DBUG_ASSERT((copy->m_version_state & STATE_MASK) == PFS_LOCK_DIRTY); + assert((copy->m_version_state & STATE_MASK) == PFS_LOCK_DIRTY); /* Increment the version, set the ALLOCATED state */ uint32 new_val= (copy->m_version_state & VERSION_MASK) + VERSION_INC + PFS_LOCK_ALLOCATED; @@ -234,7 +234,7 @@ struct pfs_lock void dirty_to_free(const pfs_dirty_state *copy) { /* Make sure the record was DIRTY. */ - DBUG_ASSERT((copy->m_version_state & STATE_MASK) == PFS_LOCK_DIRTY); + assert((copy->m_version_state & STATE_MASK) == PFS_LOCK_DIRTY); /* Keep the same version, set the FREE state */ uint32 new_val= (copy->m_version_state & VERSION_MASK) + PFS_LOCK_FREE; @@ -254,7 +254,7 @@ struct pfs_lock */ uint32 copy= copy_version_state(); /* Make sure the record was ALLOCATED. */ - DBUG_ASSERT(((copy & STATE_MASK) == PFS_LOCK_ALLOCATED)); + assert(((copy & STATE_MASK) == PFS_LOCK_ALLOCATED)); /* Keep the same version, set the FREE state */ uint32 new_val= (copy & VERSION_MASK) + PFS_LOCK_FREE; diff --git a/storage/perfschema/pfs_memory.cc b/storage/perfschema/pfs_memory.cc index c4e92d7d6b0..d2185ecc648 100644 --- a/storage/perfschema/pfs_memory.cc +++ b/storage/perfschema/pfs_memory.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2013, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/pfs_memory.h b/storage/perfschema/pfs_memory.h index 4dc21b892d5..a3e753656ce 100644 --- a/storage/perfschema/pfs_memory.h +++ b/storage/perfschema/pfs_memory.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2013, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/pfs_prepared_stmt.cc b/storage/perfschema/pfs_prepared_stmt.cc index 5885f31857a..ccb49f3290d 100644 --- a/storage/perfschema/pfs_prepared_stmt.cc +++ b/storage/perfschema/pfs_prepared_stmt.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2014, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/pfs_prepared_stmt.h b/storage/perfschema/pfs_prepared_stmt.h index 1b017b508a6..1014d9c6af6 100644 --- a/storage/perfschema/pfs_prepared_stmt.h +++ b/storage/perfschema/pfs_prepared_stmt.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2014, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/pfs_program.cc b/storage/perfschema/pfs_program.cc index 8e6d02c761c..00b8082ec53 100644 --- a/storage/perfschema/pfs_program.cc +++ b/storage/perfschema/pfs_program.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2013, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -70,9 +70,9 @@ static uchar *program_hash_get_key(const uchar *entry, size_t *length, const PFS_program *program; const void *result; typed_entry= reinterpret_cast<const PFS_program* const *> (entry); - DBUG_ASSERT(typed_entry != NULL); + assert(typed_entry != NULL); program= *typed_entry; - DBUG_ASSERT(program != NULL); + assert(program != NULL); *length= program->m_key.m_key_length; result= program->m_key.m_hash_key; return const_cast<uchar*> (reinterpret_cast<const uchar*> (result)); @@ -109,8 +109,8 @@ static void set_program_key(PFS_program_key *key, const char *object_name, uint object_name_length, const char *schema_name, uint schema_name_length) { - DBUG_ASSERT(object_name_length <= COL_OBJECT_NAME_SIZE); - DBUG_ASSERT(schema_name_length <= COL_OBJECT_SCHEMA_SIZE); + assert(object_name_length <= COL_OBJECT_NAME_SIZE); + assert(schema_name_length <= COL_OBJECT_SCHEMA_SIZE); /* To make sure generated key is case insensitive, diff --git a/storage/perfschema/pfs_program.h b/storage/perfschema/pfs_program.h index 0cbd24b8699..a34f533d444 100644 --- a/storage/perfschema/pfs_program.h +++ b/storage/perfschema/pfs_program.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2013, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/pfs_server.cc b/storage/perfschema/pfs_server.cc index 63deba92de8..0a97f05c54a 100644 --- a/storage/perfschema/pfs_server.cc +++ b/storage/perfschema/pfs_server.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -211,7 +211,7 @@ initialize_performance_schema(PFS_global_param *param) static void destroy_pfs_thread(void *key) { PFS_thread* pfs= reinterpret_cast<PFS_thread*> (key); - DBUG_ASSERT(pfs); + assert(pfs); /* This automatic cleanup is a last resort and best effort to avoid leaks, and may not work on windows due to the implementation of pthread_key_create(). diff --git a/storage/perfschema/pfs_server.h b/storage/perfschema/pfs_server.h index 68f6f71d619..c1ebb531a85 100644 --- a/storage/perfschema/pfs_server.h +++ b/storage/perfschema/pfs_server.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/pfs_setup_actor.cc b/storage/perfschema/pfs_setup_actor.cc index 96b367b65db..6e066e34231 100644 --- a/storage/perfschema/pfs_setup_actor.cc +++ b/storage/perfschema/pfs_setup_actor.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -70,9 +70,9 @@ static uchar *setup_actor_hash_get_key(const uchar *entry, size_t *length, const PFS_setup_actor *setup_actor; const void *result; typed_entry= reinterpret_cast<const PFS_setup_actor* const *> (entry); - DBUG_ASSERT(typed_entry != NULL); + assert(typed_entry != NULL); setup_actor= *typed_entry; - DBUG_ASSERT(setup_actor != NULL); + assert(setup_actor != NULL); *length= setup_actor->m_key.m_key_length; result= setup_actor->m_key.m_hash_key; return const_cast<uchar*> (reinterpret_cast<const uchar*> (result)); @@ -121,8 +121,8 @@ static void set_setup_actor_key(PFS_setup_actor_key *key, const char *host, uint host_length, const char *role, uint role_length) { - DBUG_ASSERT(user_length <= USERNAME_LENGTH); - DBUG_ASSERT(host_length <= HOSTNAME_LENGTH); + assert(user_length <= USERNAME_LENGTH); + assert(host_length <= HOSTNAME_LENGTH); char *ptr= &key->m_hash_key[0]; memcpy(ptr, user, user_length); diff --git a/storage/perfschema/pfs_setup_actor.h b/storage/perfschema/pfs_setup_actor.h index 3d00c52aa32..3570748085a 100644 --- a/storage/perfschema/pfs_setup_actor.h +++ b/storage/perfschema/pfs_setup_actor.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/pfs_setup_object.cc b/storage/perfschema/pfs_setup_object.cc index 47afd130761..540f2c74936 100644 --- a/storage/perfschema/pfs_setup_object.cc +++ b/storage/perfschema/pfs_setup_object.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -70,9 +70,9 @@ static uchar *setup_object_hash_get_key(const uchar *entry, size_t *length, const PFS_setup_object *setup_object; const void *result; typed_entry= reinterpret_cast<const PFS_setup_object* const *> (entry); - DBUG_ASSERT(typed_entry != NULL); + assert(typed_entry != NULL); setup_object= *typed_entry; - DBUG_ASSERT(setup_object != NULL); + assert(setup_object != NULL); *length= setup_object->m_key.m_key_length; result= setup_object->m_key.m_hash_key; return const_cast<uchar*> (reinterpret_cast<const uchar*> (result)); @@ -120,8 +120,8 @@ static void set_setup_object_key(PFS_setup_object_key *key, const char *schema, uint schema_length, const char *object, uint object_length) { - DBUG_ASSERT(schema_length <= NAME_LEN); - DBUG_ASSERT(object_length <= NAME_LEN); + assert(schema_length <= NAME_LEN); + assert(object_length <= NAME_LEN); char *ptr= &key->m_hash_key[0]; ptr[0]= (char) object_type; @@ -284,7 +284,7 @@ void lookup_setup_object(PFS_thread *thread, - TABLE foo.bar - TEMPORARY TABLE foo.bar */ - DBUG_ASSERT(object_type != OBJECT_TYPE_TEMPORARY_TABLE); + assert(object_type != OBJECT_TYPE_TEMPORARY_TABLE); LF_PINS* pins= get_setup_object_hash_pins(thread); if (unlikely(pins == NULL)) diff --git a/storage/perfschema/pfs_setup_object.h b/storage/perfschema/pfs_setup_object.h index d49be341bbe..63e275385b1 100644 --- a/storage/perfschema/pfs_setup_object.h +++ b/storage/perfschema/pfs_setup_object.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/pfs_stat.h b/storage/perfschema/pfs_stat.h index e3e06760eb6..f266267f4cd 100644 --- a/storage/perfschema/pfs_stat.h +++ b/storage/perfschema/pfs_stat.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -722,7 +722,7 @@ struct PFS_table_stat PFS_table_io_stat *to_stat_last; const PFS_table_io_stat *from_stat; - DBUG_ASSERT(key_count <= MAX_INDEXES); + assert(key_count <= MAX_INDEXES); /* Aggregate stats for each index, if any */ to_stat= & m_index_stat[0]; @@ -753,7 +753,7 @@ struct PFS_table_stat PFS_table_io_stat *stat; PFS_table_io_stat *stat_last; - DBUG_ASSERT(key_count <= MAX_INDEXES); + assert(key_count <= MAX_INDEXES); /* Sum stats for each index, if any */ stat= & m_index_stat[0]; diff --git a/storage/perfschema/pfs_status.cc b/storage/perfschema/pfs_status.cc index 2007d191d13..50f361db083 100644 --- a/storage/perfschema/pfs_status.cc +++ b/storage/perfschema/pfs_status.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2015, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/pfs_status.h b/storage/perfschema/pfs_status.h index 6b35a162982..b29791420ad 100644 --- a/storage/perfschema/pfs_status.h +++ b/storage/perfschema/pfs_status.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2015, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/pfs_timer.cc b/storage/perfschema/pfs_timer.cc index ceec4ed9359..c5a0bdf2262 100644 --- a/storage/perfschema/pfs_timer.cc +++ b/storage/perfschema/pfs_timer.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -249,7 +249,7 @@ ulonglong get_timer_raw_value(enum_timer_name timer_name) case TIMER_NAME_TICK: return my_timer_ticks(); default: - DBUG_ASSERT(false); + assert(false); } return 0; } @@ -275,7 +275,7 @@ ulonglong get_timer_raw_value_and_function(enum_timer_name timer_name, timer_fct return my_timer_ticks(); default: *fct= NULL; - DBUG_ASSERT(false); + assert(false); } return 0; } @@ -303,7 +303,7 @@ ulonglong get_timer_pico_value(enum_timer_name timer_name) break; default: result= 0; - DBUG_ASSERT(false); + assert(false); } return result; } @@ -312,8 +312,8 @@ time_normalizer* time_normalizer::get(enum_timer_name timer_name) { uint index= static_cast<uint> (timer_name); - DBUG_ASSERT(index >= FIRST_TIMER_NAME); - DBUG_ASSERT(index <= LAST_TIMER_NAME); + assert(index >= FIRST_TIMER_NAME); + assert(index <= LAST_TIMER_NAME); return & to_pico_data[index]; } diff --git a/storage/perfschema/pfs_timer.h b/storage/perfschema/pfs_timer.h index f2bedc878e7..e9387c110ee 100644 --- a/storage/perfschema/pfs_timer.h +++ b/storage/perfschema/pfs_timer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/pfs_user.cc b/storage/perfschema/pfs_user.cc index feb99f41147..d7dfda4efc2 100644 --- a/storage/perfschema/pfs_user.cc +++ b/storage/perfschema/pfs_user.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -71,9 +71,9 @@ static uchar *user_hash_get_key(const uchar *entry, size_t *length, const PFS_user *user; const void *result; typed_entry= reinterpret_cast<const PFS_user* const *> (entry); - DBUG_ASSERT(typed_entry != NULL); + assert(typed_entry != NULL); user= *typed_entry; - DBUG_ASSERT(user != NULL); + assert(user != NULL); *length= user->m_key.m_key_length; result= user->m_key.m_hash_key; return const_cast<uchar*> (reinterpret_cast<const uchar*> (result)); @@ -119,7 +119,7 @@ static LF_PINS* get_user_hash_pins(PFS_thread *thread) static void set_user_key(PFS_user_key *key, const char *user, uint user_length) { - DBUG_ASSERT(user_length <= USERNAME_LENGTH); + assert(user_length <= USERNAME_LENGTH); char *ptr= &key->m_hash_key[0]; if (user_length > 0) @@ -293,7 +293,7 @@ void purge_user(PFS_thread *thread, PFS_user *user) user->m_key.m_hash_key, user->m_key.m_key_length)); if (entry && (entry != MY_ERRPTR)) { - DBUG_ASSERT(*entry == user); + assert(*entry == user); if (user->get_refcount() == 0) { lf_hash_delete(&user_hash, pins, diff --git a/storage/perfschema/pfs_user.h b/storage/perfschema/pfs_user.h index 9553ff8cae7..58c95ad720e 100644 --- a/storage/perfschema/pfs_user.h +++ b/storage/perfschema/pfs_user.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/pfs_variable.cc b/storage/perfschema/pfs_variable.cc index 9be6f12e7b4..17b7dfc200c 100644 --- a/storage/perfschema/pfs_variable.cc +++ b/storage/perfschema/pfs_variable.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2015, 2021, Oracle and/or its affiliates. Copyright (c) 2020, MariaDB Corporation. This program is free software; you can redistribute it and/or modify @@ -82,7 +82,7 @@ static inline SHOW_SCOPE show_scope_from_type(enum enum_mysql_show_type type) */ bool PFS_system_variable_cache::init_show_var_array(enum_var_type scope, bool strict) { - DBUG_ASSERT(!m_initialized); + assert(!m_initialized); m_query_scope= scope; mysql_prlock_rdlock(&LOCK_system_variables_hash); @@ -172,7 +172,7 @@ int PFS_system_variable_cache::do_materialize_global(void) { const char* name= show_var->name; sys_var *value= (sys_var *)show_var->value; - DBUG_ASSERT(value); + assert(value); if ((m_query_scope == OPT_GLOBAL) && (!my_strcasecmp(system_charset_info, name, "sql_log_bin"))) @@ -200,7 +200,7 @@ int PFS_system_variable_cache::do_materialize_global(void) The assert below will fail once SQL_LOG_BIN really is defined as SESSION_ONLY (in 5.8), so that this special case can be removed. */ - DBUG_ASSERT(value->scope() == sys_var::SESSION); + assert(value->scope() == sys_var::SESSION); continue; } @@ -330,7 +330,7 @@ int PFS_system_variable_cache::do_materialize_session(PFS_thread *pfs_thread) mysql_mutex_lock(&LOCK_plugin_delete); /* The SHOW_VAR array must be initialized externally. */ - DBUG_ASSERT(m_initialized); + assert(m_initialized); /* Use a temporary mem_root to avoid depleting THD mem_root. */ if (m_use_mem_root) @@ -385,7 +385,7 @@ int PFS_system_variable_cache::do_materialize_session(PFS_thread *pfs_thread, ui mysql_mutex_lock(&LOCK_plugin_delete); /* The SHOW_VAR array must be initialized externally. */ - DBUG_ASSERT(m_initialized); + assert(m_initialized); /* Get and lock a validated THD from the thread manager. */ if ((m_safe_thd= get_THD(pfs_thread)) != NULL) @@ -524,7 +524,7 @@ void System_variable::init(THD *target_thd, const SHOW_VAR *show_var, mysql_mutex_lock(&target_thd->LOCK_thd_sysvar);*/ sys_var *system_var= (sys_var *)show_var->value; - DBUG_ASSERT(system_var != NULL); + assert(system_var != NULL); m_charset= system_var->charset(target_thd); m_type= system_var->show_type(); m_scope= system_var->scope(); @@ -655,8 +655,8 @@ bool PFS_status_variable_cache::match_scope(SHOW_SCOPE variable_scope, bool stri */ bool PFS_status_variable_cache::filter_by_name(const SHOW_VAR *show_var) { - DBUG_ASSERT(show_var); - DBUG_ASSERT(show_var->name); + assert(show_var); + assert(show_var->name); if (show_var->type == SHOW_ARRAY) { @@ -765,7 +765,7 @@ bool PFS_status_variable_cache::filter_show_var(const SHOW_VAR *show_var, bool s */ bool PFS_status_variable_cache::init_show_var_array(enum_var_type scope, bool strict) { - DBUG_ASSERT(!m_initialized); + assert(!m_initialized); /* Resize if necessary. */ m_show_var_array.reserve(all_status_vars.elements + 1); @@ -844,7 +844,7 @@ void PFS_status_variable_cache::expand_show_var_array(const SHOW_VAR *show_var_a char * PFS_status_variable_cache::make_show_var_name(const char* prefix, const char* name, char *name_buf, size_t buf_len) { - DBUG_ASSERT(name_buf != NULL); + assert(name_buf != NULL); char *prefix_end= name_buf; if (prefix && *prefix) @@ -960,7 +960,7 @@ int PFS_status_variable_cache::do_materialize_global(void) int PFS_status_variable_cache::do_materialize_all(THD* unsafe_thd) { int ret= 1; - DBUG_ASSERT(unsafe_thd != NULL); + assert(unsafe_thd != NULL); m_unsafe_thd= unsafe_thd; m_materialized= false; @@ -1006,7 +1006,7 @@ int PFS_status_variable_cache::do_materialize_all(THD* unsafe_thd) int PFS_status_variable_cache::do_materialize_session(THD* unsafe_thd) { int ret= 1; - DBUG_ASSERT(unsafe_thd != NULL); + assert(unsafe_thd != NULL); m_unsafe_thd= unsafe_thd; m_materialized= false; @@ -1053,7 +1053,7 @@ int PFS_status_variable_cache::do_materialize_session(THD* unsafe_thd) int PFS_status_variable_cache::do_materialize_session(PFS_thread *pfs_thread) { int ret= 1; - DBUG_ASSERT(pfs_thread != NULL); + assert(pfs_thread != NULL); m_pfs_thread= pfs_thread; m_materialized= false; @@ -1064,7 +1064,7 @@ int PFS_status_variable_cache::do_materialize_session(PFS_thread *pfs_thread) mysql_mutex_lock(&LOCK_status); /* The SHOW_VAR array must be initialized externally. */ - DBUG_ASSERT(m_initialized); + assert(m_initialized); /* Get and lock a validated THD from the thread manager. */ if ((m_safe_thd= get_THD(pfs_thread)) != NULL) @@ -1096,7 +1096,7 @@ int PFS_status_variable_cache::do_materialize_session(PFS_thread *pfs_thread) */ int PFS_status_variable_cache::do_materialize_client(PFS_client *pfs_client) { - DBUG_ASSERT(pfs_client != NULL); + assert(pfs_client != NULL); STATUS_VAR status_totals; m_pfs_client= pfs_client; @@ -1108,7 +1108,7 @@ int PFS_status_variable_cache::do_materialize_client(PFS_client *pfs_client) mysql_mutex_lock(&LOCK_status); /* The SHOW_VAR array must be initialized externally. */ - DBUG_ASSERT(m_initialized); + assert(m_initialized); /* Generate status totals from active threads and from totals aggregated diff --git a/storage/perfschema/pfs_variable.h b/storage/perfschema/pfs_variable.h index bfe51c6d1b3..e59b02f2af8 100644 --- a/storage/perfschema/pfs_variable.h +++ b/storage/perfschema/pfs_variable.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2015, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -479,7 +479,7 @@ THD *PFS_variable_cache<Var_type>::get_THD(THD *unsafe_thd) template <class Var_type> THD *PFS_variable_cache<Var_type>::get_THD(PFS_thread *pfs_thread) { - DBUG_ASSERT(pfs_thread != NULL); + assert(pfs_thread != NULL); return get_THD(pfs_thread->m_thd); } diff --git a/storage/perfschema/pfs_visitor.cc b/storage/perfschema/pfs_visitor.cc index 638877d8755..52e0d6871f3 100644 --- a/storage/perfschema/pfs_visitor.cc +++ b/storage/perfschema/pfs_visitor.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -64,8 +64,8 @@ void PFS_connection_iterator::visit_global(bool with_hosts, bool with_users, bool with_THDs, PFS_connection_visitor *visitor) { - DBUG_ASSERT(visitor != NULL); - DBUG_ASSERT(! with_threads || ! with_THDs); + assert(visitor != NULL); + assert(! with_threads || ! with_THDs); visitor->visit_global(); @@ -164,8 +164,8 @@ void PFS_connection_iterator::visit_host(PFS_host *host, bool with_THDs, PFS_connection_visitor *visitor) { - DBUG_ASSERT(visitor != NULL); - DBUG_ASSERT(! with_threads || ! with_THDs); + assert(visitor != NULL); + assert(! with_threads || ! with_THDs); visitor->visit_host(host); @@ -253,8 +253,8 @@ void PFS_connection_iterator::visit_user(PFS_user *user, bool with_THDs, PFS_connection_visitor *visitor) { - DBUG_ASSERT(visitor != NULL); - DBUG_ASSERT(! with_threads || ! with_THDs); + assert(visitor != NULL); + assert(! with_threads || ! with_THDs); visitor->visit_user(user); @@ -334,8 +334,8 @@ void PFS_connection_iterator::visit_account(PFS_account *account, bool with_THDs, PFS_connection_visitor *visitor) { - DBUG_ASSERT(visitor != NULL); - DBUG_ASSERT(! with_threads || ! with_THDs); + assert(visitor != NULL); + assert(! with_threads || ! with_THDs); visitor->visit_account(account); @@ -364,7 +364,7 @@ void PFS_connection_iterator::visit_account(PFS_account *account, void PFS_connection_iterator::visit_THD(THD *thd, PFS_connection_visitor *visitor) { - DBUG_ASSERT(visitor != NULL); + assert(visitor != NULL); visitor->visit_THD(thd); } @@ -505,7 +505,7 @@ void PFS_instance_iterator::visit_all_file_instances(PFS_instance_visitor *visit void PFS_instance_iterator::visit_mutex_instances(PFS_mutex_class *klass, PFS_instance_visitor *visitor) { - DBUG_ASSERT(visitor != NULL); + assert(visitor != NULL); visitor->visit_mutex_class(klass); @@ -539,7 +539,7 @@ void PFS_instance_iterator::visit_mutex_instances(PFS_mutex_class *klass, void PFS_instance_iterator::visit_rwlock_instances(PFS_rwlock_class *klass, PFS_instance_visitor *visitor) { - DBUG_ASSERT(visitor != NULL); + assert(visitor != NULL); visitor->visit_rwlock_class(klass); @@ -573,7 +573,7 @@ void PFS_instance_iterator::visit_rwlock_instances(PFS_rwlock_class *klass, void PFS_instance_iterator::visit_cond_instances(PFS_cond_class *klass, PFS_instance_visitor *visitor) { - DBUG_ASSERT(visitor != NULL); + assert(visitor != NULL); visitor->visit_cond_class(klass); @@ -607,7 +607,7 @@ void PFS_instance_iterator::visit_cond_instances(PFS_cond_class *klass, void PFS_instance_iterator::visit_file_instances(PFS_file_class *klass, PFS_instance_visitor *visitor) { - DBUG_ASSERT(visitor != NULL); + assert(visitor != NULL); visitor->visit_file_class(klass); @@ -643,7 +643,7 @@ void PFS_instance_iterator::visit_file_instances(PFS_file_class *klass, void PFS_instance_iterator::visit_socket_instances(PFS_socket_class *klass, PFS_instance_visitor *visitor) { - DBUG_ASSERT(visitor != NULL); + assert(visitor != NULL); visitor->visit_socket_class(klass); @@ -681,8 +681,8 @@ void PFS_instance_iterator::visit_socket_instances(PFS_socket_class *klass, PFS_thread *thread, bool visit_class) { - DBUG_ASSERT(visitor != NULL); - DBUG_ASSERT(thread != NULL); + assert(visitor != NULL); + assert(thread != NULL); if (visit_class) visitor->visit_socket_class(klass); @@ -721,8 +721,8 @@ void PFS_instance_iterator::visit_instances(PFS_instr_class *klass, PFS_thread *thread, bool visit_class) { - DBUG_ASSERT(visitor != NULL); - DBUG_ASSERT(klass != NULL); + assert(visitor != NULL); + assert(klass != NULL); switch (klass->m_type) { @@ -790,7 +790,7 @@ private: void PFS_object_iterator::visit_all_tables(PFS_object_visitor *visitor) { - DBUG_ASSERT(visitor != NULL); + assert(visitor != NULL); visitor->visit_global(); @@ -827,7 +827,7 @@ private: void PFS_object_iterator::visit_tables(PFS_table_share *share, PFS_object_visitor *visitor) { - DBUG_ASSERT(visitor != NULL); + assert(visitor != NULL); if (!share->m_enabled) return; @@ -870,7 +870,7 @@ void PFS_object_iterator::visit_table_indexes(PFS_table_share *share, uint index, PFS_object_visitor *visitor) { - DBUG_ASSERT(visitor != NULL); + assert(visitor != NULL); if (!share->m_enabled) return; @@ -906,8 +906,8 @@ void PFS_connection_wait_visitor::visit_global() For waits, do not sum by connection but by instances, it is more efficient. */ - DBUG_ASSERT( (m_index == global_idle_class.m_event_name_index) - || (m_index == global_metadata_class.m_event_name_index)); + assert( (m_index == global_idle_class.m_event_name_index) + || (m_index == global_metadata_class.m_event_name_index)); if (m_index == global_idle_class.m_event_name_index) { @@ -969,7 +969,7 @@ PFS_connection_all_wait_visitor::~PFS_connection_all_wait_visitor() void PFS_connection_all_wait_visitor::visit_global() { /* Sum by instances, not by connection */ - DBUG_ASSERT(false); + assert(false); } void PFS_connection_all_wait_visitor::visit_connection_slice(PFS_connection_slice *pfs) diff --git a/storage/perfschema/pfs_visitor.h b/storage/perfschema/pfs_visitor.h index a81567e9921..ebedae6e7f0 100644 --- a/storage/perfschema/pfs_visitor.h +++ b/storage/perfschema/pfs_visitor.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_accounts.cc b/storage/perfschema/table_accounts.cc index 781f408adcb..34dd49017a9 100644 --- a/storage/perfschema/table_accounts.cc +++ b/storage/perfschema/table_accounts.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2011, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -115,7 +115,7 @@ int table_accounts::read_row_values(TABLE *table, return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 1); + assert(table->s->null_bytes == 1); buf[0]= 0; for (; (f= *fields) ; fields++) @@ -133,7 +133,7 @@ int table_accounts::read_row_values(TABLE *table, m_row.m_connection_stat.set_field(f->field_index - 2, f); break; default: - DBUG_ASSERT(false); + assert(false); } } } diff --git a/storage/perfschema/table_accounts.h b/storage/perfschema/table_accounts.h index 7563e85c1d7..c3c62f77924 100644 --- a/storage/perfschema/table_accounts.h +++ b/storage/perfschema/table_accounts.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2011, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_all_instr.cc b/storage/perfschema/table_all_instr.cc index b030b8824ca..6a01912a3a0 100644 --- a/storage/perfschema/table_all_instr.cc +++ b/storage/perfschema/table_all_instr.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_all_instr.h b/storage/perfschema/table_all_instr.h index 3b5388dfb6e..ea52f5d2de2 100644 --- a/storage/perfschema/table_all_instr.h +++ b/storage/perfschema/table_all_instr.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_esgs_by_account_by_event_name.cc b/storage/perfschema/table_esgs_by_account_by_event_name.cc index 48777f99ed4..d6c97ac3edf 100644 --- a/storage/perfschema/table_esgs_by_account_by_event_name.cc +++ b/storage/perfschema/table_esgs_by_account_by_event_name.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -182,7 +182,7 @@ int table_esgs_by_account_by_event_name return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 1); + assert(table->s->null_bytes == 1); buf[0]= 0; for (; (f= *fields) ; fields++) diff --git a/storage/perfschema/table_esgs_by_account_by_event_name.h b/storage/perfschema/table_esgs_by_account_by_event_name.h index 011503aa64b..f19241a4d7b 100644 --- a/storage/perfschema/table_esgs_by_account_by_event_name.h +++ b/storage/perfschema/table_esgs_by_account_by_event_name.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_esgs_by_host_by_event_name.cc b/storage/perfschema/table_esgs_by_host_by_event_name.cc index 34210c2a66e..bf219705513 100644 --- a/storage/perfschema/table_esgs_by_host_by_event_name.cc +++ b/storage/perfschema/table_esgs_by_host_by_event_name.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -184,7 +184,7 @@ int table_esgs_by_host_by_event_name return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 1); + assert(table->s->null_bytes == 1); buf[0]= 0; for (; (f= *fields) ; fields++) diff --git a/storage/perfschema/table_esgs_by_host_by_event_name.h b/storage/perfschema/table_esgs_by_host_by_event_name.h index 14ddbb8b338..71592834d9a 100644 --- a/storage/perfschema/table_esgs_by_host_by_event_name.h +++ b/storage/perfschema/table_esgs_by_host_by_event_name.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_esgs_by_thread_by_event_name.cc b/storage/perfschema/table_esgs_by_thread_by_event_name.cc index 4d7b8a1ebcb..f6568655e51 100644 --- a/storage/perfschema/table_esgs_by_thread_by_event_name.cc +++ b/storage/perfschema/table_esgs_by_thread_by_event_name.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -176,7 +176,7 @@ int table_esgs_by_thread_by_event_name return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 0); + assert(table->s->null_bytes == 0); for (; (f= *fields) ; fields++) { diff --git a/storage/perfschema/table_esgs_by_thread_by_event_name.h b/storage/perfschema/table_esgs_by_thread_by_event_name.h index d3798e419b6..e5c30363704 100644 --- a/storage/perfschema/table_esgs_by_thread_by_event_name.h +++ b/storage/perfschema/table_esgs_by_thread_by_event_name.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_esgs_by_user_by_event_name.cc b/storage/perfschema/table_esgs_by_user_by_event_name.cc index 3e712e59327..ecec4e08425 100644 --- a/storage/perfschema/table_esgs_by_user_by_event_name.cc +++ b/storage/perfschema/table_esgs_by_user_by_event_name.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -183,7 +183,7 @@ int table_esgs_by_user_by_event_name return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 1); + assert(table->s->null_bytes == 1); buf[0]= 0; for (; (f= *fields) ; fields++) diff --git a/storage/perfschema/table_esgs_by_user_by_event_name.h b/storage/perfschema/table_esgs_by_user_by_event_name.h index 464165a068a..895840fc476 100644 --- a/storage/perfschema/table_esgs_by_user_by_event_name.h +++ b/storage/perfschema/table_esgs_by_user_by_event_name.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_esgs_global_by_event_name.cc b/storage/perfschema/table_esgs_global_by_event_name.cc index a7ea841a4a4..fe24d6794c1 100644 --- a/storage/perfschema/table_esgs_global_by_event_name.cc +++ b/storage/perfschema/table_esgs_global_by_event_name.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -168,7 +168,7 @@ int table_esgs_global_by_event_name return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 0); + assert(table->s->null_bytes == 0); for (; (f= *fields) ; fields++) { diff --git a/storage/perfschema/table_esgs_global_by_event_name.h b/storage/perfschema/table_esgs_global_by_event_name.h index 44b3ea5ce7b..f2e51f625c7 100644 --- a/storage/perfschema/table_esgs_global_by_event_name.h +++ b/storage/perfschema/table_esgs_global_by_event_name.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_esms_by_account_by_event_name.cc b/storage/perfschema/table_esms_by_account_by_event_name.cc index fc08373341a..9756bc3c70b 100644 --- a/storage/perfschema/table_esms_by_account_by_event_name.cc +++ b/storage/perfschema/table_esms_by_account_by_event_name.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -204,7 +204,7 @@ int table_esms_by_account_by_event_name return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 1); + assert(table->s->null_bytes == 1); buf[0]= 0; for (; (f= *fields) ; fields++) diff --git a/storage/perfschema/table_esms_by_account_by_event_name.h b/storage/perfschema/table_esms_by_account_by_event_name.h index 3881dd5d978..e5f17ee1113 100644 --- a/storage/perfschema/table_esms_by_account_by_event_name.h +++ b/storage/perfschema/table_esms_by_account_by_event_name.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_esms_by_digest.cc b/storage/perfschema/table_esms_by_digest.cc index ade27883707..c27e3372562 100644 --- a/storage/perfschema/table_esms_by_digest.cc +++ b/storage/perfschema/table_esms_by_digest.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -194,7 +194,7 @@ int table_esms_by_digest Set the null bits. It indicates how many fields could be null in the table. */ - DBUG_ASSERT(table->s->null_bytes == 1); + assert(table->s->null_bytes == 1); buf[0]= 0; for (; (f= *fields) ; fields++) diff --git a/storage/perfschema/table_esms_by_digest.h b/storage/perfschema/table_esms_by_digest.h index 9aa005bb6cc..7b84cdd6429 100644 --- a/storage/perfschema/table_esms_by_digest.h +++ b/storage/perfschema/table_esms_by_digest.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_esms_by_host_by_event_name.cc b/storage/perfschema/table_esms_by_host_by_event_name.cc index c186311ce41..ac6a584965f 100644 --- a/storage/perfschema/table_esms_by_host_by_event_name.cc +++ b/storage/perfschema/table_esms_by_host_by_event_name.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -206,7 +206,7 @@ int table_esms_by_host_by_event_name return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 1); + assert(table->s->null_bytes == 1); buf[0]= 0; for (; (f= *fields) ; fields++) diff --git a/storage/perfschema/table_esms_by_host_by_event_name.h b/storage/perfschema/table_esms_by_host_by_event_name.h index 807db6d48d3..54237b1deb5 100644 --- a/storage/perfschema/table_esms_by_host_by_event_name.h +++ b/storage/perfschema/table_esms_by_host_by_event_name.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_esms_by_program.cc b/storage/perfschema/table_esms_by_program.cc index 59202230ef0..5a4dab759cd 100644 --- a/storage/perfschema/table_esms_by_program.cc +++ b/storage/perfschema/table_esms_by_program.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -197,7 +197,7 @@ int table_esms_by_program Set the null bits. It indicates how many fields could be null in the table. */ - DBUG_ASSERT(table->s->null_bytes == 1); + assert(table->s->null_bytes == 1); buf[0]= 0; for (; (f= *fields) ; fields++) diff --git a/storage/perfschema/table_esms_by_program.h b/storage/perfschema/table_esms_by_program.h index cc263878e28..fdafb655918 100644 --- a/storage/perfschema/table_esms_by_program.h +++ b/storage/perfschema/table_esms_by_program.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2013, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_esms_by_thread_by_event_name.cc b/storage/perfschema/table_esms_by_thread_by_event_name.cc index 6db44a61600..eb38c3e5687 100644 --- a/storage/perfschema/table_esms_by_thread_by_event_name.cc +++ b/storage/perfschema/table_esms_by_thread_by_event_name.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -199,7 +199,7 @@ int table_esms_by_thread_by_event_name return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 0); + assert(table->s->null_bytes == 0); for (; (f= *fields) ; fields++) { diff --git a/storage/perfschema/table_esms_by_thread_by_event_name.h b/storage/perfschema/table_esms_by_thread_by_event_name.h index 41fec4e10d7..9a0818291b9 100644 --- a/storage/perfschema/table_esms_by_thread_by_event_name.h +++ b/storage/perfschema/table_esms_by_thread_by_event_name.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_esms_by_user_by_event_name.cc b/storage/perfschema/table_esms_by_user_by_event_name.cc index 0016b6ea823..a0efa66c177 100644 --- a/storage/perfschema/table_esms_by_user_by_event_name.cc +++ b/storage/perfschema/table_esms_by_user_by_event_name.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -205,7 +205,7 @@ int table_esms_by_user_by_event_name return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 1); + assert(table->s->null_bytes == 1); buf[0]= 0; for (; (f= *fields) ; fields++) diff --git a/storage/perfschema/table_esms_by_user_by_event_name.h b/storage/perfschema/table_esms_by_user_by_event_name.h index 0ed9899dcf5..51762be4143 100644 --- a/storage/perfschema/table_esms_by_user_by_event_name.h +++ b/storage/perfschema/table_esms_by_user_by_event_name.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_esms_global_by_event_name.cc b/storage/perfschema/table_esms_global_by_event_name.cc index 09b6d5bb4b0..f889df11b5a 100644 --- a/storage/perfschema/table_esms_global_by_event_name.cc +++ b/storage/perfschema/table_esms_global_by_event_name.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -192,7 +192,7 @@ int table_esms_global_by_event_name return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 0); + assert(table->s->null_bytes == 0); for (; (f= *fields) ; fields++) { diff --git a/storage/perfschema/table_esms_global_by_event_name.h b/storage/perfschema/table_esms_global_by_event_name.h index d4e34b7cc18..c4a32da11bf 100644 --- a/storage/perfschema/table_esms_global_by_event_name.h +++ b/storage/perfschema/table_esms_global_by_event_name.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_ets_by_account_by_event_name.cc b/storage/perfschema/table_ets_by_account_by_event_name.cc index 801c9db443f..9d323eb78d9 100644 --- a/storage/perfschema/table_ets_by_account_by_event_name.cc +++ b/storage/perfschema/table_ets_by_account_by_event_name.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -192,7 +192,7 @@ int table_ets_by_account_by_event_name return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 1); + assert(table->s->null_bytes == 1); buf[0]= 0; for (; (f= *fields) ; fields++) diff --git a/storage/perfschema/table_ets_by_account_by_event_name.h b/storage/perfschema/table_ets_by_account_by_event_name.h index 98fb45f79dd..3399c27d6e4 100644 --- a/storage/perfschema/table_ets_by_account_by_event_name.h +++ b/storage/perfschema/table_ets_by_account_by_event_name.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_ets_by_host_by_event_name.cc b/storage/perfschema/table_ets_by_host_by_event_name.cc index 17cccf372b9..6ca2cfad81a 100644 --- a/storage/perfschema/table_ets_by_host_by_event_name.cc +++ b/storage/perfschema/table_ets_by_host_by_event_name.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -194,7 +194,7 @@ int table_ets_by_host_by_event_name return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 1); + assert(table->s->null_bytes == 1); buf[0]= 0; for (; (f= *fields) ; fields++) diff --git a/storage/perfschema/table_ets_by_host_by_event_name.h b/storage/perfschema/table_ets_by_host_by_event_name.h index 341c3878253..2188f385701 100644 --- a/storage/perfschema/table_ets_by_host_by_event_name.h +++ b/storage/perfschema/table_ets_by_host_by_event_name.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_ets_by_thread_by_event_name.cc b/storage/perfschema/table_ets_by_thread_by_event_name.cc index 464bad8c202..257f37d56ed 100644 --- a/storage/perfschema/table_ets_by_thread_by_event_name.cc +++ b/storage/perfschema/table_ets_by_thread_by_event_name.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -187,7 +187,7 @@ int table_ets_by_thread_by_event_name return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 0); + assert(table->s->null_bytes == 0); for (; (f= *fields) ; fields++) { diff --git a/storage/perfschema/table_ets_by_thread_by_event_name.h b/storage/perfschema/table_ets_by_thread_by_event_name.h index ad63efa3f1a..dbfe1fae016 100644 --- a/storage/perfschema/table_ets_by_thread_by_event_name.h +++ b/storage/perfschema/table_ets_by_thread_by_event_name.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_ets_by_user_by_event_name.cc b/storage/perfschema/table_ets_by_user_by_event_name.cc index afe0c5f8649..6b54175b6cc 100644 --- a/storage/perfschema/table_ets_by_user_by_event_name.cc +++ b/storage/perfschema/table_ets_by_user_by_event_name.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -193,7 +193,7 @@ int table_ets_by_user_by_event_name return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 1); + assert(table->s->null_bytes == 1); buf[0]= 0; for (; (f= *fields) ; fields++) diff --git a/storage/perfschema/table_ets_by_user_by_event_name.h b/storage/perfschema/table_ets_by_user_by_event_name.h index c3a1d0b5c0a..62721ce9adf 100644 --- a/storage/perfschema/table_ets_by_user_by_event_name.h +++ b/storage/perfschema/table_ets_by_user_by_event_name.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_ets_global_by_event_name.cc b/storage/perfschema/table_ets_global_by_event_name.cc index be3fbb60ac9..e08ff15075d 100644 --- a/storage/perfschema/table_ets_global_by_event_name.cc +++ b/storage/perfschema/table_ets_global_by_event_name.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -172,7 +172,7 @@ int table_ets_global_by_event_name return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 0); + assert(table->s->null_bytes == 0); for (; (f= *fields) ; fields++) { diff --git a/storage/perfschema/table_ets_global_by_event_name.h b/storage/perfschema/table_ets_global_by_event_name.h index 47c8828cb47..717a737f93c 100644 --- a/storage/perfschema/table_ets_global_by_event_name.h +++ b/storage/perfschema/table_ets_global_by_event_name.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_events_stages.cc b/storage/perfschema/table_events_stages.cc index dedfd92f9ec..66887d39e5a 100644 --- a/storage/perfschema/table_events_stages.cc +++ b/storage/perfschema/table_events_stages.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -193,7 +193,7 @@ int table_events_stages_common::read_row_values(TABLE *table, return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 2); + assert(table->s->null_bytes == 2); buf[0]= 0; buf[1]= 0; @@ -264,7 +264,7 @@ int table_events_stages_common::read_row_values(TABLE *table, f->set_null(); break; default: - DBUG_ASSERT(false); + assert(false); } } } @@ -413,10 +413,10 @@ int table_events_stages_history::rnd_pos(const void *pos) PFS_thread *pfs_thread; PFS_events_stages *stage; - DBUG_ASSERT(events_stages_history_per_thread != 0); + assert(events_stages_history_per_thread != 0); set_position(pos); - DBUG_ASSERT(m_pos.m_index_2 < events_stages_history_per_thread); + assert(m_pos.m_index_2 < events_stages_history_per_thread); pfs_thread= global_thread_container.get(m_pos.m_index_1); if (pfs_thread != NULL) diff --git a/storage/perfschema/table_events_stages.h b/storage/perfschema/table_events_stages.h index 16e3fc9651a..2fd760cfae3 100644 --- a/storage/perfschema/table_events_stages.h +++ b/storage/perfschema/table_events_stages.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_events_statements.cc b/storage/perfschema/table_events_statements.cc index 1fb02eddc48..5e30f39c785 100644 --- a/storage/perfschema/table_events_statements.cc +++ b/storage/perfschema/table_events_statements.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -377,7 +377,7 @@ int table_events_statements_common::read_row_values(TABLE *table, return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 3); + assert(table->s->null_bytes == 3); buf[0]= 0; buf[1]= 0; buf[2]= 0; @@ -566,7 +566,7 @@ int table_events_statements_common::read_row_values(TABLE *table, set_field_ulong(f, m_row.m_nesting_event_level); break; default: - DBUG_ASSERT(false); + assert(false); } } } @@ -659,7 +659,7 @@ int table_events_statements_current::rnd_pos(const void *pos) return HA_ERR_RECORD_DELETED; } - DBUG_ASSERT(m_pos.m_index_2 < statement_stack_max); + assert(m_pos.m_index_2 < statement_stack_max); statement= &pfs_thread->m_statement_stack[m_pos.m_index_2]; @@ -781,13 +781,13 @@ int table_events_statements_history::rnd_pos(const void *pos) PFS_thread *pfs_thread; PFS_events_statements *statement; - DBUG_ASSERT(events_statements_history_per_thread != 0); + assert(events_statements_history_per_thread != 0); set_position(pos); pfs_thread= global_thread_container.get(m_pos.m_index_1); if (pfs_thread != NULL) { - DBUG_ASSERT(m_pos.m_index_2 < events_statements_history_per_thread); + assert(m_pos.m_index_2 < events_statements_history_per_thread); if ( ! pfs_thread->m_statements_history_full && (m_pos.m_index_2 >= pfs_thread->m_statements_history_index)) diff --git a/storage/perfschema/table_events_statements.h b/storage/perfschema/table_events_statements.h index 02127cadecc..5499c8d62ec 100644 --- a/storage/perfschema/table_events_statements.h +++ b/storage/perfschema/table_events_statements.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_events_transactions.cc b/storage/perfschema/table_events_transactions.cc index ef2575b4d8b..543d106ff26 100644 --- a/storage/perfschema/table_events_transactions.cc +++ b/storage/perfschema/table_events_transactions.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -261,8 +261,8 @@ static const ulong XID_BUFFER_SIZE= XIDDATASIZE*2 + 2 + 1; */ static size_t xid_to_hex(char *buf, size_t buf_len, PSI_xid *xid, size_t offset, size_t length) { - DBUG_ASSERT(buf_len >= XID_BUFFER_SIZE); - DBUG_ASSERT(offset + length <= XIDDATASIZE); + assert(buf_len >= XID_BUFFER_SIZE); + assert(offset + length <= XIDDATASIZE); *buf++= '0'; *buf++= 'x'; return bin_to_hex_str(buf, buf_len-2, (char*)(xid->data + offset), length) + 2; @@ -279,7 +279,7 @@ static size_t xid_to_hex(char *buf, size_t buf_len, PSI_xid *xid, size_t offset, */ static void xid_store(Field *field, PSI_xid *xid, size_t offset, size_t length) { - DBUG_ASSERT(!xid->is_null()); + assert(!xid->is_null()); if (xid_printable(xid, offset, length)) { field->store(xid->data + offset, length, &my_charset_bin); @@ -318,7 +318,7 @@ int table_events_transactions_common::read_row_values(TABLE *table, return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 3); + assert(table->s->null_bytes == 3); buf[0]= 0; buf[1]= 0; buf[2]= 0; @@ -436,7 +436,7 @@ int table_events_transactions_common::read_row_values(TABLE *table, f->set_null(); break; default: - DBUG_ASSERT(false); + assert(false); } } } @@ -591,10 +591,10 @@ int table_events_transactions_history::rnd_pos(const void *pos) PFS_thread *pfs_thread; PFS_events_transactions *transaction; - DBUG_ASSERT(events_transactions_history_per_thread != 0); + assert(events_transactions_history_per_thread != 0); set_position(pos); - DBUG_ASSERT(m_pos.m_index_2 < events_transactions_history_per_thread); + assert(m_pos.m_index_2 < events_transactions_history_per_thread); pfs_thread= global_thread_container.get(m_pos.m_index_1); if (pfs_thread != NULL) diff --git a/storage/perfschema/table_events_transactions.h b/storage/perfschema/table_events_transactions.h index 9987319abb2..b9f8f750d85 100644 --- a/storage/perfschema/table_events_transactions.h +++ b/storage/perfschema/table_events_transactions.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_events_waits.cc b/storage/perfschema/table_events_waits.cc index ae6530a0d48..a345c6fdf3a 100644 --- a/storage/perfschema/table_events_waits.cc +++ b/storage/perfschema/table_events_waits.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -656,7 +656,7 @@ int table_events_waits_common::read_row_values(TABLE *table, return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 2); + assert(table->s->null_bytes == 2); buf[0]= 0; buf[1]= 0; @@ -788,7 +788,7 @@ int table_events_waits_common::read_row_values(TABLE *table, f->set_null(); break; default: - DBUG_ASSERT(false); + assert(false); } } } @@ -907,7 +907,7 @@ int table_events_waits_current::rnd_pos(const void *pos) } #endif - DBUG_ASSERT(m_pos.m_index_2 < WAIT_STACK_LOGICAL_SIZE); + assert(m_pos.m_index_2 < WAIT_STACK_LOGICAL_SIZE); if (wait->m_wait_class != NO_WAIT_CLASS) { @@ -1008,13 +1008,13 @@ int table_events_waits_history::rnd_pos(const void *pos) PFS_thread *pfs_thread; PFS_events_waits *wait; - DBUG_ASSERT(events_waits_history_per_thread != 0); + assert(events_waits_history_per_thread != 0); set_position(pos); pfs_thread= global_thread_container.get(m_pos.m_index_1); if (pfs_thread != NULL) { - DBUG_ASSERT(m_pos.m_index_2 < events_waits_history_per_thread); + assert(m_pos.m_index_2 < events_waits_history_per_thread); if ( ! pfs_thread->m_waits_history_full && (m_pos.m_index_2 >= pfs_thread->m_waits_history_index)) diff --git a/storage/perfschema/table_events_waits.h b/storage/perfschema/table_events_waits.h index 9173ec30594..82d6f56bbb7 100644 --- a/storage/perfschema/table_events_waits.h +++ b/storage/perfschema/table_events_waits.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_events_waits_summary.cc b/storage/perfschema/table_events_waits_summary.cc index dfc89596469..b9565d54460 100644 --- a/storage/perfschema/table_events_waits_summary.cc +++ b/storage/perfschema/table_events_waits_summary.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -196,7 +196,7 @@ int table_events_waits_summary_by_instance return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 0); + assert(table->s->null_bytes == 0); for (; (f= *fields) ; fields++) { @@ -226,7 +226,7 @@ int table_events_waits_summary_by_instance set_field_ulonglong(f, m_row.m_stat.m_max); break; default: - DBUG_ASSERT(false); + assert(false); } } } diff --git a/storage/perfschema/table_events_waits_summary.h b/storage/perfschema/table_events_waits_summary.h index 51d8a62e02d..13d50a23760 100644 --- a/storage/perfschema/table_events_waits_summary.h +++ b/storage/perfschema/table_events_waits_summary.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_ews_by_account_by_event_name.cc b/storage/perfschema/table_ews_by_account_by_event_name.cc index f04df499670..007f75e52eb 100644 --- a/storage/perfschema/table_ews_by_account_by_event_name.cc +++ b/storage/perfschema/table_ews_by_account_by_event_name.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -137,7 +137,7 @@ int table_ews_by_account_by_event_name::rnd_next(void) break; default: instr_class= NULL; - DBUG_ASSERT(false); + assert(false); break; } @@ -194,7 +194,7 @@ table_ews_by_account_by_event_name::rnd_pos(const void *pos) break; default: instr_class= NULL; - DBUG_ASSERT(false); + assert(false); } if (instr_class) { @@ -243,7 +243,7 @@ int table_ews_by_account_by_event_name return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 1); + assert(table->s->null_bytes == 1); buf[0]= 0; for (; (f= *fields) ; fields++) diff --git a/storage/perfschema/table_ews_by_account_by_event_name.h b/storage/perfschema/table_ews_by_account_by_event_name.h index e64a61b229c..4d626cf44cf 100644 --- a/storage/perfschema/table_ews_by_account_by_event_name.h +++ b/storage/perfschema/table_ews_by_account_by_event_name.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_ews_by_host_by_event_name.cc b/storage/perfschema/table_ews_by_host_by_event_name.cc index 6d94dd851a5..3a1ee52b6e4 100644 --- a/storage/perfschema/table_ews_by_host_by_event_name.cc +++ b/storage/perfschema/table_ews_by_host_by_event_name.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -138,7 +138,7 @@ int table_ews_by_host_by_event_name::rnd_next(void) break; default: instr_class= NULL; - DBUG_ASSERT(false); + assert(false); break; } @@ -195,7 +195,7 @@ table_ews_by_host_by_event_name::rnd_pos(const void *pos) break; default: instr_class= NULL; - DBUG_ASSERT(false); + assert(false); break; } if (instr_class) @@ -246,7 +246,7 @@ int table_ews_by_host_by_event_name return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 1); + assert(table->s->null_bytes == 1); buf[0]= 0; for (; (f= *fields) ; fields++) diff --git a/storage/perfschema/table_ews_by_host_by_event_name.h b/storage/perfschema/table_ews_by_host_by_event_name.h index 074ec0be822..fb1060cb45e 100644 --- a/storage/perfschema/table_ews_by_host_by_event_name.h +++ b/storage/perfschema/table_ews_by_host_by_event_name.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_ews_by_thread_by_event_name.cc b/storage/perfschema/table_ews_by_thread_by_event_name.cc index 89a34665e79..803e81b4a7b 100644 --- a/storage/perfschema/table_ews_by_thread_by_event_name.cc +++ b/storage/perfschema/table_ews_by_thread_by_event_name.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -134,7 +134,7 @@ int table_ews_by_thread_by_event_name::rnd_next(void) instr_class= find_metadata_class(m_pos.m_index_3); break; default: - DBUG_ASSERT(false); + assert(false); instr_class= NULL; break; } @@ -190,7 +190,7 @@ table_ews_by_thread_by_event_name::rnd_pos(const void *pos) instr_class= find_metadata_class(m_pos.m_index_3); break; default: - DBUG_ASSERT(false); + assert(false); instr_class= NULL; } @@ -253,7 +253,7 @@ int table_ews_by_thread_by_event_name return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 0); + assert(table->s->null_bytes == 0); for (; (f= *fields) ; fields++) { diff --git a/storage/perfschema/table_ews_by_thread_by_event_name.h b/storage/perfschema/table_ews_by_thread_by_event_name.h index d3850e93c0a..85209f6fad4 100644 --- a/storage/perfschema/table_ews_by_thread_by_event_name.h +++ b/storage/perfschema/table_ews_by_thread_by_event_name.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_ews_by_user_by_event_name.cc b/storage/perfschema/table_ews_by_user_by_event_name.cc index 446ce860792..d1e88da59aa 100644 --- a/storage/perfschema/table_ews_by_user_by_event_name.cc +++ b/storage/perfschema/table_ews_by_user_by_event_name.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -137,7 +137,7 @@ int table_ews_by_user_by_event_name::rnd_next(void) break; default: instr_class= NULL; - DBUG_ASSERT(false); + assert(false); break; } @@ -194,7 +194,7 @@ table_ews_by_user_by_event_name::rnd_pos(const void *pos) break; default: instr_class= NULL; - DBUG_ASSERT(false); + assert(false); break; } if (instr_class) @@ -245,7 +245,7 @@ int table_ews_by_user_by_event_name return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 1); + assert(table->s->null_bytes == 1); buf[0]= 0; for (; (f= *fields) ; fields++) diff --git a/storage/perfschema/table_ews_by_user_by_event_name.h b/storage/perfschema/table_ews_by_user_by_event_name.h index b088c8e2015..ffb2e9074b2 100644 --- a/storage/perfschema/table_ews_by_user_by_event_name.h +++ b/storage/perfschema/table_ews_by_user_by_event_name.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_ews_global_by_event_name.cc b/storage/perfschema/table_ews_global_by_event_name.cc index eaea6c68176..d4853685a17 100644 --- a/storage/perfschema/table_ews_global_by_event_name.cc +++ b/storage/perfschema/table_ews_global_by_event_name.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -240,8 +240,8 @@ table_ews_global_by_event_name::rnd_pos(const void *pos) } break; case pos_ews_global_by_event_name::VIEW_TABLE: - DBUG_ASSERT(m_pos.m_index_2 >= 1); - DBUG_ASSERT(m_pos.m_index_2 <= 2); + assert(m_pos.m_index_2 >= 1); + assert(m_pos.m_index_2 <= 2); if (m_pos.m_index_2 == 1) make_table_io_row(&global_table_io_class); else @@ -272,7 +272,7 @@ table_ews_global_by_event_name::rnd_pos(const void *pos) } break; default: - DBUG_ASSERT(false); + assert(false); break; } @@ -414,7 +414,7 @@ int table_ews_global_by_event_name return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 0); + assert(table->s->null_bytes == 0); for (; (f= *fields) ; fields++) { diff --git a/storage/perfschema/table_ews_global_by_event_name.h b/storage/perfschema/table_ews_global_by_event_name.h index a9deb97a52d..548f0af4666 100644 --- a/storage/perfschema/table_ews_global_by_event_name.h +++ b/storage/perfschema/table_ews_global_by_event_name.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_file_instances.cc b/storage/perfschema/table_file_instances.cc index ebd2371900d..abbaf0745b3 100644 --- a/storage/perfschema/table_file_instances.cc +++ b/storage/perfschema/table_file_instances.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -145,7 +145,7 @@ int table_file_instances::read_row_values(TABLE *table, return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 0); + assert(table->s->null_bytes == 0); for (; (f= *fields) ; fields++) { @@ -164,7 +164,7 @@ int table_file_instances::read_row_values(TABLE *table, set_field_ulong(f, m_row.m_open_count); break; default: - DBUG_ASSERT(false); + assert(false); } } } diff --git a/storage/perfschema/table_file_instances.h b/storage/perfschema/table_file_instances.h index cb3d39d46fb..1517e83035b 100644 --- a/storage/perfschema/table_file_instances.h +++ b/storage/perfschema/table_file_instances.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_file_summary_by_event_name.cc b/storage/perfschema/table_file_summary_by_event_name.cc index b6ecb35e6fa..e7c2d5559e6 100644 --- a/storage/perfschema/table_file_summary_by_event_name.cc +++ b/storage/perfschema/table_file_summary_by_event_name.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -167,7 +167,7 @@ int table_file_summary_by_event_name::read_row_values(TABLE *table, return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 0); + assert(table->s->null_bytes == 0); for (; (f= *fields) ; fields++) { @@ -249,7 +249,7 @@ int table_file_summary_by_event_name::read_row_values(TABLE *table, break; default: - DBUG_ASSERT(false); + assert(false); break; } } // if diff --git a/storage/perfschema/table_file_summary_by_event_name.h b/storage/perfschema/table_file_summary_by_event_name.h index ae2124fe763..852b680262e 100644 --- a/storage/perfschema/table_file_summary_by_event_name.h +++ b/storage/perfschema/table_file_summary_by_event_name.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_file_summary_by_instance.cc b/storage/perfschema/table_file_summary_by_instance.cc index 854054b8b4e..2a41f9b7bff 100644 --- a/storage/perfschema/table_file_summary_by_instance.cc +++ b/storage/perfschema/table_file_summary_by_instance.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -181,7 +181,7 @@ int table_file_summary_by_instance::read_row_values(TABLE *table, return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 0); + assert(table->s->null_bytes == 0); for (; (f= *fields) ; fields++) { @@ -269,7 +269,7 @@ int table_file_summary_by_instance::read_row_values(TABLE *table, set_field_ulonglong(f, m_row.m_io_stat.m_misc.m_waits.m_max); break; default: - DBUG_ASSERT(false); + assert(false); } } } diff --git a/storage/perfschema/table_file_summary_by_instance.h b/storage/perfschema/table_file_summary_by_instance.h index 7ea90bac056..f0c3c1303fb 100644 --- a/storage/perfschema/table_file_summary_by_instance.h +++ b/storage/perfschema/table_file_summary_by_instance.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_global_status.cc b/storage/perfschema/table_global_status.cc index 53e6fddef7a..c68e501d819 100644 --- a/storage/perfschema/table_global_status.cc +++ b/storage/perfschema/table_global_status.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2015, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -164,7 +164,7 @@ int table_global_status return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 1); + assert(table->s->null_bytes == 1); buf[0]= 0; for (; (f= *fields) ; fields++) @@ -180,7 +180,7 @@ int table_global_status m_row.m_variable_value.set_field(f); break; default: - DBUG_ASSERT(false); + assert(false); } } } diff --git a/storage/perfschema/table_global_status.h b/storage/perfschema/table_global_status.h index a97ea9d0041..53d7ca459c9 100644 --- a/storage/perfschema/table_global_status.h +++ b/storage/perfschema/table_global_status.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2015, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_global_variables.cc b/storage/perfschema/table_global_variables.cc index 117e06e36bf..67be7e4e99a 100644 --- a/storage/perfschema/table_global_variables.cc +++ b/storage/perfschema/table_global_variables.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2015, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -124,7 +124,7 @@ int table_global_variables::rnd_pos(const void *pos) return HA_ERR_RECORD_DELETED; set_position(pos); - DBUG_ASSERT(m_pos.m_index < m_sysvar_cache.size()); + assert(m_pos.m_index < m_sysvar_cache.size()); const System_variable *system_var= m_sysvar_cache.get(m_pos.m_index); if (system_var != NULL) @@ -158,7 +158,7 @@ int table_global_variables return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 1); + assert(table->s->null_bytes == 1); buf[0]= 0; for (; (f= *fields) ; fields++) @@ -174,7 +174,7 @@ int table_global_variables m_row.m_variable_value.set_field(f); break; default: - DBUG_ASSERT(false); + assert(false); } } } diff --git a/storage/perfschema/table_global_variables.h b/storage/perfschema/table_global_variables.h index b9124e76f65..8a9bbd63574 100644 --- a/storage/perfschema/table_global_variables.h +++ b/storage/perfschema/table_global_variables.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2015, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_helper.cc b/storage/perfschema/table_helper.cc index 55b1397143e..0ae6f6c0786 100644 --- a/storage/perfschema/table_helper.cc +++ b/storage/perfschema/table_helper.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -107,7 +107,7 @@ void PFS_account_row::set_field(uint index, Field *f) f->set_null(); break; default: - DBUG_ASSERT(false); + assert(false); break; } } @@ -181,7 +181,7 @@ void PFS_digest_row::set_field(uint index, Field *f) f->set_null(); break; default: - DBUG_ASSERT(false); + assert(false); break; } } @@ -311,7 +311,7 @@ void PFS_object_row::set_field(uint index, Field *f) PFS_engine_table::set_field_varchar_utf8(f, m_object_name, m_object_name_length); break; default: - DBUG_ASSERT(false); + assert(false); } } @@ -338,7 +338,7 @@ void PFS_object_row::set_nullable_field(uint index, Field *f) f->set_null(); break; default: - DBUG_ASSERT(false); + assert(false); } } @@ -394,7 +394,7 @@ void PFS_index_row::set_field(uint index, Field *f) f->set_null(); break; default: - DBUG_ASSERT(false); + assert(false); } } @@ -467,7 +467,7 @@ void PFS_statement_stat_row::set_field(uint index, Field *f) PFS_engine_table::set_field_ulonglong(f, m_no_good_index_used); break; default: - DBUG_ASSERT(false); + assert(false); break; } } @@ -498,7 +498,7 @@ void PFS_transaction_stat_row::set_field(uint index, Field *f) m_read_only_row.set_field(index-10, f); break; default: - DBUG_ASSERT(false); + assert(false); break; } } @@ -514,7 +514,7 @@ void PFS_connection_stat_row::set_field(uint index, Field *f) PFS_engine_table::set_field_ulonglong(f, m_total_connections); break; default: - DBUG_ASSERT(false); + assert(false); break; } } @@ -555,7 +555,7 @@ void set_field_object_type(Field *f, enum_object_type object_type) break; case NO_OBJECT_TYPE: default: - DBUG_ASSERT(false); + assert(false); PFS_engine_table::set_field_varchar_utf8(f, "", 0); break; } @@ -599,7 +599,7 @@ void set_field_lock_type(Field *f, PFS_TL_LOCK_TYPE lock_type) f->set_null(); break; default: - DBUG_ASSERT(false); + assert(false); } } @@ -712,7 +712,7 @@ void set_field_mdl_duration(Field *f, opaque_mdl_duration mdl_duration) break; case MDL_DURATION_END: default: - DBUG_ASSERT(false); + assert(false); } } @@ -734,7 +734,7 @@ void set_field_mdl_status(Field *f, opaque_mdl_status mdl_status) PFS_engine_table::set_field_varchar_utf8(f, "POST_RELEASE_NOTIFY", 19); break; default: - DBUG_ASSERT(false); + assert(false); } } @@ -781,7 +781,7 @@ void PFS_memory_stat_row::set_field(uint index, Field *f) PFS_engine_table::set_field_longlong(f, val); break; default: - DBUG_ASSERT(false); + assert(false); break; } } @@ -803,7 +803,7 @@ void set_field_isolation_level(Field *f, enum_isolation_level iso_level) PFS_engine_table::set_field_varchar_utf8(f, "SERIALIZABLE", 12); break; default: - DBUG_ASSERT(false); + assert(false); } } @@ -830,14 +830,14 @@ void set_field_xa_state(Field *f, enum_xa_transaction_state xa_state) PFS_engine_table::set_field_varchar_utf8(f, "COMMITTED", 9); break; default: - DBUG_ASSERT(false); + assert(false); } } void PFS_variable_name_row::make_row(const char* str, size_t length) { - DBUG_ASSERT(length <= sizeof(m_str)); - DBUG_ASSERT(length <= NAME_CHAR_LEN); + assert(length <= sizeof(m_str)); + assert(length <= NAME_CHAR_LEN); m_length= MY_MIN(static_cast<uint>(length), NAME_CHAR_LEN); /* enforce max name length */ if (m_length > 0) @@ -857,8 +857,8 @@ void PFS_variable_value_row::make_row(const System_variable *var) void PFS_variable_value_row::make_row(const CHARSET_INFO *cs, const char* str, size_t length) { - DBUG_ASSERT(cs != NULL); - DBUG_ASSERT(length <= sizeof(m_str)); + assert(cs != NULL); + assert(length <= sizeof(m_str)); if (length > 0) { memcpy(m_str, str, length); diff --git a/storage/perfschema/table_helper.h b/storage/perfschema/table_helper.h index 3ce74648360..c7e4bf4dfb5 100644 --- a/storage/perfschema/table_helper.h +++ b/storage/perfschema/table_helper.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -278,7 +278,7 @@ struct PFS_stat_row PFS_engine_table::set_field_ulonglong(f, m_max); break; default: - DBUG_ASSERT(false); + assert(false); } } }; diff --git a/storage/perfschema/table_host_cache.cc b/storage/perfschema/table_host_cache.cc index 6fbafea4c88..1c1cba60b0d 100644 --- a/storage/perfschema/table_host_cache.cc +++ b/storage/perfschema/table_host_cache.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2011, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -84,7 +84,7 @@ PFS_engine_table* table_host_cache::create(void) if (t != NULL) { THD *thd= current_thd; - DBUG_ASSERT(thd != NULL); + assert(thd != NULL); t->materialize(thd); } return t; @@ -127,8 +127,8 @@ void table_host_cache::materialize(THD *thd) row_host_cache *rows; row_host_cache *row; - DBUG_ASSERT(m_all_rows == NULL); - DBUG_ASSERT(m_row_count == 0); + assert(m_all_rows == NULL); + assert(m_row_count == 0); hostname_cache_lock(); @@ -241,7 +241,7 @@ int table_host_cache::rnd_next(void) int table_host_cache::rnd_pos(const void *pos) { set_position(pos); - DBUG_ASSERT(m_pos.m_index < m_row_count); + assert(m_pos.m_index < m_row_count); m_row= &m_all_rows[m_pos.m_index]; return 0; } @@ -253,10 +253,10 @@ int table_host_cache::read_row_values(TABLE *table, { Field *f; - DBUG_ASSERT(m_row); + assert(m_row); /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 1); + assert(table->s->null_bytes == 1); buf[0]= 0; for (; (f= *fields) ; fields++) @@ -362,7 +362,7 @@ int table_host_cache::read_row_values(TABLE *table, f->set_null(); break; default: - DBUG_ASSERT(false); + assert(false); } } } diff --git a/storage/perfschema/table_host_cache.h b/storage/perfschema/table_host_cache.h index 57cd0fa02ad..5680a49675f 100644 --- a/storage/perfschema/table_host_cache.h +++ b/storage/perfschema/table_host_cache.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2011, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_hosts.cc b/storage/perfschema/table_hosts.cc index ccf8b7e7896..7c6f6212bb8 100644 --- a/storage/perfschema/table_hosts.cc +++ b/storage/perfschema/table_hosts.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2011, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -123,7 +123,7 @@ int table_hosts::read_row_values(TABLE *table, return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 1); + assert(table->s->null_bytes == 1); buf[0]= 0; for (; (f= *fields) ; fields++) @@ -140,7 +140,7 @@ int table_hosts::read_row_values(TABLE *table, m_row.m_connection_stat.set_field(f->field_index - 1, f); break; default: - DBUG_ASSERT(false); + assert(false); } } } diff --git a/storage/perfschema/table_hosts.h b/storage/perfschema/table_hosts.h index 61c04d12179..51bc7f2f2a7 100644 --- a/storage/perfschema/table_hosts.h +++ b/storage/perfschema/table_hosts.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2011, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_md_locks.cc b/storage/perfschema/table_md_locks.cc index a6bfdd25b68..d7e3423d9bc 100644 --- a/storage/perfschema/table_md_locks.cc +++ b/storage/perfschema/table_md_locks.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2012, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -155,7 +155,7 @@ int table_metadata_locks::read_row_values(TABLE *table, return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 1); + assert(table->s->null_bytes == 1); buf[0]= 0; for (; (f= *fields) ; fields++) @@ -197,7 +197,7 @@ int table_metadata_locks::read_row_values(TABLE *table, f->set_null(); break; default: - DBUG_ASSERT(false); + assert(false); } } } diff --git a/storage/perfschema/table_md_locks.h b/storage/perfschema/table_md_locks.h index 40b6d2f6efb..c6a4a2eca8d 100644 --- a/storage/perfschema/table_md_locks.h +++ b/storage/perfschema/table_md_locks.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2012, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_mems_by_account_by_event_name.cc b/storage/perfschema/table_mems_by_account_by_event_name.cc index 7a0254d91a2..c4217641f6a 100644 --- a/storage/perfschema/table_mems_by_account_by_event_name.cc +++ b/storage/perfschema/table_mems_by_account_by_event_name.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2011, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -193,7 +193,7 @@ int table_mems_by_account_by_event_name::read_row_values(TABLE *table, return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 1); + assert(table->s->null_bytes == 1); buf[0]= 0; for (; (f= *fields) ; fields++) diff --git a/storage/perfschema/table_mems_by_account_by_event_name.h b/storage/perfschema/table_mems_by_account_by_event_name.h index b6151246f34..9d43c4cf404 100644 --- a/storage/perfschema/table_mems_by_account_by_event_name.h +++ b/storage/perfschema/table_mems_by_account_by_event_name.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2011, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_mems_by_host_by_event_name.cc b/storage/perfschema/table_mems_by_host_by_event_name.cc index 4b91d0420d5..b86fe70da28 100644 --- a/storage/perfschema/table_mems_by_host_by_event_name.cc +++ b/storage/perfschema/table_mems_by_host_by_event_name.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2011, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -194,7 +194,7 @@ int table_mems_by_host_by_event_name::read_row_values(TABLE *table, return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 1); + assert(table->s->null_bytes == 1); buf[0]= 0; for (; (f= *fields) ; fields++) diff --git a/storage/perfschema/table_mems_by_host_by_event_name.h b/storage/perfschema/table_mems_by_host_by_event_name.h index 1a55db2c9b3..a4fdde24fbd 100644 --- a/storage/perfschema/table_mems_by_host_by_event_name.h +++ b/storage/perfschema/table_mems_by_host_by_event_name.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2011, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_mems_by_thread_by_event_name.cc b/storage/perfschema/table_mems_by_thread_by_event_name.cc index 3c25e948cbf..8c79f8cc8d8 100644 --- a/storage/perfschema/table_mems_by_thread_by_event_name.cc +++ b/storage/perfschema/table_mems_by_thread_by_event_name.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2011, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -188,7 +188,7 @@ int table_mems_by_thread_by_event_name::read_row_values(TABLE *table, return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 0); + assert(table->s->null_bytes == 0); for (; (f= *fields) ; fields++) { diff --git a/storage/perfschema/table_mems_by_thread_by_event_name.h b/storage/perfschema/table_mems_by_thread_by_event_name.h index f8608198c2a..b89172669e6 100644 --- a/storage/perfschema/table_mems_by_thread_by_event_name.h +++ b/storage/perfschema/table_mems_by_thread_by_event_name.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2011, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_mems_by_user_by_event_name.cc b/storage/perfschema/table_mems_by_user_by_event_name.cc index dbb4b19c430..4bae383166a 100644 --- a/storage/perfschema/table_mems_by_user_by_event_name.cc +++ b/storage/perfschema/table_mems_by_user_by_event_name.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2011, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -194,7 +194,7 @@ int table_mems_by_user_by_event_name::read_row_values(TABLE *table, return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 1); + assert(table->s->null_bytes == 1); buf[0]= 0; for (; (f= *fields) ; fields++) diff --git a/storage/perfschema/table_mems_by_user_by_event_name.h b/storage/perfschema/table_mems_by_user_by_event_name.h index 2791e1d3587..34c4cd518ae 100644 --- a/storage/perfschema/table_mems_by_user_by_event_name.h +++ b/storage/perfschema/table_mems_by_user_by_event_name.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2011, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_mems_global_by_event_name.cc b/storage/perfschema/table_mems_global_by_event_name.cc index 4a6f7e86fed..e4b681072c8 100644 --- a/storage/perfschema/table_mems_global_by_event_name.cc +++ b/storage/perfschema/table_mems_global_by_event_name.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2011, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -218,7 +218,7 @@ int table_mems_global_by_event_name::read_row_values(TABLE *table, return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 0); + assert(table->s->null_bytes == 0); for (; (f= *fields) ; fields++) { diff --git a/storage/perfschema/table_mems_global_by_event_name.h b/storage/perfschema/table_mems_global_by_event_name.h index 14a54142f4e..46dbccbd414 100644 --- a/storage/perfschema/table_mems_global_by_event_name.h +++ b/storage/perfschema/table_mems_global_by_event_name.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2011, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_os_global_by_type.cc b/storage/perfschema/table_os_global_by_type.cc index 04592e70f41..b82ce9c2a7d 100644 --- a/storage/perfschema/table_os_global_by_type.cc +++ b/storage/perfschema/table_os_global_by_type.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -257,7 +257,7 @@ int table_os_global_by_type::read_row_values(TABLE *table, return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 1); + assert(table->s->null_bytes == 1); buf[0]= 0; for (; (f= *fields) ; fields++) @@ -293,7 +293,7 @@ int table_os_global_by_type::read_row_values(TABLE *table, set_field_ulonglong(f, m_row.m_stat.m_max); break; default: - DBUG_ASSERT(false); + assert(false); } } } diff --git a/storage/perfschema/table_os_global_by_type.h b/storage/perfschema/table_os_global_by_type.h index 37e6db1ed94..9cb3b47b964 100644 --- a/storage/perfschema/table_os_global_by_type.h +++ b/storage/perfschema/table_os_global_by_type.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_performance_timers.cc b/storage/perfschema/table_performance_timers.cc index 5f8714a356d..68878919e2b 100644 --- a/storage/perfschema/table_performance_timers.cc +++ b/storage/perfschema/table_performance_timers.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -121,7 +121,7 @@ int table_performance_timers::rnd_next(void) int table_performance_timers::rnd_pos(const void *pos) { set_position(pos); - DBUG_ASSERT(m_pos.m_index < COUNT_TIMER_NAME); + assert(m_pos.m_index < COUNT_TIMER_NAME); m_row= &m_data[m_pos.m_index]; return 0; } @@ -133,10 +133,10 @@ int table_performance_timers::read_row_values(TABLE *table, { Field *f; - DBUG_ASSERT(m_row); + assert(m_row); /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 1); + assert(table->s->null_bytes == 1); buf[0]= 0; for (; (f= *fields) ; fields++) @@ -167,7 +167,7 @@ int table_performance_timers::read_row_values(TABLE *table, f->set_null(); break; default: - DBUG_ASSERT(false); + assert(false); } } } diff --git a/storage/perfschema/table_performance_timers.h b/storage/perfschema/table_performance_timers.h index fe5f9cd5f4a..a2e12a4f824 100644 --- a/storage/perfschema/table_performance_timers.h +++ b/storage/perfschema/table_performance_timers.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_prepared_stmt_instances.cc b/storage/perfschema/table_prepared_stmt_instances.cc index c63827ec0ed..592386db4bb 100644 --- a/storage/perfschema/table_prepared_stmt_instances.cc +++ b/storage/perfschema/table_prepared_stmt_instances.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2014, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -218,7 +218,7 @@ int table_prepared_stmt_instances /* Set the null bits. */ - DBUG_ASSERT(table->s->null_bytes == 1); + assert(table->s->null_bytes == 1); buf[0]= 0; for (; (f= *fields) ; fields++) diff --git a/storage/perfschema/table_prepared_stmt_instances.h b/storage/perfschema/table_prepared_stmt_instances.h index a17184d4312..a061e0d9883 100644 --- a/storage/perfschema/table_prepared_stmt_instances.h +++ b/storage/perfschema/table_prepared_stmt_instances.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2014, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_replication_applier_configuration.cc b/storage/perfschema/table_replication_applier_configuration.cc index d13a6a98b30..809dfead9a2 100644 --- a/storage/perfschema/table_replication_applier_configuration.cc +++ b/storage/perfschema/table_replication_applier_configuration.cc @@ -1,5 +1,5 @@ /* - Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2013, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -169,7 +169,7 @@ int table_replication_applier_configuration::read_row_values(TABLE *table, the table record reserves an extra null byte, see open_binary_frm(). */ - DBUG_ASSERT(table->s->null_bytes == 1); + assert(table->s->null_bytes == 1); buf[0]= 0; for (; (f= *fields) ; fields++) @@ -185,7 +185,7 @@ int table_replication_applier_configuration::read_row_values(TABLE *table, set_field_ulong(f, static_cast<ulong>(m_row.desired_delay)); break; default: - DBUG_ASSERT(false); + assert(false); } } } diff --git a/storage/perfschema/table_replication_applier_configuration.h b/storage/perfschema/table_replication_applier_configuration.h index 18321ac079e..7baa9a6d990 100644 --- a/storage/perfschema/table_replication_applier_configuration.h +++ b/storage/perfschema/table_replication_applier_configuration.h @@ -1,5 +1,5 @@ /* - Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2013, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_replication_applier_status.cc b/storage/perfschema/table_replication_applier_status.cc index 991418266d2..ebe922902e7 100644 --- a/storage/perfschema/table_replication_applier_status.cc +++ b/storage/perfschema/table_replication_applier_status.cc @@ -1,5 +1,5 @@ /* - Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2013, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -188,7 +188,7 @@ int table_replication_applier_status::read_row_values(TABLE *table, if (unlikely(! m_row_exists)) return HA_ERR_RECORD_DELETED; - DBUG_ASSERT(table->s->null_bytes == 1); + assert(table->s->null_bytes == 1); buf[0]= 0; for (; (f= *fields) ; fields++) @@ -213,7 +213,7 @@ int table_replication_applier_status::read_row_values(TABLE *table, set_field_ulonglong(f, m_row.count_transactions_retries); break; default: - DBUG_ASSERT(false); + assert(false); } } } diff --git a/storage/perfschema/table_replication_applier_status.h b/storage/perfschema/table_replication_applier_status.h index 95845f38925..6278186bd53 100644 --- a/storage/perfschema/table_replication_applier_status.h +++ b/storage/perfschema/table_replication_applier_status.h @@ -1,5 +1,5 @@ /* - Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2013, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_replication_applier_status_by_coordinator.cc b/storage/perfschema/table_replication_applier_status_by_coordinator.cc index 5ef5ac95fdc..906b69540a8 100644 --- a/storage/perfschema/table_replication_applier_status_by_coordinator.cc +++ b/storage/perfschema/table_replication_applier_status_by_coordinator.cc @@ -1,5 +1,5 @@ /* - Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2013, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -208,7 +208,7 @@ int table_replication_applier_status_by_coordinator if (unlikely(! m_row_exists)) return HA_ERR_RECORD_DELETED; - DBUG_ASSERT(table->s->null_bytes == 1); + assert(table->s->null_bytes == 1); buf[0]= 0; for (; (f= *fields) ; fields++) @@ -240,7 +240,7 @@ int table_replication_applier_status_by_coordinator set_field_timestamp(f, m_row.last_error_timestamp); break; default: - DBUG_ASSERT(false); + assert(false); } } } diff --git a/storage/perfschema/table_replication_applier_status_by_coordinator.h b/storage/perfschema/table_replication_applier_status_by_coordinator.h index 8c1d4c4f029..36427e83e66 100644 --- a/storage/perfschema/table_replication_applier_status_by_coordinator.h +++ b/storage/perfschema/table_replication_applier_status_by_coordinator.h @@ -1,5 +1,5 @@ /* - Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2013, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_replication_applier_status_by_worker.cc b/storage/perfschema/table_replication_applier_status_by_worker.cc index 8b81e7eed6d..74db4ee658c 100644 --- a/storage/perfschema/table_replication_applier_status_by_worker.cc +++ b/storage/perfschema/table_replication_applier_status_by_worker.cc @@ -1,5 +1,5 @@ /* - Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2013, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -201,8 +201,8 @@ void table_replication_applier_status_by_worker::make_row(Master_info *mi) m_row.thread_id= 0; - DBUG_ASSERT(mi != NULL); - DBUG_ASSERT(mi->rli != NULL); + assert(mi != NULL); + assert(mi->rli != NULL); mysql_mutex_lock(&mi->rli->data_lock); @@ -250,7 +250,7 @@ void table_replication_applier_status_by_worker::make_row(Master_info *mi) AUTOMATIC_GROUP when the SQL thread is not executing any transaction. For this case, the field should be empty. */ - DBUG_ASSERT(mi->rli->currently_executing_gtid.type == AUTOMATIC_GROUP); + assert(mi->rli->currently_executing_gtid.type == AUTOMATIC_GROUP); m_row.last_seen_transaction_length= 0; memcpy(m_row.last_seen_transaction, "", 1); } @@ -333,7 +333,7 @@ void table_replication_applier_status_by_worker::make_row(Slave_worker *w) AUTOMATIC_GROUP when the worker is not executing any transaction. For this case, the field should be empty. */ - DBUG_ASSERT(w->currently_executing_gtid.type == AUTOMATIC_GROUP); + assert(w->currently_executing_gtid.type == AUTOMATIC_GROUP); m_row.last_seen_transaction_length= 0; memcpy(m_row.last_seen_transaction, "", 1); } @@ -367,7 +367,7 @@ int table_replication_applier_status_by_worker if (unlikely(! m_row_exists)) return HA_ERR_RECORD_DELETED; - DBUG_ASSERT(table->s->null_bytes == 1); + assert(table->s->null_bytes == 1); buf[0]= 0; for (; (f= *fields) ; fields++) @@ -404,7 +404,7 @@ int table_replication_applier_status_by_worker set_field_timestamp(f, m_row.last_error_timestamp); break; default: - DBUG_ASSERT(false); + assert(false); } } } diff --git a/storage/perfschema/table_replication_applier_status_by_worker.h b/storage/perfschema/table_replication_applier_status_by_worker.h index 0a881dae73f..3298d953158 100644 --- a/storage/perfschema/table_replication_applier_status_by_worker.h +++ b/storage/perfschema/table_replication_applier_status_by_worker.h @@ -1,5 +1,5 @@ /* - Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2013, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_replication_connection_configuration.cc b/storage/perfschema/table_replication_connection_configuration.cc index c93d500842f..6af8641c7a7 100644 --- a/storage/perfschema/table_replication_connection_configuration.cc +++ b/storage/perfschema/table_replication_connection_configuration.cc @@ -1,5 +1,5 @@ /* - Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2013, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -159,7 +159,7 @@ void table_replication_connection_configuration::make_row(Master_info *mi) m_row_exists= false; - DBUG_ASSERT(mi != NULL); + assert(mi != NULL); mysql_mutex_lock(&mi->data_lock); mysql_mutex_lock(&mi->rli.data_lock); @@ -251,7 +251,7 @@ int table_replication_connection_configuration::read_row_values(TABLE *table, if (unlikely(! m_row_exists)) return HA_ERR_RECORD_DELETED; - DBUG_ASSERT(table->s->null_bytes == 0); + assert(table->s->null_bytes == 0); for (; (f= *fields) ; fields++) { @@ -324,7 +324,7 @@ int table_replication_connection_configuration::read_row_values(TABLE *table, m_row.tls_version_length); break; default: - DBUG_ASSERT(false); + assert(false); } } } diff --git a/storage/perfschema/table_replication_connection_configuration.h b/storage/perfschema/table_replication_connection_configuration.h index d1c8861cf0d..4eb4726f7a6 100644 --- a/storage/perfschema/table_replication_connection_configuration.h +++ b/storage/perfschema/table_replication_connection_configuration.h @@ -1,5 +1,5 @@ /* - Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2013, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_replication_connection_status.cc b/storage/perfschema/table_replication_connection_status.cc index a4230913917..fd0b5309f7e 100644 --- a/storage/perfschema/table_replication_connection_status.cc +++ b/storage/perfschema/table_replication_connection_status.cc @@ -1,5 +1,5 @@ /* - Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2013, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -249,8 +249,8 @@ void table_replication_connection_status::make_row(Master_info *mi) m_row.thread_id_is_null= true; m_row.service_state= PS_RPL_CONNECT_SERVICE_STATE_NO; - DBUG_ASSERT(mi != NULL); - DBUG_ASSERT(mi->rli != NULL); + assert(mi != NULL); + assert(mi->rli != NULL); mysql_mutex_lock(&mi->data_lock); mysql_mutex_lock(&mi->rli->data_lock); @@ -376,7 +376,7 @@ int table_replication_connection_status::read_row_values(TABLE *table, if (unlikely(! m_row_exists)) return HA_ERR_RECORD_DELETED; - DBUG_ASSERT(table->s->null_bytes == 1); + assert(table->s->null_bytes == 1); buf[0]= 0; for (; (f= *fields) ; fields++) @@ -430,7 +430,7 @@ int table_replication_connection_status::read_row_values(TABLE *table, set_field_timestamp(f, m_row.last_error_timestamp); break; default: - DBUG_ASSERT(false); + assert(false); } } } diff --git a/storage/perfschema/table_replication_connection_status.h b/storage/perfschema/table_replication_connection_status.h index a1a5eb116bc..596a4e9ed49 100644 --- a/storage/perfschema/table_replication_connection_status.h +++ b/storage/perfschema/table_replication_connection_status.h @@ -1,5 +1,5 @@ /* - Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2013, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_replication_group_member_stats.cc b/storage/perfschema/table_replication_group_member_stats.cc index f85a3e3f099..7d15e383d70 100644 --- a/storage/perfschema/table_replication_group_member_stats.cc +++ b/storage/perfschema/table_replication_group_member_stats.cc @@ -1,5 +1,5 @@ /* - Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2014, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -263,7 +263,7 @@ int table_replication_group_member_stats::rnd_pos(const void *pos) return HA_ERR_END_OF_FILE; set_position(pos); - DBUG_ASSERT(m_pos.m_index < 1); + assert(m_pos.m_index < 1); make_row(); return 0; @@ -323,7 +323,7 @@ int table_replication_group_member_stats::read_row_values(TABLE *table, if (unlikely(! m_row_exists)) return HA_ERR_RECORD_DELETED; - DBUG_ASSERT(table->s->null_bytes == 0); + assert(table->s->null_bytes == 0); buf[0]= 0; for (; (f= *fields) ; fields++) @@ -364,7 +364,7 @@ int table_replication_group_member_stats::read_row_values(TABLE *table, break; default: - DBUG_ASSERT(false); + assert(false); } } } diff --git a/storage/perfschema/table_replication_group_member_stats.h b/storage/perfschema/table_replication_group_member_stats.h index f2fcaf553b4..67a05cb8e53 100644 --- a/storage/perfschema/table_replication_group_member_stats.h +++ b/storage/perfschema/table_replication_group_member_stats.h @@ -1,5 +1,5 @@ /* - Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2014, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_replication_group_members.cc b/storage/perfschema/table_replication_group_members.cc index 5967b98c7cc..2a870e58ce3 100644 --- a/storage/perfschema/table_replication_group_members.cc +++ b/storage/perfschema/table_replication_group_members.cc @@ -1,5 +1,5 @@ /* - Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2013, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -193,7 +193,7 @@ int table_replication_group_members::rnd_pos(const void *pos) return HA_ERR_END_OF_FILE; set_position(pos); - DBUG_ASSERT(m_pos.m_index < get_row_count()); + assert(m_pos.m_index < get_row_count()); make_row(m_pos.m_index); return 0; @@ -245,7 +245,7 @@ int table_replication_group_members::read_row_values(TABLE *table, if (unlikely(! m_row_exists)) return HA_ERR_RECORD_DELETED; - DBUG_ASSERT(table->s->null_bytes == 1); + assert(table->s->null_bytes == 1); buf[0]= 0; for (; (f= *fields) ; fields++) @@ -273,7 +273,7 @@ int table_replication_group_members::read_row_values(TABLE *table, set_field_char_utf8(f, m_row.member_state, m_row.member_state_length); break; default: - DBUG_ASSERT(false); + assert(false); } } } diff --git a/storage/perfschema/table_replication_group_members.h b/storage/perfschema/table_replication_group_members.h index 8ce875eba3a..2df013fa35b 100644 --- a/storage/perfschema/table_replication_group_members.h +++ b/storage/perfschema/table_replication_group_members.h @@ -1,5 +1,5 @@ /* - Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2013, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_session_account_connect_attrs.cc b/storage/perfschema/table_session_account_connect_attrs.cc index 90c9fa37d6d..563ce03d638 100644 --- a/storage/perfschema/table_session_account_connect_attrs.cc +++ b/storage/perfschema/table_session_account_connect_attrs.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -63,7 +63,7 @@ table_session_account_connect_attrs::thread_fits(PFS_thread *thread) return false; /* The thread we compare to, by definition, has some instrumentation. */ - DBUG_ASSERT(thread != NULL); + assert(thread != NULL); uint username_length= current_thread->m_username_length; uint hostname_length= current_thread->m_hostname_length; diff --git a/storage/perfschema/table_session_account_connect_attrs.h b/storage/perfschema/table_session_account_connect_attrs.h index 043f83da184..dec5295808d 100644 --- a/storage/perfschema/table_session_account_connect_attrs.h +++ b/storage/perfschema/table_session_account_connect_attrs.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2012, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_session_connect.cc b/storage/perfschema/table_session_connect.cc index 09f32feaa4d..dfb203c5d46 100644 --- a/storage/perfschema/table_session_connect.cc +++ b/storage/perfschema/table_session_connect.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -250,7 +250,7 @@ int table_session_connect::read_row_values(TABLE *table, return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 1); + assert(table->s->null_bytes == 1); buf[0]= 0; for (; (f= *fields) ; fields++) @@ -280,7 +280,7 @@ int table_session_connect::read_row_values(TABLE *table, set_field_ulong(f, m_row.m_ordinal_position); break; default: - DBUG_ASSERT(false); + assert(false); } } } diff --git a/storage/perfschema/table_session_connect.h b/storage/perfschema/table_session_connect.h index 55433e2571a..b9be1ce304c 100644 --- a/storage/perfschema/table_session_connect.h +++ b/storage/perfschema/table_session_connect.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2012, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_session_connect_attrs.cc b/storage/perfschema/table_session_connect_attrs.cc index d0090374ddd..034ff12c91e 100644 --- a/storage/perfschema/table_session_connect_attrs.cc +++ b/storage/perfschema/table_session_connect_attrs.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_session_connect_attrs.h b/storage/perfschema/table_session_connect_attrs.h index 09b9d1c49e1..823207726f3 100644 --- a/storage/perfschema/table_session_connect_attrs.h +++ b/storage/perfschema/table_session_connect_attrs.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2012, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_session_status.cc b/storage/perfschema/table_session_status.cc index b9e19b99a69..05795af4f3c 100644 --- a/storage/perfschema/table_session_status.cc +++ b/storage/perfschema/table_session_status.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2015, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -123,7 +123,7 @@ table_session_status::rnd_pos(const void *pos) return HA_ERR_RECORD_DELETED; set_position(pos); - DBUG_ASSERT(m_pos.m_index < m_status_cache.size()); + assert(m_pos.m_index < m_status_cache.size()); if (m_status_cache.is_materialized()) { @@ -159,7 +159,7 @@ int table_session_status return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 1); + assert(table->s->null_bytes == 1); buf[0]= 0; for (; (f= *fields) ; fields++) @@ -175,7 +175,7 @@ int table_session_status m_row.m_variable_value.set_field(f); break; default: - DBUG_ASSERT(false); + assert(false); } } } diff --git a/storage/perfschema/table_session_status.h b/storage/perfschema/table_session_status.h index 24634fe47b5..ed42d3fc57d 100644 --- a/storage/perfschema/table_session_status.h +++ b/storage/perfschema/table_session_status.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2015, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_session_variables.cc b/storage/perfschema/table_session_variables.cc index 3ed1314535e..dd6914d81c8 100644 --- a/storage/perfschema/table_session_variables.cc +++ b/storage/perfschema/table_session_variables.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2015, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -124,7 +124,7 @@ int table_session_variables::rnd_pos(const void *pos) return HA_ERR_RECORD_DELETED; set_position(pos); - DBUG_ASSERT(m_pos.m_index < m_sysvar_cache.size()); + assert(m_pos.m_index < m_sysvar_cache.size()); if (m_sysvar_cache.is_materialized()) { @@ -161,7 +161,7 @@ int table_session_variables return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 1); + assert(table->s->null_bytes == 1); buf[0]= 0; for (; (f= *fields) ; fields++) @@ -177,7 +177,7 @@ int table_session_variables m_row.m_variable_value.set_field(f); break; default: - DBUG_ASSERT(false); + assert(false); } } } diff --git a/storage/perfschema/table_session_variables.h b/storage/perfschema/table_session_variables.h index 576bf73edbb..a32b7483bce 100644 --- a/storage/perfschema/table_session_variables.h +++ b/storage/perfschema/table_session_variables.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2015, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_setup_actors.cc b/storage/perfschema/table_setup_actors.cc index 3dadf9a031e..03f42cb6433 100644 --- a/storage/perfschema/table_setup_actors.cc +++ b/storage/perfschema/table_setup_actors.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -100,7 +100,7 @@ int table_setup_actors::write_row(TABLE *table, const unsigned char *buf, history_value= (enum_yes_no) get_field_enum(f); break; default: - DBUG_ASSERT(false); + assert(false); } } } @@ -221,7 +221,7 @@ int table_setup_actors::read_row_values(TABLE *table, return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 1); + assert(table->s->null_bytes == 1); for (; (f= *fields) ; fields++) { @@ -245,7 +245,7 @@ int table_setup_actors::read_row_values(TABLE *table, set_field_enum(f, (*m_row.m_history_ptr) ? ENUM_YES : ENUM_NO); break; default: - DBUG_ASSERT(false); + assert(false); } } } @@ -287,7 +287,7 @@ int table_setup_actors::update_row_values(TABLE *table, *m_row.m_history_ptr= (value == ENUM_YES) ? true : false; break; default: - DBUG_ASSERT(false); + assert(false); } } } @@ -300,7 +300,7 @@ int table_setup_actors::delete_row_values(TABLE *table, const unsigned char *buf, Field **fields) { - DBUG_ASSERT(m_row_exists); + assert(m_row_exists); CHARSET_INFO *cs= &my_charset_utf8mb3_bin; String user(m_row.m_username, m_row.m_username_length, cs); diff --git a/storage/perfschema/table_setup_actors.h b/storage/perfschema/table_setup_actors.h index 32a603317b9..f9c316e3396 100644 --- a/storage/perfschema/table_setup_actors.h +++ b/storage/perfschema/table_setup_actors.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_setup_consumers.cc b/storage/perfschema/table_setup_consumers.cc index 02f4dc0009f..88e689b9ff8 100644 --- a/storage/perfschema/table_setup_consumers.cc +++ b/storage/perfschema/table_setup_consumers.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -194,7 +194,7 @@ int table_setup_consumers::rnd_next(void) int table_setup_consumers::rnd_pos(const void *pos) { set_position(pos); - DBUG_ASSERT(m_pos.m_index < COUNT_SETUP_CONSUMERS); + assert(m_pos.m_index < COUNT_SETUP_CONSUMERS); m_row= &all_setup_consumers_data[m_pos.m_index]; return 0; } @@ -206,11 +206,11 @@ int table_setup_consumers::read_row_values(TABLE *table, { Field *f; - DBUG_ASSERT(m_row); + assert(m_row); /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 0); + assert(table->s->null_bytes == 0); for (; (f= *fields) ; fields++) { @@ -225,7 +225,7 @@ int table_setup_consumers::read_row_values(TABLE *table, set_field_enum(f, (*m_row->m_enabled_ptr) ? ENUM_YES : ENUM_NO); break; default: - DBUG_ASSERT(false); + assert(false); } } } @@ -241,7 +241,7 @@ int table_setup_consumers::update_row_values(TABLE *table, Field *f; enum_yes_no value; - DBUG_ASSERT(m_row); + assert(m_row); for (; (f= *fields) ; fields++) { @@ -258,7 +258,7 @@ int table_setup_consumers::update_row_values(TABLE *table, break; } default: - DBUG_ASSERT(false); + assert(false); } } } diff --git a/storage/perfschema/table_setup_consumers.h b/storage/perfschema/table_setup_consumers.h index 9d601622adf..77cd09dcfbb 100644 --- a/storage/perfschema/table_setup_consumers.h +++ b/storage/perfschema/table_setup_consumers.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_setup_instruments.cc b/storage/perfschema/table_setup_instruments.cc index 077c2a07b4f..86682b8a1d0 100644 --- a/storage/perfschema/table_setup_instruments.cc +++ b/storage/perfschema/table_setup_instruments.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -255,7 +255,7 @@ int table_setup_instruments::read_row_values(TABLE *table, { Field *f; - DBUG_ASSERT(table->s->null_bytes == 0); + assert(table->s->null_bytes == 0); /* The row always exist, the instrument classes @@ -278,7 +278,7 @@ int table_setup_instruments::read_row_values(TABLE *table, set_field_enum(f, m_row.m_instr_class->m_timed ? ENUM_YES : ENUM_NO); break; default: - DBUG_ASSERT(false); + assert(false); } } } @@ -319,7 +319,7 @@ int table_setup_instruments::update_row_values(TABLE *table, } break; default: - DBUG_ASSERT(false); + assert(false); } } } @@ -363,7 +363,7 @@ int table_setup_instruments::update_row_values(TABLE *table, update_metadata_derived_flags(); break; default: - DBUG_ASSERT(false); + assert(false); break; } diff --git a/storage/perfschema/table_setup_instruments.h b/storage/perfschema/table_setup_instruments.h index 42aa2dd91d0..59378824236 100644 --- a/storage/perfschema/table_setup_instruments.h +++ b/storage/perfschema/table_setup_instruments.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_setup_objects.cc b/storage/perfschema/table_setup_objects.cc index 41551617a99..b71d3b7afa9 100644 --- a/storage/perfschema/table_setup_objects.cc +++ b/storage/perfschema/table_setup_objects.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -113,7 +113,7 @@ int table_setup_objects::write_row(TABLE *table, const unsigned char *buf, timed_value= (enum_yes_no) get_field_enum(f); break; default: - DBUG_ASSERT(false); + assert(false); } } } @@ -230,7 +230,7 @@ int table_setup_objects::read_row_values(TABLE *table, return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 1); + assert(table->s->null_bytes == 1); buf[0]= 0; for (; (f= *fields) ; fields++) @@ -263,7 +263,7 @@ int table_setup_objects::read_row_values(TABLE *table, set_field_enum(f, (*m_row.m_timed_ptr) ? ENUM_YES : ENUM_NO); break; default: - DBUG_ASSERT(false); + assert(false); } } } @@ -305,7 +305,7 @@ int table_setup_objects::update_row_values(TABLE *table, *m_row.m_timed_ptr= (value == ENUM_YES) ? true : false; break; default: - DBUG_ASSERT(false); + assert(false); } } } @@ -318,7 +318,7 @@ int table_setup_objects::delete_row_values(TABLE *table, const unsigned char *buf, Field **fields) { - DBUG_ASSERT(m_row_exists); + assert(m_row_exists); CHARSET_INFO *cs= &my_charset_utf8mb3_bin; enum_object_type object_type= OBJECT_TYPE_TABLE; diff --git a/storage/perfschema/table_setup_objects.h b/storage/perfschema/table_setup_objects.h index abe36f73818..feca8fc2f74 100644 --- a/storage/perfschema/table_setup_objects.h +++ b/storage/perfschema/table_setup_objects.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_setup_timers.cc b/storage/perfschema/table_setup_timers.cc index fe8931a443e..b8b70981a36 100644 --- a/storage/perfschema/table_setup_timers.cc +++ b/storage/perfschema/table_setup_timers.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -131,7 +131,7 @@ int table_setup_timers::rnd_next(void) int table_setup_timers::rnd_pos(const void *pos) { set_position(pos); - DBUG_ASSERT(m_pos.m_index < COUNT_SETUP_TIMERS); + assert(m_pos.m_index < COUNT_SETUP_TIMERS); m_row= &all_setup_timers_data[m_pos.m_index]; return 0; } @@ -143,10 +143,10 @@ int table_setup_timers::read_row_values(TABLE *table, { Field *f; - DBUG_ASSERT(m_row); + assert(m_row); /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 0); + assert(table->s->null_bytes == 0); for (; (f= *fields) ; fields++) { @@ -161,7 +161,7 @@ int table_setup_timers::read_row_values(TABLE *table, set_field_enum(f, *(m_row->m_timer_name_ptr)); break; default: - DBUG_ASSERT(false); + assert(false); } } } @@ -177,7 +177,7 @@ int table_setup_timers::update_row_values(TABLE *table, Field *f; longlong value; - DBUG_ASSERT(m_row); + assert(m_row); for (; (f= *fields) ; fields++) { @@ -195,7 +195,7 @@ int table_setup_timers::update_row_values(TABLE *table, return HA_ERR_WRONG_COMMAND; break; default: - DBUG_ASSERT(false); + assert(false); } } } diff --git a/storage/perfschema/table_setup_timers.h b/storage/perfschema/table_setup_timers.h index 43100bf3dd0..9237fa2a059 100644 --- a/storage/perfschema/table_setup_timers.h +++ b/storage/perfschema/table_setup_timers.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_socket_instances.cc b/storage/perfschema/table_socket_instances.cc index b976f981848..ee1818b900b 100644 --- a/storage/perfschema/table_socket_instances.cc +++ b/storage/perfschema/table_socket_instances.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -164,7 +164,7 @@ int table_socket_instances::read_row_values(TABLE *table, return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 1); + assert(table->s->null_bytes == 1); buf[0]= 0; for (; (f= *fields) ; fields++) @@ -198,7 +198,7 @@ int table_socket_instances::read_row_values(TABLE *table, set_field_enum(f, m_row.m_state); break; default: - DBUG_ASSERT(false); + assert(false); } } } diff --git a/storage/perfschema/table_socket_instances.h b/storage/perfschema/table_socket_instances.h index 4e32bbdcd00..30f18086c3a 100644 --- a/storage/perfschema/table_socket_instances.h +++ b/storage/perfschema/table_socket_instances.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_socket_summary_by_event_name.cc b/storage/perfschema/table_socket_summary_by_event_name.cc index f5214a4ea25..6efab95d5b1 100644 --- a/storage/perfschema/table_socket_summary_by_event_name.cc +++ b/storage/perfschema/table_socket_summary_by_event_name.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -162,7 +162,7 @@ int table_socket_summary_by_event_name::read_row_values(TABLE *table, return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 0); + assert(table->s->null_bytes == 0); for (; (f= *fields) ; fields++) { @@ -244,7 +244,7 @@ int table_socket_summary_by_event_name::read_row_values(TABLE *table, break; default: - DBUG_ASSERT(false); + assert(false); break; } } // if diff --git a/storage/perfschema/table_socket_summary_by_event_name.h b/storage/perfschema/table_socket_summary_by_event_name.h index e25d38b9bfa..39361b54bb5 100644 --- a/storage/perfschema/table_socket_summary_by_event_name.h +++ b/storage/perfschema/table_socket_summary_by_event_name.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_socket_summary_by_instance.cc b/storage/perfschema/table_socket_summary_by_instance.cc index bbd57e73be7..4bb7a2af773 100644 --- a/storage/perfschema/table_socket_summary_by_instance.cc +++ b/storage/perfschema/table_socket_summary_by_instance.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -176,7 +176,7 @@ int table_socket_summary_by_instance::read_row_values(TABLE *table, return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 0); + assert(table->s->null_bytes == 0); for (; (f= *fields) ; fields++) { @@ -261,7 +261,7 @@ int table_socket_summary_by_instance::read_row_values(TABLE *table, set_field_ulonglong(f, m_row.m_io_stat.m_misc.m_waits.m_max); break; default: - DBUG_ASSERT(false); + assert(false); break; } } diff --git a/storage/perfschema/table_socket_summary_by_instance.h b/storage/perfschema/table_socket_summary_by_instance.h index 3f6d1295728..39a02c939b5 100644 --- a/storage/perfschema/table_socket_summary_by_instance.h +++ b/storage/perfschema/table_socket_summary_by_instance.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_status_by_account.cc b/storage/perfschema/table_status_by_account.cc index 6868fab1186..347012bc064 100644 --- a/storage/perfschema/table_status_by_account.cc +++ b/storage/perfschema/table_status_by_account.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2015, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -164,7 +164,7 @@ table_status_by_account::rnd_pos(const void *pos) return HA_ERR_END_OF_FILE; set_position(pos); - DBUG_ASSERT(m_pos.m_index_1 < global_account_container.get_row_count()); + assert(m_pos.m_index_1 < global_account_container.get_row_count()); PFS_account *pfs_account= global_account_container.get(m_pos.m_index_1); @@ -216,7 +216,7 @@ int table_status_by_account return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 1); + assert(table->s->null_bytes == 1); buf[0]= 0; for (; (f= *fields) ; fields++) @@ -236,7 +236,7 @@ int table_status_by_account m_row.m_variable_value.set_field(f); break; default: - DBUG_ASSERT(false); + assert(false); } } } diff --git a/storage/perfschema/table_status_by_account.h b/storage/perfschema/table_status_by_account.h index 401a184d8f1..19a4f1db1de 100644 --- a/storage/perfschema/table_status_by_account.h +++ b/storage/perfschema/table_status_by_account.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2015, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_status_by_host.cc b/storage/perfschema/table_status_by_host.cc index 756414ff06a..6b280011565 100644 --- a/storage/perfschema/table_status_by_host.cc +++ b/storage/perfschema/table_status_by_host.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2015, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -164,7 +164,7 @@ table_status_by_host::rnd_pos(const void *pos) return HA_ERR_END_OF_FILE; set_position(pos); - DBUG_ASSERT(m_pos.m_index_1 < global_host_container.get_row_count()); + assert(m_pos.m_index_1 < global_host_container.get_row_count()); PFS_host *pfs_host= global_host_container.get(m_pos.m_index_1); @@ -216,7 +216,7 @@ int table_status_by_host return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 1); + assert(table->s->null_bytes == 1); buf[0]= 0; for (; (f= *fields) ; fields++) @@ -235,7 +235,7 @@ int table_status_by_host m_row.m_variable_value.set_field(f); break; default: - DBUG_ASSERT(false); + assert(false); } } } diff --git a/storage/perfschema/table_status_by_host.h b/storage/perfschema/table_status_by_host.h index e4c6bf256ef..f1c92268b02 100644 --- a/storage/perfschema/table_status_by_host.h +++ b/storage/perfschema/table_status_by_host.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2015, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_status_by_thread.cc b/storage/perfschema/table_status_by_thread.cc index 4c09dfc2b70..984a15b26eb 100644 --- a/storage/perfschema/table_status_by_thread.cc +++ b/storage/perfschema/table_status_by_thread.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2015, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -157,7 +157,7 @@ table_status_by_thread::rnd_pos(const void *pos) return HA_ERR_RECORD_DELETED; set_position(pos); - DBUG_ASSERT(m_pos.m_index_1 < global_thread_container.get_row_count()); + assert(m_pos.m_index_1 < global_thread_container.get_row_count()); PFS_thread *pfs_thread= global_thread_container.get(m_pos.m_index_1); /* @@ -210,7 +210,7 @@ int table_status_by_thread return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 1); + assert(table->s->null_bytes == 1); buf[0]= 0; for (; (f= *fields) ; fields++) @@ -229,7 +229,7 @@ int table_status_by_thread m_row.m_variable_value.set_field(f); break; default: - DBUG_ASSERT(false); + assert(false); } } } diff --git a/storage/perfschema/table_status_by_thread.h b/storage/perfschema/table_status_by_thread.h index f8de21dc41e..90a1735d1e2 100644 --- a/storage/perfschema/table_status_by_thread.h +++ b/storage/perfschema/table_status_by_thread.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2015, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_status_by_user.cc b/storage/perfschema/table_status_by_user.cc index fb9324bebe7..84f81402e1c 100644 --- a/storage/perfschema/table_status_by_user.cc +++ b/storage/perfschema/table_status_by_user.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2015, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -165,7 +165,7 @@ table_status_by_user::rnd_pos(const void *pos) return HA_ERR_END_OF_FILE; set_position(pos); - DBUG_ASSERT(m_pos.m_index_1 < global_user_container.get_row_count()); + assert(m_pos.m_index_1 < global_user_container.get_row_count()); PFS_user *pfs_user= global_user_container.get(m_pos.m_index_1); @@ -217,7 +217,7 @@ int table_status_by_user return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 1); + assert(table->s->null_bytes == 1); buf[0]= 0; for (; (f= *fields) ; fields++) @@ -236,7 +236,7 @@ int table_status_by_user m_row.m_variable_value.set_field(f); break; default: - DBUG_ASSERT(false); + assert(false); } } } diff --git a/storage/perfschema/table_status_by_user.h b/storage/perfschema/table_status_by_user.h index 6b4a67b4e3f..2fe2cc24407 100644 --- a/storage/perfschema/table_status_by_user.h +++ b/storage/perfschema/table_status_by_user.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2015, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_sync_instances.cc b/storage/perfschema/table_sync_instances.cc index 6187923df3e..a85dea21ba2 100644 --- a/storage/perfschema/table_sync_instances.cc +++ b/storage/perfschema/table_sync_instances.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -154,7 +154,7 @@ int table_mutex_instances::read_row_values(TABLE *table, return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 1); + assert(table->s->null_bytes == 1); buf[0]= 0; for (; (f= *fields) ; fields++) @@ -176,7 +176,7 @@ int table_mutex_instances::read_row_values(TABLE *table, f->set_null(); break; default: - DBUG_ASSERT(false); + assert(false); } } } @@ -307,7 +307,7 @@ int table_rwlock_instances::read_row_values(TABLE *table, return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 1); + assert(table->s->null_bytes == 1); buf[0]= 0; for (; (f= *fields) ; fields++) @@ -332,7 +332,7 @@ int table_rwlock_instances::read_row_values(TABLE *table, set_field_ulong(f, m_row.m_readers); break; default: - DBUG_ASSERT(false); + assert(false); } } } @@ -447,7 +447,7 @@ int table_cond_instances::read_row_values(TABLE *table, return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 0); + assert(table->s->null_bytes == 0); for (; (f= *fields) ; fields++) { @@ -462,7 +462,7 @@ int table_cond_instances::read_row_values(TABLE *table, set_field_ulonglong(f, (intptr) m_row.m_identity); break; default: - DBUG_ASSERT(false); + assert(false); } } } diff --git a/storage/perfschema/table_sync_instances.h b/storage/perfschema/table_sync_instances.h index 6cf8f0f3669..f1f56248a12 100644 --- a/storage/perfschema/table_sync_instances.h +++ b/storage/perfschema/table_sync_instances.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_table_handles.cc b/storage/perfschema/table_table_handles.cc index 03431bbf1ad..91ab7f889e4 100644 --- a/storage/perfschema/table_table_handles.cc +++ b/storage/perfschema/table_table_handles.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2012, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -174,7 +174,7 @@ int table_table_handles::read_row_values(TABLE *table, return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 1); + assert(table->s->null_bytes == 1); buf[0]= 0; for (; (f= *fields) ; fields++) @@ -204,7 +204,7 @@ int table_table_handles::read_row_values(TABLE *table, set_field_lock_type(f, m_row.m_external_lock); break; default: - DBUG_ASSERT(false); + assert(false); } } } diff --git a/storage/perfschema/table_table_handles.h b/storage/perfschema/table_table_handles.h index 0f1f76f4846..3b738d89413 100644 --- a/storage/perfschema/table_table_handles.h +++ b/storage/perfschema/table_table_handles.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2012, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_threads.cc b/storage/perfschema/table_threads.cc index fcf0a7ad80e..5528056c022 100644 --- a/storage/perfschema/table_threads.cc +++ b/storage/perfschema/table_threads.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -193,7 +193,7 @@ int table_threads::read_row_values(TABLE *table, return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 2); + assert(table->s->null_bytes == 2); buf[0]= 0; buf[1]= 0; @@ -266,7 +266,7 @@ int table_threads::read_row_values(TABLE *table, server is updating this column for those threads. To prevent this kind of issue, an assert is added. */ - DBUG_ASSERT(m_row.m_processlist_state_length <= f->char_length()); + assert(m_row.m_processlist_state_length <= f->char_length()); if (m_row.m_processlist_state_length > 0) set_field_varchar_utf8(f, m_row.m_processlist_state_ptr, m_row.m_processlist_state_length); @@ -309,7 +309,7 @@ int table_threads::read_row_values(TABLE *table, f->set_null(); break; default: - DBUG_ASSERT(false); + assert(false); } } } @@ -356,7 +356,7 @@ int table_threads::update_row_values(TABLE *table, case 16: /* THREAD_OS_ID */ return HA_ERR_WRONG_COMMAND; default: - DBUG_ASSERT(false); + assert(false); } } } diff --git a/storage/perfschema/table_threads.h b/storage/perfschema/table_threads.h index 88302ea61de..a7ce83dad72 100644 --- a/storage/perfschema/table_threads.h +++ b/storage/perfschema/table_threads.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_tiws_by_index_usage.cc b/storage/perfschema/table_tiws_by_index_usage.cc index 8f11c35be56..7375c62ae38 100644 --- a/storage/perfschema/table_tiws_by_index_usage.cc +++ b/storage/perfschema/table_tiws_by_index_usage.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -199,7 +199,7 @@ void table_tiws_by_index_usage::make_row(PFS_table_share *pfs_share, PFS_table_share_index *pfs_index; pfs_optimistic_state lock; - DBUG_ASSERT(index <= MAX_INDEXES); + assert(index <= MAX_INDEXES); m_row_exists= false; @@ -240,7 +240,7 @@ int table_tiws_by_index_usage::read_row_values(TABLE *table, return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 1); + assert(table->s->null_bytes == 1); buf[0]= 0; for (; (f= *fields) ; fields++) @@ -361,7 +361,7 @@ int table_tiws_by_index_usage::read_row_values(TABLE *table, set_field_ulonglong(f, m_row.m_stat.m_delete.m_max); break; default: - DBUG_ASSERT(false); + assert(false); } } } diff --git a/storage/perfschema/table_tiws_by_index_usage.h b/storage/perfschema/table_tiws_by_index_usage.h index cc6ee5ebfe7..990f2dede66 100644 --- a/storage/perfschema/table_tiws_by_index_usage.h +++ b/storage/perfschema/table_tiws_by_index_usage.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_tiws_by_table.cc b/storage/perfschema/table_tiws_by_table.cc index e6cf8e53b64..cbd754b3342 100644 --- a/storage/perfschema/table_tiws_by_table.cc +++ b/storage/perfschema/table_tiws_by_table.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -203,7 +203,7 @@ int table_tiws_by_table::read_row_values(TABLE *table, return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 1); + assert(table->s->null_bytes == 1); buf[0]= 0; for (; (f= *fields) ; fields++) @@ -323,7 +323,7 @@ int table_tiws_by_table::read_row_values(TABLE *table, set_field_ulonglong(f, m_row.m_stat.m_delete.m_max); break; default: - DBUG_ASSERT(false); + assert(false); } } } diff --git a/storage/perfschema/table_tiws_by_table.h b/storage/perfschema/table_tiws_by_table.h index 4100a99156b..693e07f0e65 100644 --- a/storage/perfschema/table_tiws_by_table.h +++ b/storage/perfschema/table_tiws_by_table.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_tlws_by_table.cc b/storage/perfschema/table_tlws_by_table.cc index ea24d11187e..ebb01567adf 100644 --- a/storage/perfschema/table_tlws_by_table.cc +++ b/storage/perfschema/table_tlws_by_table.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -238,7 +238,7 @@ int table_tlws_by_table::read_row_values(TABLE *table, return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 1); + assert(table->s->null_bytes == 1); buf[0]= 0; for (; (f= *fields) ; fields++) @@ -475,7 +475,7 @@ int table_tlws_by_table::read_row_values(TABLE *table, break; default: - DBUG_ASSERT(false); + assert(false); } } } diff --git a/storage/perfschema/table_tlws_by_table.h b/storage/perfschema/table_tlws_by_table.h index 7cc4b666908..5bcf89d3a24 100644 --- a/storage/perfschema/table_tlws_by_table.h +++ b/storage/perfschema/table_tlws_by_table.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_users.cc b/storage/perfschema/table_users.cc index 007b20c15e2..d56c90c0270 100644 --- a/storage/perfschema/table_users.cc +++ b/storage/perfschema/table_users.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2011, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -123,7 +123,7 @@ int table_users::read_row_values(TABLE *table, return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 1); + assert(table->s->null_bytes == 1); buf[0]= 0; for (; (f= *fields) ; fields++) @@ -140,7 +140,7 @@ int table_users::read_row_values(TABLE *table, m_row.m_connection_stat.set_field(f->field_index - 1, f); break; default: - DBUG_ASSERT(false); + assert(false); } } } diff --git a/storage/perfschema/table_users.h b/storage/perfschema/table_users.h index 1c3cc647a9d..c2476c71707 100644 --- a/storage/perfschema/table_users.h +++ b/storage/perfschema/table_users.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2011, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/table_uvar_by_thread.cc b/storage/perfschema/table_uvar_by_thread.cc index 36f142da7ad..b80ae2beefe 100644 --- a/storage/perfschema/table_uvar_by_thread.cc +++ b/storage/perfschema/table_uvar_by_thread.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2013, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -286,11 +286,11 @@ int table_uvar_by_thread return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 1); + assert(table->s->null_bytes == 1); buf[0]= 0; - DBUG_ASSERT(m_row.m_variable_name != NULL); - DBUG_ASSERT(m_row.m_variable_value != NULL); + assert(m_row.m_variable_name != NULL); + assert(m_row.m_variable_value != NULL); for (; (f= *fields) ; fields++) { @@ -319,7 +319,7 @@ int table_uvar_by_thread } break; default: - DBUG_ASSERT(false); + assert(false); } } } diff --git a/storage/perfschema/table_uvar_by_thread.h b/storage/perfschema/table_uvar_by_thread.h index a7334b2bdfe..cd20897743d 100644 --- a/storage/perfschema/table_uvar_by_thread.h +++ b/storage/perfschema/table_uvar_by_thread.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2013, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -79,7 +79,7 @@ public: bool is_materialized(PFS_thread *pfs) { - DBUG_ASSERT(pfs != NULL); + assert(pfs != NULL); if (m_pfs != pfs) return false; if (m_thread_internal_id != pfs->m_thread_internal_id) diff --git a/storage/perfschema/table_variables_by_thread.cc b/storage/perfschema/table_variables_by_thread.cc index b43c6cd88ef..bdf1aaf5227 100644 --- a/storage/perfschema/table_variables_by_thread.cc +++ b/storage/perfschema/table_variables_by_thread.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2015, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -142,7 +142,7 @@ table_variables_by_thread::rnd_pos(const void *pos) return HA_ERR_RECORD_DELETED; set_position(pos); - DBUG_ASSERT(m_pos.m_index_1 < global_thread_container.get_row_count()); + assert(m_pos.m_index_1 < global_thread_container.get_row_count()); PFS_thread *pfs_thread= global_thread_container.get(m_pos.m_index_1); /* @@ -200,7 +200,7 @@ int table_variables_by_thread return HA_ERR_RECORD_DELETED; /* Set the null bits */ - DBUG_ASSERT(table->s->null_bytes == 1); + assert(table->s->null_bytes == 1); buf[0]= 0; for (; (f= *fields) ; fields++) @@ -219,7 +219,7 @@ int table_variables_by_thread m_row.m_variable_value.set_field(f); break; default: - DBUG_ASSERT(false); + assert(false); } } } diff --git a/storage/perfschema/table_variables_by_thread.h b/storage/perfschema/table_variables_by_thread.h index d628707f9b4..5143067adbb 100644 --- a/storage/perfschema/table_variables_by_thread.h +++ b/storage/perfschema/table_variables_by_thread.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2015, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/unittest/CMakeLists.txt b/storage/perfschema/unittest/CMakeLists.txt index 1bba2673a1a..712f22242c3 100644 --- a/storage/perfschema/unittest/CMakeLists.txt +++ b/storage/perfschema/unittest/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2009, 2019, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2021, Oracle and/or its affiliates. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/unittest/conf.txt b/storage/perfschema/unittest/conf.txt index f84ba3317b1..db9cf980c33 100644 --- a/storage/perfschema/unittest/conf.txt +++ b/storage/perfschema/unittest/conf.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2009, 2010, Oracle and/or its affiliates. +# Copyright (c) 2009, 2021, Oracle and/or its affiliates. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/unittest/pfs-t.cc b/storage/perfschema/unittest/pfs-t.cc index 43d9d8d233d..2240c2917e8 100644 --- a/storage/perfschema/unittest/pfs-t.cc +++ b/storage/perfschema/unittest/pfs-t.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/unittest/pfs_account-oom-t.cc b/storage/perfschema/unittest/pfs_account-oom-t.cc index 185b0a6594c..ea39903484c 100644 --- a/storage/perfschema/unittest/pfs_account-oom-t.cc +++ b/storage/perfschema/unittest/pfs_account-oom-t.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2011, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/unittest/pfs_connect_attr-t.cc b/storage/perfschema/unittest/pfs_connect_attr-t.cc index b57ead3ec26..e414a17a1ef 100644 --- a/storage/perfschema/unittest/pfs_connect_attr-t.cc +++ b/storage/perfschema/unittest/pfs_connect_attr-t.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/unittest/pfs_host-oom-t.cc b/storage/perfschema/unittest/pfs_host-oom-t.cc index e97a1170eb2..0dc77f9e307 100644 --- a/storage/perfschema/unittest/pfs_host-oom-t.cc +++ b/storage/perfschema/unittest/pfs_host-oom-t.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2011, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/unittest/pfs_instr-oom-t.cc b/storage/perfschema/unittest/pfs_instr-oom-t.cc index 9472d8aa001..5f0d97e6be4 100644 --- a/storage/perfschema/unittest/pfs_instr-oom-t.cc +++ b/storage/perfschema/unittest/pfs_instr-oom-t.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/unittest/pfs_instr-t.cc b/storage/perfschema/unittest/pfs_instr-t.cc index d4401ab7ea2..95971214c83 100644 --- a/storage/perfschema/unittest/pfs_instr-t.cc +++ b/storage/perfschema/unittest/pfs_instr-t.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/unittest/pfs_instr_class-oom-t.cc b/storage/perfschema/unittest/pfs_instr_class-oom-t.cc index 0f9d6ef07d5..da80a658f99 100644 --- a/storage/perfschema/unittest/pfs_instr_class-oom-t.cc +++ b/storage/perfschema/unittest/pfs_instr_class-oom-t.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/unittest/pfs_instr_class-t.cc b/storage/perfschema/unittest/pfs_instr_class-t.cc index 3dfd725cb91..09a38706b86 100644 --- a/storage/perfschema/unittest/pfs_instr_class-t.cc +++ b/storage/perfschema/unittest/pfs_instr_class-t.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/unittest/pfs_misc-t.cc b/storage/perfschema/unittest/pfs_misc-t.cc index d82178000c2..e2522a053e1 100644 --- a/storage/perfschema/unittest/pfs_misc-t.cc +++ b/storage/perfschema/unittest/pfs_misc-t.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2015, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/unittest/pfs_noop-t.cc b/storage/perfschema/unittest/pfs_noop-t.cc index 2756680dc22..e577a7cc509 100644 --- a/storage/perfschema/unittest/pfs_noop-t.cc +++ b/storage/perfschema/unittest/pfs_noop-t.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2013, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/unittest/pfs_server_stubs.cc b/storage/perfschema/unittest/pfs_server_stubs.cc index ca7b2300797..9fc3b2fb143 100644 --- a/storage/perfschema/unittest/pfs_server_stubs.cc +++ b/storage/perfschema/unittest/pfs_server_stubs.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify diff --git a/storage/perfschema/unittest/pfs_timer-t.cc b/storage/perfschema/unittest/pfs_timer-t.cc index 6c852242537..22fdb163aed 100644 --- a/storage/perfschema/unittest/pfs_timer-t.cc +++ b/storage/perfschema/unittest/pfs_timer-t.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/unittest/pfs_user-oom-t.cc b/storage/perfschema/unittest/pfs_user-oom-t.cc index 864275b765e..4cc23a018d2 100644 --- a/storage/perfschema/unittest/pfs_user-oom-t.cc +++ b/storage/perfschema/unittest/pfs_user-oom-t.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2011, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/unittest/stub_global_status_var.h b/storage/perfschema/unittest/stub_global_status_var.h index c870b863331..c2785d2eac1 100644 --- a/storage/perfschema/unittest/stub_global_status_var.h +++ b/storage/perfschema/unittest/stub_global_status_var.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2015, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/unittest/stub_pfs_defaults.h b/storage/perfschema/unittest/stub_pfs_defaults.h index 951508733e2..338fd9f8324 100644 --- a/storage/perfschema/unittest/stub_pfs_defaults.h +++ b/storage/perfschema/unittest/stub_pfs_defaults.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/storage/perfschema/unittest/stub_pfs_global.h b/storage/perfschema/unittest/stub_pfs_global.h index 23b731cb8b2..4371523b014 100644 --- a/storage/perfschema/unittest/stub_pfs_global.h +++ b/storage/perfschema/unittest/stub_pfs_global.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -37,7 +37,7 @@ void *pfs_malloc(PFS_builtin_memory_class *klass, size_t size, myf) /* Catch non initialized sizing parameter in the unit tests. */ - DBUG_ASSERT(size <= 100*1024*1024); + assert(size <= 100*1024*1024); if (stub_alloc_always_fails) return NULL; diff --git a/storage/perfschema/unittest/stub_print_error.h b/storage/perfschema/unittest/stub_print_error.h index 8d87fbe5923..ac1ecf1f637 100644 --- a/storage/perfschema/unittest/stub_print_error.h +++ b/storage/perfschema/unittest/stub_print_error.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, |