Skip to content

Commit ffea014

Browse files
committed
Bug#34006439: Spell check issues in code comments
Post-push fix: Run clang-format on files reporting formatting issue Approved by: Terje Rosten <terje.rosten@oracle.com> Change-Id: I6ada0a23023947212f48bff44615bcfaae88909a
1 parent 63fedd2 commit ffea014

File tree

15 files changed

+124
-120
lines changed

15 files changed

+124
-120
lines changed

libchangestreams/include/mysql/cs/reader/binary/mysqlproto.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@ class Mysql_protocol : public cs::reader::Reader {
107107
* If the state object is not provided, a new one will be created, which will
108108
* also be deleted when this object is destroyed.
109109
*
110-
* @param state Optional parameter. If provided, it will be used as the initial
111-
* state while attaching to the stream.
110+
* @param state Optional parameter. If provided, it will be used as the
111+
* initial state while attaching to the stream.
112112
*
113113
* @returns true if there is a failure, false otherwise.
114114
*/

libchangestreams/include/mysql/cs/reader/state.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ class State {
4343
/**
4444
* @brief The set of gtids handled in this stream.
4545
*
46-
* This set is updated every time a transaction identifier event comes down the
47-
* stream. The identifier is added to the stream.
46+
* This set is updated every time a transaction identifier event comes down
47+
* the stream. The identifier is added to the stream.
4848
*/
4949
binary_log::gtids::Gtid_set m_gtid_set;
5050

mysys/lf_hash.cc

+3-2
Original file line numberDiff line numberDiff line change
@@ -476,8 +476,9 @@ static uint cset_hash_sort_adapter(const LF_HASH *hash, const uchar *key,
476476
See wt_init() for example.
477477
As an alternative to using the above trick with decreasing
478478
LF_HASH::element_size, one can provide an "initialize" hook that will finish
479-
initialization of an object provided by LF_ALLOCATOR and set the element key from
480-
the object passed as parameter to lf_hash_insert instead of doing simple memcpy.
479+
initialization of an object provided by LF_ALLOCATOR and set the element key
480+
from the object passed as parameter to lf_hash_insert instead of doing simple
481+
memcpy.
481482
*/
482483
void lf_hash_init_impl(LF_HASH *hash, uint element_size, uint flags,
483484
uint key_offset, uint key_length,

mysys/mf_iocache.cc

+4-5
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,10 @@
3535
macros for read and writes for faster io.
3636
Used instead of FILE when reading or writing whole files.
3737
This code makes mf_rec_cache obsolete (currently only used by ISAM).
38-
One can change info->pos_in_file to a higher value to skip bytes in the file if
39-
also info->read_pos is set to info->read_end.
40-
If called through open_cached_file(), then the temporary file will
41-
only be created if a write exceeds the file buffer or if one calls
42-
my_b_flush_io_cache().
38+
One can change info->pos_in_file to a higher value to skip bytes in the file
39+
if also info->read_pos is set to info->read_end. If called through
40+
open_cached_file(), then the temporary file will only be created if a write
41+
exceeds the file buffer or if one calls my_b_flush_io_cache().
4342
4443
If one uses SEQ_READ_APPEND, then two buffers are allocated, one for
4544
reading and another for writing. Reads are first done from disk and

mysys/my_string.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ bool dynstr_trunc(DYNAMIC_STRING *str, size_t n) {
119119

120120
/*
121121
Concatenates any number of strings, escapes any quote in the result, then
122-
surrounds the resulting string in another set of quotes which is finally appended
123-
to specified DYNAMIC_STRING. This function is especially useful when
122+
surrounds the resulting string in another set of quotes which is finally
123+
appended to specified DYNAMIC_STRING. This function is especially useful when
124124
building strings to be executed with the system() function.
125125
126126
@param str Dynamic String which will have additional strings appended.

plugin/rewriter/rule.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ class Pattern {
6767
std::vector<std::string> literals;
6868

6969
/**
70-
Loads the pattern. The pattern string is copied in deep-copy way. This is not done in
71-
the CTOR because of the memory allocation.
70+
Loads the pattern. The pattern string is copied in deep-copy way. This is
71+
not done in the CTOR because of the memory allocation.
7272
7373
This function does the following:
7474
- Parse the pattern string.

sql/gis/distance_sphere.cc

+4-4
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ namespace gis {
4747
/// Map Cartesian geometry to geographic, mapping degrees east = x, degrees
4848
/// north = y. Do not canonicalize coordinates of poles.
4949
///
50-
/// Used when a SQL function needs to accept Cartesian coordinates as a shorthand
51-
/// for geographic with some default SRS.
50+
/// Used when a SQL function needs to accept Cartesian coordinates as a
51+
/// shorthand for geographic with some default SRS.
5252
static Geographic_point reinterpret_as_degrees(const Cartesian_point &g) {
5353
double lon_deg = g.x();
5454
double lat_deg = g.y();
@@ -65,8 +65,8 @@ static Geographic_point reinterpret_as_degrees(const Cartesian_point &g) {
6565
/// Map Cartesian geometry to geographic, mapping degrees east = x, degrees
6666
/// north = y. Do not canonicalize coordinates of poles.
6767
///
68-
/// Used when a SQL function needs to accept Cartesian coordinates as a shorthand
69-
/// for geographic with some default SRS.
68+
/// Used when a SQL function needs to accept Cartesian coordinates as a
69+
/// shorthand for geographic with some default SRS.
7070
static Geographic_multipoint reinterpret_as_degrees(
7171
const Cartesian_multipoint &g) {
7272
Geographic_multipoint dg{};

sql/item_xmlfunc.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1169,7 +1169,7 @@ static MY_XPATH_FUNC *my_xpath_function(const char *beg, const char *end) {
11691169
return nullptr;
11701170
}
11711171

1172-
/* Initialize a lex analyzer token */
1172+
/* Initialize a lex analyzer token */
11731173
static void my_xpath_lex_init(MY_XPATH_LEX *lex, const char *str,
11741174
const char *strend) {
11751175
lex->beg = str;

sql/join_optimizer/graph_simplification.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ class GraphSimplifier {
9999
APPLIED_SIMPLIFICATION,
100100

101101
// We applied a simplification, but it was one that was forced upon us;
102-
// we intended to apply the opposite, but discovered it would leave the graph
102+
// we intended to apply the opposite, but discovered it would leave the
103+
// graph
103104
// in an impossible state. Thus, the graph has been changed, but the actual
104105
// available join orderings are exactly as they were.
105106
APPLIED_NOOP,

sql/memory/unique_ptr.h

+8-7
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,8 @@ class Unique_ptr {
162162
std::enable_if_t<std::is_same<B, std::nullptr_t>::value> * = nullptr>
163163
Unique_ptr();
164164
/**
165-
Class constructor, to be used with specific allocators, passing the allocator
166-
object to be used.
165+
Class constructor, to be used with specific allocators, passing the
166+
allocator object to be used.
167167
168168
@param alloc The allocator instance to be used.
169169
*/
@@ -195,9 +195,9 @@ class Unique_ptr {
195195
std::is_array<D>::value> * = nullptr>
196196
Unique_ptr(size_t size);
197197
/**
198-
Class constructor, to be used with specific allocators and when `T` is not an
199-
array type, passing the allocator object to be used and the parameters to be
200-
used with `T` object constructor.
198+
Class constructor, to be used with specific allocators and when `T` is not
199+
an array type, passing the allocator object to be used and the parameters to
200+
be used with `T` object constructor.
201201
202202
@param alloc The allocator instance to be used.
203203
@param args The parameters to be used with `T` object constructor.
@@ -207,8 +207,9 @@ class Unique_ptr {
207207
!std::is_array<D>::value> * = nullptr>
208208
Unique_ptr(A &alloc, Args &&... args);
209209
/**
210-
Class constructor, to be used with no specific allocators and when `T` is not
211-
an array type, passing the parameters to be used with `T` object constructor.
210+
Class constructor, to be used with no specific allocators and when `T` is
211+
not an array type, passing the parameters to be used with `T` object
212+
constructor.
212213
213214
@param args The parameters to be used with `T` object constructor.
214215
*/

sql/message.h

+78-78
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,80 @@
1-
#ifndef MESSAGE_INCLUDED
2-
#define MESSAGE_INCLUDED
1+
#ifndef MESSAGE_INCLUDED
2+
#define MESSAGE_INCLUDED
33
/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
4-
Use is subject to license terms.
5-
6-
This program is free software; you can redistribute it and/or modify
7-
it under the terms of the GNU General Public License, version 2.0,
8-
as published by the Free Software Foundation.
9-
10-
This program is also distributed with certain software (including
11-
but not limited to OpenSSL) that is licensed under separate terms,
12-
as designated in a particular file or component or in included license
13-
documentation. The authors of MySQL hereby grant you an additional
14-
permission to link the program and your derivative works with the
15-
separately licensed software that they have included with MySQL.
16-
17-
This program is distributed in the hope that it will be useful,
18-
but WITHOUT ANY WARRANTY; without even the implied warranty of
19-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20-
GNU General Public License, version 2.0, for more details.
21-
22-
You should have received a copy of the GNU General Public License
23-
along with this program; if not, write to the Free Software
24-
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
25-
26-
/*
27-
To change or add messages mysqld writes to the Windows error log, run
28-
mc.exe message.mc
29-
and checkin generated messages.h, messages.rc and msg000001.bin under the
30-
source control.
31-
mc.exe can be installed with Windows SDK, some Visual Studio distributions
32-
do not include it.
33-
*/
34-
35-
//
4+
Use is subject to license terms.
5+
6+
This program is free software; you can redistribute it and/or modify
7+
it under the terms of the GNU General Public License, version 2.0,
8+
as published by the Free Software Foundation.
9+
10+
This program is also distributed with certain software (including
11+
but not limited to OpenSSL) that is licensed under separate terms,
12+
as designated in a particular file or component or in included license
13+
documentation. The authors of MySQL hereby grant you an additional
14+
permission to link the program and your derivative works with the
15+
separately licensed software that they have included with MySQL.
16+
17+
This program is distributed in the hope that it will be useful,
18+
but WITHOUT ANY WARRANTY; without even the implied warranty of
19+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20+
GNU General Public License, version 2.0, for more details.
21+
22+
You should have received a copy of the GNU General Public License
23+
along with this program; if not, write to the Free Software
24+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
25+
26+
/*
27+
To change or add messages mysqld writes to the Windows error log, run
28+
mc.exe message.mc
29+
and checkin generated messages.h, messages.rc and msg000001.bin under the
30+
source control.
31+
mc.exe can be installed with Windows SDK, some Visual Studio distributions
32+
do not include it.
33+
*/
34+
35+
//
3636
// Values are 32 bit values laid out as follows:
37-
//
38-
// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
39-
// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
40-
// +---+-+-+-----------------------+-------------------------------+
41-
// |Sev|C|R| Facility | Code |
42-
// +---+-+-+-----------------------+-------------------------------+
43-
//
44-
// where
45-
//
46-
// Sev - is the severity code
47-
//
48-
// 00 - Success
49-
// 01 - Informational
50-
// 10 - Warning
51-
// 11 - Error
52-
//
53-
// C - is the Customer code flag
54-
//
55-
// R - is a reserved bit
56-
//
57-
// Facility - is the facility code
58-
//
59-
// Code - is the facility's status code
60-
//
61-
//
62-
// Define the facility codes
63-
//
64-
65-
//
66-
// Define the severity codes
67-
//
68-
69-
//
70-
// MessageId: MSG_DEFAULT
71-
//
72-
// MessageText:
73-
//
74-
// %1For more information, see Help and Support Center at http://www.mysql.com.
75-
//
76-
//
77-
//
78-
#define MSG_DEFAULT 0xC0000064L
79-
80-
#endif /* MESSAGE_INCLUDED */
37+
//
38+
// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
39+
// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
40+
// +---+-+-+-----------------------+-------------------------------+
41+
// |Sev|C|R| Facility | Code |
42+
// +---+-+-+-----------------------+-------------------------------+
43+
//
44+
// where
45+
//
46+
// Sev - is the severity code
47+
//
48+
// 00 - Success
49+
// 01 - Informational
50+
// 10 - Warning
51+
// 11 - Error
52+
//
53+
// C - is the Customer code flag
54+
//
55+
// R - is a reserved bit
56+
//
57+
// Facility - is the facility code
58+
//
59+
// Code - is the facility's status code
60+
//
61+
//
62+
// Define the facility codes
63+
//
64+
65+
//
66+
// Define the severity codes
67+
//
68+
69+
//
70+
// MessageId: MSG_DEFAULT
71+
//
72+
// MessageText:
73+
//
74+
// %1For more information, see Help and Support Center at http://www.mysql.com.
75+
//
76+
//
77+
//
78+
#define MSG_DEFAULT 0xC0000064L
79+
80+
#endif /* MESSAGE_INCLUDED */

sql/rpl_mi.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,8 @@ class Master_info : public Rpl_info {
799799

800800
/**
801801
Is the replica working in GTID only mode, meaning it does not
802-
persist position related information when executing or queueing transactions.
802+
persist position related information when executing or queueing
803+
transactions.
803804
*/
804805
bool m_gtid_only_mode;
805806

sql/rpl_rli.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -1138,9 +1138,9 @@ class Relay_log_info : public Rpl_info {
11381138
/*
11391139
This flag is turned ON when the workers array is initialized.
11401140
Before destroying the workers array we check this flag to make sure
1141-
we are not destroying an uninitialized array. For the purpose of reporting the
1142-
worker status in performance schema table, we need to preserve the workers
1143-
array after worker thread was killed. So, we copy this array into
1141+
we are not destroying an uninitialized array. For the purpose of reporting
1142+
the worker status in performance schema table, we need to preserve the
1143+
workers array after worker thread was killed. So, we copy this array into
11441144
workers_copy_pfs array which is used for reporting until next
11451145
init_workers().
11461146
*/

sql/rpl_rli_pdb.h

+2-3
Original file line numberDiff line numberDiff line change
@@ -912,9 +912,8 @@ class Slave_worker : public Relay_log_info {
912912
MY_ATTRIBUTE((format(printf, 4, 0)));
913913

914914
private:
915-
ulong gaq_index; // GAQ index of the current assignment
916-
ulonglong
917-
master_log_pos; // event's cached log_pos for possible error report
915+
ulong gaq_index; // GAQ index of the current assignment
916+
ulonglong master_log_pos; // event's cached log_pos for possible error report
918917
void end_info();
919918
bool read_info(Rpl_info_handler *from) override;
920919
bool write_info(Rpl_info_handler *to) override;

sql/sys_vars_resource_mgr.h

+9-7
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,20 @@
4040
(1) init :
4141
Creates a copy (memdup()) of global Sys_var_charptr system variable for
4242
the respective session variable (passed as a parameter) & inserts it
43-
into sysvar_string_alloc_hash (containing the allocated address) to infer
44-
that memory has been allocated for the session. init() is called during
45-
the initialization of session system variables. (plugin_thdvar_init())
43+
into sysvar_string_alloc_hash (containing the allocated address) to
44+
infer that memory has been allocated for the session. init() is called
45+
during the initialization of session system variables.
46+
(plugin_thdvar_init())
4647
(2) update :
4748
When the session variable is updated, the old memory is freed and new
4849
memory is allocated to hold the new value. The corresponding member in
49-
sysvar_string_alloc_hash is also updated to hold the new allocated memory
50-
address. (Sys_var_charptr::session_update())
50+
sysvar_string_alloc_hash is also updated to hold the new allocated
51+
memory address.
52+
(Sys_var_charptr::session_update())
5153
(3) deinit :
5254
Its a one-shot operation to free all the session Sys_var_charptr system
53-
variables. It basically traverses down the sysvar_string_alloc_hash
54-
hash and calls free() for all the addresses that it holds.
55+
variables. It basically traverses down the sysvar_string_alloc_hash hash
56+
and calls free() for all the addresses that it holds.
5557
5658
Note, there should always be at most one node per Sys_var_charptr session
5759
system variable.

0 commit comments

Comments
 (0)