diff --git a/include/ma_context.h b/include/ma_context.h index 966fd0cd..d9ba1ffc 100644 --- a/include/ma_context.h +++ b/include/ma_context.h @@ -301,7 +301,7 @@ struct mysql_async_context { void (*suspend_resume_hook)(my_bool suspend, void *user_data); void *suspend_resume_hook_user_data; - /* If non-NULL, this is a poitner to the result of getaddrinfo() currently + /* If non-NULL, this is a pointer to the result of getaddrinfo() currently * under traversal in pvio_socket_connect(). It gets reset to NULL when a * connection has been established to a server. The main objective is to * free this memory resource in mysql_close() while an initiated connection diff --git a/include/ma_global.h b/include/ma_global.h index 5bb34360..1b9b3462 100644 --- a/include/ma_global.h +++ b/include/ma_global.h @@ -290,8 +290,8 @@ typedef unsigned short ushort; /* From old s-system.h */ /* - Support macros for non ansi & other old compilers. Since such - things are no longer supported we do nothing. We keep then since + Support macros for non-ansi & other old compilers. Since such + things are no longer supported we do nothing. We keep them since some of our code may still be needed to upgrade old customers. */ #define _VARARGS(X) X @@ -394,7 +394,7 @@ typedef SOCKET_SIZE_TYPE size_socket; #define FN_EXTCHAR '.' #define FN_HOMELIB '~' /* ~/ is used as abbrev for home dir */ #define FN_CURLIB '.' /* ./ is used as abbrev for current dir */ -#define FN_PARENTDIR ".." /* Parentdirectory; Must be a string */ +#define FN_PARENTDIR ".." /* Parent directory; Must be a string */ #define FN_DEVCHAR ':' #ifndef FN_LIBCHAR diff --git a/include/ma_pvio.h b/include/ma_pvio.h index 752ea034..1eff3959 100644 --- a/include/ma_pvio.h +++ b/include/ma_pvio.h @@ -9,7 +9,7 @@ #endif /* CONC-492: Allow to build plugins outside of MariaDB Connector/C - source tree wnen ma_global.h was not included. */ + source tree when ma_global.h was not included. */ #if !defined(_global_h) && !defined(MY_GLOBAL_INCLUDED) typedef unsigned char uchar; #endif diff --git a/include/mariadb_com.h b/include/mariadb_com.h index 93d92179..2d3e778b 100644 --- a/include/mariadb_com.h +++ b/include/mariadb_com.h @@ -170,7 +170,7 @@ enum enum_server_command #define CLIENT_SSL_VERIFY_SERVER_CERT_OBSOLETE CLIENT_SSL_VERIFY_SERVER_CERT #define CLIENT_REMEMBER_OPTIONS (1UL << 31) -/* MariaDB specific capabilities */ +/* MariaDB-specific capabilities */ #define MARIADB_CLIENT_FLAGS 0xFFFFFFFF00000000ULL #define MARIADB_CLIENT_PROGRESS (1ULL << 32) #define MARIADB_CLIENT_RESERVED_1 (1ULL << 33) /* Former COM_MULTI, don't use */ diff --git a/include/mysql.h b/include/mysql.h index effec1b1..8abe74f3 100644 --- a/include/mysql.h +++ b/include/mysql.h @@ -225,7 +225,7 @@ extern const char *SQLSTATE_UNKNOWN; MYSQL_OPT_TLS_VERSION, MYSQL_OPT_ZSTD_COMPRESSION_LEVEL, - /* MariaDB specific */ + /* MariaDB-specific */ MYSQL_PROGRESS_CALLBACK=5999, MYSQL_OPT_NONBLOCK, /* MariaDB Connector/C specific */ diff --git a/libmariadb/ma_charset.c b/libmariadb/ma_charset.c index f6ed6f80..95b569d2 100644 --- a/libmariadb/ma_charset.c +++ b/libmariadb/ma_charset.c @@ -1212,7 +1212,7 @@ size_t mysql_cset_escape_slashes(const MARIADB_CHARSET_INFO * cset, char *newstr escape_overflow = TRUE; break; } - /* copy non escaped character */ + /* copy non-escaped character */ *newstr++ = *escapestr; } } @@ -1394,7 +1394,7 @@ struct st_madb_os_charset MADB_OS_CHARSET[]= {"57011", "ISCII Punjabi", NULL, NULL, MADB_CS_UNSUPPORTED}, {"65000", "utf-7 Unicode (UTF-7)", NULL, NULL, MADB_CS_UNSUPPORTED}, {"65001", "utf-8 Unicode (UTF-8)", "utf8", NULL, MADB_CS_EXACT}, - /* non Windows */ + /* non-Windows */ #else /* iconv encodings */ {"ASCII", "US-ASCII", "ascii", "ASCII", MADB_CS_APPROX}, diff --git a/libmariadb/ma_client_plugin.c.in b/libmariadb/ma_client_plugin.c.in index f6175035..f6a1e2b5 100644 --- a/libmariadb/ma_client_plugin.c.in +++ b/libmariadb/ma_client_plugin.c.in @@ -302,7 +302,7 @@ int mysql_client_plugin_init() /** Deinitializes the client plugin layer. - Unloades all client plugins and frees any associated resources. + Unloads all client plugins and frees any associated resources. */ void mysql_client_plugin_deinit() diff --git a/libmariadb/ma_decimal.c b/libmariadb/ma_decimal.c index de6062df..a2841b97 100644 --- a/libmariadb/ma_decimal.c +++ b/libmariadb/ma_decimal.c @@ -19,7 +19,7 @@ /* ======================================================================= NOTE: this library implements SQL standard "exact numeric" type - and is not at all generic, but rather intentinally crippled to + and is not at all generic, but rather intentionally crippled to follow the standard :) ======================================================================= Quoting the standard diff --git a/libmariadb/ma_dtoa.c b/libmariadb/ma_dtoa.c index 05ab0f0b..29faff54 100644 --- a/libmariadb/ma_dtoa.c +++ b/libmariadb/ma_dtoa.c @@ -597,7 +597,7 @@ typedef struct Bigint } Bigint; -/* A simple stack-memory based allocator for Bigints */ +/* A simple stack-memory-based allocator for Bigints */ typedef struct Stack_alloc { diff --git a/libmariadb/ma_io.c b/libmariadb/ma_io.c index 74a51fa3..61b19a6d 100644 --- a/libmariadb/ma_io.c +++ b/libmariadb/ma_io.c @@ -56,7 +56,7 @@ MA_FILE *ma_open(const char *location, const char *mode, MYSQL *mysql) } } #ifdef _WIN32 - /* See CONC-44: we need to support non ascii filenames too, so we convert + /* See CONC-44: we need to support non-ascii filenames too, so we convert current character set to wchar_t and try to open the file via _wsopen */ else { diff --git a/libmariadb/ma_net.c b/libmariadb/ma_net.c index 2e932b17..f2c24db8 100644 --- a/libmariadb/ma_net.c +++ b/libmariadb/ma_net.c @@ -362,7 +362,7 @@ int ma_net_real_write(NET *net, const char *packet, size_t len) } /***************************************************************************** - ** Read something from server/clinet + ** Read something from server/client *****************************************************************************/ static ulong ma_real_read(NET *net, size_t *complen) { @@ -381,7 +381,7 @@ static ulong ma_real_read(NET *net, size_t *complen) { while (remain > 0) { - /* First read is done with non blocking mode */ + /* First read is done with non-blocking mode */ if ((length=ma_pvio_cache_read(net->pvio, pos,remain)) <= 0L) { len= packet_error; diff --git a/libmariadb/mariadb_lib.c b/libmariadb/mariadb_lib.c index c3fabe4f..d9b65bca 100644 --- a/libmariadb/mariadb_lib.c +++ b/libmariadb/mariadb_lib.c @@ -325,7 +325,7 @@ static int cli_report_progress(MYSQL *mysql, uchar *packet, uint length) return 0; } -/* Get the length of next field. Change parameter to point at fieldstart */ +/* Get the length of next field. Change parameter to point at field start */ ulong net_field_length(uchar **packet) { @@ -1917,7 +1917,7 @@ restart: mysql->server_capabilities|= (unsigned int)(uint2korr(end + 5)) << 16; pkt_scramble_len= uint1korr(end + 7); - /* check if MariaD2B specific capabilities are available */ + /* check if MariaDB-specific capabilities are available */ if (mariadb_connection(mysql) && !(mysql->server_capabilities & CLIENT_MYSQL)) { mysql->extension->mariadb_server_capabilities= (ulonglong) uint4korr(end + 14); @@ -3004,7 +3004,7 @@ mysql_store_result(MYSQL *mysql) /************************************************************************** -** Alloc struct for use with unbuffered reads. Data is fetched by domand +** Alloc struct for use with unbuffered reads. Data is fetched by demand ** when calling to mysql_fetch_row. ** mysql_data_seek is a noop. ** diff --git a/libmariadb/mariadb_rpl.c b/libmariadb/mariadb_rpl.c index aaaba84a..3ab32542 100644 --- a/libmariadb/mariadb_rpl.c +++ b/libmariadb/mariadb_rpl.c @@ -964,7 +964,7 @@ static uint8_t mariadb_rpl_send_semisync_ack(MARIADB_RPL* rpl, MARIADB_RPL_EVENT } if (!event->is_semi_sync || (event->semi_sync_flags != SEMI_SYNC_ACK_REQ)) { - rpl_set_error(rpl, CR_BINLOG_SEMI_SYNC_ERROR, 0, "This event doesn't require to send semi synchronous acknoledgement"); + rpl_set_error(rpl, CR_BINLOG_SEMI_SYNC_ERROR, 0, "This event doesn't require to send semi synchronous acknowledgement"); return 1; } @@ -1109,7 +1109,7 @@ MARIADB_RPL_EVENT * STDCALL mariadb_rpl_fetch(MARIADB_RPL *rpl, MARIADB_RPL_EVEN RPL_CHECK_POS(ev, ev_end, 1); rpl_event->ok= *ev++; - /* CONC-470: add support for semi snychronous replication */ + /* CONC-470: add support for semi synchronous replication */ if (rpl->is_semi_sync && (rpl_event->is_semi_sync= (*ev == SEMI_SYNC_INDICATOR))) { RPL_CHECK_POS(ev, ev_end, 1); @@ -1299,7 +1299,7 @@ MARIADB_RPL_EVENT * STDCALL mariadb_rpl_fetch(MARIADB_RPL *rpl, MARIADB_RPL_EVEN ev+= 4; rpl->fd_header_len= rpl_event->event.format_description.header_len= *ev; ev+= 1; - /*Post header lengths: 1 byte for each event, non used events/gaps in enum should + /*Post header lengths: 1 byte for each event, non-used events/gaps in enum should have a zero value */ len= ev_end - ev - 5; rpl_set_string_and_len(&rpl_event->event.format_description.post_header_lengths, ev, len); @@ -1765,7 +1765,7 @@ MARIADB_RPL_EVENT * STDCALL mariadb_rpl_fetch(MARIADB_RPL *rpl, MARIADB_RPL_EVEN WRITE/UPDATE/DELETE_ROWS_EVENT_COMPRESSED_V1 (MariaDB only) WRITE/UPDATE/DELETE_ROWS_EVENT (MySQL only) - ROWS events are written for row based replicatoin if data is + ROWS events are written for row-based replication if data is inserted, deleted or updated. Header diff --git a/libmariadb/secure/ma_schannel.c b/libmariadb/secure/ma_schannel.c index b2aead62..3b489f2e 100644 --- a/libmariadb/secure/ma_schannel.c +++ b/libmariadb/secure/ma_schannel.c @@ -295,7 +295,7 @@ SECURITY_STATUS ma_schannel_client_handshake(MARIADB_TLS *ctls) pvio= ctls->pvio; sctx= (SC_CTX *)ctls->ssl; - /* Initialie securifty context */ + /* Initialize security context */ BuffersOut.BufferType= SECBUFFER_TOKEN; BuffersOut.cbBuffer= 0; BuffersOut.pvBuffer= NULL; diff --git a/libmariadb/secure/openssl.c b/libmariadb/secure/openssl.c index edc90a3b..1c24554f 100644 --- a/libmariadb/secure/openssl.c +++ b/libmariadb/secure/openssl.c @@ -471,7 +471,7 @@ my_bool ma_tls_connect(MARIADB_TLS *ctls) mysql= (MYSQL *)SSL_get_app_data(ssl); pvio= mysql->net.pvio; - /* Set socket to non blocking if not already set */ + /* Set socket to non-blocking if not already set */ if (!(blocking= pvio->methods->is_blocking(pvio))) pvio->methods->blocking(pvio, FALSE, 0); diff --git a/libmariadb/secure/schannel.c b/libmariadb/secure/schannel.c index 31806f24..2ae5fddf 100644 --- a/libmariadb/secure/schannel.c +++ b/libmariadb/secure/schannel.c @@ -410,7 +410,7 @@ typedef struct _MA_SCHANNEL_CREDENTIALS { Take care of specific TLS versions and cipher suites. - This function choses between the legacy and new credential structures + This function chooses between the legacy and new credential structures (SCHANNEL_CRED rsp SCH_CREDENTIALS) based on the OS version and the requested cipher suite. diff --git a/plugins/auth/auth_gssapi_client.c b/plugins/auth/auth_gssapi_client.c index 6f6c6ceb..6437e487 100644 --- a/plugins/auth/auth_gssapi_client.c +++ b/plugins/auth/auth_gssapi_client.c @@ -110,7 +110,7 @@ struct st_mysql_client_plugin_AUTHENTICATION _mysql_client_plugin_declaration_ = MYSQL_CLIENT_AUTHENTICATION_PLUGIN_INTERFACE_VERSION, "auth_gssapi_client", "Shuang Qiu, Robbie Harwood, Vladislav Vaintroub, Georg Richter", - "GSSAPI/SSPI based authentication", + "GSSAPI/SSPI-based authentication", {0, 1, 0}, "BSD", NULL, diff --git a/plugins/auth/caching_sha2_pw.c b/plugins/auth/caching_sha2_pw.c index 6339e934..ef5ef1fe 100644 --- a/plugins/auth/caching_sha2_pw.c +++ b/plugins/auth/caching_sha2_pw.c @@ -62,7 +62,7 @@ #define CACHED_LOGIN_SUCCEEDED 3 #define RSA_LOGIN_REQUIRED 4 -/* MySQL server allows requesting public key only for non secure connections. +/* MySQL server allows requesting public key only for non-secure connections. secure connections are: - TLS/SSL connections - unix_socket connections diff --git a/plugins/pvio/pvio_socket.c b/plugins/pvio/pvio_socket.c index ecacb83b..85437351 100644 --- a/plugins/pvio/pvio_socket.c +++ b/plugins/pvio/pvio_socket.c @@ -359,7 +359,7 @@ ssize_t pvio_socket_async_read(MARIADB_PVIO *pvio, uchar *buffer, size_t length) r= recv(csock->socket,(void *)buffer, length, read_flags); #else /* Windows doesn't support MSG_DONTWAIT, so we need to set - socket to non blocking */ + socket to non-blocking */ pvio_socket_blocking(pvio, 0, 0); r= recv(csock->socket, (char *)buffer, (int)length, 0); #endif @@ -435,7 +435,7 @@ ssize_t pvio_socket_async_write(MARIADB_PVIO *pvio, const uchar *buffer, size_t r= ma_send(csock->socket, buffer, length, write_flags); #else /* Windows doesn't support MSG_DONTWAIT, so we need to set - socket to non blocking */ + socket to non-blocking */ pvio_socket_blocking(pvio, 0, 0); r= send(csock->socket, (const char *)buffer, (int)length, 0); #endif @@ -638,7 +638,7 @@ static int pvio_socket_internal_connect(MARIADB_PVIO *pvio, csock= (struct st_pvio_socket *)pvio->data; timeout= pvio->timeout[PVIO_CONNECT_TIMEOUT]; - /* set non blocking */ + /* set non-blocking */ pvio_socket_blocking(pvio, 0, 0); #ifndef _WIN32 diff --git a/unittest/libmariadb/my_test.h b/unittest/libmariadb/my_test.h index 04217aca..94cdf689 100644 --- a/unittest/libmariadb/my_test.h +++ b/unittest/libmariadb/my_test.h @@ -143,7 +143,7 @@ do {\ do {\ if (!mariadb_connection(mysql))\ {\ - diag("Skip test for non MariaDB server");\ + diag("Skip test for non-MariaDB server");\ return OK;\ }\ } while(0) @@ -423,7 +423,7 @@ my_bool query_int_variable(MYSQL *con, const char *var_name, int *var_value) (const char *) var_name); FAIL_IF(mysql_query(con, query_buffer), "Query failed"); - FAIL_UNLESS(rs= mysql_store_result(con), "Invaliid result set"); + FAIL_UNLESS(rs= mysql_store_result(con), "Invalid result set"); FAIL_UNLESS(row= mysql_fetch_row(rs), "Nothing to fetch"); is_null= row[0] == NULL; diff --git a/unittest/libmariadb/ps.c b/unittest/libmariadb/ps.c index 111ce2a6..5e02002d 100644 --- a/unittest/libmariadb/ps.c +++ b/unittest/libmariadb/ps.c @@ -4030,7 +4030,7 @@ static int test_rename(MYSQL *mysql) check_stmt_rc(rc, stmt); rc= mysql_stmt_execute(stmt); - FAIL_IF(!rc, "Errr expected"); + FAIL_IF(!rc, "Error expected"); rc= mysql_query(mysql, "rename table t2 to t1, t4 to t3"); check_mysql_rc(rc, mysql); diff --git a/unittest/libmariadb/ps_bugs.c b/unittest/libmariadb/ps_bugs.c index df019f68..34dd3926 100644 --- a/unittest/libmariadb/ps_bugs.c +++ b/unittest/libmariadb/ps_bugs.c @@ -2343,7 +2343,7 @@ static int test_bug4030(MYSQL *mysql) rc= mysql_stmt_fetch(stmt); FAIL_UNLESS(rc == 0, "rc != 0"); FAIL_UNLESS(memcmp(&time_canonical, &time_out, sizeof(time_out)) == 0, "time_canonical != time_out"); - FAIL_UNLESS(memcmp(&date_canonical, &date_out, sizeof(date_out)) == 0, "date_canoncical != date_out"); + FAIL_UNLESS(memcmp(&date_canonical, &date_out, sizeof(date_out)) == 0, "date_canonical != date_out"); FAIL_UNLESS(memcmp(&datetime_canonical, &datetime_out, sizeof(datetime_out)) == 0, "datetime_canonical != datetime_out"); mysql_stmt_close(stmt); return OK; @@ -4030,7 +4030,7 @@ static int test_conc154(MYSQL *mysql) mysql_stmt_close(stmt); - /* 3rd: non empty result without free_result */ + /* 3rd: non-empty result without free_result */ rc= mysql_query(mysql, "INSERT INTO t1 VALUES ('test_conc154')"); check_mysql_rc(rc, mysql); @@ -4052,7 +4052,7 @@ static int test_conc154(MYSQL *mysql) mysql_stmt_close(stmt); - /* 4th non empty result set with free_result */ + /* 4th non-empty result set with free_result */ stmt= mysql_stmt_init(mysql); rc= mysql_stmt_prepare(stmt, SL(stmtstr)); check_stmt_rc(rc, stmt); @@ -5369,7 +5369,7 @@ static int test_conc525(MYSQL *mysql) fclose(fp); /* Test: prepare and execute - should fail due to non existing file */ + should fail due to non-existing file */ stmt= mysql_stmt_init(mysql); rc= mysql_stmt_prepare(stmt, SL("LOAD DATA LOCAL INFILE './test.notexist' INTO table t1")); @@ -5943,7 +5943,7 @@ static int test_conc762(MYSQL *mysql) mysql_stmt_fetch(stmt); FAIL_IF(is_null[0]==0, "Expected NULL value"); - FAIL_IF(is_null[1]==1, "Expected non NULL value"); + FAIL_IF(is_null[1]==1, "Expected non-NULL value"); FAIL_IF(length[0]!=0, "Expected length=0"); FAIL_IF(length[1]!=3, "Expected length=3"); diff --git a/unittest/mytap/tap.c b/unittest/mytap/tap.c index 0290389f..b7914595 100644 --- a/unittest/mytap/tap.c +++ b/unittest/mytap/tap.c @@ -457,7 +457,7 @@ int exit_status() { If you don't call the @c plan() function, the number of tests executed will be printed at the end. This is intended to be used while developing the unit and you are constantly adding tests. It - is not indented to be used after the unit has been released. + is not intended to be used after the unit has been released. @subsection TestRunning Execute the test