Skip to content

Commit 7d2d010

Browse files
committed
Fixed broken doxygen markups.
Added doxygen documentation for the performance schema.
1 parent 1b8fd8b commit 7d2d010

13 files changed

+119
-7
lines changed

sql/handler.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ void ha_close_connection(THD* thd)
705705
end. Such nested transaction was internally referred to as
706706
a "statement transaction" and gave birth to the term.
707707
708-
<Historical note ends>
708+
(Historical note ends)
709709
710710
Since then a statement transaction is started for each statement
711711
that accesses transactional tables or uses the binary log. If

sql/rpl_info_handler.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,13 @@ class Rpl_info_handler
5555
/**
5656
Flushes and syncs in-memory information into a stable storage (i.e.
5757
repository). Usually, syncing after flushing depends on other options
58-
such as @code relay-log-info-sync, master-info-sync. These options
58+
such as @c relay-log-info-sync, @c master-info-sync. These options
5959
dictate after how many events or transactions the information
6060
should be synced. We can ignore them and always sync by setting the
61-
parameter @code force, which is by default false, to @code true.
61+
parameter @c force, which is by default @c false, to @c true.
6262
6363
So if the number of events is below a threshold, the parameter
64-
@code force is FALSE and we are using a file system as a storage
64+
@c force is FALSE and we are using a file system as a storage
6565
system, it may happen that the changes will only end up in the
6666
operating system's cache and a crash may lead to inconsistencies.
6767

sql/sql_select.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -9220,7 +9220,7 @@ inline void add_cond_and_fix(Item **e1, Item *e2)
92209220
@code
92219221
SELECT A.f2 FROM t1 LEFT JOIN t2 A ON A.f2 = f1
92229222
WHERE A.f3=(SELECT MIN(f3) FROM t2 C WHERE A.f4 = C.f4) OR A.f3 IS NULL;
9223-
@endocde
9223+
@endcode
92249224
Here condition A.f3 IS NOT NULL is going to be added to the WHERE
92259225
condition of the embedding query.
92269226
Another example:

storage/perfschema/pfs.cc

+68
Original file line numberDiff line numberDiff line change
@@ -899,19 +899,30 @@ static inline int mysql_mutex_lock(...)
899899
@ingroup Performance_schema_implementation
900900
*/
901901

902+
/** TIMED bit in the state flags bitfield. */
902903
#define STATE_FLAG_TIMED (1<<0)
904+
/** THREAD bit in the state flags bitfield. */
903905
#define STATE_FLAG_THREAD (1<<1)
906+
/** EVENT bit in the state flags bitfield. */
904907
#define STATE_FLAG_WAIT (1<<2)
905908

906909
pthread_key(PFS_thread*, THR_PFS);
907910
bool THR_PFS_initialized= false;
908911

912+
/**
913+
Conversion map from PSI_mutex_operation to enum_operation_type.
914+
Indexed by enum PSI_mutex_operation.
915+
*/
909916
static enum_operation_type mutex_operation_map[]=
910917
{
911918
OPERATION_TYPE_LOCK,
912919
OPERATION_TYPE_TRYLOCK
913920
};
914921

922+
/**
923+
Conversion map from PSI_rwlock_operation to enum_operation_type.
924+
Indexed by enum PSI_rwlock_operation.
925+
*/
915926
static enum_operation_type rwlock_operation_map[]=
916927
{
917928
OPERATION_TYPE_READLOCK,
@@ -920,6 +931,10 @@ static enum_operation_type rwlock_operation_map[]=
920931
OPERATION_TYPE_TRYWRITELOCK
921932
};
922933

934+
/**
935+
Conversion map from PSI_cond_operation to enum_operation_type.
936+
Indexed by enum PSI_cond_operation.
937+
*/
923938
static enum_operation_type cond_operation_map[]=
924939
{
925940
OPERATION_TYPE_WAIT,
@@ -1072,6 +1087,10 @@ static int build_prefix(const LEX_STRING *prefix, const char *category,
10721087

10731088
C_MODE_START
10741089

1090+
/**
1091+
Implementation of the mutex instrumentation interface.
1092+
@sa PSI_v1::register_mutex.
1093+
*/
10751094
static void register_mutex_v1(const char *category,
10761095
PSI_mutex_info_v1 *info,
10771096
int count)
@@ -1081,6 +1100,10 @@ static void register_mutex_v1(const char *category,
10811100
register_mutex_class)
10821101
}
10831102

1103+
/**
1104+
Implementation of the rwlock instrumentation interface.
1105+
@sa PSI_v1::register_rwlock.
1106+
*/
10841107
static void register_rwlock_v1(const char *category,
10851108
PSI_rwlock_info_v1 *info,
10861109
int count)
@@ -1090,6 +1113,10 @@ static void register_rwlock_v1(const char *category,
10901113
register_rwlock_class)
10911114
}
10921115

1116+
/**
1117+
Implementation of the cond instrumentation interface.
1118+
@sa PSI_v1::register_cond.
1119+
*/
10931120
static void register_cond_v1(const char *category,
10941121
PSI_cond_info_v1 *info,
10951122
int count)
@@ -1099,6 +1126,10 @@ static void register_cond_v1(const char *category,
10991126
register_cond_class)
11001127
}
11011128

1129+
/**
1130+
Implementation of the thread instrumentation interface.
1131+
@sa PSI_v1::register_thread.
1132+
*/
11021133
static void register_thread_v1(const char *category,
11031134
PSI_thread_info_v1 *info,
11041135
int count)
@@ -1108,6 +1139,10 @@ static void register_thread_v1(const char *category,
11081139
register_thread_class)
11091140
}
11101141

1142+
/**
1143+
Implementation of the file instrumentation interface.
1144+
@sa PSI_v1::register_file.
1145+
*/
11111146
static void register_file_v1(const char *category,
11121147
PSI_file_info_v1 *info,
11131148
int count)
@@ -1304,6 +1339,11 @@ static void create_file_v1(PSI_file_key key, const char *name, File file)
13041339
file_handle_array[index]= pfs_file;
13051340
}
13061341

1342+
/**
1343+
Arguments given from a parent to a child thread, packaged in one structure.
1344+
This data is used when spawning a new instrumented thread.
1345+
@sa pfs_spawn_thread.
1346+
*/
13071347
struct PFS_spawn_thread_arg
13081348
{
13091349
PFS_thread *m_parent_thread;
@@ -1619,12 +1659,20 @@ static void set_thread_info_v1(const char* info, int info_len)
16191659
}
16201660
}
16211661

1662+
/**
1663+
Implementation of the thread instrumentation interface.
1664+
@sa PSI_v1::set_thread.
1665+
*/
16221666
static void set_thread_v1(PSI_thread* thread)
16231667
{
16241668
PFS_thread *pfs= reinterpret_cast<PFS_thread*> (thread);
16251669
my_pthread_setspecific_ptr(THR_PFS, pfs);
16261670
}
16271671

1672+
/**
1673+
Implementation of the thread instrumentation interface.
1674+
@sa PSI_v1::delete_current_thread.
1675+
*/
16281676
static void delete_current_thread_v1(void)
16291677
{
16301678
PFS_thread *thread= my_pthread_getspecific_ptr(PFS_thread*, THR_PFS);
@@ -1636,6 +1684,10 @@ static void delete_current_thread_v1(void)
16361684
}
16371685
}
16381686

1687+
/**
1688+
Implementation of the thread instrumentation interface.
1689+
@sa PSI_v1::delete_thread.
1690+
*/
16391691
static void delete_thread_v1(PSI_thread *thread)
16401692
{
16411693
PFS_thread *pfs= reinterpret_cast<PFS_thread*> (thread);
@@ -2471,6 +2523,10 @@ get_thread_file_descriptor_locker_v1(PSI_file_locker_state *state,
24712523
return reinterpret_cast<PSI_file_locker*> (state);
24722524
}
24732525

2526+
/**
2527+
Implementation of the mutex instrumentation interface.
2528+
@sa PSI_v1::unlock_mutex.
2529+
*/
24742530
static void unlock_mutex_v1(PSI_mutex *mutex)
24752531
{
24762532
PFS_mutex *pfs_mutex= reinterpret_cast<PFS_mutex*> (mutex);
@@ -2510,6 +2566,10 @@ static void unlock_mutex_v1(PSI_mutex *mutex)
25102566
#endif
25112567
}
25122568

2569+
/**
2570+
Implementation of the rwlock instrumentation interface.
2571+
@sa PSI_v1::unlock_rwlock.
2572+
*/
25132573
static void unlock_rwlock_v1(PSI_rwlock *rwlock)
25142574
{
25152575
PFS_rwlock *pfs_rwlock= reinterpret_cast<PFS_rwlock*> (rwlock);
@@ -2586,6 +2646,10 @@ static void unlock_rwlock_v1(PSI_rwlock *rwlock)
25862646
#endif
25872647
}
25882648

2649+
/**
2650+
Implementation of the cond instrumentation interface.
2651+
@sa PSI_v1::signal_cond.
2652+
*/
25892653
static void signal_cond_v1(PSI_cond* cond)
25902654
{
25912655
PFS_cond *pfs_cond= reinterpret_cast<PFS_cond*> (cond);
@@ -2594,6 +2658,10 @@ static void signal_cond_v1(PSI_cond* cond)
25942658
pfs_cond->m_cond_stat.m_signal_count++;
25952659
}
25962660

2661+
/**
2662+
Implementation of the cond instrumentation interface.
2663+
@sa PSI_v1::broadcast_cond.
2664+
*/
25972665
static void broadcast_cond_v1(PSI_cond* cond)
25982666
{
25992667
PFS_cond *pfs_cond= reinterpret_cast<PFS_cond*> (cond);

storage/perfschema/pfs_engine_table.cc

+2
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ void PFS_engine_table_share::check_all_tables(THD *thd)
100100
(*current)->check_one_table(thd);
101101
}
102102

103+
/** Error reporting for schema integrity checks. */
103104
class PFS_check_intact : public Table_check_intact
104105
{
105106
protected:
@@ -465,6 +466,7 @@ int PFS_engine_table::update_row_values(TABLE *,
465466
return HA_ERR_WRONG_COMMAND;
466467
}
467468

469+
/** Implementation of internal ACL checks, for the performance schema. */
468470
class PFS_internal_schema_access : public ACL_internal_schema_access
469471
{
470472
public:

storage/perfschema/pfs_engine_table.h

+28
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,9 @@ struct PFS_engine_table_share
140140
void check_one_table(THD *thd);
141141
static void init_all_locks(void);
142142
static void delete_all_locks(void);
143+
/** Get the row count. */
143144
ha_rows get_row_count(void) const;
145+
/** Write a row. */
144146
int write_row(TABLE *table, unsigned char *buf, Field **fields) const;
145147

146148
/** Table name. */
@@ -172,6 +174,10 @@ struct PFS_engine_table_share
172174
bool m_checked;
173175
};
174176

177+
/**
178+
Privileges for read only tables.
179+
The only operation allowed is SELECT.
180+
*/
175181
class PFS_readonly_acl : public ACL_internal_table_access
176182
{
177183
public:
@@ -184,8 +190,13 @@ class PFS_readonly_acl : public ACL_internal_table_access
184190
ACL_internal_access_result check(ulong want_access, ulong *save_priv) const;
185191
};
186192

193+
/** Singleton instance of PFS_readonly_acl. */
187194
extern PFS_readonly_acl pfs_readonly_acl;
188195

196+
/**
197+
Privileges for truncatable tables.
198+
Operations allowed are SELECT and TRUNCATE.
199+
*/
189200
class PFS_truncatable_acl : public ACL_internal_table_access
190201
{
191202
public:
@@ -198,8 +209,13 @@ class PFS_truncatable_acl : public ACL_internal_table_access
198209
ACL_internal_access_result check(ulong want_access, ulong *save_priv) const;
199210
};
200211

212+
/** Singleton instance of PFS_truncatable_acl. */
201213
extern PFS_truncatable_acl pfs_truncatable_acl;
202214

215+
/**
216+
Privileges for updatable tables.
217+
Operations allowed are SELECT and UPDATE.
218+
*/
203219
class PFS_updatable_acl : public ACL_internal_table_access
204220
{
205221
public:
@@ -212,8 +228,13 @@ class PFS_updatable_acl : public ACL_internal_table_access
212228
ACL_internal_access_result check(ulong want_access, ulong *save_priv) const;
213229
};
214230

231+
/** Singleton instance of PFS_updatable_acl. */
215232
extern PFS_updatable_acl pfs_updatable_acl;
216233

234+
/**
235+
Privileges for editable tables.
236+
Operations allowed are SELECT, INSERT, UPDATE, DELETE and TRUNCATE.
237+
*/
217238
class PFS_editable_acl : public ACL_internal_table_access
218239
{
219240
public:
@@ -226,8 +247,12 @@ class PFS_editable_acl : public ACL_internal_table_access
226247
ACL_internal_access_result check(ulong want_access, ulong *save_priv) const;
227248
};
228249

250+
/** Singleton instance of PFS_editable_acl. */
229251
extern PFS_editable_acl pfs_editable_acl;
230252

253+
/**
254+
Privileges for unknown tables.
255+
*/
231256
class PFS_unknown_acl : public ACL_internal_table_access
232257
{
233258
public:
@@ -240,6 +265,7 @@ class PFS_unknown_acl : public ACL_internal_table_access
240265
ACL_internal_access_result check(ulong want_access, ulong *save_priv) const;
241266
};
242267

268+
/** Singleton instance of PFS_unknown_acl. */
243269
extern PFS_unknown_acl pfs_unknown_acl;
244270

245271
/** Position of a cursor, for simple iterations. */
@@ -262,6 +288,7 @@ struct PFS_simple_index
262288
{ m_index++; }
263289
};
264290

291+
/** Position of a double cursor, for iterations using 2 nested loops. */
265292
struct PFS_double_index
266293
{
267294
/** Outer index. */
@@ -286,6 +313,7 @@ struct PFS_double_index
286313
}
287314
};
288315

316+
/** Position of a triple cursor, for iterations using 3 nested loops. */
289317
struct PFS_triple_index
290318
{
291319
/** Outer index. */

storage/perfschema/pfs_instr.h

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ struct PFS_thread_class;
4242

4343
struct PFS_thread;
4444

45+
/** Base structure for wait instruments. */
4546
struct PFS_instr
4647
{
4748
/** Internal lock. */

storage/perfschema/pfs_instr_class.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ void cleanup_table_share_hash(void)
335335
}
336336

337337
/**
338-
Get the hash pins for @table_share_hash.
338+
Get the hash pins for @sa table_share_hash.
339339
@param thread The running thread.
340340
@returns The LF_HASH pins for the thread.
341341
*/
@@ -1004,7 +1004,7 @@ void purge_table_share(PFS_thread *thread, PFS_table_share *pfs)
10041004
@param schema_name The table schema name
10051005
@param schema_name_length The table schema name length
10061006
@param table_name The table name
1007-
@parem table_name_length The table name length
1007+
@param table_name_length The table name length
10081008
*/
10091009
void drop_table_share(PFS_thread *thread,
10101010
bool temporary,

storage/perfschema/pfs_setup_actor.h

+2
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ struct PFS_global_param;
3535
@{
3636
*/
3737

38+
/** Hash key for @sa PFS_setup_actor. */
3839
struct PFS_setup_actor_key
3940
{
4041
/**
@@ -47,6 +48,7 @@ struct PFS_setup_actor_key
4748
uint m_key_length;
4849
};
4950

51+
/** A setup_actor record. */
5052
struct PFS_setup_actor
5153
{
5254
/** Internal lock. */

storage/perfschema/pfs_setup_object.h

+2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ struct PFS_global_param;
3232
@{
3333
*/
3434

35+
/** Hash key for @sa PFS_setup_object. */
3536
struct PFS_setup_object_key
3637
{
3738
/**
@@ -43,6 +44,7 @@ struct PFS_setup_object_key
4344
uint m_key_length;
4445
};
4546

47+
/** A setup_object record. */
4648
struct PFS_setup_object
4749
{
4850
enum_object_type get_object_type()

0 commit comments

Comments
 (0)