| 1 | /* Copyright (c) 2010, 2023, Oracle and/or its affiliates. |
| 2 | |
| 3 | This program is free software; you can redistribute it and/or modify |
| 4 | it under the terms of the GNU General Public License, version 2.0, |
| 5 | as published by the Free Software Foundation. |
| 6 | |
| 7 | This program is also distributed with certain software (including |
| 8 | but not limited to OpenSSL) that is licensed under separate terms, |
| 9 | as designated in a particular file or component or in included license |
| 10 | documentation. The authors of MySQL hereby grant you an additional |
| 11 | permission to link the program and your derivative works with the |
| 12 | separately licensed software that they have included with MySQL. |
| 13 | |
| 14 | This program is distributed in the hope that it will be useful, |
| 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 17 | GNU General Public License, version 2.0, for more details. |
| 18 | |
| 19 | You should have received a copy of the GNU General Public License |
| 20 | along with this program; if not, write to the Free Software |
| 21 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */ |
| 22 | |
| 23 | #ifndef TABLE_ESMS_BY_USER_BY_EVENT_NAME_H |
| 24 | #define TABLE_ESMS_BY_USER_BY_EVENT_NAME_Hcxx . . $ `storage/perfschema/table_esms_by_user_by_event_name.h:24:9`! |
| 25 | |
| 26 | /** |
| 27 | @file storage/perfschema/table_esms_by_user_by_event_name.h |
| 28 | Table EVENTS_STATEMENTS_SUMMARY_BY_USER_BY_EVENT_NAME (declarations). |
| 29 | */ |
| 30 | |
| 31 | #include "pfs_column_types.h"cxx . . $ `<file>/storage/perfschema/pfs_column_types.h`/ |
| 32 | #include "pfs_engine_table.h"cxx . . $ `<file>/storage/perfschema/pfs_engine_table.h`/ |
| 33 | #include "pfs_instr_class.h"cxx . . $ `<file>/storage/perfschema/pfs_instr_class.h`/ |
| 34 | #include "pfs_instr.h"cxx . . $ `<file>/storage/perfschema/pfs_instr.h`/ |
| 35 | #include "pfs_user.h"cxx . . $ `<file>/storage/perfschema/pfs_user.h`/ |
| 36 | #include "table_helper.h"cxx . . $ `<file>/storage/perfschema/table_helper.h`/ |
| 37 | |
| 38 | /** |
| 39 | @addtogroup Performance_schema_tables |
| 40 | @{ |
| 41 | */ |
| 42 | |
| 43 | /** |
| 44 | A row of table |
| 45 | PERFORMANCE_SCHEMA.EVENTS_STATEMENTS_SUMMARY_BY_USER_BY_EVENT_NAME. |
| 46 | */ |
| 47 | struct row_esms_by_user_by_event_namecxx . . $ row_esms_by_user_by_event_name# |
| 48 | { |
| 49 | /** Column USER. */ |
| 50 | PFS_user_rowcxx . . $ PFS_user_row# m_usercxx . . $ row_esms_by_user_by_event_name#m_user.; |
| 51 | /** Column EVENT_NAME. */ |
| 52 | PFS_event_name_rowcxx . . $ PFS_event_name_row# m_event_namecxx . . $ row_esms_by_user_by_event_name#m_event_name.; |
| 53 | /** Columns COUNT_STAR, SUM/MIN/AVG/MAX TIMER_WAIT. */ |
| 54 | PFS_statement_stat_rowcxx . . $ PFS_statement_stat_row# m_statcxx . . $ row_esms_by_user_by_event_name#m_stat.; |
| 55 | }; |
| 56 | |
| 57 | /** |
| 58 | Position of a cursor on |
| 59 | PERFORMANCE_SCHEMA.EVENTS_STATEMENTS_SUMMARY_BY_USER_BY_EVENT_NAME. |
| 60 | Index 1 on user (0 based) |
| 61 | Index 2 on statement class (1 based) |
| 62 | */ |
| 63 | struct pos_esms_by_user_by_event_namecxx . . $ pos_esms_by_user_by_event_name# |
| 64 | : public PFS_double_indexcxx . . $ PFS_double_index# |
| 65 | { |
| 66 | pos_esms_by_user_by_event_namecxx . . $ pos_esms_by_user_by_event_name#pos_esms_by_user_by_event_name(49f6e7a06ebc5aa8).() |
| 67 | : PFS_double_indexcxx . . $ PFS_double_index#(0, 1) |
| 68 | {} |
| 69 | |
| 70 | inline void resetcxx . . $ pos_esms_by_user_by_event_name#reset(49f6e7a06ebc5aa8).(void) |
| 71 | { |
| 72 | m_index_1cxx . . $ PFS_double_index#m_index_1.= 0; |
| 73 | m_index_2cxx . . $ PFS_double_index#m_index_2.= 1; |
| 74 | } |
| 75 | |
| 76 | inline void next_usercxx . . $ pos_esms_by_user_by_event_name#next_user(49f6e7a06ebc5aa8).(void) |
| 77 | { |
| 78 | m_index_1cxx . . $ PFS_double_index#m_index_1.++; |
| 79 | m_index_2cxx . . $ PFS_double_index#m_index_2.= 1; |
| 80 | } |
| 81 | }; |
| 82 | |
| 83 | /** Table PERFORMANCE_SCHEMA.EVENTS_STATEMENTS_SUMMARY_BY_USER_BY_EVENT_NAME. */ |
| 84 | class table_esms_by_user_by_event_namecxx . . $ table_esms_by_user_by_event_name# : public PFS_engine_tablecxx . . $ PFS_engine_table# |
| 85 | { |
| 86 | public: |
| 87 | static PFS_engine_table_share_statecxx . . $ PFS_engine_table_share_state# m_share_statecxx . . $ table_esms_by_user_by_event_name#m_share_state.; |
| 88 | /** Table share */ |
| 89 | static PFS_engine_table_sharecxx . . $ PFS_engine_table_share# m_sharecxx . . $ table_esms_by_user_by_event_name#m_share.; |
| 90 | static PFS_engine_tablecxx . . $ PFS_engine_table#* createcxx . . $ table_esms_by_user_by_event_name#create(314e88453c9d561a).(); |
| 91 | static int delete_all_rowscxx . . $ table_esms_by_user_by_event_name#delete_all_rows(b126dc7c1de90089).(); |
| 92 | static ha_rowscxx . . $ ha_rows# get_row_countcxx . . $ table_esms_by_user_by_event_name#get_row_count(73266883b0c7072b).(); |
| 93 | |
| 94 | int rnd_initcxx . . $ table_esms_by_user_by_event_name#rnd_init(73da94e76e6bd037).(bool scan) override; |
| 95 | int rnd_nextcxx . . $ table_esms_by_user_by_event_name#rnd_next(b126dc7c1de90089).() override; |
| 96 | int rnd_poscxx . . $ table_esms_by_user_by_event_name#rnd_pos(aa284d429d6986c8).(const void *pos) override; |
| 97 | void reset_positioncxx . . $ table_esms_by_user_by_event_name#reset_position(49f6e7a06ebc5aa8).(void) override; |
| 98 | |
| 99 | protected: |
| 100 | int read_row_valuescxx . . $ table_esms_by_user_by_event_name#read_row_values(139ec8e2a7764e1).(TABLEcxx . . $ TABLE# *table, |
| 101 | unsigned char *buf, |
| 102 | Fieldcxx . . $ Field# **fields, |
| 103 | bool read_all) override; |
| 104 | |
| 105 | table_esms_by_user_by_event_namecxx . . $ table_esms_by_user_by_event_name#table_esms_by_user_by_event_name(49f6e7a06ebc5aa8).(); |
| 106 | |
| 107 | public: |
| 108 | ~cxx . . $ table_esms_by_user_by_event_name#`~table_esms_by_user_by_event_name`(ced63f7c635d850d).table_esms_by_user_by_event_namecxx . . $ table_esms_by_user_by_event_name#() = default; |
| 109 | |
| 110 | protected: |
| 111 | void make_rowcxx . . $ table_esms_by_user_by_event_name#make_row(60b3bced2c76690d).(PFS_usercxx . . $ PFS_user# *user, PFS_statement_classcxx . . $ PFS_statement_class# *klass); |
| 112 | |
| 113 | private: |
| 114 | /** Table share lock. */ |
| 115 | static THR_LOCK m_table_lockcxx . . $ table_esms_by_user_by_event_name#m_table_lock.; |
| 116 | |
| 117 | /** Current row. */ |
| 118 | row_esms_by_user_by_event_namecxx . . $ row_esms_by_user_by_event_name# m_rowcxx . . $ table_esms_by_user_by_event_name#m_row.; |
| 119 | /** True is the current row exists. */ |
| 120 | bool m_row_existscxx . . $ table_esms_by_user_by_event_name#m_row_exists.; |
| 121 | /** Current position. */ |
| 122 | pos_esms_by_user_by_event_namecxx . . $ pos_esms_by_user_by_event_name# m_poscxx . . $ table_esms_by_user_by_event_name#m_pos.; |
| 123 | /** Next position. */ |
| 124 | pos_esms_by_user_by_event_namecxx . . $ pos_esms_by_user_by_event_name# m_next_poscxx . . $ table_esms_by_user_by_event_name#m_next_pos.; |
| 125 | }; |
| 126 | |
| 127 | /** @} */ |
| 128 | #endif |