Fix typos in C comments in miscellaneous files
This commit is contained in:
parent
5f7e883336
commit
5f7c2a617f
@ -1475,7 +1475,7 @@ sig_handler mysql_end(int sig)
|
|||||||
User, password, and database are UTF8 encoded, prior to the function,
|
User, password, and database are UTF8 encoded, prior to the function,
|
||||||
this needs to be fixed, in case they contain non-ASCIIs.
|
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.
|
to survive upgrade without losing connectivity.
|
||||||
*/
|
*/
|
||||||
static void maybe_convert_charset(const char **user, const char **password,
|
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',
|
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).
|
and '\-' (sandbox, see following comment).
|
||||||
*/
|
*/
|
||||||
if (real_binary_mode)
|
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
|
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
|
we have to run REPAIR on it. In this case we write a nicer message
|
||||||
than "Please do "REPAIR TABLE""...
|
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.
|
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 "))
|
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
|
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.
|
table data should be skipped too.
|
||||||
*/
|
*/
|
||||||
if (!opt_events && !cmp_database(db, "mysql") &&
|
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;"))
|
if (exec_sql(mysql, "SET TIME_ZONE=@save_tz;"))
|
||||||
DBUG_RETURN(1);
|
DBUG_RETURN(1);
|
||||||
}
|
}
|
||||||
/* Restore constrains and triggers */
|
/* Restore constraints and triggers */
|
||||||
for (const auto &create_trigger_def : triggers)
|
for (const auto &create_trigger_def : triggers)
|
||||||
{
|
{
|
||||||
if (exec_sql(mysql, create_trigger_def))
|
if (exec_sql(mysql, create_trigger_def))
|
||||||
|
@ -8625,7 +8625,7 @@ void handle_no_error(struct st_command *command)
|
|||||||
|
|
||||||
SYNOPSIS
|
SYNOPSIS
|
||||||
read_stmt_results
|
read_stmt_results
|
||||||
stmt - prepare statemet
|
stmt - prepare statement
|
||||||
mysql - mysql handle
|
mysql - mysql handle
|
||||||
command - current command pointer
|
command - current command pointer
|
||||||
ds - output buffer where to store result form query
|
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;
|
rs_output= &rs_cmp_result;
|
||||||
}
|
}
|
||||||
else
|
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
|
Log the query into the output buffer
|
||||||
|
@ -382,7 +382,7 @@ open_file(
|
|||||||
@param [in,out] buf read the file in buffer
|
@param [in,out] buf read the file in buffer
|
||||||
@param [in] partial_page_read enable when to read the
|
@param [in] partial_page_read enable when to read the
|
||||||
remaining buffer for first page.
|
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
|
@param [in,out] fil_in file pointer created for the
|
||||||
tablespace.
|
tablespace.
|
||||||
@retval no. of bytes read.
|
@retval no. of bytes read.
|
||||||
@ -590,7 +590,7 @@ Rewrite the checksum for the page.
|
|||||||
|
|
||||||
@retval true : do rewrite
|
@retval true : do rewrite
|
||||||
@retval false : skip the rewrite as checksum stored match with
|
@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)
|
static bool update_checksum(byte* page, uint32_t flags)
|
||||||
{
|
{
|
||||||
@ -1875,7 +1875,7 @@ first_non_zero:
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!read_from_stdin) {
|
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. */
|
any acquired. */
|
||||||
fclose(fil_in);
|
fclose(fil_in);
|
||||||
}
|
}
|
||||||
|
@ -147,7 +147,7 @@ struct datadir_thread_ctxt_t {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
Retirn true if character if file separator */
|
Return true if character is file separator */
|
||||||
bool
|
bool
|
||||||
is_path_separator(char c)
|
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
|
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
|
This effectively re-plays all DROP DATABASE statements happened
|
||||||
in between base backup and incremental backup creation time.
|
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);
|
MYSQL_ROW r = mysql_fetch_row(res);
|
||||||
if (r && r[0] && strcmp(r[0], "1"))
|
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);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
mysql_free_result(res);
|
mysql_free_result(res);
|
||||||
|
@ -101,7 +101,7 @@ extern my_bool opt_ssl_verify_server_cert, opt_use_ssl;
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
get_os_user()
|
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)
|
#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
|
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
|
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.
|
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
|
same across the cluster. If joiner node have different wsrep_gtid_domain_id
|
||||||
we should still receive effective domain id from the donor node,
|
we should still receive effective domain id from the donor node,
|
||||||
and use it.
|
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
|
static
|
||||||
size_t fetch_buffer_header_cb(char *ptr, size_t size, size_t nmemb,
|
size_t fetch_buffer_header_cb(char *ptr, size_t size, size_t nmemb,
|
||||||
void *data)
|
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. */
|
deallocating the array. */
|
||||||
jsmntok_t *
|
jsmntok_t *
|
||||||
json_tokenise(char *json, size_t len, int initial_tokens)
|
json_tokenise(char *json, size_t len, int initial_tokens)
|
||||||
|
@ -219,7 +219,7 @@ uint xtrabackup_compress = FALSE;
|
|||||||
uint xtrabackup_compress_threads;
|
uint xtrabackup_compress_threads;
|
||||||
ulonglong xtrabackup_compress_chunk_size = 0;
|
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) */
|
in milliseconds (default is 1 second) */
|
||||||
ulint xtrabackup_log_copy_interval = 1000;
|
ulint xtrabackup_log_copy_interval = 1000;
|
||||||
static ulong max_buf_pool_modified_pct;
|
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;
|
typedef std::map<space_id_t,std::string> space_id_to_name_t;
|
||||||
|
|
||||||
struct ddl_tracker_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;
|
space_id_to_name_t tables_in_backup;
|
||||||
/** Drop operations found in redo log. */
|
/** Drop operations found in redo log. */
|
||||||
std::set<space_id_t> drops;
|
std::set<space_id_t> drops;
|
||||||
@ -651,7 +651,7 @@ void CorruptedPages::zero_out_free_pages()
|
|||||||
{
|
{
|
||||||
uint32_t space_id = space_it->first;
|
uint32_t space_id = space_it->first;
|
||||||
const std::string &space_name = space_it->second.space_name;
|
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().
|
// in innodb_shutdown().
|
||||||
xb_load_single_table_tablespace(space_name, false);
|
xb_load_single_table_tablespace(space_name, false);
|
||||||
fil_space_t *space = fil_space_t::get(space_id);
|
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
|
/* The only reason why Galera/binlog info is written before
|
||||||
wait_for_ibbackup_log_copy_finish() is that after that call the xtrabackup
|
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
|
thus, any streaming from innobackupex would interfere. The only way to
|
||||||
avoid that is to have a single process, i.e. merge innobackupex and
|
avoid that is to have a single process, i.e. merge innobackupex and
|
||||||
xtrabackup. */
|
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] db_name database name
|
||||||
@param[in] file_name file name with suffix
|
@param[in] file_name file name with suffix
|
||||||
@param[in] arg destination path, used in incremental backup to notify, that
|
@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 */
|
@return true */
|
||||||
static ibool prepare_handle_new_files(const char *data_home_dir,
|
static ibool prepare_handle_new_files(const char *data_home_dir,
|
||||||
|
@ -315,7 +315,7 @@ int main(int argc,char *argv[])
|
|||||||
code=atoi(*argv);
|
code=atoi(*argv);
|
||||||
msg = strerror(code);
|
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);
|
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 */
|
} /* free_pointer_array */
|
||||||
|
|
||||||
|
|
||||||
/* Code for replace rutines */
|
/* Code for replace routines */
|
||||||
|
|
||||||
#define SET_MALLOC_HUNC 64
|
#define SET_MALLOC_HUNC 64
|
||||||
|
|
||||||
@ -342,7 +342,7 @@ typedef struct st_rep_set {
|
|||||||
uint found_len; /* Best match to date */
|
uint found_len; /* Best match to date */
|
||||||
int found_offset;
|
int found_offset;
|
||||||
uint table_offset;
|
uint table_offset;
|
||||||
uint size_of_bits; /* For convinience */
|
uint size_of_bits; /* For convenience */
|
||||||
} REP_SET;
|
} REP_SET;
|
||||||
|
|
||||||
typedef struct st_rep_sets {
|
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 *c_str; /* Current position in JSON string */
|
||||||
const uchar *str_end; /* The end on the string. */
|
const uchar *str_end; /* The end on the string. */
|
||||||
my_wc_t c_next; /* UNICODE of the last read character */
|
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. */
|
int error; /* error code. */
|
||||||
|
|
||||||
CHARSET_INFO *cs; /* Character set of the JSON string. */
|
CHARSET_INFO *cs; /* Character set of the JSON string. */
|
||||||
|
@ -125,7 +125,7 @@ void *lf_alloc_new(LF_PINS *pins);
|
|||||||
C_MODE_END
|
C_MODE_END
|
||||||
|
|
||||||
/*
|
/*
|
||||||
extendible hash, lf_hash.cc
|
extensible hash, lf_hash.cc
|
||||||
*/
|
*/
|
||||||
#include <hash.h>
|
#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 single byte character
|
||||||
@return >1 on a multi-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
|
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_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_NOT_A_TABLE 130 /* not a MYI file - no signature */
|
||||||
#define HA_ERR_WRONG_COMMAND 131 /* Command not supported */
|
#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_NO_ACTIVE_RECORD 133 /* No record read in update() */
|
||||||
#define HA_ERR_RECORD_DELETED 134 /* A record is not there */
|
#define HA_ERR_RECORD_DELETED 134 /* A record is not there */
|
||||||
#define HA_ERR_RECORD_FILE_FULL 135 /* No more room in file */
|
#define HA_ERR_RECORD_FILE_FULL 135 /* No more room in file */
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
#include "little_endian.h"
|
#include "little_endian.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* convenienve helpers */
|
/* convenience helpers */
|
||||||
static inline float get_float(const void *from)
|
static inline float get_float(const void *from)
|
||||||
{
|
{
|
||||||
float to;
|
float to;
|
||||||
|
@ -263,7 +263,7 @@ extern HA_KEYSEG *ha_find_null(HA_KEYSEG *keyseg, const uchar *a);
|
|||||||
returned to the SQL layer.
|
returned to the SQL layer.
|
||||||
2=CHECK_OUT_OF_RANGE - the index tuple is outside of the range that we're
|
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
|
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).
|
scanning and return HA_ERR_END_OF_FILE right away).
|
||||||
3=CHECK_ABORTED_BY_USER - the engine must stop scanning and should return
|
3=CHECK_ABORTED_BY_USER - the engine must stop scanning and should return
|
||||||
HA_ERR_ABORTED_BY_USER right away
|
HA_ERR_ABORTED_BY_USER right away
|
||||||
|
@ -71,7 +71,7 @@ struct my_option
|
|||||||
is created, but a long option still
|
is created, but a long option still
|
||||||
can be identified uniquely in the
|
can be identified uniquely in the
|
||||||
my_get_one_option() callback.
|
my_get_one_option() callback.
|
||||||
If an opton needs neither special
|
If an option needs neither special
|
||||||
treatment in the my_get_one_option()
|
treatment in the my_get_one_option()
|
||||||
nor one-letter short equivalent
|
nor one-letter short equivalent
|
||||||
use id=0
|
use id=0
|
||||||
|
@ -489,7 +489,7 @@ typedef unsigned short ushort;
|
|||||||
#include <my_alloca.h>
|
#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
|
duplicate declaration of __cxa_pure_virtual, solved by declaring it a
|
||||||
weak symbol.
|
weak symbol.
|
||||||
*/
|
*/
|
||||||
@ -684,7 +684,7 @@ typedef SOCKET_SIZE_TYPE size_socket;
|
|||||||
*/
|
*/
|
||||||
#define MALLOC_OVERHEAD (8+24)
|
#define MALLOC_OVERHEAD (8+24)
|
||||||
|
|
||||||
/* get memory in huncs */
|
/* get memory in hunks */
|
||||||
#define ONCE_ALLOC_INIT (uint) 4096
|
#define ONCE_ALLOC_INIT (uint) 4096
|
||||||
/* Typical record cache */
|
/* Typical record cache */
|
||||||
#define RECORD_CACHE_SIZE (uint) (128*1024)
|
#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);
|
int (*write_function)(struct st_io_cache *,const uchar *,size_t);
|
||||||
/*
|
/*
|
||||||
Specifies the type of the cache. Depending on the type of the cache
|
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
|
results. Details to be documented later
|
||||||
*/
|
*/
|
||||||
enum cache_type type;
|
enum cache_type type;
|
||||||
|
@ -34,7 +34,7 @@ extern "C" {
|
|||||||
#define MY_XML_FLAG_RELATIVE_NAMES 1
|
#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,
|
call-back functions: i.e. skip leading/trailing spaces,
|
||||||
\r, \n, \t characters.
|
\r, \n, \t characters.
|
||||||
*/
|
*/
|
||||||
|
@ -102,7 +102,7 @@ typedef struct st_mysql_xid MYSQL_XID;
|
|||||||
/* MariaDB plugin types */
|
/* MariaDB plugin types */
|
||||||
/** Client and server password validation */
|
/** Client and server password validation */
|
||||||
#define MariaDB_PASSWORD_VALIDATION_PLUGIN 8
|
#define MariaDB_PASSWORD_VALIDATION_PLUGIN 8
|
||||||
/**< Encryption and key managment plugins */
|
/**< Encryption and key management plugins */
|
||||||
#define MariaDB_ENCRYPTION_PLUGIN 9
|
#define MariaDB_ENCRYPTION_PLUGIN 9
|
||||||
/**< Plugins for SQL data storage types */
|
/**< Plugins for SQL data storage types */
|
||||||
#define MariaDB_DATA_TYPE_PLUGIN 10
|
#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
|
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.
|
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.
|
should be set to the number of bytes written.
|
||||||
*/
|
*/
|
||||||
int (*crypt_ctx_update)(void *ctx, const unsigned char* src, unsigned int slen,
|
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);
|
(PSI_prepared_stmt *prepared_stmt);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
repreare a prepare statement.
|
reprepare a prepare statement.
|
||||||
@param prepared_stmt prepared statement.
|
@param prepared_stmt prepared statement.
|
||||||
*/
|
*/
|
||||||
typedef void (*reprepare_prepared_stmt_v1_t)
|
typedef void (*reprepare_prepared_stmt_v1_t)
|
||||||
|
@ -2208,7 +2208,7 @@ int cli_stmt_execute(MYSQL_STMT *stmt)
|
|||||||
DBUG_RETURN(1);
|
DBUG_RETURN(1);
|
||||||
}
|
}
|
||||||
length= (ulong) (net->write_pos - net->buff);
|
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))))
|
if (!(param_data= my_memdup(PSI_NOT_INSTRUMENTED, net->buff, length, MYF(0))))
|
||||||
{
|
{
|
||||||
set_stmt_error(stmt, CR_OUT_OF_MEMORY, unknown_sqlstate, NULL);
|
set_stmt_error(stmt, CR_OUT_OF_MEMORY, unknown_sqlstate, NULL);
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
init_dynamic_array() initiates array and allocate space for
|
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
|
Array is usable even if space allocation failed, hence, the
|
||||||
function never returns TRUE.
|
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)
|
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
|
so we have to create an all-new malloc since we overflowed
|
||||||
*/
|
*/
|
||||||
if (!(new_ptr= (uchar *) my_malloc(array->m_psi_key, size *
|
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.
|
/* There are multiple approaches to calculate crc.
|
||||||
Approach-1: Process 8 bytes then 4 bytes then 2 bytes and then 1 bytes
|
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
|
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.
|
using 8/1 combination.
|
||||||
|
|
||||||
Based on micro-benchmark testing we found that Approach-2 works best especially
|
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)
|
* FOLD = XOR(T1, T2, DATA)
|
||||||
*
|
*
|
||||||
* @param data_block 16 byte data block
|
* @param data_block 16 byte data block
|
||||||
* @param precomp precomputed rk1 constanst
|
* @param precomp precomputed rk1 constant
|
||||||
* @param fold running 16 byte folded data
|
* @param fold running 16 byte folded data
|
||||||
*
|
*
|
||||||
* @return New 16 byte folded data
|
* @return New 16 byte folded data
|
||||||
|
@ -105,7 +105,7 @@ out:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* When we have a load-store in a single-dispatch group and address overlap
|
/* 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.
|
* A group ending NOP prevents the flush.
|
||||||
*/
|
*/
|
||||||
#define GROUP_ENDING_NOP asm("ori 2,2,0" ::: "memory")
|
#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] psi_key The key to register instrumented memory
|
||||||
@param[in,out] hash The hash that is initialized
|
@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] charset The character set information
|
||||||
@param[in] size The hash size
|
@param[in] size The hash size
|
||||||
@param[in] key_offest The key offset for the hash
|
@param[in] key_offest The key offset for the hash
|
||||||
|
@ -3588,7 +3588,7 @@ dynamic_column_update_many_fmt(DYNAMIC_COLUMN *str,
|
|||||||
entry_size, header_size,
|
entry_size, header_size,
|
||||||
new_header.offset_size,
|
new_header.offset_size,
|
||||||
new_header.entry_size,
|
new_header.entry_size,
|
||||||
new_heder.header_size, column_count,
|
new_header.header_size, column_count,
|
||||||
new_header.column_count,
|
new_header.column_count,
|
||||||
add_column_count, header_end,
|
add_column_count, header_end,
|
||||||
header.data_size);
|
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)
|
if (fmt->fixed_hdr + header.header_size + header.nmpool_size > str->length)
|
||||||
{
|
{
|
||||||
DBUG_PRINT("info", ("Fixed header: %u Header size: %u "
|
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)fmt->fixed_hdr,
|
||||||
(uint)header.header_size,
|
(uint)header.header_size,
|
||||||
(uint)header.nmpool_size,
|
(uint)header.nmpool_size,
|
||||||
@ -3776,7 +3776,7 @@ mariadb_dyncol_check(DYNAMIC_COLUMN *str)
|
|||||||
i++, header.entry+= header.entry_size)
|
i++, header.entry+= header.entry_size)
|
||||||
{
|
{
|
||||||
DYNAMIC_COLUMN_VALUE store;
|
DYNAMIC_COLUMN_VALUE store;
|
||||||
// already checked by previouse pass
|
// already checked by previous pass
|
||||||
(*fmt->type_and_offset_read)(&header.type, &header.offset,
|
(*fmt->type_and_offset_read)(&header.type, &header.offset,
|
||||||
header.entry + fmt->fixed_hdr_entry,
|
header.entry + fmt->fixed_hdr_entry,
|
||||||
header.offset_size);
|
header.offset_size);
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */
|
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
|
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
|
if it ends at file-length and next read can try to read after file-length
|
||||||
(and get a EOF-error).
|
(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
|
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.
|
also info->read_pos is set to info->read_end.
|
||||||
If called through open_cached_file(), then the temporary file will
|
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().
|
my_b_flush_io_cache().
|
||||||
|
|
||||||
If one uses SEQ_READ_APPEND, then two buffers are allocated, one for
|
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))
|
if (!(max_length-=length))
|
||||||
{
|
{
|
||||||
/* Found enough charcters; Return found string */
|
/* Found enough characters; Return found string */
|
||||||
info->read_pos=pos;
|
info->read_pos=pos;
|
||||||
*to='\0';
|
*to='\0';
|
||||||
return (size_t) (to-start);
|
return (size_t) (to-start);
|
||||||
|
@ -442,7 +442,7 @@ static inline uint next_power(uint value)
|
|||||||
init_simple_key_cache()
|
init_simple_key_cache()
|
||||||
keycache pointer to the control block of a 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
|
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)
|
division_limit division limit (may be zero)
|
||||||
age_threshold age threshold (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
|
NOTE
|
||||||
The first request unlinks the block from the LRU ring. This means
|
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
|
RETURN
|
||||||
void
|
void
|
||||||
@ -2028,7 +2028,7 @@ restart:
|
|||||||
everything can happen to the block but free or another completed
|
everything can happen to the block but free or another completed
|
||||||
eviction.
|
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
|
cannot return with PAGE_WAIT_TO_BE_READ. This would work for
|
||||||
read requests and writes on dirty blocks that are not in flush
|
read requests and writes on dirty blocks that are not in flush
|
||||||
only. Waiting here on COND_FOR_REQUESTED works in all
|
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.
|
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
|
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
|
for eviction immediately. Otherwise we will unlink it from the LRU
|
||||||
ring again, without releasing the lock in between. So decrementing
|
ring again, without releasing the lock in between. So decrementing
|
||||||
the request counter and updating statistics are the only relevant
|
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);
|
keycache_pthread_mutex_unlock(&keycache->cache_lock);
|
||||||
/*
|
/*
|
||||||
As all blocks referred in 'cache' are marked by BLOCK_IN_FLUSH
|
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);
|
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)))
|
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))
|
if ((last_errno == error) && (++last_errcnt > 5))
|
||||||
goto err;
|
goto err;
|
||||||
last_errno= error;
|
last_errno= error;
|
||||||
@ -6121,7 +6121,7 @@ int resize_key_cache(KEY_CACHE *keycache, uint key_cache_block_size,
|
|||||||
|
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
The function sets new values of the division limit and the age threshold
|
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.
|
The parameters division_limit and age_threshold provide these new values.
|
||||||
|
|
||||||
RETURN VALUE
|
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.
|
Prepare for next iteration.
|
||||||
Skip partitions of size 1 as these doesn't have to be sorted
|
Skip partitions of size 1 as these doesn't have to be sorted
|
||||||
Push the larger partition and sort the smaller one first.
|
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)
|
if ((int) (high_ptr - low) <= 0)
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */
|
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
|
#define QSORT_EXTRA_CMP_ARGUMENT
|
||||||
#include "mf_qsort.c"
|
#include "mf_qsort.c"
|
||||||
|
@ -16,8 +16,8 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
Radixsort for pointers to fixed length strings.
|
Radixsort for pointers to fixed length strings.
|
||||||
A very quick sort for not to long (< 20 char) strings.
|
A very quick sort for not too long (< 20 char) strings.
|
||||||
Neads a extra buffers of number_of_elements pointers but is
|
Needs extra buffers of number_of_elements pointers but is
|
||||||
2-3 times faster than quicksort
|
2-3 times faster than quicksort
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */
|
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"
|
#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
|
Get a mask of the bits that are to be considered as 'on' at location
|
||||||
starting with 'bits'.
|
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().
|
to last_bit_mask().
|
||||||
|
|
||||||
For (bits & 63) it will return values from the series
|
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
|
We are using space compression. We have to check if longer key
|
||||||
has next character < ' ', in which case it's less than the shorter
|
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
|
This code is identical to the one in
|
||||||
strings/ctype-simple.c:my_strnncollsp_simple
|
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 */
|
/* Copy modes if possible */
|
||||||
|
|
||||||
if (MyFlags & MY_HOLD_ORIGINAL_MODES && !new_file_stat)
|
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 */
|
/* Copy modes */
|
||||||
if (chmod(to, stat_buff.st_mode & 07777))
|
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()
|
get_argument()
|
||||||
keyword Include directive keyword
|
keyword Include directive keyword
|
||||||
kwlen Length of 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
|
line line number
|
||||||
|
|
||||||
RETURN
|
RETURN
|
||||||
@ -857,7 +857,7 @@ static int search_default_file_with_ext(struct handle_option_ctx *ctx,
|
|||||||
static char *remove_end_comment(char *ptr)
|
static char *remove_end_comment(char *ptr)
|
||||||
{
|
{
|
||||||
char quote= 0; /* we are inside quote marks */
|
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++)
|
for (; *ptr; ptr++)
|
||||||
{
|
{
|
||||||
|
@ -229,7 +229,7 @@ int my_rmtree(const char *dir, myf MyFlags)
|
|||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
/*
|
/*
|
||||||
On Windows, check and possible reset readonly attribute.
|
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)
|
if (err)
|
||||||
{
|
{
|
||||||
|
@ -277,7 +277,7 @@ static void make_ftype(register char * to, register int flag)
|
|||||||
*to++= (flag & O_APPEND) ? 'a' : 'w';
|
*to++= (flag & O_APPEND) ? 'a' : 'w';
|
||||||
else if (flag & O_RDWR)
|
else if (flag & O_RDWR)
|
||||||
{
|
{
|
||||||
/* Add '+' after theese */
|
/* Add '+' after these */
|
||||||
if (flag & (O_TRUNC | O_CREAT))
|
if (flag & (O_TRUNC | O_CREAT))
|
||||||
*to++= 'w';
|
*to++= 'w';
|
||||||
else if (flag & O_APPEND)
|
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
|
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.
|
prefixes. 0 means an option must be always specified in full.
|
||||||
*/
|
*/
|
||||||
my_bool my_getopt_prefix_matching= 1;
|
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.
|
This sets a bit stored in a longlong.
|
||||||
The bit to set is stored in block_size. If block_size is positive
|
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.
|
then setting the bit means value is false.
|
||||||
*/
|
*/
|
||||||
tmp= get_bool_argument(opts, argument);
|
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
|
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
|
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.
|
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
|
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 defined(HAVE_MMAP) && !defined(_WIN32)
|
||||||
if (munmap(ptr, size))
|
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)
|
if (filename)
|
||||||
{
|
{
|
||||||
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.
|
// since they are only used to start up other programs.
|
||||||
// We're interested however in their children;
|
// We're interested however in their children;
|
||||||
const char *exclude_programs[] = {"my_safe_process.exe","cmd.exe", 0};
|
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);
|
int error= pthread_mutex_trylock(mutex);
|
||||||
if (error == 1)
|
if (error == 1)
|
||||||
return 0; /* Got lock on mutex */
|
return 0; /* Got lock on mutex */
|
||||||
if (error == 0) /* Someon else is locking mutex */
|
if (error == 0) /* Someone else is locking mutex */
|
||||||
return EBUSY;
|
return EBUSY;
|
||||||
if (error == -1) /* Safety if the lib is fixed */
|
if (error == -1) /* Safety if the lib is fixed */
|
||||||
error= errno; /* Probably invalid parameter */
|
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),
|
Any clock-based timer can be affected by NPT (ntpd program),
|
||||||
which means:
|
which means:
|
||||||
- full-second correction can occur for leap second
|
- 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).
|
(but I think they only affect the RTC which isn't the PIT).
|
||||||
|
|
||||||
We define "precision" as "frequency" and "high precision" is
|
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)
|
void my_rnd_init(struct my_rnd_struct *rand_st, ulong seed1, ulong seed2)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_valgrind
|
#ifdef HAVE_valgrind
|
||||||
bzero((char*) rand_st,sizeof(*rand_st)); /* Avoid UMC varnings */
|
bzero((char*) rand_st,sizeof(*rand_st)); /* Avoid UMC warnings */
|
||||||
#endif
|
#endif
|
||||||
rand_st->max_value= 0x3FFFFFFFL;
|
rand_st->max_value= 0x3FFFFFFFL;
|
||||||
rand_st->max_value_dbl=(double) rand_st->max_value;
|
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
|
SYNOPSIS
|
||||||
my_sync()
|
my_sync()
|
||||||
fd File descritor to sync
|
fd File descriptor to sync
|
||||||
my_flags Flags (now only MY_WME is supported)
|
my_flags Flags (now only MY_WME is supported)
|
||||||
|
|
||||||
NOTE
|
NOTE
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */
|
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.
|
thread variables.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -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()
|
range in my_win_* function will be punished with DBUG_ASSERT()
|
||||||
|
|
||||||
- File streams (FILE *) are actually from the C runtime. The routines provided
|
- 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
|
#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 */
|
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 */
|
errno= EFBIG; /* Assume this is the error */
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
* On some platforms, memcmp() is faster than the unrolled ptr_compare_N
|
* On some platforms, memcmp() is faster than the unrolled ptr_compare_N
|
||||||
* functions, as memcmp() is usually a platform-specific implementation
|
* functions, as memcmp() is usually a platform-specific implementation
|
||||||
* written in assembler. for example one in /usr/lib/libc/libc_hwcap*.so.1.
|
* 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
|
* On Solaris, native implementation is also usually faster than the
|
||||||
* built-in memcmp supplied by GCC, so it is recommended to build
|
* 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
|
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
|
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
|
#define USE_NATIVE_MEMCMP 1
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
/*
|
/*
|
||||||
This code originates from the Unireg project.
|
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.
|
Implementation of queues from "Algorithms in C" by Robert Sedgewick.
|
||||||
|
|
||||||
The queue can optionally store the position in queue in the element
|
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)
|
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
|
to specified DYNAMIC_STRING. This function is especially useful when
|
||||||
building strings to be executed with the system() function.
|
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 append String to be appended.
|
||||||
@param ... Optional. Additional string(s) to be appended.
|
@param ... Optional. Additional string(s) to be appended.
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
Code for handling red-black (balanced) binary trees.
|
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
|
1) If size < 0 then tree will not allocate keys and only a pointer to
|
||||||
each key is saved in tree.
|
each key is saved in tree.
|
||||||
@ -780,7 +780,7 @@ static void rb_delete_fixup(TREE *tree, TREE_ELEMENT ***parent)
|
|||||||
|
|
||||||
#ifndef DBUG_OFF
|
#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)
|
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 lib Flag names
|
||||||
@param default_name Number of "default" in the typelib
|
@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.
|
a function that knows how to compare values of this resource type.
|
||||||
In the simple case it could be wt_resource_id_memcmp().
|
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
|
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),
|
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),
|
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,
|
That is, only deadlocks that *we* have created. For example,
|
||||||
thd->A->B->thd
|
thd->A->B->thd
|
||||||
(thd waits for A, A waits for B, while B is waiting for 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
|
thd->A->B->C->A
|
||||||
This will not be detected. Instead we will walk it in circles until
|
This will not be detected. Instead we will walk it in circles until
|
||||||
the search depth limit is reached (the latter guarantees that an
|
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. */
|
/* Send generated blob to client. */
|
||||||
if (vio->write_packet(vio, (unsigned char *)outbuf.pvBuffer, outbuf.cbBuffer))
|
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;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
/*
|
/*
|
||||||
This intends to support *BSD's, macOS, Solaris, AIX, HP-UX, and Linux.
|
This intends to support *BSD's, macOS, Solaris, AIX, HP-UX, and Linux.
|
||||||
|
|
||||||
specificly:
|
specifically:
|
||||||
FreeBSD/OpenBSD/DragonFly/macOS (statfs) NetBSD (statvfs) uses getmntinfo().
|
FreeBSD/OpenBSD/DragonFly/macOS (statfs) NetBSD (statvfs) uses getmntinfo().
|
||||||
Linux can use getmntent_r(), but we've just used getmntent for simplification.
|
Linux can use getmntent_r(), but we've just used getmntent for simplification.
|
||||||
Linux/Solaris/AIX/HP-UX uses setmntent()/getmntent().
|
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)
|
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);
|
cli->response_recv(numflds);
|
||||||
if (arg.sh.verbose > 10) {
|
if (arg.sh.verbose > 10) {
|
||||||
const string_ref *row = cli->get_next_row();
|
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() : "");
|
row ? to_string(row[0]).c_str() : "");
|
||||||
}
|
}
|
||||||
const bool op_success = cli->get_error_code() == 0;
|
const bool op_success = cli->get_error_code() == 0;
|
||||||
|
@ -101,7 +101,7 @@ struct cmd_exec_args {
|
|||||||
uint32_t limit;
|
uint32_t limit;
|
||||||
uint32_t skip;
|
uint32_t skip;
|
||||||
string_ref mod_op;
|
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;
|
const record_filter *filters;
|
||||||
int invalues_keypart;
|
int invalues_keypart;
|
||||||
const string_ref *invalues;
|
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
|
If this option is given, a copy of each file will be saved with
|
||||||
the given suffix that contains the suggested changes. This does
|
the given suffix that contains the suggested changes. This does
|
||||||
not require any external programs. Note that this does not
|
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
|
suffix. If you want the dot, you have to include it in the option
|
||||||
argument.
|
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
|
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)
|
(should be at least 64*2 bytes)
|
||||||
@param str pointer to 512 bits (64 bytes string)
|
@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
|
buff[key_len]= 0; // safety
|
||||||
memset(hash, 0, sizeof(hash));
|
memset(hash, 0, sizeof(hash));
|
||||||
my_sha512(hash, buff, key_len);
|
my_sha512(hash, buff, key_len);
|
||||||
// safety: rewrite password with zerows
|
// safety: rewrite password with zeros
|
||||||
memset(buff, 0, password->length);
|
memset(buff, 0, password->length);
|
||||||
if (mysql_real_connect_local(mysql) == NULL)
|
if (mysql_real_connect_local(mysql) == NULL)
|
||||||
goto sql_error;
|
goto sql_error;
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
*/
|
*/
|
||||||
#define QRT_POSITIVE_POWER_FILLER ""
|
#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"
|
#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);
|
PLUGIN_STR_VERSION, PLUGIN_DEBUG_VERSION);
|
||||||
|
|
||||||
/* The Query Cache shadows TABLE events if the result is taken from it */
|
/* 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))
|
if (!started_mysql && FILTER(EVENT_TABLE))
|
||||||
{
|
{
|
||||||
ulonglong *qc_size= (ulonglong *) dlsym(RTLD_DEFAULT, "query_cache_size");
|
ulonglong *qc_size= (ulonglong *) dlsym(RTLD_DEFAULT, "query_cache_size");
|
||||||
|
@ -287,7 +287,7 @@ public:
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
Convert in-record representation to binlog representation.
|
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:
|
This makes replication between UUID and BINARY(16) simpler:
|
||||||
|
|
||||||
Transferring by compressing the in-record representation would require
|
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,
|
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
|
and use two remaining bits as a counter, thus allowing 4000 UUIDv7
|
||||||
values to be generated within one millisecond.
|
values to be generated within one millisecond.
|
||||||
|
@ -196,7 +196,7 @@ maria_declare_plugin(versioning)
|
|||||||
&versioning_plugin,
|
&versioning_plugin,
|
||||||
"test_versioning",
|
"test_versioning",
|
||||||
"MariaDB Corp",
|
"MariaDB Corp",
|
||||||
"System Vesioning testing features",
|
"System Versioning testing features",
|
||||||
PLUGIN_LICENSE_GPL,
|
PLUGIN_LICENSE_GPL,
|
||||||
versioning_plugin_init, /* Plugin Init */
|
versioning_plugin_init, /* Plugin Init */
|
||||||
versioning_plugin_deinit, /* Plugin Deinit */
|
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)
|
if (mysql->net.last_errno == CR_SERVER_LOST)
|
||||||
set_mysql_extended_error(mysql, CR_SERVER_LOST, unknown_sqlstate,
|
set_mysql_extended_error(mysql, CR_SERVER_LOST, unknown_sqlstate,
|
||||||
ER(CR_SERVER_LOST_EXTENDED),
|
ER(CR_SERVER_LOST_EXTENDED),
|
||||||
"Setting intital database",
|
"Setting initial database",
|
||||||
errno);
|
errno);
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
@ -1005,7 +1005,7 @@ fractional:
|
|||||||
else
|
else
|
||||||
date[4]= 0;
|
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) */
|
/* (may occur as result of %g formatting of time value) */
|
||||||
if ((end - str) > 1 &&
|
if ((end - str) > 1 &&
|
||||||
(*str == 'e' || *str == 'E') &&
|
(*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
|
sorted as they were single characters -- in Czech these are
|
||||||
'ch', 'Ch' and 'CH'.
|
'ch', 'Ch' and 'CH'.
|
||||||
*/
|
*/
|
||||||
@ -396,7 +396,7 @@ static my_bool my_like_range_czech(CHARSET_INFO *cs __attribute__((unused)),
|
|||||||
{ continue; }
|
{ continue; }
|
||||||
if (value <= 2) /* End of pass or end of string */
|
if (value <= 2) /* End of pass or end of string */
|
||||||
{ break; }
|
{ break; }
|
||||||
if (value == 255) /* Double char too compicated */
|
if (value == 255) /* Double char too complicated */
|
||||||
{ break; }
|
{ break; }
|
||||||
|
|
||||||
*min_str++= *max_str++ = *ptr;
|
*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".
|
"se", "nweights" and "de".
|
||||||
*/
|
*/
|
||||||
for (; src < se && *nweights && dst < de; (*nweights)--)
|
for (; src < se && *nweights && dst < de; (*nweights)--)
|
||||||
|
@ -1699,7 +1699,7 @@ my_strntoull10rnd_8bit(CHARSET_INFO *cs __attribute__((unused)),
|
|||||||
ul= ul * 10 + ch;
|
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;
|
*endptr= (char*) str;
|
||||||
if (negative)
|
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
|
reverse order for that level, that is, starting with
|
||||||
the last character and ending with the first character.
|
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.
|
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);
|
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
|
Arg: Destination buffer, source string, dest length and source length
|
||||||
Ret: Converted string size
|
Ret: Converted string size
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
Features that are not implemented yet:
|
Features that are not implemented yet:
|
||||||
- No Normalization From D is done
|
- No Normalization From D is done
|
||||||
+ No decomposition is done
|
+ No decomposition is done
|
||||||
+ No Thai/Lao orderding is done
|
+ No Thai/Lao ordering is done
|
||||||
- No combining marks processing is done
|
- No combining marks processing is done
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -32274,7 +32274,7 @@ my_uca_collation_can_optimize_no_contractions(CHARSET_INFO *cs)
|
|||||||
Diff command:
|
Diff command:
|
||||||
<d1> := < - Identifies a primary difference.
|
<d1> := < - Identifies a primary difference.
|
||||||
<d2> := << - Identifies a secondary difference.
|
<d2> := << - Identifies a secondary difference.
|
||||||
<d3> := <<< - Idenfifies a tertiary difference.
|
<d3> := <<< - Identifies a tertiary difference.
|
||||||
|
|
||||||
|
|
||||||
Collation rules:
|
Collation rules:
|
||||||
@ -32352,7 +32352,7 @@ typedef struct my_coll_lexem_st
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Initialize collation rule lexical anilizer
|
Initialize collation rule lexical analyzer
|
||||||
|
|
||||||
SYNOPSIS
|
SYNOPSIS
|
||||||
my_coll_lexem_init
|
my_coll_lexem_init
|
||||||
@ -32703,7 +32703,7 @@ my_coll_rule_reset(MY_COLL_RULE *r)
|
|||||||
/*
|
/*
|
||||||
Shift methods:
|
Shift methods:
|
||||||
Simple: "&B < C" : weight('C') = weight('B') + 1
|
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
|
typedef enum
|
||||||
{
|
{
|
||||||
@ -33353,7 +33353,7 @@ my_coll_parser_scan_rule(MY_COLL_RULE_PARSER *p)
|
|||||||
@param p Collation customization parser
|
@param p Collation customization parser
|
||||||
|
|
||||||
@return
|
@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.
|
@retval 1 if collation customization expression was scanned.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -33562,7 +33562,7 @@ apply_shift(MY_CHARSET_LOADER *loader,
|
|||||||
'a' must be sorted before 'A'.
|
'a' must be sorted before 'A'.
|
||||||
|
|
||||||
Note, there are no real collations in CLDR which shift
|
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
|
just in case. Reserving 4096 (0x1000) weights for such
|
||||||
cases is perfectly enough.
|
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) 0 (both ignorable) {0,0} [IGN]
|
||||||
2 (two ASCII chars) 1 (e.g. Czech "ch") {X,0}
|
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) 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]
|
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) 0 (ignorable) {0,0} [IGN]
|
||||||
1 (one 2-byte char) 1 {X,0}
|
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)
|
if (s + 4 > e)
|
||||||
return MY_CS_TOOSMALL4;
|
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;
|
return MY_CS_ILSEQ;
|
||||||
|
|
||||||
*pwc= MY_UTF16_WC4(s[0], s[1], s[2], s[3]);
|
*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
|
#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
|
* that they return 0 only when two comparing unicode strings are
|
||||||
* strictly the same in case-sensitive way. See "save_diff" local
|
* strictly the same in case-sensitive way. See "save_diff" local
|
||||||
* variable to what they actually do.
|
* 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
|
space. It means if we meet a character greater
|
||||||
than space, it always means that the longer string
|
than space, it always means that the longer string
|
||||||
is greater. So we can reuse the same loop from the
|
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.
|
sequences.
|
||||||
*/
|
*/
|
||||||
if ((res= slen == tlen ? 0 :
|
if ((res= slen == tlen ? 0 :
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
/*
|
/*
|
||||||
=======================================================================
|
=======================================================================
|
||||||
NOTE: this library implements SQL standard "exact numeric" type
|
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 :)
|
follow the standard :)
|
||||||
=======================================================================
|
=======================================================================
|
||||||
Quoting 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
|
dec number to be shifted
|
||||||
shift number of decimal positions
|
shift number of decimal positions
|
||||||
shift > 0 means shift to left shift
|
shift > 0 means shift to left shift
|
||||||
shift < 0 meand right shift
|
shift < 0 means right shift
|
||||||
NOTE
|
NOTE
|
||||||
In fact it is multipling on 10^shift.
|
In fact it is multiplying on 10^shift.
|
||||||
RETURN
|
RETURN
|
||||||
E_DEC_OK OK
|
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
|
E_DEC_TRUNCATED number was rounded to fit into buffer
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ register char **argv[];
|
|||||||
break;
|
break;
|
||||||
case '#':
|
case '#':
|
||||||
DBUG_PUSH (++pos);
|
DBUG_PUSH (++pos);
|
||||||
*(pos--) = '\0'; /* Skippa argument */
|
*(pos--) = '\0'; /* Skip argument */
|
||||||
break;
|
break;
|
||||||
case 'V':
|
case 'V':
|
||||||
version=1;
|
version=1;
|
||||||
@ -164,7 +164,7 @@ void init_case_convert()
|
|||||||
to_lower[ *higher_pos++ ] = (char) *lower_pos++;
|
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 */
|
/* changed to lower_pos character */
|
||||||
|
|
||||||
#if defined(HPUX10)
|
#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.
|
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.
|
to count it here.
|
||||||
*/
|
*/
|
||||||
exp_len= 1 + (decpt >= 101 || decpt <= -99) + (decpt >= 11 || decpt <= -9);
|
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.
|
We are in <!DOCTYPE>, e.g.
|
||||||
<!DOCTYPE name SYSTEM "SystemLiteral">
|
<!DOCTYPE name SYSTEM "SystemLiteral">
|
||||||
<!DOCTYPE name PUBLIC "PublidLiteral" "SystemLiteral">
|
<!DOCTYPE name PUBLIC "PublicLiteral" "SystemLiteral">
|
||||||
Just skip "SystemLiteral" and "PublicidLiteral"
|
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
|
SYNOPSIS
|
||||||
DIE_UNLESS(expr)
|
DIE_UNLESS(expr)
|
||||||
|
@ -7861,7 +7861,7 @@ static void test_explain_bug()
|
|||||||
|
|
||||||
if ( mysql_get_server_version(mysql) >= 50027 )
|
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",
|
verify_prepare_field(result, 4, "Default", "COLUMN_DEFAULT",
|
||||||
MYSQL_TYPE_BLOB, 0, 0, "information_schema", 0, 0);
|
MYSQL_TYPE_BLOB, 0, 0, "information_schema", 0, 0);
|
||||||
}
|
}
|
||||||
@ -13779,7 +13779,7 @@ static void test_bug8722()
|
|||||||
myquery(rc);
|
myquery(rc);
|
||||||
/* Note: if you uncomment following block everything works fine */
|
/* 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);
|
myquery(rc);
|
||||||
mysql_free_result(mysql_store_result(mysql));
|
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()
|
static void test_bug9520()
|
||||||
{
|
{
|
||||||
@ -14233,7 +14233,7 @@ static void test_bug11111()
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
Check that proper cleanups are done for prepared statement when
|
Check that proper cleanups are done for prepared statement when
|
||||||
fetching thorugh a cursor.
|
fetching through a cursor.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static void test_bug10729()
|
static void test_bug10729()
|
||||||
@ -15052,7 +15052,7 @@ static void test_bug11909()
|
|||||||
myquery(rc);
|
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()
|
static void test_bug11901()
|
||||||
{
|
{
|
||||||
@ -15927,7 +15927,7 @@ static void test_bug17667()
|
|||||||
char line_buffer[MAX_TEST_QUERY_LENGTH*2];
|
char line_buffer[MAX_TEST_QUERY_LENGTH*2];
|
||||||
/* more than enough room for the query and some marginalia. */
|
/* 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)
|
if (statement_cursor->qt == QT_PREPARED)
|
||||||
expected_hits++;
|
expected_hits++;
|
||||||
|
|
||||||
|
@ -111,7 +111,7 @@ prev_record_reads(POSITION *position, uint idx, DEPEND found_ref,
|
|||||||
{
|
{
|
||||||
found_ref&= ~pos->table->map;
|
found_ref&= ~pos->table->map;
|
||||||
|
|
||||||
/* Found depent table */
|
/* Found dependent table */
|
||||||
if (pos->type == EQ_REF)
|
if (pos->type == EQ_REF)
|
||||||
{
|
{
|
||||||
if (!found_ref)
|
if (!found_ref)
|
||||||
@ -127,8 +127,8 @@ prev_record_reads(POSITION *position, uint idx, DEPEND found_ref,
|
|||||||
if (pos->type != CACHE)
|
if (pos->type != CACHE)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
We are not depending on the curren table
|
We are not depending on the current table
|
||||||
There are 'records_out' rows with idenitical rows
|
There are 'records_out' rows with identical rows
|
||||||
value for our depending tables.
|
value for our depending tables.
|
||||||
We are ignoring join_cache as in this case the
|
We are ignoring join_cache as in this case the
|
||||||
preceding tables row combination can change for
|
preceding tables row combination can change for
|
||||||
|
@ -261,10 +261,10 @@ class thread_pool_generic : public thread_pool
|
|||||||
/** Last time thread was created*/
|
/** Last time thread was created*/
|
||||||
std::chrono::system_clock::time_point m_last_thread_creation;
|
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;
|
unsigned int m_min_threads;
|
||||||
|
|
||||||
/** Maximimum number of threads in this pool. */
|
/** Maximum number of threads in this pool. */
|
||||||
unsigned int m_max_threads;
|
unsigned int m_max_threads;
|
||||||
|
|
||||||
/* maintenance related statistics (see maintenance()) */
|
/* maintenance related statistics (see maintenance()) */
|
||||||
@ -371,7 +371,7 @@ public:
|
|||||||
{
|
{
|
||||||
if (pool)
|
if (pool)
|
||||||
{
|
{
|
||||||
/* EXecute callback in threadpool*/
|
/* Execute callback in threadpool*/
|
||||||
thr_timer_init(this, submit_task, this);
|
thr_timer_init(this, submit_task, this);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -951,7 +951,7 @@ thread_pool_generic::~thread_pool_generic()
|
|||||||
*/
|
*/
|
||||||
m_aio.reset();
|
m_aio.reset();
|
||||||
|
|
||||||
/* Also stop the maintanence task early. */
|
/* Also stop the maintenance task early. */
|
||||||
if (m_maintenance_timer)
|
if (m_maintenance_timer)
|
||||||
m_maintenance_timer->disarm();
|
m_maintenance_timer->disarm();
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ void test_my_safe_print_str()
|
|||||||
my_safe_print_str("LEGAL", 65535);
|
my_safe_print_str("LEGAL", 65535);
|
||||||
fprintf(stderr, "\n===== Above is a junk, but it is expected. =====\n");
|
fprintf(stderr, "\n===== Above is a junk, but it is expected. =====\n");
|
||||||
# endif
|
# endif
|
||||||
fprintf(stderr, "\n===== Nornal length test =====\n");
|
fprintf(stderr, "\n===== Normal length test =====\n");
|
||||||
my_safe_print_str("LEGAL", 5);
|
my_safe_print_str("LEGAL", 5);
|
||||||
fprintf(stderr, "\n===== NULL =====\n");
|
fprintf(stderr, "\n===== NULL =====\n");
|
||||||
my_safe_print_str(0, 5);
|
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 to test that the component have the expected behaviour.
|
||||||
This is just plain simple: test that it works. For example, test
|
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.
|
the duck makes it quack.
|
||||||
|
|
||||||
This is what everybody does when they write tests.
|
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
|
@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).
|
||||||
|
|
||||||
|
@ -414,7 +414,7 @@ void mdev10963()
|
|||||||
*/
|
*/
|
||||||
for (; n_checks; n_checks--, rewind(file))
|
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;
|
ulong copied_size= 0;
|
||||||
|
|
||||||
res= reinit_io_cache(&info, READ_CACHE, 0L, FALSE, FALSE);
|
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
|
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
|
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
|
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).
|
we just shutdown by closing the socket (quiet shutdown).
|
||||||
*/
|
*/
|
||||||
SSL_set_quiet_shutdown(ssl, 1);
|
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,
|
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)
|
for (a = ai; a; a = a->ai_next)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user