diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2022-08-08 17:12:32 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2022-08-08 17:12:32 +0200 |
commit | 1d480419822b53c840de54542c1d1a0851dbe2c8 (patch) | |
tree | 629aabba2d52741b4075c3e345396bd989516cb2 /include/mysql | |
parent | 3ebbfd88a0360938e3a5a480265beb2a71b1268a (diff) | |
parent | 4f54c219e7c73072d7eff1e81e0f51dc1ff47509 (diff) | |
download | mariadb-git-1d480419822b53c840de54542c1d1a0851dbe2c8.tar.gz |
Merge branch '10.6' into 10.7
Diffstat (limited to 'include/mysql')
-rw-r--r-- | include/mysql/psi/mysql_file.h | 2 | ||||
-rw-r--r-- | include/mysql/psi/mysql_idle.h | 2 | ||||
-rw-r--r-- | include/mysql/psi/mysql_mdl.h | 2 | ||||
-rw-r--r-- | include/mysql/psi/mysql_memory.h | 2 | ||||
-rw-r--r-- | include/mysql/psi/mysql_ps.h | 2 | ||||
-rw-r--r-- | include/mysql/psi/mysql_socket.h | 2 | ||||
-rw-r--r-- | include/mysql/psi/mysql_sp.h | 2 | ||||
-rw-r--r-- | include/mysql/psi/mysql_stage.h | 2 | ||||
-rw-r--r-- | include/mysql/psi/mysql_statement.h | 2 | ||||
-rw-r--r-- | include/mysql/psi/mysql_thread.h | 9 | ||||
-rw-r--r-- | include/mysql/psi/mysql_transaction.h | 2 | ||||
-rw-r--r-- | include/mysql/psi/psi.h | 13 | ||||
-rw-r--r-- | include/mysql/psi/psi_abi_v0.h | 2 | ||||
-rw-r--r-- | include/mysql/psi/psi_abi_v1.h | 2 | ||||
-rw-r--r-- | include/mysql/psi/psi_abi_v1.h.pp | 3 | ||||
-rw-r--r-- | include/mysql/psi/psi_abi_v2.h | 2 | ||||
-rw-r--r-- | include/mysql/psi/psi_base.h | 8 | ||||
-rw-r--r-- | include/mysql/psi/psi_memory.h | 2 |
18 files changed, 44 insertions, 17 deletions
diff --git a/include/mysql/psi/mysql_file.h b/include/mysql/psi/mysql_file.h index 795a40e38b7..9b172cfe9b0 100644 --- a/include/mysql/psi/mysql_file.h +++ b/include/mysql/psi/mysql_file.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. +/* Copyright (c) 2008, 2022, 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/include/mysql/psi/mysql_idle.h b/include/mysql/psi/mysql_idle.h index 95886bd4e13..1c9927f95b2 100644 --- a/include/mysql/psi/mysql_idle.h +++ b/include/mysql/psi/mysql_idle.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, 2021, Oracle and/or its affiliates +/* Copyright (c) 2011, 2022, 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/include/mysql/psi/mysql_mdl.h b/include/mysql/psi/mysql_mdl.h index 3b3aba0a81f..483f28f396b 100644 --- a/include/mysql/psi/mysql_mdl.h +++ b/include/mysql/psi/mysql_mdl.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2012, 2021, Oracle and/or its affiliates. +/* Copyright (c) 2012, 2022, 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/include/mysql/psi/mysql_memory.h b/include/mysql/psi/mysql_memory.h index b461f2fb206..06027a655f7 100644 --- a/include/mysql/psi/mysql_memory.h +++ b/include/mysql/psi/mysql_memory.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2012, 2021, Oracle and/or its affiliates. +/* Copyright (c) 2012, 2022, 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/include/mysql/psi/mysql_ps.h b/include/mysql/psi/mysql_ps.h index 42f518b77c4..670555fc55f 100644 --- a/include/mysql/psi/mysql_ps.h +++ b/include/mysql/psi/mysql_ps.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2014, 2021, Oracle and/or its affiliates. +/* Copyright (c) 2014, 2022, 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/include/mysql/psi/mysql_socket.h b/include/mysql/psi/mysql_socket.h index 4f1b48aa9a4..c78154b73db 100644 --- a/include/mysql/psi/mysql_socket.h +++ b/include/mysql/psi/mysql_socket.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. +/* Copyright (c) 2010, 2022, Oracle and/or its affiliates. Copyright (c) 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify diff --git a/include/mysql/psi/mysql_sp.h b/include/mysql/psi/mysql_sp.h index 68b79f1b852..1fec59cec91 100644 --- a/include/mysql/psi/mysql_sp.h +++ b/include/mysql/psi/mysql_sp.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013, 2021, Oracle and/or its affiliates. +/* Copyright (c) 2013, 2022, 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/include/mysql/psi/mysql_stage.h b/include/mysql/psi/mysql_stage.h index f16b0ce207e..cb579ea4e8c 100644 --- a/include/mysql/psi/mysql_stage.h +++ b/include/mysql/psi/mysql_stage.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. +/* Copyright (c) 2010, 2022, 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/include/mysql/psi/mysql_statement.h b/include/mysql/psi/mysql_statement.h index 7a95e4057fd..78a4de73869 100644 --- a/include/mysql/psi/mysql_statement.h +++ b/include/mysql/psi/mysql_statement.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. +/* Copyright (c) 2010, 2022, 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/include/mysql/psi/mysql_thread.h b/include/mysql/psi/mysql_thread.h index a301adcad18..b6247af65f3 100644 --- a/include/mysql/psi/mysql_thread.h +++ b/include/mysql/psi/mysql_thread.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. +/* Copyright (c) 2008, 2022, Oracle and/or its affiliates. Copyright (c) 2020, 2021, MariaDB Corporation. This program is free software; you can redistribute it and/or modify @@ -1155,6 +1155,13 @@ static inline void inline_mysql_thread_set_psi_THD(THD *thd) } #endif /* __cplusplus */ +static inline void mysql_thread_set_peer_port(uint port __attribute__ ((unused))) { +#ifdef HAVE_PSI_THREAD_INTERFACE + struct PSI_thread *psi = PSI_THREAD_CALL(get_thread)(); + PSI_THREAD_CALL(set_thread_peer_port)(psi, port); +#endif +} + #endif #endif /* DISABLE_MYSQL_THREAD_H */ diff --git a/include/mysql/psi/mysql_transaction.h b/include/mysql/psi/mysql_transaction.h index 611bd1fa0f9..02f08bfab44 100644 --- a/include/mysql/psi/mysql_transaction.h +++ b/include/mysql/psi/mysql_transaction.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013, 2021, Oracle and/or its affiliates. +/* Copyright (c) 2013, 2022, 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/include/mysql/psi/psi.h b/include/mysql/psi/psi.h index b9beab77e2a..4c3e2c6a9c4 100644 --- a/include/mysql/psi/psi.h +++ b/include/mysql/psi/psi.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. +/* Copyright (c) 2008, 2022, 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, @@ -1692,6 +1692,15 @@ typedef void (*set_thread_info_v1_t)(const char* info, uint info_len); */ typedef void (*set_thread_v1_t)(struct PSI_thread *thread); +/** + Assign the remote (peer) port to the instrumented thread. + + @param thread pointer to the thread instrumentation + @param port the remote port +*/ +typedef void (*set_thread_peer_port_v1_t)(PSI_thread *thread, + unsigned int port); + /** Delete the current thread instrumentation. */ typedef void (*delete_current_thread_v1_t)(void); @@ -2737,6 +2746,8 @@ struct PSI_v1 start_metadata_wait_v1_t start_metadata_wait; end_metadata_wait_v1_t end_metadata_wait; + + set_thread_peer_port_v1_t set_thread_peer_port; }; /** @} (end of group Group_PSI_v1) */ diff --git a/include/mysql/psi/psi_abi_v0.h b/include/mysql/psi/psi_abi_v0.h index b94a7695ade..df47ae78eb4 100644 --- a/include/mysql/psi/psi_abi_v0.h +++ b/include/mysql/psi/psi_abi_v0.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, 2021, Oracle and/or its affiliates. +/* Copyright (c) 2011, 2022, 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/include/mysql/psi/psi_abi_v1.h b/include/mysql/psi/psi_abi_v1.h index bdf475147ab..61018bdf030 100644 --- a/include/mysql/psi/psi_abi_v1.h +++ b/include/mysql/psi/psi_abi_v1.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. +/* Copyright (c) 2008, 2022, 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/include/mysql/psi/psi_abi_v1.h.pp b/include/mysql/psi/psi_abi_v1.h.pp index ad2bf1d21dc..ca0d0206cb9 100644 --- a/include/mysql/psi/psi_abi_v1.h.pp +++ b/include/mysql/psi/psi_abi_v1.h.pp @@ -459,6 +459,8 @@ typedef void (*set_thread_start_time_v1_t)(time_t start_time); typedef void (*set_thread_state_v1_t)(const char* state); typedef void (*set_thread_info_v1_t)(const char* info, uint info_len); typedef void (*set_thread_v1_t)(struct PSI_thread *thread); +typedef void (*set_thread_peer_port_v1_t)(PSI_thread *thread, + unsigned int port); typedef void (*delete_current_thread_v1_t)(void); typedef void (*delete_thread_v1_t)(struct PSI_thread *thread); typedef struct PSI_file_locker* (*get_thread_file_name_locker_v1_t) @@ -829,6 +831,7 @@ struct PSI_v1 destroy_metadata_lock_v1_t destroy_metadata_lock; start_metadata_wait_v1_t start_metadata_wait; end_metadata_wait_v1_t end_metadata_wait; + set_thread_peer_port_v1_t set_thread_peer_port; }; typedef struct PSI_v1 PSI; typedef struct PSI_mutex_info_v1 PSI_mutex_info; diff --git a/include/mysql/psi/psi_abi_v2.h b/include/mysql/psi/psi_abi_v2.h index 63d99106055..31c9e8fc42f 100644 --- a/include/mysql/psi/psi_abi_v2.h +++ b/include/mysql/psi/psi_abi_v2.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. +/* Copyright (c) 2008, 2022, 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/include/mysql/psi/psi_base.h b/include/mysql/psi/psi_base.h index 2bb1d8fc354..c04f817b2c1 100644 --- a/include/mysql/psi/psi_base.h +++ b/include/mysql/psi/psi_base.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. +/* Copyright (c) 2008, 2022, 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, @@ -94,6 +94,12 @@ extern "C" { */ #define PSI_FLAG_VOLATILITY_SESSION (1 << 6) +/** + System thread flag. + Indicates that the instrumented object exists on a system thread. +*/ +#define PSI_FLAG_THREAD_SYSTEM (1 << 9) + #ifdef HAVE_PSI_INTERFACE /** diff --git a/include/mysql/psi/psi_memory.h b/include/mysql/psi/psi_memory.h index 60d68f1a6dd..21a86a36368 100644 --- a/include/mysql/psi/psi_memory.h +++ b/include/mysql/psi/psi_memory.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013, 2021, Oracle and/or its affiliates. +/* Copyright (c) 2013, 2022, 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, |