Skip to content

Commit 865a068

Browse files
committed
Bug#34006439: Spell check issues in code comments
Description: ----------- Running "codespell" tool on the source code repository gives large number (5k) of spell check issues. The focus of this bug is to fix only those related to code comments (fixing the spelling within the generated documentation in the process). Due to high volume of issues, currently these subprojects are ignored (3k out of 5k total issues): ndb, innodb, rapid, router, group_replication, innodb_memcached. Code variable names, output string spell check issues were ignored to avoid the impact on programs or tests. Approved by: Stefan Hinz <stefan.hinz@oracle.com> Approved by: Jon Stephens <jon.stephens@oracle.com> Change-Id: Ife855a31bd71f7d56d5d613753730c0c2132e241
1 parent 673d1ee commit 865a068

File tree

657 files changed

+2505
-2507
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

657 files changed

+2505
-2507
lines changed

client/base/abstract_options_provider.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2014, 2021, Oracle and/or its affiliates.
2+
Copyright (c) 2014, 2022, Oracle and/or its affiliates.
33
44
This program is free software; you can redistribute it and/or modify
55
it under the terms of the GNU General Public License, version 2.0,
@@ -61,7 +61,7 @@ class Abstract_options_provider : public I_options_provider {
6161
*/
6262
Simple_option *create_new_option(std::string name, std::string description);
6363
/**
64-
Creates and attach new disabled option. This option is to mark existance
64+
Creates and attach new disabled option. This option is to mark existence
6565
of options inavailable due to distribution configuration.
6666
@param name Name of option. It is used in command-line option name as
6767
--name.

client/base/disabled_option.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2014, 2021, Oracle and/or its affiliates.
2+
Copyright (c) 2014, 2022, Oracle and/or its affiliates.
33
44
This program is free software; you can redistribute it and/or modify
55
it under the terms of the GNU General Public License, version 2.0,
@@ -34,7 +34,7 @@ namespace Base {
3434
namespace Options {
3535

3636
/**
37-
Disabled option. This option is used to mark existance of options
37+
Disabled option. This option is used to mark existence of options
3838
inavailable due to distribution configuration.
3939
*/
4040
class Disabled_option : public Abstract_option<Disabled_option> {

client/dump/mysql_crawler.cc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2015, 2021, Oracle and/or its affiliates.
2+
Copyright (c) 2015, 2022, Oracle and/or its affiliates.
33
44
This program is free software; you can redistribute it and/or modify
55
it under the terms of the GNU General Public License, version 2.0,
@@ -113,7 +113,7 @@ void Mysql_crawler::enumerate_objects() {
113113

114114
std::optional<std::string> stmt = this->get_create_statement(
115115
runner, "", db_name, "DATABASE IF NOT EXISTS");
116-
if (!stmt.has_value()) continue; // some error ocurred
116+
if (!stmt.has_value()) continue; // some error occurred
117117

118118
Database *database =
119119
new Database(this->generate_new_object_id(), db_name, stmt.value());
@@ -275,7 +275,7 @@ void Mysql_crawler::enumerate_tables(const Database &db) {
275275
bool isInnoDB = table_data[1] == "InnoDB"; // "Engine"
276276
std::optional<std::string> stmt =
277277
this->get_create_statement(runner, db.get_name(), table_name, "TABLE");
278-
if (!stmt.has_value()) continue; // some error ocurred
278+
if (!stmt.has_value()) continue; // some error occurred
279279
Table *table = new Table(this->generate_new_object_id(), table_name,
280280
db.get_name(), stmt.value(), fields, table_data[1],
281281
rows, (uint64)(rows * (isInnoDB ? 1.5 : 1)),
@@ -390,7 +390,7 @@ void Mysql_crawler::enumerate_functions(const Database &db, std::string type) {
390390

391391
std::optional<std::string> stmt = this->get_create_statement(
392392
runner, db.get_name(), function_row[1], type, 2);
393-
if (!stmt.has_value()) // some error ocurred
393+
if (!stmt.has_value()) // some error occurred
394394
break;
395395

396396
TObject *function = new TObject(
@@ -431,7 +431,7 @@ void Mysql_crawler::enumerate_event_scheduler_events(const Database &db) {
431431
std::optional<std::string> stmt = this->get_create_statement(
432432
runner, db.get_name(), event_row[1], "EVENT", 3);
433433

434-
if (!stmt.has_value()) // some error ocurred
434+
if (!stmt.has_value()) // some error occurred
435435
break;
436436

437437
Event_scheduler_event *event = new Event_scheduler_event(
@@ -523,7 +523,7 @@ void Mysql_crawler::enumerate_table_triggers(const Table &table,
523523
const Mysql::Tools::Base::Mysql_query_runner::Row &trigger_row = **it;
524524
std::optional<std::string> stmt = this->get_create_statement(
525525
runner, table.get_schema(), trigger_row[0], "TRIGGER", 2);
526-
if (!stmt.has_value()) // some error occured
526+
if (!stmt.has_value()) // some error occurred
527527
break;
528528
Trigger *trigger = new Trigger(
529529
this->generate_new_object_id(), trigger_row[0], table.get_schema(),

client/migrate_keyring/options.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2021, Oracle and/or its affiliates.
2+
Copyright (c) 2021, 2022, Oracle and/or its affiliates.
33
44
This program is free software; you can redistribute it and/or modify
55
it under the terms of the GNU General Public License, version 2.0,
@@ -51,7 +51,7 @@ class Options {
5151
static char *s_destination_keyring_configuration_dir;
5252

5353
/*
54-
Following paramters are needed if migration involves an active MySQL server
54+
Following parameters are needed if migration involves an active MySQL server
5555
*/
5656

5757
/** Flag for online migration */

client/mysql.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1452,8 +1452,8 @@ int main(int argc, char *argv[]) {
14521452
void mysql_end(int sig) {
14531453
#ifndef _WIN32
14541454
/*
1455-
Ingnoring SIGQUIT, SIGINT and SIGHUP signals when cleanup process starts.
1456-
This will help in resolving the double free issues, which occures in case
1455+
Ignoring SIGQUIT, SIGINT and SIGHUP signals when cleanup process starts.
1456+
This will help in resolving the double free issues, which occurs in case
14571457
the signal handler function is started in between the clean up function.
14581458
*/
14591459
signal(SIGQUIT, SIG_IGN);
@@ -4350,7 +4350,7 @@ static int com_use(String *buffer [[maybe_unused]], char *line) {
43504350
static int normalize_dbname(const char *line, char *buff, uint buff_size) {
43514351
MYSQL_RES *res = nullptr;
43524352

4353-
/* Send the "USE db" commmand to the server. */
4353+
/* Send the "USE db" command to the server. */
43544354
if (mysql_query(&mysql, line)) return 1;
43554355

43564356
/*
@@ -4638,7 +4638,7 @@ static int sql_real_connect(char *host, char *database, char *user, char *,
46384638
/*
46394639
Don't convert trailing '\n' character - it was appended during
46404640
last batch_readline_command() call.
4641-
Oherwise we'll get an extra line, which makes some tests fail.
4641+
Otherwise we'll get an extra line, which makes some tests fail.
46424642
*/
46434643
if (status.line_buff->buffer[len - 1] == '\n') len--;
46444644
if (tmp.copy(status.line_buff->buffer, len, &my_charset_utf8mb4_bin,
@@ -4813,7 +4813,7 @@ static int com_status(String *buffer [[maybe_unused]],
48134813
tee_fprintf(stdout, "\nConnection id:\t\t%lu\n", mysql_thread_id(&mysql));
48144814
/*
48154815
Don't remove "limit 1",
4816-
it is protection againts SQL_SELECT_LIMIT=0
4816+
it is protection against SQL_SELECT_LIMIT=0
48174817
*/
48184818
if (!mysql_store_result_for_lazy(&result)) {
48194819
MYSQL_ROW cur = mysql_fetch_row(result);

client/mysql_secure_installation.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2013, 2021, Oracle and/or its affiliates.
2+
Copyright (c) 2013, 2022, Oracle and/or its affiliates.
33
44
This program is free software; you can redistribute it and/or modify
55
it under the terms of the GNU General Public License, version 2.0,
@@ -350,7 +350,7 @@ static int install_password_validation_component() {
350350
int tmp = sizeof("SET GLOBAL validate_password.policy = ") + 3;
351351
size_t strength_length = strlen(strength);
352352
/*
353-
query string needs memory which is atleast the length of initial part
353+
query string needs memory which is at least the length of initial part
354354
of query plus twice the size of variable being appended.
355355
*/
356356
query = (char *)my_malloc(PSI_NOT_INSTRUMENTED,
@@ -384,7 +384,7 @@ static void estimate_password_strength(char *password_string) {
384384
size_t tmp = sizeof("SELECT validate_password_strength(") + 3;
385385
size_t password_length = strlen(password_string);
386386
/*
387-
query string needs memory which is atleast the length of initial part
387+
query string needs memory which is at least the length of initial part
388388
of query plus twice the size of variable being appended.
389389
*/
390390
query = (char *)my_malloc(PSI_NOT_INSTRUMENTED,
@@ -517,7 +517,7 @@ static void set_opt_user_password(int component_set) {
517517
char *query = nullptr, *end;
518518
int tmp = sizeof("SET PASSWORD=") + 3;
519519
/*
520-
query string needs memory which is atleast the length of initial part
520+
query string needs memory which is at least the length of initial part
521521
of query plus twice the size of variable being appended.
522522
*/
523523
query = (char *)my_malloc(PSI_NOT_INSTRUMENTED,
@@ -643,7 +643,7 @@ static void drop_users(MYSQL_RES *result) {
643643
user_length = strlen(user_tmp);
644644
host_length = strlen(host_tmp);
645645
/*
646-
query string needs memory which is atleast the length of initial part
646+
query string needs memory which is at least the length of initial part
647647
of query plus twice the size of variable being appended.
648648
*/
649649
query = (char *)my_malloc(

client/mysql_ssl_rsa_setup.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2015, 2021, Oracle and/or its affiliates.
2+
Copyright (c) 2015, 2022, Oracle and/or its affiliates.
33
44
This program is free software; you can redistribute it and/or modify
55
it under the terms of the GNU General Public License, version 2.0,
@@ -98,7 +98,7 @@ Sql_string_t ext_files[] = {create_string("cav3.ext"),
9898
#define MAX_PATH_LEN \
9999
(FN_REFLEN - strlen(FN_DIRSEP) - cert_files[SERVER_CERT].length() - 1)
100100
/*
101-
Higest number of fixed characters in subject line is 47:
101+
Highest number of fixed characters in subject line is 47:
102102
MySQL_SERVER_<suffix>_Auto_Generated_Server_Certificate
103103
Maximum size of subject is 64. So suffix can't be longer
104104
than 17 characters.

client/mysqladmin.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -484,11 +484,11 @@ int main(int argc, char *argv[]) {
484484
}
485485
} else {
486486
/*
487-
--count=0 aborts right here. Otherwise iff --sleep=t ("interval")
487+
--count=0 aborts right here. Otherwise if --sleep=t ("interval")
488488
is given a t!=0, we get an endless loop, or n iterations if --count=n
489489
was given an n!=0. If --sleep wasn't given, we get one iteration.
490490
491-
To wit, --wait loops the connection-attempts, while --sleep loops
491+
To wait, --wait loops the connection-attempts, while --sleep loops
492492
the command execution (endlessly if no --count is given).
493493
*/
494494

@@ -532,7 +532,7 @@ int main(int argc, char *argv[]) {
532532
*/
533533
} else {
534534
/*
535-
connexion broke, and we have no order to re-establish it. fail.
535+
connection broke, and we have no order to re-establish it. fail.
536536
*/
537537
if (!option_force) error = 1;
538538
break;

client/mysqlbinlog.cc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ class Database_rewrite {
313313
database name that is to be rewritten into the target one.
314314
315315
The key of the map is the "from" database name. The value of the
316-
map is is the "to" database name that we are rewritting the
316+
map is is the "to" database name that we are rewriting the
317317
name into.
318318
*/
319319
std::map<std::string, std::string> m_dict;
@@ -564,7 +564,7 @@ class Database_rewrite {
564564
/**
565565
Shall unregister a rewrite rule for a given database. If the name is
566566
not registered, then no action is taken and no error reported.
567-
The name of database to be used in this invokation is the original
567+
The name of database to be used in this invocation is the original
568568
database name.
569569
570570
@param from the original database name used when the rewrite rule
@@ -667,10 +667,10 @@ char server_version[SERVER_VERSION_LENGTH];
667667
ulong filter_server_id = 0;
668668

669669
/*
670-
This strucure is used to store the event and the log postion of the events
671-
which is later used to print the event details from correct log postions.
670+
This structure is used to store the event and the log position of the events
671+
which is later used to print the event details from correct log positions.
672672
The Log_event *event is used to store the pointer to the current event and
673-
the event_pos is used to store the current event log postion.
673+
the event_pos is used to store the current event log position.
674674
*/
675675
struct buff_event_info {
676676
Log_event *event;
@@ -682,7 +682,7 @@ struct buff_event_info {
682682
User_var_log_events, and Rand_log_events, followed by one
683683
Query_log_event. If statements are filtered out, the filter has to be
684684
checked for the Query_log_event. So we have to buffer the Intvar,
685-
User_var, and Rand events and their corresponding log postions until we see
685+
User_var, and Rand events and their corresponding log positions until we see
686686
the Query_log_event. This dynamic array buff_ev is used to buffer a structure
687687
which stores such an event and the corresponding log position.
688688
*/
@@ -2622,7 +2622,7 @@ static Exit_status dump_remote_log_entries(PRINT_EVENT_INFO *print_event_info,
26222622
if ((retval = check_master_version()) != OK_CONTINUE) return retval;
26232623

26242624
/*
2625-
Fake a server ID to log continously. This will show as a
2625+
Fake a server ID to log continuously. This will show as a
26262626
slave on the mysql server.
26272627
*/
26282628
if (to_last_remote_log && stop_never) {
@@ -3468,7 +3468,7 @@ void Transaction_payload_log_event::print(FILE *,
34683468
process_event(info, ev, header()->log_pos, "", true);
34693469

34703470
// lets make the buffer be allocated again, as the current
3471-
// buffer ownership has been handed over to the defferred event
3471+
// buffer ownership has been handed over to the deferred event
34723472
if (is_deferred_event) {
34733473
buffer = nullptr; /* purecov: inspected */
34743474
current_buffer_size = 0; /* purecov: inspected */

client/mysqlimport.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ static int lock_table(MYSQL *mysql, int tablecount, char **raw_tablename) {
409409
dynstr_append(&query, " WRITE,");
410410
}
411411
if (mysql_real_query(mysql, query.str, (ulong)(query.length - 1)))
412-
return db_error(mysql); /* We shall countinue here, if --force was given */
412+
return db_error(mysql); /* We shall continue here, if --force was given */
413413
return 0;
414414
}
415415

@@ -544,7 +544,7 @@ static char *field_escape(char *to, const char *from, uint length) {
544544
end_backslashes ^= 1; /* find odd number of backslashes */
545545
else {
546546
if (*from == '\'' && !end_backslashes)
547-
*to++ = *from; /* We want a dublicate of "'" for MySQL */
547+
*to++ = *from; /* We want a duplicate of "'" for MySQL */
548548
end_backslashes = 0;
549549
}
550550
}
@@ -571,7 +571,7 @@ static void *worker_thread(void *arg) {
571571
if (mysql_query(mysql, "/*!40101 set @@character_set_database=binary */;") &&
572572
(error = db_error(mysql))) {
573573
if (exitcode == 0) exitcode = error;
574-
/* We shall countinue here, if --force was given */
574+
/* We shall continue here, if --force was given */
575575
goto error;
576576
}
577577

@@ -691,7 +691,7 @@ int main(int argc, char **argv) {
691691
"/*!40101 set @@character_set_database=binary */;") &&
692692
(error = db_error(mysql))) {
693693
if (exitcode == 0) exitcode = error;
694-
/* We shall countinue here, if --force was given */
694+
/* We shall continue here, if --force was given */
695695
goto end;
696696
}
697697

0 commit comments

Comments
 (0)