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

Typo fixes (from PR #200)

This commit is contained in:
Georg Richter
2022-06-27 13:23:35 +02:00
parent 271ae9c707
commit 3f7719c74d
17 changed files with 49 additions and 42 deletions

View File

@@ -1,5 +1,5 @@
/************************************************************************************
Copyright (C) 2022 MariaDB Corpoeation AB
Copyright (C) 2022 MariaDB Corporation AB
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public

View File

@@ -1,5 +1,6 @@
/*
Copyright 2011 Kristian Nielsen and Monty Program Ab
2015, 2022 MariaDB Corporation AB
This file is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -113,16 +114,16 @@ struct my_context {
#endif
/*
Initialize an asynchroneous context object.
Initialize an asynchronous context object.
Returns 0 on success, non-zero on failure.
*/
extern int my_context_init(struct my_context *c, size_t stack_size);
/* Free an asynchroneous context object, deallocating any resources used. */
/* Free an asynchronous context object, deallocating any resources used. */
extern void my_context_destroy(struct my_context *c);
/*
Spawn an asynchroneous context. The context will run the supplied user
Spawn an asynchronous context. The context will run the supplied user
function, passing the supplied user data pointer.
The context must have been initialised with my_context_init() prior to
@@ -130,7 +131,7 @@ extern void my_context_destroy(struct my_context *c);
The user function may call my_context_yield(), which will cause this
function to return 1. Then later my_context_continue() may be called, which
will resume the asynchroneous context by returning from the previous
will resume the asynchronous context by returning from the previous
my_context_yield() call.
When the user function returns, this function returns 0.
@@ -140,7 +141,7 @@ extern void my_context_destroy(struct my_context *c);
extern int my_context_spawn(struct my_context *c, void (*f)(void *), void *d);
/*
Suspend an asynchroneous context started with my_context_spawn.
Suspend an asynchronous context started with my_context_spawn.
When my_context_yield() is called, execution immediately returns from the
last my_context_spawn() or my_context_continue() call. Then when later
@@ -152,10 +153,10 @@ extern int my_context_spawn(struct my_context *c, void (*f)(void *), void *d);
extern int my_context_yield(struct my_context *c);
/*
Resume an asynchroneous context. The context was spawned by
Resume an asynchronous context. The context was spawned by
my_context_spawn(), and later suspended inside my_context_yield().
The asynchroneous context may be repeatedly suspended with
The asynchronous context may be repeatedly suspended with
my_context_yield() and resumed with my_context_continue().
Each time it is suspended, this function returns 1. When the originally
@@ -178,7 +179,7 @@ struct mysql_async_context {
resumed, eg. whether we woke up due to connection completed or timeout
in mysql_real_connect_cont().
*/
unsigned int events_occured;
unsigned int events_occurred;
/*
This is set to the result of the whole asynchronous operation when it
completes. It uses a union, as different calls have different return

View File

@@ -8,7 +8,7 @@
#define MARIADB_TLS void
#endif
/* CONC-492: Allow to buuld plugins outside of MariaDB Connector/C
/* CONC-492: Allow to build plugins outside of MariaDB Connector/C
source tree wnen ma_global.h was not included. */
#if !defined(_global_h) && !defined(MY_GLOBAL_INCLUDED)
typedef unsigned char uchar;

View File

@@ -1,8 +1,10 @@
/* Copyright (C) 2012 MariaDB Services and Kristian Nielsen
2015,2020 MariaDB Corporation AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This file is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of

View File

@@ -1,5 +1,6 @@
/* Copyright (c) 2011, Monty Program Ab
Copyright (c) 2011, Oleksandr Byelkin
Copyright (c) 2012, 2022 MariaDB Corporation AB
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -81,7 +82,7 @@ enum enum_dyncol_func_result
ER_DYNCOL_YES= 1, /* For functions returning 0/1 */
ER_DYNCOL_FORMAT= -1, /* Wrong format of the encoded string */
ER_DYNCOL_LIMIT= -2, /* Some limit reached */
ER_DYNCOL_RESOURCE= -3, /* Out of resourses */
ER_DYNCOL_RESOURCE= -3, /* Out of resources */
ER_DYNCOL_DATA= -4, /* Incorrect input data */
ER_DYNCOL_UNKNOWN_CHARSET= -5, /* Unknown character set */
ER_DYNCOL_TRUNCATED= 2 /* OK, but data was truncated */

View File

@@ -1,5 +1,5 @@
/****************************************************************************
Copyright (C) 2012, 2020, MariaDB Corporation.
Copyright (C) 2012, 2022, MariaDB Corporation.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -538,7 +538,7 @@ static unsigned int check_mb_gb18030_valid(const char * start, const char * end)
/*
The server compiles sometimes the full utf-8 (the mb4) as utf8mb4, and the old as utf8,
for BC reasons. Sometimes, utf8mb4 is just utf8 but the old charsets are utf8mb3.
Change easily now, with a macro, could be made compilastion dependable.
Change easily now, with a macro, could be made compilation dependable.
*/
#define UTF8_MB4 "utf8mb4"
@@ -1170,7 +1170,7 @@ struct st_madb_os_charset MADB_OS_CHARSET[]=
{"1252", "Western European (Windows)", "latin1", NULL, MADB_CS_EXACT},
{"1253", "Greek (Windows)", "greek", NULL, MADB_CS_EXACT},
{"1254", "Turkish (Windows)", "latin5", NULL, MADB_CS_EXACT},
{"1255", "Hebrew (Windows)", "hewbrew", NULL, MADB_CS_EXACT},
{"1255", "Hebrew (Windows)", "hebrew", NULL, MADB_CS_EXACT},
{"1256", "Arabic (Windows)", "cp1256", NULL, MADB_CS_EXACT},
{"1257", "Baltic (Windows)","cp1257", NULL, MADB_CS_EXACT},
{"1258", "Vietnamese (Windows)", NULL, NULL, MADB_CS_UNSUPPORTED},

View File

@@ -641,7 +641,7 @@ my_context_trampoline(void *p)
Reuse the Fiber by looping infinitely, each time we are scheduled we
spawn the appropriate function and switch back when it is done.
This way we avoid the overhead of CreateFiber() for every asynchroneous
This way we avoid the overhead of CreateFiber() for every asynchronous
operation.
*/
for(;;)

View File

@@ -1,5 +1,5 @@
/* Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
2016,2018 MariaDB Corporation AB
2016,2022 MariaDB Corporation AB
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -244,7 +244,7 @@ size_t ma_gcvt(double x, my_gcvt_arg_type type, int width, char *to,
/*
Number of digits in the exponent from the 'e' conversion.
The sign of the exponent is taken into account separetely, we don't need
The sign of the exponent is taken into account separately, we don't need
to count it here.
*/
exp_len= 1 + (decpt >= 101 || decpt <= -99) + (decpt >= 11 || decpt <= -9);

View File

@@ -1,5 +1,5 @@
/************************************************************************************
Copyright (C) 2015 MariaDB Corporation AB,
Copyright (C) 2015, 2022 MariaDB Corporation AB,
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -22,7 +22,7 @@
PVIO is the interface for client server communication and replaces former vio
component of the client library.
PVIO support various protcols like sockets, pipes and shared memory, which are
PVIO support various protocols like sockets, pipes and shared memory, which are
implemented as plugins and can be extended therefore easily.
Interface function description:
@@ -209,7 +209,7 @@ static size_t ma_pvio_read_async(MARIADB_PVIO *pvio, uchar *buffer, size_t lengt
my_context_yield(&b->async_context);
if (b->suspend_resume_hook)
(*b->suspend_resume_hook)(FALSE, b->suspend_resume_hook_user_data);
if (b->events_occured & MYSQL_WAIT_TIMEOUT)
if (b->events_occurred & MYSQL_WAIT_TIMEOUT)
return -1;
}
}
@@ -335,7 +335,7 @@ static ssize_t ma_pvio_write_async(MARIADB_PVIO *pvio, const uchar *buffer, size
my_context_yield(&b->async_context);
if (b->suspend_resume_hook)
(*b->suspend_resume_hook)(FALSE, b->suspend_resume_hook_user_data);
if (b->events_occured & MYSQL_WAIT_TIMEOUT)
if (b->events_occurred & MYSQL_WAIT_TIMEOUT)
return -1;
}
}
@@ -460,7 +460,7 @@ ma_pvio_wait_async(struct mysql_async_context *b, enum enum_pvio_io_event event,
my_context_yield(&b->async_context);
if (b->suspend_resume_hook)
(*b->suspend_resume_hook)(FALSE, b->suspend_resume_hook_user_data);
return (b->events_occured & MYSQL_WAIT_TIMEOUT) ? 0 : 1;
return (b->events_occurred & MYSQL_WAIT_TIMEOUT) ? 0 : 1;
}
/* }}} */

View File

@@ -109,7 +109,7 @@ my_connect_async(MARIADB_PVIO *pvio,
my_context_yield(&b->async_context);
if (b->suspend_resume_hook)
(*b->suspend_resume_hook)(FALSE, b->suspend_resume_hook_user_data);
if (b->events_occured & MYSQL_WAIT_TIMEOUT)
if (b->events_occurred & MYSQL_WAIT_TIMEOUT)
return -1;
s_err_size= sizeof(res);
@@ -248,7 +248,7 @@ my_ssl_write_async(struct mysql_async_context *b, SSL *ssl,
} \
\
b->active= 1; \
b->events_occured= ready_status; \
b->events_occurred= ready_status; \
res= my_context_continue(&b->async_context); \
b->active= 0; \
if (res > 0) \
@@ -304,7 +304,7 @@ my_ssl_write_async(struct mysql_async_context *b, SSL *ssl,
} \
\
b->active= 1; \
b->events_occured= ready_status; \
b->events_occurred= ready_status; \
res= my_context_continue(&b->async_context); \
b->active= 0; \
if (res > 0) \

View File

@@ -1,5 +1,6 @@
/* Copyright (c) 2011,2013 Monty Program Ab;
Copyright (c) 2011,2012 Oleksandr Byelkin
2013, 2022 MariaDB Corporation AB
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -2809,7 +2810,7 @@ dynamic_column_update_copy(DYNAMIC_COLUMN *str, PLAN *plan,
}
else
{
nm= uint2korr(read); /* Column nummber */
nm= uint2korr(read); /* Column number */
key= &nm;
}
}
@@ -2983,7 +2984,7 @@ dynamic_column_update_move_left(DYNAMIC_COLUMN *str, PLAN *plan,
uint nm;
DYNAMIC_COLUMN_TYPE tp;
nm= uint2korr(read); /* Column nummber */
nm= uint2korr(read); /* Column number */
if (type_and_offset_read_num(&tp, &offs, read + COLUMN_NUMBER_SIZE,
offset_size))
return ER_DYNCOL_FORMAT;
@@ -3172,7 +3173,7 @@ dynamic_column_update_move_right(DYNAMIC_COLUMN *str, PLAN *plan,
uint nm;
DYNAMIC_COLUMN_TYPE tp;
nm= uint2korr(read); /* Column nummber */
nm= uint2korr(read); /* Column number */
type_and_offset_read_num(&tp, &offs, read + COLUMN_NUMBER_SIZE,
offset_size);
if (k > start && offs < first_offset)

View File

@@ -1,6 +1,7 @@
/************************************************************************************
Copyright (C) 2000, 2012 MySQL AB & MySQL Finland AB & TCX DataKonsult AB,
Monty Program AB
2013, 2022 MariaDB Corporation AB
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -564,7 +565,7 @@ void read_user_name(char *name)
static void
end_server(MYSQL *mysql)
{
/* if net->error 2 and reconnect is activated, we need to inforn
/* if net->error 2 and reconnect is activated, we need to inform
connection handler */
if (mysql->net.pvio != 0)
{

View File

@@ -1,5 +1,5 @@
/************************************************************************************
Copyright (C) 2018-2021 MariaDB Corporation AB
Copyright (C) 2018,2022 MariaDB Corporation AB
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -522,7 +522,7 @@ MARIADB_RPL_EVENT * STDCALL mariadb_rpl_fetch(MARIADB_RPL *rpl, MARIADB_RPL_EVEN
break;
}
/* check if we have to send acknoledgement to primary
/* check if we have to send acknowledgement to primary
when semi sync replication is used */
if (rpl_event->is_semi_sync &&
rpl_event->semi_sync_flags == SEMI_SYNC_ACK_REQ)

View File

@@ -1,5 +1,6 @@
/****************************************************************************
Copyright (C) 2012 Monty Program AB
2013, 2022 MariaDB Corporation AB
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -577,7 +578,7 @@ int store_param(MYSQL_STMT *stmt, int column, unsigned char **p, unsigned long r
1 1 negative
2-5 4 day
6 1 hour
7 1 ninute
7 1 minute
8 1 second;
9-13 4 second_part
*/
@@ -938,7 +939,7 @@ unsigned char* ma_stmt_execute_generate_bulk_request(MYSQL_STMT *stmt, size_t *r
p+=2;
/* When using mariadb_stmt_execute_direct stmt->paran_count is
not knowm, so we need to assign prebind_params, which was previously
not known, so we need to assign prebind_params, which was previously
set by mysql_stmt_attr_set
*/
if (!stmt->param_count && stmt->prebind_params)
@@ -2288,7 +2289,7 @@ MYSQL_RES * STDCALL mysql_stmt_result_metadata(MYSQL_STMT *stmt)
if (!stmt->field_count)
return(NULL);
/* aloocate result set structutr and copy stmt information */
/* allocate result set structure and copy stmt information */
if (!(res= (MYSQL_RES *)calloc(1, sizeof(MYSQL_RES))))
{
SET_CLIENT_STMT_ERROR(stmt, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0);

View File

@@ -63,7 +63,7 @@ IF(CRYPTO_PLUGIN)
LIBRARIES ${CRYPT_LIBS}
COMPILE_OPTIONS -DMYSQL_CLIENT=1)
IF(MSVC)
# Silence conversion (integer truncantion) warnings from reference code
# Silence conversion (integer truncation) warnings from reference code
SET_SOURCE_FILES_PROPERTIES(${REF10_SOURCES} PROPERTY COMPILE_FLAGS "-DMYSQL_CLIENT=1 /wd4244 /wd4146")
ENDIF()

View File

@@ -1,5 +1,5 @@
/************************************************************************************
Copyright (C) 2017, 2021, MariaDB Corporation AB
Copyright (C) 2017, 2022, MariaDB Corporation AB
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -92,7 +92,7 @@ static int ma_sha256_scramble(unsigned char *scramble, size_t scramble_len,
#endif
size_t i;
/* check if all specified lengtht are valid */
/* check if all specified lengths are valid */
if (!scramble_len || !source_len || !salt_len)
return 1;

View File

@@ -264,7 +264,7 @@ static int send_client_reply_packet(MCPVIO_EXT *mpvio,
if (mysql->options.compress)
{
/* For MySQL 8.0 we will use zstd copression */
/* For MySQL 8.0 we will use zstd compression */
if (mysql->server_capabilities & CLIENT_ZSTD_COMPRESSION)
{
if ((compression_plugin(net) = (MARIADB_COMPRESSION_PLUGIN *)mysql_client_find_plugin(mysql,