mirror of
https://github.com/MariaDB/server.git
synced 2025-04-17 10:37:22 +03:00
Fix typos in C comments in miscellaneous files
This commit is contained in:
parent
5f7e883336
commit
5f7c2a617f
@ -29,7 +29,7 @@ enum class KeyOrConstraintType
|
||||
};
|
||||
|
||||
/**
|
||||
* Struct representing a table keyor constraint definition
|
||||
* Struct representing a table key or constraint definition
|
||||
*/
|
||||
struct KeyDefinition
|
||||
{
|
||||
|
@ -1475,7 +1475,7 @@ sig_handler mysql_end(int sig)
|
||||
User, password, and database are UTF8 encoded, prior to the function,
|
||||
this needs to be fixed, in case they contain non-ASCIIs.
|
||||
|
||||
Mostly a workaround, to allow existng users with non-ASCII password
|
||||
Mostly a workaround, to allow existing users with non-ASCII password
|
||||
to survive upgrade without losing connectivity.
|
||||
*/
|
||||
static void maybe_convert_charset(const char **user, const char **password,
|
||||
@ -2415,7 +2415,7 @@ static COMMANDS *find_command(char cmd_char)
|
||||
|
||||
/*
|
||||
In binary-mode, we disallow all client commands except '\C',
|
||||
DELIMITER (see long comand finding find_command(char *))
|
||||
DELIMITER (see long command finding find_command(char *))
|
||||
and '\-' (sandbox, see following comment).
|
||||
*/
|
||||
if (real_binary_mode)
|
||||
|
@ -1080,9 +1080,9 @@ static void __attribute__((noinline)) print_result()
|
||||
If the error message includes REPAIR TABLE, we assume it means
|
||||
we have to run REPAIR on it. In this case we write a nicer message
|
||||
than "Please do "REPAIR TABLE""...
|
||||
If the message inclused ALTER TABLE then there is something wrong
|
||||
If the message includes ALTER TABLE then there is something wrong
|
||||
with the table definition and we have to run ALTER TABLE to fix it.
|
||||
Write also a nice error message for this csae.
|
||||
Write also a nice error message for this case.
|
||||
*/
|
||||
if (!strcmp(row[2],"error") && strstr(row[3],"REPAIR "))
|
||||
{
|
||||
|
@ -4269,7 +4269,7 @@ static void dump_table(const char *table, const char *db, const uchar *hash_key,
|
||||
|
||||
/*
|
||||
Check --skip-events flag: it is not enough to skip creation of events
|
||||
discarding SHOW CREATE EVENT statements generation. The myslq.event
|
||||
discarding SHOW CREATE EVENT statements generation. The mysql.event
|
||||
table data should be skipped too.
|
||||
*/
|
||||
if (!opt_events && !cmp_database(db, "mysql") &&
|
||||
|
@ -785,7 +785,7 @@ int table_load_params::load_data(MYSQL *mysql)
|
||||
if (exec_sql(mysql, "SET TIME_ZONE=@save_tz;"))
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
/* Restore constrains and triggers */
|
||||
/* Restore constraints and triggers */
|
||||
for (const auto &create_trigger_def : triggers)
|
||||
{
|
||||
if (exec_sql(mysql, create_trigger_def))
|
||||
|
@ -8625,7 +8625,7 @@ void handle_no_error(struct st_command *command)
|
||||
|
||||
SYNOPSIS
|
||||
read_stmt_results
|
||||
stmt - prepare statemet
|
||||
stmt - prepare statement
|
||||
mysql - mysql handle
|
||||
command - current command pointer
|
||||
ds - output buffer where to store result form query
|
||||
@ -9534,7 +9534,7 @@ void run_query(struct st_connection *cn, struct st_command *command, int flags)
|
||||
rs_output= &rs_cmp_result;
|
||||
}
|
||||
else
|
||||
rs_output= &ds_res; // will be shown to colsole
|
||||
rs_output= &ds_res; // will be shown to console
|
||||
|
||||
/*
|
||||
Log the query into the output buffer
|
||||
|
@ -382,7 +382,7 @@ open_file(
|
||||
@param [in,out] buf read the file in buffer
|
||||
@param [in] partial_page_read enable when to read the
|
||||
remaining buffer for first page.
|
||||
@param [in] physical_page_size Physical/Commpressed page size.
|
||||
@param [in] physical_page_size Physical/Compressed page size.
|
||||
@param [in,out] fil_in file pointer created for the
|
||||
tablespace.
|
||||
@retval no. of bytes read.
|
||||
@ -590,7 +590,7 @@ Rewrite the checksum for the page.
|
||||
|
||||
@retval true : do rewrite
|
||||
@retval false : skip the rewrite as checksum stored match with
|
||||
calculated or page is doublwrite buffer.
|
||||
calculated or page is doublewrite buffer.
|
||||
*/
|
||||
static bool update_checksum(byte* page, uint32_t flags)
|
||||
{
|
||||
@ -1875,7 +1875,7 @@ first_non_zero:
|
||||
}
|
||||
|
||||
if (!read_from_stdin) {
|
||||
/* flcose() will flush the data and release the lock if
|
||||
/* fclose() will flush the data and release the lock if
|
||||
any acquired. */
|
||||
fclose(fil_in);
|
||||
}
|
||||
|
@ -88,7 +88,7 @@ public:
|
||||
Skip all existing log files and find the greatest missing log file.
|
||||
|
||||
@param datadir - Search files in this directory
|
||||
@param start - Start searching from this log number and go downto 1.
|
||||
@param start - Start searching from this log number and go down to 1.
|
||||
@param kind - true - search for an existing file
|
||||
false - search for a missing file.
|
||||
@returns - [1..start] - the greatest found log file
|
||||
|
@ -147,7 +147,7 @@ struct datadir_thread_ctxt_t {
|
||||
};
|
||||
|
||||
/************************************************************************
|
||||
Retirn true if character if file separator */
|
||||
Return true if character is file separator */
|
||||
bool
|
||||
is_path_separator(char c)
|
||||
{
|
||||
@ -1413,7 +1413,7 @@ bool backup_finish(ds_ctxt *ds_data)
|
||||
|
||||
/*
|
||||
Drop all empty database directories in the base backup
|
||||
that do not exists in the icremental backup.
|
||||
that do not exist in the incremental backup.
|
||||
|
||||
This effectively re-plays all DROP DATABASE statements happened
|
||||
in between base backup and incremental backup creation time.
|
||||
@ -2209,7 +2209,7 @@ static void rocksdb_lock_checkpoint()
|
||||
MYSQL_ROW r = mysql_fetch_row(res);
|
||||
if (r && r[0] && strcmp(r[0], "1"))
|
||||
{
|
||||
msg("Could not obtain rocksdb checkpont lock.");
|
||||
msg("Could not obtain rocksdb checkpoint lock.");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
mysql_free_result(res);
|
||||
|
@ -101,7 +101,7 @@ extern my_bool opt_ssl_verify_server_cert, opt_use_ssl;
|
||||
|
||||
/*
|
||||
get_os_user()
|
||||
Ressemles read_user_name() from libmariadb/libmariadb/mariadb_lib.c.
|
||||
Resembles read_user_name() from libmariadb/libmariadb/mariadb_lib.c.
|
||||
*/
|
||||
|
||||
#if !defined(_WIN32)
|
||||
@ -1405,7 +1405,7 @@ are used because donor's wsrep_gtid_domain_id is needed later in joiner.
|
||||
Note that at this stage wsrep_local_state_uuid and wsrep_last_committed
|
||||
are inconsistent but they are not used in joiner. Joiner will rewrite this file
|
||||
at mariabackup --prepare phase and thus there is extra file donor_galera_info.
|
||||
Information is needed to maitain wsrep_gtid_domain_id and gtid_binlog_pos
|
||||
Information is needed to maintain wsrep_gtid_domain_id and gtid_binlog_pos
|
||||
same across the cluster. If joiner node have different wsrep_gtid_domain_id
|
||||
we should still receive effective domain id from the donor node,
|
||||
and use it.
|
||||
|
@ -1484,7 +1484,7 @@ struct download_buffer_info {
|
||||
};
|
||||
|
||||
/*********************************************************************//**
|
||||
Callback to parse header of GET request on swift contaier. */
|
||||
Callback to parse header of GET request on swift container. */
|
||||
static
|
||||
size_t fetch_buffer_header_cb(char *ptr, size_t size, size_t nmemb,
|
||||
void *data)
|
||||
@ -1686,7 +1686,7 @@ container_list_add_object(container_list *list, const char *name,
|
||||
|
||||
|
||||
/*********************************************************************//**
|
||||
Tokenize json string. Return array of tokens. Caller is responsoble for
|
||||
Tokenize json string. Return array of tokens. Caller is responsible for
|
||||
deallocating the array. */
|
||||
jsmntok_t *
|
||||
json_tokenise(char *json, size_t len, int initial_tokens)
|
||||
|
@ -219,7 +219,7 @@ uint xtrabackup_compress = FALSE;
|
||||
uint xtrabackup_compress_threads;
|
||||
ulonglong xtrabackup_compress_chunk_size = 0;
|
||||
|
||||
/* sleep interval beetween log copy iterations in log copying thread
|
||||
/* sleep interval between log copy iterations in log copying thread
|
||||
in milliseconds (default is 1 second) */
|
||||
ulint xtrabackup_log_copy_interval = 1000;
|
||||
static ulong max_buf_pool_modified_pct;
|
||||
@ -431,7 +431,7 @@ typedef decltype(fil_space_t::id) space_id_t;
|
||||
typedef std::map<space_id_t,std::string> space_id_to_name_t;
|
||||
|
||||
struct ddl_tracker_t {
|
||||
/** Tablspaces with their ID and name, as they were copied to backup.*/
|
||||
/** Tablespaces with their ID and name, as they were copied to backup.*/
|
||||
space_id_to_name_t tables_in_backup;
|
||||
/** Drop operations found in redo log. */
|
||||
std::set<space_id_t> drops;
|
||||
@ -651,7 +651,7 @@ void CorruptedPages::zero_out_free_pages()
|
||||
{
|
||||
uint32_t space_id = space_it->first;
|
||||
const std::string &space_name = space_it->second.space_name;
|
||||
// There is no need to close tablespaces explixitly as they will be closed
|
||||
// There is no need to close tablespaces explicitly as they will be closed
|
||||
// in innodb_shutdown().
|
||||
xb_load_single_table_tablespace(space_name, false);
|
||||
fil_space_t *space = fil_space_t::get(space_id);
|
||||
@ -5333,7 +5333,7 @@ class BackupStages {
|
||||
|
||||
/* The only reason why Galera/binlog info is written before
|
||||
wait_for_ibbackup_log_copy_finish() is that after that call the xtrabackup
|
||||
binary will start streamig a temporary copy of REDO log to stdout and
|
||||
binary will start streaming a temporary copy of REDO log to stdout and
|
||||
thus, any streaming from innobackupex would interfere. The only way to
|
||||
avoid that is to have a single process, i.e. merge innobackupex and
|
||||
xtrabackup. */
|
||||
@ -6364,7 +6364,7 @@ and ".idb.meta" files in incremental directory to avoid applying delta to
|
||||
@param[in] db_name database name
|
||||
@param[in] file_name file name with suffix
|
||||
@param[in] arg destination path, used in incremental backup to notify, that
|
||||
*.new file must be moved to destibation directory
|
||||
*.new file must be moved to destination directory
|
||||
|
||||
@return true */
|
||||
static ibool prepare_handle_new_files(const char *data_home_dir,
|
||||
|
@ -315,7 +315,7 @@ int main(int argc,char *argv[])
|
||||
code=atoi(*argv);
|
||||
msg = strerror(code);
|
||||
|
||||
// On AIX, unknow error return " Error <CODE> occurred."
|
||||
// On AIX, unknown error returns " Error <CODE> occurred."
|
||||
snprintf(unknow_aix, sizeof(unknow_aix), " Error %3d occurred.", code);
|
||||
|
||||
/*
|
||||
|
@ -332,7 +332,7 @@ static void free_pointer_array(reg1 POINTER_ARRAY *pa)
|
||||
} /* free_pointer_array */
|
||||
|
||||
|
||||
/* Code for replace rutines */
|
||||
/* Code for replace routines */
|
||||
|
||||
#define SET_MALLOC_HUNC 64
|
||||
|
||||
@ -342,7 +342,7 @@ typedef struct st_rep_set {
|
||||
uint found_len; /* Best match to date */
|
||||
int found_offset;
|
||||
uint table_offset;
|
||||
uint size_of_bits; /* For convinience */
|
||||
uint size_of_bits; /* For convenience */
|
||||
} REP_SET;
|
||||
|
||||
typedef struct st_rep_sets {
|
||||
|
@ -37,7 +37,7 @@ typedef struct st_json_string_t
|
||||
const uchar *c_str; /* Current position in JSON string */
|
||||
const uchar *str_end; /* The end on the string. */
|
||||
my_wc_t c_next; /* UNICODE of the last read character */
|
||||
int c_next_len; /* character lenght of the last read character. */
|
||||
int c_next_len; /* character length of the last read character. */
|
||||
int error; /* error code. */
|
||||
|
||||
CHARSET_INFO *cs; /* Character set of the JSON string. */
|
||||
|
@ -125,7 +125,7 @@ void *lf_alloc_new(LF_PINS *pins);
|
||||
C_MODE_END
|
||||
|
||||
/*
|
||||
extendible hash, lf_hash.cc
|
||||
extensible hash, lf_hash.cc
|
||||
*/
|
||||
#include <hash.h>
|
||||
|
||||
|
@ -1347,7 +1347,7 @@ my_ci_scan(CHARSET_INFO *cs, const char *b, const char *e, int seq)
|
||||
@return 1 on a single byte character
|
||||
@return >1 on a multi-byte character
|
||||
|
||||
Note, inlike my_ismbchar(), 1 is returned for a single byte character.
|
||||
Note, unlike my_ismbchar(), 1 is returned for a single byte character.
|
||||
*/
|
||||
|
||||
static inline int
|
||||
|
@ -463,7 +463,7 @@ enum ha_base_keytype {
|
||||
#define HA_ERR_RETRY_INIT 129 /* Initialization failed and should be retried */
|
||||
#define HA_ERR_NOT_A_TABLE 130 /* not a MYI file - no signature */
|
||||
#define HA_ERR_WRONG_COMMAND 131 /* Command not supported */
|
||||
#define HA_ERR_OLD_FILE 132 /* old databasfile */
|
||||
#define HA_ERR_OLD_FILE 132 /* old database file */
|
||||
#define HA_ERR_NO_ACTIVE_RECORD 133 /* No record read in update() */
|
||||
#define HA_ERR_RECORD_DELETED 134 /* A record is not there */
|
||||
#define HA_ERR_RECORD_FILE_FULL 135 /* No more room in file */
|
||||
|
@ -52,7 +52,7 @@
|
||||
#include "little_endian.h"
|
||||
#endif
|
||||
|
||||
/* convenienve helpers */
|
||||
/* convenience helpers */
|
||||
static inline float get_float(const void *from)
|
||||
{
|
||||
float to;
|
||||
|
@ -263,7 +263,7 @@ extern HA_KEYSEG *ha_find_null(HA_KEYSEG *keyseg, const uchar *a);
|
||||
returned to the SQL layer.
|
||||
2=CHECK_OUT_OF_RANGE - the index tuple is outside of the range that we're
|
||||
scanning. (Example: if we're scanning "t.key BETWEEN 10 AND
|
||||
20" and got a "t.key=21" tuple) Tthe engine should stop
|
||||
20" and got a "t.key=21" tuple, the engine should stop
|
||||
scanning and return HA_ERR_END_OF_FILE right away).
|
||||
3=CHECK_ABORTED_BY_USER - the engine must stop scanning and should return
|
||||
HA_ERR_ABORTED_BY_USER right away
|
||||
|
@ -71,7 +71,7 @@ struct my_option
|
||||
is created, but a long option still
|
||||
can be identified uniquely in the
|
||||
my_get_one_option() callback.
|
||||
If an opton needs neither special
|
||||
If an option needs neither special
|
||||
treatment in the my_get_one_option()
|
||||
nor one-letter short equivalent
|
||||
use id=0
|
||||
|
@ -489,7 +489,7 @@ typedef unsigned short ushort;
|
||||
#include <my_alloca.h>
|
||||
|
||||
/*
|
||||
Wen using the embedded library, users might run into link problems,
|
||||
When using the embedded library, users might run into link problems,
|
||||
duplicate declaration of __cxa_pure_virtual, solved by declaring it a
|
||||
weak symbol.
|
||||
*/
|
||||
@ -684,7 +684,7 @@ typedef SOCKET_SIZE_TYPE size_socket;
|
||||
*/
|
||||
#define MALLOC_OVERHEAD (8+24)
|
||||
|
||||
/* get memory in huncs */
|
||||
/* get memory in hunks */
|
||||
#define ONCE_ALLOC_INIT (uint) 4096
|
||||
/* Typical record cache */
|
||||
#define RECORD_CACHE_SIZE (uint) (128*1024)
|
||||
|
@ -463,7 +463,7 @@ typedef struct st_io_cache /* Used when caching files */
|
||||
int (*write_function)(struct st_io_cache *,const uchar *,size_t);
|
||||
/*
|
||||
Specifies the type of the cache. Depending on the type of the cache
|
||||
certain operations might not be available and yield unpredicatable
|
||||
certain operations might not be available and yield unpredictable
|
||||
results. Details to be documented later
|
||||
*/
|
||||
enum cache_type type;
|
||||
|
@ -34,7 +34,7 @@ extern "C" {
|
||||
#define MY_XML_FLAG_RELATIVE_NAMES 1
|
||||
|
||||
/*
|
||||
A flag whether to skip normilization of text values before calling
|
||||
A flag whether to skip normalization of text values before calling
|
||||
call-back functions: i.e. skip leading/trailing spaces,
|
||||
\r, \n, \t characters.
|
||||
*/
|
||||
|
@ -102,7 +102,7 @@ typedef struct st_mysql_xid MYSQL_XID;
|
||||
/* MariaDB plugin types */
|
||||
/** Client and server password validation */
|
||||
#define MariaDB_PASSWORD_VALIDATION_PLUGIN 8
|
||||
/**< Encryption and key managment plugins */
|
||||
/**< Encryption and key management plugins */
|
||||
#define MariaDB_ENCRYPTION_PLUGIN 9
|
||||
/**< Plugins for SQL data storage types */
|
||||
#define MariaDB_DATA_TYPE_PLUGIN 10
|
||||
|
@ -99,7 +99,7 @@ struct st_mariadb_encryption
|
||||
writes the output to the dst buffer. note that it might write
|
||||
more bytes that were in the input. or less. or none at all.
|
||||
|
||||
dlen points to the starting lenght of the output buffer. Upon return, it
|
||||
dlen points to the starting length of the output buffer. Upon return, it
|
||||
should be set to the number of bytes written.
|
||||
*/
|
||||
int (*crypt_ctx_update)(void *ctx, const unsigned char* src, unsigned int slen,
|
||||
|
@ -2374,7 +2374,7 @@ typedef void (*destroy_prepared_stmt_v1_t)
|
||||
(PSI_prepared_stmt *prepared_stmt);
|
||||
|
||||
/**
|
||||
repreare a prepare statement.
|
||||
reprepare a prepare statement.
|
||||
@param prepared_stmt prepared statement.
|
||||
*/
|
||||
typedef void (*reprepare_prepared_stmt_v1_t)
|
||||
|
@ -2208,7 +2208,7 @@ int cli_stmt_execute(MYSQL_STMT *stmt)
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
length= (ulong) (net->write_pos - net->buff);
|
||||
/* TODO: Look into avoding the following memdup */
|
||||
/* TODO: Look into avoiding the following memdup */
|
||||
if (!(param_data= my_memdup(PSI_NOT_INSTRUMENTED, net->buff, length, MYF(0))))
|
||||
{
|
||||
set_stmt_error(stmt, CR_OUT_OF_MEMORY, unknown_sqlstate, NULL);
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
DESCRIPTION
|
||||
init_dynamic_array() initiates array and allocate space for
|
||||
init_alloc eilements.
|
||||
init_alloc elements.
|
||||
Array is usable even if space allocation failed, hence, the
|
||||
function never returns TRUE.
|
||||
|
||||
@ -280,7 +280,7 @@ my_bool allocate_dynamic(DYNAMIC_ARRAY *array, size_t max_elements)
|
||||
if (array->malloc_flags & MY_INIT_BUFFER_USED)
|
||||
{
|
||||
/*
|
||||
In this senerio, the buffer is statically preallocated,
|
||||
In this scenario, the buffer is statically preallocated,
|
||||
so we have to create an all-new malloc since we overflowed
|
||||
*/
|
||||
if (!(new_ptr= (uchar *) my_malloc(array->m_psi_key, size *
|
||||
|
@ -370,7 +370,7 @@ static unsigned crc32c_aarch64_pmull(unsigned crc, const void *buf, size_t len)
|
||||
/* There are multiple approaches to calculate crc.
|
||||
Approach-1: Process 8 bytes then 4 bytes then 2 bytes and then 1 bytes
|
||||
Approach-2: Process 8 bytes and remaining workload using 1 bytes
|
||||
Apporach-3: Process 64 bytes at once by issuing 8 crc call and remaining
|
||||
Approach-3: Process 64 bytes at once by issuing 8 crc call and remaining
|
||||
using 8/1 combination.
|
||||
|
||||
Based on micro-benchmark testing we found that Approach-2 works best especially
|
||||
|
@ -112,7 +112,7 @@ struct crcr_pclmulqdq_ctx
|
||||
* FOLD = XOR(T1, T2, DATA)
|
||||
*
|
||||
* @param data_block 16 byte data block
|
||||
* @param precomp precomputed rk1 constanst
|
||||
* @param precomp precomputed rk1 constant
|
||||
* @param fold running 16 byte folded data
|
||||
*
|
||||
* @return New 16 byte folded data
|
||||
|
@ -105,7 +105,7 @@ out:
|
||||
#endif
|
||||
|
||||
/* When we have a load-store in a single-dispatch group and address overlap
|
||||
* such that foward is not allowed (load-hit-store) the group must be flushed.
|
||||
* such that forward is not allowed (load-hit-store) the group must be flushed.
|
||||
* A group ending NOP prevents the flush.
|
||||
*/
|
||||
#define GROUP_ENDING_NOP asm("ori 2,2,0" ::: "memory")
|
||||
|
@ -62,7 +62,7 @@ my_hash_value_type my_hash_sort(CHARSET_INFO *cs, const uchar *key,
|
||||
|
||||
@param[in] psi_key The key to register instrumented memory
|
||||
@param[in,out] hash The hash that is initialized
|
||||
@param[in] growth_size size incrememnt for the underlying dynarray
|
||||
@param[in] growth_size size increment for the underlying dynarray
|
||||
@param[in] charset The character set information
|
||||
@param[in] size The hash size
|
||||
@param[in] key_offest The key offset for the hash
|
||||
|
@ -119,7 +119,7 @@ retry:
|
||||
MY_MEMORY_ORDER_ACQUIRE);
|
||||
|
||||
do {
|
||||
/* attempting to my_assume_aligned onlink below broke the implementation */
|
||||
/* attempting to my_assume_aligned on link below broke the implementation */
|
||||
link= (intptr) my_atomic_loadptr_explicit((void **) &cursor->curr->link,
|
||||
MY_MEMORY_ORDER_RELAXED);
|
||||
cursor->next= my_assume_aligned<sizeof(LF_SLIST *)>(PTR(link));
|
||||
|
@ -3588,7 +3588,7 @@ dynamic_column_update_many_fmt(DYNAMIC_COLUMN *str,
|
||||
entry_size, header_size,
|
||||
new_header.offset_size,
|
||||
new_header.entry_size,
|
||||
new_heder.header_size, column_count,
|
||||
new_header.header_size, column_count,
|
||||
new_header.column_count,
|
||||
add_column_count, header_end,
|
||||
header.data_size);
|
||||
@ -3669,7 +3669,7 @@ mariadb_dyncol_check(DYNAMIC_COLUMN *str)
|
||||
if (fmt->fixed_hdr + header.header_size + header.nmpool_size > str->length)
|
||||
{
|
||||
DBUG_PRINT("info", ("Fixed header: %u Header size: %u "
|
||||
"Name pool size: %u but Strig length: %u",
|
||||
"Name pool size: %u but String length: %u",
|
||||
(uint)fmt->fixed_hdr,
|
||||
(uint)header.header_size,
|
||||
(uint)header.nmpool_size,
|
||||
@ -3776,7 +3776,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);
|
||||
|
@ -16,7 +16,7 @@
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */
|
||||
|
||||
/*
|
||||
Cashing of files with only does (sequential) read or writes of fixed-
|
||||
Caсhing of files with only does (sequential) read or writes of fixed-
|
||||
length records. A read isn't allowed to go over file-length. A read is ok
|
||||
if it ends at file-length and next read can try to read after file-length
|
||||
(and get a EOF-error).
|
||||
@ -26,7 +26,7 @@
|
||||
One can change info->pos_in_file to a higher value to skip bytes in file if
|
||||
also info->read_pos is set to info->read_end.
|
||||
If called through open_cached_file(), then the temporary file will
|
||||
only be created if a write exeeds the file buffer or if one calls
|
||||
only be created if a write exceeds the file buffer or if one calls
|
||||
my_b_flush_io_cache().
|
||||
|
||||
If one uses SEQ_READ_APPEND, then two buffers are allocated, one for
|
||||
|
@ -269,7 +269,7 @@ size_t my_b_gets(IO_CACHE *info, char *to, size_t max_length)
|
||||
}
|
||||
if (!(max_length-=length))
|
||||
{
|
||||
/* Found enough charcters; Return found string */
|
||||
/* Found enough characters; Return found string */
|
||||
info->read_pos=pos;
|
||||
*to='\0';
|
||||
return (size_t) (to-start);
|
||||
|
@ -442,7 +442,7 @@ static inline uint next_power(uint value)
|
||||
init_simple_key_cache()
|
||||
keycache pointer to the control block of a simple key cache
|
||||
key_cache_block_size size of blocks to keep cached data
|
||||
use_mem memory to use for the key cache buferrs/structures
|
||||
use_mem memory to use for the key cache buffers/structures
|
||||
division_limit division limit (may be zero)
|
||||
age_threshold age threshold (may be zero)
|
||||
|
||||
@ -1525,7 +1525,7 @@ static void unlink_block(SIMPLE_KEY_CACHE_CB *keycache, BLOCK_LINK *block)
|
||||
|
||||
NOTE
|
||||
The first request unlinks the block from the LRU ring. This means
|
||||
that it is protected against eveiction.
|
||||
that it is protected against eviction.
|
||||
|
||||
RETURN
|
||||
void
|
||||
@ -2028,7 +2028,7 @@ restart:
|
||||
everything can happen to the block but free or another completed
|
||||
eviction.
|
||||
|
||||
Note that we bahave like a secondary requestor here. We just
|
||||
Note that we behave like a secondary requestor here. We just
|
||||
cannot return with PAGE_WAIT_TO_BE_READ. This would work for
|
||||
read requests and writes on dirty blocks that are not in flush
|
||||
only. Waiting here on COND_FOR_REQUESTED works in all
|
||||
@ -3702,7 +3702,7 @@ static void free_block(SIMPLE_KEY_CACHE_CB *keycache, BLOCK_LINK *block)
|
||||
/*
|
||||
Unregister the block request and link the block into the LRU ring.
|
||||
This enables eviction for the block. If the LRU ring was empty and
|
||||
threads are waiting for a block, then the block wil be handed over
|
||||
threads are waiting for a block, then the block will be handed over
|
||||
for eviction immediately. Otherwise we will unlink it from the LRU
|
||||
ring again, without releasing the lock in between. So decrementing
|
||||
the request counter and updating statistics are the only relevant
|
||||
@ -3788,7 +3788,7 @@ static int flush_cached_blocks(SIMPLE_KEY_CACHE_CB *keycache,
|
||||
keycache_pthread_mutex_unlock(&keycache->cache_lock);
|
||||
/*
|
||||
As all blocks referred in 'cache' are marked by BLOCK_IN_FLUSH
|
||||
we are guarunteed no thread will change them
|
||||
we are guaranteed no thread will change them
|
||||
*/
|
||||
my_qsort((uchar*) cache, count, sizeof(*cache), (qsort_cmp) cmp_sec_link);
|
||||
|
||||
@ -4113,7 +4113,7 @@ restart:
|
||||
{
|
||||
if ((error= flush_cached_blocks(keycache, file, cache, pos, type)))
|
||||
{
|
||||
/* Do not loop inifnitely trying to flush in vain. */
|
||||
/* Do not loop infinitely trying to flush in vain. */
|
||||
if ((last_errno == error) && (++last_errcnt > 5))
|
||||
goto err;
|
||||
last_errno= error;
|
||||
@ -6121,7 +6121,7 @@ int resize_key_cache(KEY_CACHE *keycache, uint key_cache_block_size,
|
||||
|
||||
DESCRIPTION
|
||||
The function sets new values of the division limit and the age threshold
|
||||
used when the key cache keycach employs midpoint insertion strategy.
|
||||
used when the key cache keycache employs midpoint insertion strategy.
|
||||
The parameters division_limit and age_threshold provide these new values.
|
||||
|
||||
RETURN VALUE
|
||||
|
@ -187,7 +187,7 @@ qsort_t my_qsort(void *base_ptr, size_t count, size_t size, qsort_cmp cmp)
|
||||
Prepare for next iteration.
|
||||
Skip partitions of size 1 as these doesn't have to be sorted
|
||||
Push the larger partition and sort the smaller one first.
|
||||
This ensures that the stack is keept small.
|
||||
This ensures that the stack is kept small.
|
||||
*/
|
||||
|
||||
if ((int) (high_ptr - low) <= 0)
|
||||
|
@ -14,7 +14,7 @@
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */
|
||||
|
||||
/* qsort that sends one extra argument to the compare subrutine */
|
||||
/* qsort that sends one extra argument to the compare subroutine */
|
||||
|
||||
#define QSORT_EXTRA_CMP_ARGUMENT
|
||||
#include "mf_qsort.c"
|
||||
|
@ -16,8 +16,8 @@
|
||||
|
||||
/*
|
||||
Radixsort for pointers to fixed length strings.
|
||||
A very quick sort for not to long (< 20 char) strings.
|
||||
Neads a extra buffers of number_of_elements pointers but is
|
||||
A very quick sort for not too long (< 20 char) strings.
|
||||
Needs extra buffers of number_of_elements pointers but is
|
||||
2-3 times faster than quicksort
|
||||
*/
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */
|
||||
|
||||
/* Funktions for comparing with wild-cards */
|
||||
/* Functions for comparing with wild-cards */
|
||||
|
||||
#include "mysys_priv.h"
|
||||
|
||||
|
@ -97,7 +97,7 @@ static inline my_bitmap_map last_bit_mask(uint bits)
|
||||
/*
|
||||
Get a mask of the bits that are to be considered as 'on' at location
|
||||
starting with 'bits'.
|
||||
This function has _inv in it's name as it's usage is invers compared
|
||||
This function has _inv in its name as its usage is the inverse compared
|
||||
to last_bit_mask().
|
||||
|
||||
For (bits & 63) it will return values from the series
|
||||
|
@ -40,7 +40,7 @@ static int compare_bin(const uchar *a, uint a_length,
|
||||
/*
|
||||
We are using space compression. We have to check if longer key
|
||||
has next character < ' ', in which case it's less than the shorter
|
||||
key that has an implicite space afterwards.
|
||||
key that has an implicit space afterwards.
|
||||
|
||||
This code is identical to the one in
|
||||
strings/ctype-simple.c:my_strnncollsp_simple
|
||||
|
@ -106,7 +106,7 @@ int my_copy(const char *from, const char *to, myf MyFlags)
|
||||
/* Copy modes if possible */
|
||||
|
||||
if (MyFlags & MY_HOLD_ORIGINAL_MODES && !new_file_stat)
|
||||
DBUG_RETURN(0); /* File copyed but not stat */
|
||||
DBUG_RETURN(0); /* File copied but not stat */
|
||||
/* Copy modes */
|
||||
if (chmod(to, stat_buff.st_mode & 07777))
|
||||
{
|
||||
|
@ -526,7 +526,7 @@ static int search_default_file(struct handle_option_ctx *ctx, const char *dir,
|
||||
get_argument()
|
||||
keyword Include directive keyword
|
||||
kwlen Length of keyword
|
||||
ptr Pointer to the keword in the line under process
|
||||
ptr Pointer to the keyword in the line under process
|
||||
line line number
|
||||
|
||||
RETURN
|
||||
@ -857,7 +857,7 @@ static int search_default_file_with_ext(struct handle_option_ctx *ctx,
|
||||
static char *remove_end_comment(char *ptr)
|
||||
{
|
||||
char quote= 0; /* we are inside quote marks */
|
||||
char escape= 0; /* symbol is protected by escape chagacter */
|
||||
char escape= 0; /* symbol is protected by escape character */
|
||||
|
||||
for (; *ptr; ptr++)
|
||||
{
|
||||
|
@ -229,7 +229,7 @@ int my_rmtree(const char *dir, myf MyFlags)
|
||||
#ifdef _WIN32
|
||||
/*
|
||||
On Windows, check and possible reset readonly attribute.
|
||||
my_delete(), or DeleteFile does not remove theses files.
|
||||
my_delete(), or DeleteFile does not remove these files.
|
||||
*/
|
||||
if (err)
|
||||
{
|
||||
|
@ -277,7 +277,7 @@ static void make_ftype(register char * to, register int flag)
|
||||
*to++= (flag & O_APPEND) ? 'a' : 'w';
|
||||
else if (flag & O_RDWR)
|
||||
{
|
||||
/* Add '+' after theese */
|
||||
/* Add '+' after these */
|
||||
if (flag & (O_TRUNC | O_CREAT))
|
||||
*to++= 'w';
|
||||
else if (flag & O_APPEND)
|
||||
|
@ -73,7 +73,7 @@ my_bool my_getopt_skip_unknown= 0;
|
||||
|
||||
/*
|
||||
This is a flag that can be set in client programs. 1 means that
|
||||
my_getopt will reconize command line options by their unambiguous
|
||||
my_getopt will recognize command line options by their unambiguous
|
||||
prefixes. 0 means an option must be always specified in full.
|
||||
*/
|
||||
my_bool my_getopt_prefix_matching= 1;
|
||||
@ -920,7 +920,7 @@ static int setval(const struct my_option *opts, void *value, char *argument,
|
||||
/*
|
||||
This sets a bit stored in a longlong.
|
||||
The bit to set is stored in block_size. If block_size is positive
|
||||
then setting the bit means value is true. If block_size is negatitive,
|
||||
then setting the bit means value is true. If block_size is negative,
|
||||
then setting the bit means value is false.
|
||||
*/
|
||||
tmp= get_bool_argument(opts, argument);
|
||||
|
@ -443,10 +443,10 @@ void my_large_free(void *ptr, size_t size)
|
||||
|
||||
For ASAN, we need to explicitly unpoison this memory region because the OS
|
||||
may reuse that memory for some TLS or stack variable. It will remain
|
||||
poisoned if it was explicitly poisioned before release. If this happens,
|
||||
poisoned if it was explicitly poisoned before release. If this happens,
|
||||
we'll have hard to debug false positives like in MDEV-21239.
|
||||
For valgrind, we mark it as UNDEFINED rather than NOACCESS because of the
|
||||
implict reuse possiblility.
|
||||
implicit reuse possibility.
|
||||
*/
|
||||
#if defined(HAVE_MMAP) && !defined(_WIN32)
|
||||
if (munmap(ptr, size))
|
||||
|
@ -201,7 +201,7 @@ err_open:
|
||||
|
||||
/*
|
||||
*****************************************************************************
|
||||
** Read long filename using windows rutines
|
||||
** Read long filename using windows routines
|
||||
*****************************************************************************
|
||||
*/
|
||||
|
||||
|
@ -50,7 +50,7 @@ extern "C" BOOL my_create_minidump(DWORD pid, BOOL verbose)
|
||||
if (filename)
|
||||
{
|
||||
filename++;
|
||||
// We are not interested in dump of some proceses (my_safe_process.exe,cmd.exe)
|
||||
// We are not interested in dump of some processes (my_safe_process.exe,cmd.exe)
|
||||
// since they are only used to start up other programs.
|
||||
// We're interested however in their children;
|
||||
const char *exclude_programs[] = {"my_safe_process.exe","cmd.exe", 0};
|
||||
|
@ -383,7 +383,7 @@ int my_pthread_mutex_trylock(pthread_mutex_t *mutex)
|
||||
int error= pthread_mutex_trylock(mutex);
|
||||
if (error == 1)
|
||||
return 0; /* Got lock on mutex */
|
||||
if (error == 0) /* Someon else is locking mutex */
|
||||
if (error == 0) /* Someone else is locking mutex */
|
||||
return EBUSY;
|
||||
if (error == -1) /* Safety if the lib is fixed */
|
||||
error= errno; /* Probably invalid parameter */
|
||||
|
@ -778,7 +778,7 @@ void my_timer_init(MY_TIMER_INFO *mti)
|
||||
Any clock-based timer can be affected by NPT (ntpd program),
|
||||
which means:
|
||||
- full-second correction can occur for leap second
|
||||
- tiny corrections can occcur approimately every 11 minutes
|
||||
- tiny corrections can occur approximately every 11 minutes
|
||||
(but I think they only affect the RTC which isn't the PIT).
|
||||
|
||||
We define "precision" as "frequency" and "high precision" is
|
||||
|
@ -28,7 +28,7 @@
|
||||
void my_rnd_init(struct my_rnd_struct *rand_st, ulong seed1, ulong seed2)
|
||||
{
|
||||
#ifdef HAVE_valgrind
|
||||
bzero((char*) rand_st,sizeof(*rand_st)); /* Avoid UMC varnings */
|
||||
bzero((char*) rand_st,sizeof(*rand_st)); /* Avoid UMC warnings */
|
||||
#endif
|
||||
rand_st->max_value= 0x3FFFFFFFL;
|
||||
rand_st->max_value_dbl=(double) rand_st->max_value;
|
||||
|
@ -36,7 +36,7 @@ void thr_set_sync_wait_callback(void (*before_wait)(void),
|
||||
|
||||
SYNOPSIS
|
||||
my_sync()
|
||||
fd File descritor to sync
|
||||
fd File descriptor to sync
|
||||
my_flags Flags (now only MY_WME is supported)
|
||||
|
||||
NOTE
|
||||
|
@ -15,7 +15,7 @@
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */
|
||||
|
||||
/*
|
||||
Functions to handle initializating and allocationg of all mysys & debug
|
||||
Functions to handle initializating and allocating of all mysys & debug
|
||||
thread variables.
|
||||
*/
|
||||
|
||||
@ -202,7 +202,7 @@ void my_thread_global_end(void)
|
||||
THR_thread_count);
|
||||
#endif /* HAVE_PTHREAD_KILL */
|
||||
#ifdef SAFEMALLOC
|
||||
/* We know we will have memoryleaks, suppress the leak report */
|
||||
/* We know we will have memory leaks, suppress the leak report */
|
||||
sf_leaking_memory= 1;
|
||||
#endif /* SAFEMALLOC */
|
||||
all_threads_killed= 0;
|
||||
|
@ -41,7 +41,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */
|
||||
range in my_win_* function will be punished with DBUG_ASSERT()
|
||||
|
||||
- File streams (FILE *) are actually from the C runtime. The routines provided
|
||||
here are useful only in scernarios that use low-level IO with my_win_fileno()
|
||||
here are useful only in scenarios that use low-level IO with my_win_fileno()
|
||||
*/
|
||||
|
||||
#ifdef _WIN32
|
||||
|
@ -93,7 +93,7 @@ size_t my_write(File Filedes, const uchar *Buffer, size_t Count, myf MyFlags)
|
||||
|
||||
if (!writtenbytes && !errors++) /* Retry once */
|
||||
{
|
||||
/* We may come here if the file quota is exeeded */
|
||||
/* We may come here if the file quota is exceeded */
|
||||
errno= EFBIG; /* Assume this is the error */
|
||||
continue;
|
||||
}
|
||||
|
@ -25,7 +25,7 @@
|
||||
* On some platforms, memcmp() is faster than the unrolled ptr_compare_N
|
||||
* functions, as memcmp() is usually a platform-specific implementation
|
||||
* written in assembler. for example one in /usr/lib/libc/libc_hwcap*.so.1.
|
||||
* on Solaris, or on Windows inside C runtime linrary.
|
||||
* on Solaris, or on Windows inside C runtime library.
|
||||
*
|
||||
* On Solaris, native implementation is also usually faster than the
|
||||
* built-in memcmp supplied by GCC, so it is recommended to build
|
||||
@ -35,7 +35,7 @@
|
||||
/*
|
||||
Daniel Blacks tests shows that libc memcmp is generally faster than
|
||||
ptr_cmp() at least of x86 and power8 platforms, so we use the libc
|
||||
code as deafult for now
|
||||
code as default for now
|
||||
*/
|
||||
|
||||
#define USE_NATIVE_MEMCMP 1
|
||||
|
@ -26,7 +26,7 @@
|
||||
/*
|
||||
This code originates from the Unireg project.
|
||||
|
||||
Code for generell handling of priority Queues.
|
||||
Code for general handling of priority Queues.
|
||||
Implementation of queues from "Algorithms in C" by Robert Sedgewick.
|
||||
|
||||
The queue can optionally store the position in queue in the element
|
||||
|
@ -55,7 +55,7 @@ static sig_handler default_handle_fatal_signal(int sig)
|
||||
|
||||
|
||||
/**
|
||||
Initialize priting off stacktrace at signal
|
||||
Initialize printing of stacktrace at signal
|
||||
*/
|
||||
|
||||
void my_setup_stacktrace(void)
|
||||
|
@ -133,7 +133,7 @@ my_bool dynstr_trunc(DYNAMIC_STRING *str, size_t n)
|
||||
to specified DYNAMIC_STRING. This function is especially useful when
|
||||
building strings to be executed with the system() function.
|
||||
|
||||
@param str Dynamic String which will have addtional strings appended.
|
||||
@param str Dynamic String which will have additional strings appended.
|
||||
@param append String to be appended.
|
||||
@param ... Optional. Additional string(s) to be appended.
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
/*
|
||||
Code for handling red-black (balanced) binary trees.
|
||||
key in tree is allocated accrding to following:
|
||||
key in tree is allocated according to following:
|
||||
|
||||
1) If size < 0 then tree will not allocate keys and only a pointer to
|
||||
each key is saved in tree.
|
||||
@ -780,7 +780,7 @@ static void rb_delete_fixup(TREE *tree, TREE_ELEMENT ***parent)
|
||||
|
||||
#ifndef DBUG_OFF
|
||||
|
||||
/* Test that the proporties for a red-black tree holds */
|
||||
/* Test that the properties for a red-black tree holds */
|
||||
|
||||
static int test_rb_tree(TREE_ELEMENT *element)
|
||||
{
|
||||
|
@ -293,7 +293,7 @@ static uint parse_name(const TYPELIB *lib, const char **pos, const char *end)
|
||||
}
|
||||
|
||||
/**
|
||||
Parse and apply a set of flag assingments
|
||||
Parse and apply a set of flag assignments
|
||||
|
||||
@param lib Flag names
|
||||
@param default_name Number of "default" in the typelib
|
||||
|
@ -40,7 +40,7 @@
|
||||
a function that knows how to compare values of this resource type.
|
||||
In the simple case it could be wt_resource_id_memcmp().
|
||||
|
||||
a wait-for graph - a graph, that represenst "wait-for" relationships.
|
||||
a wait-for graph - a graph, that represents "wait-for" relationships.
|
||||
It has two types of nodes - threads and resources. There are directed
|
||||
edges from a thread to a resource it is waiting for (WT_THD::waiting_for),
|
||||
from a thread to resources that it "owns" (WT_THD::my_resources),
|
||||
@ -669,7 +669,7 @@ retry:
|
||||
That is, only deadlocks that *we* have created. For example,
|
||||
thd->A->B->thd
|
||||
(thd waits for A, A waits for B, while B is waiting for thd).
|
||||
While walking the graph we can encounter other cicles, e.g.
|
||||
While walking the graph we can encounter other cycles, e.g.
|
||||
thd->A->B->C->A
|
||||
This will not be detected. Instead we will walk it in circles until
|
||||
the search depth limit is reached (the latter guarantees that an
|
||||
|
@ -345,7 +345,7 @@ static SECURITY_STATUS sspi_get_context(MYSQL_PLUGIN_VIO *vio,
|
||||
/* Send generated blob to client. */
|
||||
if (vio->write_packet(vio, (unsigned char *)outbuf.pvBuffer, outbuf.cbBuffer))
|
||||
{
|
||||
log_error(SEC_E_OK, "communicaton error(write)");
|
||||
log_error(SEC_E_OK, "communication error(write)");
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
|
@ -39,7 +39,7 @@
|
||||
/*
|
||||
This intends to support *BSD's, macOS, Solaris, AIX, HP-UX, and Linux.
|
||||
|
||||
specificly:
|
||||
specifically:
|
||||
FreeBSD/OpenBSD/DragonFly/macOS (statfs) NetBSD (statvfs) uses getmntinfo().
|
||||
Linux can use getmntent_r(), but we've just used getmntent for simplification.
|
||||
Linux/Solaris/AIX/HP-UX uses setmntent()/getmntent().
|
||||
|
@ -381,7 +381,7 @@ int fill_linux_info(THD *thd, TABLE_LIST *tables)
|
||||
}
|
||||
|
||||
/**
|
||||
Adds varios bits of information to the I_S.FEEDBACK
|
||||
Adds various bits of information to the I_S.FEEDBACK
|
||||
*/
|
||||
int fill_misc_data(THD *thd, TABLE_LIST *tables)
|
||||
{
|
||||
|
@ -481,7 +481,7 @@ hs_longrun_thread_hs::op_insert(record_value& rec)
|
||||
cli->response_recv(numflds);
|
||||
if (arg.sh.verbose > 10) {
|
||||
const string_ref *row = cli->get_next_row();
|
||||
fprintf(stderr, "HS op=+ errrcode=%d errmess=[%s]\n", cli->get_error_code(),
|
||||
fprintf(stderr, "HS op=+ errcode=%d errmess=[%s]\n", cli->get_error_code(),
|
||||
row ? to_string(row[0]).c_str() : "");
|
||||
}
|
||||
const bool op_success = cli->get_error_code() == 0;
|
||||
|
@ -101,7 +101,7 @@ struct cmd_exec_args {
|
||||
uint32_t limit;
|
||||
uint32_t skip;
|
||||
string_ref mod_op;
|
||||
const string_ref *uvals; /* size must be pst->retfieelds.size() */
|
||||
const string_ref *uvals; /* size must be pst->retfields.size() */
|
||||
const record_filter *filters;
|
||||
int invalues_keypart;
|
||||
const string_ref *invalues;
|
||||
|
@ -79,7 +79,7 @@ to be installed on your system.
|
||||
If this option is given, a copy of each file will be saved with
|
||||
the given suffix that contains the suggested changes. This does
|
||||
not require any external programs. Note that this does not
|
||||
automagially add a dot between the original filename and the
|
||||
automatically add a dot between the original filename and the
|
||||
suffix. If you want the dot, you have to include it in the option
|
||||
argument.
|
||||
|
||||
|
@ -51,7 +51,7 @@ static char *store_str(char *to, const MYSQL_CONST_LEX_STRING *from)
|
||||
/**
|
||||
Convert string of 512 bits (64 bytes) to hex representation
|
||||
|
||||
@param to pointer to the result puffer
|
||||
@param to pointer to the result buffer
|
||||
(should be at least 64*2 bytes)
|
||||
@param str pointer to 512 bits (64 bytes string)
|
||||
*/
|
||||
@ -191,7 +191,7 @@ static int validate(const MYSQL_CONST_LEX_STRING *username,
|
||||
buff[key_len]= 0; // safety
|
||||
memset(hash, 0, sizeof(hash));
|
||||
my_sha512(hash, buff, key_len);
|
||||
// safety: rewrite password with zerows
|
||||
// safety: rewrite password with zeros
|
||||
memset(buff, 0, password->length);
|
||||
if (mysql_real_connect_local(mysql) == NULL)
|
||||
goto sql_error;
|
||||
|
@ -32,7 +32,7 @@
|
||||
*/
|
||||
#define QRT_POSITIVE_POWER_FILLER ""
|
||||
/*
|
||||
Filler for fractional number. Similiary to whole number
|
||||
Filler for fractional number. Similarly to whole number
|
||||
*/
|
||||
#define QRT_NEGATIVE_POWER_FILLER "0"
|
||||
|
||||
|
@ -2676,7 +2676,7 @@ static int server_audit_init(void *p __attribute__((unused)))
|
||||
PLUGIN_STR_VERSION, PLUGIN_DEBUG_VERSION);
|
||||
|
||||
/* The Query Cache shadows TABLE events if the result is taken from it */
|
||||
/* so we warn users if both Query Cashe and TABLE events enabled. */
|
||||
/* so we warn users if both Query Caсhe and TABLE events enabled. */
|
||||
if (!started_mysql && FILTER(EVENT_TABLE))
|
||||
{
|
||||
ulonglong *qc_size= (ulonglong *) dlsym(RTLD_DEFAULT, "query_cache_size");
|
||||
|
@ -287,7 +287,7 @@ public:
|
||||
|
||||
/*
|
||||
Convert in-record representation to binlog representation.
|
||||
We tranfer UUID values in binlog by compressing in-memory representation.
|
||||
We transfer UUID values in binlog by compressing in-memory representation.
|
||||
This makes replication between UUID and BINARY(16) simpler:
|
||||
|
||||
Transferring by compressing the in-record representation would require
|
||||
|
@ -72,7 +72,7 @@ class UUIDv7: public Type_handler_uuid_new::Fbt
|
||||
}
|
||||
|
||||
/*
|
||||
We have 12 bits for to ensure monotonocity. Let's store microseconds
|
||||
We have 12 bits to ensure monotonicity. Let's store microseconds
|
||||
there (from 0 to 999) as described in section 6.2, Method 3 of RFC 9562,
|
||||
and use two remaining bits as a counter, thus allowing 4000 UUIDv7
|
||||
values to be generated within one millisecond.
|
||||
|
@ -196,7 +196,7 @@ maria_declare_plugin(versioning)
|
||||
&versioning_plugin,
|
||||
"test_versioning",
|
||||
"MariaDB Corp",
|
||||
"System Vesioning testing features",
|
||||
"System Versioning testing features",
|
||||
PLUGIN_LICENSE_GPL,
|
||||
versioning_plugin_init, /* Plugin Init */
|
||||
versioning_plugin_deinit, /* Plugin Deinit */
|
||||
|
@ -3161,7 +3161,7 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
|
||||
if (mysql->net.last_errno == CR_SERVER_LOST)
|
||||
set_mysql_extended_error(mysql, CR_SERVER_LOST, unknown_sqlstate,
|
||||
ER(CR_SERVER_LOST_EXTENDED),
|
||||
"Setting intital database",
|
||||
"Setting initial database",
|
||||
errno);
|
||||
goto error;
|
||||
}
|
||||
|
@ -1005,7 +1005,7 @@ fractional:
|
||||
else
|
||||
date[4]= 0;
|
||||
|
||||
/* Check for exponent part: E<gigit> | E<sign><digit> */
|
||||
/* Check for exponent part: E<digit> | E<sign><digit> */
|
||||
/* (may occur as result of %g formatting of time value) */
|
||||
if ((end - str) > 1 &&
|
||||
(*str == 'e' || *str == 'E') &&
|
||||
|
@ -94,7 +94,7 @@ static const uchar *const CZ_SORT_TABLE[] = {
|
||||
};
|
||||
|
||||
/*
|
||||
These define the valuse for the double chars that need to be
|
||||
These define the values for the double chars that need to be
|
||||
sorted as they were single characters -- in Czech these are
|
||||
'ch', 'Ch' and 'CH'.
|
||||
*/
|
||||
@ -396,7 +396,7 @@ static my_bool my_like_range_czech(CHARSET_INFO *cs __attribute__((unused)),
|
||||
{ continue; }
|
||||
if (value <= 2) /* End of pass or end of string */
|
||||
{ break; }
|
||||
if (value == 255) /* Double char too compicated */
|
||||
if (value == 255) /* Double char too complicated */
|
||||
{ break; }
|
||||
|
||||
*min_str++= *max_str++ = *ptr;
|
||||
|
@ -488,7 +488,7 @@ my_strnxfrm_ret_t my_strnxfrm_mb_internal(CHARSET_INFO *cs,
|
||||
}
|
||||
|
||||
/*
|
||||
A thourough loop, checking all possible limits:
|
||||
A thorough loop, checking all possible limits:
|
||||
"se", "nweights" and "de".
|
||||
*/
|
||||
for (; src < se && *nweights && dst < de; (*nweights)--)
|
||||
|
@ -1699,7 +1699,7 @@ my_strntoull10rnd_8bit(CHARSET_INFO *cs __attribute__((unused)),
|
||||
ul= ul * 10 + ch;
|
||||
}
|
||||
|
||||
if (str >= end) /* Small number without dots and expanents */
|
||||
if (str >= end) /* Small number without dots and exponents */
|
||||
{
|
||||
*endptr= (char*) str;
|
||||
if (negative)
|
||||
@ -2074,7 +2074,7 @@ uint my_strxfrm_flag_normalize(CHARSET_INFO *cs, uint flags)
|
||||
reverse order for that level, that is, starting with
|
||||
the last character and ending with the first character.
|
||||
|
||||
If nether DESC nor REVERSE flags are give,
|
||||
If neither DESC nor REVERSE flags are give,
|
||||
the string is not changed.
|
||||
|
||||
*/
|
||||
|
@ -609,7 +609,7 @@ int my_strnncollsp_tis620_nopad(CHARSET_INFO * cs __attribute__((unused)),
|
||||
return my_strnncoll_tis620(cs, a0, a_length, b0, b_length, FALSE);
|
||||
}
|
||||
/*
|
||||
strnxfrm replacment, convert Thai string to sortable string
|
||||
strnxfrm replacement, convert Thai string to sortable string
|
||||
|
||||
Arg: Destination buffer, source string, dest length and source length
|
||||
Ret: Converted string size
|
||||
|
@ -28,7 +28,7 @@
|
||||
Features that are not implemented yet:
|
||||
- No Normalization From D is done
|
||||
+ No decomposition is done
|
||||
+ No Thai/Lao orderding is done
|
||||
+ No Thai/Lao ordering is done
|
||||
- No combining marks processing is done
|
||||
*/
|
||||
|
||||
@ -32274,7 +32274,7 @@ my_uca_collation_can_optimize_no_contractions(CHARSET_INFO *cs)
|
||||
Diff command:
|
||||
<d1> := < - Identifies a primary difference.
|
||||
<d2> := << - Identifies a secondary difference.
|
||||
<d3> := <<< - Idenfifies a tertiary difference.
|
||||
<d3> := <<< - Identifies a tertiary difference.
|
||||
|
||||
|
||||
Collation rules:
|
||||
@ -32352,7 +32352,7 @@ typedef struct my_coll_lexem_st
|
||||
|
||||
|
||||
/*
|
||||
Initialize collation rule lexical anilizer
|
||||
Initialize collation rule lexical analyzer
|
||||
|
||||
SYNOPSIS
|
||||
my_coll_lexem_init
|
||||
@ -32703,7 +32703,7 @@ my_coll_rule_reset(MY_COLL_RULE *r)
|
||||
/*
|
||||
Shift methods:
|
||||
Simple: "&B < C" : weight('C') = weight('B') + 1
|
||||
Expand: weght('C') = { weight('B'), weight(last_non_ignorable) + 1 }
|
||||
Expand: weight('C') = { weight('B'), weight(last_non_ignorable) + 1 }
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
@ -33353,7 +33353,7 @@ my_coll_parser_scan_rule(MY_COLL_RULE_PARSER *p)
|
||||
@param p Collation customization parser
|
||||
|
||||
@return
|
||||
@retval 0 if collation customozation expression was not scanned.
|
||||
@retval 0 if collation customization expression was not scanned.
|
||||
@retval 1 if collation customization expression was scanned.
|
||||
*/
|
||||
|
||||
@ -33562,7 +33562,7 @@ apply_shift(MY_CHARSET_LOADER *loader,
|
||||
'a' must be sorted before 'A'.
|
||||
|
||||
Note, there are no real collations in CLDR which shift
|
||||
after and before two neighbourgh characters. We need this
|
||||
after and before two adjacent characters. We need this
|
||||
just in case. Reserving 4096 (0x1000) weights for such
|
||||
cases is perfectly enough.
|
||||
*/
|
||||
@ -34243,7 +34243,7 @@ my_uca_level_booster_2bytes_disable_context_dependent(
|
||||
2 (two ASCII chars) 0 (both ignorable) {0,0} [IGN]
|
||||
2 (two ASCII chars) 1 (e.g. Czech "ch") {X,0}
|
||||
2 (two ASCII chars) 1 (e.g. ignorable + non-ignorable) {X,0}
|
||||
2 (two ASCII chars) 2 (two ASCII chars, one weigth each) {X,0}
|
||||
2 (two ASCII chars) 2 (two ASCII chars, one weight each) {X,0}
|
||||
2 (two ASCII chars) 3+ (contraction with a long expansion) {0,0} [E3]
|
||||
1 (one 2-byte char) 0 (ignorable) {0,0} [IGN]
|
||||
1 (one 2-byte char) 1 {X,0}
|
||||
|
@ -63,7 +63,7 @@ my_mb_wc_utf16_quick(my_wc_t *pwc, const uchar *s, const uchar *e)
|
||||
if (s + 4 > e)
|
||||
return MY_CS_TOOSMALL4;
|
||||
|
||||
if (!MY_UTF16_LOW_HEAD(s[2])) /* Broken surrigate pair */
|
||||
if (!MY_UTF16_LOW_HEAD(s[2])) /* Broken surrogate pair */
|
||||
return MY_CS_ILSEQ;
|
||||
|
||||
*pwc= MY_UTF16_WC4(s[0], s[1], s[2], s[3]);
|
||||
|
@ -1229,7 +1229,7 @@ struct charset_info_st my_charset_utf8mb3_nopad_bin=
|
||||
#ifdef HAVE_UTF8_GENERAL_CS
|
||||
|
||||
/*
|
||||
* These functions bacically do the same as their original, except
|
||||
* These functions basically do the same as their original, except
|
||||
* that they return 0 only when two comparing unicode strings are
|
||||
* strictly the same in case-sensitive way. See "save_diff" local
|
||||
* variable to what they actually do.
|
||||
@ -1329,7 +1329,7 @@ static int my_strnncollsp_utf8mb3_cs(CHARSET_INFO *cs,
|
||||
space. It means if we meet a character greater
|
||||
than space, it always means that the longer string
|
||||
is greater. So we can reuse the same loop from the
|
||||
8bit version, without having to process full multibute
|
||||
8bit version, without having to process full multibyte
|
||||
sequences.
|
||||
*/
|
||||
if ((res= slen == tlen ? 0 :
|
||||
|
@ -17,7 +17,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
|
||||
@ -579,12 +579,12 @@ void do_mini_right_shift(decimal_t *dec, int shift, int beg, int last)
|
||||
dec number to be shifted
|
||||
shift number of decimal positions
|
||||
shift > 0 means shift to left shift
|
||||
shift < 0 meand right shift
|
||||
shift < 0 means right shift
|
||||
NOTE
|
||||
In fact it is multipling on 10^shift.
|
||||
In fact it is multiplying on 10^shift.
|
||||
RETURN
|
||||
E_DEC_OK OK
|
||||
E_DEC_OVERFLOW operation lead to overflow, number is untoched
|
||||
E_DEC_OVERFLOW operation lead to overflow, number is untouched
|
||||
E_DEC_TRUNCATED number was rounded to fit into buffer
|
||||
*/
|
||||
|
||||
|
@ -91,7 +91,7 @@ register char **argv[];
|
||||
break;
|
||||
case '#':
|
||||
DBUG_PUSH (++pos);
|
||||
*(pos--) = '\0'; /* Skippa argument */
|
||||
*(pos--) = '\0'; /* Skip argument */
|
||||
break;
|
||||
case 'V':
|
||||
version=1;
|
||||
@ -164,7 +164,7 @@ void init_case_convert()
|
||||
to_lower[ *higher_pos++ ] = (char) *lower_pos++;
|
||||
}
|
||||
|
||||
/* sets upp sortorder; higer_pos character (upper and lower) is */
|
||||
/* sets up sortorder; higher_pos character (upper and lower) is */
|
||||
/* changed to lower_pos character */
|
||||
|
||||
#if defined(HPUX10)
|
||||
|
@ -242,7 +242,7 @@ size_t my_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);
|
||||
|
@ -429,7 +429,7 @@ int my_xml_parse(MY_XML_PARSER *p,const char *str, size_t len)
|
||||
/*
|
||||
We are in <!DOCTYPE>, e.g.
|
||||
<!DOCTYPE name SYSTEM "SystemLiteral">
|
||||
<!DOCTYPE name PUBLIC "PublidLiteral" "SystemLiteral">
|
||||
<!DOCTYPE name PUBLIC "PublicLiteral" "SystemLiteral">
|
||||
Just skip "SystemLiteral" and "PublicidLiteral"
|
||||
*/
|
||||
}
|
||||
|
@ -121,7 +121,7 @@ static void get_options(int *argc, char ***argv);
|
||||
|
||||
|
||||
/*
|
||||
Abort unless given experssion is non-zero.
|
||||
Abort unless given expression is non-zero.
|
||||
|
||||
SYNOPSIS
|
||||
DIE_UNLESS(expr)
|
||||
|
@ -7861,7 +7861,7 @@ static void test_explain_bug()
|
||||
|
||||
if ( mysql_get_server_version(mysql) >= 50027 )
|
||||
{
|
||||
/* The patch for bug#23037 changes column type of DEAULT to blob */
|
||||
/* The patch for bug#23037 changes column type of DEFAULT to blob */
|
||||
verify_prepare_field(result, 4, "Default", "COLUMN_DEFAULT",
|
||||
MYSQL_TYPE_BLOB, 0, 0, "information_schema", 0, 0);
|
||||
}
|
||||
@ -13779,7 +13779,7 @@ static void test_bug8722()
|
||||
myquery(rc);
|
||||
/* Note: if you uncomment following block everything works fine */
|
||||
/*
|
||||
rc= mysql_query(mysql, "sellect * from v1");
|
||||
rc= mysql_query(mysql, "select * from v1");
|
||||
myquery(rc);
|
||||
mysql_free_result(mysql_store_result(mysql));
|
||||
*/
|
||||
@ -13917,7 +13917,7 @@ static void test_bug9159()
|
||||
}
|
||||
|
||||
|
||||
/* Crash when opening a cursor to a query with DISTICNT and no key */
|
||||
/* Crash when opening a cursor to a query with DISTINCT and no key */
|
||||
|
||||
static void test_bug9520()
|
||||
{
|
||||
@ -14233,7 +14233,7 @@ static void test_bug11111()
|
||||
|
||||
/*
|
||||
Check that proper cleanups are done for prepared statement when
|
||||
fetching thorugh a cursor.
|
||||
fetching through a cursor.
|
||||
*/
|
||||
|
||||
static void test_bug10729()
|
||||
@ -15052,7 +15052,7 @@ static void test_bug11909()
|
||||
myquery(rc);
|
||||
}
|
||||
|
||||
/* Cursors: opening a cursor to a compilicated query with ORDER BY */
|
||||
/* Cursors: opening a cursor to a complicated query with ORDER BY */
|
||||
|
||||
static void test_bug11901()
|
||||
{
|
||||
@ -15927,7 +15927,7 @@ static void test_bug17667()
|
||||
char line_buffer[MAX_TEST_QUERY_LENGTH*2];
|
||||
/* more than enough room for the query and some marginalia. */
|
||||
|
||||
/* Prepared statments always occurs twice in log */
|
||||
/* Prepared statements always occurs twice in log */
|
||||
if (statement_cursor->qt == QT_PREPARED)
|
||||
expected_hits++;
|
||||
|
||||
|
@ -111,7 +111,7 @@ prev_record_reads(POSITION *position, uint idx, DEPEND found_ref,
|
||||
{
|
||||
found_ref&= ~pos->table->map;
|
||||
|
||||
/* Found depent table */
|
||||
/* Found dependent table */
|
||||
if (pos->type == EQ_REF)
|
||||
{
|
||||
if (!found_ref)
|
||||
@ -127,8 +127,8 @@ prev_record_reads(POSITION *position, uint idx, DEPEND found_ref,
|
||||
if (pos->type != CACHE)
|
||||
{
|
||||
/*
|
||||
We are not depending on the curren table
|
||||
There are 'records_out' rows with idenitical rows
|
||||
We are not depending on the current table
|
||||
There are 'records_out' rows with identical rows
|
||||
value for our depending tables.
|
||||
We are ignoring join_cache as in this case the
|
||||
preceding tables row combination can change for
|
||||
|
@ -261,10 +261,10 @@ class thread_pool_generic : public thread_pool
|
||||
/** Last time thread was created*/
|
||||
std::chrono::system_clock::time_point m_last_thread_creation;
|
||||
|
||||
/** Minimumum number of threads in this pool.*/
|
||||
/** Minimum number of threads in this pool.*/
|
||||
unsigned int m_min_threads;
|
||||
|
||||
/** Maximimum number of threads in this pool. */
|
||||
/** Maximum number of threads in this pool. */
|
||||
unsigned int m_max_threads;
|
||||
|
||||
/* maintenance related statistics (see maintenance()) */
|
||||
@ -371,7 +371,7 @@ public:
|
||||
{
|
||||
if (pool)
|
||||
{
|
||||
/* EXecute callback in threadpool*/
|
||||
/* Execute callback in threadpool*/
|
||||
thr_timer_init(this, submit_task, this);
|
||||
}
|
||||
else
|
||||
@ -951,7 +951,7 @@ thread_pool_generic::~thread_pool_generic()
|
||||
*/
|
||||
m_aio.reset();
|
||||
|
||||
/* Also stop the maintanence task early. */
|
||||
/* Also stop the maintenance task early. */
|
||||
if (m_maintenance_timer)
|
||||
m_maintenance_timer->disarm();
|
||||
|
||||
|
@ -41,7 +41,7 @@ void test_my_safe_print_str()
|
||||
my_safe_print_str("LEGAL", 65535);
|
||||
fprintf(stderr, "\n===== Above is a junk, but it is expected. =====\n");
|
||||
# endif
|
||||
fprintf(stderr, "\n===== Nornal length test =====\n");
|
||||
fprintf(stderr, "\n===== Normal length test =====\n");
|
||||
my_safe_print_str("LEGAL", 5);
|
||||
fprintf(stderr, "\n===== NULL =====\n");
|
||||
my_safe_print_str(0, 5);
|
||||
|
@ -470,7 +470,7 @@ static void end_timer(ulong start_time,char *buff)
|
||||
|
||||
This is to test that the component have the expected behaviour.
|
||||
This is just plain simple: test that it works. For example, test
|
||||
that you can unpack what you packed, adding gives the sum, pincing
|
||||
that you can unpack what you packed, adding gives the sum, pinching
|
||||
the duck makes it quack.
|
||||
|
||||
This is what everybody does when they write tests.
|
||||
@ -630,7 +630,7 @@ static void end_timer(ulong start_time,char *buff)
|
||||
@subsection JustToBeSafeTest Writing unnecessarily large tests
|
||||
|
||||
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
|
||||
examples).
|
||||
|
||||
|
@ -414,7 +414,7 @@ void mdev10963()
|
||||
*/
|
||||
for (; n_checks; n_checks--, rewind(file))
|
||||
{
|
||||
// copied size is an estimate can be incremeneted to greater than total_size
|
||||
// copied size is an estimate can be incremented to greater than total_size
|
||||
ulong copied_size= 0;
|
||||
|
||||
res= reinit_io_cache(&info, READ_CACHE, 0L, FALSE, FALSE);
|
||||
|
@ -216,7 +216,7 @@ int vio_ssl_close(Vio *vio)
|
||||
alert on socket shutdown to avoid truncation attacks. However, this can
|
||||
cause problems since we often hold a lock during shutdown and this IO can
|
||||
take an unbounded amount of time to complete. Since our packets are self
|
||||
describing with length, we aren't vunerable to these attacks. Therefore,
|
||||
describing with length, we aren't vulnerable to these attacks. Therefore,
|
||||
we just shutdown by closing the socket (quiet shutdown).
|
||||
*/
|
||||
SSL_set_quiet_shutdown(ssl, 1);
|
||||
|
@ -341,7 +341,7 @@ static bool IsPortInUse(unsigned short port)
|
||||
|
||||
/*
|
||||
Prefer IPv6 socket to IPv4, since we'll use IPv6 dual socket,
|
||||
which coveres both IP versions.
|
||||
which covers both IP versions.
|
||||
*/
|
||||
for (a = ai; a; a = a->ai_next)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user