diff --git a/cmake/version_info.cmake b/cmake/version_info.cmake index 1c05de03..ca0716da 100644 --- a/cmake/version_info.cmake +++ b/cmake/version_info.cmake @@ -8,7 +8,7 @@ FUNCTION(GET_FILE_VERSION FILE_NAME FILE_VERSION) # if we build from a git repository, we calculate the file version: - # Patch number is numer of commits for given file + # Patch number is number of commits for given file IF(GIT_EXECUTABLE AND EXISTS ${CC_SOURCE_DIR}/.git) EXECUTE_PROCESS(COMMAND ${GIT_EXECUTABLE} --git-dir=${CC_SOURCE_DIR}/.git --work-tree=${CC_SOURCE_DIR} rev-list HEAD --count -- ${FILE_NAME} OUTPUT_VARIABLE FV) diff --git a/include/ma_crypt.h b/include/ma_crypt.h index 182fa21c..d46bb0e2 100644 --- a/include/ma_crypt.h +++ b/include/ma_crypt.h @@ -113,7 +113,7 @@ void ma_hash_result(MA_HASH_CTX *ctx, unsigned char *digest); @param[in] hash algorithm - @retuns digest size or 0 on error + @returns digest size or 0 on error */ static inline size_t ma_hash_digest_size(unsigned int hash_alg) { diff --git a/include/ma_sys.h b/include/ma_sys.h index ecb6fccb..cadffe8a 100644 --- a/include/ma_sys.h +++ b/include/ma_sys.h @@ -146,22 +146,6 @@ do {\ #define my_afree(PTR) ma_free(PTR) #endif /* HAVE_ALLOCA */ -#ifdef MSDOS -#ifdef __ZTC__ -void * __CDECL halloc(long count,size_t length); -void __CDECL hfree(void *ptr); -#endif -#if defined(USE_HALLOC) -#if defined(_VCM_) || defined(M_IC80386) -#undef USE_HALLOC -#endif -#endif -#ifdef USE_HALLOC -#define malloc(a) halloc((long) (a),1) -#define free(a) hfree(a) -#endif -#endif /* MSDOS */ - #ifndef errno #ifdef HAVE_ERRNO_AS_DEFINE #include /* errno is a define */ diff --git a/include/mariadb_ctype.h b/include/mariadb_ctype.h index bc65fcdc..3b218c31 100644 --- a/include/mariadb_ctype.h +++ b/include/mariadb_ctype.h @@ -16,7 +16,7 @@ MA 02111-1301, USA */ /* - A better inplementation of the UNIX ctype(3) library. + A better implementation of the UNIX ctype(3) library. Notes: my_global.h should be included before ctype.h */ diff --git a/include/mysql.h b/include/mysql.h index 5174e07a..34f09858 100644 --- a/include/mysql.h +++ b/include/mysql.h @@ -426,7 +426,7 @@ typedef struct st_mysql_time #define SEC_PART_DIGITS 6 #define MARIADB_INVALID_SOCKET -1 -/* Ansynchronous API constants */ +/* Asynchronous API constants */ #define MYSQL_WAIT_READ 1 #define MYSQL_WAIT_WRITE 2 #define MYSQL_WAIT_EXCEPT 4 @@ -729,7 +729,7 @@ int STDCALL mysql_stmt_send_long_data_cont(my_bool *ret, MYSQL_STMT *stmt, int status); int STDCALL mysql_reset_connection(MYSQL *mysql); -/* API function calls (used by dynmic plugins) */ +/* API function calls (used by dynamic plugins) */ struct st_mariadb_api { unsigned long long (STDCALL *mysql_num_rows)(MYSQL_RES *res); unsigned int (STDCALL *mysql_num_fields)(MYSQL_RES *res); diff --git a/libmariadb/ma_net.c b/libmariadb/ma_net.c index 108e31ee..680369b3 100644 --- a/libmariadb/ma_net.c +++ b/libmariadb/ma_net.c @@ -52,12 +52,12 @@ ulong net_read_timeout= NET_READ_TIMEOUT; ulong net_write_timeout= NET_WRITE_TIMEOUT; ulong net_buffer_length= 8192; /* Default length. Enlarged if necessary */ -#if !defined(_WIN32) && !defined(MSDOS) +#if !defined(_WIN32) #include #else #undef MYSQL_SERVER /* Win32 can't handle interrupts */ #endif -#if !defined(MSDOS) && !defined(_WIN32) && !defined(HAVE_BROKEN_NETINET_INCLUDES) && !defined(__BEOS__) +#if !defined(_WIN32) && !defined(HAVE_BROKEN_NETINET_INCLUDES) && !defined(__BEOS__) #include #include #include diff --git a/libmariadb/ma_password.c b/libmariadb/ma_password.c index 0db4e036..eb6fe6a8 100644 --- a/libmariadb/ma_password.c +++ b/libmariadb/ma_password.c @@ -46,7 +46,7 @@ void ma_randominit(struct rand_struct *rand_st,ulong seed1, ulong seed2) { /* For mysql 3.21.# */ #ifdef HAVE_purify - memset((char*) rand_st, 0m sizeof(*rand_st)); /* Avoid UMC varnings */ + memset((char*) rand_st, 0m sizeof(*rand_st)); /* Avoid UMC warnings */ #endif rand_st->max_value= 0x3FFFFFFFL; rand_st->max_value_dbl=(double) rand_st->max_value; @@ -81,7 +81,7 @@ void ma_hash_password(ulong *result, const char *password, size_t len) } /* - * Genererate a new message based on message and password + * Generate a new message based on message and password * The same thing is done in client and server and the results are checked. */ @@ -134,7 +134,7 @@ void ma_make_scrambled_password(char *to,const char *password) } /* - * Genererate a new message based on message and password + * Generate a new message based on message and password * The same thing is done in client and server and the results are checked. */ char *ma_scramble_323(char *to, const char *message, const char *password) diff --git a/libmariadb/ma_stmt_codec.c b/libmariadb/ma_stmt_codec.c index 2e48aaf4..913b6a87 100644 --- a/libmariadb/ma_stmt_codec.c +++ b/libmariadb/ma_stmt_codec.c @@ -370,7 +370,7 @@ end: Year must be < 10000, month < 12, day < 32 - Years with 2 digits, are coverted to values 1970-2069 according to + Years with 2 digits, are converted to values 1970-2069 according to usual rules: 00-69 is converted to 2000-2069. diff --git a/libmariadb/mariadb_dyncol.c b/libmariadb/mariadb_dyncol.c index 96f9a0fa..34b933d4 100644 --- a/libmariadb/mariadb_dyncol.c +++ b/libmariadb/mariadb_dyncol.c @@ -3751,7 +3751,7 @@ mariadb_dyncol_check(DYNAMIC_COLUMN *str) i++, header.entry+= header.entry_size) { DYNAMIC_COLUMN_VALUE store; - // already checked by previouse pass + /* already checked by previous pass */ (*fmt->type_and_offset_read)(&header.type, &header.offset, header.entry + fmt->fixed_hdr_entry, header.offset_size); diff --git a/libmariadb/mariadb_lib.c b/libmariadb/mariadb_lib.c index 9c0704d2..3c883691 100644 --- a/libmariadb/mariadb_lib.c +++ b/libmariadb/mariadb_lib.c @@ -46,7 +46,7 @@ #ifdef HAVE_PWD_H #include #endif -#if !defined(MSDOS) && !defined(_WIN32) +#if !defined(_WIN32) #include #include #include @@ -131,7 +131,7 @@ my_string mysql_unix_port=0; struct st_mariadb_methods MARIADB_DEFAULT_METHODS; -#if defined(MSDOS) || defined(_WIN32) +#if defined(_WIN32) // socket_errno is defined in ma_global.h for all platforms #define perror(A) #else @@ -532,7 +532,7 @@ void read_user_name(char *name) return; } -#else /* If MSDOS || VMS */ +#else /* WIN32 */ void read_user_name(char *name) { @@ -1696,7 +1696,7 @@ MYSQL *mthd_my_real_connect(MYSQL *mysql, const char *host, const char *user, return(mysql); error: - /* Free alloced memory */ + /* Free allocated memory */ end_server(mysql); /* only free the allocated memory, user needs to call mysql_close */ mysql_close_memory(mysql); @@ -1938,7 +1938,7 @@ mysql_select_db(MYSQL *mysql, const char *db) /************************************************************************* ** Send a QUIT to the server and close the connection -** If handle is alloced by mysql connect free it. +** If handle is allocated by mysql connect free it. *************************************************************************/ static void mysql_close_options(MYSQL *mysql) @@ -2847,7 +2847,7 @@ static size_t get_store_length(size_t length) #define MAX_STORE_SIZE 9 unsigned char buffer[MAX_STORE_SIZE], *p; - /* We just store the length and substract offset of our buffer + /* We just store the length and subtract offset of our buffer to determine the length */ p= mysql_net_store_length(buffer, length); return p - buffer; diff --git a/libmariadb/secure/gnutls.c b/libmariadb/secure/gnutls.c index 31618d99..97db72a3 100644 --- a/libmariadb/secure/gnutls.c +++ b/libmariadb/secure/gnutls.c @@ -1398,7 +1398,7 @@ static int my_verify_callback(gnutls_session_t ssl) (status & GNUTLS_CERT_SIGNER_NOT_FOUND)) return 0; - /* gnutls default error mesage "certificate validation failed" isn't very + /* gnutls default error message "certificate validation failed" isn't very descriptive, so we provide more information about the error here */ type= gnutls_certificate_type_get(ssl); gnutls_certificate_verification_status_print(status, type, &out, 0); diff --git a/libmariadb/secure/schannel_certs.c b/libmariadb/secure/schannel_certs.c index 88fefa1d..89652aff 100644 --- a/libmariadb/secure/schannel_certs.c +++ b/libmariadb/secure/schannel_certs.c @@ -591,7 +591,7 @@ void schannel_free_store(HCERTSTORE store) /* Verify server certificate against a wincrypt store -@return 0 - success, otherwise error occured. +@return 0 - success, otherwise error occurred. */ SECURITY_STATUS schannel_verify_server_certificate( const CERT_CONTEXT* cert, @@ -663,7 +663,7 @@ static SECURITY_STATUS load_private_key(CERT_CONTEXT* cert, char* private_key_st } /* - To accomodate for both "BEGIN PRIVATE KEY" vs "BEGIN RSA PRIVATE KEY" + To accommodate for both "BEGIN PRIVATE KEY" vs "BEGIN RSA PRIVATE KEY" sections in PEM, we try to decode with PKCS_PRIVATE_KEY_INFO first, and, if it fails, with PKCS_RSA_PRIVATE_KEY flag. */ diff --git a/plugins/auth/caching_sha2_pw.c b/plugins/auth/caching_sha2_pw.c index e9762497..4bd45e84 100644 --- a/plugins/auth/caching_sha2_pw.c +++ b/plugins/auth/caching_sha2_pw.c @@ -93,7 +93,7 @@ static int ma_sha256_scramble(unsigned char *scramble, size_t scramble_len, #endif size_t i; - /* check if all specified lenghts are valid */ + /* check if all specified lengtht are valid */ if (!scramble_len || !source_len || !salt_len) return 1; diff --git a/unittest/libmariadb/connection.c b/unittest/libmariadb/connection.c index 961f3ce0..cf642bac 100644 --- a/unittest/libmariadb/connection.c +++ b/unittest/libmariadb/connection.c @@ -391,7 +391,7 @@ static int test_bug31669(MYSQL *mysql) memset(buff, 'a', sizeof(buff)); rc= mysql_change_user(mysql, buff, buff, buff); - FAIL_UNLESS(rc, "Error epected"); + FAIL_UNLESS(rc, "Error expected"); rc = mysql_change_user(mysql, username, password, schema); check_mysql_rc(rc, mysql); diff --git a/unittest/libmariadb/ps_bugs.c b/unittest/libmariadb/ps_bugs.c index 306a87cd..264a5aff 100644 --- a/unittest/libmariadb/ps_bugs.c +++ b/unittest/libmariadb/ps_bugs.c @@ -918,7 +918,7 @@ static int test_bug1664(MYSQL *mysql) /* Now we are sending other long data. It should not be - concatened to previous. + concatenated to previous. */ data= (char *)"SomeOtherData"; @@ -3053,7 +3053,7 @@ static int test_bug8330(MYSQL *mysql) long lval[2]= {1,2}; stmt_text= "drop table if exists t1"; - /* in case some previos test failed */ + /* in case some previous test failed */ rc= mysql_real_query(mysql, SL(stmt_text)); check_mysql_rc(rc, mysql); stmt_text= "create table t1 (a int, b int)"; @@ -4908,7 +4908,7 @@ static int test_conc334(MYSQL *mysql) result= mysql_stmt_result_metadata(stmt); if (!result) { - diag("Coudn't retrieve result set"); + diag("Couldn't retrieve result set"); mysql_stmt_close(stmt); return FAIL; } diff --git a/unittest/libmariadb/view.c b/unittest/libmariadb/view.c index 9aeeecde..b80112c5 100644 --- a/unittest/libmariadb/view.c +++ b/unittest/libmariadb/view.c @@ -161,7 +161,7 @@ static int test_view_2where(MYSQL *mysql) MYSQL_STMT *stmt; int rc, i; MYSQL_BIND my_bind[8]; - char parms[8][100]; + char params[8][100]; ulong length[8]; const char *query= "select relid, report, handle, log_group, username, variant, type, " @@ -208,9 +208,9 @@ static int test_view_2where(MYSQL *mysql) check_mysql_rc(rc, mysql); memset(my_bind, '\0', sizeof(MYSQL_BIND)); for (i=0; i < 8; i++) { - strcpy(parms[i], "1"); + strcpy(params[i], "1"); my_bind[i].buffer_type = MYSQL_TYPE_VAR_STRING; - my_bind[i].buffer = (char *)&parms[i]; + my_bind[i].buffer = (char *)¶ms[i]; my_bind[i].buffer_length = 1; my_bind[i].is_null = 0; length[i] = 1; @@ -245,7 +245,7 @@ static int test_view_star(MYSQL *mysql) MYSQL_STMT *stmt; int rc, i; MYSQL_BIND my_bind[8]; - char parms[8][100]; + char params[8][100]; ulong length[8]; const char *query= "SELECT * FROM vt1 WHERE a IN (?,?)"; @@ -259,9 +259,9 @@ static int test_view_star(MYSQL *mysql) check_mysql_rc(rc, mysql); memset(my_bind, '\0', sizeof(MYSQL_BIND)); for (i= 0; i < 2; i++) { - sprintf((char *)&parms[i], "%d", i); + sprintf((char *)¶ms[i], "%d", i); my_bind[i].buffer_type = MYSQL_TYPE_VAR_STRING; - my_bind[i].buffer = (char *)&parms[i]; + my_bind[i].buffer = (char *)¶ms[i]; my_bind[i].buffer_length = 100; my_bind[i].is_null = 0; my_bind[i].length = &length[i];