1
0
mirror of https://github.com/mariadb-corporation/mariadb-connector-c.git synced 2025-08-07 02:42:49 +03:00

Fixes misc. typos

found via `codespell -q 3`
This commit is contained in:
luz.paz
2018-03-30 06:45:19 -04:00
committed by Georg Richter
parent 128d152f19
commit b2e6ed0295
36 changed files with 82 additions and 82 deletions

View File

@@ -25,7 +25,7 @@ static struct option long_options[]=
static char *values[] = static char *values[] =
{ {
"show information for all plugins", "show information for all plugins",
"show informaion for builtin plugins", "show information for builtin plugins",
"show information for dynamic plugins", "show information for dynamic plugins",
"show information for dynamic plugins in specified directory", "show information for dynamic plugins in specified directory",
"show information for specified plugin", "show information for specified plugin",

View File

@@ -8,7 +8,7 @@
# This file is included by CMakeLists.txt and # This file is included by CMakeLists.txt and
# checks for various functions. # checks for various functions.
# You will find the appropiate defines in # You will find the appropriate defines in
# include/my_config.h.in # include/my_config.h.in
INCLUDE(CheckFunctionExists) INCLUDE(CheckFunctionExists)

View File

@@ -7,7 +7,7 @@
# #
# This file is included by CMakeLists.txt and # This file is included by CMakeLists.txt and
# checks for various header files. # checks for various header files.
# You will find the appropiate defines in # You will find the appropriate defines in
# include/my_config.h.in # include/my_config.h.in
INCLUDE(CheckIncludeFiles) INCLUDE(CheckIncludeFiles)

View File

@@ -7,7 +7,7 @@
# #
# This file is included by CMakeLists.txt and # This file is included by CMakeLists.txt and
# checks for type sizes. # checks for type sizes.
# You will find the appropiate defines in # You will find the appropriate defines in
# include/my_config.h.in # include/my_config.h.in
INCLUDE (CheckTypeSize) INCLUDE (CheckTypeSize)

View File

@@ -70,7 +70,7 @@ int main(int argc, char *argv[])
(unsigned long) mysql_affected_rows(mysql)); (unsigned long) mysql_affected_rows(mysql));
mysql_free_result(result); mysql_free_result(result);
/* Affected rows with DELETE statment */ /* Affected rows with DELETE statement */
query= "DELETE FROM affected_rows"; query= "DELETE FROM affected_rows";
if (mysql_real_query(mysql, query, strlen(query))) if (mysql_real_query(mysql, query, strlen(query)))
show_error(mysql); show_error(mysql);

View File

@@ -366,7 +366,7 @@ typedef int (*qsort_cmp)(const void *,const void *);
#undef QSORT_TYPE_IS_VOID #undef QSORT_TYPE_IS_VOID
#define QSORT_TYPE_IS_VOID #define QSORT_TYPE_IS_VOID
#else #else
#define qsort_t RETQSORTTYPE /* Broken GCC cant handle typedef !!!! */ #define qsort_t RETQSORTTYPE /* Broken GCC can't handle typedef !!!! */
#endif #endif
#ifdef HAVE_SYS_SOCKET_H #ifdef HAVE_SYS_SOCKET_H
@@ -457,7 +457,7 @@ typedef SOCKET_SIZE_TYPE size_socket;
#define NO_MISAM /* Not needed anymore */ #define NO_MISAM /* Not needed anymore */
#define NO_HASH /* Not needed anymore */ #define NO_HASH /* Not needed anymore */
#ifdef _WIN32 #ifdef _WIN32
#define NO_DIR_LIBRARY /* Not standar dir-library */ #define NO_DIR_LIBRARY /* Not standard dir-library */
#define USE_MY_STAT_STRUCT /* For my_lib */ #define USE_MY_STAT_STRUCT /* For my_lib */
#ifdef _MSC_VER #ifdef _MSC_VER
typedef SSIZE_T ssize_t; typedef SSIZE_T ssize_t;
@@ -580,12 +580,12 @@ extern double my_atof(const char*);
/* /*
Max size that must be added to a so that we know Size to make Max size that must be added to a so that we know Size to make
adressable obj. addressable obj.
*/ */
typedef long my_ptrdiff_t; typedef long my_ptrdiff_t;
#define MY_ALIGN(A,L) (((A) + (L) - 1) & ~((L) - 1)) #define MY_ALIGN(A,L) (((A) + (L) - 1) & ~((L) - 1))
#define ALIGN_SIZE(A) MY_ALIGN((A),sizeof(double)) #define ALIGN_SIZE(A) MY_ALIGN((A),sizeof(double))
/* Size to make adressable obj. */ /* Size to make addressable obj. */
#define ALIGN_PTR(A, t) ((t*) MY_ALIGN((A),sizeof(t))) #define ALIGN_PTR(A, t) ((t*) MY_ALIGN((A),sizeof(t)))
/* Offset of filed f in structure t */ /* Offset of filed f in structure t */
#define OFFSET(t, f) ((size_t)(char *)&((t *)0)->f) #define OFFSET(t, f) ((size_t)(char *)&((t *)0)->f)
@@ -593,7 +593,7 @@ typedef long my_ptrdiff_t;
#define PTR_BYTE_DIFF(A,B) (my_ptrdiff_t) ((unsigned char*) (A) - (unsigned char*) (B)) #define PTR_BYTE_DIFF(A,B) (my_ptrdiff_t) ((unsigned char*) (A) - (unsigned char*) (B))
#define NullS (char *) 0 #define NullS (char *) 0
/* Nowdays we do not support MessyDos */ /* Nowadays we do not support MessyDos */
#ifndef NEAR #ifndef NEAR
#define NEAR /* Who needs segments ? */ #define NEAR /* Who needs segments ? */
#define FAR /* On a good machine */ #define FAR /* On a good machine */

View File

@@ -272,7 +272,7 @@ extern int my_pthread_cond_init(pthread_cond_t *mp,
#endif #endif
#if !defined(HAVE_SIGWAIT) && !defined(HAVE_mit_thread) && !defined(HAVE_rts_threads) && !defined(sigwait) && !defined(alpha_linux_port) && !defined(HAVE_NONPOSIX_SIGWAIT) && !defined(HAVE_DEC_3_2_THREADS) && !defined(_AIX) #if !defined(HAVE_SIGWAIT) && !defined(HAVE_mit_thread) && !defined(HAVE_rts_threads) && !defined(sigwait) && !defined(alpha_linux_port) && !defined(HAVE_NONPOSIX_SIGWAIT) && !defined(HAVE_DEC_3_2_THREADS) && !defined(_AIX)
int sigwait(sigset_t *setp, int *sigp); /* Use our implemention */ int sigwait(sigset_t *setp, int *sigp); /* Use our implementation */
#endif #endif
#if !defined(HAVE_SIGSET) && !defined(my_sigset) #if !defined(HAVE_SIGSET) && !defined(my_sigset)
#define my_sigset(A,B) do { struct sigaction s; sigset_t set; \ #define my_sigset(A,B) do { struct sigaction s; sigset_t set; \

View File

@@ -47,15 +47,15 @@ typedef struct my_aio_result {
/* General bitmaps for my_func's */ /* General bitmaps for my_func's */
#define MY_FFNF 1 /* Fatal if file not found */ #define MY_FFNF 1 /* Fatal if file not found */
#define MY_FNABP 2 /* Fatal if not all bytes read/writen */ #define MY_FNABP 2 /* Fatal if not all bytes read/written */
#define MY_NABP 4 /* Error if not all bytes read/writen */ #define MY_NABP 4 /* Error if not all bytes read/written */
#define MY_FAE 8 /* Fatal if any error */ #define MY_FAE 8 /* Fatal if any error */
#define MY_WME 16 /* Write message on error */ #define MY_WME 16 /* Write message on error */
#define MY_WAIT_IF_FULL 32 /* Wait and try again if disk full error */ #define MY_WAIT_IF_FULL 32 /* Wait and try again if disk full error */
#define MY_RAID 64 /* Support for RAID (not the "Johnson&Johnson"-s one ;) */ #define MY_RAID 64 /* Support for RAID (not the "Johnson&Johnson"-s one ;) */
#define MY_DONT_CHECK_FILESIZE 128 /* Option to init_io_cache() */ #define MY_DONT_CHECK_FILESIZE 128 /* Option to init_io_cache() */
#define MY_LINK_WARNING 32 /* my_redel() gives warning if links */ #define MY_LINK_WARNING 32 /* my_redel() gives warning if links */
#define MY_COPYTIME 64 /* my_redel() copys time */ #define MY_COPYTIME 64 /* my_redel() copies time */
#define MY_DELETE_OLD 256 /* my_create_with_symlink() */ #define MY_DELETE_OLD 256 /* my_create_with_symlink() */
#define MY_RESOLVE_LINK 128 /* my_realpath(); Only resolve links */ #define MY_RESOLVE_LINK 128 /* my_realpath(); Only resolve links */
#define MY_HOLD_ORIGINAL_MODES 128 /* my_copy() holds to file modes */ #define MY_HOLD_ORIGINAL_MODES 128 /* my_copy() holds to file modes */
@@ -79,8 +79,8 @@ typedef struct my_aio_result {
#define ME_HOLDTANG 8 /* Don't delete last keys */ #define ME_HOLDTANG 8 /* Don't delete last keys */
#define ME_WAITTOT 16 /* Wait for errtime secs of for a action */ #define ME_WAITTOT 16 /* Wait for errtime secs of for a action */
#define ME_WAITTANG 32 /* Wait for a user action */ #define ME_WAITTANG 32 /* Wait for a user action */
#define ME_NOREFRESH 64 /* Dont refresh screen */ #define ME_NOREFRESH 64 /* Don't refresh screen */
#define ME_NOINPUT 128 /* Dont use the input libary */ #define ME_NOINPUT 128 /* Don't use the input library */
#define ME_COLOUR1 ((1 << ME_HIGHBYTE)) /* Possibly error-colours */ #define ME_COLOUR1 ((1 << ME_HIGHBYTE)) /* Possibly error-colours */
#define ME_COLOUR2 ((2 << ME_HIGHBYTE)) #define ME_COLOUR2 ((2 << ME_HIGHBYTE))
#define ME_COLOUR3 ((3 << ME_HIGHBYTE)) #define ME_COLOUR3 ((3 << ME_HIGHBYTE))
@@ -195,7 +195,7 @@ extern void (*my_sigtstp_cleanup)(void),
/* Executed before jump to shell */ /* Executed before jump to shell */
(*my_sigtstp_restart)(void), (*my_sigtstp_restart)(void),
(*my_abort_hook)(int); (*my_abort_hook)(int);
/* Executed when comming from shell */ /* Executed when coming from shell */
extern int NEAR ma_umask, /* Default creation mask */ extern int NEAR ma_umask, /* Default creation mask */
NEAR ma_umask_dir, NEAR ma_umask_dir,
NEAR my_recived_signals, /* Signals we have got */ NEAR my_recived_signals, /* Signals we have got */
@@ -233,7 +233,7 @@ enum cache_type {READ_CACHE,WRITE_CACHE,READ_FIFO,READ_NET,WRITE_NET};
enum flush_type { FLUSH_KEEP, FLUSH_RELEASE, FLUSH_IGNORE_CHANGED, enum flush_type { FLUSH_KEEP, FLUSH_RELEASE, FLUSH_IGNORE_CHANGED,
FLUSH_FORCE_WRITE}; FLUSH_FORCE_WRITE};
typedef struct st_record_cache /* Used when cacheing records */ typedef struct st_record_cache /* Used when caching records */
{ {
File file; File file;
int rc_seek,error,inited; int rc_seek,error,inited;
@@ -274,7 +274,7 @@ typedef struct st_dynamic_string {
} DYNAMIC_STRING; } DYNAMIC_STRING;
typedef struct st_io_cache /* Used when cacheing files */ typedef struct st_io_cache /* Used when caching files */
{ {
my_off_t pos_in_file,end_of_file; my_off_t pos_in_file,end_of_file;
unsigned char *rc_pos,*rc_end,*buffer,*rc_request_pos; unsigned char *rc_pos,*rc_end,*buffer,*rc_request_pos;
@@ -319,7 +319,7 @@ typedef int (*qsort2_cmp)(const void *, const void *, const void *);
((info)->rc_pos+=(Count)),0) :\ ((info)->rc_pos+=(Count)),0) :\
_my_b_write(info,Buffer,Count)) _my_b_write(info,Buffer,Count))
/* my_b_write_byte dosn't have any err-check */ /* my_b_write_byte doesn't have any err-check */
#define my_b_write_byte(info,chr) \ #define my_b_write_byte(info,chr) \
(((info)->rc_pos < (info)->rc_end) ?\ (((info)->rc_pos < (info)->rc_end) ?\
((*(info)->rc_pos++)=(chr)) :\ ((*(info)->rc_pos++)=(chr)) :\

View File

@@ -36,7 +36,7 @@ typedef struct st_ma_pvio_tls {
errmsg_len length of error message buffer errmsg_len length of error message buffer
Returns: Returns:
0 success 0 success
1 if an error occured 1 if an error occurred
Notes: Notes:
On success the global variable ma_tls_initialized will be set to 1 On success the global variable ma_tls_initialized will be set to 1
*/ */
@@ -77,7 +77,7 @@ my_bool ma_tls_connect(MARIADB_TLS *ctls);
length buffer length length buffer length
Returns: Returns:
0-n bytes read 0-n bytes read
-1 if an error occured -1 if an error occurred
*/ */
ssize_t ma_tls_read(MARIADB_TLS *ctls, const uchar* buffer, size_t length); ssize_t ma_tls_read(MARIADB_TLS *ctls, const uchar* buffer, size_t length);
@@ -89,7 +89,7 @@ ssize_t ma_tls_read(MARIADB_TLS *ctls, const uchar* buffer, size_t length);
length buffer length length buffer length
Returns: Returns:
0-n bytes written 0-n bytes written
-1 if an error occured -1 if an error occurred
*/ */
ssize_t ma_tls_write(MARIADB_TLS *ctls, const uchar* buffer, size_t length); ssize_t ma_tls_write(MARIADB_TLS *ctls, const uchar* buffer, size_t length);

View File

@@ -247,7 +247,7 @@ enum enum_server_command
struct st_ma_pvio; struct st_ma_pvio;
typedef struct st_ma_pvio MARIADB_PVIO; typedef struct st_ma_pvio MARIADB_PVIO;
#define MAX_CHAR_WIDTH 255 /* Max length for a CHAR colum */ #define MAX_CHAR_WIDTH 255 /* Max length for a CHAR column */
#define MAX_BLOB_WIDTH 8192 /* Default width for blob */ #define MAX_BLOB_WIDTH 8192 /* Default width for blob */
/* the following defines were added for PHP's mysqli and pdo extensions: /* the following defines were added for PHP's mysqli and pdo extensions:
@@ -345,8 +345,8 @@ enum enum_field_types { MYSQL_TYPE_DECIMAL, MYSQL_TYPE_TINY,
MYSQL_TYPE_GEOMETRY=255, MYSQL_TYPE_GEOMETRY=255,
MAX_NO_FIELD_TYPES }; MAX_NO_FIELD_TYPES };
#define FIELD_TYPE_CHAR FIELD_TYPE_TINY /* For compability */ #define FIELD_TYPE_CHAR FIELD_TYPE_TINY /* For compatibility */
#define FIELD_TYPE_INTERVAL FIELD_TYPE_ENUM /* For compability */ #define FIELD_TYPE_INTERVAL FIELD_TYPE_ENUM /* For compatibility */
#define FIELD_TYPE_DECIMAL MYSQL_TYPE_DECIMAL #define FIELD_TYPE_DECIMAL MYSQL_TYPE_DECIMAL
#define FIELD_TYPE_NEWDECIMAL MYSQL_TYPE_NEWDECIMAL #define FIELD_TYPE_NEWDECIMAL MYSQL_TYPE_NEWDECIMAL
#define FIELD_TYPE_TINY MYSQL_TYPE_TINY #define FIELD_TYPE_TINY MYSQL_TYPE_TINY

View File

@@ -16,7 +16,7 @@
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02111-1301, USA */ MA 02111-1301, USA */
/* Handling of arrays that can grow dynamicly. */ /* Handling of arrays that can grow dynamically. */
#undef SAFEMALLOC /* Problems with threads */ #undef SAFEMALLOC /* Problems with threads */
@@ -59,7 +59,7 @@ my_bool ma_insert_dynamic(DYNAMIC_ARRAY *array, void *element)
{ {
void *buffer; void *buffer;
if (array->elements == array->max_element) if (array->elements == array->max_element)
{ /* Call only when nessesary */ { /* Call only when necessary */
if (!(buffer=ma_alloc_dynamic(array))) if (!(buffer=ma_alloc_dynamic(array)))
return TRUE; return TRUE;
} }

View File

@@ -261,7 +261,7 @@ static void load_env_plugins(MYSQL *mysql)
This function must be called before any other client plugin function. This function must be called before any other client plugin function.
@retval 0 successful @retval 0 successful
@retval != 0 error occured @retval != 0 error occurred
*/ */
int mysql_client_plugin_init() int mysql_client_plugin_init()

View File

@@ -271,7 +271,7 @@ size_t ma_gcvt(double x, my_gcvt_arg_type type, int width, char *to,
Assume that we don't have enough space to place all significant digits in Assume that we don't have enough space to place all significant digits in
the 'f' format. We have to choose between the 'e' format and the 'f' one the 'f' format. We have to choose between the 'e' format and the 'f' one
to keep as many significant digits as possible. to keep as many significant digits as possible.
Let E and F be the lengths of decimal representaion in the 'e' and 'f' Let E and F be the lengths of decimal representation in the 'e' and 'f'
formats, respectively. We want to use the 'f' format if, and only if F <= E. formats, respectively. We want to use the 'f' format if, and only if F <= E.
Consider the following cases: Consider the following cases:
1. decpt <= 0. 1. decpt <= 0.

View File

@@ -117,7 +117,7 @@ const char *client_errors[]=
/* 2032 */ "Data truncated", /* 2032 */ "Data truncated",
/* 2033 */ "", /* 2033 */ "",
/* 2034 */ "Invalid parameter number", /* 2034 */ "Invalid parameter number",
/* 2035 */ "Invalid buffer type: %d (paraneter: %d)", /* 2035 */ "Invalid buffer type: %d (parameter: %d)",
/* 2036 */ "Buffer type is not supported", /* 2036 */ "Buffer type is not supported",
/* 2037 */ "Shared memory: %-.64s", /* 2037 */ "Shared memory: %-.64s",
/* 2038 */ "Shared memory connection failed during %s. (%lu)", /* 2038 */ "Shared memory connection failed during %s. (%lu)",

View File

@@ -21,7 +21,7 @@
is freely available from http://www.php.net is freely available from http://www.php.net
*************************************************************************************/ *************************************************************************************/
/* The hash functions used for saveing keys */ /* The hash functions used for saving keys */
/* One of key_length or key_length_offset must be given */ /* One of key_length or key_length_offset must be given */
/* Key length of 0 isn't allowed */ /* Key length of 0 isn't allowed */
@@ -131,7 +131,7 @@ static uint calc_hashnr(const uchar *key,uint length)
return((uint) nr); return((uint) nr);
} }
/* Calc hashvalue for a key, case indepenently */ /* Calc hashvalue for a key, case independently */
static uint calc_hashnr_caseup(const uchar *key,uint length) static uint calc_hashnr_caseup(const uchar *key,uint length)
{ {
@@ -505,7 +505,7 @@ exit:
/* /*
Update keys when record has changed. Update keys when record has changed.
This is much more efficent than using a delete & insert. This is much more efficient than using a delete & insert.
*/ */
my_bool hash_update(HASH *hash,uchar *record,uchar *old_key,uint old_key_length) my_bool hash_update(HASH *hash,uchar *record,uchar *old_key,uint old_key_length)

View File

@@ -242,7 +242,7 @@ my_bool mysql_handle_local_infile(MYSQL *conn, const char *filename)
goto infile_error; goto infile_error;
} }
/* error during read occured */ /* error during read occurred */
if (bufread < 0) if (bufread < 0)
{ {
char tmp_buf[MYSQL_ERRMSG_SIZE]; char tmp_buf[MYSQL_ERRMSG_SIZE];

View File

@@ -17,7 +17,7 @@
/* Write and read of logical packets to/from socket /* Write and read of logical packets to/from socket
** Writes are cached into net_buffer_length big packets. ** Writes are cached into net_buffer_length big packets.
** Read packets are reallocated dynamicly when reading big packets. ** Read packets are reallocated dynamically when reading big packets.
** Each logical packet has the following pre-info: ** Each logical packet has the following pre-info:
** 3 byte length & 1 byte package-number. ** 3 byte length & 1 byte package-number.
*/ */

View File

@@ -69,7 +69,7 @@ void ma_hash_password(ulong *result, const char *password, size_t len)
for (; password < password_end; password++) for (; password < password_end; password++)
{ {
if (*password == ' ' || *password == '\t') if (*password == ' ' || *password == '\t')
continue; /* skipp space in password */ continue; /* skip space in password */
tmp= (ulong) (uchar) *password; tmp= (ulong) (uchar) *password;
nr^= (((nr & 63)+add)*tmp)+ (nr << 8); nr^= (((nr & 63)+add)*tmp)+ (nr << 8);
nr2+=(nr2 << 8) ^ nr; nr2+=(nr2 << 8) ^ nr;

View File

@@ -23,7 +23,7 @@
component of the client library. component of the client library.
PVIO support various protcols like sockets, pipes and shared memory, which are PVIO support various protcols like sockets, pipes and shared memory, which are
implemented as plugins and can be extended therfore easily. implemented as plugins and can be extended therefore easily.
Interface function description: Interface function description:
@@ -114,7 +114,7 @@ MARIADB_PVIO *ma_pvio_init(MA_PVIO_CINFO *cinfo)
pvio->set_error= my_set_error; pvio->set_error= my_set_error;
pvio->type= cinfo->type; pvio->type= cinfo->type;
/* set timeout to connect timeout - after successfull connect we will set /* set timeout to connect timeout - after successful connect we will set
* correct values for read and write */ * correct values for read and write */
if (pvio->methods->set_timeout) if (pvio->methods->set_timeout)
{ {

View File

@@ -17,7 +17,7 @@
MA 02111-1301, USA */ MA 02111-1301, USA */
/* /*
Code for handling strings with can grow dynamicly. Code for handling strings which can grow dynamically.
Copyright Monty Program KB. Copyright Monty Program KB.
By monty. By monty.
*/ */

View File

@@ -1185,7 +1185,7 @@ dynamic_column_decimal_store(DYNAMIC_COLUMN *str,
/** /**
Prepare the value to be used as decimal. Prepare the value to be used as decimal.
@param value The value structure which sould be setup. @param value The value structure which should be setup.
*/ */
void mariadb_dyncol_prepare_decimal(DYNAMIC_COLUMN_VALUE *value) void mariadb_dyncol_prepare_decimal(DYNAMIC_COLUMN_VALUE *value)
@@ -2093,7 +2093,7 @@ static uchar *find_entry_named(DYN_HEADER *hdr, LEX_STRING *key)
/** /**
Write number in the buffer (backward direction - starts from the buffer end) Write number in the buffer (backward direction - starts from the buffer end)
@return pointer on the number begining @return pointer on the number beginning
*/ */
static char *backwritenum(char *chr, uint numkey) static char *backwritenum(char *chr, uint numkey)
@@ -2163,7 +2163,7 @@ find_column(DYN_HEADER *hdr, uint numkey, LEX_STRING *strkey)
hdr->length= hdr_interval_length(hdr, hdr->entry + hdr->entry_size); hdr->length= hdr_interval_length(hdr, hdr->entry + hdr->entry_size);
hdr->data= hdr->dtpool + hdr->offset; hdr->data= hdr->dtpool + hdr->offset;
/* /*
Check that the found data is withing the ranges. This can happen if Check that the found data is within the ranges. This can happen if
we get data with wrong offsets. we get data with wrong offsets.
*/ */
if (hdr->length == DYNCOL_OFFSET_ERROR || if (hdr->length == DYNCOL_OFFSET_ERROR ||
@@ -3502,7 +3502,7 @@ dynamic_column_update_many_fmt(DYNAMIC_COLUMN *str,
if (plan[i].val->type == DYN_COL_NULL) if (plan[i].val->type == DYN_COL_NULL)
{ {
plan[i].act= PLAN_NOP; /* Mark entry to be skiped */ plan[i].act= PLAN_NOP; /* Mark entry to be skipped */
} }
else else
{ {
@@ -4144,7 +4144,7 @@ mariadb_dyncol_json_internal(DYNAMIC_COLUMN *str, DYNAMIC_STRING *json,
hdr_interval_length(&header, header.entry + header.entry_size); hdr_interval_length(&header, header.entry + header.entry_size);
header.data= header.dtpool + header.offset; header.data= header.dtpool + header.offset;
/* /*
Check that the found data is withing the ranges. This can happen if Check that the found data is within the ranges. This can happen if
we get data with wrong offsets. we get data with wrong offsets.
*/ */
if (header.length == DYNCOL_OFFSET_ERROR || if (header.length == DYNCOL_OFFSET_ERROR ||
@@ -4283,7 +4283,7 @@ mariadb_dyncol_unpack(DYNAMIC_COLUMN *str,
hdr_interval_length(&header, header.entry + header.entry_size); hdr_interval_length(&header, header.entry + header.entry_size);
header.data= header.dtpool + header.offset; header.data= header.dtpool + header.offset;
/* /*
Check that the found data is withing the ranges. This can happen if Check that the found data is within the ranges. This can happen if
we get data with wrong offsets. we get data with wrong offsets.
*/ */
if (header.length == DYNCOL_OFFSET_ERROR || if (header.length == DYNCOL_OFFSET_ERROR ||

View File

@@ -727,7 +727,7 @@ unsigned char* mysql_stmt_execute_generate_simple_request(MYSQL_STMT *stmt, size
} }
for (i = 0; i < stmt->param_count; i++) for (i = 0; i < stmt->param_count; i++)
{ {
/* this differs from mysqlnd, c api supports unsinged !! */ /* this differs from mysqlnd, c api supports unsigned !! */
uint buffer_type= stmt->params[i].buffer_type | (stmt->params[i].is_unsigned ? 32768 : 0); uint buffer_type= stmt->params[i].buffer_type | (stmt->params[i].is_unsigned ? 32768 : 0);
/* check if parameter requires indicator variable */ /* check if parameter requires indicator variable */
int2store(p, buffer_type); int2store(p, buffer_type);
@@ -912,7 +912,7 @@ unsigned char* mysql_stmt_execute_generate_bulk_request(MYSQL_STMT *stmt, size_t
} }
for (i = 0; i < stmt->param_count; i++) for (i = 0; i < stmt->param_count; i++)
{ {
/* this differs from mysqlnd, c api supports unsinged !! */ /* this differs from mysqlnd, c api supports unsigned !! */
uint buffer_type= stmt->params[i].buffer_type | (stmt->params[i].is_unsigned ? 32768 : 0); uint buffer_type= stmt->params[i].buffer_type | (stmt->params[i].is_unsigned ? 32768 : 0);
int2store(p, buffer_type); int2store(p, buffer_type);
p+= 2; p+= 2;
@@ -1504,7 +1504,7 @@ my_bool mthd_stmt_read_prepare_response(MYSQL_STMT *stmt)
p= (uchar *)stmt->mysql->net.read_pos; p= (uchar *)stmt->mysql->net.read_pos;
if (0xFF == p[0]) /* Error occured */ if (0xFF == p[0]) /* Error occurred */
{ {
return(1); return(1);
} }
@@ -1581,7 +1581,7 @@ int STDCALL mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query, unsigned lon
is_multi= (mysql->net.extension->multi_status > COM_MULTI_OFF); is_multi= (mysql->net.extension->multi_status > COM_MULTI_OFF);
/* We need to semi-close the prepared statement: /* We need to semi-close the prepared statement:
reset stmt and free all buffers and close the statement reset stmt and free all buffers and close the statement
on server side. Statment handle will get a new stmt_id */ on server side. Statement handle will get a new stmt_id */
if (!is_multi) if (!is_multi)
ma_multi_command(mysql, COM_MULTI_ENABLED); ma_multi_command(mysql, COM_MULTI_ENABLED);
@@ -1805,11 +1805,11 @@ int stmt_read_execute_response(MYSQL_STMT *stmt)
ret= test((mysql->methods->db_read_stmt_result && ret= test((mysql->methods->db_read_stmt_result &&
mysql->methods->db_read_stmt_result(mysql))); mysql->methods->db_read_stmt_result(mysql)));
/* if a reconnect occured, our connection handle is invalid */ /* if a reconnect occurred, our connection handle is invalid */
if (!stmt->mysql) if (!stmt->mysql)
return(1); return(1);
/* update affected rows, also if an error occured */ /* update affected rows, also if an error occurred */
stmt->upsert_status.affected_rows= stmt->mysql->affected_rows; stmt->upsert_status.affected_rows= stmt->mysql->affected_rows;
if (ret) if (ret)
@@ -2354,7 +2354,7 @@ int STDCALL mariadb_stmt_execute_direct(MYSQL_STMT *stmt,
{ {
/* We need to semi-close the prepared statement: /* We need to semi-close the prepared statement:
reset stmt and free all buffers and close the statement reset stmt and free all buffers and close the statement
on server side. Statment handle will get a new stmt_id */ on server side. Statement handle will get a new stmt_id */
char stmt_id[STMT_ID_LENGTH]; char stmt_id[STMT_ID_LENGTH];
if (mysql_stmt_internal_reset(stmt, 1)) if (mysql_stmt_internal_reset(stmt, 1))

View File

@@ -1318,7 +1318,7 @@ my_bool ma_tls_close(MARIADB_TLS *ctls)
gnutls_certificate_credentials_t ctx; gnutls_certificate_credentials_t ctx;
struct st_gnutls_data *data= struct st_gnutls_data *data=
(struct st_gnutls_data *)gnutls_session_get_ptr(ctls->ssl); (struct st_gnutls_data *)gnutls_session_get_ptr(ctls->ssl);
/* this would be the correct way, however can't dectect afterwards /* this would be the correct way, however can't detect afterwards
if the socket is closed or not, so we don't send encrypted if the socket is closed or not, so we don't send encrypted
finish alert. finish alert.
rc= gnutls_bye((gnutls_session_t )ctls->ssl, GNUTLS_SHUT_WR); rc= gnutls_bye((gnutls_session_t )ctls->ssl, GNUTLS_SHUT_WR);

View File

@@ -52,13 +52,13 @@ void ma_schannel_set_sec_error(MARIADB_PVIO *pvio, DWORD ErrorNo)
pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, "SSL connection error: Invalid message sequence"); pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, "SSL connection error: Invalid message sequence");
break; break;
case SEC_E_DECRYPT_FAILURE: case SEC_E_DECRYPT_FAILURE:
pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, "SSL connection error: An error occured during decrypting data"); pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, "SSL connection error: An error occurred during decrypting data");
break; break;
case SEC_I_INCOMPLETE_CREDENTIALS: case SEC_I_INCOMPLETE_CREDENTIALS:
pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, "SSL connection error: Incomplete credentials"); pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, "SSL connection error: Incomplete credentials");
break; break;
case SEC_E_ENCRYPT_FAILURE: case SEC_E_ENCRYPT_FAILURE:
pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, "SSL connection error: An error occured during encrypting data"); pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, "SSL connection error: An error occurred during encrypting data");
break; break;
case SEC_I_CONTEXT_EXPIRED: case SEC_I_CONTEXT_EXPIRED:
pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, "SSL connection error: Context expired "); pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, "SSL connection error: Context expired ");
@@ -95,7 +95,7 @@ void ma_schannel_set_win_error(MARIADB_PVIO *pvio)
pvio->set_error(pvio->mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, "Unknown SSL error"); pvio->set_error(pvio->mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, "Unknown SSL error");
return; return;
} }
/* todo: obtain error messge */ /* todo: obtain error message */
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
NULL, ssl_errno, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), NULL, ssl_errno, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPTSTR) &ssl_error_reason, 0, NULL ); (LPTSTR) &ssl_error_reason, 0, NULL );
@@ -288,7 +288,7 @@ end:
/* {{{ my_bool ma_schannel_load_private_key(MARIADB_PVIO *pvio, CERT_CONTEXT *ctx, char *key_file) */ /* {{{ my_bool ma_schannel_load_private_key(MARIADB_PVIO *pvio, CERT_CONTEXT *ctx, char *key_file) */
/* /*
Load privte key into context Load private key into context
SYNOPSIS SYNOPSIS
ma_schannel_load_private_key() ma_schannel_load_private_key()
@@ -661,7 +661,7 @@ SECURITY_STATUS ma_schannel_client_handshake(MARIADB_TLS *ctls)
sRet= ma_schannel_handshake_loop(pvio, TRUE, &ExtraData); sRet= ma_schannel_handshake_loop(pvio, TRUE, &ExtraData);
/* allocate IO-Buffer for write operations: After handshake /* allocate IO-Buffer for write operations: After handshake
was successfull, we are able now to calculate payload */ was successful, we are able now to calculate payload */
if ((sRet = QueryContextAttributes(&sctx->ctxt, SECPKG_ATTR_STREAM_SIZES, &sctx->Sizes ))) if ((sRet = QueryContextAttributes(&sctx->ctxt, SECPKG_ATTR_STREAM_SIZES, &sctx->Sizes )))
goto end; goto end;
@@ -701,7 +701,7 @@ end:
RETURN RETURN
SEC_E_OK on success SEC_E_OK on success
SEC_E_* if an error occured SEC_E_* if an error occurred
*/ */
SECURITY_STATUS ma_schannel_read_decrypt(MARIADB_PVIO *pvio, SECURITY_STATUS ma_schannel_read_decrypt(MARIADB_PVIO *pvio,
@@ -913,7 +913,7 @@ end:
RETURN RETURN
SEC_E_OK on success SEC_E_OK on success
SEC_E_* if an error occured SEC_E_* if an error occurred
*/ */
ssize_t ma_schannel_write_encrypt(MARIADB_PVIO *pvio, ssize_t ma_schannel_write_encrypt(MARIADB_PVIO *pvio,
uchar *WriteBuffer, uchar *WriteBuffer,

View File

@@ -2,7 +2,7 @@
# pkg_config.pc.in # pkg_config.pc.in
# #
# pkg_config configuration file # pkg_config configuration file
# For a detailled description of options, please visit # For a detailed description of options, please visit
# Dan Nicholsons Guide to pkg-config (http://www.freedesktop.org/wiki/Software/pkg-config/) # Dan Nicholsons Guide to pkg-config (http://www.freedesktop.org/wiki/Software/pkg-config/)
# #

View File

@@ -40,7 +40,7 @@
RETURN RETURN
CR_OK CR_OK
CR_ERROR if an error occured CR_ERROR if an error occurred
*/ */
static int clear_password_auth_client(MYSQL_PLUGIN_VIO *vio, MYSQL *mysql) static int clear_password_auth_client(MYSQL_PLUGIN_VIO *vio, MYSQL *mysql)
{ {

View File

@@ -383,7 +383,7 @@ static int client_mpvio_read_packet(struct st_plugin_vio *mpv, uchar **buf)
to send data to the server. to send data to the server.
It transparently wraps the data into a change user or authentication It transparently wraps the data into a change user or authentication
handshake packet, if neccessary. handshake packet, if necessary.
*/ */
static int client_mpvio_write_packet(struct st_plugin_vio *mpv, static int client_mpvio_write_packet(struct st_plugin_vio *mpv,

View File

@@ -278,7 +278,7 @@ int aurora_get_instance_type(MYSQL *mysql)
* *
* Returns: * Returns:
* 1 on success * 1 on success
* 0 if an error occured or primary_id couldn't be * 0 if an error occurred or primary_id couldn't be
* found * found
*/ */
my_bool aurora_get_primary_id(MYSQL *mysql, AURORA *aurora) my_bool aurora_get_primary_id(MYSQL *mysql, AURORA *aurora)

View File

@@ -183,7 +183,7 @@ static int fill_buffer(MA_FILE *file, size_t want)
MA_REMOTE_FILE *rf= (MA_REMOTE_FILE *)file->ptr; MA_REMOTE_FILE *rf= (MA_REMOTE_FILE *)file->ptr;
/* only attempt to fill buffer if transactions still running and buffer /* only attempt to fill buffer if transactions still running and buffer
doesnt exceed required size already */ doesn't exceed required size already */
if (!rf->in_progress || (rf->offset > want)) if (!rf->in_progress || (rf->offset > want))
return 0; return 0;
@@ -273,7 +273,7 @@ static int use_buffer(MA_FILE *file,int want)
MA_FILE *ma_rio_open(const char *url,const char *operation) MA_FILE *ma_rio_open(const char *url,const char *operation)
{ {
/* this code could check for URLs or types in the 'url' and /* this code could check for URLs or types in the 'url' and
basicly use the real fopen() for standard files */ basically use the real fopen() for standard files */
MA_FILE *file; MA_FILE *file;
MA_REMOTE_FILE *rf; MA_REMOTE_FILE *rf;
@@ -374,7 +374,7 @@ size_t ma_rio_read(void *ptr, size_t size, size_t nmemb, MA_FILE *file)
fill_buffer(file,want); fill_buffer(file,want);
/* check if theres data in the buffer - if not fill_buffer() /* check if there's data in the buffer - if not fill_buffer()
* either errored or EOF */ * either errored or EOF */
if(!rf->offset) if(!rf->offset)
return 0; return 0;
@@ -411,7 +411,7 @@ char *ma_rio_gets(char *ptr, size_t size, MA_FILE *file)
MA_REMOTE_FILE *rf= (MA_REMOTE_FILE *)file->ptr; MA_REMOTE_FILE *rf= (MA_REMOTE_FILE *)file->ptr;
fill_buffer(file,want); fill_buffer(file,want);
/* check if theres data in the buffer - if not fill either errored or /* check if there's data in the buffer - if not fill either errored or
* EOF */ * EOF */
if(!rf->offset) if(!rf->offset)
return NULL; return NULL;
@@ -431,7 +431,7 @@ char *ma_rio_gets(char *ptr, size_t size, MA_FILE *file)
/* xfer data to caller */ /* xfer data to caller */
memcpy(ptr, rf->buffer, want); memcpy(ptr, rf->buffer, want);
ptr[want]=0;/* allways null terminate */ ptr[want]=0;/* always null terminate */
use_buffer(file,want); use_buffer(file,want);

View File

@@ -374,7 +374,7 @@ my_bool pvio_npipe_is_alive(MARIADB_PVIO *pvio)
if (!pvio || !pvio->data) if (!pvio || !pvio->data)
return FALSE; return FALSE;
handle= ((struct st_pvio_npipe *)pvio->data)->pipe; handle= ((struct st_pvio_npipe *)pvio->data)->pipe;
/* Copy data fron named pipe without removing it */ /* Copy data from named pipe without removing it */
if (PeekNamedPipe(handle, NULL, 0, NULL, NULL, NULL)) if (PeekNamedPipe(handle, NULL, 0, NULL, NULL, NULL))
return TRUE; return TRUE;
return test(GetLastError() != ERROR_BROKEN_PIPE); return test(GetLastError() != ERROR_BROKEN_PIPE);

View File

@@ -7,7 +7,7 @@
Free Software Foundation, Inc. Free Software Foundation, Inc.
Changes by monty: Changes by monty:
- Added include of string.h when nessessary. - Added include of string.h when necessary.
- Removed two warnings from gcc. - Removed two warnings from gcc.
This file is part of the GNU C Library. Its master source is NOT part of This file is part of the GNU C Library. Its master source is NOT part of

View File

@@ -7,7 +7,7 @@
Free Software Foundation, Inc. Free Software Foundation, Inc.
Changes by monty: Changes by monty:
- Added include of string.h when nessessary. - Added include of string.h when necessary.
- Removed two warnings from gcc. - Removed two warnings from gcc.
This file is part of the GNU C Library. Its master source is NOT part of This file is part of the GNU C Library. Its master source is NOT part of

View File

@@ -4018,7 +4018,7 @@ static int test_rewind(MYSQL *mysql)
rc= mysql_stmt_bind_result(stmt, &my_bind); rc= mysql_stmt_bind_result(stmt, &my_bind);
check_stmt_rc(rc, stmt); check_stmt_rc(rc, stmt);
/* retreive all result sets till we are at the end */ /* retrieve all result sets till we are at the end */
while(!(rc=mysql_stmt_fetch(stmt))); while(!(rc=mysql_stmt_fetch(stmt)));
FAIL_UNLESS(rc == MYSQL_NO_DATA, "rc != MYSQL_NO_DATA"); FAIL_UNLESS(rc == MYSQL_NO_DATA, "rc != MYSQL_NO_DATA");

View File

@@ -720,7 +720,7 @@ static int test_bug15518(MYSQL *mysql)
/* /*
Use the same stmt and reprepare with another query that Use the same stmt and reprepare with another query that
suceeds succeeds
*/ */
rc= mysql_stmt_prepare(stmt, "SHOW STATUS", 12); rc= mysql_stmt_prepare(stmt, "SHOW STATUS", 12);
FAIL_UNLESS(!rc || mysql_stmt_errno(stmt) || mysql_errno(mysql), "Error expected"); FAIL_UNLESS(!rc || mysql_stmt_errno(stmt) || mysql_errno(mysql), "Error expected");
@@ -740,7 +740,7 @@ static int test_bug15518(MYSQL *mysql)
/* /*
Use the same stmt and reprepare with another query that Use the same stmt and reprepare with another query that
suceeds. The prepare should fail with error 2013 since succeeds. The prepare should fail with error 2013 since
connection to server has been closed. connection to server has been closed.
*/ */
rc= mysql_stmt_prepare(stmt, "SHOW STATUS", 12); rc= mysql_stmt_prepare(stmt, "SHOW STATUS", 12);
@@ -2658,7 +2658,7 @@ static int test_bug5194(MYSQL *mysql)
MAX_PARAM_COUNT * CHARS_PER_PARAM + 1); MAX_PARAM_COUNT * CHARS_PER_PARAM + 1);
param_str= (char*) malloc(COLUMN_COUNT * CHARS_PER_PARAM); param_str= (char*) malloc(COLUMN_COUNT * CHARS_PER_PARAM);
FAIL_IF(my_bind == 0 || query == 0 || param_str == 0, "Not enought memory") FAIL_IF(my_bind == 0 || query == 0 || param_str == 0, "Not enough memory")
stmt= mysql_stmt_init(mysql); stmt= mysql_stmt_init(mysql);
@@ -2976,7 +2976,7 @@ static int test_bug6096(MYSQL *mysql)
check_mysql_rc(rc, mysql); check_mysql_rc(rc, mysql);
query_result= mysql_store_result(mysql); query_result= mysql_store_result(mysql);
query_field_list= mysql_fetch_fields(query_result); query_field_list= mysql_fetch_fields(query_result);
FAIL_IF(!query_field_list, "fetch_fields faild"); FAIL_IF(!query_field_list, "fetch_fields failed");
query_field_count= mysql_num_fields(query_result); query_field_count= mysql_num_fields(query_result);
stmt= mysql_stmt_init(mysql); stmt= mysql_stmt_init(mysql);

View File

@@ -485,9 +485,9 @@ int exit_status() {
At the end, a complete test report should be written, with some At the end, a complete test report should be written, with some
statistics. If the test returns EXIT_SUCCESS, all tests were statistics. If the test returns EXIT_SUCCESS, all tests were
successfull, otherwise at least one test failed. successful, otherwise at least one test failed.
To get a TAP complient output and exit status, report the exit To get a TAP compliant output and exit status, report the exit
status in the following manner: status in the following manner:
@code @code
@@ -525,7 +525,7 @@ int exit_status() {
@subsection JustToBeSafeTest Writing unnecessarily large tests @subsection JustToBeSafeTest Writing unnecessarily large tests
Don't write tests that use parameters in the range 1-1024 unless Don't write tests that use parameters in the range 1-1024 unless
you have a very good reason to belive that the component will you have a very good reason to believe that the component will
succeed for 562 but fail for 564 (the numbers picked are just succeed for 562 but fail for 564 (the numbers picked are just
examples). examples).

View File

@@ -251,7 +251,7 @@ ary facilities. This must be distributed under the terms of the Sections above.
rm of the same work. rm of the same work.
\par \par
\par \hich\af31506\dbch\af31505\loch\f31506 \par \hich\af31506\dbch\af31505\loch\f31506
8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and wil 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will
\hich\af31506\dbch\af31505\loch\f31506 \hich\af31506\dbch\af31505\loch\f31506
l automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. l automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
\par \par