mirror of
https://github.com/MariaDB/server.git
synced 2026-05-07 23:54:31 +02:00
Merge branch '10.6' into 10.11
This commit is contained in:
commit
221aa5e08f
73 changed files with 1354 additions and 1342 deletions
|
|
@ -871,8 +871,7 @@ LogFile progress_file;
|
|||
void replace_dynstr_append_mem(DYNAMIC_STRING *ds, const char *val, size_t len);
|
||||
void replace_dynstr_append(DYNAMIC_STRING *ds, const char *val);
|
||||
void replace_dynstr_append_uint(DYNAMIC_STRING *ds, uint val);
|
||||
void dynstr_append_sorted(DYNAMIC_STRING* ds, DYNAMIC_STRING* ds_input,
|
||||
bool keep_header);
|
||||
void dynstr_append_sorted(DYNAMIC_STRING* ds, DYNAMIC_STRING* ds_input);
|
||||
|
||||
static int match_expected_error(struct st_command *command,
|
||||
unsigned int err_errno,
|
||||
|
|
@ -3482,7 +3481,7 @@ void do_exec(struct st_command *command)
|
|||
|
||||
if (display_result_sorted)
|
||||
{
|
||||
dynstr_append_sorted(&ds_res, &ds_sorted, 0);
|
||||
dynstr_append_sorted(&ds_res, &ds_sorted);
|
||||
dynstr_free(&ds_sorted);
|
||||
}
|
||||
#ifdef _WIN32
|
||||
|
|
@ -7782,16 +7781,29 @@ void append_result(DYNAMIC_STRING *ds, MYSQL_RES *res)
|
|||
uint num_fields= mysql_num_fields(res);
|
||||
MYSQL_FIELD *fields= mysql_fetch_fields(res);
|
||||
ulong *lengths;
|
||||
DYNAMIC_STRING rs_unsorted, *rs= ds;
|
||||
|
||||
if (display_result_sorted)
|
||||
{
|
||||
init_dynamic_string(&rs_unsorted, "", 1024, 1024);
|
||||
rs= &rs_unsorted;
|
||||
}
|
||||
|
||||
while ((row = mysql_fetch_row(res)))
|
||||
{
|
||||
uint i;
|
||||
lengths = mysql_fetch_lengths(res);
|
||||
for (i = 0; i < num_fields; i++)
|
||||
append_field(ds, i, &fields[i],
|
||||
append_field(rs, i, &fields[i],
|
||||
row[i], lengths[i], !row[i]);
|
||||
if (!display_result_vertically)
|
||||
dynstr_append_mem(ds, "\n", 1);
|
||||
dynstr_append_mem(rs, "\n", 1);
|
||||
}
|
||||
|
||||
if (display_result_sorted)
|
||||
{
|
||||
dynstr_append_sorted(ds, &rs_unsorted);
|
||||
dynstr_free(&rs_unsorted);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -7809,6 +7821,13 @@ void append_stmt_result(DYNAMIC_STRING *ds, MYSQL_STMT *stmt,
|
|||
ulong *length;
|
||||
uint i;
|
||||
int error;
|
||||
DYNAMIC_STRING rs_unsorted, *rs= ds;
|
||||
|
||||
if (display_result_sorted)
|
||||
{
|
||||
init_dynamic_string(&rs_unsorted, "", 1024, 1024);
|
||||
rs= &rs_unsorted;
|
||||
}
|
||||
|
||||
/* Allocate array with bind structs, lengths and NULL flags */
|
||||
my_bind= (MYSQL_BIND*) my_malloc(PSI_NOT_INSTRUMENTED, num_fields * sizeof(MYSQL_BIND),
|
||||
|
|
@ -7840,10 +7859,10 @@ void append_stmt_result(DYNAMIC_STRING *ds, MYSQL_STMT *stmt,
|
|||
while ((error=mysql_stmt_fetch(stmt)) == 0)
|
||||
{
|
||||
for (i= 0; i < num_fields; i++)
|
||||
append_field(ds, i, &fields[i], (char*)my_bind[i].buffer,
|
||||
append_field(rs, i, &fields[i], (char*)my_bind[i].buffer,
|
||||
*my_bind[i].length, *my_bind[i].is_null);
|
||||
if (!display_result_vertically)
|
||||
dynstr_append_mem(ds, "\n", 1);
|
||||
dynstr_append_mem(rs, "\n", 1);
|
||||
}
|
||||
|
||||
if (error != MYSQL_NO_DATA)
|
||||
|
|
@ -7862,6 +7881,12 @@ void append_stmt_result(DYNAMIC_STRING *ds, MYSQL_STMT *stmt,
|
|||
my_free(my_bind);
|
||||
my_free(length);
|
||||
my_free(is_null);
|
||||
|
||||
if (display_result_sorted)
|
||||
{
|
||||
dynstr_append_sorted(ds, &rs_unsorted);
|
||||
dynstr_free(&rs_unsorted);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -8062,7 +8087,7 @@ static void append_session_track_info(DYNAMIC_STRING *ds, MYSQL *mysql)
|
|||
if (type == SESSION_TRACK_SYSTEM_VARIABLES)
|
||||
{
|
||||
dynstr_append_mem(ds_type, STRING_WITH_LEN("\n"));
|
||||
dynstr_append_sorted(ds, ds_type, false);
|
||||
dynstr_append_sorted(ds, ds_type);
|
||||
dynstr_append_mem(ds, STRING_WITH_LEN("\n"));
|
||||
dynstr_free(&ds_sort);
|
||||
}
|
||||
|
|
@ -8104,7 +8129,6 @@ int append_warnings(DYNAMIC_STRING *ds, MYSQL* mysql)
|
|||
{
|
||||
uint count;
|
||||
MYSQL_RES *warn_res;
|
||||
DYNAMIC_STRING res;
|
||||
DBUG_ENTER("append_warnings");
|
||||
|
||||
if (!(count= mysql_warning_count(mysql)))
|
||||
|
|
@ -8125,18 +8149,8 @@ int append_warnings(DYNAMIC_STRING *ds, MYSQL* mysql)
|
|||
die("Warning count is %u but didn't get any warnings",
|
||||
count);
|
||||
|
||||
init_dynamic_string(&res, "", 1024, 1024);
|
||||
|
||||
append_result(&res, warn_res);
|
||||
append_result(ds, warn_res);
|
||||
mysql_free_result(warn_res);
|
||||
|
||||
DBUG_PRINT("warnings", ("%s", res.str));
|
||||
|
||||
if (display_result_sorted)
|
||||
dynstr_append_sorted(ds, &res, 0);
|
||||
else
|
||||
dynstr_append_mem(ds, res.str, res.length);
|
||||
dynstr_free(&res);
|
||||
DBUG_RETURN(count);
|
||||
}
|
||||
|
||||
|
|
@ -8651,8 +8665,6 @@ void run_query_stmt(struct st_connection *cn, struct st_command *command,
|
|||
DYNAMIC_STRING ds_prepare_warnings;
|
||||
DYNAMIC_STRING ds_execute_warnings;
|
||||
DYNAMIC_STRING ds_res_1st_execution;
|
||||
DYNAMIC_STRING ds_res_2_execution_unsorted;
|
||||
DYNAMIC_STRING *ds_res_2_output;
|
||||
my_bool ds_res_1st_execution_init = FALSE;
|
||||
my_bool compare_2nd_execution = TRUE;
|
||||
int query_match_ps2_re;
|
||||
|
|
@ -8714,7 +8726,6 @@ void run_query_stmt(struct st_connection *cn, struct st_command *command,
|
|||
parameter markers.
|
||||
*/
|
||||
|
||||
#if MYSQL_VERSION_ID >= 50000
|
||||
if (cursor_protocol_enabled)
|
||||
{
|
||||
ps2_protocol_enabled = 0;
|
||||
|
|
@ -8734,7 +8745,6 @@ void run_query_stmt(struct st_connection *cn, struct st_command *command,
|
|||
mysql_stmt_errno(stmt), mysql_stmt_error(stmt));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
query_match_ps2_re = match_re(&ps2_re, query);
|
||||
|
||||
|
|
@ -8801,29 +8811,8 @@ void run_query_stmt(struct st_connection *cn, struct st_command *command,
|
|||
!disable_warnings)
|
||||
append_warnings(&ds_execute_warnings, mysql);
|
||||
|
||||
if (!disable_result_log &&
|
||||
compare_2nd_execution &&
|
||||
ps2_protocol_enabled &&
|
||||
query_match_ps2_re &&
|
||||
display_result_sorted)
|
||||
{
|
||||
init_dynamic_string(&ds_res_2_execution_unsorted, "",
|
||||
RESULT_STRING_INIT_MEM,
|
||||
RESULT_STRING_INCREMENT_MEM);
|
||||
ds_res_2_output= &ds_res_2_execution_unsorted;
|
||||
}
|
||||
else
|
||||
ds_res_2_output= ds;
|
||||
|
||||
if (read_stmt_results(stmt, ds_res_2_output, command))
|
||||
{
|
||||
if (ds_res_2_output != ds)
|
||||
{
|
||||
dynstr_append_mem(ds, ds_res_2_output->str, ds_res_2_output->length);
|
||||
dynstr_free(ds_res_2_output);
|
||||
}
|
||||
if (read_stmt_results(stmt, ds, command))
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (!disable_result_log)
|
||||
{
|
||||
|
|
@ -8833,35 +8822,12 @@ void run_query_stmt(struct st_connection *cn, struct st_command *command,
|
|||
*/
|
||||
if (compare_2nd_execution && ps2_protocol_enabled && query_match_ps2_re)
|
||||
{
|
||||
DYNAMIC_STRING *ds_res_1_execution_compare;
|
||||
DYNAMIC_STRING ds_res_1_execution_sorted;
|
||||
if (display_result_sorted)
|
||||
{
|
||||
init_dynamic_string(&ds_res_1_execution_sorted, "",
|
||||
RESULT_STRING_INIT_MEM,
|
||||
RESULT_STRING_INCREMENT_MEM);
|
||||
dynstr_append_sorted(&ds_res_1_execution_sorted,
|
||||
&ds_res_1st_execution, 1);
|
||||
dynstr_append_sorted(ds, &ds_res_2_execution_unsorted, 1);
|
||||
ds_res_1_execution_compare= &ds_res_1_execution_sorted;
|
||||
}
|
||||
else
|
||||
{
|
||||
ds_res_1_execution_compare= &ds_res_1st_execution;
|
||||
}
|
||||
if (ds->length != ds_res_1_execution_compare->length ||
|
||||
!(memcmp(ds_res_1_execution_compare->str, ds->str, ds->length) == 0))
|
||||
if (ds->length != ds_res_1st_execution.length ||
|
||||
!(memcmp(ds_res_1st_execution.str, ds->str, ds->length) == 0))
|
||||
{
|
||||
die("The result of the 1st execution does not match with \n"
|
||||
"the result of the 2nd execution of ps-protocol:\n 1st:\n"
|
||||
"%s\n 2nd:\n %s",
|
||||
ds_res_1_execution_compare->str,
|
||||
ds->str);
|
||||
}
|
||||
if (display_result_sorted)
|
||||
{
|
||||
dynstr_free(&ds_res_1_execution_sorted);
|
||||
dynstr_free(&ds_res_2_execution_unsorted);
|
||||
"%s\n 2nd:\n %s", ds_res_1st_execution.str, ds->str);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -9454,10 +9420,6 @@ void run_query(struct st_connection *cn, struct st_command *command, int flags)
|
|||
DYNAMIC_STRING *rs_output; /* where to put results */
|
||||
DYNAMIC_STRING rs_cmp_result; /* here we put results to compare with
|
||||
pre-recrded file */
|
||||
DYNAMIC_STRING rs_unsorted; /* if we need sorted results, here we store
|
||||
results before sorting them */
|
||||
DYNAMIC_STRING *rs_sorted_save= NULL; /* here we store where to put sorted
|
||||
result if needed */
|
||||
DYNAMIC_STRING rs_warnings;
|
||||
char *query;
|
||||
size_t query_len;
|
||||
|
|
@ -9628,18 +9590,6 @@ void run_query(struct st_connection *cn, struct st_command *command, int flags)
|
|||
dynstr_free(&query_str);
|
||||
}
|
||||
|
||||
if (display_result_sorted)
|
||||
{
|
||||
/*
|
||||
Collect the query output in a separate string
|
||||
that can be sorted before it's added to the
|
||||
global result string
|
||||
*/
|
||||
init_dynamic_string(&rs_unsorted, "", 1024, 1024);
|
||||
rs_sorted_save= rs_output; /* Remember original ds */
|
||||
rs_output= &rs_unsorted;
|
||||
}
|
||||
|
||||
/*
|
||||
Find out how to run this query
|
||||
|
||||
|
|
@ -9666,14 +9616,6 @@ void run_query(struct st_connection *cn, struct st_command *command, int flags)
|
|||
dynstr_free(&rs_warnings);
|
||||
ds_warn= 0;
|
||||
|
||||
if (display_result_sorted)
|
||||
{
|
||||
/* Sort the result set and append it to result */
|
||||
dynstr_append_sorted(rs_sorted_save, &rs_unsorted, 1);
|
||||
rs_output= rs_sorted_save;
|
||||
dynstr_free(&rs_unsorted);
|
||||
}
|
||||
|
||||
if (sp_created)
|
||||
{
|
||||
if (util_query(mysql, "DROP PROCEDURE mysqltest_tmp_sp "))
|
||||
|
|
@ -12228,7 +12170,6 @@ void replace_dynstr_append_uint(DYNAMIC_STRING *ds, uint val)
|
|||
dynstr_append_sorted()
|
||||
ds string where the sorted output will be appended
|
||||
ds_input string to be sorted
|
||||
keep_header If header should not be sorted
|
||||
*/
|
||||
|
||||
static int comp_lines(const void *a_, const void *b_)
|
||||
|
|
@ -12238,8 +12179,7 @@ static int comp_lines(const void *a_, const void *b_)
|
|||
return (strcmp(*a,*b));
|
||||
}
|
||||
|
||||
void dynstr_append_sorted(DYNAMIC_STRING* ds, DYNAMIC_STRING *ds_input,
|
||||
bool keep_header)
|
||||
void dynstr_append_sorted(DYNAMIC_STRING* ds, DYNAMIC_STRING *ds_input)
|
||||
{
|
||||
unsigned i;
|
||||
char *start= ds_input->str;
|
||||
|
|
@ -12251,15 +12191,6 @@ void dynstr_append_sorted(DYNAMIC_STRING* ds, DYNAMIC_STRING *ds_input,
|
|||
|
||||
my_init_dynamic_array(PSI_NOT_INSTRUMENTED, &lines, sizeof(const char*), 32, 32, MYF(0));
|
||||
|
||||
if (keep_header)
|
||||
{
|
||||
/* First line is result header, skip past it */
|
||||
while (*start && *start != '\n')
|
||||
start++;
|
||||
start++; /* Skip past \n */
|
||||
dynstr_append_mem(ds, ds_input->str, start - ds_input->str);
|
||||
}
|
||||
|
||||
/* Insert line(s) in array */
|
||||
while (*start)
|
||||
{
|
||||
|
|
|
|||
3
debian/rules
vendored
3
debian/rules
vendored
|
|
@ -4,6 +4,9 @@
|
|||
# https://wiki.debian.org/Hardening
|
||||
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
||||
|
||||
# LTO is generally enabled. Only ColumnStore doesn't support it (MCOL-5819)
|
||||
# and disables it in storage/columnstore/CMakeLists.txt
|
||||
|
||||
DPKG_EXPORT_BUILDFLAGS = 1
|
||||
# Include all defaults, including buildflags.mk
|
||||
include /usr/share/dpkg/default.mk
|
||||
|
|
|
|||
|
|
@ -230,6 +230,7 @@ void encryption_plugin_prepare_init(int argc, char **argv)
|
|||
char **new_argv = new char *[argc + 2];
|
||||
new_argv[0] = XTRABACKUP_EXE;
|
||||
memcpy(&new_argv[1], argv, argc*sizeof(char *));
|
||||
new_argv[argc+1]= 0;
|
||||
|
||||
encryption_plugin_init(argc+1, new_argv);
|
||||
|
||||
|
|
|
|||
|
|
@ -579,3 +579,23 @@ a
|
|||
# This statement should work, since last statement committed.
|
||||
INSERT INTO t1 VALUES (1);
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-35335 implicit commit at START TRANSACTION doesn't reset characteristics
|
||||
#
|
||||
create table t1 (a int) engine=innodb;
|
||||
insert t1 values (1);
|
||||
start transaction;
|
||||
set session transaction isolation level serializable;
|
||||
start transaction;
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
connect con1,localhost,root;
|
||||
set session innodb_lock_wait_timeout=0;
|
||||
update t1 set a=2;
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
disconnect con1;
|
||||
connection default;
|
||||
rollback;
|
||||
drop table t1;
|
||||
# End of 10.6 tests
|
||||
|
|
|
|||
|
|
@ -677,3 +677,23 @@ SELECT * FROM t1;
|
|||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-35335 implicit commit at START TRANSACTION doesn't reset characteristics
|
||||
--echo #
|
||||
create table t1 (a int) engine=innodb;
|
||||
insert t1 values (1);
|
||||
start transaction;
|
||||
set session transaction isolation level serializable;
|
||||
start transaction;
|
||||
select * from t1;
|
||||
connect con1,localhost,root;
|
||||
set session innodb_lock_wait_timeout=0;
|
||||
--error ER_LOCK_WAIT_TIMEOUT
|
||||
update t1 set a=2;
|
||||
disconnect con1;
|
||||
connection default;
|
||||
rollback;
|
||||
drop table t1;
|
||||
|
||||
--echo # End of 10.6 tests
|
||||
|
|
|
|||
|
|
@ -198,7 +198,9 @@ create database `a
|
|||
b`;
|
||||
use `a
|
||||
b`;
|
||||
select count(*) from mysql.global_priv where length(priv)>2;
|
||||
create table t1 (a int);
|
||||
insert t1 values (1),(2),(3),(4),(5),(6),(7);
|
||||
select count(*) from t1 where a>2;
|
||||
count(*)
|
||||
5
|
||||
drop database `a
|
||||
|
|
@ -211,7 +213,7 @@ set timestamp=default;
|
|||
use `a
|
||||
b`;
|
||||
SET timestamp=1234567890;
|
||||
select count(*) from mysql.global_priv where length(priv)>2
|
||||
select count(*) from t1 where a>2
|
||||
#
|
||||
# MDEV-31366 Assertion `thd->start_time' failed in bool LOGGER::slow_log_print(THD*, const char*, size_t, ulonglong)
|
||||
#
|
||||
|
|
|
|||
|
|
@ -207,9 +207,11 @@ create database `a
|
|||
b`;
|
||||
use `a
|
||||
b`;
|
||||
create table t1 (a int);
|
||||
insert t1 values (1),(2),(3),(4),(5),(6),(7);
|
||||
--disable_ps_protocol
|
||||
--disable_view_protocol
|
||||
select count(*) from mysql.global_priv where length(priv)>2;
|
||||
select count(*) from t1 where a>2;
|
||||
--enable_view_protocol
|
||||
--enable_ps_protocol
|
||||
drop database `a
|
||||
|
|
|
|||
|
|
@ -281,16 +281,16 @@ SELECT COALESCE(d, d), IFNULL(d, d), IF(i, d, d),
|
|||
CASE i WHEN i THEN d ELSE d END, GREATEST(d, d), LEAST(d, d)
|
||||
FROM t1 ORDER BY RAND();
|
||||
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def COALESCE(d, d) COALESCE(d, d) 10 10 10 Y 128 0 63
|
||||
def IFNULL(d, d) IFNULL(d, d) 10 10 10 Y 128 0 63
|
||||
def IF(i, d, d) IF(i, d, d) 10 10 10 Y 128 0 63
|
||||
def CASE i WHEN i THEN d ELSE d END CASE i WHEN i THEN d ELSE d END 10 10 10 Y 128 0 63
|
||||
def GREATEST(d, d) GREATEST(d, d) 10 10 10 Y 128 0 63
|
||||
def LEAST(d, d) LEAST(d, d) 10 10 10 Y 128 0 63
|
||||
COALESCE(d, d) IFNULL(d, d) IF(i, d, d) CASE i WHEN i THEN d ELSE d END GREATEST(d, d) LEAST(d, d)
|
||||
2008-01-01 2008-01-01 2008-01-01 2008-01-01 2008-01-01 2008-01-01
|
||||
2008-01-02 2008-01-02 2008-01-02 2008-01-02 2008-01-02 2008-01-02
|
||||
2008-01-03 2008-01-03 2008-01-03 2008-01-03 2008-01-03 2008-01-03
|
||||
COALESCE(d, d) IFNULL(d, d) IF(i, d, d) CASE i WHEN i THEN d ELSE d END GREATEST(d, d) LEAST(d, d)
|
||||
def CASE i WHEN i THEN d ELSE d END CASE i WHEN i THEN d ELSE d END 10 10 10 Y 128 0 63
|
||||
def COALESCE(d, d) COALESCE(d, d) 10 10 10 Y 128 0 63
|
||||
def GREATEST(d, d) GREATEST(d, d) 10 10 10 Y 128 0 63
|
||||
def IF(i, d, d) IF(i, d, d) 10 10 10 Y 128 0 63
|
||||
def IFNULL(d, d) IFNULL(d, d) 10 10 10 Y 128 0 63
|
||||
def LEAST(d, d) LEAST(d, d) 10 10 10 Y 128 0 63
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#41788 mysql_fetch_field returns org_table == table by a view
|
||||
|
|
|
|||
|
|
@ -20,6 +20,15 @@ show create table tempty;
|
|||
ERROR HY000: Table rebuild required. Please do "ALTER TABLE `test.tempty` FORCE" or dump/reload to fix it!
|
||||
select * from tempty;
|
||||
ERROR HY000: Table rebuild required. Please do "ALTER TABLE `test.tempty` FORCE" or dump/reload to fix it!
|
||||
select table_name, table_comment from information_schema.tables where table_schema='test' and table_comment!='VIEW';
|
||||
table_name table_comment
|
||||
mysql_json_test Table rebuild required. Please do "ALTER TABLE `test.mysql_json_test` FORCE" or dump/reload to fix it!
|
||||
mysql_json_test_big Table rebuild required. Please do "ALTER TABLE `test.mysql_json_test_big` FORCE" or dump/reload to fix it!
|
||||
tempty Table rebuild required. Please do "ALTER TABLE `test.tempty` FORCE" or dump/reload to fix it!
|
||||
Warnings:
|
||||
Warning 1707 Table rebuild required. Please do "ALTER TABLE `test.mysql_json_test_big` FORCE" or dump/reload to fix it!
|
||||
Warning 1707 Table rebuild required. Please do "ALTER TABLE `test.mysql_json_test` FORCE" or dump/reload to fix it!
|
||||
Warning 1707 Table rebuild required. Please do "ALTER TABLE `test.tempty` FORCE" or dump/reload to fix it!
|
||||
alter table tempty force;
|
||||
show create table tempty;
|
||||
Table Create Table
|
||||
|
|
|
|||
|
|
@ -43,6 +43,9 @@ show create table tempty;
|
|||
--error ER_TABLE_NEEDS_REBUILD
|
||||
select * from tempty;
|
||||
|
||||
--sorted_result
|
||||
select table_name, table_comment from information_schema.tables where table_schema='test' and table_comment!='VIEW';
|
||||
|
||||
alter table tempty force;
|
||||
show create table tempty;
|
||||
|
||||
|
|
|
|||
|
|
@ -52,10 +52,10 @@ affected rows: 1
|
|||
# Do not display the column value itself, just its length.
|
||||
#
|
||||
SELECT LENGTH(c1) FROM t1;
|
||||
LENGTH(c1) 67108864
|
||||
LENGTH(c1) 33554432
|
||||
LENGTH(c1) 4194304
|
||||
LENGTH(c1) 524288
|
||||
LENGTH(c1) 67108864
|
||||
affected rows: 4
|
||||
#
|
||||
# Grow the rows by updating.
|
||||
|
|
@ -68,8 +68,8 @@ info: Rows matched: 4 Changed: 4 Warnings: 0
|
|||
# Do not display the column value itself, just its length.
|
||||
#
|
||||
SELECT LENGTH(c1) FROM t1;
|
||||
LENGTH(c1) 134217728
|
||||
LENGTH(c1) 1048576
|
||||
LENGTH(c1) 134217728
|
||||
LENGTH(c1) 67108864
|
||||
LENGTH(c1) 8388608
|
||||
affected rows: 4
|
||||
|
|
|
|||
|
|
@ -105,3 +105,12 @@ EXISTS (SELECT 1 ORDER BY 1+sum(2) OVER ())
|
|||
#
|
||||
# End of 10.4 tests
|
||||
#
|
||||
#
|
||||
# MDEV-32411 Item_sum arguments incorrectly reset to temp table fields which causes crash
|
||||
#
|
||||
CREATE TABLE t1 (a INT NOT NULL) ;
|
||||
INSERT INTO t1 VALUES (EXISTS(SELECT avg(3) OVER (ORDER BY COUNT(DISTINCT a, HEX(a)))));
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# End of 10.5 tests
|
||||
#
|
||||
|
|
|
|||
|
|
@ -57,3 +57,14 @@ SELECT EXISTS (SELECT 1 ORDER BY 1+sum(2) OVER ());
|
|||
--echo #
|
||||
--echo # End of 10.4 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-32411 Item_sum arguments incorrectly reset to temp table fields which causes crash
|
||||
--echo #
|
||||
CREATE TABLE t1 (a INT NOT NULL) ;
|
||||
INSERT INTO t1 VALUES (EXISTS(SELECT avg(3) OVER (ORDER BY COUNT(DISTINCT a, HEX(a)))));
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.5 tests
|
||||
--echo #
|
||||
|
|
|
|||
|
|
@ -279,8 +279,8 @@ select * from t1;
|
|||
a b
|
||||
-2 NULL
|
||||
2 0.693147
|
||||
Warning 1365 Division by 0
|
||||
Warnings:
|
||||
Warning 1365 Division by 0
|
||||
drop table t1;
|
||||
set sql_warnings = 0;
|
||||
# LOG()
|
||||
|
|
@ -303,8 +303,8 @@ a b c
|
|||
1 100 NULL
|
||||
10 100 2
|
||||
2 65536 16
|
||||
Warning 1365 Division by 0
|
||||
Warnings:
|
||||
Warning 1365 Division by 0
|
||||
drop table t1;
|
||||
set sql_warnings = 0;
|
||||
set sql_warnings = 1;
|
||||
|
|
@ -323,8 +323,8 @@ select * from t1;
|
|||
a b
|
||||
-2 NULL
|
||||
2 0.693147
|
||||
Warning 1365 Division by 0
|
||||
Warnings:
|
||||
Warning 1365 Division by 0
|
||||
drop table t1;
|
||||
set sql_warnings = 0;
|
||||
# LOG2()
|
||||
|
|
@ -344,8 +344,8 @@ select * from t1;
|
|||
a b
|
||||
-100 NULL
|
||||
65536 16
|
||||
Warning 1365 Division by 0
|
||||
Warnings:
|
||||
Warning 1365 Division by 0
|
||||
drop table t1;
|
||||
set sql_warnings = 0;
|
||||
# LOG10()
|
||||
|
|
@ -367,8 +367,8 @@ a b
|
|||
-100 NULL
|
||||
100 2
|
||||
2 0.30103
|
||||
Warning 1365 Division by 0
|
||||
Warnings:
|
||||
Warning 1365 Division by 0
|
||||
drop table t1;
|
||||
set sql_warnings = 0;
|
||||
# -
|
||||
|
|
@ -2722,8 +2722,8 @@ select * from t1;
|
|||
a b
|
||||
-1 18446744073709551615
|
||||
1 1
|
||||
Note 1105 Cast to unsigned converted negative integer to it's positive complement
|
||||
Warnings:
|
||||
Note 1105 Cast to unsigned converted negative integer to it's positive complement
|
||||
drop table t1;
|
||||
set sql_warnings = 0;
|
||||
# Convert()
|
||||
|
|
@ -2743,8 +2743,8 @@ select * from t1;
|
|||
a b
|
||||
-1 18446744073709551615
|
||||
1 1
|
||||
Note 1105 Cast to unsigned converted negative integer to it's positive complement
|
||||
Warnings:
|
||||
Note 1105 Cast to unsigned converted negative integer to it's positive complement
|
||||
drop table t1;
|
||||
set sql_warnings = 0;
|
||||
#
|
||||
|
|
|
|||
|
|
@ -279,8 +279,8 @@ select * from t1;
|
|||
a b
|
||||
-2 NULL
|
||||
2 0.693147
|
||||
Warning 1365 Division by 0
|
||||
Warnings:
|
||||
Warning 1365 Division by 0
|
||||
drop table t1;
|
||||
set sql_warnings = 0;
|
||||
# LOG()
|
||||
|
|
@ -303,8 +303,8 @@ a b c
|
|||
1 100 NULL
|
||||
10 100 2
|
||||
2 65536 16
|
||||
Warning 1365 Division by 0
|
||||
Warnings:
|
||||
Warning 1365 Division by 0
|
||||
drop table t1;
|
||||
set sql_warnings = 0;
|
||||
set sql_warnings = 1;
|
||||
|
|
@ -323,8 +323,8 @@ select * from t1;
|
|||
a b
|
||||
-2 NULL
|
||||
2 0.693147
|
||||
Warning 1365 Division by 0
|
||||
Warnings:
|
||||
Warning 1365 Division by 0
|
||||
drop table t1;
|
||||
set sql_warnings = 0;
|
||||
# LOG2()
|
||||
|
|
@ -344,8 +344,8 @@ select * from t1;
|
|||
a b
|
||||
-100 NULL
|
||||
65536 16
|
||||
Warning 1365 Division by 0
|
||||
Warnings:
|
||||
Warning 1365 Division by 0
|
||||
drop table t1;
|
||||
set sql_warnings = 0;
|
||||
# LOG10()
|
||||
|
|
@ -367,8 +367,8 @@ a b
|
|||
-100 NULL
|
||||
100 2
|
||||
2 0.30103
|
||||
Warning 1365 Division by 0
|
||||
Warnings:
|
||||
Warning 1365 Division by 0
|
||||
drop table t1;
|
||||
set sql_warnings = 0;
|
||||
# -
|
||||
|
|
@ -2722,8 +2722,8 @@ select * from t1;
|
|||
a b
|
||||
-1 18446744073709551615
|
||||
1 1
|
||||
Note 1105 Cast to unsigned converted negative integer to it's positive complement
|
||||
Warnings:
|
||||
Note 1105 Cast to unsigned converted negative integer to it's positive complement
|
||||
drop table t1;
|
||||
set sql_warnings = 0;
|
||||
# Convert()
|
||||
|
|
@ -2743,8 +2743,8 @@ select * from t1;
|
|||
a b
|
||||
-1 18446744073709551615
|
||||
1 1
|
||||
Note 1105 Cast to unsigned converted negative integer to it's positive complement
|
||||
Warnings:
|
||||
Note 1105 Cast to unsigned converted negative integer to it's positive complement
|
||||
drop table t1;
|
||||
set sql_warnings = 0;
|
||||
#
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ connection default;
|
|||
CREATE TABLE t1 ENGINE=InnoDB SELECT * FROM seq_1_to_100000000;
|
||||
connection con1;
|
||||
KILL QUERY @id;
|
||||
disconnect con1;
|
||||
connection default;
|
||||
ERROR 70100: Query execution was interrupted
|
||||
CREATE TABLE t1 (a SERIAL) ENGINE=InnoDB;
|
||||
|
|
@ -18,3 +17,26 @@ execute stmt;
|
|||
execute stmt;
|
||||
drop table t;
|
||||
# End of 10.5 tests
|
||||
#
|
||||
# MDEV-35647 Possible hang during CREATE TABLE…SELECT error handling
|
||||
#
|
||||
call mtr.add_suppression("InnoDB: DROP TABLE `test`\\.`t4`: Record changed");
|
||||
SET @save_debug= @@GLOBAL.innodb_evict_tables_on_commit_debug;
|
||||
SET GLOBAL innodb_evict_tables_on_commit_debug=on;
|
||||
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
|
||||
SET GLOBAL innodb_evict_tables_on_commit_debug=@save_debug;
|
||||
connection con1;
|
||||
CREATE TABLE t2 (b BLOB) ENGINE=InnoDB;
|
||||
INSERT INTO t2 VALUES (1),('2025-01-21 00:00:00');
|
||||
SET STATEMENT innodb_snapshot_isolation=ON FOR
|
||||
CREATE TABLE t3 ENGINE=InnoDB AS SELECT * FROM t1;
|
||||
connection default;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
|
||||
SET STATEMENT innodb_snapshot_isolation=ON FOR
|
||||
CREATE TABLE t4 (b BLOB CHECK (b)) ENGINE=InnoDB AS SELECT b FROM t2;
|
||||
ERROR 22007: Truncated incorrect DOUBLE value: '2025-01-21 00:00:00'
|
||||
connection con1;
|
||||
disconnect con1;
|
||||
connection default;
|
||||
DROP TABLE t3,t2,t1;
|
||||
# End of 10.6 tests
|
||||
|
|
|
|||
|
|
@ -243,3 +243,25 @@ Level Code Message
|
|||
Warning 140 InnoDB: PAGE_COMPRESSED table can't have ROW_TYPE=COMPRESSED
|
||||
Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options")
|
||||
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
|
||||
# End of 10.5 tests
|
||||
#
|
||||
# MDEV-35598 foreign key error is unnecessary truncated
|
||||
#
|
||||
set names utf8;
|
||||
create table t1яяяяяяяяяяььььььььььззззззззззшшшшшшшшшш
|
||||
(f1яяяяяяяяяяььььььььььззззззззззшшшшшшшшшш int not null primary key,
|
||||
f2яяяяяяяяяяььььььььььззззззззззшшшшшшшшшш int not null
|
||||
) engine=innodb;
|
||||
create table t2яяяяяяяяяяььььььььььззззззззззшшшшшшшшшш
|
||||
(f1яяяяяяяяяяььььььььььззззззззззшшшшшшшшшш varchar(100),
|
||||
f2яяяяяяяяяяььььььььььззззззззззшшшшшшшшшш int not null,
|
||||
index i2яяяяяяяяяяььььььььььззззззззззшшшшшшшшшш
|
||||
(f2яяяяяяяяяяььььььььььззззззззззшшшшшшшшшш)
|
||||
) engine=innodb;
|
||||
insert t1яяяяяяяяяяььььььььььззззззззззшшшшшшшшшш values(99, 2);
|
||||
alter table t2яяяяяяяяяяььььььььььззззззззззшшшшшшшшшш add foreign key(f2яяяяяяяяяяььььььььььззззззззззшшшшшшшшшш) references t1яяяяяяяяяяььььььььььззззззззззшшшшшшшшшш(f1яяяяяяяяяяььььььььььззззззззззшшшшшшшшшш);
|
||||
insert t2яяяяяяяяяяььььььььььззззззззззшшшшшшшшшш values('g', 3);
|
||||
ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`t2яяяяяяяяяяььььььььььззззззззззшшшшшшшшшш`, CONSTRAINT `t2яяяяяяяяяяььььььььььззззззззззшшшшшшшшшш_ibfk_1` FOREIGN KEY (`f2яяяяяяяяяяььььььььььззззззззззшшшшшшшшшш`) REFERENCES `t1яяяяяяяяяяььььььььььззззззззззшшшшшшшшшш` (`f1яяяяяяяяяяььььььььььззззз
|
||||
drop table t2яяяяяяяяяяььььььььььззззззззззшшшшшшшшшш,
|
||||
t1яяяяяяяяяяььььььььььззззззззззшшшшшшшшшш;
|
||||
# End of 10.6 tests
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1,6 +1,7 @@
|
|||
--source include/have_innodb.inc
|
||||
--source include/have_sequence.inc
|
||||
--source include/count_sessions.inc
|
||||
--source include/maybe_debug.inc
|
||||
|
||||
let $ID= `SELECT @id := CONNECTION_ID()`;
|
||||
|
||||
|
|
@ -17,7 +18,6 @@ let $wait_condition=
|
|||
and info = 'CREATE TABLE t1 ENGINE=InnoDB SELECT * FROM seq_1_to_100000000';
|
||||
--source include/wait_condition.inc
|
||||
KILL QUERY @id;
|
||||
disconnect con1;
|
||||
|
||||
connection default;
|
||||
--error ER_QUERY_INTERRUPTED
|
||||
|
|
@ -25,7 +25,6 @@ reap;
|
|||
|
||||
CREATE TABLE t1 (a SERIAL) ENGINE=InnoDB;
|
||||
DROP TABLE t1;
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
||||
--echo # End of 10.2 tests
|
||||
|
||||
|
|
@ -39,3 +38,38 @@ execute stmt;
|
|||
drop table t;
|
||||
|
||||
--echo # End of 10.5 tests
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-35647 Possible hang during CREATE TABLE…SELECT error handling
|
||||
--echo #
|
||||
call mtr.add_suppression("InnoDB: DROP TABLE `test`\\.`t4`: Record changed");
|
||||
|
||||
--error 0,ER_UNKNOWN_SYSTEM_VARIABLE
|
||||
SET @save_debug= @@GLOBAL.innodb_evict_tables_on_commit_debug;
|
||||
--error 0,ER_UNKNOWN_SYSTEM_VARIABLE
|
||||
SET GLOBAL innodb_evict_tables_on_commit_debug=on;
|
||||
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
|
||||
--error 0,ER_UNKNOWN_SYSTEM_VARIABLE
|
||||
SET GLOBAL innodb_evict_tables_on_commit_debug=@save_debug;
|
||||
|
||||
connection con1;
|
||||
CREATE TABLE t2 (b BLOB) ENGINE=InnoDB;
|
||||
INSERT INTO t2 VALUES (1),('2025-01-21 00:00:00');
|
||||
--send
|
||||
SET STATEMENT innodb_snapshot_isolation=ON FOR
|
||||
CREATE TABLE t3 ENGINE=InnoDB AS SELECT * FROM t1;
|
||||
|
||||
connection default;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
|
||||
--error ER_TRUNCATED_WRONG_VALUE
|
||||
SET STATEMENT innodb_snapshot_isolation=ON FOR
|
||||
CREATE TABLE t4 (b BLOB CHECK (b)) ENGINE=InnoDB AS SELECT b FROM t2;
|
||||
connection con1;
|
||||
reap;
|
||||
disconnect con1;
|
||||
connection default;
|
||||
DROP TABLE t3,t2,t1;
|
||||
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
||||
--echo # End of 10.6 tests
|
||||
|
|
|
|||
|
|
@ -272,3 +272,30 @@ SET FOREIGN_KEY_CHECKS=DEFAULT;
|
|||
--error ER_CANT_CREATE_TABLE
|
||||
CREATE TABLE t1(a SERIAL) ENGINE=InnoDB ROW_FORMAT=COMPRESSED PAGE_COMPRESSED=1;
|
||||
SHOW WARNINGS;
|
||||
|
||||
--echo # End of 10.5 tests
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-35598 foreign key error is unnecessary truncated
|
||||
--echo #
|
||||
set names utf8;
|
||||
create table t1яяяяяяяяяяььььььььььззззззззззшшшшшшшшшш
|
||||
(f1яяяяяяяяяяььььььььььззззззззззшшшшшшшшшш int not null primary key,
|
||||
f2яяяяяяяяяяььььььььььззззззззззшшшшшшшшшш int not null
|
||||
) engine=innodb;
|
||||
create table t2яяяяяяяяяяььььььььььззззззззззшшшшшшшшшш
|
||||
(f1яяяяяяяяяяььььььььььззззззззззшшшшшшшшшш varchar(100),
|
||||
f2яяяяяяяяяяььььььььььззззззззззшшшшшшшшшш int not null,
|
||||
index i2яяяяяяяяяяььььььььььззззззззззшшшшшшшшшш
|
||||
(f2яяяяяяяяяяььььььььььззззззззззшшшшшшшшшш)
|
||||
) engine=innodb;
|
||||
|
||||
insert t1яяяяяяяяяяььььььььььззззззззззшшшшшшшшшш values(99, 2);
|
||||
alter table t2яяяяяяяяяяььььььььььззззззззззшшшшшшшшшш add foreign key(f2яяяяяяяяяяььььььььььззззззззззшшшшшшшшшш) references t1яяяяяяяяяяььььььььььззззззззззшшшшшшшшшш(f1яяяяяяяяяяььььььььььззззззззззшшшшшшшшшш);
|
||||
|
||||
--error ER_NO_REFERENCED_ROW_2
|
||||
insert t2яяяяяяяяяяььььььььььззззззззззшшшшшшшшшш values('g', 3);
|
||||
drop table t2яяяяяяяяяяььььььььььззззззззззшшшшшшшшшш,
|
||||
t1яяяяяяяяяяььььььььььззззззззззшшшшшшшшшш;
|
||||
|
||||
--echo # End of 10.6 tests
|
||||
|
|
|
|||
|
|
@ -12,15 +12,8 @@
|
|||
# get NULL
|
||||
-- source include/not_encrypted.inc
|
||||
|
||||
-- disable_query_log
|
||||
-- disable_result_log
|
||||
|
||||
SET default_storage_engine=InnoDB;
|
||||
|
||||
-- disable_warnings
|
||||
DROP TABLE IF EXISTS t_min, t_max;
|
||||
-- enable_warnings
|
||||
|
||||
let $table_def =
|
||||
(
|
||||
c01 TINYINT,
|
||||
|
|
@ -118,7 +111,6 @@ SELECT * FROM ```t'\"_str` WHERE c1 = '3' FOR UPDATE;
|
|||
-- send
|
||||
SELECT * FROM ```t'\"_str` WHERE c1 = '4' FOR UPDATE;
|
||||
|
||||
-- enable_result_log
|
||||
-- connection con_verify_innodb_locks
|
||||
# Wait for the above queries to execute before continuing.
|
||||
# Without this, it sometimes happens that the SELECT from innodb_locks
|
||||
|
|
@ -161,7 +153,6 @@ SET SQL_MODE='ANSI_QUOTES';
|
|||
SELECT lock_table,COUNT(*) FROM INFORMATION_SCHEMA.INNODB_LOCKS
|
||||
GROUP BY lock_table;
|
||||
SET @@sql_mode=@save_sql_mode;
|
||||
-- disable_result_log
|
||||
|
||||
-- connection default
|
||||
|
||||
|
|
@ -184,9 +175,7 @@ DROP TABLE t_min, t_max, ```t'\"_str`;
|
|||
# INFORMATION_SCHEMA.INNODB_TRX
|
||||
#
|
||||
|
||||
-- enable_result_log
|
||||
DESCRIBE INFORMATION_SCHEMA.INNODB_TRX;
|
||||
-- disable_result_log
|
||||
|
||||
-- disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
|
|
@ -222,17 +211,14 @@ SELECT * FROM t1 FOR UPDATE;
|
|||
let $wait_condition=
|
||||
SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.INNODB_TRX;
|
||||
--source include/wait_condition.inc
|
||||
-- disable_query_log
|
||||
|
||||
-- connection con_verify_innodb_trx
|
||||
-- enable_result_log
|
||||
SELECT trx_state, trx_weight, trx_tables_in_use, trx_tables_locked,
|
||||
trx_rows_locked, trx_rows_modified, trx_concurrency_tickets,
|
||||
trx_isolation_level, trx_unique_checks, trx_foreign_key_checks
|
||||
FROM INFORMATION_SCHEMA.INNODB_TRX;
|
||||
|
||||
-- connection con_trx
|
||||
-- disable_result_log
|
||||
ROLLBACK;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
SET UNIQUE_CHECKS = 0;
|
||||
|
|
@ -243,14 +229,11 @@ INSERT INTO t1 VALUES (6,12);
|
|||
let $wait_condition=
|
||||
SELECT trx_unique_checks = 0 FROM INFORMATION_SCHEMA.INNODB_TRX;
|
||||
--source include/wait_condition.inc
|
||||
-- disable_query_log
|
||||
|
||||
-- connection con_verify_innodb_trx
|
||||
-- enable_result_log
|
||||
SELECT trx_isolation_level, trx_unique_checks, trx_foreign_key_checks
|
||||
FROM INFORMATION_SCHEMA.INNODB_TRX;
|
||||
|
||||
-- disable_result_log
|
||||
-- connection con_trx
|
||||
ROLLBACK;
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
|
|
@ -262,13 +245,10 @@ INSERT INTO t2 VALUES (4,10);
|
|||
let $wait_condition=
|
||||
SELECT trx_unique_checks = 1 FROM INFORMATION_SCHEMA.INNODB_TRX;
|
||||
--source include/wait_condition.inc
|
||||
-- disable_query_log
|
||||
|
||||
-- enable_result_log
|
||||
-- connection con_verify_innodb_trx
|
||||
SELECT trx_state, trx_isolation_level, trx_last_foreign_key_error
|
||||
FROM INFORMATION_SCHEMA.INNODB_TRX;
|
||||
-- disable_result_log
|
||||
|
||||
-- connection default
|
||||
|
||||
|
|
|
|||
|
|
@ -5,3 +5,19 @@ VARIABLE_NAME VARIABLE_VALUE
|
|||
connection default;
|
||||
disconnect a;
|
||||
drop user a@localhost;
|
||||
#
|
||||
# MDEV-35384 Table performance_schema.session_status and other two tables are not shown in information_schema.tables for normal users
|
||||
#
|
||||
create user foo@localhost;
|
||||
connect foo,localhost,foo;
|
||||
select table_schema,engine from information_schema.tables where table_name='session_status';
|
||||
table_schema engine
|
||||
information_schema MEMORY
|
||||
performance_schema PERFORMANCE_SCHEMA
|
||||
select count(*) > 0 as 'table is readable' from performance_schema.session_status;
|
||||
table is readable
|
||||
1
|
||||
connection default;
|
||||
disconnect foo;
|
||||
drop user foo@localhost;
|
||||
# End of 10.6 tests
|
||||
|
|
|
|||
|
|
@ -10,3 +10,16 @@ connection default;
|
|||
disconnect a;
|
||||
drop user a@localhost;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-35384 Table performance_schema.session_status and other two tables are not shown in information_schema.tables for normal users
|
||||
--echo #
|
||||
create user foo@localhost;
|
||||
connect foo,localhost,foo;
|
||||
sorted_result;
|
||||
select table_schema,engine from information_schema.tables where table_name='session_status';
|
||||
select count(*) > 0 as 'table is readable' from performance_schema.session_status;
|
||||
connection default;
|
||||
disconnect foo;
|
||||
drop user foo@localhost;
|
||||
|
||||
--echo # End of 10.6 tests
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
--- suite/sys_vars/r/sysvars_aria.result
|
||||
+++ suite/sys_vars/r/sysvars_aria,32bit.reject
|
||||
--- a/mysql-test/suite/sys_vars/r/sysvars_aria.result
|
||||
+++ b/mysql-test/suite/sys_vars/r/sysvars_aria.result
|
||||
@@ -5,7 +5,7 @@
|
||||
SESSION_VALUE NULL
|
||||
DEFAULT_VALUE 8192
|
||||
|
|
@ -45,7 +45,7 @@
|
|||
VARIABLE_COMMENT Interval between commits in microseconds (1/1000000 sec). 0 stands for no waiting for other threads to come and do a commit in "hard" mode and no sync()/commit at all in "soft" mode. Option has only an effect if aria_group_commit is used
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 4294967295
|
||||
@@ -89,7 +89,7 @@
|
||||
@@ -101,7 +101,7 @@
|
||||
SESSION_VALUE NULL
|
||||
DEFAULT_VALUE 1073741824
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -54,7 +54,7 @@
|
|||
VARIABLE_COMMENT Limit for transaction log size
|
||||
NUMERIC_MIN_VALUE 8388608
|
||||
NUMERIC_MAX_VALUE 4294967295
|
||||
@@ -125,10 +125,10 @@
|
||||
@@ -137,10 +137,10 @@
|
||||
SESSION_VALUE NULL
|
||||
DEFAULT_VALUE 300
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -67,7 +67,7 @@
|
|||
NUMERIC_BLOCK_SIZE 100
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
@@ -149,7 +149,7 @@
|
||||
@@ -161,7 +161,7 @@
|
||||
SESSION_VALUE NULL
|
||||
DEFAULT_VALUE 100
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -76,7 +76,7 @@
|
|||
VARIABLE_COMMENT The minimum percentage of warm blocks in key cache
|
||||
NUMERIC_MIN_VALUE 1
|
||||
NUMERIC_MAX_VALUE 100
|
||||
@@ -161,7 +161,7 @@
|
||||
@@ -173,7 +173,7 @@
|
||||
SESSION_VALUE NULL
|
||||
DEFAULT_VALUE 512
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -85,7 +85,7 @@
|
|||
VARIABLE_COMMENT Number of hash buckets for open and changed files. If you have a lot of Aria files open you should increase this for faster flush of changes. A good value is probably 1/10 of number of possible open Aria files.
|
||||
NUMERIC_MIN_VALUE 128
|
||||
NUMERIC_MAX_VALUE 16384
|
||||
@@ -197,7 +197,7 @@
|
||||
@@ -209,7 +209,7 @@
|
||||
SESSION_VALUE 1
|
||||
DEFAULT_VALUE 1
|
||||
VARIABLE_SCOPE SESSION
|
||||
|
|
@ -94,10 +94,10 @@
|
|||
VARIABLE_COMMENT Number of threads to use when repairing Aria tables. The value of 1 disables parallel repair.
|
||||
NUMERIC_MIN_VALUE 1
|
||||
NUMERIC_MAX_VALUE 128
|
||||
@@ -212,7 +212,7 @@
|
||||
@@ -224,7 +224,7 @@
|
||||
VARIABLE_TYPE BIGINT UNSIGNED
|
||||
VARIABLE_COMMENT The buffer that is allocated when sorting the index when doing a REPAIR or when creating indexes with CREATE INDEX or ALTER TABLE.
|
||||
NUMERIC_MIN_VALUE 16376
|
||||
NUMERIC_MIN_VALUE 16352
|
||||
-NUMERIC_MAX_VALUE 1152921504606846975
|
||||
+NUMERIC_MAX_VALUE 268435455
|
||||
NUMERIC_BLOCK_SIZE 1
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
--- sysvars_server_embedded.result 2024-01-24 07:43:25.510260081 +0100
|
||||
+++ sysvars_server_embedded,32bit.result 2024-01-28 18:07:02.851488186 +0100
|
||||
--- a/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
|
||||
+++ b/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
|
||||
@@ -44,7 +44,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME ARIA_BLOCK_SIZE
|
||||
|
|
@ -97,7 +97,7 @@
|
|||
@@ -227,7 +227,7 @@
|
||||
VARIABLE_TYPE BIGINT UNSIGNED
|
||||
VARIABLE_COMMENT The buffer that is allocated when sorting the index when doing a REPAIR or when creating indexes with CREATE INDEX or ALTER TABLE.
|
||||
NUMERIC_MIN_VALUE 16376
|
||||
NUMERIC_MIN_VALUE 16352
|
||||
-NUMERIC_MAX_VALUE 1152921504606846975
|
||||
+NUMERIC_MAX_VALUE 268435455
|
||||
NUMERIC_BLOCK_SIZE 1
|
||||
|
|
@ -722,15 +722,6 @@
|
|||
VARIABLE_COMMENT If this is not 0, then mysqld will use this value to reserve file descriptors to use with setrlimit(). If this value is 0 or autoset then mysqld will reserve max_connections*5 or max_connections + table_cache*2 (whichever is larger) number of file descriptors
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 4294967295
|
||||
@@ -2324,7 +2324,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME OPTIMIZER_ADJUST_SECONDARY_KEY_COSTS
|
||||
VARIABLE_SCOPE SESSION
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT 0 = No changes. 1 = Update secondary key costs for ranges to be at least 5x of clustered primary key costs. 2 = Remove 'max_seek optimization' for secondary keys and slight adjustment of filter cost. This option will be deleted in MariaDB 11.0 as it is not needed with the new 11.0 optimizer.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 2
|
||||
@@ -2334,7 +2334,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME OPTIMIZER_EXTRA_PRUNING_DEPTH
|
||||
|
|
@ -740,7 +731,7 @@
|
|||
VARIABLE_COMMENT If the optimizer needs to enumerate join prefix of this size or larger, then it will try aggressively prune away the search space.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 62
|
||||
@@ -2344,7 +2344,7 @@
|
||||
@@ -2354,7 +2354,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME OPTIMIZER_MAX_SEL_ARGS
|
||||
VARIABLE_SCOPE SESSION
|
||||
|
|
@ -749,7 +740,7 @@
|
|||
VARIABLE_COMMENT The maximum number of SEL_ARG objects created when optimizing a range. If more objects would be needed, the range will not be used by the optimizer.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 4294967295
|
||||
@@ -2354,7 +2354,7 @@
|
||||
@@ -2364,7 +2364,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME OPTIMIZER_MAX_SEL_ARG_WEIGHT
|
||||
VARIABLE_SCOPE SESSION
|
||||
|
|
@ -758,7 +749,7 @@
|
|||
VARIABLE_COMMENT The maximum weight of the SEL_ARG graph. Set to 0 for no limit
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 4294967295
|
||||
@@ -2364,7 +2364,7 @@
|
||||
@@ -2374,7 +2374,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME OPTIMIZER_PRUNE_LEVEL
|
||||
VARIABLE_SCOPE SESSION
|
||||
|
|
@ -767,7 +758,7 @@
|
|||
VARIABLE_COMMENT Controls the heuristic(s) applied during query optimization to prune less-promising partial plans from the optimizer search space. Meaning: 0 - do not apply any heuristic, thus perform exhaustive search: 1 - prune plans based on cost and number of retrieved rows eq_ref: 2 - prune also if we find an eq_ref chain
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 2
|
||||
@@ -2374,7 +2374,7 @@
|
||||
@@ -2384,7 +2384,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME OPTIMIZER_SEARCH_DEPTH
|
||||
VARIABLE_SCOPE SESSION
|
||||
|
|
@ -776,7 +767,7 @@
|
|||
VARIABLE_COMMENT Maximum depth of search performed by the query optimizer. Values larger than the number of relations in a query result in better query plans, but take longer to compile a query. Values smaller than the number of tables in a relation result in faster optimization, but may produce very bad query plans. If set to 0, the system will automatically pick a reasonable value.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 62
|
||||
@@ -2384,7 +2384,7 @@
|
||||
@@ -2394,7 +2394,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME OPTIMIZER_SELECTIVITY_SAMPLING_LIMIT
|
||||
VARIABLE_SCOPE SESSION
|
||||
|
|
@ -785,7 +776,7 @@
|
|||
VARIABLE_COMMENT Controls number of record samples to check condition selectivity
|
||||
NUMERIC_MIN_VALUE 10
|
||||
NUMERIC_MAX_VALUE 4294967295
|
||||
@@ -2414,17 +2414,17 @@
|
||||
@@ -2424,17 +2424,17 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME OPTIMIZER_TRACE_MAX_MEM_SIZE
|
||||
VARIABLE_SCOPE SESSION
|
||||
|
|
@ -806,7 +797,7 @@
|
|||
VARIABLE_COMMENT Controls selectivity of which conditions the optimizer takes into account to calculate cardinality of a partial join when it searches for the best execution plan Meaning: 1 - use selectivity of index backed range conditions to calculate the cardinality of a partial join if the last joined table is accessed by full table scan or an index scan, 2 - use selectivity of index backed range conditions to calculate the cardinality of a partial join in any case, 3 - additionally always use selectivity of range conditions that are not backed by any index to calculate the cardinality of a partial join, 4 - use histograms to calculate selectivity of range conditions that are not backed by any index to calculate the cardinality of a partial join.5 - additionally use selectivity of certain non-range predicates calculated on record samples
|
||||
NUMERIC_MIN_VALUE 1
|
||||
NUMERIC_MAX_VALUE 5
|
||||
@@ -2444,7 +2444,7 @@
|
||||
@@ -2454,7 +2454,7 @@
|
||||
COMMAND_LINE_ARGUMENT OPTIONAL
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_ACCOUNTS_SIZE
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -815,7 +806,7 @@
|
|||
VARIABLE_COMMENT Maximum number of instrumented user@host accounts. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -2454,7 +2454,7 @@
|
||||
@@ -2464,7 +2464,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_DIGESTS_SIZE
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -824,7 +815,7 @@
|
|||
VARIABLE_COMMENT Size of the statement digest. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -2464,7 +2464,7 @@
|
||||
@@ -2474,7 +2474,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_STAGES_HISTORY_LONG_SIZE
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -833,7 +824,7 @@
|
|||
VARIABLE_COMMENT Number of rows in EVENTS_STAGES_HISTORY_LONG. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -2474,7 +2474,7 @@
|
||||
@@ -2484,7 +2484,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_STAGES_HISTORY_SIZE
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -842,7 +833,7 @@
|
|||
VARIABLE_COMMENT Number of rows per thread in EVENTS_STAGES_HISTORY. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1024
|
||||
@@ -2484,7 +2484,7 @@
|
||||
@@ -2494,7 +2494,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_STATEMENTS_HISTORY_LONG_SIZE
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -851,7 +842,7 @@
|
|||
VARIABLE_COMMENT Number of rows in EVENTS_STATEMENTS_HISTORY_LONG. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -2494,7 +2494,7 @@
|
||||
@@ -2504,7 +2504,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_STATEMENTS_HISTORY_SIZE
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -860,7 +851,7 @@
|
|||
VARIABLE_COMMENT Number of rows per thread in EVENTS_STATEMENTS_HISTORY. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1024
|
||||
@@ -2504,7 +2504,7 @@
|
||||
@@ -2514,7 +2514,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_TRANSACTIONS_HISTORY_LONG_SIZE
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -869,7 +860,7 @@
|
|||
VARIABLE_COMMENT Number of rows in EVENTS_TRANSACTIONS_HISTORY_LONG. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -2514,7 +2514,7 @@
|
||||
@@ -2524,7 +2524,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_TRANSACTIONS_HISTORY_SIZE
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -878,7 +869,7 @@
|
|||
VARIABLE_COMMENT Number of rows per thread in EVENTS_TRANSACTIONS_HISTORY. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1024
|
||||
@@ -2524,7 +2524,7 @@
|
||||
@@ -2534,7 +2534,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_WAITS_HISTORY_LONG_SIZE
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -887,7 +878,7 @@
|
|||
VARIABLE_COMMENT Number of rows in EVENTS_WAITS_HISTORY_LONG. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -2534,7 +2534,7 @@
|
||||
@@ -2544,7 +2544,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_WAITS_HISTORY_SIZE
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -896,7 +887,7 @@
|
|||
VARIABLE_COMMENT Number of rows per thread in EVENTS_WAITS_HISTORY. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1024
|
||||
@@ -2544,7 +2544,7 @@
|
||||
@@ -2554,7 +2554,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_HOSTS_SIZE
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -905,7 +896,7 @@
|
|||
VARIABLE_COMMENT Maximum number of instrumented hosts. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -2554,7 +2554,7 @@
|
||||
@@ -2564,7 +2564,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_COND_CLASSES
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -914,7 +905,7 @@
|
|||
VARIABLE_COMMENT Maximum number of condition instruments.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 256
|
||||
@@ -2564,7 +2564,7 @@
|
||||
@@ -2574,7 +2574,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_COND_INSTANCES
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -923,7 +914,7 @@
|
|||
VARIABLE_COMMENT Maximum number of instrumented condition objects. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -2574,7 +2574,7 @@
|
||||
@@ -2584,7 +2584,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_DIGEST_LENGTH
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -932,7 +923,7 @@
|
|||
VARIABLE_COMMENT Maximum length considered for digest text, when stored in performance_schema tables.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -2584,7 +2584,7 @@
|
||||
@@ -2594,7 +2594,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_FILE_CLASSES
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -941,7 +932,7 @@
|
|||
VARIABLE_COMMENT Maximum number of file instruments.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 256
|
||||
@@ -2594,7 +2594,7 @@
|
||||
@@ -2604,7 +2604,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_FILE_HANDLES
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -950,7 +941,7 @@
|
|||
VARIABLE_COMMENT Maximum number of opened instrumented files.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -2604,7 +2604,7 @@
|
||||
@@ -2614,7 +2614,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_FILE_INSTANCES
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -959,7 +950,7 @@
|
|||
VARIABLE_COMMENT Maximum number of instrumented files. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -2614,7 +2614,7 @@
|
||||
@@ -2624,7 +2624,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_INDEX_STAT
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -968,7 +959,7 @@
|
|||
VARIABLE_COMMENT Maximum number of index statistics for instrumented tables. Use 0 to disable, -1 for automated scaling.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -2624,7 +2624,7 @@
|
||||
@@ -2634,7 +2634,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_MEMORY_CLASSES
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -977,7 +968,7 @@
|
|||
VARIABLE_COMMENT Maximum number of memory pool instruments.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 1024
|
||||
@@ -2634,7 +2634,7 @@
|
||||
@@ -2644,7 +2644,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_METADATA_LOCKS
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -986,7 +977,7 @@
|
|||
VARIABLE_COMMENT Maximum number of metadata locks. Use 0 to disable, -1 for automated scaling.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 104857600
|
||||
@@ -2644,7 +2644,7 @@
|
||||
@@ -2654,7 +2654,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_MUTEX_CLASSES
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -995,7 +986,7 @@
|
|||
VARIABLE_COMMENT Maximum number of mutex instruments.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 256
|
||||
@@ -2654,7 +2654,7 @@
|
||||
@@ -2664,7 +2664,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_MUTEX_INSTANCES
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1004,7 +995,7 @@
|
|||
VARIABLE_COMMENT Maximum number of instrumented MUTEX objects. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 104857600
|
||||
@@ -2664,7 +2664,7 @@
|
||||
@@ -2674,7 +2674,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_PREPARED_STATEMENTS_INSTANCES
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1013,7 +1004,7 @@
|
|||
VARIABLE_COMMENT Maximum number of instrumented prepared statements. Use 0 to disable, -1 for automated scaling.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -2674,7 +2674,7 @@
|
||||
@@ -2684,7 +2684,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_PROGRAM_INSTANCES
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1022,7 +1013,7 @@
|
|||
VARIABLE_COMMENT Maximum number of instrumented programs. Use 0 to disable, -1 for automated scaling.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -2684,7 +2684,7 @@
|
||||
@@ -2694,7 +2694,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_RWLOCK_CLASSES
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1031,7 +1022,7 @@
|
|||
VARIABLE_COMMENT Maximum number of rwlock instruments.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 256
|
||||
@@ -2694,7 +2694,7 @@
|
||||
@@ -2704,7 +2704,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_RWLOCK_INSTANCES
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1040,7 +1031,7 @@
|
|||
VARIABLE_COMMENT Maximum number of instrumented RWLOCK objects. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 104857600
|
||||
@@ -2704,7 +2704,7 @@
|
||||
@@ -2714,7 +2714,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_SOCKET_CLASSES
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1049,7 +1040,7 @@
|
|||
VARIABLE_COMMENT Maximum number of socket instruments.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 256
|
||||
@@ -2714,7 +2714,7 @@
|
||||
@@ -2724,7 +2724,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_SOCKET_INSTANCES
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1058,7 +1049,7 @@
|
|||
VARIABLE_COMMENT Maximum number of opened instrumented sockets. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -2724,7 +2724,7 @@
|
||||
@@ -2734,7 +2734,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_SQL_TEXT_LENGTH
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1067,7 +1058,7 @@
|
|||
VARIABLE_COMMENT Maximum length of displayed sql text.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -2734,7 +2734,7 @@
|
||||
@@ -2744,7 +2744,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_STAGE_CLASSES
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1076,7 +1067,7 @@
|
|||
VARIABLE_COMMENT Maximum number of stage instruments.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 256
|
||||
@@ -2744,7 +2744,7 @@
|
||||
@@ -2754,7 +2754,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_STATEMENT_CLASSES
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1085,7 +1076,7 @@
|
|||
VARIABLE_COMMENT Maximum number of statement instruments.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 256
|
||||
@@ -2754,7 +2754,7 @@
|
||||
@@ -2764,7 +2764,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_STATEMENT_STACK
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1094,7 +1085,7 @@
|
|||
VARIABLE_COMMENT Number of rows per thread in EVENTS_STATEMENTS_CURRENT.
|
||||
NUMERIC_MIN_VALUE 1
|
||||
NUMERIC_MAX_VALUE 256
|
||||
@@ -2764,7 +2764,7 @@
|
||||
@@ -2774,7 +2774,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_TABLE_HANDLES
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1103,7 +1094,7 @@
|
|||
VARIABLE_COMMENT Maximum number of opened instrumented tables. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -2774,7 +2774,7 @@
|
||||
@@ -2784,7 +2784,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_TABLE_INSTANCES
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1112,7 +1103,7 @@
|
|||
VARIABLE_COMMENT Maximum number of instrumented tables. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -2784,7 +2784,7 @@
|
||||
@@ -2794,7 +2794,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_TABLE_LOCK_STAT
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1121,7 +1112,7 @@
|
|||
VARIABLE_COMMENT Maximum number of lock statistics for instrumented tables. Use 0 to disable, -1 for automated scaling.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -2794,7 +2794,7 @@
|
||||
@@ -2804,7 +2804,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_THREAD_CLASSES
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1130,7 +1121,7 @@
|
|||
VARIABLE_COMMENT Maximum number of thread instruments.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 256
|
||||
@@ -2804,7 +2804,7 @@
|
||||
@@ -2814,7 +2814,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_THREAD_INSTANCES
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1139,7 +1130,7 @@
|
|||
VARIABLE_COMMENT Maximum number of instrumented threads. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -2814,7 +2814,7 @@
|
||||
@@ -2824,7 +2824,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_SESSION_CONNECT_ATTRS_SIZE
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1148,7 +1139,7 @@
|
|||
VARIABLE_COMMENT Size of session attribute string buffer per thread. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -2824,7 +2824,7 @@
|
||||
@@ -2834,7 +2834,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_SETUP_ACTORS_SIZE
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1157,7 +1148,7 @@
|
|||
VARIABLE_COMMENT Maximum number of rows in SETUP_ACTORS.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1024
|
||||
@@ -2834,7 +2834,7 @@
|
||||
@@ -2844,7 +2844,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_SETUP_OBJECTS_SIZE
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1166,7 +1157,7 @@
|
|||
VARIABLE_COMMENT Maximum number of rows in SETUP_OBJECTS.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -2844,7 +2844,7 @@
|
||||
@@ -2854,7 +2854,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_USERS_SIZE
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1175,7 +1166,7 @@
|
|||
VARIABLE_COMMENT Maximum number of instrumented users. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -2894,7 +2894,7 @@
|
||||
@@ -2904,7 +2904,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PRELOAD_BUFFER_SIZE
|
||||
VARIABLE_SCOPE SESSION
|
||||
|
|
@ -1184,7 +1175,7 @@
|
|||
VARIABLE_COMMENT The size of the buffer that is allocated when preloading indexes
|
||||
NUMERIC_MIN_VALUE 1024
|
||||
NUMERIC_MAX_VALUE 1073741824
|
||||
@@ -2914,7 +2914,7 @@
|
||||
@@ -2924,7 +2924,7 @@
|
||||
COMMAND_LINE_ARGUMENT NULL
|
||||
VARIABLE_NAME PROFILING_HISTORY_SIZE
|
||||
VARIABLE_SCOPE SESSION
|
||||
|
|
@ -1193,7 +1184,7 @@
|
|||
VARIABLE_COMMENT Number of statements about which profiling information is maintained. If set to 0, no profiles are stored. See SHOW PROFILES.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 100
|
||||
@@ -2924,7 +2924,7 @@
|
||||
@@ -2934,7 +2934,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PROGRESS_REPORT_TIME
|
||||
VARIABLE_SCOPE SESSION
|
||||
|
|
@ -1202,7 +1193,7 @@
|
|||
VARIABLE_COMMENT Seconds between sending progress reports to the client for time-consuming statements. Set to 0 to disable progress reporting.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 4294967295
|
||||
@@ -2984,7 +2984,7 @@
|
||||
@@ -2994,7 +2994,7 @@
|
||||
COMMAND_LINE_ARGUMENT NULL
|
||||
VARIABLE_NAME QUERY_ALLOC_BLOCK_SIZE
|
||||
VARIABLE_SCOPE SESSION
|
||||
|
|
@ -1211,7 +1202,7 @@
|
|||
VARIABLE_COMMENT Allocation block size for query parsing and execution
|
||||
NUMERIC_MIN_VALUE 1024
|
||||
NUMERIC_MAX_VALUE 4294967295
|
||||
@@ -2994,7 +2994,7 @@
|
||||
@@ -3004,7 +3004,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME QUERY_CACHE_LIMIT
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1220,7 +1211,7 @@
|
|||
VARIABLE_COMMENT Don't cache results that are bigger than this
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 4294967295
|
||||
@@ -3004,7 +3004,7 @@
|
||||
@@ -3014,7 +3014,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME QUERY_CACHE_MIN_RES_UNIT
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1229,7 +1220,7 @@
|
|||
VARIABLE_COMMENT The minimum size for blocks allocated by the query cache
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 4294967295
|
||||
@@ -3017,7 +3017,7 @@
|
||||
@@ -3027,7 +3027,7 @@
|
||||
VARIABLE_TYPE BIGINT UNSIGNED
|
||||
VARIABLE_COMMENT The memory allocated to store results from old queries
|
||||
NUMERIC_MIN_VALUE 0
|
||||
|
|
@ -1238,7 +1229,7 @@
|
|||
NUMERIC_BLOCK_SIZE 1024
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
@@ -3054,7 +3054,7 @@
|
||||
@@ -3064,7 +3064,7 @@
|
||||
COMMAND_LINE_ARGUMENT OPTIONAL
|
||||
VARIABLE_NAME QUERY_PREALLOC_SIZE
|
||||
VARIABLE_SCOPE SESSION
|
||||
|
|
@ -1247,7 +1238,7 @@
|
|||
VARIABLE_COMMENT Persistent buffer for query parsing and execution
|
||||
NUMERIC_MIN_VALUE 1024
|
||||
NUMERIC_MAX_VALUE 4294967295
|
||||
@@ -3067,7 +3067,7 @@
|
||||
@@ -3077,7 +3077,7 @@
|
||||
VARIABLE_TYPE BIGINT UNSIGNED
|
||||
VARIABLE_COMMENT Sets the internal state of the RAND() generator for replication purposes
|
||||
NUMERIC_MIN_VALUE 0
|
||||
|
|
@ -1256,7 +1247,7 @@
|
|||
NUMERIC_BLOCK_SIZE 1
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
@@ -3077,14 +3077,14 @@
|
||||
@@ -3087,14 +3087,14 @@
|
||||
VARIABLE_TYPE BIGINT UNSIGNED
|
||||
VARIABLE_COMMENT Sets the internal state of the RAND() generator for replication purposes
|
||||
NUMERIC_MIN_VALUE 0
|
||||
|
|
@ -1273,7 +1264,7 @@
|
|||
VARIABLE_COMMENT Allocation block size for storing ranges during optimization
|
||||
NUMERIC_MIN_VALUE 4096
|
||||
NUMERIC_MAX_VALUE 4294967295
|
||||
@@ -3094,7 +3094,7 @@
|
||||
@@ -3104,7 +3104,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME READ_BUFFER_SIZE
|
||||
VARIABLE_SCOPE SESSION
|
||||
|
|
@ -1282,7 +1273,7 @@
|
|||
VARIABLE_COMMENT Each thread that does a sequential scan allocates a buffer of this size for each table it scans. If you do many sequential scans, you may want to increase this value
|
||||
NUMERIC_MIN_VALUE 8192
|
||||
NUMERIC_MAX_VALUE 2147483647
|
||||
@@ -3114,7 +3114,7 @@
|
||||
@@ -3124,7 +3124,7 @@
|
||||
COMMAND_LINE_ARGUMENT OPTIONAL
|
||||
VARIABLE_NAME READ_RND_BUFFER_SIZE
|
||||
VARIABLE_SCOPE SESSION
|
||||
|
|
@ -1291,7 +1282,7 @@
|
|||
VARIABLE_COMMENT When reading rows in sorted order after a sort, the rows are read through this buffer to avoid a disk seeks
|
||||
NUMERIC_MIN_VALUE 1
|
||||
NUMERIC_MAX_VALUE 2147483647
|
||||
@@ -3134,10 +3134,10 @@
|
||||
@@ -3144,10 +3144,10 @@
|
||||
COMMAND_LINE_ARGUMENT OPTIONAL
|
||||
VARIABLE_NAME ROWID_MERGE_BUFF_SIZE
|
||||
VARIABLE_SCOPE SESSION
|
||||
|
|
@ -1304,7 +1295,7 @@
|
|||
NUMERIC_BLOCK_SIZE 1
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
@@ -3174,7 +3174,7 @@
|
||||
@@ -3184,7 +3184,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME SERVER_ID
|
||||
VARIABLE_SCOPE SESSION
|
||||
|
|
@ -1313,7 +1304,7 @@
|
|||
VARIABLE_COMMENT Uniquely identifies the server instance in the community of replication partners
|
||||
NUMERIC_MIN_VALUE 1
|
||||
NUMERIC_MAX_VALUE 4294967295
|
||||
@@ -3254,7 +3254,7 @@
|
||||
@@ -3274,7 +3274,7 @@
|
||||
COMMAND_LINE_ARGUMENT OPTIONAL
|
||||
VARIABLE_NAME SLAVE_MAX_ALLOWED_PACKET
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1322,7 +1313,7 @@
|
|||
VARIABLE_COMMENT The maximum packet length to sent successfully from the master to slave.
|
||||
NUMERIC_MIN_VALUE 1024
|
||||
NUMERIC_MAX_VALUE 1073741824
|
||||
@@ -3264,7 +3264,7 @@
|
||||
@@ -3284,7 +3284,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME SLOW_LAUNCH_TIME
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1331,7 +1322,7 @@
|
|||
VARIABLE_COMMENT If creating the thread takes longer than this value (in seconds), the Slow_launch_threads counter will be incremented
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 31536000
|
||||
@@ -3307,7 +3307,7 @@
|
||||
@@ -3327,7 +3327,7 @@
|
||||
VARIABLE_TYPE BIGINT UNSIGNED
|
||||
VARIABLE_COMMENT Each thread that needs to do a sort allocates a buffer of this size
|
||||
NUMERIC_MIN_VALUE 1024
|
||||
|
|
@ -1340,7 +1331,7 @@
|
|||
NUMERIC_BLOCK_SIZE 1
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
@@ -3524,7 +3524,7 @@
|
||||
@@ -3544,7 +3544,7 @@
|
||||
COMMAND_LINE_ARGUMENT NULL
|
||||
VARIABLE_NAME STORED_PROGRAM_CACHE
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1349,7 +1340,7 @@
|
|||
VARIABLE_COMMENT The soft upper limit for number of cached stored routines for one connection.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 524288
|
||||
@@ -3614,7 +3614,7 @@
|
||||
@@ -3634,7 +3634,7 @@
|
||||
COMMAND_LINE_ARGUMENT OPTIONAL
|
||||
VARIABLE_NAME TABLE_DEFINITION_CACHE
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1358,7 +1349,7 @@
|
|||
VARIABLE_COMMENT The number of cached table definitions
|
||||
NUMERIC_MIN_VALUE 400
|
||||
NUMERIC_MAX_VALUE 2097152
|
||||
@@ -3624,7 +3624,7 @@
|
||||
@@ -3644,7 +3644,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME TABLE_OPEN_CACHE
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1367,7 +1358,7 @@
|
|||
VARIABLE_COMMENT The number of cached open tables
|
||||
NUMERIC_MIN_VALUE 10
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -3684,7 +3684,7 @@
|
||||
@@ -3704,7 +3704,7 @@
|
||||
COMMAND_LINE_ARGUMENT OPTIONAL
|
||||
VARIABLE_NAME THREAD_CACHE_SIZE
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1376,7 +1367,7 @@
|
|||
VARIABLE_COMMENT How many threads we should keep in a cache for reuse. These are freed after 5 minutes of idle time
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 16384
|
||||
@@ -3767,7 +3767,7 @@
|
||||
@@ -3787,7 +3787,7 @@
|
||||
VARIABLE_TYPE BIGINT UNSIGNED
|
||||
VARIABLE_COMMENT Max size for data for an internal temporary on-disk MyISAM or Aria table.
|
||||
NUMERIC_MIN_VALUE 1024
|
||||
|
|
@ -1385,22 +1376,22 @@
|
|||
NUMERIC_BLOCK_SIZE 1
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
@@ -3777,7 +3777,7 @@
|
||||
@@ -3797,7 +3797,7 @@
|
||||
VARIABLE_TYPE BIGINT UNSIGNED
|
||||
VARIABLE_COMMENT If an internal in-memory temporary table exceeds this size, MariaDB will automatically convert it to an on-disk MyISAM or Aria table. Same as tmp_table_size.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
-NUMERIC_MAX_VALUE 18446744073709551615
|
||||
+NUMERIC_MAX_VALUE 4294967295
|
||||
NUMERIC_BLOCK_SIZE 1
|
||||
NUMERIC_BLOCK_SIZE 16384
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
@@ -3787,14 +3787,14 @@
|
||||
@@ -3807,14 +3807,14 @@
|
||||
VARIABLE_TYPE BIGINT UNSIGNED
|
||||
VARIABLE_COMMENT Alias for tmp_memory_table_size. If an internal in-memory temporary table exceeds this size, MariaDB will automatically convert it to an on-disk MyISAM or Aria table.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
-NUMERIC_MAX_VALUE 18446744073709551615
|
||||
+NUMERIC_MAX_VALUE 4294967295
|
||||
NUMERIC_BLOCK_SIZE 1
|
||||
NUMERIC_BLOCK_SIZE 16384
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
|
|
@ -1411,7 +1402,7 @@
|
|||
VARIABLE_COMMENT Allocation block size for transactions to be stored in binary log
|
||||
NUMERIC_MIN_VALUE 1024
|
||||
NUMERIC_MAX_VALUE 134217728
|
||||
@@ -3804,7 +3804,7 @@
|
||||
@@ -3824,7 +3824,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME TRANSACTION_PREALLOC_SIZE
|
||||
VARIABLE_SCOPE SESSION
|
||||
|
|
@ -1420,7 +1411,7 @@
|
|||
VARIABLE_COMMENT Persistent buffer for transactions to be stored in binary log
|
||||
NUMERIC_MIN_VALUE 1024
|
||||
NUMERIC_MAX_VALUE 134217728
|
||||
@@ -3944,7 +3944,7 @@
|
||||
@@ -3964,7 +3964,7 @@
|
||||
COMMAND_LINE_ARGUMENT NULL
|
||||
VARIABLE_NAME WAIT_TIMEOUT
|
||||
VARIABLE_SCOPE SESSION
|
||||
|
|
@ -1429,7 +1420,7 @@
|
|||
VARIABLE_COMMENT The number of seconds the server waits for activity on a connection before closing it
|
||||
NUMERIC_MIN_VALUE 1
|
||||
NUMERIC_MAX_VALUE 31536000
|
||||
@@ -3971,7 +3971,7 @@
|
||||
@@ -3991,7 +3991,7 @@
|
||||
VARIABLE_NAME LOG_TC_SIZE
|
||||
GLOBAL_VALUE_ORIGIN AUTO
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
--- sysvars_server_notembedded.result 2024-01-28 17:50:35.442241137 +0100
|
||||
+++ sysvars_server_notembedded,32bit.result 2024-01-28 17:51:20.662078993 +0100
|
||||
--- a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
|
||||
+++ b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
|
||||
@@ -44,7 +44,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME ARIA_BLOCK_SIZE
|
||||
|
|
@ -97,7 +97,7 @@
|
|||
@@ -227,7 +227,7 @@
|
||||
VARIABLE_TYPE BIGINT UNSIGNED
|
||||
VARIABLE_COMMENT The buffer that is allocated when sorting the index when doing a REPAIR or when creating indexes with CREATE INDEX or ALTER TABLE.
|
||||
NUMERIC_MIN_VALUE 16376
|
||||
NUMERIC_MIN_VALUE 16352
|
||||
-NUMERIC_MAX_VALUE 1152921504606846975
|
||||
+NUMERIC_MAX_VALUE 268435455
|
||||
NUMERIC_BLOCK_SIZE 1
|
||||
|
|
@ -722,15 +722,6 @@
|
|||
VARIABLE_COMMENT If this is not 0, then mysqld will use this value to reserve file descriptors to use with setrlimit(). If this value is 0 or autoset then mysqld will reserve max_connections*5 or max_connections + table_cache*2 (whichever is larger) number of file descriptors
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 4294967295
|
||||
@@ -2494,7 +2494,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME OPTIMIZER_ADJUST_SECONDARY_KEY_COSTS
|
||||
VARIABLE_SCOPE SESSION
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT 0 = No changes. 1 = Update secondary key costs for ranges to be at least 5x of clustered primary key costs. 2 = Remove 'max_seek optimization' for secondary keys and slight adjustment of filter cost. This option will be deleted in MariaDB 11.0 as it is not needed with the new 11.0 optimizer.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 2
|
||||
@@ -2504,7 +2504,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME OPTIMIZER_EXTRA_PRUNING_DEPTH
|
||||
|
|
@ -740,7 +731,7 @@
|
|||
VARIABLE_COMMENT If the optimizer needs to enumerate join prefix of this size or larger, then it will try aggressively prune away the search space.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 62
|
||||
@@ -2514,7 +2514,7 @@
|
||||
@@ -2524,7 +2524,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME OPTIMIZER_MAX_SEL_ARGS
|
||||
VARIABLE_SCOPE SESSION
|
||||
|
|
@ -749,7 +740,7 @@
|
|||
VARIABLE_COMMENT The maximum number of SEL_ARG objects created when optimizing a range. If more objects would be needed, the range will not be used by the optimizer.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 4294967295
|
||||
@@ -2524,7 +2524,7 @@
|
||||
@@ -2534,7 +2534,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME OPTIMIZER_MAX_SEL_ARG_WEIGHT
|
||||
VARIABLE_SCOPE SESSION
|
||||
|
|
@ -758,7 +749,7 @@
|
|||
VARIABLE_COMMENT The maximum weight of the SEL_ARG graph. Set to 0 for no limit
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 4294967295
|
||||
@@ -2534,7 +2534,7 @@
|
||||
@@ -2544,7 +2544,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME OPTIMIZER_PRUNE_LEVEL
|
||||
VARIABLE_SCOPE SESSION
|
||||
|
|
@ -767,7 +758,7 @@
|
|||
VARIABLE_COMMENT Controls the heuristic(s) applied during query optimization to prune less-promising partial plans from the optimizer search space. Meaning: 0 - do not apply any heuristic, thus perform exhaustive search: 1 - prune plans based on cost and number of retrieved rows eq_ref: 2 - prune also if we find an eq_ref chain
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 2
|
||||
@@ -2544,7 +2544,7 @@
|
||||
@@ -2554,7 +2554,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME OPTIMIZER_SEARCH_DEPTH
|
||||
VARIABLE_SCOPE SESSION
|
||||
|
|
@ -776,7 +767,7 @@
|
|||
VARIABLE_COMMENT Maximum depth of search performed by the query optimizer. Values larger than the number of relations in a query result in better query plans, but take longer to compile a query. Values smaller than the number of tables in a relation result in faster optimization, but may produce very bad query plans. If set to 0, the system will automatically pick a reasonable value.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 62
|
||||
@@ -2554,7 +2554,7 @@
|
||||
@@ -2564,7 +2564,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME OPTIMIZER_SELECTIVITY_SAMPLING_LIMIT
|
||||
VARIABLE_SCOPE SESSION
|
||||
|
|
@ -785,7 +776,7 @@
|
|||
VARIABLE_COMMENT Controls number of record samples to check condition selectivity
|
||||
NUMERIC_MIN_VALUE 10
|
||||
NUMERIC_MAX_VALUE 4294967295
|
||||
@@ -2584,17 +2584,17 @@
|
||||
@@ -2594,17 +2594,17 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME OPTIMIZER_TRACE_MAX_MEM_SIZE
|
||||
VARIABLE_SCOPE SESSION
|
||||
|
|
@ -806,7 +797,7 @@
|
|||
VARIABLE_COMMENT Controls selectivity of which conditions the optimizer takes into account to calculate cardinality of a partial join when it searches for the best execution plan Meaning: 1 - use selectivity of index backed range conditions to calculate the cardinality of a partial join if the last joined table is accessed by full table scan or an index scan, 2 - use selectivity of index backed range conditions to calculate the cardinality of a partial join in any case, 3 - additionally always use selectivity of range conditions that are not backed by any index to calculate the cardinality of a partial join, 4 - use histograms to calculate selectivity of range conditions that are not backed by any index to calculate the cardinality of a partial join.5 - additionally use selectivity of certain non-range predicates calculated on record samples
|
||||
NUMERIC_MIN_VALUE 1
|
||||
NUMERIC_MAX_VALUE 5
|
||||
@@ -2614,7 +2614,7 @@
|
||||
@@ -2624,7 +2624,7 @@
|
||||
COMMAND_LINE_ARGUMENT OPTIONAL
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_ACCOUNTS_SIZE
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -815,7 +806,7 @@
|
|||
VARIABLE_COMMENT Maximum number of instrumented user@host accounts. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -2624,7 +2624,7 @@
|
||||
@@ -2634,7 +2634,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_DIGESTS_SIZE
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -824,7 +815,7 @@
|
|||
VARIABLE_COMMENT Size of the statement digest. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -2634,7 +2634,7 @@
|
||||
@@ -2644,7 +2644,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_STAGES_HISTORY_LONG_SIZE
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -833,7 +824,7 @@
|
|||
VARIABLE_COMMENT Number of rows in EVENTS_STAGES_HISTORY_LONG. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -2644,7 +2644,7 @@
|
||||
@@ -2654,7 +2654,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_STAGES_HISTORY_SIZE
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -842,7 +833,7 @@
|
|||
VARIABLE_COMMENT Number of rows per thread in EVENTS_STAGES_HISTORY. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1024
|
||||
@@ -2654,7 +2654,7 @@
|
||||
@@ -2664,7 +2664,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_STATEMENTS_HISTORY_LONG_SIZE
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -851,7 +842,7 @@
|
|||
VARIABLE_COMMENT Number of rows in EVENTS_STATEMENTS_HISTORY_LONG. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -2664,7 +2664,7 @@
|
||||
@@ -2674,7 +2674,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_STATEMENTS_HISTORY_SIZE
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -860,7 +851,7 @@
|
|||
VARIABLE_COMMENT Number of rows per thread in EVENTS_STATEMENTS_HISTORY. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1024
|
||||
@@ -2674,7 +2674,7 @@
|
||||
@@ -2684,7 +2684,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_TRANSACTIONS_HISTORY_LONG_SIZE
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -869,7 +860,7 @@
|
|||
VARIABLE_COMMENT Number of rows in EVENTS_TRANSACTIONS_HISTORY_LONG. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -2684,7 +2684,7 @@
|
||||
@@ -2694,7 +2694,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_TRANSACTIONS_HISTORY_SIZE
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -878,7 +869,7 @@
|
|||
VARIABLE_COMMENT Number of rows per thread in EVENTS_TRANSACTIONS_HISTORY. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1024
|
||||
@@ -2694,7 +2694,7 @@
|
||||
@@ -2704,7 +2704,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_WAITS_HISTORY_LONG_SIZE
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -887,7 +878,7 @@
|
|||
VARIABLE_COMMENT Number of rows in EVENTS_WAITS_HISTORY_LONG. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -2704,7 +2704,7 @@
|
||||
@@ -2714,7 +2714,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_WAITS_HISTORY_SIZE
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -896,7 +887,7 @@
|
|||
VARIABLE_COMMENT Number of rows per thread in EVENTS_WAITS_HISTORY. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1024
|
||||
@@ -2714,7 +2714,7 @@
|
||||
@@ -2724,7 +2724,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_HOSTS_SIZE
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -905,7 +896,7 @@
|
|||
VARIABLE_COMMENT Maximum number of instrumented hosts. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -2724,7 +2724,7 @@
|
||||
@@ -2734,7 +2734,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_COND_CLASSES
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -914,7 +905,7 @@
|
|||
VARIABLE_COMMENT Maximum number of condition instruments.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 256
|
||||
@@ -2734,7 +2734,7 @@
|
||||
@@ -2744,7 +2744,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_COND_INSTANCES
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -923,7 +914,7 @@
|
|||
VARIABLE_COMMENT Maximum number of instrumented condition objects. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -2744,7 +2744,7 @@
|
||||
@@ -2754,7 +2754,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_DIGEST_LENGTH
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -932,7 +923,7 @@
|
|||
VARIABLE_COMMENT Maximum length considered for digest text, when stored in performance_schema tables.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -2754,7 +2754,7 @@
|
||||
@@ -2764,7 +2764,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_FILE_CLASSES
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -941,7 +932,7 @@
|
|||
VARIABLE_COMMENT Maximum number of file instruments.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 256
|
||||
@@ -2764,7 +2764,7 @@
|
||||
@@ -2774,7 +2774,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_FILE_HANDLES
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -950,7 +941,7 @@
|
|||
VARIABLE_COMMENT Maximum number of opened instrumented files.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -2774,7 +2774,7 @@
|
||||
@@ -2784,7 +2784,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_FILE_INSTANCES
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -959,7 +950,7 @@
|
|||
VARIABLE_COMMENT Maximum number of instrumented files. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -2784,7 +2784,7 @@
|
||||
@@ -2794,7 +2794,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_INDEX_STAT
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -968,7 +959,7 @@
|
|||
VARIABLE_COMMENT Maximum number of index statistics for instrumented tables. Use 0 to disable, -1 for automated scaling.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -2794,7 +2794,7 @@
|
||||
@@ -2804,7 +2804,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_MEMORY_CLASSES
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -977,7 +968,7 @@
|
|||
VARIABLE_COMMENT Maximum number of memory pool instruments.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 1024
|
||||
@@ -2804,7 +2804,7 @@
|
||||
@@ -2814,7 +2814,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_METADATA_LOCKS
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -986,7 +977,7 @@
|
|||
VARIABLE_COMMENT Maximum number of metadata locks. Use 0 to disable, -1 for automated scaling.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 104857600
|
||||
@@ -2814,7 +2814,7 @@
|
||||
@@ -2824,7 +2824,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_MUTEX_CLASSES
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -995,7 +986,7 @@
|
|||
VARIABLE_COMMENT Maximum number of mutex instruments.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 256
|
||||
@@ -2824,7 +2824,7 @@
|
||||
@@ -2834,7 +2834,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_MUTEX_INSTANCES
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1004,7 +995,7 @@
|
|||
VARIABLE_COMMENT Maximum number of instrumented MUTEX objects. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 104857600
|
||||
@@ -2834,7 +2834,7 @@
|
||||
@@ -2844,7 +2844,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_PREPARED_STATEMENTS_INSTANCES
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1013,7 +1004,7 @@
|
|||
VARIABLE_COMMENT Maximum number of instrumented prepared statements. Use 0 to disable, -1 for automated scaling.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -2844,7 +2844,7 @@
|
||||
@@ -2854,7 +2854,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_PROGRAM_INSTANCES
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1022,7 +1013,7 @@
|
|||
VARIABLE_COMMENT Maximum number of instrumented programs. Use 0 to disable, -1 for automated scaling.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -2854,7 +2854,7 @@
|
||||
@@ -2864,7 +2864,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_RWLOCK_CLASSES
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1031,7 +1022,7 @@
|
|||
VARIABLE_COMMENT Maximum number of rwlock instruments.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 256
|
||||
@@ -2864,7 +2864,7 @@
|
||||
@@ -2874,7 +2874,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_RWLOCK_INSTANCES
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1040,7 +1031,7 @@
|
|||
VARIABLE_COMMENT Maximum number of instrumented RWLOCK objects. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 104857600
|
||||
@@ -2874,7 +2874,7 @@
|
||||
@@ -2884,7 +2884,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_SOCKET_CLASSES
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1049,7 +1040,7 @@
|
|||
VARIABLE_COMMENT Maximum number of socket instruments.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 256
|
||||
@@ -2884,7 +2884,7 @@
|
||||
@@ -2894,7 +2894,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_SOCKET_INSTANCES
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1058,7 +1049,7 @@
|
|||
VARIABLE_COMMENT Maximum number of opened instrumented sockets. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -2894,7 +2894,7 @@
|
||||
@@ -2904,7 +2904,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_SQL_TEXT_LENGTH
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1067,7 +1058,7 @@
|
|||
VARIABLE_COMMENT Maximum length of displayed sql text.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -2904,7 +2904,7 @@
|
||||
@@ -2914,7 +2914,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_STAGE_CLASSES
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1076,7 +1067,7 @@
|
|||
VARIABLE_COMMENT Maximum number of stage instruments.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 256
|
||||
@@ -2914,7 +2914,7 @@
|
||||
@@ -2924,7 +2924,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_STATEMENT_CLASSES
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1085,7 +1076,7 @@
|
|||
VARIABLE_COMMENT Maximum number of statement instruments.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 256
|
||||
@@ -2924,7 +2924,7 @@
|
||||
@@ -2934,7 +2934,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_STATEMENT_STACK
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1094,7 +1085,7 @@
|
|||
VARIABLE_COMMENT Number of rows per thread in EVENTS_STATEMENTS_CURRENT.
|
||||
NUMERIC_MIN_VALUE 1
|
||||
NUMERIC_MAX_VALUE 256
|
||||
@@ -2934,7 +2934,7 @@
|
||||
@@ -2944,7 +2944,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_TABLE_HANDLES
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1103,7 +1094,7 @@
|
|||
VARIABLE_COMMENT Maximum number of opened instrumented tables. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -2944,7 +2944,7 @@
|
||||
@@ -2954,7 +2954,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_TABLE_INSTANCES
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1112,7 +1103,7 @@
|
|||
VARIABLE_COMMENT Maximum number of instrumented tables. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -2954,7 +2954,7 @@
|
||||
@@ -2964,7 +2964,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_TABLE_LOCK_STAT
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1121,7 +1112,7 @@
|
|||
VARIABLE_COMMENT Maximum number of lock statistics for instrumented tables. Use 0 to disable, -1 for automated scaling.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -2964,7 +2964,7 @@
|
||||
@@ -2974,7 +2974,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_THREAD_CLASSES
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1130,7 +1121,7 @@
|
|||
VARIABLE_COMMENT Maximum number of thread instruments.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 256
|
||||
@@ -2974,7 +2974,7 @@
|
||||
@@ -2984,7 +2984,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_THREAD_INSTANCES
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1139,7 +1130,7 @@
|
|||
VARIABLE_COMMENT Maximum number of instrumented threads. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -2984,7 +2984,7 @@
|
||||
@@ -2994,7 +2994,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_SESSION_CONNECT_ATTRS_SIZE
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1148,7 +1139,7 @@
|
|||
VARIABLE_COMMENT Size of session attribute string buffer per thread. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -2994,7 +2994,7 @@
|
||||
@@ -3004,7 +3004,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_SETUP_ACTORS_SIZE
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1157,7 +1148,7 @@
|
|||
VARIABLE_COMMENT Maximum number of rows in SETUP_ACTORS.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1024
|
||||
@@ -3004,7 +3004,7 @@
|
||||
@@ -3014,7 +3014,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_SETUP_OBJECTS_SIZE
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1166,7 +1157,7 @@
|
|||
VARIABLE_COMMENT Maximum number of rows in SETUP_OBJECTS.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -3014,7 +3014,7 @@
|
||||
@@ -3024,7 +3024,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PERFORMANCE_SCHEMA_USERS_SIZE
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1175,7 +1166,7 @@
|
|||
VARIABLE_COMMENT Maximum number of instrumented users. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -3064,7 +3064,7 @@
|
||||
@@ -3074,7 +3074,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PRELOAD_BUFFER_SIZE
|
||||
VARIABLE_SCOPE SESSION
|
||||
|
|
@ -1184,7 +1175,7 @@
|
|||
VARIABLE_COMMENT The size of the buffer that is allocated when preloading indexes
|
||||
NUMERIC_MIN_VALUE 1024
|
||||
NUMERIC_MAX_VALUE 1073741824
|
||||
@@ -3084,7 +3084,7 @@
|
||||
@@ -3094,7 +3094,7 @@
|
||||
COMMAND_LINE_ARGUMENT NULL
|
||||
VARIABLE_NAME PROFILING_HISTORY_SIZE
|
||||
VARIABLE_SCOPE SESSION
|
||||
|
|
@ -1193,7 +1184,7 @@
|
|||
VARIABLE_COMMENT Number of statements about which profiling information is maintained. If set to 0, no profiles are stored. See SHOW PROFILES.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 100
|
||||
@@ -3094,7 +3094,7 @@
|
||||
@@ -3104,7 +3104,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME PROGRESS_REPORT_TIME
|
||||
VARIABLE_SCOPE SESSION
|
||||
|
|
@ -1202,7 +1193,7 @@
|
|||
VARIABLE_COMMENT Seconds between sending progress reports to the client for time-consuming statements. Set to 0 to disable progress reporting.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 4294967295
|
||||
@@ -3154,7 +3154,7 @@
|
||||
@@ -3164,7 +3164,7 @@
|
||||
COMMAND_LINE_ARGUMENT NULL
|
||||
VARIABLE_NAME QUERY_ALLOC_BLOCK_SIZE
|
||||
VARIABLE_SCOPE SESSION
|
||||
|
|
@ -1211,7 +1202,7 @@
|
|||
VARIABLE_COMMENT Allocation block size for query parsing and execution
|
||||
NUMERIC_MIN_VALUE 1024
|
||||
NUMERIC_MAX_VALUE 4294967295
|
||||
@@ -3164,7 +3164,7 @@
|
||||
@@ -3174,7 +3174,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME QUERY_CACHE_LIMIT
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1220,7 +1211,7 @@
|
|||
VARIABLE_COMMENT Don't cache results that are bigger than this
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 4294967295
|
||||
@@ -3174,7 +3174,7 @@
|
||||
@@ -3184,7 +3184,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME QUERY_CACHE_MIN_RES_UNIT
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1229,7 +1220,7 @@
|
|||
VARIABLE_COMMENT The minimum size for blocks allocated by the query cache
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 4294967295
|
||||
@@ -3187,7 +3187,7 @@
|
||||
@@ -3197,7 +3197,7 @@
|
||||
VARIABLE_TYPE BIGINT UNSIGNED
|
||||
VARIABLE_COMMENT The memory allocated to store results from old queries
|
||||
NUMERIC_MIN_VALUE 0
|
||||
|
|
@ -1238,7 +1229,7 @@
|
|||
NUMERIC_BLOCK_SIZE 1024
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
@@ -3224,7 +3224,7 @@
|
||||
@@ -3234,7 +3234,7 @@
|
||||
COMMAND_LINE_ARGUMENT OPTIONAL
|
||||
VARIABLE_NAME QUERY_PREALLOC_SIZE
|
||||
VARIABLE_SCOPE SESSION
|
||||
|
|
@ -1247,7 +1238,7 @@
|
|||
VARIABLE_COMMENT Persistent buffer for query parsing and execution
|
||||
NUMERIC_MIN_VALUE 1024
|
||||
NUMERIC_MAX_VALUE 4294967295
|
||||
@@ -3237,7 +3237,7 @@
|
||||
@@ -3247,7 +3247,7 @@
|
||||
VARIABLE_TYPE BIGINT UNSIGNED
|
||||
VARIABLE_COMMENT Sets the internal state of the RAND() generator for replication purposes
|
||||
NUMERIC_MIN_VALUE 0
|
||||
|
|
@ -1256,7 +1247,7 @@
|
|||
NUMERIC_BLOCK_SIZE 1
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
@@ -3247,14 +3247,14 @@
|
||||
@@ -3257,14 +3257,14 @@
|
||||
VARIABLE_TYPE BIGINT UNSIGNED
|
||||
VARIABLE_COMMENT Sets the internal state of the RAND() generator for replication purposes
|
||||
NUMERIC_MIN_VALUE 0
|
||||
|
|
@ -1273,7 +1264,7 @@
|
|||
VARIABLE_COMMENT Allocation block size for storing ranges during optimization
|
||||
NUMERIC_MIN_VALUE 4096
|
||||
NUMERIC_MAX_VALUE 4294967295
|
||||
@@ -3267,14 +3267,14 @@
|
||||
@@ -3277,14 +3277,14 @@
|
||||
VARIABLE_TYPE BIGINT UNSIGNED
|
||||
VARIABLE_COMMENT Maximum speed(KB/s) to read binlog from master (0 = no limit)
|
||||
NUMERIC_MIN_VALUE 0
|
||||
|
|
@ -1290,7 +1281,7 @@
|
|||
VARIABLE_COMMENT Each thread that does a sequential scan allocates a buffer of this size for each table it scans. If you do many sequential scans, you may want to increase this value
|
||||
NUMERIC_MIN_VALUE 8192
|
||||
NUMERIC_MAX_VALUE 2147483647
|
||||
@@ -3294,7 +3294,7 @@
|
||||
@@ -3304,7 +3304,7 @@
|
||||
COMMAND_LINE_ARGUMENT OPTIONAL
|
||||
VARIABLE_NAME READ_RND_BUFFER_SIZE
|
||||
VARIABLE_SCOPE SESSION
|
||||
|
|
@ -1299,7 +1290,7 @@
|
|||
VARIABLE_COMMENT When reading rows in sorted order after a sort, the rows are read through this buffer to avoid a disk seeks
|
||||
NUMERIC_MIN_VALUE 1
|
||||
NUMERIC_MAX_VALUE 2147483647
|
||||
@@ -3514,10 +3514,10 @@
|
||||
@@ -3524,10 +3524,10 @@
|
||||
COMMAND_LINE_ARGUMENT OPTIONAL
|
||||
VARIABLE_NAME ROWID_MERGE_BUFF_SIZE
|
||||
VARIABLE_SCOPE SESSION
|
||||
|
|
@ -1312,7 +1303,7 @@
|
|||
NUMERIC_BLOCK_SIZE 1
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
@@ -3534,20 +3534,20 @@
|
||||
@@ -3544,20 +3544,20 @@
|
||||
COMMAND_LINE_ARGUMENT OPTIONAL
|
||||
VARIABLE_NAME RPL_SEMI_SYNC_MASTER_TIMEOUT
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1337,7 +1328,7 @@
|
|||
NUMERIC_BLOCK_SIZE 1
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
@@ -3604,10 +3604,10 @@
|
||||
@@ -3614,10 +3614,10 @@
|
||||
COMMAND_LINE_ARGUMENT OPTIONAL
|
||||
VARIABLE_NAME RPL_SEMI_SYNC_SLAVE_TRACE_LEVEL
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1350,7 +1341,7 @@
|
|||
NUMERIC_BLOCK_SIZE 1
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
@@ -3644,7 +3644,7 @@
|
||||
@@ -3654,7 +3654,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME SERVER_ID
|
||||
VARIABLE_SCOPE SESSION
|
||||
|
|
@ -1359,7 +1350,7 @@
|
|||
VARIABLE_COMMENT Uniquely identifies the server instance in the community of replication partners
|
||||
NUMERIC_MIN_VALUE 1
|
||||
NUMERIC_MAX_VALUE 4294967295
|
||||
@@ -3784,7 +3784,7 @@
|
||||
@@ -3804,7 +3804,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME SLAVE_DOMAIN_PARALLEL_THREADS
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1368,7 +1359,7 @@
|
|||
VARIABLE_COMMENT Maximum number of parallel threads to use on slave for events in a single replication domain. When using multiple domains, this can be used to limit a single domain from grabbing all threads and thus stalling other domains. The default of 0 means to allow a domain to grab as many threads as it wants, up to the value of slave_parallel_threads.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 16383
|
||||
@@ -3814,7 +3814,7 @@
|
||||
@@ -3834,7 +3834,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME SLAVE_MAX_ALLOWED_PACKET
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1377,7 +1368,7 @@
|
|||
VARIABLE_COMMENT The maximum packet length to sent successfully from the master to slave.
|
||||
NUMERIC_MIN_VALUE 1024
|
||||
NUMERIC_MAX_VALUE 1073741824
|
||||
@@ -3844,7 +3844,7 @@
|
||||
@@ -3864,7 +3864,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME SLAVE_PARALLEL_MAX_QUEUED
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1386,7 +1377,7 @@
|
|||
VARIABLE_COMMENT Limit on how much memory SQL threads should use per parallel replication thread when reading ahead in the relay log looking for opportunities for parallel replication. Only used when --slave-parallel-threads > 0.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 2147483647
|
||||
@@ -3864,7 +3864,7 @@
|
||||
@@ -3884,7 +3884,7 @@
|
||||
COMMAND_LINE_ARGUMENT NULL
|
||||
VARIABLE_NAME SLAVE_PARALLEL_THREADS
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1395,7 +1386,7 @@
|
|||
VARIABLE_COMMENT If non-zero, number of threads to spawn to apply in parallel events on the slave that were group-committed on the master or were logged with GTID in different replication domains. Note that these threads are in addition to the IO and SQL threads, which are always created by a replication slave
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 16383
|
||||
@@ -3874,7 +3874,7 @@
|
||||
@@ -3894,7 +3894,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME SLAVE_PARALLEL_WORKERS
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1404,7 +1395,7 @@
|
|||
VARIABLE_COMMENT Alias for slave_parallel_threads
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 16383
|
||||
@@ -3914,7 +3914,7 @@
|
||||
@@ -3934,7 +3934,7 @@
|
||||
COMMAND_LINE_ARGUMENT OPTIONAL
|
||||
VARIABLE_NAME SLAVE_TRANSACTION_RETRIES
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1413,7 +1404,7 @@
|
|||
VARIABLE_COMMENT Number of times the slave SQL thread will retry a transaction in case it failed with a deadlock, elapsed lock wait timeout or listed in slave_transaction_retry_errors, before giving up and stopping
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 4294967295
|
||||
@@ -3934,7 +3934,7 @@
|
||||
@@ -3954,7 +3954,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME SLAVE_TRANSACTION_RETRY_INTERVAL
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1422,7 +1413,7 @@
|
|||
VARIABLE_COMMENT Interval of the slave SQL thread will retry a transaction in case it failed with a deadlock or elapsed lock wait timeout or listed in slave_transaction_retry_errors
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 3600
|
||||
@@ -3954,7 +3954,7 @@
|
||||
@@ -3974,7 +3974,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME SLOW_LAUNCH_TIME
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1431,7 +1422,7 @@
|
|||
VARIABLE_COMMENT If creating the thread takes longer than this value (in seconds), the Slow_launch_threads counter will be incremented
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 31536000
|
||||
@@ -3997,7 +3997,7 @@
|
||||
@@ -4017,7 +4017,7 @@
|
||||
VARIABLE_TYPE BIGINT UNSIGNED
|
||||
VARIABLE_COMMENT Each thread that needs to do a sort allocates a buffer of this size
|
||||
NUMERIC_MIN_VALUE 1024
|
||||
|
|
@ -1440,7 +1431,7 @@
|
|||
NUMERIC_BLOCK_SIZE 1
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
@@ -4224,7 +4224,7 @@
|
||||
@@ -4244,7 +4244,7 @@
|
||||
COMMAND_LINE_ARGUMENT NULL
|
||||
VARIABLE_NAME STORED_PROGRAM_CACHE
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1449,7 +1440,7 @@
|
|||
VARIABLE_COMMENT The soft upper limit for number of cached stored routines for one connection.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 524288
|
||||
@@ -4334,7 +4334,7 @@
|
||||
@@ -4354,7 +4354,7 @@
|
||||
COMMAND_LINE_ARGUMENT OPTIONAL
|
||||
VARIABLE_NAME TABLE_DEFINITION_CACHE
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1458,7 +1449,7 @@
|
|||
VARIABLE_COMMENT The number of cached table definitions
|
||||
NUMERIC_MIN_VALUE 400
|
||||
NUMERIC_MAX_VALUE 2097152
|
||||
@@ -4344,7 +4344,7 @@
|
||||
@@ -4364,7 +4364,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME TABLE_OPEN_CACHE
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1467,7 +1458,7 @@
|
|||
VARIABLE_COMMENT The number of cached open tables
|
||||
NUMERIC_MIN_VALUE 10
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -4404,7 +4404,7 @@
|
||||
@@ -4424,7 +4424,7 @@
|
||||
COMMAND_LINE_ARGUMENT OPTIONAL
|
||||
VARIABLE_NAME THREAD_CACHE_SIZE
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
@ -1476,7 +1467,7 @@
|
|||
VARIABLE_COMMENT How many threads we should keep in a cache for reuse. These are freed after 5 minutes of idle time
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 16384
|
||||
@@ -4577,7 +4577,7 @@
|
||||
@@ -4597,7 +4597,7 @@
|
||||
VARIABLE_TYPE BIGINT UNSIGNED
|
||||
VARIABLE_COMMENT Max size for data for an internal temporary on-disk MyISAM or Aria table.
|
||||
NUMERIC_MIN_VALUE 1024
|
||||
|
|
@ -1485,22 +1476,22 @@
|
|||
NUMERIC_BLOCK_SIZE 1
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
@@ -4587,7 +4587,7 @@
|
||||
@@ -4607,7 +4607,7 @@
|
||||
VARIABLE_TYPE BIGINT UNSIGNED
|
||||
VARIABLE_COMMENT If an internal in-memory temporary table exceeds this size, MariaDB will automatically convert it to an on-disk MyISAM or Aria table. Same as tmp_table_size.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
-NUMERIC_MAX_VALUE 18446744073709551615
|
||||
+NUMERIC_MAX_VALUE 4294967295
|
||||
NUMERIC_BLOCK_SIZE 1
|
||||
NUMERIC_BLOCK_SIZE 16384
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
@@ -4597,14 +4597,14 @@
|
||||
@@ -4617,14 +4617,14 @@
|
||||
VARIABLE_TYPE BIGINT UNSIGNED
|
||||
VARIABLE_COMMENT Alias for tmp_memory_table_size. If an internal in-memory temporary table exceeds this size, MariaDB will automatically convert it to an on-disk MyISAM or Aria table.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
-NUMERIC_MAX_VALUE 18446744073709551615
|
||||
+NUMERIC_MAX_VALUE 4294967295
|
||||
NUMERIC_BLOCK_SIZE 1
|
||||
NUMERIC_BLOCK_SIZE 16384
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
|
|
@ -1511,7 +1502,7 @@
|
|||
VARIABLE_COMMENT Allocation block size for transactions to be stored in binary log
|
||||
NUMERIC_MIN_VALUE 1024
|
||||
NUMERIC_MAX_VALUE 134217728
|
||||
@@ -4614,7 +4614,7 @@
|
||||
@@ -4634,7 +4634,7 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME TRANSACTION_PREALLOC_SIZE
|
||||
VARIABLE_SCOPE SESSION
|
||||
|
|
@ -1520,7 +1511,7 @@
|
|||
VARIABLE_COMMENT Persistent buffer for transactions to be stored in binary log
|
||||
NUMERIC_MIN_VALUE 1024
|
||||
NUMERIC_MAX_VALUE 134217728
|
||||
@@ -4754,7 +4754,7 @@
|
||||
@@ -4774,7 +4774,7 @@
|
||||
COMMAND_LINE_ARGUMENT NULL
|
||||
VARIABLE_NAME WAIT_TIMEOUT
|
||||
VARIABLE_SCOPE SESSION
|
||||
|
|
@ -1529,7 +1520,7 @@
|
|||
VARIABLE_COMMENT The number of seconds the server waits for activity on a connection before closing it
|
||||
NUMERIC_MIN_VALUE 1
|
||||
NUMERIC_MAX_VALUE 31536000
|
||||
@@ -4781,7 +4781,7 @@
|
||||
@@ -4801,7 +4801,7 @@
|
||||
VARIABLE_NAME LOG_TC_SIZE
|
||||
GLOBAL_VALUE_ORIGIN AUTO
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ ulong debug_startup_interval, debug_first_interval, debug_interval;
|
|||
|
||||
/* backing store for system variables */
|
||||
static char *url, *http_proxy;
|
||||
char *user_info;
|
||||
char *user_info, *server_uid_ptr= server_uid;
|
||||
ulong send_timeout, send_retry_wait;
|
||||
|
||||
/**
|
||||
|
|
@ -356,6 +356,9 @@ static int free(void *p)
|
|||
#define DEFAULT_PROTO "http://"
|
||||
#endif
|
||||
|
||||
static MYSQL_SYSVAR_STR(server_uid, server_uid_ptr,
|
||||
PLUGIN_VAR_READONLY | PLUGIN_VAR_NOCMDOPT,
|
||||
"Automatically calculated server unique id hash.", NULL, NULL, 0);
|
||||
static MYSQL_SYSVAR_STR(user_info, user_info,
|
||||
PLUGIN_VAR_READONLY | PLUGIN_VAR_RQCMDARG,
|
||||
"User specified string that will be included in the feedback report.",
|
||||
|
|
@ -386,6 +389,7 @@ static MYSQL_SYSVAR_ULONG(debug_interval, debug_interval,
|
|||
#endif
|
||||
|
||||
static struct st_mysql_sys_var* settings[] = {
|
||||
MYSQL_SYSVAR(server_uid),
|
||||
MYSQL_SYSVAR(user_info),
|
||||
MYSQL_SYSVAR(url),
|
||||
MYSQL_SYSVAR(send_timeout),
|
||||
|
|
|
|||
|
|
@ -625,6 +625,7 @@ a b a b
|
|||
15901234-5566-e777-e888-99aabbccddee 59 15901234-5566-e777-e888-99aabbccddee 59
|
||||
16101234-5566-f777-8888-99aabbccddee 61 16101234-5566-f777-8888-99aabbccddee 61
|
||||
16301234-5566-f777-e888-99aabbccddee 63 16301234-5566-f777-e888-99aabbccddee 63
|
||||
Warnings:
|
||||
Warning 1292 Incorrect uuid value: '03201234-5566-8777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '03201234-5566-8777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '03201234-5566-8777-0888-99aabbccddee'
|
||||
|
|
@ -689,7 +690,6 @@ Warning 1292 Incorrect uuid value: '05601234-5566-e777-0888-99aabbccddee'
|
|||
Warning 1292 Incorrect uuid value: '05601234-5566-e777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '05601234-5566-e777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '06001234-5566-f777-0888-99aabbccddee'
|
||||
Warnings:
|
||||
select * from t1 union select * from t2;
|
||||
a b
|
||||
00001234-5566-0777-0888-99aabbccddee 0
|
||||
|
|
|
|||
|
|
@ -546,35 +546,6 @@ void Item_sum::fix_num_length_and_dec()
|
|||
max_length=float_length(decimals);
|
||||
}
|
||||
|
||||
Item *Item_sum::get_tmp_table_item(THD *thd)
|
||||
{
|
||||
Item_sum* sum_item= (Item_sum *) copy_or_same(thd);
|
||||
if (sum_item && sum_item->result_field) // If not a const sum func
|
||||
{
|
||||
Field *result_field_tmp= sum_item->result_field;
|
||||
for (uint i=0 ; i < sum_item->arg_count ; i++)
|
||||
{
|
||||
Item *arg= sum_item->args[i];
|
||||
if (!arg->const_item())
|
||||
{
|
||||
if (arg->type() == Item::FIELD_ITEM)
|
||||
{
|
||||
((Item_field*) arg)->field= result_field_tmp++;
|
||||
}
|
||||
else
|
||||
{
|
||||
auto item_field=
|
||||
new (thd->mem_root) Item_field(thd, result_field_tmp++);
|
||||
if (item_field)
|
||||
item_field->set_refers_to_temp_table();
|
||||
sum_item->args[i]= item_field;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return sum_item;
|
||||
}
|
||||
|
||||
|
||||
void Item_sum::update_used_tables ()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -525,7 +525,6 @@ public:
|
|||
aggregator_clear();
|
||||
}
|
||||
virtual void make_unique() { force_copy_fields= TRUE; }
|
||||
Item *get_tmp_table_item(THD *thd) override;
|
||||
virtual Field *create_tmp_field(MEM_ROOT *root, bool group, TABLE *table);
|
||||
Field *create_tmp_field_ex(MEM_ROOT *root, TABLE *table, Tmp_field_src *src,
|
||||
const Tmp_field_param *param) override
|
||||
|
|
|
|||
|
|
@ -3714,6 +3714,9 @@ void MYSQL_BIN_LOG::init_pthread_objects()
|
|||
|
||||
mysql_mutex_init(m_key_LOCK_binlog_end_pos, &LOCK_binlog_end_pos,
|
||||
MY_MUTEX_INIT_SLOW);
|
||||
|
||||
/* Fix correct mutex order to catch violations quicker (MDEV-35197). */
|
||||
mysql_mutex_record_order(&LOCK_log, &LOCK_global_system_variables);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -11918,6 +11921,7 @@ binlog_checksum_update(MYSQL_THD thd, struct st_mysql_sys_var *var,
|
|||
bool check_purge= false;
|
||||
ulong UNINIT_VAR(prev_binlog_id);
|
||||
|
||||
mysql_mutex_unlock(&LOCK_global_system_variables);
|
||||
mysql_mutex_lock(mysql_bin_log.get_log_lock());
|
||||
if(mysql_bin_log.is_open())
|
||||
{
|
||||
|
|
@ -11936,6 +11940,7 @@ binlog_checksum_update(MYSQL_THD thd, struct st_mysql_sys_var *var,
|
|||
mysql_mutex_unlock(mysql_bin_log.get_log_lock());
|
||||
if (check_purge)
|
||||
mysql_bin_log.checkpoint_and_purge(prev_binlog_id);
|
||||
mysql_mutex_lock(&LOCK_global_system_variables);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -3341,10 +3341,13 @@ void my_message_sql(uint error, const char *str, myf MyFlags)
|
|||
MyFlags));
|
||||
|
||||
DBUG_ASSERT(str != NULL);
|
||||
DBUG_ASSERT(*str != '\0');
|
||||
DBUG_ASSERT(error != 0);
|
||||
DBUG_ASSERT((MyFlags & ~(ME_BELL | ME_ERROR_LOG | ME_ERROR_LOG_ONLY |
|
||||
ME_NOTE | ME_WARNING | ME_FATAL)) == 0);
|
||||
|
||||
DBUG_ASSERT(str[strlen(str)-1] != '\n');
|
||||
|
||||
if (MyFlags & ME_NOTE)
|
||||
{
|
||||
level= Sql_condition::WARN_LEVEL_NOTE;
|
||||
|
|
|
|||
|
|
@ -6762,17 +6762,17 @@ ER_FORBID_SCHEMA_CHANGE
|
|||
geo "სქემის '%-.192s'-დან '%-.192s'-ზე შეცვლა დაშვებული არაა"
|
||||
spa "Vd no está autorizado a cambiar el esquema de '%-.192s' a '%-.192s'"
|
||||
ER_ROW_IS_REFERENCED_2 23000
|
||||
chi "无法删除或更新父行:外键约束失败(%.192s)"
|
||||
eng "Cannot delete or update a parent row: a foreign key constraint fails (%.192s)"
|
||||
ger "Kann Eltern-Zeile nicht löschen oder aktualisieren: eine Fremdschlüsselbedingung schlägt fehl (%.192s)"
|
||||
geo "მშობელი მწკრივის წაშლა ან განახლება შეუძლებელია: გარე გასაღების შეზღუდვა შეცდომას შეიცავს (%.192s)"
|
||||
spa "No puedo borrar o actualizar una fila padre: falla una restricción de clave foránea (%.192s)"
|
||||
chi "无法删除或更新父行:外键约束失败(%s)"
|
||||
eng "Cannot delete or update a parent row: a foreign key constraint fails (%s)"
|
||||
ger "Kann Eltern-Zeile nicht löschen oder aktualisieren: eine Fremdschlüsselbedingung schlägt fehl (%s)"
|
||||
geo "მშობელი მწკრივის წაშლა ან განახლება შეუძლებელია: გარე გასაღების შეზღუდვა შეცდომას შეიცავს (%s)"
|
||||
spa "No puedo borrar o actualizar una fila padre: falla una restricción de clave foránea (%s)"
|
||||
ER_NO_REFERENCED_ROW_2 23000
|
||||
chi "无法添加或更新子行:外键约束失败(%.192s)"
|
||||
eng "Cannot add or update a child row: a foreign key constraint fails (%.192s)"
|
||||
ger "Kann Kind-Zeile nicht hinzufügen oder aktualisieren: eine Fremdschlüsselbedingung schlägt fehl (%.192s)"
|
||||
geo "შვილი მწკრივის წაშლა ან განახლება შეუძლებელია: გარე გასაღების შეზღუდვა შეცდომას შეიცავს (%.192s)"
|
||||
spa "No puedo añadir o actualizar una fila hija: falla una restricción de clave foránea (%.192s)"
|
||||
chi "无法添加或更新子行:外键约束失败(%s)"
|
||||
eng "Cannot add or update a child row: a foreign key constraint fails (%s)"
|
||||
ger "Kann Kind-Zeile nicht hinzufügen oder aktualisieren: eine Fremdschlüsselbedingung schlägt fehl (%s)"
|
||||
geo "შვილი მწკრივის წაშლა ან განახლება შეუძლებელია: გარე გასაღების შეზღუდვა შეცდომას შეიცავს (%s)"
|
||||
spa "No puedo añadir o actualizar una fila hija: falla una restricción de clave foránea (%s)"
|
||||
ER_SP_BAD_VAR_SHADOW 42000
|
||||
chi "变量'%-.64s'必须用`...`,或重命名"
|
||||
eng "Variable '%-.64s' must be quoted with `...`, or renamed"
|
||||
|
|
|
|||
|
|
@ -8454,7 +8454,8 @@ bool check_grant(THD *thd, privilege_t want_access, TABLE_LIST *tables,
|
|||
|
||||
if (access)
|
||||
{
|
||||
switch(access->check(orig_want_access, &t_ref->grant.privilege))
|
||||
switch(access->check(orig_want_access, &t_ref->grant.privilege,
|
||||
any_combination_will_do))
|
||||
{
|
||||
case ACL_INTERNAL_ACCESS_GRANTED:
|
||||
t_ref->grant.privilege|= orig_want_access;
|
||||
|
|
|
|||
|
|
@ -207,7 +207,7 @@ public:
|
|||
in save_priv.
|
||||
*/
|
||||
virtual ACL_internal_access_result check(privilege_t want_access,
|
||||
privilege_t *save_priv) const= 0;
|
||||
privilege_t *save_priv, bool any_combination_will_do) const= 0;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -693,7 +693,6 @@ Sql_condition *Warning_info::push_warning(THD *thd,
|
|||
ulong current_row_number)
|
||||
{
|
||||
Sql_condition *cond= NULL;
|
||||
DBUG_ASSERT(msg[strlen(msg)-1] != '\n');
|
||||
|
||||
if (! m_read_only)
|
||||
{
|
||||
|
|
@ -753,6 +752,7 @@ void push_warning(THD *thd, Sql_condition::enum_warning_level level,
|
|||
if (level == Sql_condition::WARN_LEVEL_ERROR)
|
||||
level= Sql_condition::WARN_LEVEL_WARN;
|
||||
|
||||
DBUG_ASSERT(msg[strlen(msg)-1] != '\n');
|
||||
(void) thd->raise_condition(code, "\0\0\0\0\0", level, msg);
|
||||
|
||||
/* Make sure we also count warnings pushed after calling set_ok_status(). */
|
||||
|
|
|
|||
|
|
@ -3087,6 +3087,8 @@ err:
|
|||
}
|
||||
else if (info->errmsg != NULL)
|
||||
safe_strcpy(info->error_text, sizeof(info->error_text), info->errmsg);
|
||||
else if (info->error_text[0] == 0)
|
||||
safe_strcpy(info->error_text, sizeof(info->error_text), ER(info->error));
|
||||
|
||||
my_message(info->error, info->error_text, MYF(0));
|
||||
|
||||
|
|
|
|||
|
|
@ -4633,6 +4633,19 @@ static void get_table_engine_for_i_s(THD *thd, char *buf, TABLE_LIST *tl,
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
Hide error for a non-existing table.
|
||||
For example, this error can occur when we use a where condition
|
||||
with a db name and table, but the table does not exist or
|
||||
there is a view with the same name.
|
||||
*/
|
||||
static bool hide_object_error(uint err)
|
||||
{
|
||||
return err == ER_NO_SUCH_TABLE || err == ER_WRONG_OBJECT ||
|
||||
err == ER_NOT_SEQUENCE;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Fill I_S table with data obtained by performing full-blown table open.
|
||||
|
||||
|
|
@ -4761,16 +4774,8 @@ fill_schema_table_by_open(THD *thd, MEM_ROOT *mem_root,
|
|||
of backward compatibility.
|
||||
*/
|
||||
if (!is_show_fields_or_keys && result && thd->is_error() &&
|
||||
(thd->get_stmt_da()->sql_errno() == ER_NO_SUCH_TABLE ||
|
||||
thd->get_stmt_da()->sql_errno() == ER_WRONG_OBJECT ||
|
||||
thd->get_stmt_da()->sql_errno() == ER_NOT_SEQUENCE))
|
||||
hide_object_error(thd->get_stmt_da()->sql_errno()))
|
||||
{
|
||||
/*
|
||||
Hide error for a non-existing table.
|
||||
For example, this error can occur when we use a where condition
|
||||
with a db name and table, but the table does not exist or
|
||||
there is a view with the same name.
|
||||
*/
|
||||
result= false;
|
||||
thd->clear_error();
|
||||
}
|
||||
|
|
@ -4861,8 +4866,8 @@ static int fill_schema_table_names(THD *thd, TABLE_LIST *tables,
|
|||
else
|
||||
table->field[3]->store(STRING_WITH_LEN("ERROR"), cs);
|
||||
|
||||
if (unlikely(thd->is_error() &&
|
||||
thd->get_stmt_da()->sql_errno() == ER_NO_SUCH_TABLE))
|
||||
if (unlikely(thd->is_error()) &&
|
||||
hide_object_error(thd->get_stmt_da()->sql_errno()))
|
||||
{
|
||||
thd->clear_error();
|
||||
return 0;
|
||||
|
|
@ -5102,9 +5107,7 @@ static int fill_schema_table_from_frm(THD *thd, MEM_ROOT *mem_root,
|
|||
share= tdc_acquire_share(thd, &table_list, GTS_TABLE | GTS_VIEW);
|
||||
if (!share)
|
||||
{
|
||||
if (thd->get_stmt_da()->sql_errno() == ER_NO_SUCH_TABLE ||
|
||||
thd->get_stmt_da()->sql_errno() == ER_WRONG_OBJECT ||
|
||||
thd->get_stmt_da()->sql_errno() == ER_NOT_SEQUENCE)
|
||||
if (hide_object_error(thd->get_stmt_da()->sql_errno()))
|
||||
{
|
||||
res= 0;
|
||||
}
|
||||
|
|
@ -5145,10 +5148,17 @@ static int fill_schema_table_from_frm(THD *thd, MEM_ROOT *mem_root,
|
|||
goto end_share;
|
||||
}
|
||||
|
||||
if (!open_table_from_share(thd, share, table_name, 0,
|
||||
(EXTRA_RECORD | OPEN_FRM_FILE_ONLY),
|
||||
thd->open_options, &tbl, FALSE))
|
||||
res= open_table_from_share(thd, share, table_name, 0,
|
||||
EXTRA_RECORD | OPEN_FRM_FILE_ONLY,
|
||||
thd->open_options, &tbl, FALSE);
|
||||
if (res && hide_object_error(thd->get_stmt_da()->sql_errno()))
|
||||
res= 0;
|
||||
else
|
||||
{
|
||||
char buf[NAME_CHAR_LEN + 1];
|
||||
if (unlikely(res))
|
||||
get_table_engine_for_i_s(thd, buf, &table_list, db_name, table_name);
|
||||
|
||||
tbl.s= share;
|
||||
table_list.table= &tbl;
|
||||
table_list.view= (LEX*) share->is_view;
|
||||
|
|
@ -5244,7 +5254,6 @@ int get_all_tables(THD *thd, TABLE_LIST *tables, COND *cond)
|
|||
DBUG_ENTER("get_all_tables");
|
||||
LEX *lex= thd->lex;
|
||||
TABLE *table= tables->table;
|
||||
TABLE_LIST table_acl_check;
|
||||
SELECT_LEX *lsel= tables->schema_select_lex;
|
||||
ST_SCHEMA_TABLE *schema_table= tables->schema_table;
|
||||
IS_table_read_plan *plan= tables->is_table_read_plan;
|
||||
|
|
@ -5334,8 +5343,6 @@ int get_all_tables(THD *thd, TABLE_LIST *tables, COND *cond)
|
|||
goto err;
|
||||
}
|
||||
|
||||
bzero((char*) &table_acl_check, sizeof(table_acl_check));
|
||||
|
||||
if (make_db_list(thd, &db_names, &plan->lookup_field_vals))
|
||||
goto err;
|
||||
|
||||
|
|
@ -5348,9 +5355,7 @@ int get_all_tables(THD *thd, TABLE_LIST *tables, COND *cond)
|
|||
LEX_CSTRING *db_name= db_names.at(i);
|
||||
DBUG_ASSERT(db_name->length <= NAME_LEN);
|
||||
#ifndef NO_EMBEDDED_ACCESS_CHECKS
|
||||
if (!(check_access(thd, SELECT_ACL, db_name->str,
|
||||
&thd->col_access, NULL, 0, 1) ||
|
||||
(!thd->col_access && check_grant_db(thd, db_name->str))) ||
|
||||
if (!check_access(thd, SELECT_ACL, db_name->str, &thd->col_access, 0,0,1) ||
|
||||
sctx->master_access & (DB_ACLS | SHOW_DB_ACL) ||
|
||||
acl_get_all3(sctx, db_name->str, 0))
|
||||
#endif
|
||||
|
|
@ -5371,6 +5376,8 @@ int get_all_tables(THD *thd, TABLE_LIST *tables, COND *cond)
|
|||
#ifndef NO_EMBEDDED_ACCESS_CHECKS
|
||||
if (!(thd->col_access & TABLE_ACLS))
|
||||
{
|
||||
TABLE_LIST table_acl_check;
|
||||
table_acl_check.reset();
|
||||
table_acl_check.db= *db_name;
|
||||
table_acl_check.table_name= *table_name;
|
||||
table_acl_check.grant.privilege= thd->col_access;
|
||||
|
|
|
|||
|
|
@ -1705,7 +1705,10 @@ Sys_max_binlog_stmt_cache_size(
|
|||
|
||||
static bool fix_max_binlog_size(sys_var *self, THD *thd, enum_var_type type)
|
||||
{
|
||||
mysql_bin_log.set_max_size(max_binlog_size);
|
||||
ulong saved= max_binlog_size;
|
||||
mysql_mutex_unlock(&LOCK_global_system_variables);
|
||||
mysql_bin_log.set_max_size(saved);
|
||||
mysql_mutex_lock(&LOCK_global_system_variables);
|
||||
return false;
|
||||
}
|
||||
static Sys_var_on_access_global<Sys_var_ulong,
|
||||
|
|
|
|||
|
|
@ -120,11 +120,15 @@ bool trans_begin(THD *thd, uint flags)
|
|||
if (thd->in_multi_stmt_transaction_mode() ||
|
||||
(thd->variables.option_bits & OPTION_TABLE_LOCK))
|
||||
{
|
||||
bool was_in_trans= thd->server_status &
|
||||
(SERVER_STATUS_IN_TRANS | SERVER_STATUS_IN_TRANS_READONLY);
|
||||
thd->variables.option_bits&= ~OPTION_TABLE_LOCK;
|
||||
thd->server_status&=
|
||||
~(SERVER_STATUS_IN_TRANS | SERVER_STATUS_IN_TRANS_READONLY);
|
||||
DBUG_PRINT("info", ("clearing SERVER_STATUS_IN_TRANS"));
|
||||
res= MY_TEST(ha_commit_trans(thd, TRUE));
|
||||
if (was_in_trans)
|
||||
trans_reset_one_shot_chistics(thd);
|
||||
#ifdef WITH_WSREP
|
||||
if (wsrep_thd_is_local(thd))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ SET_PROPERTY(DIRECTORY PROPERTY INCLUDE_DIRECTORIES "${dirs}")
|
|||
IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR
|
||||
CMAKE_SYSTEM_PROCESSOR STREQUAL "amd64" OR
|
||||
CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
|
||||
MY_CHECK_AND_SET_COMPILER_FLAG("-fno-lto")
|
||||
SET(PCRE_INCLUDES "${PCRE_INCLUDE_DIRS}")
|
||||
add_subdirectory(columnstore)
|
||||
|
||||
|
|
|
|||
|
|
@ -940,7 +940,7 @@ btr_search_failure(btr_search_t* info, btr_cur_t* cursor)
|
|||
}
|
||||
|
||||
/** Clear the adaptive hash index on all pages in the buffer pool. */
|
||||
inline void buf_pool_t::clear_hash_index()
|
||||
inline void buf_pool_t::clear_hash_index() noexcept
|
||||
{
|
||||
ut_ad(!resizing);
|
||||
ut_ad(!btr_search_enabled);
|
||||
|
|
@ -992,7 +992,7 @@ inline void buf_pool_t::clear_hash_index()
|
|||
This function does not return if the block is not identified.
|
||||
@param ptr pointer to within a page frame
|
||||
@return pointer to block, never NULL */
|
||||
inline buf_block_t* buf_pool_t::block_from_ahi(const byte *ptr) const
|
||||
inline buf_block_t* buf_pool_t::block_from_ahi(const byte *ptr) const noexcept
|
||||
{
|
||||
chunk_t::map *chunk_map = chunk_t::map_ref;
|
||||
ut_ad(chunk_t::map_ref == chunk_t::map_reg);
|
||||
|
|
|
|||
|
|
@ -278,7 +278,7 @@ the read requests for the whole area.
|
|||
|
||||
#ifndef UNIV_INNOCHECKSUM
|
||||
# ifdef SUX_LOCK_GENERIC
|
||||
void page_hash_latch::read_lock_wait()
|
||||
void page_hash_latch::read_lock_wait() noexcept
|
||||
{
|
||||
/* First, try busy spinning for a while. */
|
||||
for (auto spin= srv_n_spin_wait_rounds; spin--; )
|
||||
|
|
@ -293,7 +293,7 @@ void page_hash_latch::read_lock_wait()
|
|||
while (!read_trylock());
|
||||
}
|
||||
|
||||
void page_hash_latch::write_lock_wait()
|
||||
void page_hash_latch::write_lock_wait() noexcept
|
||||
{
|
||||
write_lock_wait_start();
|
||||
|
||||
|
|
@ -487,7 +487,7 @@ bool
|
|||
buf_page_is_checksum_valid_crc32(
|
||||
const byte* read_buf,
|
||||
ulint checksum_field1,
|
||||
ulint checksum_field2)
|
||||
ulint checksum_field2) noexcept
|
||||
{
|
||||
const uint32_t crc32 = buf_calc_page_crc32(read_buf);
|
||||
|
||||
|
|
@ -555,7 +555,7 @@ static bool buf_page_check_lsn(bool check_lsn, const byte *read_buf)
|
|||
/** Check if a buffer is all zeroes.
|
||||
@param[in] buf data to check
|
||||
@return whether the buffer is all zeroes */
|
||||
bool buf_is_zeroes(span<const byte> buf)
|
||||
bool buf_is_zeroes(span<const byte> buf) noexcept
|
||||
{
|
||||
ut_ad(buf.size() <= UNIV_PAGE_SIZE_MAX);
|
||||
return memcmp(buf.data(), field_ref_zero, buf.size()) == 0;
|
||||
|
|
@ -567,7 +567,7 @@ bool buf_is_zeroes(span<const byte> buf)
|
|||
@param fsp_flags contents of FIL_SPACE_FLAGS
|
||||
@return whether the page is corrupted */
|
||||
buf_page_is_corrupted_reason
|
||||
buf_page_is_corrupted(bool check_lsn, const byte *read_buf, uint32_t fsp_flags)
|
||||
buf_page_is_corrupted(bool check_lsn, const byte *read_buf, uint32_t fsp_flags) noexcept
|
||||
{
|
||||
if (fil_space_t::full_crc32(fsp_flags)) {
|
||||
bool compressed = false, corrupted = false;
|
||||
|
|
@ -1015,7 +1015,7 @@ static inline byte hex_to_ascii(byte hex_digit)
|
|||
@param[in] read_buf database page
|
||||
@param[in] zip_size compressed page size, or 0 */
|
||||
ATTRIBUTE_COLD
|
||||
void buf_page_print(const byte *read_buf, ulint zip_size)
|
||||
void buf_page_print(const byte *read_buf, ulint zip_size) noexcept
|
||||
{
|
||||
#ifndef UNIV_DEBUG
|
||||
const size_t size = zip_size ? zip_size : srv_page_size;
|
||||
|
|
@ -1074,7 +1074,7 @@ buf_block_init(buf_block_t* block, byte* frame)
|
|||
/** Allocate a chunk of buffer frames.
|
||||
@param bytes requested size
|
||||
@return whether the allocation succeeded */
|
||||
inline bool buf_pool_t::chunk_t::create(size_t bytes)
|
||||
inline bool buf_pool_t::chunk_t::create(size_t bytes) noexcept
|
||||
{
|
||||
DBUG_EXECUTE_IF("ib_buf_chunk_init_fails", return false;);
|
||||
/* Round down to a multiple of page size, although it already should be. */
|
||||
|
|
@ -1160,7 +1160,7 @@ inline bool buf_pool_t::chunk_t::create(size_t bytes)
|
|||
/** Check that all file pages in the buffer chunk are in a replaceable state.
|
||||
@return address of a non-free block
|
||||
@retval nullptr if all freed */
|
||||
inline const buf_block_t *buf_pool_t::chunk_t::not_freed() const
|
||||
inline const buf_block_t *buf_pool_t::chunk_t::not_freed() const noexcept
|
||||
{
|
||||
buf_block_t *block= blocks;
|
||||
for (auto i= size; i--; block++)
|
||||
|
|
@ -1200,7 +1200,7 @@ inline const buf_block_t *buf_pool_t::chunk_t::not_freed() const
|
|||
|
||||
/** Create the hash table.
|
||||
@param n the lower bound of n_cells */
|
||||
void buf_pool_t::page_hash_table::create(ulint n)
|
||||
void buf_pool_t::page_hash_table::create(ulint n) noexcept
|
||||
{
|
||||
n_cells= ut_find_prime(n);
|
||||
const size_t size= MY_ALIGN(pad(n_cells) * sizeof *array,
|
||||
|
|
@ -1338,7 +1338,7 @@ bool buf_pool_t::create()
|
|||
}
|
||||
|
||||
/** Clean up after successful create() */
|
||||
void buf_pool_t::close()
|
||||
void buf_pool_t::close() noexcept
|
||||
{
|
||||
ut_ad(this == &buf_pool);
|
||||
if (!is_initialised())
|
||||
|
|
@ -1398,7 +1398,7 @@ void buf_pool_t::close()
|
|||
/** Try to reallocate a control block.
|
||||
@param block control block to reallocate
|
||||
@return whether the reallocation succeeded */
|
||||
inline bool buf_pool_t::realloc(buf_block_t *block)
|
||||
inline bool buf_pool_t::realloc(buf_block_t *block) noexcept
|
||||
{
|
||||
buf_block_t* new_block;
|
||||
|
||||
|
|
@ -1514,7 +1514,7 @@ inline bool buf_pool_t::realloc(buf_block_t *block)
|
|||
return(true); /* free_list was enough */
|
||||
}
|
||||
|
||||
void buf_pool_t::io_buf_t::create(ulint n_slots)
|
||||
void buf_pool_t::io_buf_t::create(ulint n_slots) noexcept
|
||||
{
|
||||
this->n_slots= n_slots;
|
||||
slots= static_cast<buf_tmp_buffer_t*>
|
||||
|
|
@ -1522,7 +1522,7 @@ void buf_pool_t::io_buf_t::create(ulint n_slots)
|
|||
memset((void*) slots, 0, n_slots * sizeof *slots);
|
||||
}
|
||||
|
||||
void buf_pool_t::io_buf_t::close()
|
||||
void buf_pool_t::io_buf_t::close() noexcept
|
||||
{
|
||||
for (buf_tmp_buffer_t *s= slots, *e= slots + n_slots; s != e; s++)
|
||||
{
|
||||
|
|
@ -1534,7 +1534,7 @@ void buf_pool_t::io_buf_t::close()
|
|||
n_slots= 0;
|
||||
}
|
||||
|
||||
buf_tmp_buffer_t *buf_pool_t::io_buf_t::reserve(bool wait_for_reads)
|
||||
buf_tmp_buffer_t *buf_pool_t::io_buf_t::reserve(bool wait_for_reads) noexcept
|
||||
{
|
||||
for (;;)
|
||||
{
|
||||
|
|
@ -1579,7 +1579,7 @@ buf_resize_status(
|
|||
|
||||
/** Withdraw blocks from the buffer pool until meeting withdraw_target.
|
||||
@return whether retry is needed */
|
||||
inline bool buf_pool_t::withdraw_blocks()
|
||||
inline bool buf_pool_t::withdraw_blocks() noexcept
|
||||
{
|
||||
buf_block_t* block;
|
||||
ulint loop_count = 0;
|
||||
|
|
@ -1708,7 +1708,7 @@ realloc_frame:
|
|||
|
||||
|
||||
|
||||
inline void buf_pool_t::page_hash_table::write_lock_all()
|
||||
inline void buf_pool_t::page_hash_table::write_lock_all() noexcept
|
||||
{
|
||||
for (auto n= pad(n_cells) & ~ELEMENTS_PER_LATCH;; n-= ELEMENTS_PER_LATCH + 1)
|
||||
{
|
||||
|
|
@ -1719,7 +1719,7 @@ inline void buf_pool_t::page_hash_table::write_lock_all()
|
|||
}
|
||||
|
||||
|
||||
inline void buf_pool_t::page_hash_table::write_unlock_all()
|
||||
inline void buf_pool_t::page_hash_table::write_unlock_all() noexcept
|
||||
{
|
||||
for (auto n= pad(n_cells) & ~ELEMENTS_PER_LATCH;; n-= ELEMENTS_PER_LATCH + 1)
|
||||
{
|
||||
|
|
@ -2313,7 +2313,7 @@ static void buf_relocate(buf_page_t *bpage, buf_page_t *dpage)
|
|||
}
|
||||
|
||||
buf_page_t *buf_pool_t::watch_set(const page_id_t id,
|
||||
buf_pool_t::hash_chain &chain)
|
||||
buf_pool_t::hash_chain &chain) noexcept
|
||||
{
|
||||
ut_ad(&chain == &page_hash.cell_get(id.fold()));
|
||||
page_hash.lock_get(chain).lock();
|
||||
|
|
@ -2384,6 +2384,7 @@ watch_set(id) must have returned nullptr before.
|
|||
@param chain unlocked hash table chain */
|
||||
TRANSACTIONAL_TARGET
|
||||
void buf_pool_t::watch_unset(const page_id_t id, buf_pool_t::hash_chain &chain)
|
||||
noexcept
|
||||
{
|
||||
mysql_mutex_assert_not_owner(&mutex);
|
||||
buf_page_t *w;
|
||||
|
|
@ -2497,7 +2498,7 @@ static void buf_inc_get(ha_handler_stats *stats)
|
|||
}
|
||||
|
||||
TRANSACTIONAL_TARGET
|
||||
buf_page_t *buf_page_get_zip(const page_id_t page_id)
|
||||
buf_page_t *buf_page_get_zip(const page_id_t page_id) noexcept
|
||||
{
|
||||
ha_handler_stats *const stats= mariadb_stats;
|
||||
buf_inc_get(stats);
|
||||
|
|
@ -2607,14 +2608,7 @@ buf_block_init_low(
|
|||
#endif /* BTR_CUR_HASH_ADAPT */
|
||||
}
|
||||
|
||||
/********************************************************************//**
|
||||
Decompress a block.
|
||||
@return true if successful */
|
||||
bool
|
||||
buf_zip_decompress(
|
||||
/*===============*/
|
||||
buf_block_t* block, /*!< in/out: block */
|
||||
ibool check) /*!< in: TRUE=verify the page checksum */
|
||||
bool buf_zip_decompress(buf_block_t *block, bool check) noexcept
|
||||
{
|
||||
const byte* frame = block->page.zip.data;
|
||||
ulint size = page_zip_get_size(&block->page.zip);
|
||||
|
|
@ -2765,6 +2759,7 @@ static bool buf_page_ibuf_merge_try(buf_block_t *block, ulint rw_latch,
|
|||
|
||||
ATTRIBUTE_COLD
|
||||
buf_block_t *buf_pool_t::unzip(buf_page_t *b, buf_pool_t::hash_chain &chain)
|
||||
noexcept
|
||||
{
|
||||
buf_block_t *block= buf_LRU_get_free_block(false);
|
||||
buf_block_init_low(block);
|
||||
|
|
@ -2855,7 +2850,7 @@ buf_block_t *buf_pool_t::unzip(buf_page_t *b, buf_pool_t::hash_chain &chain)
|
|||
|
||||
buf_block_t *buf_pool_t::page_fix(const page_id_t id,
|
||||
dberr_t *err,
|
||||
buf_pool_t::page_fix_conflicts c)
|
||||
buf_pool_t::page_fix_conflicts c) noexcept
|
||||
{
|
||||
ha_handler_stats *const stats= mariadb_stats;
|
||||
buf_inc_get(stats);
|
||||
|
|
@ -2986,7 +2981,7 @@ buf_page_get_low(
|
|||
ulint mode,
|
||||
mtr_t* mtr,
|
||||
dberr_t* err,
|
||||
bool allow_ibuf_merge)
|
||||
bool allow_ibuf_merge) noexcept
|
||||
{
|
||||
ulint retries = 0;
|
||||
|
||||
|
|
@ -3344,7 +3339,7 @@ buf_page_get_gen(
|
|||
ulint mode,
|
||||
mtr_t* mtr,
|
||||
dberr_t* err,
|
||||
bool allow_ibuf_merge)
|
||||
bool allow_ibuf_merge) noexcept
|
||||
{
|
||||
buf_block_t *block= recv_sys.recover(page_id);
|
||||
if (UNIV_LIKELY(!block))
|
||||
|
|
@ -3424,7 +3419,7 @@ buf_page_get_gen(
|
|||
}
|
||||
|
||||
TRANSACTIONAL_TARGET
|
||||
buf_block_t *buf_page_optimistic_fix(buf_block_t *block, page_id_t id)
|
||||
buf_block_t *buf_page_optimistic_fix(buf_block_t *block, page_id_t id) noexcept
|
||||
{
|
||||
buf_pool_t::hash_chain &chain= buf_pool.page_hash.cell_get(id.fold());
|
||||
transactional_shared_lock_guard<page_hash_latch> g
|
||||
|
|
@ -3442,7 +3437,8 @@ buf_block_t *buf_page_optimistic_fix(buf_block_t *block, page_id_t id)
|
|||
|
||||
buf_block_t *buf_page_optimistic_get(buf_block_t *block,
|
||||
rw_lock_type_t rw_latch,
|
||||
uint64_t modify_clock, mtr_t *mtr)
|
||||
uint64_t modify_clock,
|
||||
mtr_t *mtr) noexcept
|
||||
{
|
||||
ut_ad(mtr->is_active());
|
||||
ut_ad(rw_latch == RW_S_LATCH || rw_latch == RW_X_LATCH);
|
||||
|
|
@ -3512,7 +3508,7 @@ Suitable for using when holding the lock_sys latches (as it avoids deadlock).
|
|||
@return the block
|
||||
@retval nullptr if an S-latch cannot be granted immediately */
|
||||
TRANSACTIONAL_TARGET
|
||||
buf_block_t *buf_page_try_get(const page_id_t page_id, mtr_t *mtr)
|
||||
buf_block_t *buf_page_try_get(const page_id_t page_id, mtr_t *mtr) noexcept
|
||||
{
|
||||
ut_ad(mtr);
|
||||
ut_ad(mtr->is_active());
|
||||
|
|
@ -3547,7 +3543,7 @@ buf_block_t *buf_page_try_get(const page_id_t page_id, mtr_t *mtr)
|
|||
@param zip_size ROW_FORMAT=COMPRESSED page size, or 0
|
||||
@param fix initial buf_fix_count() */
|
||||
void buf_block_t::initialise(const page_id_t page_id, ulint zip_size,
|
||||
uint32_t fix)
|
||||
uint32_t fix) noexcept
|
||||
{
|
||||
ut_ad(!page.in_file());
|
||||
buf_block_init_low(this);
|
||||
|
|
@ -3559,6 +3555,7 @@ void buf_block_t::initialise(const page_id_t page_id, ulint zip_size,
|
|||
TRANSACTIONAL_TARGET
|
||||
static buf_block_t *buf_page_create_low(page_id_t page_id, ulint zip_size,
|
||||
mtr_t *mtr, buf_block_t *free_block)
|
||||
noexcept
|
||||
{
|
||||
ut_ad(mtr->is_active());
|
||||
ut_ad(page_id.space() != 0 || !zip_size);
|
||||
|
|
@ -3772,7 +3769,7 @@ FILE_PAGE (the other is buf_page_get_gen).
|
|||
@return pointer to the block, page bufferfixed */
|
||||
buf_block_t*
|
||||
buf_page_create(fil_space_t *space, uint32_t offset,
|
||||
ulint zip_size, mtr_t *mtr, buf_block_t *free_block)
|
||||
ulint zip_size, mtr_t *mtr, buf_block_t *free_block) noexcept
|
||||
{
|
||||
space->free_page(offset, false);
|
||||
return buf_page_create_low({space->id, offset}, zip_size, mtr, free_block);
|
||||
|
|
@ -3786,7 +3783,8 @@ deferred tablespace
|
|||
@param free_block pre-allocated buffer block
|
||||
@return pointer to the block, page bufferfixed */
|
||||
buf_block_t* buf_page_create_deferred(uint32_t space_id, ulint zip_size,
|
||||
mtr_t *mtr, buf_block_t *free_block)
|
||||
mtr_t *mtr,
|
||||
buf_block_t *free_block) noexcept
|
||||
{
|
||||
return buf_page_create_low({space_id, 0}, zip_size, mtr, free_block);
|
||||
}
|
||||
|
|
@ -3795,7 +3793,8 @@ buf_block_t* buf_page_create_deferred(uint32_t space_id, ulint zip_size,
|
|||
counter value in MONITOR_MODULE_BUF_PAGE.
|
||||
@param bpage buffer page whose read or write was completed
|
||||
@param read true=read, false=write */
|
||||
ATTRIBUTE_COLD void buf_page_monitor(const buf_page_t &bpage, bool read)
|
||||
ATTRIBUTE_COLD
|
||||
void buf_page_monitor(const buf_page_t &bpage, bool read) noexcept
|
||||
{
|
||||
monitor_id_t counter;
|
||||
|
||||
|
|
@ -3888,7 +3887,7 @@ ATTRIBUTE_COLD void buf_page_monitor(const buf_page_t &bpage, bool read)
|
|||
@param[in] is_compressed compressed page
|
||||
@return true if page is corrupted or false if it isn't */
|
||||
static bool buf_page_full_crc32_is_corrupted(ulint space_id, const byte* d,
|
||||
bool is_compressed)
|
||||
bool is_compressed) noexcept
|
||||
{
|
||||
if (space_id != mach_read_from_4(d + FIL_PAGE_SPACE_ID))
|
||||
return true;
|
||||
|
|
@ -3978,7 +3977,7 @@ static dberr_t buf_page_check_corrupt(buf_page_t *bpage,
|
|||
@return whether the operation succeeded
|
||||
@retval DB_PAGE_CORRUPTED if the checksum or the page ID is incorrect
|
||||
@retval DB_DECRYPTION_FAILED if the page cannot be decrypted */
|
||||
dberr_t buf_page_t::read_complete(const fil_node_t &node)
|
||||
dberr_t buf_page_t::read_complete(const fil_node_t &node) noexcept
|
||||
{
|
||||
const page_id_t expected_id{id()};
|
||||
ut_ad(is_read_fixed());
|
||||
|
|
@ -4132,7 +4131,7 @@ success_page:
|
|||
/** Check that all blocks are in a replaceable state.
|
||||
@return address of a non-free block
|
||||
@retval nullptr if all freed */
|
||||
void buf_pool_t::assert_all_freed()
|
||||
void buf_pool_t::assert_all_freed() noexcept
|
||||
{
|
||||
mysql_mutex_lock(&mutex);
|
||||
const chunk_t *chunk= chunks;
|
||||
|
|
@ -4144,7 +4143,7 @@ void buf_pool_t::assert_all_freed()
|
|||
#endif /* UNIV_DEBUG */
|
||||
|
||||
/** Refresh the statistics used to print per-second averages. */
|
||||
void buf_refresh_io_stats()
|
||||
void buf_refresh_io_stats() noexcept
|
||||
{
|
||||
buf_pool.last_printout_time = time(NULL);
|
||||
buf_pool.old_stat = buf_pool.stat;
|
||||
|
|
@ -4152,7 +4151,7 @@ void buf_refresh_io_stats()
|
|||
|
||||
/** Invalidate all pages in the buffer pool.
|
||||
All pages must be in a replaceable state (not modified or latched). */
|
||||
void buf_pool_invalidate()
|
||||
void buf_pool_invalidate() noexcept
|
||||
{
|
||||
/* It is possible that a write batch that has been posted
|
||||
earlier is still not complete. For buffer pool invalidation to
|
||||
|
|
@ -4179,7 +4178,7 @@ void buf_pool_invalidate()
|
|||
|
||||
#ifdef UNIV_DEBUG
|
||||
/** Validate the buffer pool. */
|
||||
void buf_pool_t::validate()
|
||||
void buf_pool_t::validate() noexcept
|
||||
{
|
||||
ulint n_lru = 0;
|
||||
ulint n_flushing = 0;
|
||||
|
|
@ -4274,7 +4273,7 @@ void buf_pool_t::validate()
|
|||
|
||||
#if defined UNIV_DEBUG_PRINT || defined UNIV_DEBUG
|
||||
/** Write information of the buf_pool to the error log. */
|
||||
void buf_pool_t::print()
|
||||
void buf_pool_t::print() noexcept
|
||||
{
|
||||
index_id_t* index_ids;
|
||||
ulint* counts;
|
||||
|
|
@ -4378,7 +4377,7 @@ void buf_pool_t::print()
|
|||
|
||||
#ifdef UNIV_DEBUG
|
||||
/** @return the number of latched pages in the buffer pool */
|
||||
ulint buf_get_latched_pages_number()
|
||||
ulint buf_get_latched_pages_number() noexcept
|
||||
{
|
||||
ulint fixed_pages_number= 0;
|
||||
|
||||
|
|
@ -4397,7 +4396,7 @@ ulint buf_get_latched_pages_number()
|
|||
|
||||
/** Collect buffer pool metadata.
|
||||
@param[out] pool_info buffer pool metadata */
|
||||
void buf_stats_get_pool_info(buf_pool_info_t *pool_info)
|
||||
void buf_stats_get_pool_info(buf_pool_info_t *pool_info) noexcept
|
||||
{
|
||||
time_t current_time;
|
||||
double time_elapsed;
|
||||
|
|
@ -4630,7 +4629,7 @@ This function should be called only if tablespace contains crypt data metadata.
|
|||
@param page page frame
|
||||
@param fsp_flags contents of FSP_SPACE_FLAGS
|
||||
@return whether the page is encrypted and valid */
|
||||
bool buf_page_verify_crypt_checksum(const byte *page, uint32_t fsp_flags)
|
||||
bool buf_page_verify_crypt_checksum(const byte *page, uint32_t fsp_flags) noexcept
|
||||
{
|
||||
if (!fil_space_t::full_crc32(fsp_flags)) {
|
||||
return fil_space_verify_crypt_checksum(
|
||||
|
|
|
|||
|
|
@ -41,13 +41,13 @@ using st_::span;
|
|||
buf_dblwr_t buf_dblwr;
|
||||
|
||||
/** @return the TRX_SYS page */
|
||||
inline buf_block_t *buf_dblwr_trx_sys_get(mtr_t *mtr)
|
||||
inline buf_block_t *buf_dblwr_trx_sys_get(mtr_t *mtr) noexcept
|
||||
{
|
||||
return buf_page_get(page_id_t(TRX_SYS_SPACE, TRX_SYS_PAGE_NO),
|
||||
0, RW_X_LATCH, mtr);
|
||||
}
|
||||
|
||||
void buf_dblwr_t::init()
|
||||
void buf_dblwr_t::init() noexcept
|
||||
{
|
||||
if (!active_slot)
|
||||
{
|
||||
|
|
@ -59,7 +59,7 @@ void buf_dblwr_t::init()
|
|||
|
||||
/** Initialise the persistent storage of the doublewrite buffer.
|
||||
@param header doublewrite page header in the TRX_SYS page */
|
||||
inline void buf_dblwr_t::init(const byte *header)
|
||||
inline void buf_dblwr_t::init(const byte *header) noexcept
|
||||
{
|
||||
ut_ad(!active_slot->first_free);
|
||||
ut_ad(!active_slot->reserved);
|
||||
|
|
@ -81,7 +81,7 @@ inline void buf_dblwr_t::init(const byte *header)
|
|||
|
||||
/** Create or restore the doublewrite buffer in the TRX_SYS page.
|
||||
@return whether the operation succeeded */
|
||||
bool buf_dblwr_t::create()
|
||||
bool buf_dblwr_t::create() noexcept
|
||||
{
|
||||
if (is_created())
|
||||
return true;
|
||||
|
|
@ -113,9 +113,9 @@ start_again:
|
|||
|
||||
if (UT_LIST_GET_FIRST(fil_system.sys_space->chain)->size < 3 * size)
|
||||
{
|
||||
ib::error() << "Cannot create doublewrite buffer: "
|
||||
sql_print_error("InnoDB: Cannot create doublewrite buffer: "
|
||||
"the first file in innodb_data_file_path must be at least "
|
||||
<< (3 * (size >> (20U - srv_page_size_shift))) << "M.";
|
||||
"%zuM.", 3 * (size >> (20U - srv_page_size_shift)));
|
||||
fail:
|
||||
mtr.commit();
|
||||
return false;
|
||||
|
|
@ -127,11 +127,13 @@ fail:
|
|||
&mtr, &err, false, trx_sys_block);
|
||||
if (!b)
|
||||
{
|
||||
ib::error() << "Cannot create doublewrite buffer: " << err;
|
||||
sql_print_error("InnoDB: Cannot create doublewrite buffer: %s",
|
||||
ut_strerr(err));
|
||||
goto fail;
|
||||
}
|
||||
|
||||
ib::info() << "Doublewrite buffer not found: creating new";
|
||||
sql_print_information("InnoDB: Doublewrite buffer not found:"
|
||||
" creating new");
|
||||
|
||||
/* FIXME: After this point, the doublewrite buffer creation
|
||||
is not atomic. The doublewrite buffer should not exist in
|
||||
|
|
@ -150,9 +152,9 @@ fail:
|
|||
false, &mtr, &mtr, &err);
|
||||
if (!new_block)
|
||||
{
|
||||
ib::error() << "Cannot create doublewrite buffer: "
|
||||
sql_print_error("InnoDB: Cannot create doublewrite buffer: "
|
||||
" you must increase your tablespace size."
|
||||
" Cannot continue operation.";
|
||||
" Cannot continue operation.");
|
||||
/* This may essentially corrupt the doublewrite
|
||||
buffer. However, usually the doublewrite buffer
|
||||
is created at database initialization, and it
|
||||
|
|
@ -238,6 +240,8 @@ fail:
|
|||
|
||||
/* Remove doublewrite pages from LRU */
|
||||
buf_pool_invalidate();
|
||||
|
||||
sql_print_information("InnoDB: Doublewrite buffer created");
|
||||
goto start_again;
|
||||
}
|
||||
|
||||
|
|
@ -250,6 +254,7 @@ loads the pages from double write buffer into memory.
|
|||
@param path Path name of file
|
||||
@return DB_SUCCESS or error code */
|
||||
dberr_t buf_dblwr_t::init_or_load_pages(pfs_os_file_t file, const char *path)
|
||||
noexcept
|
||||
{
|
||||
ut_ad(this == &buf_dblwr);
|
||||
const uint32_t size= block_size();
|
||||
|
|
@ -264,7 +269,8 @@ dberr_t buf_dblwr_t::init_or_load_pages(pfs_os_file_t file, const char *path)
|
|||
|
||||
if (err != DB_SUCCESS)
|
||||
{
|
||||
ib::error() << "Failed to read the system tablespace header page";
|
||||
sql_print_error("InnoDB: Failed to read the system tablespace"
|
||||
" header page");
|
||||
func_exit:
|
||||
aligned_free(read_buf);
|
||||
return err;
|
||||
|
|
@ -297,7 +303,8 @@ func_exit:
|
|||
|
||||
if (err != DB_SUCCESS)
|
||||
{
|
||||
ib::error() << "Failed to read the first double write buffer extent";
|
||||
sql_print_error("InnoDB: Failed to read"
|
||||
" the first double write buffer extent");
|
||||
goto func_exit;
|
||||
}
|
||||
|
||||
|
|
@ -307,7 +314,8 @@ func_exit:
|
|||
size << srv_page_size_shift, nullptr);
|
||||
if (err != DB_SUCCESS)
|
||||
{
|
||||
ib::error() << "Failed to read the second double write buffer extent";
|
||||
sql_print_error("InnoDB: Failed to read"
|
||||
" the second double write buffer extent");
|
||||
goto func_exit;
|
||||
}
|
||||
|
||||
|
|
@ -315,7 +323,8 @@ func_exit:
|
|||
|
||||
if (UNIV_UNLIKELY(upgrade_to_innodb_file_per_table))
|
||||
{
|
||||
ib::info() << "Resetting space id's in the doublewrite buffer";
|
||||
sql_print_information("InnoDB: Resetting space id's in "
|
||||
"the doublewrite buffer");
|
||||
|
||||
for (ulint i= 0; i < size * 2; i++, page += srv_page_size)
|
||||
{
|
||||
|
|
@ -331,7 +340,7 @@ func_exit:
|
|||
source_page_no << srv_page_size_shift, srv_page_size);
|
||||
if (err != DB_SUCCESS)
|
||||
{
|
||||
ib::error() << "Failed to upgrade the double write buffer";
|
||||
sql_print_error("InnoDB: Failed to upgrade the double write buffer");
|
||||
goto func_exit;
|
||||
}
|
||||
}
|
||||
|
|
@ -351,7 +360,7 @@ func_exit:
|
|||
}
|
||||
|
||||
/** Process and remove the double write buffer pages for all tablespaces. */
|
||||
void buf_dblwr_t::recover()
|
||||
void buf_dblwr_t::recover() noexcept
|
||||
{
|
||||
ut_ad(log_sys.last_checkpoint_lsn);
|
||||
if (!is_created())
|
||||
|
|
@ -476,7 +485,7 @@ next_page:
|
|||
}
|
||||
|
||||
/** Free the doublewrite buffer. */
|
||||
void buf_dblwr_t::close()
|
||||
void buf_dblwr_t::close() noexcept
|
||||
{
|
||||
if (!active_slot)
|
||||
return;
|
||||
|
|
@ -497,7 +506,7 @@ void buf_dblwr_t::close()
|
|||
}
|
||||
|
||||
/** Update the doublewrite buffer on write completion. */
|
||||
void buf_dblwr_t::write_completed()
|
||||
void buf_dblwr_t::write_completed() noexcept
|
||||
{
|
||||
ut_ad(this == &buf_dblwr);
|
||||
ut_ad(!srv_read_only_mode);
|
||||
|
|
@ -532,6 +541,7 @@ void buf_dblwr_t::write_completed()
|
|||
@param[in] page page to check
|
||||
@param[in] s tablespace */
|
||||
static void buf_dblwr_check_page_lsn(const page_t* page, const fil_space_t& s)
|
||||
noexcept
|
||||
{
|
||||
/* Ignore page_compressed or encrypted pages */
|
||||
if (s.is_compressed() || buf_page_get_key_version(page, s.flags))
|
||||
|
|
@ -547,6 +557,7 @@ static void buf_dblwr_check_page_lsn(const page_t* page, const fil_space_t& s)
|
|||
}
|
||||
|
||||
static void buf_dblwr_check_page_lsn(const buf_page_t &b, const byte *page)
|
||||
noexcept
|
||||
{
|
||||
if (fil_space_t *space= fil_space_t::get_for_write(b.id().space()))
|
||||
{
|
||||
|
|
@ -556,7 +567,7 @@ static void buf_dblwr_check_page_lsn(const buf_page_t &b, const byte *page)
|
|||
}
|
||||
|
||||
/** Check the LSN values on the page with which this block is associated. */
|
||||
static void buf_dblwr_check_block(const buf_page_t *bpage)
|
||||
static void buf_dblwr_check_block(const buf_page_t *bpage) noexcept
|
||||
{
|
||||
ut_ad(bpage->in_file());
|
||||
const page_t *page= bpage->frame;
|
||||
|
|
@ -588,7 +599,7 @@ static void buf_dblwr_check_block(const buf_page_t *bpage)
|
|||
}
|
||||
#endif /* UNIV_DEBUG */
|
||||
|
||||
bool buf_dblwr_t::flush_buffered_writes(const ulint size)
|
||||
bool buf_dblwr_t::flush_buffered_writes(const ulint size) noexcept
|
||||
{
|
||||
mysql_mutex_assert_owner(&mutex);
|
||||
ut_ad(size == block_size());
|
||||
|
|
@ -653,7 +664,7 @@ bool buf_dblwr_t::flush_buffered_writes(const ulint size)
|
|||
return true;
|
||||
}
|
||||
|
||||
static void *get_frame(const IORequest &request)
|
||||
static void *get_frame(const IORequest &request) noexcept
|
||||
{
|
||||
if (request.slot)
|
||||
return request.slot->out_buf;
|
||||
|
|
@ -662,6 +673,7 @@ static void *get_frame(const IORequest &request)
|
|||
}
|
||||
|
||||
void buf_dblwr_t::flush_buffered_writes_completed(const IORequest &request)
|
||||
noexcept
|
||||
{
|
||||
ut_ad(this == &buf_dblwr);
|
||||
ut_ad(srv_use_doublewrite_buf);
|
||||
|
|
@ -729,7 +741,7 @@ void buf_dblwr_t::flush_buffered_writes_completed(const IORequest &request)
|
|||
It is very important to call this function after a batch of writes has been
|
||||
posted, and also when we may have to wait for a page latch!
|
||||
Otherwise a deadlock of threads can occur. */
|
||||
void buf_dblwr_t::flush_buffered_writes()
|
||||
void buf_dblwr_t::flush_buffered_writes() noexcept
|
||||
{
|
||||
if (!is_created() || !srv_use_doublewrite_buf)
|
||||
{
|
||||
|
|
@ -749,7 +761,7 @@ void buf_dblwr_t::flush_buffered_writes()
|
|||
flush_buffered_writes() will be invoked to make space.
|
||||
@param request asynchronous write request
|
||||
@param size payload size in bytes */
|
||||
void buf_dblwr_t::add_to_batch(const IORequest &request, size_t size)
|
||||
void buf_dblwr_t::add_to_batch(const IORequest &request, size_t size) noexcept
|
||||
{
|
||||
ut_ad(request.is_async());
|
||||
ut_ad(request.is_write());
|
||||
|
|
|
|||
|
|
@ -85,10 +85,10 @@ static struct
|
|||
|
||||
#ifdef UNIV_DEBUG
|
||||
/** Validate the flush list. */
|
||||
static void buf_flush_validate_low();
|
||||
static void buf_flush_validate_low() noexcept;
|
||||
|
||||
/** Validates the flush list some of the time. */
|
||||
static void buf_flush_validate_skip()
|
||||
static void buf_flush_validate_skip() noexcept
|
||||
{
|
||||
/** Try buf_flush_validate_low() every this many times */
|
||||
# define BUF_FLUSH_VALIDATE_SKIP 23
|
||||
|
|
@ -110,7 +110,7 @@ static void buf_flush_validate_skip()
|
|||
}
|
||||
#endif /* UNIV_DEBUG */
|
||||
|
||||
void buf_pool_t::page_cleaner_wakeup(bool for_LRU)
|
||||
void buf_pool_t::page_cleaner_wakeup(bool for_LRU) noexcept
|
||||
{
|
||||
ut_d(buf_flush_validate_skip());
|
||||
if (!page_cleaner_idle())
|
||||
|
|
@ -179,7 +179,7 @@ deleting the data file of that tablespace.
|
|||
The pages still remain a part of LRU and are evicted from
|
||||
the list as they age towards the tail of the LRU.
|
||||
@param id tablespace identifier */
|
||||
void buf_flush_remove_pages(uint32_t id)
|
||||
void buf_flush_remove_pages(uint32_t id) noexcept
|
||||
{
|
||||
const page_id_t first(id, 0), end(id + 1, 0);
|
||||
ut_ad(id);
|
||||
|
|
@ -236,6 +236,7 @@ buf_flush_relocate_on_flush_list(
|
|||
/*=============================*/
|
||||
buf_page_t* bpage, /*!< in/out: control block being moved */
|
||||
buf_page_t* dpage) /*!< in/out: destination block */
|
||||
noexcept
|
||||
{
|
||||
buf_page_t* prev;
|
||||
|
||||
|
|
@ -276,6 +277,7 @@ buf_flush_relocate_on_flush_list(
|
|||
}
|
||||
|
||||
void buf_page_t::write_complete(bool persistent, bool error, uint32_t state)
|
||||
noexcept
|
||||
{
|
||||
ut_ad(!persistent == fsp_is_system_temporary(id().space()));
|
||||
ut_ad(state >= WRITE_FIX);
|
||||
|
|
@ -296,13 +298,13 @@ void buf_page_t::write_complete(bool persistent, bool error, uint32_t state)
|
|||
lock.u_unlock(true);
|
||||
}
|
||||
|
||||
inline void buf_pool_t::n_flush_inc()
|
||||
inline void buf_pool_t::n_flush_inc() noexcept
|
||||
{
|
||||
mysql_mutex_assert_owner(&flush_list_mutex);
|
||||
page_cleaner_status+= LRU_FLUSH;
|
||||
}
|
||||
|
||||
inline void buf_pool_t::n_flush_dec()
|
||||
inline void buf_pool_t::n_flush_dec() noexcept
|
||||
{
|
||||
mysql_mutex_assert_owner(&flush_list_mutex);
|
||||
ut_ad(page_cleaner_status >= LRU_FLUSH);
|
||||
|
|
@ -313,7 +315,7 @@ inline void buf_pool_t::n_flush_dec()
|
|||
/** Complete write of a file page from buf_pool.
|
||||
@param request write request
|
||||
@param error whether the write may have failed */
|
||||
void buf_page_write_complete(const IORequest &request, bool error)
|
||||
void buf_page_write_complete(const IORequest &request, bool error) noexcept
|
||||
{
|
||||
ut_ad(request.is_write());
|
||||
ut_ad(!srv_read_only_mode);
|
||||
|
|
@ -363,7 +365,7 @@ void buf_page_write_complete(const IORequest &request, bool error)
|
|||
/** Calculate a ROW_FORMAT=COMPRESSED page checksum and update the page.
|
||||
@param[in,out] page page to update
|
||||
@param[in] size compressed page size */
|
||||
void buf_flush_update_zip_checksum(buf_frame_t *page, ulint size)
|
||||
void buf_flush_update_zip_checksum(buf_frame_t *page, ulint size) noexcept
|
||||
{
|
||||
ut_ad(size > 0);
|
||||
mach_write_to_4(page + FIL_PAGE_SPACE_OR_CHKSUM,
|
||||
|
|
@ -372,7 +374,7 @@ void buf_flush_update_zip_checksum(buf_frame_t *page, ulint size)
|
|||
|
||||
/** Assign the full crc32 checksum for non-compressed page.
|
||||
@param[in,out] page page to be updated */
|
||||
void buf_flush_assign_full_crc32_checksum(byte* page)
|
||||
void buf_flush_assign_full_crc32_checksum(byte* page) noexcept
|
||||
{
|
||||
ut_d(bool compressed = false);
|
||||
ut_d(bool corrupted = false);
|
||||
|
|
@ -397,7 +399,7 @@ buf_flush_init_for_writing(
|
|||
const buf_block_t* block,
|
||||
byte* page,
|
||||
void* page_zip_,
|
||||
bool use_full_checksum)
|
||||
bool use_full_checksum) noexcept
|
||||
{
|
||||
if (block && block->page.frame != page) {
|
||||
/* If page is encrypted in full crc32 format then
|
||||
|
|
@ -465,8 +467,8 @@ buf_flush_init_for_writing(
|
|||
/* The page type could be garbage in old files
|
||||
created before MySQL 5.5. Such files always
|
||||
had a page size of 16 kilobytes. */
|
||||
ulint page_type = fil_page_get_type(page);
|
||||
ulint reset_type = page_type;
|
||||
uint16_t page_type = fil_page_get_type(page);
|
||||
uint16_t reset_type = page_type;
|
||||
|
||||
switch (block->page.id().page_no() % 16384) {
|
||||
case 0:
|
||||
|
|
@ -529,7 +531,7 @@ buf_flush_init_for_writing(
|
|||
|
||||
/** Reserve a buffer for compression.
|
||||
@param[in,out] slot reserved slot */
|
||||
static void buf_tmp_reserve_compression_buf(buf_tmp_buffer_t* slot)
|
||||
static void buf_tmp_reserve_compression_buf(buf_tmp_buffer_t* slot) noexcept
|
||||
{
|
||||
if (slot->comp_buf)
|
||||
return;
|
||||
|
|
@ -549,6 +551,7 @@ static void buf_tmp_reserve_compression_buf(buf_tmp_buffer_t* slot)
|
|||
@param[in,out] d Output buffer
|
||||
@return encrypted buffer or NULL */
|
||||
static byte *buf_tmp_page_encrypt(ulint offset, const byte *s, byte *d)
|
||||
noexcept
|
||||
{
|
||||
/* Calculate the start offset in a page */
|
||||
uint srclen= static_cast<uint>(srv_page_size) -
|
||||
|
|
@ -579,7 +582,7 @@ a page is written to disk.
|
|||
@return page frame to be written to file
|
||||
(may be src_frame or an encrypted/compressed copy of it) */
|
||||
static byte *buf_page_encrypt(fil_space_t *space, buf_page_t *bpage, byte *s,
|
||||
buf_tmp_buffer_t **slot, size_t *size)
|
||||
buf_tmp_buffer_t **slot, size_t *size) noexcept
|
||||
{
|
||||
ut_ad(!bpage->is_freed());
|
||||
ut_ad(space->id == bpage->id().space());
|
||||
|
|
@ -725,7 +728,7 @@ ATTRIBUTE_COLD void buf_pool_t::release_freed_page(buf_page_t *bpage) noexcept
|
|||
/** Write a flushable page to a file or free a freeable block.
|
||||
@param space tablespace
|
||||
@return whether a page write was initiated and buf_pool.mutex released */
|
||||
bool buf_page_t::flush(fil_space_t *space)
|
||||
bool buf_page_t::flush(fil_space_t *space) noexcept
|
||||
{
|
||||
mysql_mutex_assert_not_owner(&buf_pool.flush_list_mutex);
|
||||
ut_ad(in_file());
|
||||
|
|
@ -862,7 +865,7 @@ bool buf_page_t::flush(fil_space_t *space)
|
|||
@param id page identifier
|
||||
@param fold id.fold()
|
||||
@return whether the page can be flushed */
|
||||
static bool buf_flush_check_neighbor(const page_id_t id, ulint fold)
|
||||
static bool buf_flush_check_neighbor(const page_id_t id, ulint fold) noexcept
|
||||
{
|
||||
mysql_mutex_assert_owner(&buf_pool.mutex);
|
||||
ut_ad(fold == id.fold());
|
||||
|
|
@ -881,6 +884,7 @@ static bool buf_flush_check_neighbor(const page_id_t id, ulint fold)
|
|||
@return last page number that can be flushed */
|
||||
static page_id_t buf_flush_check_neighbors(const fil_space_t &space,
|
||||
page_id_t &id, bool contiguous)
|
||||
noexcept
|
||||
{
|
||||
ut_ad(id.page_no() < space.size +
|
||||
(space.physical_size() == 2048 ? 1
|
||||
|
|
@ -941,7 +945,7 @@ MY_ATTRIBUTE((warn_unused_result))
|
|||
/** Apply freed_ranges to the file.
|
||||
@param writable whether the file is writable
|
||||
@return number of pages written or hole-punched */
|
||||
uint32_t fil_space_t::flush_freed(bool writable)
|
||||
uint32_t fil_space_t::flush_freed(bool writable) noexcept
|
||||
{
|
||||
const bool punch_hole= chain.start->punch_hole == 1;
|
||||
if (!punch_hole && !srv_immediate_scrub_data_uncompressed)
|
||||
|
|
@ -1013,7 +1017,8 @@ static ulint buf_flush_try_neighbors(fil_space_t *space,
|
|||
const page_id_t page_id,
|
||||
buf_page_t *bpage,
|
||||
bool contiguous,
|
||||
ulint n_flushed, ulint n_to_flush)
|
||||
ulint n_flushed,
|
||||
ulint n_to_flush) noexcept
|
||||
{
|
||||
ut_ad(space->id == page_id.space());
|
||||
ut_ad(bpage->id() == page_id);
|
||||
|
|
@ -1111,7 +1116,7 @@ Note that this function does not actually flush any data to disk. It
|
|||
just detaches the uncompressed frames from the compressed pages at the
|
||||
tail of the unzip_LRU and puts those freed frames in the free list.
|
||||
@return number of blocks moved to the free list. */
|
||||
static ulint buf_free_from_unzip_LRU_list_batch()
|
||||
static ulint buf_free_from_unzip_LRU_list_batch() noexcept
|
||||
{
|
||||
ulint scanned = 0;
|
||||
ulint count = 0;
|
||||
|
|
@ -1153,7 +1158,7 @@ static ulint buf_free_from_unzip_LRU_list_batch()
|
|||
@param id tablespace identifier
|
||||
@return tablespace
|
||||
@retval nullptr if the tablespace is missing or inaccessible */
|
||||
fil_space_t *fil_space_t::get_for_write(uint32_t id)
|
||||
fil_space_t *fil_space_t::get_for_write(uint32_t id) noexcept
|
||||
{
|
||||
mysql_mutex_lock(&fil_system.mutex);
|
||||
fil_space_t *space= fil_space_get_by_id(id);
|
||||
|
|
@ -1172,6 +1177,7 @@ fil_space_t *fil_space_t::get_for_write(uint32_t id)
|
|||
@param id tablespace identifier
|
||||
@return tablespace and number of pages written */
|
||||
static std::pair<fil_space_t*, uint32_t> buf_flush_space(const uint32_t id)
|
||||
noexcept
|
||||
{
|
||||
if (fil_space_t *space= fil_space_t::get_for_write(id))
|
||||
return {space, space->flush_freed(true)};
|
||||
|
|
@ -1188,7 +1194,7 @@ struct flush_counters_t
|
|||
|
||||
/** Discard a dirty page, and release buf_pool.flush_list_mutex.
|
||||
@param bpage dirty page whose tablespace is not accessible */
|
||||
static void buf_flush_discard_page(buf_page_t *bpage)
|
||||
static void buf_flush_discard_page(buf_page_t *bpage) noexcept
|
||||
{
|
||||
ut_ad(bpage->in_file());
|
||||
ut_ad(bpage->oldest_modification());
|
||||
|
|
@ -1207,7 +1213,7 @@ static void buf_flush_discard_page(buf_page_t *bpage)
|
|||
and move clean blocks to buf_pool.free.
|
||||
@param max maximum number of blocks to flush
|
||||
@param n counts of flushed and evicted pages */
|
||||
static void buf_flush_LRU_list_batch(ulint max, flush_counters_t *n)
|
||||
static void buf_flush_LRU_list_batch(ulint max, flush_counters_t *n) noexcept
|
||||
{
|
||||
ulint scanned= 0;
|
||||
mysql_mutex_assert_owner(&buf_pool.mutex);
|
||||
|
|
@ -1364,7 +1370,7 @@ static void buf_flush_LRU_list_batch(ulint max, flush_counters_t *n)
|
|||
Whether LRU or unzip_LRU is used depends on the state of the system.
|
||||
@param max maximum number of blocks to flush
|
||||
@param n counts of flushed and evicted pages */
|
||||
static void buf_do_LRU_batch(ulint max, flush_counters_t *n)
|
||||
static void buf_do_LRU_batch(ulint max, flush_counters_t *n) noexcept
|
||||
{
|
||||
if (buf_LRU_evict_from_unzip_LRU())
|
||||
buf_free_from_unzip_LRU_list_batch();
|
||||
|
|
@ -1383,7 +1389,7 @@ The calling thread is not allowed to own any latches on pages!
|
|||
@param max_n maximum mumber of blocks to flush
|
||||
@param lsn once an oldest_modification>=lsn is found, terminate the batch
|
||||
@return number of blocks for which the write request was queued */
|
||||
static ulint buf_do_flush_list_batch(ulint max_n, lsn_t lsn)
|
||||
static ulint buf_do_flush_list_batch(ulint max_n, lsn_t lsn) noexcept
|
||||
{
|
||||
ulint count= 0;
|
||||
ulint scanned= 0;
|
||||
|
|
@ -1513,7 +1519,7 @@ static ulint buf_do_flush_list_batch(ulint max_n, lsn_t lsn)
|
|||
}
|
||||
|
||||
/** Wait until a LRU flush batch ends. */
|
||||
void buf_flush_wait_LRU_batch_end()
|
||||
void buf_flush_wait_LRU_batch_end() noexcept
|
||||
{
|
||||
mysql_mutex_assert_owner(&buf_pool.flush_list_mutex);
|
||||
mysql_mutex_assert_not_owner(&buf_pool.mutex);
|
||||
|
|
@ -1539,7 +1545,7 @@ after releasing buf_pool.mutex.
|
|||
@return the number of processed pages
|
||||
@retval 0 if a buf_pool.flush_list batch is already running */
|
||||
static ulint buf_flush_list_holding_mutex(ulint max_n= ULINT_UNDEFINED,
|
||||
lsn_t lsn= LSN_MAX)
|
||||
lsn_t lsn= LSN_MAX) noexcept
|
||||
{
|
||||
ut_ad(lsn);
|
||||
mysql_mutex_assert_owner(&buf_pool.mutex);
|
||||
|
|
@ -1580,7 +1586,7 @@ nothing_to_do:
|
|||
@return the number of processed pages
|
||||
@retval 0 if a buf_pool.flush_list batch is already running */
|
||||
static ulint buf_flush_list(ulint max_n= ULINT_UNDEFINED,
|
||||
lsn_t lsn= LSN_MAX)
|
||||
lsn_t lsn= LSN_MAX) noexcept
|
||||
{
|
||||
mysql_mutex_lock(&buf_pool.mutex);
|
||||
ulint n= buf_flush_list_holding_mutex(max_n, lsn);
|
||||
|
|
@ -1593,7 +1599,7 @@ static ulint buf_flush_list(ulint max_n= ULINT_UNDEFINED,
|
|||
@param space tablespace
|
||||
@param n_flushed number of pages written
|
||||
@return whether the flush for some pages might not have been initiated */
|
||||
bool buf_flush_list_space(fil_space_t *space, ulint *n_flushed)
|
||||
bool buf_flush_list_space(fil_space_t *space, ulint *n_flushed) noexcept
|
||||
{
|
||||
const auto space_id= space->id;
|
||||
ut_ad(space_id < SRV_SPACE_ID_UPPER_BOUND);
|
||||
|
|
@ -1711,7 +1717,7 @@ The caller must invoke buf_dblwr.flush_buffered_writes()
|
|||
after releasing buf_pool.mutex.
|
||||
@param max_n wished maximum mumber of blocks flushed
|
||||
@return number of pages written */
|
||||
static ulint buf_flush_LRU(ulint max_n)
|
||||
static ulint buf_flush_LRU(ulint max_n) noexcept
|
||||
{
|
||||
mysql_mutex_assert_owner(&buf_pool.mutex);
|
||||
|
||||
|
|
@ -1925,7 +1931,7 @@ inline void log_t::write_checkpoint(lsn_t end_lsn) noexcept
|
|||
@param oldest_lsn the checkpoint LSN
|
||||
@param end_lsn log_sys.get_lsn()
|
||||
@return true if success, false if a checkpoint write was already running */
|
||||
static bool log_checkpoint_low(lsn_t oldest_lsn, lsn_t end_lsn)
|
||||
static bool log_checkpoint_low(lsn_t oldest_lsn, lsn_t end_lsn) noexcept
|
||||
{
|
||||
ut_ad(!srv_read_only_mode);
|
||||
ut_ad(log_sys.latch_have_wr());
|
||||
|
|
@ -1988,7 +1994,7 @@ modification in the pool, and writes information about the lsn in
|
|||
log file. Use log_make_checkpoint() to flush also the pool.
|
||||
@retval true if the checkpoint was or had been made
|
||||
@retval false if a checkpoint write was already running */
|
||||
static bool log_checkpoint()
|
||||
static bool log_checkpoint() noexcept
|
||||
{
|
||||
if (recv_recovery_is_on())
|
||||
recv_sys.apply(true);
|
||||
|
|
@ -2018,7 +2024,7 @@ ATTRIBUTE_COLD void log_make_checkpoint()
|
|||
|
||||
/** Wait for all dirty pages up to an LSN to be written out.
|
||||
NOTE: The calling thread is not allowed to hold any buffer page latches! */
|
||||
static void buf_flush_wait(lsn_t lsn)
|
||||
static void buf_flush_wait(lsn_t lsn) noexcept
|
||||
{
|
||||
ut_ad(lsn <= log_sys.get_lsn());
|
||||
|
||||
|
|
@ -2051,7 +2057,7 @@ static void buf_flush_wait(lsn_t lsn)
|
|||
|
||||
/** Wait until all persistent pages are flushed up to a limit.
|
||||
@param sync_lsn buf_pool.get_oldest_modification(LSN_MAX) to wait for */
|
||||
ATTRIBUTE_COLD void buf_flush_wait_flushed(lsn_t sync_lsn)
|
||||
ATTRIBUTE_COLD void buf_flush_wait_flushed(lsn_t sync_lsn) noexcept
|
||||
{
|
||||
ut_ad(sync_lsn);
|
||||
ut_ad(sync_lsn < LSN_MAX);
|
||||
|
|
@ -2112,7 +2118,7 @@ ATTRIBUTE_COLD void buf_flush_wait_flushed(lsn_t sync_lsn)
|
|||
/** Initiate more eager page flushing if the log checkpoint age is too old.
|
||||
@param lsn buf_pool.get_oldest_modification(LSN_MAX) target
|
||||
@param furious true=furious flushing, false=limit to innodb_io_capacity */
|
||||
ATTRIBUTE_COLD void buf_flush_ahead(lsn_t lsn, bool furious)
|
||||
ATTRIBUTE_COLD void buf_flush_ahead(lsn_t lsn, bool furious) noexcept
|
||||
{
|
||||
ut_ad(!srv_read_only_mode);
|
||||
|
||||
|
|
@ -2143,7 +2149,7 @@ ATTRIBUTE_COLD void buf_flush_ahead(lsn_t lsn, bool furious)
|
|||
and try to initiate checkpoints until the target is met.
|
||||
@param lsn minimum value of buf_pool.get_oldest_modification(LSN_MAX) */
|
||||
ATTRIBUTE_COLD ATTRIBUTE_NOINLINE
|
||||
static void buf_flush_sync_for_checkpoint(lsn_t lsn)
|
||||
static void buf_flush_sync_for_checkpoint(lsn_t lsn) noexcept
|
||||
{
|
||||
ut_ad(!srv_read_only_mode);
|
||||
mysql_mutex_assert_not_owner(&buf_pool.flush_list_mutex);
|
||||
|
|
@ -2232,7 +2238,7 @@ static void buf_flush_sync_for_checkpoint(lsn_t lsn)
|
|||
redo log capacity filled threshold.
|
||||
@param oldest_lsn buf_pool.get_oldest_modification()
|
||||
@return true if adaptive flushing is recommended. */
|
||||
static bool af_needed_for_redo(lsn_t oldest_lsn)
|
||||
static bool af_needed_for_redo(lsn_t oldest_lsn) noexcept
|
||||
{
|
||||
lsn_t age= (log_sys.get_lsn() - oldest_lsn);
|
||||
lsn_t af_lwm= static_cast<lsn_t>(srv_adaptive_flushing_lwm *
|
||||
|
|
@ -2284,7 +2290,7 @@ static ulint page_cleaner_flush_pages_recommendation(ulint last_pages_in,
|
|||
lsn_t oldest_lsn,
|
||||
double pct_lwm,
|
||||
ulint dirty_blocks,
|
||||
double dirty_pct)
|
||||
double dirty_pct) noexcept
|
||||
{
|
||||
static lsn_t prev_lsn = 0;
|
||||
static ulint sum_pages = 0;
|
||||
|
|
@ -2406,7 +2412,7 @@ func_exit:
|
|||
}
|
||||
|
||||
TPOOL_SUPPRESS_TSAN
|
||||
bool buf_pool_t::need_LRU_eviction() const
|
||||
bool buf_pool_t::need_LRU_eviction() const noexcept
|
||||
{
|
||||
/* try_LRU_scan==false means that buf_LRU_get_free_block() is waiting
|
||||
for buf_flush_page_cleaner() to evict some blocks */
|
||||
|
|
@ -2421,7 +2427,7 @@ __attribute__((optimize(0)))
|
|||
#endif
|
||||
/** page_cleaner thread tasked with flushing dirty pages from the buffer
|
||||
pools. As of now we'll have only one coordinator. */
|
||||
static void buf_flush_page_cleaner()
|
||||
static void buf_flush_page_cleaner() noexcept
|
||||
{
|
||||
my_thread_init();
|
||||
#ifdef UNIV_PFS_THREAD
|
||||
|
|
@ -2679,7 +2685,7 @@ static void buf_flush_page_cleaner()
|
|||
#endif
|
||||
}
|
||||
|
||||
ATTRIBUTE_COLD void buf_pool_t::LRU_warn()
|
||||
ATTRIBUTE_COLD void buf_pool_t::LRU_warn() noexcept
|
||||
{
|
||||
mysql_mutex_assert_owner(&mutex);
|
||||
try_LRU_scan= false;
|
||||
|
|
@ -2691,7 +2697,7 @@ ATTRIBUTE_COLD void buf_pool_t::LRU_warn()
|
|||
}
|
||||
|
||||
/** Initialize page_cleaner. */
|
||||
ATTRIBUTE_COLD void buf_flush_page_cleaner_init()
|
||||
ATTRIBUTE_COLD void buf_flush_page_cleaner_init() noexcept
|
||||
{
|
||||
ut_ad(!buf_page_cleaner_is_active);
|
||||
ut_ad(srv_operation <= SRV_OPERATION_EXPORT_RESTORED ||
|
||||
|
|
@ -2704,7 +2710,7 @@ ATTRIBUTE_COLD void buf_flush_page_cleaner_init()
|
|||
}
|
||||
|
||||
/** Flush the buffer pool on shutdown. */
|
||||
ATTRIBUTE_COLD void buf_flush_buffer_pool()
|
||||
ATTRIBUTE_COLD void buf_flush_buffer_pool() noexcept
|
||||
{
|
||||
ut_ad(!buf_page_cleaner_is_active);
|
||||
ut_ad(!buf_flush_sync_lsn);
|
||||
|
|
@ -2732,7 +2738,7 @@ ATTRIBUTE_COLD void buf_flush_buffer_pool()
|
|||
|
||||
/** Synchronously flush dirty blocks during recv_sys_t::apply().
|
||||
NOTE: The calling thread is not allowed to hold any buffer page latches! */
|
||||
void buf_flush_sync_batch(lsn_t lsn)
|
||||
void buf_flush_sync_batch(lsn_t lsn) noexcept
|
||||
{
|
||||
lsn= std::max(lsn, log_sys.get_lsn());
|
||||
mysql_mutex_lock(&buf_pool.flush_list_mutex);
|
||||
|
|
@ -2742,7 +2748,7 @@ void buf_flush_sync_batch(lsn_t lsn)
|
|||
|
||||
/** Synchronously flush dirty blocks.
|
||||
NOTE: The calling thread is not allowed to hold any buffer page latches! */
|
||||
void buf_flush_sync()
|
||||
void buf_flush_sync() noexcept
|
||||
{
|
||||
if (recv_recovery_is_on())
|
||||
{
|
||||
|
|
@ -2774,7 +2780,7 @@ void buf_flush_sync()
|
|||
#ifdef UNIV_DEBUG
|
||||
/** Functor to validate the flush list. */
|
||||
struct Check {
|
||||
void operator()(const buf_page_t* elem) const
|
||||
void operator()(const buf_page_t* elem) const noexcept
|
||||
{
|
||||
ut_ad(elem->oldest_modification());
|
||||
ut_ad(!fsp_is_system_temporary(elem->id().space()));
|
||||
|
|
@ -2782,7 +2788,7 @@ struct Check {
|
|||
};
|
||||
|
||||
/** Validate the flush list. */
|
||||
static void buf_flush_validate_low()
|
||||
static void buf_flush_validate_low() noexcept
|
||||
{
|
||||
buf_page_t* bpage;
|
||||
|
||||
|
|
@ -2811,7 +2817,7 @@ static void buf_flush_validate_low()
|
|||
}
|
||||
|
||||
/** Validate the flush list. */
|
||||
void buf_flush_validate()
|
||||
void buf_flush_validate() noexcept
|
||||
{
|
||||
mysql_mutex_lock(&buf_pool.flush_list_mutex);
|
||||
buf_flush_validate_low();
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ that the block has been replaced with the real block.
|
|||
@return w->state() */
|
||||
inline uint32_t buf_pool_t::watch_remove(buf_page_t *w,
|
||||
buf_pool_t::hash_chain &chain)
|
||||
noexcept
|
||||
{
|
||||
mysql_mutex_assert_owner(&buf_pool.mutex);
|
||||
ut_ad(xtest() || page_hash.lock_get(chain).is_write_locked());
|
||||
|
|
@ -95,7 +96,7 @@ and the lock released later.
|
|||
@retval NULL in case of an error */
|
||||
TRANSACTIONAL_TARGET
|
||||
static buf_page_t* buf_page_init_for_read(ulint mode, const page_id_t page_id,
|
||||
ulint zip_size, bool unzip)
|
||||
ulint zip_size, bool unzip) noexcept
|
||||
{
|
||||
mtr_t mtr;
|
||||
|
||||
|
|
@ -266,7 +267,7 @@ buf_read_page_low(
|
|||
ulint mode,
|
||||
const page_id_t page_id,
|
||||
ulint zip_size,
|
||||
bool unzip)
|
||||
bool unzip) noexcept
|
||||
{
|
||||
buf_page_t* bpage;
|
||||
|
||||
|
|
@ -357,7 +358,7 @@ wants to access
|
|||
pages, it may happen that the page at the given page number does not
|
||||
get read even if we return a positive value! */
|
||||
TRANSACTIONAL_TARGET
|
||||
ulint buf_read_ahead_random(const page_id_t page_id, bool ibuf)
|
||||
ulint buf_read_ahead_random(const page_id_t page_id, bool ibuf) noexcept
|
||||
{
|
||||
if (!srv_random_read_ahead || page_id.space() >= SRV_TMP_SPACE_ID)
|
||||
/* Disable the read-ahead for temporary tablespace */
|
||||
|
|
@ -447,7 +448,7 @@ read_ahead:
|
|||
return count;
|
||||
}
|
||||
|
||||
dberr_t buf_read_page(const page_id_t page_id, bool unzip)
|
||||
dberr_t buf_read_page(const page_id_t page_id, bool unzip) noexcept
|
||||
{
|
||||
fil_space_t *space= fil_space_t::get(page_id.space());
|
||||
if (UNIV_UNLIKELY(!space))
|
||||
|
|
@ -473,7 +474,7 @@ released by the i/o-handler thread.
|
|||
@param[in] page_id page id
|
||||
@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0 */
|
||||
void buf_read_page_background(fil_space_t *space, const page_id_t page_id,
|
||||
ulint zip_size)
|
||||
ulint zip_size) noexcept
|
||||
{
|
||||
buf_read_page_low(space, false, BUF_READ_ANY_PAGE,
|
||||
page_id, zip_size, false);
|
||||
|
|
@ -512,7 +513,7 @@ which could result in a deadlock if the OS does not support asynchronous io.
|
|||
@param[in] ibuf whether if we are inside ibuf routine
|
||||
@return number of page read requests issued */
|
||||
TRANSACTIONAL_TARGET
|
||||
ulint buf_read_ahead_linear(const page_id_t page_id, bool ibuf)
|
||||
ulint buf_read_ahead_linear(const page_id_t page_id, bool ibuf) noexcept
|
||||
{
|
||||
/* check if readahead is disabled.
|
||||
Disable the read ahead logic for temporary tablespace */
|
||||
|
|
@ -689,7 +690,7 @@ failed:
|
|||
@param recs log records
|
||||
@param init page initialization, or nullptr if the page needs to be read */
|
||||
void buf_read_recover(fil_space_t *space, const page_id_t page_id,
|
||||
page_recv_t &recs, recv_init *init)
|
||||
page_recv_t &recs, recv_init *init) noexcept
|
||||
{
|
||||
ut_ad(space->id == page_id.space());
|
||||
space->reacquire();
|
||||
|
|
|
|||
|
|
@ -1365,7 +1365,7 @@ the encryption parameters were changed
|
|||
@retval nullptr upon reaching the end of the iteration */
|
||||
inline fil_space_t *fil_system_t::default_encrypt_next(fil_space_t *space,
|
||||
bool recheck,
|
||||
bool encrypt)
|
||||
bool encrypt) noexcept
|
||||
{
|
||||
mysql_mutex_assert_owner(&mutex);
|
||||
|
||||
|
|
@ -1432,7 +1432,7 @@ encryption parameters were changed
|
|||
@retval fil_system.temp_space if there is no work to do
|
||||
@retval end() upon reaching the end of the iteration */
|
||||
space_list_t::iterator fil_space_t::next(space_list_t::iterator space,
|
||||
bool recheck, bool encrypt)
|
||||
bool recheck, bool encrypt) noexcept
|
||||
{
|
||||
mysql_mutex_lock(&fil_system.mutex);
|
||||
|
||||
|
|
@ -1481,7 +1481,7 @@ space_list_t::iterator fil_space_t::next(space_list_t::iterator space,
|
|||
static bool fil_crypt_find_space_to_rotate(
|
||||
key_state_t* key_state,
|
||||
rotate_thread_t* state,
|
||||
bool* recheck)
|
||||
bool* recheck) noexcept
|
||||
{
|
||||
/* we need iops to start rotating */
|
||||
do {
|
||||
|
|
|
|||
|
|
@ -74,6 +74,7 @@ ATTRIBUTE_COLD bool fil_space_t::set_corrupted() const noexcept
|
|||
@param print_info whether to diagnose why a file cannot be closed
|
||||
@return whether a file was closed */
|
||||
bool fil_space_t::try_to_close(fil_space_t *ignore_space, bool print_info)
|
||||
noexcept
|
||||
{
|
||||
mysql_mutex_assert_owner(&fil_system.mutex);
|
||||
for (fil_space_t &space : fil_system.space_list)
|
||||
|
|
@ -204,10 +205,7 @@ extern uint srv_fil_crypt_rotate_key_age;
|
|||
/******************************************************************//**
|
||||
Checks the consistency of the tablespace cache some of the time.
|
||||
@return true if ok or the check was skipped */
|
||||
static
|
||||
bool
|
||||
fil_validate_skip(void)
|
||||
/*===================*/
|
||||
static bool fil_validate_skip() noexcept
|
||||
{
|
||||
/** The fil_validate() call skip counter. */
|
||||
static Atomic_counter<uint32_t> fil_validate_count;
|
||||
|
|
@ -234,7 +232,7 @@ or the caller should be in single-threaded crash recovery mode
|
|||
Normally, fil_space_t::get() should be used instead.
|
||||
@param[in] id tablespace ID
|
||||
@return tablespace, or NULL if not found */
|
||||
fil_space_t *fil_space_get(uint32_t id)
|
||||
fil_space_t *fil_space_get(uint32_t id) noexcept
|
||||
{
|
||||
mysql_mutex_lock(&fil_system.mutex);
|
||||
fil_space_t *space= fil_space_get_by_id(id);
|
||||
|
|
@ -245,7 +243,7 @@ fil_space_t *fil_space_get(uint32_t id)
|
|||
/** Check if the compression algorithm is loaded
|
||||
@param[in] comp_algo ulint compression algorithm
|
||||
@return whether the compression algorithm is loaded */
|
||||
bool fil_comp_algo_loaded(ulint comp_algo)
|
||||
bool fil_comp_algo_loaded(ulint comp_algo) noexcept
|
||||
{
|
||||
switch (comp_algo) {
|
||||
case PAGE_UNCOMPRESSED:
|
||||
|
|
@ -282,7 +280,7 @@ or UINT32_MAX for unlimited
|
|||
@return file object */
|
||||
fil_node_t* fil_space_t::add(const char* name, pfs_os_file_t handle,
|
||||
uint32_t size, bool is_raw, bool atomic_write,
|
||||
uint32_t max_pages)
|
||||
uint32_t max_pages) noexcept
|
||||
{
|
||||
mysql_mutex_assert_owner(&fil_system.mutex);
|
||||
|
||||
|
|
@ -464,7 +462,7 @@ static bool fil_node_open_file(fil_node_t *node, const byte *page, bool no_lsn)
|
|||
}
|
||||
|
||||
/** Close the file handle. */
|
||||
void fil_node_t::close()
|
||||
void fil_node_t::close() noexcept
|
||||
{
|
||||
prepare_to_close_or_detach();
|
||||
|
||||
|
|
@ -474,7 +472,7 @@ void fil_node_t::close()
|
|||
handle= OS_FILE_CLOSED;
|
||||
}
|
||||
|
||||
pfs_os_file_t fil_node_t::detach()
|
||||
pfs_os_file_t fil_node_t::detach() noexcept
|
||||
{
|
||||
prepare_to_close_or_detach();
|
||||
|
||||
|
|
@ -483,7 +481,7 @@ pfs_os_file_t fil_node_t::detach()
|
|||
return result;
|
||||
}
|
||||
|
||||
void fil_node_t::prepare_to_close_or_detach()
|
||||
void fil_node_t::prepare_to_close_or_detach() noexcept
|
||||
{
|
||||
mysql_mutex_assert_owner(&fil_system.mutex);
|
||||
ut_ad(space->is_ready_to_close() || srv_operation == SRV_OPERATION_BACKUP ||
|
||||
|
|
@ -498,7 +496,7 @@ void fil_node_t::prepare_to_close_or_detach()
|
|||
}
|
||||
|
||||
/** Flush any writes cached by the file system. */
|
||||
void fil_space_t::flush_low()
|
||||
void fil_space_t::flush_low() noexcept
|
||||
{
|
||||
mysql_mutex_assert_not_owner(&fil_system.mutex);
|
||||
|
||||
|
|
@ -554,7 +552,7 @@ fil_space_extend_must_retry(
|
|||
fil_space_t* space,
|
||||
fil_node_t* node,
|
||||
uint32_t size,
|
||||
bool* success)
|
||||
bool* success) noexcept
|
||||
{
|
||||
mysql_mutex_assert_owner(&fil_system.mutex);
|
||||
ut_ad(UT_LIST_GET_LAST(space->chain) == node);
|
||||
|
|
@ -662,7 +660,7 @@ fil_space_extend_must_retry(
|
|||
}
|
||||
|
||||
/** @return whether the file is usable for io() */
|
||||
ATTRIBUTE_COLD bool fil_space_t::prepare_acquired()
|
||||
ATTRIBUTE_COLD bool fil_space_t::prepare_acquired() noexcept
|
||||
{
|
||||
ut_ad(referenced());
|
||||
mysql_mutex_assert_owner(&fil_system.mutex);
|
||||
|
|
@ -714,7 +712,7 @@ clear:
|
|||
}
|
||||
|
||||
/** @return whether the file is usable for io() */
|
||||
ATTRIBUTE_COLD bool fil_space_t::acquire_and_prepare()
|
||||
ATTRIBUTE_COLD bool fil_space_t::acquire_and_prepare() noexcept
|
||||
{
|
||||
mysql_mutex_lock(&fil_system.mutex);
|
||||
const auto flags= acquire_low() & (STOPPING | CLOSING);
|
||||
|
|
@ -727,7 +725,7 @@ ATTRIBUTE_COLD bool fil_space_t::acquire_and_prepare()
|
|||
@param[in,out] space tablespace
|
||||
@param[in] size desired size in pages
|
||||
@return whether the tablespace is at least as big as requested */
|
||||
bool fil_space_extend(fil_space_t *space, uint32_t size)
|
||||
bool fil_space_extend(fil_space_t *space, uint32_t size) noexcept
|
||||
{
|
||||
ut_ad(!srv_read_only_mode || space->is_temporary());
|
||||
bool success= false;
|
||||
|
|
@ -744,7 +742,7 @@ bool fil_space_extend(fil_space_t *space, uint32_t size)
|
|||
}
|
||||
|
||||
/** Prepare to free a file from fil_system. */
|
||||
inline pfs_os_file_t fil_node_t::close_to_free(bool detach_handle)
|
||||
inline pfs_os_file_t fil_node_t::close_to_free(bool detach_handle) noexcept
|
||||
{
|
||||
mysql_mutex_assert_owner(&fil_system.mutex);
|
||||
ut_a(!being_extended);
|
||||
|
|
@ -791,6 +789,7 @@ inline pfs_os_file_t fil_node_t::close_to_free(bool detach_handle)
|
|||
@return detached handle
|
||||
@retval OS_FILE_CLOSED if no handle was detached */
|
||||
pfs_os_file_t fil_system_t::detach(fil_space_t *space, bool detach_handle)
|
||||
noexcept
|
||||
{
|
||||
mysql_mutex_assert_owner(&fil_system.mutex);
|
||||
spaces.cell_get(space->id)->remove(*space, &fil_space_t::hash);
|
||||
|
|
@ -856,10 +855,7 @@ pfs_os_file_t fil_system_t::detach(fil_space_t *space, bool detach_handle)
|
|||
/** Free a tablespace object on which fil_system_t::detach() was invoked.
|
||||
There must not be any pending i/o's or flushes on the files.
|
||||
@param[in,out] space tablespace */
|
||||
static
|
||||
void
|
||||
fil_space_free_low(
|
||||
fil_space_t* space)
|
||||
static void fil_space_free_low(fil_space_t *space) noexcept
|
||||
{
|
||||
/* The tablespace must not be in fil_system.named_spaces. */
|
||||
ut_ad(srv_fast_shutdown == 2 || !srv_was_started
|
||||
|
|
@ -895,7 +891,7 @@ There must not be any pending i/o's or flushes on the files.
|
|||
@param id tablespace identifier
|
||||
@param x_latched whether the caller holds exclusive fil_space_t::latch
|
||||
@return true if success */
|
||||
bool fil_space_free(uint32_t id, bool x_latched)
|
||||
bool fil_space_free(uint32_t id, bool x_latched) noexcept
|
||||
{
|
||||
ut_ad(id != TRX_SYS_SPACE);
|
||||
|
||||
|
|
@ -1022,7 +1018,7 @@ Assigns a new space id for a new single-table tablespace. This works simply by
|
|||
incrementing the global counter. If 4 billion id's is not enough, we may need
|
||||
to recycle id's.
|
||||
@return true if assigned, false if not */
|
||||
bool fil_assign_new_space_id(uint32_t *space_id)
|
||||
bool fil_assign_new_space_id(uint32_t *space_id) noexcept
|
||||
{
|
||||
uint32_t id = *space_id;
|
||||
bool success;
|
||||
|
|
@ -1089,7 +1085,7 @@ bool fil_space_t::read_page0(const byte *dpage, bool no_lsn) noexcept
|
|||
}
|
||||
|
||||
void fil_space_set_recv_size_and_flags(uint32_t id, uint32_t size,
|
||||
uint32_t flags)
|
||||
uint32_t flags) noexcept
|
||||
{
|
||||
ut_ad(id < SRV_SPACE_ID_UPPER_BOUND);
|
||||
mysql_mutex_assert_owner(&recv_sys.mutex);
|
||||
|
|
@ -1268,7 +1264,7 @@ void fil_system_t::create(ulint hash_size)
|
|||
#endif
|
||||
}
|
||||
|
||||
void fil_system_t::close()
|
||||
void fil_system_t::close() noexcept
|
||||
{
|
||||
ut_ad(this == &fil_system);
|
||||
ut_a(unflushed_spaces.empty());
|
||||
|
|
@ -1292,7 +1288,7 @@ void fil_system_t::close()
|
|||
#endif /* __linux__ */
|
||||
}
|
||||
|
||||
void fil_system_t::add_opened_last_to_space_list(fil_space_t *space)
|
||||
void fil_system_t::add_opened_last_to_space_list(fil_space_t *space) noexcept
|
||||
{
|
||||
if (UNIV_LIKELY(space_list_last_opened != nullptr))
|
||||
space_list.insert(++space_list_t::iterator(space_list_last_opened), *space);
|
||||
|
|
@ -1302,7 +1298,7 @@ void fil_system_t::add_opened_last_to_space_list(fil_space_t *space)
|
|||
}
|
||||
|
||||
/** Extend all open data files to the recovered size */
|
||||
ATTRIBUTE_COLD void fil_system_t::extend_to_recv_size()
|
||||
ATTRIBUTE_COLD void fil_system_t::extend_to_recv_size() noexcept
|
||||
{
|
||||
ut_ad(is_initialised());
|
||||
mysql_mutex_lock(&mutex);
|
||||
|
|
@ -1328,7 +1324,7 @@ ATTRIBUTE_COLD void fil_system_t::extend_to_recv_size()
|
|||
}
|
||||
|
||||
/** Close all tablespace files at shutdown */
|
||||
void fil_space_t::close_all()
|
||||
void fil_space_t::close_all() noexcept
|
||||
{
|
||||
if (!fil_system.is_initialised())
|
||||
return;
|
||||
|
|
@ -1390,7 +1386,7 @@ void fil_space_t::close_all()
|
|||
/*******************************************************************//**
|
||||
Sets the max tablespace id counter if the given number is bigger than the
|
||||
previous value. */
|
||||
void fil_set_max_space_id_if_bigger(uint32_t max_id)
|
||||
void fil_set_max_space_id_if_bigger(uint32_t max_id) noexcept
|
||||
{
|
||||
ut_a(max_id < SRV_SPACE_ID_UPPER_BOUND);
|
||||
|
||||
|
|
@ -1408,7 +1404,7 @@ void fil_set_max_space_id_if_bigger(uint32_t max_id)
|
|||
@param id tablespace identifier
|
||||
@return tablespace
|
||||
@retval nullptr if the tablespace is missing or inaccessible */
|
||||
fil_space_t *fil_space_t::get(uint32_t id)
|
||||
fil_space_t *fil_space_t::get(uint32_t id) noexcept
|
||||
{
|
||||
mysql_mutex_lock(&fil_system.mutex);
|
||||
fil_space_t *space= fil_space_get_by_id(id);
|
||||
|
|
@ -1607,7 +1603,7 @@ fil_space_t *fil_space_t::drop(uint32_t id, pfs_os_file_t *detached_handle)
|
|||
/** Close a single-table tablespace on failed IMPORT TABLESPACE.
|
||||
The tablespace must be cached in the memory cache.
|
||||
Free all pages used by the tablespace. */
|
||||
void fil_close_tablespace(uint32_t id)
|
||||
void fil_close_tablespace(uint32_t id) noexcept
|
||||
{
|
||||
ut_ad(!is_system_tablespace(id));
|
||||
fil_space_t* space = fil_space_t::drop(id, nullptr);
|
||||
|
|
@ -1639,7 +1635,7 @@ void fil_close_tablespace(uint32_t id)
|
|||
@param id tablespace identifier
|
||||
@return detached file handle (to be closed by the caller)
|
||||
@return OS_FILE_CLOSED if no file existed */
|
||||
pfs_os_file_t fil_delete_tablespace(uint32_t id)
|
||||
pfs_os_file_t fil_delete_tablespace(uint32_t id) noexcept
|
||||
{
|
||||
ut_ad(!is_system_tablespace(id));
|
||||
pfs_os_file_t handle= OS_FILE_CLOSED;
|
||||
|
|
@ -1648,17 +1644,9 @@ pfs_os_file_t fil_delete_tablespace(uint32_t id)
|
|||
return handle;
|
||||
}
|
||||
|
||||
/*******************************************************************//**
|
||||
Allocates and builds a file name from a path, a table or tablespace name
|
||||
and a suffix. The string must be freed by caller with ut_free().
|
||||
@param[in] path nullptr or the directory path or the full path and filename
|
||||
@param[in] name {} if path is full, or Table/Tablespace name
|
||||
@param[in] extension the file extension to use
|
||||
@param[in] trim_name true if the last name on the path should be trimmed
|
||||
@return own: file name */
|
||||
char* fil_make_filepath_low(const char *path,
|
||||
const fil_space_t::name_type &name,
|
||||
ib_extention extension, bool trim_name)
|
||||
ib_extention extension, bool trim_name) noexcept
|
||||
{
|
||||
/* The path may contain the basename of the file, if so we do not
|
||||
need the name. If the path is NULL, we can use the default path,
|
||||
|
|
@ -1752,7 +1740,7 @@ char* fil_make_filepath_low(const char *path,
|
|||
}
|
||||
|
||||
char *fil_make_filepath(const char* path, const table_name_t name,
|
||||
ib_extention suffix, bool strip_name)
|
||||
ib_extention suffix, bool strip_name) noexcept
|
||||
{
|
||||
return fil_make_filepath_low(path, {name.m_name, strlen(name.m_name)},
|
||||
suffix, strip_name);
|
||||
|
|
@ -1761,12 +1749,12 @@ char *fil_make_filepath(const char* path, const table_name_t name,
|
|||
/** Wrapper function over fil_make_filepath_low() to build directory name.
|
||||
@param path the directory path or the full path and filename
|
||||
@return own: directory name */
|
||||
static inline char *fil_make_dirpath(const char *path)
|
||||
static inline char *fil_make_dirpath(const char *path) noexcept
|
||||
{
|
||||
return fil_make_filepath_low(path, fil_space_t::name_type{}, NO_EXT, true);
|
||||
}
|
||||
|
||||
dberr_t fil_space_t::rename(const char *path, bool log, bool replace)
|
||||
dberr_t fil_space_t::rename(const char *path, bool log, bool replace) noexcept
|
||||
{
|
||||
ut_ad(UT_LIST_GET_LEN(chain) == 1);
|
||||
ut_ad(!is_predefined_tablespace(id));
|
||||
|
|
@ -2371,6 +2359,7 @@ fil_ibd_discover(
|
|||
}
|
||||
|
||||
bool fil_crypt_check(fil_space_crypt_t *crypt_data, const char *f_name)
|
||||
noexcept
|
||||
{
|
||||
if (crypt_data->is_key_found())
|
||||
return true;
|
||||
|
|
@ -2394,7 +2383,7 @@ of the file in validate_for_recovery().
|
|||
@param[out] space the tablespace, or NULL on error
|
||||
@return status of the operation */
|
||||
enum fil_load_status
|
||||
fil_ibd_load(uint32_t space_id, const char *filename, fil_space_t *&space)
|
||||
fil_ibd_load(uint32_t space_id, const char *filename, fil_space_t *&space) noexcept
|
||||
{
|
||||
/* If the a space is already in the file system cache with this
|
||||
space ID, then there is nothing to do. */
|
||||
|
|
@ -2599,7 +2588,7 @@ startup, there may be many tablespaces which are not yet in the memory cache.
|
|||
@return the tablespace
|
||||
@retval NULL if no matching tablespace exists in the memory cache */
|
||||
fil_space_t *fil_space_for_table_exists_in_mem(uint32_t id,
|
||||
uint32_t table_flags)
|
||||
uint32_t table_flags) noexcept
|
||||
{
|
||||
const uint32_t expected_flags = dict_tf_to_fsp_flags(table_flags);
|
||||
|
||||
|
|
@ -2636,7 +2625,7 @@ func_exit:
|
|||
ATTRIBUTE_COLD
|
||||
static void fil_invalid_page_access_msg(const char *name,
|
||||
os_offset_t offset, ulint len,
|
||||
bool is_read)
|
||||
bool is_read) noexcept
|
||||
{
|
||||
sql_print_error("%s %zu bytes at " UINT64PF
|
||||
" outside the bounds of the file: %s",
|
||||
|
|
@ -2648,7 +2637,7 @@ static void fil_invalid_page_access_msg(const char *name,
|
|||
}
|
||||
|
||||
/** Update the data structures on write completion */
|
||||
inline void fil_node_t::complete_write()
|
||||
inline void fil_node_t::complete_write() noexcept
|
||||
{
|
||||
mysql_mutex_assert_not_owner(&fil_system.mutex);
|
||||
|
||||
|
|
@ -2674,7 +2663,7 @@ inline void fil_node_t::complete_write()
|
|||
@param bpage buffer block (for type.is_async() completion callback)
|
||||
@return status and file descriptor */
|
||||
fil_io_t fil_space_t::io(const IORequest &type, os_offset_t offset, size_t len,
|
||||
void *buf, buf_page_t *bpage)
|
||||
void *buf, buf_page_t *bpage) noexcept
|
||||
{
|
||||
ut_ad(referenced());
|
||||
ut_ad(offset % UNIV_ZIP_SIZE_MIN == 0);
|
||||
|
|
@ -2776,7 +2765,7 @@ func_exit:
|
|||
|
||||
#include <tpool.h>
|
||||
|
||||
void IORequest::write_complete(int io_error) const
|
||||
void IORequest::write_complete(int io_error) const noexcept
|
||||
{
|
||||
ut_ad(fil_validate_skip());
|
||||
ut_ad(node);
|
||||
|
|
@ -2797,7 +2786,7 @@ void IORequest::write_complete(int io_error) const
|
|||
node->space->release();
|
||||
}
|
||||
|
||||
void IORequest::read_complete(int io_error) const
|
||||
void IORequest::read_complete(int io_error) const noexcept
|
||||
{
|
||||
ut_ad(fil_validate_skip());
|
||||
ut_ad(node);
|
||||
|
|
@ -2832,7 +2821,7 @@ void IORequest::read_complete(int io_error) const
|
|||
|
||||
/** Flush to disk the writes in file spaces of the given type
|
||||
possibly cached by the OS. */
|
||||
void fil_flush_file_spaces()
|
||||
void fil_flush_file_spaces() noexcept
|
||||
{
|
||||
if (srv_file_flush_method == SRV_O_DIRECT_NO_FSYNC)
|
||||
{
|
||||
|
|
@ -2872,7 +2861,7 @@ struct Check {
|
|||
|
||||
/** Visit a file node
|
||||
@param[in] elem file node to visit */
|
||||
void operator()(const fil_node_t* elem)
|
||||
void operator()(const fil_node_t* elem) noexcept
|
||||
{
|
||||
n_open += elem->is_open();
|
||||
size += elem->size;
|
||||
|
|
@ -2881,7 +2870,7 @@ struct Check {
|
|||
/** Validate a tablespace.
|
||||
@param[in] space tablespace to validate
|
||||
@return number of open file nodes */
|
||||
static ulint validate(const fil_space_t* space)
|
||||
static ulint validate(const fil_space_t* space) noexcept
|
||||
{
|
||||
mysql_mutex_assert_owner(&fil_system.mutex);
|
||||
Check check;
|
||||
|
|
@ -2908,7 +2897,7 @@ struct Check {
|
|||
/******************************************************************//**
|
||||
Checks the consistency of the tablespace cache.
|
||||
@return true if ok */
|
||||
bool fil_validate()
|
||||
bool fil_validate() noexcept
|
||||
{
|
||||
ulint n_open = 0;
|
||||
|
||||
|
|
@ -2925,24 +2914,11 @@ bool fil_validate()
|
|||
return(true);
|
||||
}
|
||||
|
||||
/*********************************************************************//**
|
||||
Sets the file page type. */
|
||||
void
|
||||
fil_page_set_type(
|
||||
/*==============*/
|
||||
byte* page, /*!< in/out: file page */
|
||||
ulint type) /*!< in: type */
|
||||
{
|
||||
ut_ad(page);
|
||||
|
||||
mach_write_to_2(page + FIL_PAGE_TYPE, type);
|
||||
}
|
||||
|
||||
/********************************************************************//**
|
||||
Delete the tablespace file and any related files like .cfg.
|
||||
This should not be called for temporary tables.
|
||||
@param[in] ibd_filepath File path of the IBD tablespace */
|
||||
void fil_delete_file(const char *ibd_filepath)
|
||||
void fil_delete_file(const char *ibd_filepath) noexcept
|
||||
{
|
||||
ib::info() << "Deleting " << ibd_filepath;
|
||||
os_file_delete_if_exists(innodb_data_file_key, ibd_filepath, nullptr);
|
||||
|
|
@ -2960,9 +2936,7 @@ void fil_delete_file(const char *ibd_filepath)
|
|||
/** Check that a tablespace is valid for mtr_commit().
|
||||
@param[in] space persistent tablespace that has been changed */
|
||||
static
|
||||
void
|
||||
fil_space_validate_for_mtr_commit(
|
||||
const fil_space_t* space)
|
||||
void fil_space_validate_for_mtr_commit(const fil_space_t *space) noexcept
|
||||
{
|
||||
mysql_mutex_assert_not_owner(&fil_system.mutex);
|
||||
ut_ad(space != NULL);
|
||||
|
|
@ -2979,9 +2953,7 @@ fil_space_validate_for_mtr_commit(
|
|||
/** Note that a non-predefined persistent tablespace has been modified
|
||||
by redo log.
|
||||
@param[in,out] space tablespace */
|
||||
void
|
||||
fil_names_dirty(
|
||||
fil_space_t* space)
|
||||
void fil_names_dirty(fil_space_t *space) noexcept
|
||||
{
|
||||
ut_ad(log_sys.latch_have_wr());
|
||||
ut_ad(recv_recovery_is_on());
|
||||
|
|
@ -2995,7 +2967,7 @@ fil_names_dirty(
|
|||
|
||||
/** Write a FILE_MODIFY record when a non-predefined persistent
|
||||
tablespace was modified for the first time since fil_names_clear(). */
|
||||
ATTRIBUTE_NOINLINE ATTRIBUTE_COLD void mtr_t::name_write()
|
||||
ATTRIBUTE_NOINLINE ATTRIBUTE_COLD void mtr_t::name_write() noexcept
|
||||
{
|
||||
ut_ad(log_sys.latch_have_wr());
|
||||
ut_d(fil_space_validate_for_mtr_commit(m_user_space));
|
||||
|
|
@ -3017,7 +2989,7 @@ ATTRIBUTE_NOINLINE ATTRIBUTE_COLD void mtr_t::name_write()
|
|||
and write out FILE_MODIFY if needed, and write FILE_CHECKPOINT.
|
||||
@param lsn checkpoint LSN
|
||||
@return current LSN */
|
||||
ATTRIBUTE_COLD lsn_t fil_names_clear(lsn_t lsn)
|
||||
ATTRIBUTE_COLD lsn_t fil_names_clear(lsn_t lsn) noexcept
|
||||
{
|
||||
mtr_t mtr;
|
||||
|
||||
|
|
@ -3114,6 +3086,7 @@ test_make_filepath()
|
|||
@param[in] offset page number
|
||||
@return block size */
|
||||
ulint fil_space_get_block_size(const fil_space_t *space, unsigned offset)
|
||||
noexcept
|
||||
{
|
||||
ulint block_size = 512;
|
||||
|
||||
|
|
@ -3138,7 +3111,7 @@ ulint fil_space_get_block_size(const fil_space_t *space, unsigned offset)
|
|||
}
|
||||
|
||||
/** @return the tablespace name (databasename/tablename) */
|
||||
fil_space_t::name_type fil_space_t::name() const
|
||||
fil_space_t::name_type fil_space_t::name() const noexcept
|
||||
{
|
||||
switch (id) {
|
||||
case 0:
|
||||
|
|
@ -3176,7 +3149,7 @@ fil_space_t::name_type fil_space_t::name() const
|
|||
|
||||
#ifdef UNIV_DEBUG
|
||||
|
||||
fil_space_t *fil_space_t::next_in_space_list()
|
||||
fil_space_t *fil_space_t::next_in_space_list() noexcept
|
||||
{
|
||||
space_list_t::iterator it(this);
|
||||
auto end= fil_system.space_list.end();
|
||||
|
|
@ -3186,7 +3159,7 @@ fil_space_t *fil_space_t::next_in_space_list()
|
|||
return it == end ? nullptr : &*it;
|
||||
}
|
||||
|
||||
fil_space_t *fil_space_t::prev_in_space_list()
|
||||
fil_space_t *fil_space_t::prev_in_space_list() noexcept
|
||||
{
|
||||
space_list_t::iterator it(this);
|
||||
if (it == fil_system.space_list.begin())
|
||||
|
|
@ -3195,7 +3168,7 @@ fil_space_t *fil_space_t::prev_in_space_list()
|
|||
return &*it;
|
||||
}
|
||||
|
||||
fil_space_t *fil_space_t::next_in_unflushed_spaces()
|
||||
fil_space_t *fil_space_t::next_in_unflushed_spaces() noexcept
|
||||
{
|
||||
sized_ilist<fil_space_t, unflushed_spaces_tag_t>::iterator it(this);
|
||||
auto end= fil_system.unflushed_spaces.end();
|
||||
|
|
@ -3205,7 +3178,7 @@ fil_space_t *fil_space_t::next_in_unflushed_spaces()
|
|||
return it == end ? nullptr : &*it;
|
||||
}
|
||||
|
||||
fil_space_t *fil_space_t::prev_in_unflushed_spaces()
|
||||
fil_space_t *fil_space_t::prev_in_unflushed_spaces() noexcept
|
||||
{
|
||||
sized_ilist<fil_space_t, unflushed_spaces_tag_t>::iterator it(this);
|
||||
if (it == fil_system.unflushed_spaces.begin())
|
||||
|
|
|
|||
|
|
@ -2290,14 +2290,12 @@ void
|
|||
innobase_mysql_print_thd(
|
||||
/*=====================*/
|
||||
FILE* f, /*!< in: output stream */
|
||||
THD* thd, /*!< in: MySQL THD object */
|
||||
uint max_query_len) /*!< in: max query length to print, or 0 to
|
||||
use the default max length */
|
||||
THD* thd) /*!< in: MySQL THD object */
|
||||
{
|
||||
char buffer[1024];
|
||||
char buffer[3072];
|
||||
|
||||
fputs(thd_get_error_context_description(thd, buffer, sizeof buffer,
|
||||
max_query_len), f);
|
||||
0), f);
|
||||
putc('\n', f);
|
||||
}
|
||||
|
||||
|
|
@ -13735,7 +13733,6 @@ int ha_innobase::delete_table(const char *name)
|
|||
if (err != DB_SUCCESS)
|
||||
{
|
||||
err_exit:
|
||||
trx->dict_operation_lock_mode= false;
|
||||
trx->rollback();
|
||||
switch (err) {
|
||||
case DB_CANNOT_DROP_CONSTRAINT:
|
||||
|
|
@ -13757,7 +13754,7 @@ err_exit:
|
|||
dict_table_close(table_stats, true, thd, mdl_table);
|
||||
if (index_stats)
|
||||
dict_table_close(index_stats, true, thd, mdl_index);
|
||||
dict_sys.unlock();
|
||||
row_mysql_unlock_data_dictionary(trx);
|
||||
if (trx != parent_trx)
|
||||
trx->free();
|
||||
DBUG_RETURN(convert_error_code_to_mysql(err, 0, NULL));
|
||||
|
|
@ -21441,9 +21438,7 @@ void ins_node_t::vers_update_end(row_prebuilt_t *prebuilt, bool history_row)
|
|||
if needed.
|
||||
@param[in] size size in bytes
|
||||
@return aligned size */
|
||||
ulint
|
||||
buf_pool_size_align(
|
||||
ulint size)
|
||||
ulint buf_pool_size_align(ulint size) noexcept
|
||||
{
|
||||
const size_t m = srv_buf_pool_chunk_unit;
|
||||
size = ut_max(size, (size_t) MYSQL_SYSVAR_NAME(buffer_pool_size).min_val);
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -76,30 +76,30 @@ class buf_dblwr_t
|
|||
|
||||
/** Initialise the persistent storage of the doublewrite buffer.
|
||||
@param header doublewrite page header in the TRX_SYS page */
|
||||
inline void init(const byte *header);
|
||||
inline void init(const byte *header) noexcept;
|
||||
|
||||
/** Flush possible buffered writes to persistent storage. */
|
||||
bool flush_buffered_writes(const ulint size);
|
||||
bool flush_buffered_writes(const ulint size) noexcept;
|
||||
|
||||
public:
|
||||
/** Initialise the doublewrite buffer data structures. */
|
||||
void init();
|
||||
void init() noexcept;
|
||||
/** Create or restore the doublewrite buffer in the TRX_SYS page.
|
||||
@return whether the operation succeeded */
|
||||
bool create();
|
||||
bool create() noexcept;
|
||||
/** Free the doublewrite buffer. */
|
||||
void close();
|
||||
void close() noexcept;
|
||||
|
||||
/** Acquire the mutex */
|
||||
void lock() { mysql_mutex_lock(&mutex); }
|
||||
void lock() noexcept { mysql_mutex_lock(&mutex); }
|
||||
/** @return the number of completed batches */
|
||||
ulint batches() const
|
||||
ulint batches() const noexcept
|
||||
{ mysql_mutex_assert_owner(&mutex); return writes_completed; }
|
||||
/** @return the number of final pages written */
|
||||
ulint written() const
|
||||
ulint written() const noexcept
|
||||
{ mysql_mutex_assert_owner(&mutex); return pages_written; }
|
||||
/** Release the mutex */
|
||||
void unlock() { mysql_mutex_unlock(&mutex); }
|
||||
void unlock() noexcept { mysql_mutex_unlock(&mutex); }
|
||||
|
||||
/** Initialize the doublewrite buffer memory structure on recovery.
|
||||
If we are upgrading from a version before MySQL 4.1, then this
|
||||
|
|
@ -110,37 +110,37 @@ public:
|
|||
@param file File handle
|
||||
@param path Path name of file
|
||||
@return DB_SUCCESS or error code */
|
||||
dberr_t init_or_load_pages(pfs_os_file_t file, const char *path);
|
||||
dberr_t init_or_load_pages(pfs_os_file_t file, const char *path) noexcept;
|
||||
|
||||
/** Process and remove the double write buffer pages for all tablespaces. */
|
||||
void recover();
|
||||
void recover() noexcept;
|
||||
|
||||
/** Update the doublewrite buffer on data page write completion. */
|
||||
void write_completed();
|
||||
void write_completed() noexcept;
|
||||
/** Flush possible buffered writes to persistent storage.
|
||||
It is very important to call this function after a batch of writes has been
|
||||
posted, and also when we may have to wait for a page latch!
|
||||
Otherwise a deadlock of threads can occur. */
|
||||
void flush_buffered_writes();
|
||||
void flush_buffered_writes() noexcept;
|
||||
/** Update the doublewrite buffer on write batch completion
|
||||
@param request the completed batch write request */
|
||||
void flush_buffered_writes_completed(const IORequest &request);
|
||||
void flush_buffered_writes_completed(const IORequest &request) noexcept;
|
||||
|
||||
/** Size of the doublewrite block in pages */
|
||||
uint32_t block_size() const { return FSP_EXTENT_SIZE; }
|
||||
uint32_t block_size() const noexcept { return FSP_EXTENT_SIZE; }
|
||||
|
||||
/** Schedule a page write. If the doublewrite memory buffer is full,
|
||||
flush_buffered_writes() will be invoked to make space.
|
||||
@param request asynchronous write request
|
||||
@param size payload size in bytes */
|
||||
void add_to_batch(const IORequest &request, size_t size);
|
||||
void add_to_batch(const IORequest &request, size_t size) noexcept;
|
||||
|
||||
/** Determine whether the doublewrite buffer has been created */
|
||||
bool is_created() const
|
||||
bool is_created() const noexcept
|
||||
{ return UNIV_LIKELY(block1 != page_id_t(0, 0)); }
|
||||
|
||||
/** @return whether a page identifier is part of the doublewrite buffer */
|
||||
bool is_inside(const page_id_t id) const
|
||||
bool is_inside(const page_id_t id) const noexcept
|
||||
{
|
||||
if (!is_created())
|
||||
return false;
|
||||
|
|
@ -152,7 +152,7 @@ public:
|
|||
}
|
||||
|
||||
/** Wait for flush_buffered_writes() to be fully completed */
|
||||
void wait_flush_buffered_writes()
|
||||
void wait_flush_buffered_writes() noexcept
|
||||
{
|
||||
mysql_mutex_lock(&mutex);
|
||||
while (batch_running)
|
||||
|
|
|
|||
|
|
@ -44,27 +44,22 @@ deleting the data file of that tablespace.
|
|||
The pages still remain a part of LRU and are evicted from
|
||||
the list as they age towards the tail of the LRU.
|
||||
@param id tablespace identifier */
|
||||
void buf_flush_remove_pages(uint32_t id);
|
||||
void buf_flush_remove_pages(uint32_t id) noexcept;
|
||||
|
||||
/*******************************************************************//**
|
||||
Relocates a buffer control block on the flush_list.
|
||||
Note that it is assumed that the contents of bpage has already been
|
||||
copied to dpage. */
|
||||
/** Relocate a buffer control block in buf_pool.flush_list.
|
||||
@param bpage control block being moved
|
||||
@param dpage destination block; the page contents has already been copied */
|
||||
ATTRIBUTE_COLD
|
||||
void
|
||||
buf_flush_relocate_on_flush_list(
|
||||
/*=============================*/
|
||||
buf_page_t* bpage, /*!< in/out: control block being moved */
|
||||
buf_page_t* dpage); /*!< in/out: destination block */
|
||||
|
||||
void buf_flush_relocate_on_flush_list(buf_page_t *bpage, buf_page_t *dpage)
|
||||
noexcept;
|
||||
/** Complete write of a file page from buf_pool.
|
||||
@param request write request
|
||||
@param error whether the write may have failed */
|
||||
void buf_page_write_complete(const IORequest &request, bool error);
|
||||
void buf_page_write_complete(const IORequest &request, bool error) noexcept;
|
||||
|
||||
/** Assign the full crc32 checksum for non-compressed page.
|
||||
@param[in,out] page page to be updated */
|
||||
void buf_flush_assign_full_crc32_checksum(byte* page);
|
||||
void buf_flush_assign_full_crc32_checksum(byte* page) noexcept;
|
||||
|
||||
/** Initialize a page for writing to the tablespace.
|
||||
@param[in] block buffer block; NULL if bypassing the buffer pool
|
||||
|
|
@ -76,40 +71,41 @@ buf_flush_init_for_writing(
|
|||
const buf_block_t* block,
|
||||
byte* page,
|
||||
void* page_zip_,
|
||||
bool use_full_checksum);
|
||||
bool use_full_checksum) noexcept;
|
||||
|
||||
/** Try to flush dirty pages that belong to a given tablespace.
|
||||
@param space tablespace
|
||||
@param n_flushed number of pages written
|
||||
@return whether the flush for some pages might not have been initiated */
|
||||
bool buf_flush_list_space(fil_space_t *space, ulint *n_flushed= nullptr)
|
||||
noexcept
|
||||
MY_ATTRIBUTE((warn_unused_result));
|
||||
|
||||
/** Wait until a LRU flush batch ends. */
|
||||
void buf_flush_wait_LRU_batch_end();
|
||||
void buf_flush_wait_LRU_batch_end() noexcept;
|
||||
/** Wait until all persistent pages are flushed up to a limit.
|
||||
@param sync_lsn buf_pool.get_oldest_modification(LSN_MAX) to wait for */
|
||||
ATTRIBUTE_COLD void buf_flush_wait_flushed(lsn_t sync_lsn);
|
||||
ATTRIBUTE_COLD void buf_flush_wait_flushed(lsn_t sync_lsn) noexcept;
|
||||
/** Initiate more eager page flushing if the log checkpoint age is too old.
|
||||
@param lsn buf_pool.get_oldest_modification(LSN_MAX) target
|
||||
@param furious true=furious flushing, false=limit to innodb_io_capacity */
|
||||
ATTRIBUTE_COLD void buf_flush_ahead(lsn_t lsn, bool furious);
|
||||
ATTRIBUTE_COLD void buf_flush_ahead(lsn_t lsn, bool furious) noexcept;
|
||||
|
||||
/** Initialize page_cleaner. */
|
||||
ATTRIBUTE_COLD void buf_flush_page_cleaner_init();
|
||||
ATTRIBUTE_COLD void buf_flush_page_cleaner_init() noexcept;
|
||||
|
||||
/** Flush the buffer pool on shutdown. */
|
||||
ATTRIBUTE_COLD void buf_flush_buffer_pool();
|
||||
ATTRIBUTE_COLD void buf_flush_buffer_pool() noexcept;
|
||||
|
||||
#ifdef UNIV_DEBUG
|
||||
/** Validate the flush list. */
|
||||
void buf_flush_validate();
|
||||
void buf_flush_validate() noexcept;
|
||||
#endif /* UNIV_DEBUG */
|
||||
|
||||
/** Synchronously flush dirty blocks during recv_sys_t::apply().
|
||||
NOTE: The calling thread is not allowed to hold any buffer page latches! */
|
||||
void buf_flush_sync_batch(lsn_t lsn);
|
||||
void buf_flush_sync_batch(lsn_t lsn) noexcept;
|
||||
|
||||
/** Synchronously flush dirty blocks.
|
||||
NOTE: The calling thread is not allowed to hold any buffer page latches! */
|
||||
void buf_flush_sync();
|
||||
void buf_flush_sync() noexcept;
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ will be invoked on read completion.
|
|||
@retval DB_DECRYPTION_FAILED if page post encryption checksum matches but
|
||||
after decryption normal page checksum does not match.
|
||||
@retval DB_TABLESPACE_DELETED if tablespace .ibd file is missing */
|
||||
dberr_t buf_read_page(const page_id_t page_id, bool unzip= true);
|
||||
dberr_t buf_read_page(const page_id_t page_id, bool unzip= true) noexcept;
|
||||
|
||||
/** High-level function which reads a page asynchronously from a file to the
|
||||
buffer buf_pool if it is not already there. Sets the io_fix flag and sets
|
||||
|
|
@ -49,7 +49,7 @@ released by the i/o-handler thread.
|
|||
@param[in] page_id page id
|
||||
@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0 */
|
||||
void buf_read_page_background(fil_space_t *space, const page_id_t page_id,
|
||||
ulint zip_size)
|
||||
ulint zip_size) noexcept
|
||||
MY_ATTRIBUTE((nonnull));
|
||||
|
||||
/** Applies a random read-ahead in buf_pool if there are at least a threshold
|
||||
|
|
@ -67,7 +67,7 @@ wants to access
|
|||
@return number of page read requests issued; NOTE that if we read ibuf
|
||||
pages, it may happen that the page at the given page number does not
|
||||
get read even if we return a positive value! */
|
||||
ulint buf_read_ahead_random(const page_id_t page_id, bool ibuf);
|
||||
ulint buf_read_ahead_random(const page_id_t page_id, bool ibuf) noexcept;
|
||||
|
||||
/** Applies linear read-ahead if in the buf_pool the page is a border page of
|
||||
a linear read-ahead area and all the pages in the area have been accessed.
|
||||
|
|
@ -95,7 +95,7 @@ which could result in a deadlock if the OS does not support asynchronous io.
|
|||
@param[in] ibuf whether if we are inside ibuf routine
|
||||
@return number of page read requests issued */
|
||||
ulint
|
||||
buf_read_ahead_linear(const page_id_t page_id, bool ibuf);
|
||||
buf_read_ahead_linear(const page_id_t page_id, bool ibuf) noexcept;
|
||||
|
||||
/** Schedule a page for recovery.
|
||||
@param space tablespace
|
||||
|
|
@ -103,7 +103,7 @@ buf_read_ahead_linear(const page_id_t page_id, bool ibuf);
|
|||
@param recs log records
|
||||
@param init page initialization, or nullptr if the page needs to be read */
|
||||
void buf_read_recover(fil_space_t *space, const page_id_t page_id,
|
||||
page_recv_t &recs, recv_init *init);
|
||||
page_recv_t &recs, recv_init *init) noexcept;
|
||||
|
||||
/** @name Modes used in read-ahead @{ */
|
||||
/** read only pages belonging to the insert buffer tree */
|
||||
|
|
|
|||
|
|
@ -54,12 +54,12 @@ enum srv_checksum_algorithm_t {
|
|||
SRV_CHECKSUM_ALGORITHM_STRICT_FULL_CRC32
|
||||
};
|
||||
|
||||
inline bool is_checksum_strict(srv_checksum_algorithm_t algo)
|
||||
inline bool is_checksum_strict(srv_checksum_algorithm_t algo) noexcept
|
||||
{
|
||||
return algo == SRV_CHECKSUM_ALGORITHM_STRICT_CRC32;
|
||||
}
|
||||
|
||||
inline bool is_checksum_strict(ulint algo)
|
||||
inline bool is_checksum_strict(ulint algo) noexcept
|
||||
{
|
||||
return algo == SRV_CHECKSUM_ALGORITHM_STRICT_CRC32;
|
||||
}
|
||||
|
|
@ -96,31 +96,31 @@ public:
|
|||
m_id(uint64_t{space} << 32 | page_no) {}
|
||||
|
||||
constexpr page_id_t(uint64_t id) : m_id(id) {}
|
||||
constexpr bool operator==(const page_id_t& rhs) const
|
||||
constexpr bool operator==(const page_id_t& rhs) const noexcept
|
||||
{ return m_id == rhs.m_id; }
|
||||
constexpr bool operator!=(const page_id_t& rhs) const
|
||||
constexpr bool operator!=(const page_id_t& rhs) const noexcept
|
||||
{ return m_id != rhs.m_id; }
|
||||
constexpr bool operator<(const page_id_t& rhs) const
|
||||
constexpr bool operator<(const page_id_t& rhs) const noexcept
|
||||
{ return m_id < rhs.m_id; }
|
||||
constexpr bool operator>(const page_id_t& rhs) const
|
||||
constexpr bool operator>(const page_id_t& rhs) const noexcept
|
||||
{ return m_id > rhs.m_id; }
|
||||
constexpr bool operator<=(const page_id_t& rhs) const
|
||||
constexpr bool operator<=(const page_id_t& rhs) const noexcept
|
||||
{ return m_id <= rhs.m_id; }
|
||||
constexpr bool operator>=(const page_id_t& rhs) const
|
||||
constexpr bool operator>=(const page_id_t& rhs) const noexcept
|
||||
{ return m_id >= rhs.m_id; }
|
||||
page_id_t &operator--() { ut_ad(page_no()); m_id--; return *this; }
|
||||
page_id_t &operator++()
|
||||
page_id_t &operator--() noexcept { ut_ad(page_no()); m_id--; return *this; }
|
||||
page_id_t &operator++() noexcept
|
||||
{
|
||||
ut_ad(page_no() < 0xFFFFFFFFU);
|
||||
m_id++;
|
||||
return *this;
|
||||
}
|
||||
page_id_t operator-(uint32_t i) const
|
||||
page_id_t operator-(uint32_t i) const noexcept
|
||||
{
|
||||
ut_ad(page_no() >= i);
|
||||
return page_id_t(m_id - i);
|
||||
}
|
||||
page_id_t operator+(uint32_t i) const
|
||||
page_id_t operator+(uint32_t i) const noexcept
|
||||
{
|
||||
ut_ad(page_no() < ~i);
|
||||
return page_id_t(m_id + i);
|
||||
|
|
@ -128,28 +128,30 @@ public:
|
|||
|
||||
/** Retrieve the tablespace id.
|
||||
@return tablespace id */
|
||||
constexpr uint32_t space() const { return static_cast<uint32_t>(m_id >> 32); }
|
||||
constexpr uint32_t space() const noexcept
|
||||
{ return static_cast<uint32_t>(m_id >> 32); }
|
||||
|
||||
/** Retrieve the page number.
|
||||
@return page number */
|
||||
constexpr uint32_t page_no() const { return static_cast<uint32_t>(m_id); }
|
||||
constexpr uint32_t page_no() const noexcept
|
||||
{ return static_cast<uint32_t>(m_id); }
|
||||
|
||||
/** Retrieve the fold value.
|
||||
@return fold value */
|
||||
constexpr ulint fold() const
|
||||
constexpr ulint fold() const noexcept
|
||||
{ return (ulint{space()} << 20) + space() + page_no(); }
|
||||
|
||||
/** Reset the page number only.
|
||||
@param[in] page_no page number */
|
||||
void set_page_no(uint32_t page_no)
|
||||
void set_page_no(uint32_t page_no) noexcept
|
||||
{
|
||||
m_id= (m_id & ~uint64_t{0} << 32) | page_no;
|
||||
}
|
||||
|
||||
constexpr ulonglong raw() const { return m_id; }
|
||||
constexpr ulonglong raw() const noexcept { return m_id; }
|
||||
|
||||
/** Flag the page identifier as corrupted. */
|
||||
void set_corrupted() { m_id= ~0ULL; }
|
||||
void set_corrupted() noexcept { m_id= ~0ULL; }
|
||||
|
||||
/** @return whether the page identifier belongs to a corrupted page */
|
||||
constexpr bool is_corrupted() const { return m_id == ~0ULL; }
|
||||
|
|
@ -182,53 +184,55 @@ enum rw_lock_type_t
|
|||
class page_hash_latch : private rw_lock
|
||||
{
|
||||
/** Wait for a shared lock */
|
||||
void read_lock_wait();
|
||||
void read_lock_wait() noexcept;
|
||||
/** Wait for an exclusive lock */
|
||||
void write_lock_wait();
|
||||
void write_lock_wait() noexcept;
|
||||
public:
|
||||
/** Acquire a shared lock */
|
||||
inline void lock_shared();
|
||||
inline void lock_shared() noexcept;
|
||||
/** Acquire an exclusive lock */
|
||||
inline void lock();
|
||||
inline void lock() noexcept;
|
||||
|
||||
/** @return whether an exclusive lock is being held by any thread */
|
||||
bool is_write_locked() const { return rw_lock::is_write_locked(); }
|
||||
bool is_write_locked() const noexcept { return rw_lock::is_write_locked(); }
|
||||
|
||||
/** @return whether any lock is being held by any thread */
|
||||
bool is_locked() const { return rw_lock::is_locked(); }
|
||||
bool is_locked() const noexcept { return rw_lock::is_locked(); }
|
||||
/** @return whether any lock is being held or waited for by any thread */
|
||||
bool is_locked_or_waiting() const { return rw_lock::is_locked_or_waiting(); }
|
||||
bool is_locked_or_waiting() const noexcept
|
||||
{ return rw_lock::is_locked_or_waiting(); }
|
||||
|
||||
/** Release a shared lock */
|
||||
void unlock_shared() { read_unlock(); }
|
||||
void unlock_shared() noexcept { read_unlock(); }
|
||||
/** Release an exclusive lock */
|
||||
void unlock() { write_unlock(); }
|
||||
void unlock() noexcept { write_unlock(); }
|
||||
};
|
||||
#elif defined _WIN32 || SIZEOF_SIZE_T >= 8
|
||||
class page_hash_latch
|
||||
{
|
||||
srw_spin_lock_low lk;
|
||||
public:
|
||||
void lock_shared() { lk.rd_lock(); }
|
||||
void unlock_shared() { lk.rd_unlock(); }
|
||||
void lock() { lk.wr_lock(); }
|
||||
void unlock() { lk.wr_unlock(); }
|
||||
bool is_write_locked() const { return lk.is_write_locked(); }
|
||||
bool is_locked() const { return lk.is_locked(); }
|
||||
bool is_locked_or_waiting() const { return lk.is_locked_or_waiting(); }
|
||||
void lock_shared() noexcept { lk.rd_lock(); }
|
||||
void unlock_shared() noexcept { lk.rd_unlock(); }
|
||||
void lock() noexcept { lk.wr_lock(); }
|
||||
void unlock() noexcept { lk.wr_unlock(); }
|
||||
bool is_write_locked() const noexcept { return lk.is_write_locked(); }
|
||||
bool is_locked() const noexcept { return lk.is_locked(); }
|
||||
bool is_locked_or_waiting() const noexcept
|
||||
{ return lk.is_locked_or_waiting(); }
|
||||
};
|
||||
#else
|
||||
class page_hash_latch
|
||||
{
|
||||
srw_spin_mutex lk;
|
||||
public:
|
||||
void lock_shared() { lock(); }
|
||||
void unlock_shared() { unlock(); }
|
||||
void lock() { lk.wr_lock(); }
|
||||
void unlock() { lk.wr_unlock(); }
|
||||
bool is_locked() const { return lk.is_locked(); }
|
||||
bool is_write_locked() const { return is_locked(); }
|
||||
bool is_locked_or_waiting() const { return is_locked(); }
|
||||
void lock_shared() noexcept { lock(); }
|
||||
void unlock_shared() noexcept { unlock(); }
|
||||
void lock() noexcept { lk.wr_lock(); }
|
||||
void unlock() noexcept { lk.wr_unlock(); }
|
||||
bool is_locked() const noexcept { return lk.is_locked(); }
|
||||
bool is_write_locked() const noexcept { return is_locked(); }
|
||||
bool is_locked_or_waiting() const noexcept { return is_locked(); }
|
||||
};
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -373,11 +373,11 @@ struct fil_space_t final
|
|||
uint32_t n_reserved_extents= 0;
|
||||
private:
|
||||
#ifdef UNIV_DEBUG
|
||||
fil_space_t *next_in_space_list();
|
||||
fil_space_t *prev_in_space_list();
|
||||
fil_space_t *next_in_space_list() noexcept;
|
||||
fil_space_t *prev_in_space_list() noexcept;
|
||||
|
||||
fil_space_t *next_in_unflushed_spaces();
|
||||
fil_space_t *prev_in_unflushed_spaces();
|
||||
fil_space_t *next_in_unflushed_spaces() noexcept;
|
||||
fil_space_t *prev_in_unflushed_spaces() noexcept;
|
||||
#endif
|
||||
|
||||
/** the committed size of the tablespace in pages */
|
||||
|
|
@ -445,21 +445,21 @@ public:
|
|||
{ return UNIV_UNLIKELY(being_imported); }
|
||||
|
||||
/** @return whether doublewrite buffering is needed */
|
||||
inline bool use_doublewrite() const;
|
||||
inline bool use_doublewrite() const noexcept;
|
||||
|
||||
/** @return whether a page has been freed */
|
||||
inline bool is_freed(uint32_t page);
|
||||
inline bool is_freed(uint32_t page) noexcept;
|
||||
|
||||
/** Set create_lsn. */
|
||||
inline void set_create_lsn(lsn_t lsn);
|
||||
inline void set_create_lsn(lsn_t lsn) noexcept;
|
||||
|
||||
/** @return the latest tablespace rebuild LSN, or 0 */
|
||||
lsn_t get_create_lsn() const { return create_lsn; }
|
||||
lsn_t get_create_lsn() const noexcept { return create_lsn; }
|
||||
|
||||
/** Apply freed_ranges to the file.
|
||||
@param writable whether the file is writable
|
||||
@return number of pages written or hole-punched */
|
||||
uint32_t flush_freed(bool writable);
|
||||
uint32_t flush_freed(bool writable) noexcept;
|
||||
|
||||
/** Append a file to the chain of files of a space.
|
||||
@param[in] name file name of a file that is not open
|
||||
|
|
@ -472,7 +472,7 @@ public:
|
|||
@return file object */
|
||||
fil_node_t* add(const char* name, pfs_os_file_t handle,
|
||||
uint32_t size, bool is_raw, bool atomic_write,
|
||||
uint32_t max_pages = UINT32_MAX);
|
||||
uint32_t max_pages = UINT32_MAX) noexcept;
|
||||
#ifdef UNIV_DEBUG
|
||||
/** Assert that the mini-transaction is compatible with
|
||||
updating an allocation bitmap page.
|
||||
|
|
@ -485,6 +485,7 @@ public:
|
|||
@param[in] n_to_reserve number of extents to reserve
|
||||
@return whether the reservation succeeded */
|
||||
bool reserve_free_extents(uint32_t n_free_now, uint32_t n_to_reserve)
|
||||
noexcept
|
||||
{
|
||||
if (n_reserved_extents + n_to_reserve > n_free_now) {
|
||||
return false;
|
||||
|
|
@ -496,7 +497,7 @@ public:
|
|||
|
||||
/** Release the reserved free extents.
|
||||
@param[in] n_reserved number of reserved extents */
|
||||
void release_free_extents(uint32_t n_reserved)
|
||||
void release_free_extents(uint32_t n_reserved) noexcept
|
||||
{
|
||||
if (!n_reserved) return;
|
||||
ut_a(n_reserved_extents >= n_reserved);
|
||||
|
|
@ -509,20 +510,20 @@ public:
|
|||
@param[in] replace whether to ignore the existence of path
|
||||
@return error code
|
||||
@retval DB_SUCCESS on success */
|
||||
dberr_t rename(const char *path, bool log, bool replace= false)
|
||||
dberr_t rename(const char *path, bool log, bool replace= false) noexcept
|
||||
MY_ATTRIBUTE((nonnull));
|
||||
|
||||
/** Note that the tablespace has been imported.
|
||||
Initially, purpose=IMPORT so that no redo log is
|
||||
written while the space ID is being updated in each page. */
|
||||
inline void set_imported();
|
||||
inline void set_imported() noexcept;
|
||||
|
||||
/** Report the tablespace as corrupted
|
||||
@return whether this was the first call */
|
||||
ATTRIBUTE_COLD bool set_corrupted() const noexcept;
|
||||
|
||||
/** @return whether the storage device is rotational (HDD, not SSD) */
|
||||
inline bool is_rotational() const;
|
||||
inline bool is_rotational() const noexcept;
|
||||
|
||||
/** Open each file. Never invoked on .ibd files.
|
||||
@param create_new_db whether to skip the call to fil_node_t::read_page0()
|
||||
|
|
@ -563,7 +564,7 @@ public:
|
|||
/** Acquire a tablespace reference for I/O.
|
||||
@param avoid when these flags are set, nothing will be acquired
|
||||
@return whether the file is usable */
|
||||
bool acquire(uint32_t avoid= STOPPING | CLOSING)
|
||||
bool acquire(uint32_t avoid= STOPPING | CLOSING) noexcept
|
||||
{
|
||||
const auto flags= acquire_low(avoid) & (avoid);
|
||||
return UNIV_LIKELY(!flags) || (flags == CLOSING && acquire_and_prepare());
|
||||
|
|
@ -572,14 +573,15 @@ public:
|
|||
/** Acquire a tablespace reference for writing.
|
||||
@param avoid when these flags are set, nothing will be acquired
|
||||
@return whether the file is writable */
|
||||
bool acquire_for_write() { return acquire(STOPPING_WRITES | CLOSING); }
|
||||
bool acquire_for_write() noexcept
|
||||
{ return acquire(STOPPING_WRITES | CLOSING); }
|
||||
|
||||
/** Acquire another tablespace reference for I/O. */
|
||||
inline void reacquire();
|
||||
inline void reacquire() noexcept;
|
||||
|
||||
/** Release a tablespace reference.
|
||||
@return whether this was the last reference */
|
||||
bool release()
|
||||
bool release() noexcept
|
||||
{
|
||||
uint32_t n= n_pending.fetch_sub(1, std::memory_order_release);
|
||||
ut_ad(n & PENDING);
|
||||
|
|
@ -587,43 +589,45 @@ public:
|
|||
}
|
||||
|
||||
/** Clear the NEEDS_FSYNC flag */
|
||||
void clear_flush()
|
||||
void clear_flush() noexcept
|
||||
{
|
||||
n_pending.fetch_and(~NEEDS_FSYNC, std::memory_order_release);
|
||||
}
|
||||
|
||||
private:
|
||||
/** Clear the CLOSING flag */
|
||||
void clear_closing()
|
||||
void clear_closing() noexcept
|
||||
{
|
||||
n_pending.fetch_and(~CLOSING, std::memory_order_relaxed);
|
||||
}
|
||||
|
||||
/** @return pending operations (and flags) */
|
||||
uint32_t pending()const { return n_pending.load(std::memory_order_acquire); }
|
||||
uint32_t pending() const noexcept
|
||||
{ return n_pending.load(std::memory_order_acquire); }
|
||||
public:
|
||||
/** @return whether close() of the file handle has been requested */
|
||||
bool is_closing() const { return pending() & CLOSING; }
|
||||
bool is_closing() const noexcept { return pending() & CLOSING; }
|
||||
/** @return whether the tablespace is about to be dropped */
|
||||
bool is_stopping() const { return pending() & STOPPING; }
|
||||
bool is_stopping() const noexcept { return pending() & STOPPING; }
|
||||
/** @return whether the tablespace is going to be dropped */
|
||||
bool is_stopping_writes() const { return pending() & STOPPING_WRITES; }
|
||||
bool is_stopping_writes() const noexcept
|
||||
{ return pending() & STOPPING_WRITES; }
|
||||
/** @return number of pending operations */
|
||||
bool is_ready_to_close() const
|
||||
bool is_ready_to_close() const noexcept
|
||||
{ return (pending() & (PENDING | CLOSING)) == CLOSING; }
|
||||
/** @return whether fsync() or similar is needed */
|
||||
bool needs_flush() const { return pending() & NEEDS_FSYNC; }
|
||||
bool needs_flush() const noexcept { return pending() & NEEDS_FSYNC; }
|
||||
/** @return whether fsync() or similar is needed, and the tablespace is
|
||||
not being dropped */
|
||||
bool needs_flush_not_stopping() const
|
||||
bool needs_flush_not_stopping() const noexcept
|
||||
{ return (pending() & (NEEDS_FSYNC | STOPPING_WRITES)) == NEEDS_FSYNC; }
|
||||
|
||||
uint32_t referenced() const { return pending() & PENDING; }
|
||||
uint32_t referenced() const noexcept { return pending() & PENDING; }
|
||||
private:
|
||||
MY_ATTRIBUTE((warn_unused_result))
|
||||
/** Prepare to close the file handle.
|
||||
@return number of pending operations, possibly with NEEDS_FSYNC flag */
|
||||
uint32_t set_closing()
|
||||
uint32_t set_closing() noexcept
|
||||
{
|
||||
return n_pending.fetch_or(CLOSING, std::memory_order_acquire);
|
||||
}
|
||||
|
|
@ -633,17 +637,18 @@ public:
|
|||
@param ignore_space Ignore the tablespace which is acquired by caller
|
||||
@param print_info whether to diagnose why a file cannot be closed
|
||||
@return whether a file was closed */
|
||||
static bool try_to_close(fil_space_t *ignore_space, bool print_info);
|
||||
static bool try_to_close(fil_space_t *ignore_space, bool print_info)
|
||||
noexcept;
|
||||
|
||||
/** Close all tablespace files at shutdown */
|
||||
static void close_all();
|
||||
static void close_all() noexcept;
|
||||
|
||||
/** Update last_freed_lsn */
|
||||
void update_last_freed_lsn(lsn_t lsn) { last_freed_lsn= lsn; }
|
||||
|
||||
/** Note that the file will need fsync().
|
||||
@return whether this needs to be added to fil_system.unflushed_spaces */
|
||||
bool set_needs_flush()
|
||||
bool set_needs_flush() noexcept
|
||||
{
|
||||
uint32_t n= 1;
|
||||
while (!n_pending.compare_exchange_strong(n, n | NEEDS_FSYNC,
|
||||
|
|
@ -660,7 +665,7 @@ public:
|
|||
|
||||
/** Clear all freed ranges for undo tablespace when InnoDB
|
||||
encounters TRIM redo log record */
|
||||
void clear_freed_ranges() { freed_ranges.clear(); }
|
||||
void clear_freed_ranges() noexcept { freed_ranges.clear(); }
|
||||
#endif /* !UNIV_INNOCHECKSUM */
|
||||
/** FSP_SPACE_FLAGS and FSP_FLAGS_MEM_ flags;
|
||||
check fsp0types.h to more info about flags. */
|
||||
|
|
@ -669,12 +674,12 @@ public:
|
|||
/** Determine if full_crc32 is used for a data file
|
||||
@param[in] flags tablespace flags (FSP_SPACE_FLAGS)
|
||||
@return whether the full_crc32 algorithm is active */
|
||||
static bool full_crc32(uint32_t flags)
|
||||
static bool full_crc32(uint32_t flags) noexcept
|
||||
{ return flags & FSP_FLAGS_FCRC32_MASK_MARKER; }
|
||||
/** @return whether innodb_checksum_algorithm=full_crc32 is active */
|
||||
bool full_crc32() const { return full_crc32(flags); }
|
||||
bool full_crc32() const noexcept { return full_crc32(flags); }
|
||||
/** Determine if full_crc32 is used along with PAGE_COMPRESSED */
|
||||
static bool is_full_crc32_compressed(uint32_t flags)
|
||||
static bool is_full_crc32_compressed(uint32_t flags) noexcept
|
||||
{
|
||||
if (!full_crc32(flags))
|
||||
return false;
|
||||
|
|
@ -686,7 +691,7 @@ public:
|
|||
@param flags tablespace flags (FSP_SPACE_FLAGS)
|
||||
@return the logical page size
|
||||
@retval 0 if the flags are invalid */
|
||||
static unsigned logical_size(uint32_t flags)
|
||||
static unsigned logical_size(uint32_t flags) noexcept
|
||||
{
|
||||
switch (full_crc32(flags)
|
||||
? FSP_FLAGS_FCRC32_GET_PAGE_SSIZE(flags)
|
||||
|
|
@ -704,7 +709,7 @@ public:
|
|||
@param flags tablespace flags (FSP_SPACE_FLAGS)
|
||||
@return the ROW_FORMAT=COMPRESSED page size
|
||||
@retval 0 if ROW_FORMAT=COMPRESSED is not used */
|
||||
static unsigned zip_size(uint32_t flags)
|
||||
static unsigned zip_size(uint32_t flags) noexcept
|
||||
{
|
||||
if (full_crc32(flags))
|
||||
return 0;
|
||||
|
|
@ -714,7 +719,7 @@ public:
|
|||
/** Determine the physical page size.
|
||||
@param flags tablespace flags (FSP_SPACE_FLAGS)
|
||||
@return the physical page size */
|
||||
static unsigned physical_size(uint32_t flags)
|
||||
static unsigned physical_size(uint32_t flags) noexcept
|
||||
{
|
||||
if (full_crc32(flags))
|
||||
return logical_size(flags);
|
||||
|
|
@ -727,25 +732,25 @@ public:
|
|||
|
||||
/** @return the ROW_FORMAT=COMPRESSED page size
|
||||
@retval 0 if ROW_FORMAT=COMPRESSED is not used */
|
||||
unsigned zip_size() const { return zip_size(flags); }
|
||||
unsigned zip_size() const noexcept { return zip_size(flags); }
|
||||
/** @return the physical page size */
|
||||
unsigned physical_size() const { return physical_size(flags); }
|
||||
unsigned physical_size() const noexcept { return physical_size(flags); }
|
||||
|
||||
/** Check whether PAGE_COMPRESSED is enabled.
|
||||
@param[in] flags tablespace flags */
|
||||
static bool is_compressed(uint32_t flags)
|
||||
static bool is_compressed(uint32_t flags) noexcept
|
||||
{
|
||||
return is_full_crc32_compressed(flags) ||
|
||||
FSP_FLAGS_HAS_PAGE_COMPRESSION(flags);
|
||||
}
|
||||
/** @return whether the compression enabled for the tablespace. */
|
||||
bool is_compressed() const { return is_compressed(flags); }
|
||||
bool is_compressed() const noexcept { return is_compressed(flags); }
|
||||
|
||||
/** Get the compression algorithm for full crc32 format.
|
||||
@param flags contents of FSP_SPACE_FLAGS
|
||||
@return PAGE_COMPRESSED algorithm of full_crc32 tablespace
|
||||
@retval 0 if not PAGE_COMPRESSED or not full_crc32 */
|
||||
static unsigned get_compression_algo(uint32_t flags)
|
||||
static unsigned get_compression_algo(uint32_t flags) noexcept
|
||||
{
|
||||
return full_crc32(flags)
|
||||
? FSP_FLAGS_FCRC32_GET_COMPRESSED_ALGO(flags)
|
||||
|
|
@ -753,12 +758,12 @@ public:
|
|||
}
|
||||
/** @return the page_compressed algorithm
|
||||
@retval 0 if not page_compressed */
|
||||
unsigned get_compression_algo() const { return get_compression_algo(flags); }
|
||||
unsigned get_compression_algo() const noexcept { return get_compression_algo(flags); }
|
||||
/** Determine if the page_compressed page contains an extra byte
|
||||
for exact compressed stream length
|
||||
@param flags contents of FSP_SPACE_FLAGS
|
||||
@return whether the extra byte is needed */
|
||||
static bool full_crc32_page_compressed_len(uint32_t flags)
|
||||
static bool full_crc32_page_compressed_len(uint32_t flags) noexcept
|
||||
{
|
||||
DBUG_ASSERT(full_crc32(flags));
|
||||
switch (get_compression_algo(flags)) {
|
||||
|
|
@ -774,7 +779,7 @@ public:
|
|||
@param flags contents of FSP_SPACE_FLAGS
|
||||
@param expected expected flags
|
||||
@return true if it is equivalent */
|
||||
static bool is_flags_full_crc32_equal(uint32_t flags, uint32_t expected)
|
||||
static bool is_flags_full_crc32_equal(uint32_t flags, uint32_t expected) noexcept
|
||||
{
|
||||
ut_ad(full_crc32(flags));
|
||||
uint32_t fcrc32_psize= FSP_FLAGS_FCRC32_GET_PAGE_SSIZE(flags);
|
||||
|
|
@ -795,7 +800,7 @@ public:
|
|||
@param flags contents of FSP_SPACE_FLAGS
|
||||
@param expected expected flags
|
||||
@return true if it is equivalent */
|
||||
static bool is_flags_non_full_crc32_equal(uint32_t flags, uint32_t expected)
|
||||
static bool is_flags_non_full_crc32_equal(uint32_t flags, uint32_t expected) noexcept
|
||||
{
|
||||
ut_ad(!full_crc32(flags));
|
||||
if (!full_crc32(expected))
|
||||
|
|
@ -810,7 +815,7 @@ public:
|
|||
}
|
||||
|
||||
/** Whether both fsp flags are equivalent */
|
||||
static bool is_flags_equal(uint32_t flags, uint32_t expected)
|
||||
static bool is_flags_equal(uint32_t flags, uint32_t expected) noexcept
|
||||
{
|
||||
if (!((flags ^ expected) & ~(1U << FSP_FLAGS_POS_RESERVED)))
|
||||
return true;
|
||||
|
|
@ -822,7 +827,7 @@ public:
|
|||
/** Validate the tablespace flags for full crc32 format.
|
||||
@param flags contents of FSP_SPACE_FLAGS
|
||||
@return whether the flags are correct in full crc32 format */
|
||||
static bool is_fcrc32_valid_flags(uint32_t flags)
|
||||
static bool is_fcrc32_valid_flags(uint32_t flags) noexcept
|
||||
{
|
||||
ut_ad(flags & FSP_FLAGS_FCRC32_MASK_MARKER);
|
||||
const ulint page_ssize= physical_size(flags);
|
||||
|
|
@ -835,7 +840,7 @@ public:
|
|||
@param flags contents of FSP_SPACE_FLAGS
|
||||
@param is_ibd whether this is an .ibd file (not system tablespace)
|
||||
@return whether the flags are correct */
|
||||
static bool is_valid_flags(uint32_t flags, bool is_ibd)
|
||||
static bool is_valid_flags(uint32_t flags, bool is_ibd) noexcept
|
||||
{
|
||||
DBUG_EXECUTE_IF("fsp_flags_is_valid_failure", return false;);
|
||||
if (full_crc32(flags))
|
||||
|
|
@ -908,17 +913,17 @@ public:
|
|||
@param id tablespace identifier
|
||||
@return tablespace
|
||||
@retval nullptr if the tablespace is missing or inaccessible */
|
||||
static fil_space_t *get(uint32_t id);
|
||||
static fil_space_t *get(uint32_t id) noexcept;
|
||||
/** Acquire a tablespace reference for writing.
|
||||
@param id tablespace identifier
|
||||
@return tablespace
|
||||
@retval nullptr if the tablespace is missing or inaccessible */
|
||||
static fil_space_t *get_for_write(uint32_t id);
|
||||
static fil_space_t *get_for_write(uint32_t id) noexcept;
|
||||
|
||||
/** Add/remove the free page in the freed ranges list.
|
||||
@param[in] offset page number to be added
|
||||
@param[in] free true if page to be freed */
|
||||
void free_page(uint32_t offset, bool add=true)
|
||||
void free_page(uint32_t offset, bool add=true) noexcept
|
||||
{
|
||||
std::lock_guard<std::mutex> freed_lock(freed_range_mutex);
|
||||
if (add)
|
||||
|
|
@ -931,33 +936,33 @@ public:
|
|||
}
|
||||
|
||||
/** Add the range of freed pages */
|
||||
void add_free_ranges(range_set ranges)
|
||||
void add_free_ranges(range_set ranges) noexcept
|
||||
{
|
||||
std::lock_guard<std::mutex> freed_lock(freed_range_mutex);
|
||||
freed_ranges= std::move(ranges);
|
||||
}
|
||||
|
||||
/** Add the set of freed page ranges */
|
||||
void add_free_range(const range_t range)
|
||||
void add_free_range(const range_t range) noexcept
|
||||
{
|
||||
freed_ranges.add_range(range);
|
||||
}
|
||||
|
||||
/** Set the tablespace size in pages */
|
||||
void set_sizes(uint32_t s)
|
||||
void set_sizes(uint32_t s) noexcept
|
||||
{
|
||||
ut_ad(id ? !size : (size >= s));
|
||||
size= s; committed_size= s;
|
||||
}
|
||||
|
||||
/** Update committed_size in mtr_t::commit() */
|
||||
void set_committed_size() { committed_size= size; }
|
||||
void set_committed_size() noexcept { committed_size= size; }
|
||||
|
||||
/** @return the last persisted page number */
|
||||
uint32_t last_page_number() const { return committed_size - 1; }
|
||||
uint32_t last_page_number() const noexcept { return committed_size - 1; }
|
||||
|
||||
/** @return the size in pages (0 if unreadable) */
|
||||
inline uint32_t get_size();
|
||||
inline uint32_t get_size() noexcept;
|
||||
|
||||
/** Read or write data.
|
||||
@param type I/O context
|
||||
|
|
@ -967,11 +972,11 @@ public:
|
|||
@param bpage buffer block (for type.is_async() completion callback)
|
||||
@return status and file descriptor */
|
||||
fil_io_t io(const IORequest &type, os_offset_t offset, size_t len,
|
||||
void *buf, buf_page_t *bpage= nullptr);
|
||||
void *buf, buf_page_t *bpage= nullptr) noexcept;
|
||||
/** Flush pending writes from the file system cache to the file. */
|
||||
template<bool have_reference> inline void flush();
|
||||
template<bool have_reference> inline void flush() noexcept;
|
||||
/** Flush pending writes from the file system cache to the file. */
|
||||
void flush_low();
|
||||
void flush_low() noexcept;
|
||||
|
||||
/** Read the first page of a data file.
|
||||
@param dpage copy of a first page, from the doublewrite buffer, or nullptr
|
||||
|
|
@ -987,19 +992,19 @@ public:
|
|||
@return the next tablespace
|
||||
@retval nullptr upon reaching the end of the iteration */
|
||||
static space_list_t::iterator next(space_list_t::iterator space,
|
||||
bool recheck, bool encrypt);
|
||||
bool recheck, bool encrypt) noexcept;
|
||||
|
||||
#ifdef UNIV_DEBUG
|
||||
bool is_latched() const { return latch.have_any(); }
|
||||
bool is_latched() const noexcept { return latch.have_any(); }
|
||||
#endif
|
||||
bool is_owner() const
|
||||
bool is_owner() const noexcept
|
||||
{
|
||||
const bool owner{latch_owner == pthread_self()};
|
||||
ut_ad(owner == latch.have_wr());
|
||||
return owner;
|
||||
}
|
||||
/** Acquire the allocation latch in exclusive mode */
|
||||
void x_lock()
|
||||
void x_lock() noexcept
|
||||
{
|
||||
latch.wr_lock(SRW_LOCK_CALL);
|
||||
ut_ad(!latch_owner);
|
||||
|
|
@ -1013,14 +1018,14 @@ public:
|
|||
latch.wr_unlock();
|
||||
}
|
||||
/** Acquire the allocation latch in shared mode */
|
||||
void s_lock() { latch.rd_lock(SRW_LOCK_CALL); }
|
||||
void s_lock() noexcept { latch.rd_lock(SRW_LOCK_CALL); }
|
||||
/** Release the allocation latch from shared mode */
|
||||
void s_unlock() { latch.rd_unlock(); }
|
||||
void s_unlock() noexcept { latch.rd_unlock(); }
|
||||
|
||||
typedef span<const char> name_type;
|
||||
|
||||
/** @return the tablespace name (databasename/tablename) */
|
||||
name_type name() const;
|
||||
name_type name() const noexcept;
|
||||
|
||||
/** How to validate tablespace files that are being opened */
|
||||
enum validate {
|
||||
|
|
@ -1036,9 +1041,9 @@ public:
|
|||
|
||||
private:
|
||||
/** @return whether the file is usable for io() */
|
||||
ATTRIBUTE_COLD bool prepare_acquired();
|
||||
ATTRIBUTE_COLD bool prepare_acquired() noexcept;
|
||||
/** @return whether the file is usable for io() */
|
||||
ATTRIBUTE_COLD bool acquire_and_prepare();
|
||||
ATTRIBUTE_COLD bool acquire_and_prepare() noexcept;
|
||||
#endif /*!UNIV_INNOCHECKSUM */
|
||||
};
|
||||
|
||||
|
|
@ -1083,7 +1088,7 @@ struct fil_node_t final
|
|||
ulint block_size;
|
||||
|
||||
/** @return whether this file is open */
|
||||
bool is_open() const { return handle != OS_FILE_CLOSED; }
|
||||
bool is_open() const noexcept { return handle != OS_FILE_CLOSED; }
|
||||
|
||||
/** Read the first page of a data file.
|
||||
@param dpage copy of a first page, from the doublewrite buffer, or nullptr
|
||||
|
|
@ -1094,36 +1099,36 @@ struct fil_node_t final
|
|||
void find_metadata(IF_WIN(,bool create= false)) noexcept;
|
||||
|
||||
/** Close the file handle. */
|
||||
void close();
|
||||
void close() noexcept;
|
||||
/** Same as close() but returns file handle instead of closing it. */
|
||||
pfs_os_file_t detach() MY_ATTRIBUTE((warn_unused_result));
|
||||
pfs_os_file_t detach() noexcept MY_ATTRIBUTE((warn_unused_result));
|
||||
/** Prepare to free a file from fil_system.
|
||||
@param detach_handle whether to detach instead of closing a handle
|
||||
@return detached handle or OS_FILE_CLOSED */
|
||||
inline pfs_os_file_t close_to_free(bool detach_handle= false);
|
||||
inline pfs_os_file_t close_to_free(bool detach_handle= false) noexcept;
|
||||
|
||||
/** Update the data structures on write completion */
|
||||
inline void complete_write();
|
||||
inline void complete_write() noexcept;
|
||||
|
||||
private:
|
||||
/** Does stuff common for close() and detach() */
|
||||
void prepare_to_close_or_detach();
|
||||
void prepare_to_close_or_detach() noexcept;
|
||||
};
|
||||
|
||||
inline bool fil_space_t::use_doublewrite() const
|
||||
inline bool fil_space_t::use_doublewrite() const noexcept
|
||||
{
|
||||
return !UT_LIST_GET_FIRST(chain)->atomic_write && srv_use_doublewrite_buf &&
|
||||
buf_dblwr.is_created();
|
||||
}
|
||||
|
||||
inline void fil_space_t::set_imported()
|
||||
inline void fil_space_t::set_imported() noexcept
|
||||
{
|
||||
ut_ad(being_imported);
|
||||
being_imported= false;
|
||||
UT_LIST_GET_FIRST(chain)->find_metadata();
|
||||
}
|
||||
|
||||
inline bool fil_space_t::is_rotational() const
|
||||
inline bool fil_space_t::is_rotational() const noexcept
|
||||
{
|
||||
for (const fil_node_t *node= UT_LIST_GET_FIRST(chain); node;
|
||||
node= UT_LIST_GET_NEXT(chain, node))
|
||||
|
|
@ -1325,7 +1330,7 @@ constexpr uint16_t FIL_PAGE_COMPRESS_FCRC32_MARKER= 15;
|
|||
/* @} */
|
||||
|
||||
/** @return whether the page type is B-tree or R-tree index */
|
||||
inline bool fil_page_type_is_index(uint16_t page_type)
|
||||
inline bool fil_page_type_is_index(uint16_t page_type) noexcept
|
||||
{
|
||||
switch (page_type) {
|
||||
case FIL_PAGE_TYPE_INSTANT:
|
||||
|
|
@ -1344,7 +1349,7 @@ index */
|
|||
/** Get the file page type.
|
||||
@param[in] page file page
|
||||
@return page type */
|
||||
inline uint16_t fil_page_get_type(const byte *page)
|
||||
inline uint16_t fil_page_get_type(const byte *page) noexcept
|
||||
{
|
||||
return mach_read_from_2(my_assume_aligned<2>(page + FIL_PAGE_TYPE));
|
||||
}
|
||||
|
|
@ -1362,7 +1367,7 @@ or the caller should be in single-threaded crash recovery mode
|
|||
Normally, fil_space_t::get() should be used instead.
|
||||
@param[in] id tablespace ID
|
||||
@return tablespace, or NULL if not found */
|
||||
fil_space_t *fil_space_get(uint32_t id)
|
||||
fil_space_t *fil_space_get(uint32_t id) noexcept
|
||||
MY_ATTRIBUTE((warn_unused_result));
|
||||
|
||||
/** The tablespace memory cache */
|
||||
|
|
@ -1376,7 +1381,7 @@ struct fil_system_t
|
|||
*/
|
||||
fil_system_t() : m_initialised(false) {}
|
||||
|
||||
bool is_initialised() const { return m_initialised; }
|
||||
bool is_initialised() const noexcept { return m_initialised; }
|
||||
|
||||
/**
|
||||
Create the file system interface at database start.
|
||||
|
|
@ -1386,7 +1391,7 @@ struct fil_system_t
|
|||
void create(ulint hash_size);
|
||||
|
||||
/** Close the file system interface at shutdown */
|
||||
void close();
|
||||
void close() noexcept;
|
||||
|
||||
private:
|
||||
bool m_initialised;
|
||||
|
|
@ -1400,7 +1405,7 @@ private:
|
|||
std::vector<dev_t> ssd;
|
||||
public:
|
||||
/** @return whether a file system device is on non-rotational storage */
|
||||
bool is_ssd(dev_t dev) const
|
||||
bool is_ssd(dev_t dev) const noexcept
|
||||
{
|
||||
/* Linux seems to allow up to 15 partitions per block device.
|
||||
If the detected ssd carries "partition number 0" (it is the whole device),
|
||||
|
|
@ -1417,7 +1422,7 @@ public:
|
|||
@param detach_handle whether to detach the handle, instead of closing
|
||||
@return detached handle
|
||||
@retval OS_FILE_CLOSED if no handle was detached */
|
||||
pfs_os_file_t detach(fil_space_t *space, bool detach_handle= false);
|
||||
pfs_os_file_t detach(fil_space_t *space, bool detach_handle= false) noexcept;
|
||||
|
||||
/** the mutex protecting most data fields, and some fields of fil_space_t */
|
||||
mysql_mutex_t mutex;
|
||||
|
|
@ -1457,13 +1462,13 @@ public:
|
|||
fil_system.space_list, so that fil_space_t::try_to_close() should close
|
||||
it as a last resort.
|
||||
@param space space to add */
|
||||
void add_opened_last_to_space_list(fil_space_t *space);
|
||||
void add_opened_last_to_space_list(fil_space_t *space) noexcept;
|
||||
|
||||
/** Move the file to the end of opened spaces list in
|
||||
fil_system.space_list, so that fil_space_t::try_to_close() should close
|
||||
it as a last resort.
|
||||
@param space space to move */
|
||||
inline void move_opened_last_to_space_list(fil_space_t *space)
|
||||
inline void move_opened_last_to_space_list(fil_space_t *space) noexcept
|
||||
{
|
||||
/* In the case when several files of the same space are added in a
|
||||
row, there is no need to remove and add a space to the same position
|
||||
|
|
@ -1479,7 +1484,7 @@ public:
|
|||
fil_space_t::try_to_close() iterates opened files first in FIFO order,
|
||||
i.e. first opened, first closed.
|
||||
@param space space to move */
|
||||
void move_closed_last_to_space_list(fil_space_t *space)
|
||||
void move_closed_last_to_space_list(fil_space_t *space) noexcept
|
||||
{
|
||||
if (UNIV_UNLIKELY(freeze_space_list))
|
||||
return;
|
||||
|
|
@ -1506,21 +1511,21 @@ public:
|
|||
@retval fil_system.temp_space if there is no work to do
|
||||
@retval nullptr upon reaching the end of the iteration */
|
||||
inline fil_space_t* default_encrypt_next(fil_space_t *space, bool recheck,
|
||||
bool encrypt);
|
||||
bool encrypt) noexcept;
|
||||
|
||||
/** Extend all open data files to the recovered size */
|
||||
ATTRIBUTE_COLD void extend_to_recv_size();
|
||||
ATTRIBUTE_COLD void extend_to_recv_size() noexcept;
|
||||
|
||||
/** Determine if a tablespace associated with a file name exists.
|
||||
@param path tablespace file name to look for
|
||||
@return a matching tablespace */
|
||||
inline fil_space_t *find(const char *path) const;
|
||||
inline fil_space_t *find(const char *path) const noexcept;
|
||||
};
|
||||
|
||||
/** The tablespace memory cache. */
|
||||
extern fil_system_t fil_system;
|
||||
|
||||
inline void fil_space_t::reacquire()
|
||||
inline void fil_space_t::reacquire() noexcept
|
||||
{
|
||||
ut_d(uint32_t n=) n_pending.fetch_add(1, std::memory_order_relaxed);
|
||||
#ifdef SAFE_MUTEX
|
||||
|
|
@ -1531,7 +1536,7 @@ inline void fil_space_t::reacquire()
|
|||
}
|
||||
|
||||
/** Flush pending writes from the file system cache to the file. */
|
||||
template<bool have_reference> inline void fil_space_t::flush()
|
||||
template<bool have_reference> inline void fil_space_t::flush() noexcept
|
||||
{
|
||||
mysql_mutex_assert_not_owner(&fil_system.mutex);
|
||||
ut_ad(!have_reference || (pending() & PENDING));
|
||||
|
|
@ -1554,7 +1559,7 @@ template<bool have_reference> inline void fil_space_t::flush()
|
|||
}
|
||||
|
||||
/** @return the size in pages (0 if unreadable) */
|
||||
inline uint32_t fil_space_t::get_size()
|
||||
inline uint32_t fil_space_t::get_size() noexcept
|
||||
{
|
||||
if (!size)
|
||||
{
|
||||
|
|
@ -1572,7 +1577,7 @@ Assigns a new space id for a new single-table tablespace. This works simply by
|
|||
incrementing the global counter. If 4 billion id's is not enough, we may need
|
||||
to recycle id's.
|
||||
@return true if assigned, false if not */
|
||||
bool fil_assign_new_space_id(uint32_t *space_id);
|
||||
bool fil_assign_new_space_id(uint32_t *space_id) noexcept;
|
||||
|
||||
/** Frees a space object from the tablespace memory cache.
|
||||
Closes the files in the chain but does not delete them.
|
||||
|
|
@ -1580,31 +1585,31 @@ There must not be any pending i/o's or flushes on the files.
|
|||
@param id tablespace identifier
|
||||
@param x_latched whether the caller holds exclusive fil_space_t::latch
|
||||
@return true if success */
|
||||
bool fil_space_free(uint32_t id, bool x_latched);
|
||||
bool fil_space_free(uint32_t id, bool x_latched) noexcept;
|
||||
|
||||
/** Set the recovered size of a tablespace in pages.
|
||||
@param id tablespace ID
|
||||
@param size recovered size in pages
|
||||
@param flags tablespace flags */
|
||||
void fil_space_set_recv_size_and_flags(uint32_t id, uint32_t size,
|
||||
uint32_t flags);
|
||||
uint32_t flags) noexcept;
|
||||
|
||||
/*******************************************************************//**
|
||||
Sets the max tablespace id counter if the given number is bigger than the
|
||||
previous value. */
|
||||
void fil_set_max_space_id_if_bigger(uint32_t max_id);
|
||||
void fil_set_max_space_id_if_bigger(uint32_t max_id) noexcept;
|
||||
|
||||
MY_ATTRIBUTE((warn_unused_result))
|
||||
/** Delete a tablespace and associated .ibd file.
|
||||
@param id tablespace identifier
|
||||
@return detached file handle (to be closed by the caller)
|
||||
@return OS_FILE_CLOSED if no file existed */
|
||||
pfs_os_file_t fil_delete_tablespace(uint32_t id);
|
||||
pfs_os_file_t fil_delete_tablespace(uint32_t id) noexcept;
|
||||
|
||||
/** Close a single-table tablespace on failed IMPORT TABLESPACE.
|
||||
The tablespace must be cached in the memory cache.
|
||||
Free all pages used by the tablespace. */
|
||||
void fil_close_tablespace(uint32_t id);
|
||||
void fil_close_tablespace(uint32_t id) noexcept;
|
||||
|
||||
/*******************************************************************//**
|
||||
Allocates and builds a file name from a path, a table or tablespace name
|
||||
|
|
@ -1616,10 +1621,10 @@ and a suffix. The string must be freed by caller with ut_free().
|
|||
@return own: file name */
|
||||
char* fil_make_filepath_low(const char *path,
|
||||
const fil_space_t::name_type &name,
|
||||
ib_extention extension, bool trim_name);
|
||||
ib_extention extension, bool trim_name) noexcept;
|
||||
|
||||
char *fil_make_filepath(const char* path, const table_name_t name,
|
||||
ib_extention suffix, bool strip_name);
|
||||
ib_extention suffix, bool strip_name) noexcept;
|
||||
|
||||
/** Wrapper function over fil_make_filepath_low to build file name.
|
||||
@param path nullptr or the directory path or the full path and filename
|
||||
|
|
@ -1629,7 +1634,7 @@ char *fil_make_filepath(const char* path, const table_name_t name,
|
|||
@return own: file name */
|
||||
static inline char*
|
||||
fil_make_filepath(const char* path, const fil_space_t::name_type &name,
|
||||
ib_extention extension, bool trim_name)
|
||||
ib_extention extension, bool trim_name) noexcept
|
||||
{
|
||||
/* If we are going to strip a name off the path, there better be a
|
||||
path and a new name to put back on. */
|
||||
|
|
@ -1710,7 +1715,7 @@ enum fil_load_status {
|
|||
@return status of the operation */
|
||||
enum fil_load_status
|
||||
fil_ibd_load(uint32_t space_id, const char *filename, fil_space_t *&space)
|
||||
MY_ATTRIBUTE((warn_unused_result));
|
||||
noexcept MY_ATTRIBUTE((warn_unused_result));
|
||||
|
||||
/** Determine if a matching tablespace exists in the InnoDB tablespace
|
||||
memory cache. Note that if we have not done a crash recovery at the database
|
||||
|
|
@ -1720,28 +1725,29 @@ startup, there may be many tablespaces which are not yet in the memory cache.
|
|||
@return the tablespace
|
||||
@retval NULL if no matching tablespace exists in the memory cache */
|
||||
fil_space_t *fil_space_for_table_exists_in_mem(uint32_t id,
|
||||
uint32_t table_flags);
|
||||
uint32_t table_flags) noexcept;
|
||||
|
||||
/** Try to extend a tablespace if it is smaller than the specified size.
|
||||
@param[in,out] space tablespace
|
||||
@param[in] size desired size in pages
|
||||
@return whether the tablespace is at least as big as requested */
|
||||
bool fil_space_extend(fil_space_t *space, uint32_t size);
|
||||
bool fil_space_extend(fil_space_t *space, uint32_t size) noexcept;
|
||||
|
||||
/** Flush to disk the writes in file spaces of the given type
|
||||
possibly cached by the OS. */
|
||||
void fil_flush_file_spaces();
|
||||
void fil_flush_file_spaces() noexcept;
|
||||
/******************************************************************//**
|
||||
Checks the consistency of the tablespace cache.
|
||||
@return true if ok */
|
||||
bool fil_validate();
|
||||
/*********************************************************************//**
|
||||
Sets the file page type. */
|
||||
void
|
||||
fil_page_set_type(
|
||||
/*==============*/
|
||||
byte* page, /*!< in/out: file page */
|
||||
ulint type); /*!< in: type */
|
||||
bool fil_validate() noexcept;
|
||||
|
||||
/** Set the file page type.
|
||||
@param page file page
|
||||
@param type FIL_PAGE_TYPE value */
|
||||
inline void fil_page_set_type(byte *page, uint16_t type) noexcept
|
||||
{
|
||||
mach_write_to_2(page + FIL_PAGE_TYPE, type);
|
||||
}
|
||||
|
||||
/********************************************************************//**
|
||||
Delete the tablespace file and any related files like .cfg.
|
||||
|
|
@ -1749,7 +1755,8 @@ This should not be called for temporary tables. */
|
|||
void
|
||||
fil_delete_file(
|
||||
/*============*/
|
||||
const char* path); /*!< in: filepath of the ibd tablespace */
|
||||
const char* path) /*!< in: filepath of the ibd tablespace */
|
||||
noexcept;
|
||||
|
||||
/** Look up a table space by a given id.
|
||||
@param id tablespace identifier
|
||||
|
|
@ -1760,18 +1767,16 @@ fil_space_t *fil_space_get_by_id(uint32_t id) noexcept;
|
|||
/** Note that a non-predefined persistent tablespace has been modified
|
||||
by redo log.
|
||||
@param[in,out] space tablespace */
|
||||
void
|
||||
fil_names_dirty(
|
||||
fil_space_t* space);
|
||||
void fil_names_dirty(fil_space_t *space) noexcept;
|
||||
|
||||
|
||||
bool fil_comp_algo_loaded(ulint comp_algo);
|
||||
bool fil_comp_algo_loaded(ulint comp_algo) noexcept;
|
||||
|
||||
/** On a log checkpoint, reset fil_names_dirty_and_write() flags
|
||||
and write out FILE_MODIFY if needed, and write FILE_CHECKPOINT.
|
||||
@param lsn checkpoint LSN
|
||||
@return current LSN */
|
||||
ATTRIBUTE_COLD lsn_t fil_names_clear(lsn_t lsn);
|
||||
ATTRIBUTE_COLD lsn_t fil_names_clear(lsn_t lsn) noexcept;
|
||||
|
||||
#ifdef UNIV_ENABLE_UNIT_TEST_MAKE_FILEPATH
|
||||
void test_make_filepath();
|
||||
|
|
@ -1781,12 +1786,14 @@ void test_make_filepath();
|
|||
@param[in] space tablespace
|
||||
@param[in] offset page number
|
||||
@return block size */
|
||||
ulint fil_space_get_block_size(const fil_space_t* space, unsigned offset);
|
||||
ulint fil_space_get_block_size(const fil_space_t* space, unsigned offset)
|
||||
noexcept;
|
||||
|
||||
/** Check whether encryption key found
|
||||
@param crypt_data Encryption data
|
||||
@param f_name File name
|
||||
@return encryption key found */
|
||||
bool fil_crypt_check(fil_space_crypt_t *crypt_data, const char *f_name);
|
||||
bool fil_crypt_check(fil_space_crypt_t *crypt_data, const char *f_name)
|
||||
noexcept;
|
||||
|
||||
#endif /* UNIV_INNOCHECKSUM */
|
||||
|
|
|
|||
|
|
@ -128,9 +128,7 @@ void
|
|||
innobase_mysql_print_thd(
|
||||
/*=====================*/
|
||||
FILE* f, /*!< in: output stream */
|
||||
THD* thd, /*!< in: pointer to a MySQL THD object */
|
||||
uint max_query_len); /*!< in: max query length to print, or 0 to
|
||||
use the default max length */
|
||||
THD* thd); /*!< in: pointer to a MySQL THD object */
|
||||
|
||||
/** Converts a MySQL type to an InnoDB type. Note that this function returns
|
||||
the 'mtype' of InnoDB. InnoDB differentiates between MySQL's old <= 4.1
|
||||
|
|
|
|||
|
|
@ -690,7 +690,7 @@ private:
|
|||
|
||||
/** Write a FILE_MODIFY record when a non-predefined persistent
|
||||
tablespace was modified for the first time since fil_names_clear(). */
|
||||
ATTRIBUTE_NOINLINE ATTRIBUTE_COLD void name_write();
|
||||
ATTRIBUTE_NOINLINE ATTRIBUTE_COLD void name_write() noexcept;
|
||||
|
||||
/** Encrypt the log */
|
||||
ATTRIBUTE_NOINLINE void encrypt();
|
||||
|
|
|
|||
|
|
@ -210,19 +210,20 @@ public:
|
|||
buf_tmp_buffer_t *slot= nullptr) :
|
||||
bpage(bpage), slot(slot), type(type) {}
|
||||
|
||||
bool is_read() const { return (type & READ_SYNC) != 0; }
|
||||
bool is_write() const { return (type & WRITE_SYNC) != 0; }
|
||||
bool is_async() const { return (type & (READ_SYNC ^ READ_ASYNC)) != 0; }
|
||||
bool is_read() const noexcept { return (type & READ_SYNC) != 0; }
|
||||
bool is_write() const noexcept { return (type & WRITE_SYNC) != 0; }
|
||||
bool is_async() const noexcept
|
||||
{ return (type & (READ_SYNC ^ READ_ASYNC)) != 0; }
|
||||
|
||||
void write_complete(int io_error) const;
|
||||
void read_complete(int io_error) const;
|
||||
void fake_read_complete(os_offset_t offset) const;
|
||||
void write_complete(int io_error) const noexcept;
|
||||
void read_complete(int io_error) const noexcept;
|
||||
void fake_read_complete(os_offset_t offset) const noexcept;
|
||||
|
||||
/** If requested, free storage space associated with a section of the file.
|
||||
@param off byte offset from the start (SEEK_SET)
|
||||
@param len size of the hole in bytes
|
||||
@return DB_SUCCESS or error code */
|
||||
dberr_t maybe_punch_hole(os_offset_t off, ulint len)
|
||||
dberr_t maybe_punch_hole(os_offset_t off, ulint len) noexcept
|
||||
{
|
||||
return off && len && node && (type & (PUNCH ^ WRITE_ASYNC))
|
||||
? punch_hole(off, len)
|
||||
|
|
@ -234,7 +235,7 @@ private:
|
|||
@param off byte offset from the start (SEEK_SET)
|
||||
@param len size of the hole in bytes
|
||||
@return DB_SUCCESS or error code */
|
||||
dberr_t punch_hole(os_offset_t off, ulint len) const;
|
||||
dberr_t punch_hole(os_offset_t off, ulint len) const noexcept;
|
||||
|
||||
public:
|
||||
/** Page to be written on write operation */
|
||||
|
|
@ -317,8 +318,7 @@ struct os_file_stat_t {
|
|||
the temporary file is created in the in the mysql server configuration
|
||||
parameter (--tmpdir).
|
||||
@return temporary file handle, or NULL on error */
|
||||
FILE*
|
||||
os_file_create_tmpfile();
|
||||
FILE *os_file_create_tmpfile() noexcept;
|
||||
|
||||
/**
|
||||
This function attempts to create a directory named pathname. The new directory
|
||||
|
|
@ -330,10 +330,8 @@ fail_if_exists arguments is true.
|
|||
@param[in] fail_if_exists if true, pre-existing directory is treated
|
||||
as an error.
|
||||
@return true if call succeeds, false on error */
|
||||
bool
|
||||
os_file_create_directory(
|
||||
const char* pathname,
|
||||
bool fail_if_exists);
|
||||
bool os_file_create_directory(const char *pathname, bool fail_if_exists)
|
||||
noexcept;
|
||||
|
||||
/** NOTE! Use the corresponding macro os_file_create_simple(), not directly
|
||||
this function!
|
||||
|
|
@ -352,7 +350,7 @@ os_file_create_simple_func(
|
|||
os_file_create_t create_mode,
|
||||
ulint access_type,
|
||||
bool read_only,
|
||||
bool* success);
|
||||
bool* success) noexcept;
|
||||
|
||||
/** NOTE! Use the corresponding macro
|
||||
os_file_create_simple_no_error_handling(), not directly this function!
|
||||
|
|
@ -372,7 +370,7 @@ os_file_create_simple_no_error_handling_func(
|
|||
os_file_create_t create_mode,
|
||||
ulint access_type,
|
||||
bool read_only,
|
||||
bool* success)
|
||||
bool* success) noexcept
|
||||
MY_ATTRIBUTE((warn_unused_result));
|
||||
|
||||
#ifndef _WIN32 /* On Microsoft Windows, mandatory locking is used */
|
||||
|
|
@ -380,7 +378,7 @@ os_file_create_simple_no_error_handling_func(
|
|||
@param fd file descriptor
|
||||
@param name file name
|
||||
@return 0 on success */
|
||||
int os_file_lock(int fd, const char *name);
|
||||
int os_file_lock(int fd, const char *name) noexcept;
|
||||
#endif
|
||||
|
||||
/** NOTE! Use the corresponding macro os_file_create(), not directly
|
||||
|
|
@ -400,7 +398,7 @@ os_file_create_func(
|
|||
os_file_create_t create_mode,
|
||||
ulint type,
|
||||
bool read_only,
|
||||
bool* success)
|
||||
bool* success) noexcept
|
||||
MY_ATTRIBUTE((warn_unused_result));
|
||||
|
||||
/** Deletes a file. The file has to be closed before calling this.
|
||||
|
|
@ -841,9 +839,7 @@ to original un-instrumented file I/O APIs */
|
|||
@param[in] file handle to a file
|
||||
@return file size if OK, else set m_total_size to ~0 and m_alloc_size
|
||||
to errno */
|
||||
os_file_size_t
|
||||
os_file_get_size(
|
||||
const char* filename)
|
||||
os_file_size_t os_file_get_size(const char *filename) noexcept
|
||||
MY_ATTRIBUTE((warn_unused_result));
|
||||
|
||||
/** Determine the logical size of a file.
|
||||
|
|
@ -858,9 +854,7 @@ os_offset_t os_file_get_size(os_file_t file) noexcept
|
|||
/** Truncates a file at its current position.
|
||||
@param[in/out] file file to be truncated
|
||||
@return true if success */
|
||||
bool
|
||||
os_file_set_eof(
|
||||
FILE* file); /*!< in: file to be truncated */
|
||||
bool os_file_set_eof(FILE *file) noexcept;
|
||||
|
||||
/** Truncate a file to a specified size in bytes.
|
||||
@param[in] pathname file path
|
||||
|
|
@ -873,16 +867,14 @@ os_file_truncate(
|
|||
const char* pathname,
|
||||
os_file_t file,
|
||||
os_offset_t size,
|
||||
bool allow_shrink = false);
|
||||
bool allow_shrink = false) noexcept;
|
||||
|
||||
/** NOTE! Use the corresponding macro os_file_flush(), not directly this
|
||||
function!
|
||||
Flushes the write buffers of a given file to the disk.
|
||||
@param[in] file handle to a file
|
||||
@return true if success */
|
||||
bool
|
||||
os_file_flush_func(
|
||||
os_file_t file);
|
||||
bool os_file_flush_func(os_file_t file) noexcept;
|
||||
|
||||
/** Retrieves the last error number if an error occurs in a file io function.
|
||||
The number should be retrieved before any other OS calls (because they may
|
||||
|
|
@ -894,7 +886,7 @@ the OS error number + OS_FILE_ERROR_MAX is returned.
|
|||
to the log
|
||||
@return error number, or OS error number + OS_FILE_ERROR_MAX */
|
||||
ulint os_file_get_last_error(bool report_all_errors,
|
||||
bool on_error_silent= false);
|
||||
bool on_error_silent= false) noexcept;
|
||||
|
||||
/** NOTE! Use the corresponding macro os_file_read(), not directly this
|
||||
function!
|
||||
|
|
@ -913,7 +905,7 @@ os_file_read_func(
|
|||
void* buf,
|
||||
os_offset_t offset,
|
||||
ulint n,
|
||||
ulint* o)
|
||||
ulint* o) noexcept
|
||||
MY_ATTRIBUTE((warn_unused_result));
|
||||
|
||||
/** Rewind file to its start, read at most size - 1 bytes from it to str, and
|
||||
|
|
@ -926,7 +918,7 @@ void
|
|||
os_file_read_string(
|
||||
FILE* file,
|
||||
char* str,
|
||||
ulint size);
|
||||
ulint size) noexcept;
|
||||
|
||||
/** NOTE! Use the corresponding macro os_file_write(), not directly this
|
||||
function!
|
||||
|
|
@ -956,7 +948,7 @@ bool
|
|||
os_file_status(
|
||||
const char* path,
|
||||
bool* exists,
|
||||
os_file_type_t* type);
|
||||
os_file_type_t* type) noexcept;
|
||||
|
||||
/** This function reduces a null-terminated full remote path name into
|
||||
the path that is sent by MySQL for DATA DIRECTORY clause. It replaces
|
||||
|
|
@ -970,34 +962,30 @@ This function manipulates that path in place.
|
|||
If the path format is not as expected, just return. The result is used
|
||||
to inform a SHOW CREATE TABLE command.
|
||||
@param[in,out] data_dir_path Full path/data_dir_path */
|
||||
void
|
||||
os_file_make_data_dir_path(
|
||||
char* data_dir_path);
|
||||
void os_file_make_data_dir_path(char *data_dir_path) noexcept;
|
||||
|
||||
/** Create all missing subdirectories along the given path.
|
||||
@return DB_SUCCESS if OK, otherwise error code. */
|
||||
dberr_t
|
||||
os_file_create_subdirs_if_needed(
|
||||
const char* path);
|
||||
dberr_t os_file_create_subdirs_if_needed(const char* path) noexcept;
|
||||
|
||||
#ifdef UNIV_ENABLE_UNIT_TEST_GET_PARENT_DIR
|
||||
/* Test the function os_file_get_parent_dir. */
|
||||
void
|
||||
unit_test_os_file_get_parent_dir();
|
||||
unit_test_os_file_get_parent_dir() noexcept;
|
||||
#endif /* UNIV_ENABLE_UNIT_TEST_GET_PARENT_DIR */
|
||||
|
||||
/**
|
||||
Initializes the asynchronous io system. */
|
||||
int os_aio_init();
|
||||
int os_aio_init() noexcept;
|
||||
|
||||
/**
|
||||
Frees the asynchronous io system. */
|
||||
void os_aio_free();
|
||||
void os_aio_free() noexcept;
|
||||
|
||||
/** Submit a fake read request during crash recovery.
|
||||
@param type fake read request
|
||||
@param offset additional context */
|
||||
void os_fake_read(const IORequest &type, os_offset_t offset);
|
||||
void os_fake_read(const IORequest &type, os_offset_t offset) noexcept;
|
||||
|
||||
/** Request a read or write.
|
||||
@param type I/O request
|
||||
|
|
@ -1006,36 +994,34 @@ void os_fake_read(const IORequest &type, os_offset_t offset);
|
|||
@param n number of bytes
|
||||
@retval DB_SUCCESS if request was queued successfully
|
||||
@retval DB_IO_ERROR on I/O error */
|
||||
dberr_t os_aio(const IORequest &type, void *buf, os_offset_t offset, size_t n);
|
||||
dberr_t os_aio(const IORequest &type, void *buf, os_offset_t offset, size_t n)
|
||||
noexcept;
|
||||
|
||||
/** @return number of pending reads */
|
||||
size_t os_aio_pending_reads();
|
||||
size_t os_aio_pending_reads() noexcept;
|
||||
/** @return approximate number of pending reads */
|
||||
size_t os_aio_pending_reads_approx();
|
||||
size_t os_aio_pending_reads_approx() noexcept;
|
||||
/** @return number of pending writes */
|
||||
size_t os_aio_pending_writes();
|
||||
size_t os_aio_pending_writes() noexcept;
|
||||
|
||||
/** Wait until there are no pending asynchronous writes.
|
||||
@param declare whether the wait will be declared in tpool */
|
||||
void os_aio_wait_until_no_pending_writes(bool declare);
|
||||
void os_aio_wait_until_no_pending_writes(bool declare) noexcept;
|
||||
|
||||
/** Wait until all pending asynchronous reads have completed.
|
||||
@param declare whether the wait will be declared in tpool */
|
||||
void os_aio_wait_until_no_pending_reads(bool declare);
|
||||
void os_aio_wait_until_no_pending_reads(bool declare) noexcept;
|
||||
|
||||
/** Prints info of the aio arrays.
|
||||
@param[in/out] file file where to print */
|
||||
void
|
||||
os_aio_print(FILE* file);
|
||||
void os_aio_print(FILE *file) noexcept;
|
||||
|
||||
/** Refreshes the statistics used to print per-second averages. */
|
||||
void
|
||||
os_aio_refresh_stats();
|
||||
void os_aio_refresh_stats() noexcept;
|
||||
|
||||
/** Checks that all slots in the system have been freed, that is, there are
|
||||
no pending io operations. */
|
||||
bool
|
||||
os_aio_all_slots_free();
|
||||
bool os_aio_all_slots_free() noexcept;
|
||||
|
||||
|
||||
/** This function returns information about the specified file
|
||||
|
|
@ -1050,7 +1036,7 @@ os_file_get_status(
|
|||
const char* path,
|
||||
os_file_stat_t* stat_info,
|
||||
bool check_rw_perm,
|
||||
bool read_only);
|
||||
bool read_only) noexcept;
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
|
|
@ -1061,7 +1047,7 @@ Make file sparse, on Windows.
|
|||
@param[in] is_sparse if true, make file sparse,
|
||||
otherwise "unsparse" the file
|
||||
@return true on success, false on error */
|
||||
bool os_file_set_sparse_win32(os_file_t file, bool is_sparse = true);
|
||||
bool os_file_set_sparse_win32(os_file_t file, bool is_sparse = true) noexcept;
|
||||
|
||||
/**
|
||||
Changes file size on Windows
|
||||
|
|
@ -1078,14 +1064,12 @@ If file is normal, file system allocates storage.
|
|||
@param[in] file file handle
|
||||
@param[in] size size to preserve in bytes
|
||||
@return true if success */
|
||||
bool
|
||||
os_file_set_size(
|
||||
const char* pathname,
|
||||
os_file_t file,
|
||||
os_offset_t size);
|
||||
bool os_file_set_size(const char *pathname, os_file_t file, os_offset_t size)
|
||||
noexcept;
|
||||
|
||||
inline bool
|
||||
os_file_set_size(const char* name, os_file_t file, os_offset_t size, bool)
|
||||
noexcept
|
||||
{
|
||||
return os_file_set_size(name, file, size);
|
||||
}
|
||||
|
|
@ -1109,14 +1093,14 @@ dberr_t
|
|||
os_file_punch_hole(
|
||||
os_file_t fh,
|
||||
os_offset_t off,
|
||||
os_offset_t len)
|
||||
os_offset_t len) noexcept
|
||||
MY_ATTRIBUTE((warn_unused_result));
|
||||
|
||||
/* Determine if a path is an absolute path or not.
|
||||
@param[in] OS directory or file path to evaluate
|
||||
@retval true if an absolute path
|
||||
@retval false if a relative path */
|
||||
inline bool is_absolute_path(const char *path)
|
||||
inline bool is_absolute_path(const char *path) noexcept
|
||||
{
|
||||
switch (path[0]) {
|
||||
#ifdef _WIN32
|
||||
|
|
|
|||
|
|
@ -121,15 +121,13 @@ private:
|
|||
@param id the new owner of the U or X lock */
|
||||
void set_new_owner(pthread_t id)
|
||||
{
|
||||
IF_DBUG(DBUG_ASSERT(writer.exchange(id, std::memory_order_relaxed)),
|
||||
writer.store(id, std::memory_order_relaxed));
|
||||
writer.store(id, std::memory_order_relaxed);
|
||||
}
|
||||
/** Assign the ownership of a write lock to a thread
|
||||
@param id the owner of the U or X lock */
|
||||
void set_first_owner(pthread_t id)
|
||||
{
|
||||
IF_DBUG(DBUG_ASSERT(!writer.exchange(id, std::memory_order_relaxed)),
|
||||
writer.store(id, std::memory_order_relaxed));
|
||||
writer.store(id, std::memory_order_relaxed);
|
||||
}
|
||||
#ifdef UNIV_DEBUG
|
||||
/** Register the current thread as a holder of a shared lock */
|
||||
|
|
|
|||
|
|
@ -211,9 +211,6 @@ trx_print_low(
|
|||
/*!< in: output stream */
|
||||
const trx_t* trx,
|
||||
/*!< in: transaction */
|
||||
ulint max_query_len,
|
||||
/*!< in: max query length to print,
|
||||
or 0 to use the default max length */
|
||||
ulint n_rec_locks,
|
||||
/*!< in: trx->lock.n_rec_locks */
|
||||
ulint n_trx_locks,
|
||||
|
|
@ -228,9 +225,7 @@ void
|
|||
trx_print_latched(
|
||||
/*==============*/
|
||||
FILE* f, /*!< in: output stream */
|
||||
const trx_t* trx, /*!< in: transaction */
|
||||
ulint max_query_len); /*!< in: max query length to print,
|
||||
or 0 to use the default max length */
|
||||
const trx_t* trx); /*!< in: transaction */
|
||||
|
||||
/**********************************************************************//**
|
||||
Prints info about a transaction.
|
||||
|
|
@ -239,9 +234,7 @@ void
|
|||
trx_print(
|
||||
/*======*/
|
||||
FILE* f, /*!< in: output stream */
|
||||
const trx_t* trx, /*!< in: transaction */
|
||||
ulint max_query_len); /*!< in: max query length to print,
|
||||
or 0 to use the default max length */
|
||||
const trx_t* trx); /*!< in: transaction */
|
||||
|
||||
/**********************************************************************//**
|
||||
Determines if a transaction is in the given state.
|
||||
|
|
@ -671,14 +664,14 @@ public:
|
|||
{
|
||||
ut_ad(!mutex_is_owner());
|
||||
mutex.wr_lock();
|
||||
ut_ad(!mutex_owner.exchange(pthread_self(),
|
||||
std::memory_order_relaxed));
|
||||
ut_d(assert(!mutex_owner.exchange(pthread_self(),
|
||||
std::memory_order_relaxed)));
|
||||
}
|
||||
/** Release the mutex */
|
||||
void mutex_unlock()
|
||||
{
|
||||
ut_ad(mutex_owner.exchange(0, std::memory_order_relaxed)
|
||||
== pthread_self());
|
||||
ut_d(assert(mutex_owner.exchange(0, std::memory_order_relaxed) ==
|
||||
pthread_self()));
|
||||
mutex.wr_unlock();
|
||||
}
|
||||
#ifndef SUX_LOCK_GENERIC
|
||||
|
|
|
|||
|
|
@ -5212,7 +5212,7 @@ void lock_trx_print_wait_and_mvcc_state(FILE *file, const trx_t *trx,
|
|||
{
|
||||
fprintf(file, "---");
|
||||
|
||||
trx_print_latched(file, trx, 600);
|
||||
trx_print_latched(file, trx);
|
||||
trx->read_view.print_limits(file);
|
||||
|
||||
if (const lock_t* wait_lock = trx->lock.wait_lock) {
|
||||
|
|
@ -6944,11 +6944,11 @@ namespace Deadlock
|
|||
ulint n_trx_locks= UT_LIST_GET_LEN(trx.lock.trx_locks);
|
||||
ulint heap_size= mem_heap_get_size(trx.lock.lock_heap);
|
||||
|
||||
trx_print_low(lock_latest_err_file, &trx, 3000,
|
||||
trx_print_low(lock_latest_err_file, &trx,
|
||||
n_rec_locks, n_trx_locks, heap_size);
|
||||
|
||||
if (srv_print_all_deadlocks)
|
||||
trx_print_low(stderr, &trx, 3000, n_rec_locks, n_trx_locks, heap_size);
|
||||
trx_print_low(stderr, &trx, n_rec_locks, n_trx_locks, heap_size);
|
||||
}
|
||||
|
||||
/** Print lock data to the deadlock file and possibly to stderr.
|
||||
|
|
|
|||
|
|
@ -3504,7 +3504,7 @@ func_exit:
|
|||
return success;
|
||||
}
|
||||
|
||||
void IORequest::fake_read_complete(os_offset_t offset) const
|
||||
void IORequest::fake_read_complete(os_offset_t offset) const noexcept
|
||||
{
|
||||
ut_ad(node);
|
||||
ut_ad(is_read());
|
||||
|
|
@ -3545,7 +3545,7 @@ void IORequest::fake_read_complete(os_offset_t offset) const
|
|||
}
|
||||
|
||||
/** @return whether a page has been freed */
|
||||
inline bool fil_space_t::is_freed(uint32_t page)
|
||||
inline bool fil_space_t::is_freed(uint32_t page) noexcept
|
||||
{
|
||||
std::lock_guard<std::mutex> freed_lock(freed_range_mutex);
|
||||
return freed_ranges.contains(page);
|
||||
|
|
@ -3843,7 +3843,7 @@ ATTRIBUTE_COLD buf_block_t *recv_sys_t::recover_low(const page_id_t page_id)
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
inline fil_space_t *fil_system_t::find(const char *path) const
|
||||
inline fil_space_t *fil_system_t::find(const char *path) const noexcept
|
||||
{
|
||||
mysql_mutex_assert_owner(&mutex);
|
||||
for (fil_space_t &space : fil_system.space_list)
|
||||
|
|
@ -3853,7 +3853,7 @@ inline fil_space_t *fil_system_t::find(const char *path) const
|
|||
}
|
||||
|
||||
/** Thread-safe function which sorts flush_list by oldest_modification */
|
||||
static void log_sort_flush_list()
|
||||
static void log_sort_flush_list() noexcept
|
||||
{
|
||||
/* Ensure that oldest_modification() cannot change during std::sort() */
|
||||
{
|
||||
|
|
|
|||
|
|
@ -549,7 +549,7 @@ void mtr_t::rollback_to_savepoint(ulint begin, ulint end)
|
|||
}
|
||||
|
||||
/** Set create_lsn. */
|
||||
inline void fil_space_t::set_create_lsn(lsn_t lsn)
|
||||
inline void fil_space_t::set_create_lsn(lsn_t lsn) noexcept
|
||||
{
|
||||
/* Concurrent log_checkpoint_low() must be impossible. */
|
||||
ut_ad(latch.have_wr());
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ os_file_handle_error_cond_exit(
|
|||
const char* name,
|
||||
const char* operation,
|
||||
bool should_abort,
|
||||
bool on_error_silent);
|
||||
bool on_error_silent) noexcept;
|
||||
|
||||
/** Does error handling when a file operation fails.
|
||||
@param operation name of operation that failed */
|
||||
|
|
@ -320,7 +320,7 @@ private:
|
|||
@param fd file descriptor
|
||||
@param name file name
|
||||
@return 0 on success */
|
||||
int os_file_lock(int fd, const char *name)
|
||||
int os_file_lock(int fd, const char *name) noexcept
|
||||
{
|
||||
struct flock lk;
|
||||
|
||||
|
|
@ -349,13 +349,7 @@ int os_file_lock(int fd, const char *name)
|
|||
}
|
||||
#endif /* !_WIN32 */
|
||||
|
||||
|
||||
/** Create a temporary file. This function is like tmpfile(3), but
|
||||
the temporary file is created in the in the mysql server configuration
|
||||
parameter (--tmpdir).
|
||||
@return temporary file handle, or NULL on error */
|
||||
FILE*
|
||||
os_file_create_tmpfile()
|
||||
FILE *os_file_create_tmpfile() noexcept
|
||||
{
|
||||
FILE* file = NULL;
|
||||
File fd = mysql_tmpfile("ib");
|
||||
|
|
@ -388,7 +382,7 @@ void
|
|||
os_file_read_string(
|
||||
FILE* file,
|
||||
char* str,
|
||||
ulint size)
|
||||
ulint size) noexcept
|
||||
{
|
||||
if (size != 0) {
|
||||
rewind(file);
|
||||
|
|
@ -399,21 +393,7 @@ os_file_read_string(
|
|||
}
|
||||
}
|
||||
|
||||
/** This function reduces a null-terminated full remote path name into
|
||||
the path that is sent by MySQL for DATA DIRECTORY clause. It replaces
|
||||
the 'databasename/tablename.ibd' found at the end of the path with just
|
||||
'tablename'.
|
||||
|
||||
Since the result is always smaller than the path sent in, no new memory
|
||||
is allocated. The caller should allocate memory for the path sent in.
|
||||
This function manipulates that path in place.
|
||||
|
||||
If the path format is not as expected, just return. The result is used
|
||||
to inform a SHOW CREATE TABLE command.
|
||||
@param[in,out] data_dir_path Full path/data_dir_path */
|
||||
void
|
||||
os_file_make_data_dir_path(
|
||||
char* data_dir_path)
|
||||
void os_file_make_data_dir_path(char *data_dir_path) noexcept
|
||||
{
|
||||
/* Replace the period before the extension with a null byte. */
|
||||
char* ptr = strrchr(data_dir_path, '.');
|
||||
|
|
@ -462,11 +442,7 @@ to the last directory separator that the caller has fixed.
|
|||
@param[in] path path name
|
||||
@param[in] path last directory separator in the path
|
||||
@return true if this path is a drive root, false if not */
|
||||
UNIV_INLINE
|
||||
bool
|
||||
os_file_is_root(
|
||||
const char* path,
|
||||
const char* last_slash)
|
||||
static bool os_file_is_root(const char *path, const char *last_slash) noexcept
|
||||
{
|
||||
return(
|
||||
#ifdef _WIN32
|
||||
|
|
@ -561,7 +537,7 @@ os_file_get_parent_dir(
|
|||
void
|
||||
test_os_file_get_parent_dir(
|
||||
const char* child_dir,
|
||||
const char* expected_dir)
|
||||
const char* expected_dir) noexcept
|
||||
{
|
||||
char* child = mem_strdup(child_dir);
|
||||
char* expected = expected_dir == NULL ? NULL
|
||||
|
|
@ -584,7 +560,7 @@ test_os_file_get_parent_dir(
|
|||
|
||||
/* Test the function os_file_get_parent_dir. */
|
||||
void
|
||||
unit_test_os_file_get_parent_dir()
|
||||
unit_test_os_file_get_parent_dir() noexcept
|
||||
{
|
||||
test_os_file_get_parent_dir("/usr/lib/a", "/usr/lib");
|
||||
test_os_file_get_parent_dir("/usr/", NULL);
|
||||
|
|
@ -613,12 +589,7 @@ unit_test_os_file_get_parent_dir()
|
|||
#endif /* UNIV_ENABLE_UNIT_TEST_GET_PARENT_DIR */
|
||||
|
||||
|
||||
/** Creates all missing subdirectories along the given path.
|
||||
@param[in] path Path name
|
||||
@return DB_SUCCESS if OK, otherwise error code. */
|
||||
dberr_t
|
||||
os_file_create_subdirs_if_needed(
|
||||
const char* path)
|
||||
dberr_t os_file_create_subdirs_if_needed(const char *path) noexcept
|
||||
{
|
||||
if (srv_read_only_mode) {
|
||||
|
||||
|
|
@ -762,6 +733,7 @@ the OS error number + 100 is returned.
|
|||
to the log
|
||||
@return error number, or OS error number + 100 */
|
||||
ulint os_file_get_last_error(bool report_all_errors, bool on_error_silent)
|
||||
noexcept
|
||||
{
|
||||
int err = errno;
|
||||
|
||||
|
|
@ -829,7 +801,7 @@ Returns the value 0 if successful; otherwise the value -1 is returned and
|
|||
the global variable errno is set to indicate the error.
|
||||
@param[in] file open file handle
|
||||
@return 0 if success, -1 otherwise */
|
||||
static int os_file_sync_posix(os_file_t file)
|
||||
static int os_file_sync_posix(os_file_t file) noexcept
|
||||
{
|
||||
#if !defined(HAVE_FDATASYNC) || HAVE_DECL_FDATASYNC == 0
|
||||
auto func= fsync;
|
||||
|
|
@ -883,7 +855,7 @@ bool
|
|||
os_file_status_posix(
|
||||
const char* path,
|
||||
bool* exists,
|
||||
os_file_type_t* type)
|
||||
os_file_type_t* type) noexcept
|
||||
{
|
||||
struct stat statinfo;
|
||||
|
||||
|
|
@ -919,14 +891,7 @@ os_file_status_posix(
|
|||
return(true);
|
||||
}
|
||||
|
||||
/** NOTE! Use the corresponding macro os_file_flush(), not directly this
|
||||
function!
|
||||
Flushes the write buffers of a given file to the disk.
|
||||
@param[in] file handle to a file
|
||||
@return true if success */
|
||||
bool
|
||||
os_file_flush_func(
|
||||
os_file_t file)
|
||||
bool os_file_flush_func(os_file_t file) noexcept
|
||||
{
|
||||
int ret;
|
||||
|
||||
|
|
@ -972,7 +937,7 @@ os_file_create_simple_func(
|
|||
os_file_create_t create_mode,
|
||||
ulint access_type,
|
||||
bool read_only,
|
||||
bool* success)
|
||||
bool* success) noexcept
|
||||
{
|
||||
pfs_os_file_t file;
|
||||
|
||||
|
|
@ -1045,20 +1010,8 @@ os_file_create_simple_func(
|
|||
return(file);
|
||||
}
|
||||
|
||||
/** This function attempts to create a directory named pathname. The new
|
||||
directory gets default permissions. On Unix the permissions are
|
||||
(0770 & ~umask). If the directory exists already, nothing is done and
|
||||
the call succeeds, unless the fail_if_exists arguments is true.
|
||||
If another error occurs, such as a permission error, this does not crash,
|
||||
but reports the error and returns false.
|
||||
@param[in] pathname directory name as null-terminated string
|
||||
@param[in] fail_if_exists if true, pre-existing directory is treated as
|
||||
an error.
|
||||
@return true if call succeeds, false on error */
|
||||
bool
|
||||
os_file_create_directory(
|
||||
const char* pathname,
|
||||
bool fail_if_exists)
|
||||
bool os_file_create_directory(const char *pathname, bool fail_if_exists)
|
||||
noexcept
|
||||
{
|
||||
int rcode;
|
||||
|
||||
|
|
@ -1141,7 +1094,7 @@ os_file_create_func(
|
|||
os_file_create_t create_mode,
|
||||
ulint type,
|
||||
bool read_only,
|
||||
bool* success)
|
||||
bool* success) noexcept
|
||||
{
|
||||
*success = false;
|
||||
|
||||
|
|
@ -1333,7 +1286,7 @@ os_file_create_simple_no_error_handling_func(
|
|||
os_file_create_t create_mode,
|
||||
ulint access_type,
|
||||
bool read_only,
|
||||
bool* success)
|
||||
bool* success) noexcept
|
||||
{
|
||||
os_file_t file;
|
||||
int create_flag = O_RDONLY | O_CLOEXEC;
|
||||
|
|
@ -1482,13 +1435,7 @@ os_offset_t os_file_get_size(os_file_t file) noexcept
|
|||
return lseek(file, 0, SEEK_END);
|
||||
}
|
||||
|
||||
/** Gets a file size.
|
||||
@param[in] filename Full path to the filename to check
|
||||
@return file size if OK, else set m_total_size to ~0 and m_alloc_size to
|
||||
errno */
|
||||
os_file_size_t
|
||||
os_file_get_size(
|
||||
const char* filename)
|
||||
os_file_size_t os_file_get_size(const char *filename) noexcept
|
||||
{
|
||||
struct stat s;
|
||||
os_file_size_t file_size;
|
||||
|
|
@ -1609,11 +1556,7 @@ os_file_truncate_posix(
|
|||
return(res == 0);
|
||||
}
|
||||
|
||||
/** Truncates a file at its current position.
|
||||
@return true if success */
|
||||
bool
|
||||
os_file_set_eof(
|
||||
FILE* file) /*!< in: file to be truncated */
|
||||
bool os_file_set_eof(FILE *file) noexcept
|
||||
{
|
||||
return(!ftruncate(fileno(file), ftell(file)));
|
||||
}
|
||||
|
|
@ -1815,7 +1758,7 @@ function!
|
|||
Flushes the write buffers of a given file to the disk.
|
||||
@param[in] file handle to a file
|
||||
@return true if success */
|
||||
bool os_file_flush_func(os_file_t file)
|
||||
bool os_file_flush_func(os_file_t file) noexcept
|
||||
{
|
||||
++os_n_fsyncs;
|
||||
static bool disable_datasync;
|
||||
|
|
@ -1862,7 +1805,7 @@ printed of all errors
|
|||
to the log
|
||||
@return error number, or OS error number + OS_FILE_ERROR_MAX */
|
||||
ulint os_file_get_last_error(bool report_all_errors, bool on_error_silent)
|
||||
|
||||
noexcept
|
||||
{
|
||||
ulint err = (ulint) GetLastError();
|
||||
|
||||
|
|
@ -1960,7 +1903,7 @@ os_file_create_simple_func(
|
|||
os_file_create_t create_mode,
|
||||
ulint access_type,
|
||||
bool read_only,
|
||||
bool* success)
|
||||
bool* success) noexcept
|
||||
{
|
||||
os_file_t file;
|
||||
|
||||
|
|
@ -2014,20 +1957,8 @@ os_file_create_simple_func(
|
|||
return(file);
|
||||
}
|
||||
|
||||
/** This function attempts to create a directory named pathname. The new
|
||||
directory gets default permissions. On Unix the permissions are
|
||||
(0770 & ~umask). If the directory exists already, nothing is done and
|
||||
the call succeeds, unless the fail_if_exists arguments is true.
|
||||
If another error occurs, such as a permission error, this does not crash,
|
||||
but reports the error and returns false.
|
||||
@param[in] pathname directory name as null-terminated string
|
||||
@param[in] fail_if_exists if true, pre-existing directory is treated
|
||||
as an error.
|
||||
@return true if call succeeds, false on error */
|
||||
bool
|
||||
os_file_create_directory(
|
||||
const char* pathname,
|
||||
bool fail_if_exists)
|
||||
bool os_file_create_directory(const char *pathname, bool fail_if_exists)
|
||||
noexcept
|
||||
{
|
||||
BOOL rcode;
|
||||
|
||||
|
|
@ -2075,7 +2006,7 @@ os_file_create_func(
|
|||
os_file_create_t create_mode,
|
||||
ulint type,
|
||||
bool read_only,
|
||||
bool* success)
|
||||
bool* success) noexcept
|
||||
{
|
||||
os_file_t file;
|
||||
|
||||
|
|
@ -2202,7 +2133,7 @@ os_file_create_simple_no_error_handling_func(
|
|||
os_file_create_t create_mode,
|
||||
ulint access_type,
|
||||
bool read_only,
|
||||
bool* success)
|
||||
bool* success) noexcept
|
||||
{
|
||||
os_file_t file;
|
||||
|
||||
|
|
@ -2419,13 +2350,7 @@ os_offset_t os_file_get_size(os_file_t file) noexcept
|
|||
return ((os_offset_t) -1);
|
||||
}
|
||||
|
||||
/** Gets a file size.
|
||||
@param[in] filename Full path to the filename to check
|
||||
@return file size if OK, else set m_total_size to ~0 and m_alloc_size to
|
||||
errno */
|
||||
os_file_size_t
|
||||
os_file_get_size(
|
||||
const char* filename)
|
||||
os_file_size_t os_file_get_size(const char *filename) noexcept
|
||||
{
|
||||
struct __stat64 s;
|
||||
os_file_size_t file_size;
|
||||
|
|
@ -2543,7 +2468,7 @@ Sets a sparse flag on Windows file.
|
|||
@return true on success, false on error
|
||||
*/
|
||||
#include <versionhelpers.h>
|
||||
bool os_file_set_sparse_win32(os_file_t file, bool is_sparse)
|
||||
bool os_file_set_sparse_win32(os_file_t file, bool is_sparse) noexcept
|
||||
{
|
||||
if (!is_sparse && !IsWindows8OrGreater()) {
|
||||
/* Cannot unset sparse flag on older Windows.
|
||||
|
|
@ -2558,11 +2483,8 @@ bool os_file_set_sparse_win32(os_file_t file, bool is_sparse)
|
|||
FSCTL_SET_SPARSE, &sparse_buffer, sizeof(sparse_buffer), 0, 0,&temp);
|
||||
}
|
||||
|
||||
bool
|
||||
os_file_set_size(
|
||||
const char* pathname,
|
||||
os_file_t file,
|
||||
os_offset_t size)
|
||||
bool os_file_set_size(const char *pathname, os_file_t file, os_offset_t size)
|
||||
noexcept
|
||||
{
|
||||
LARGE_INTEGER length;
|
||||
|
||||
|
|
@ -2583,12 +2505,7 @@ os_file_set_size(
|
|||
return(success);
|
||||
}
|
||||
|
||||
/** Truncates a file at its current position.
|
||||
@param[in] file Handle to be truncated
|
||||
@return true if success */
|
||||
bool
|
||||
os_file_set_eof(
|
||||
FILE* file)
|
||||
bool os_file_set_eof(FILE *file) noexcept
|
||||
{
|
||||
HANDLE h = (HANDLE) _get_osfhandle(fileno(file));
|
||||
|
||||
|
|
@ -2805,7 +2722,7 @@ os_file_read_func(
|
|||
void* buf,
|
||||
os_offset_t offset,
|
||||
ulint n,
|
||||
ulint* o)
|
||||
ulint* o) noexcept
|
||||
{
|
||||
ut_ad(!type.node || type.node->handle == file);
|
||||
ut_ad(n);
|
||||
|
|
@ -2843,7 +2760,7 @@ os_file_handle_error_cond_exit(
|
|||
const char* name,
|
||||
const char* operation,
|
||||
bool should_abort,
|
||||
bool on_error_silent)
|
||||
bool on_error_silent) noexcept
|
||||
{
|
||||
ulint err;
|
||||
|
||||
|
|
@ -2928,7 +2845,7 @@ os_file_handle_error_cond_exit(
|
|||
/** Check if the file system supports sparse files.
|
||||
@param fh file handle
|
||||
@return true if the file system supports sparse files */
|
||||
static bool os_is_sparse_file_supported(os_file_t fh)
|
||||
static bool os_is_sparse_file_supported(os_file_t fh) noexcept
|
||||
{
|
||||
#ifdef _WIN32
|
||||
FILE_ATTRIBUTE_TAG_INFO info;
|
||||
|
|
@ -2957,7 +2874,7 @@ os_file_truncate(
|
|||
const char* pathname,
|
||||
os_file_t file,
|
||||
os_offset_t size,
|
||||
bool allow_shrink)
|
||||
bool allow_shrink) noexcept
|
||||
{
|
||||
if (!allow_shrink) {
|
||||
/* Do nothing if the size preserved is larger than or
|
||||
|
|
@ -2985,7 +2902,7 @@ bool
|
|||
os_file_status(
|
||||
const char* path,
|
||||
bool* exists,
|
||||
os_file_type_t* type)
|
||||
os_file_type_t* type) noexcept
|
||||
{
|
||||
#ifdef _WIN32
|
||||
return(os_file_status_win32(path, exists, type));
|
||||
|
|
@ -3003,7 +2920,7 @@ dberr_t
|
|||
os_file_punch_hole(
|
||||
os_file_t fh,
|
||||
os_offset_t off,
|
||||
os_offset_t len)
|
||||
os_offset_t len) noexcept
|
||||
{
|
||||
#ifdef _WIN32
|
||||
return os_file_punch_hole_win32(fh, off, len);
|
||||
|
|
@ -3016,7 +2933,7 @@ os_file_punch_hole(
|
|||
@param off byte offset from the start (SEEK_SET)
|
||||
@param len size of the hole in bytes
|
||||
@return DB_SUCCESS or error code */
|
||||
dberr_t IORequest::punch_hole(os_offset_t off, ulint len) const
|
||||
dberr_t IORequest::punch_hole(os_offset_t off, ulint len) const noexcept
|
||||
{
|
||||
ulint trim_len = bpage ? bpage->physical_size() - len : 0;
|
||||
|
||||
|
|
@ -3088,7 +3005,7 @@ os_file_get_status(
|
|||
const char* path,
|
||||
os_file_stat_t* stat_info,
|
||||
bool check_rw_perm,
|
||||
bool read_only)
|
||||
bool read_only) noexcept
|
||||
{
|
||||
dberr_t ret;
|
||||
|
||||
|
|
@ -3281,7 +3198,7 @@ static bool is_linux_native_aio_supported()
|
|||
}
|
||||
#endif
|
||||
|
||||
int os_aio_init()
|
||||
int os_aio_init() noexcept
|
||||
{
|
||||
int max_write_events= int(srv_n_write_io_threads *
|
||||
OS_AIO_N_PENDING_IOS_PER_THREAD);
|
||||
|
|
@ -3346,7 +3263,7 @@ more concurrent threads via thread_group setting.
|
|||
executing write callbacks
|
||||
@return 0 for success, !=0 for error.
|
||||
*/
|
||||
int os_aio_resize(ulint n_reader_threads, ulint n_writer_threads)
|
||||
int os_aio_resize(ulint n_reader_threads, ulint n_writer_threads) noexcept
|
||||
{
|
||||
/* Lock the slots, and wait until all current IOs finish.*/
|
||||
auto &lk_read= read_slots->mutex(), &lk_write= write_slots->mutex();
|
||||
|
|
@ -3385,7 +3302,7 @@ int os_aio_resize(ulint n_reader_threads, ulint n_writer_threads)
|
|||
return ret;
|
||||
}
|
||||
|
||||
void os_aio_free()
|
||||
void os_aio_free() noexcept
|
||||
{
|
||||
delete read_slots;
|
||||
delete write_slots;
|
||||
|
|
@ -3395,7 +3312,7 @@ void os_aio_free()
|
|||
}
|
||||
|
||||
/** Wait until there are no pending asynchronous writes. */
|
||||
static void os_aio_wait_until_no_pending_writes_low(bool declare)
|
||||
static void os_aio_wait_until_no_pending_writes_low(bool declare) noexcept
|
||||
{
|
||||
const bool notify_wait= declare && write_slots->pending_io_count();
|
||||
|
||||
|
|
@ -3410,14 +3327,14 @@ static void os_aio_wait_until_no_pending_writes_low(bool declare)
|
|||
|
||||
/** Wait until there are no pending asynchronous writes.
|
||||
@param declare whether the wait will be declared in tpool */
|
||||
void os_aio_wait_until_no_pending_writes(bool declare)
|
||||
void os_aio_wait_until_no_pending_writes(bool declare) noexcept
|
||||
{
|
||||
os_aio_wait_until_no_pending_writes_low(declare);
|
||||
buf_dblwr.wait_flush_buffered_writes();
|
||||
}
|
||||
|
||||
/** @return number of pending reads */
|
||||
size_t os_aio_pending_reads()
|
||||
size_t os_aio_pending_reads() noexcept
|
||||
{
|
||||
mysql_mutex_lock(&read_slots->mutex());
|
||||
size_t pending= read_slots->pending_io_count();
|
||||
|
|
@ -3426,13 +3343,13 @@ size_t os_aio_pending_reads()
|
|||
}
|
||||
|
||||
/** @return approximate number of pending reads */
|
||||
size_t os_aio_pending_reads_approx()
|
||||
size_t os_aio_pending_reads_approx() noexcept
|
||||
{
|
||||
return read_slots->pending_io_count();
|
||||
}
|
||||
|
||||
/** @return number of pending writes */
|
||||
size_t os_aio_pending_writes()
|
||||
size_t os_aio_pending_writes() noexcept
|
||||
{
|
||||
mysql_mutex_lock(&write_slots->mutex());
|
||||
size_t pending= write_slots->pending_io_count();
|
||||
|
|
@ -3442,7 +3359,7 @@ size_t os_aio_pending_writes()
|
|||
|
||||
/** Wait until all pending asynchronous reads have completed.
|
||||
@param declare whether the wait will be declared in tpool */
|
||||
void os_aio_wait_until_no_pending_reads(bool declare)
|
||||
void os_aio_wait_until_no_pending_reads(bool declare) noexcept
|
||||
{
|
||||
const bool notify_wait= declare && read_slots->pending_io_count();
|
||||
|
||||
|
|
@ -3458,7 +3375,7 @@ void os_aio_wait_until_no_pending_reads(bool declare)
|
|||
/** Submit a fake read request during crash recovery.
|
||||
@param type fake read request
|
||||
@param offset additional context */
|
||||
void os_fake_read(const IORequest &type, os_offset_t offset)
|
||||
void os_fake_read(const IORequest &type, os_offset_t offset) noexcept
|
||||
{
|
||||
tpool::aiocb *cb= read_slots->acquire();
|
||||
|
||||
|
|
@ -3485,6 +3402,7 @@ void os_fake_read(const IORequest &type, os_offset_t offset)
|
|||
@retval DB_SUCCESS if request was queued successfully
|
||||
@retval DB_IO_ERROR on I/O error */
|
||||
dberr_t os_aio(const IORequest &type, void *buf, os_offset_t offset, size_t n)
|
||||
noexcept
|
||||
{
|
||||
ut_ad(n > 0);
|
||||
ut_ad(!(n & 511)); /* payload of page_compressed tables */
|
||||
|
|
@ -3562,10 +3480,7 @@ func_exit:
|
|||
goto func_exit;
|
||||
}
|
||||
|
||||
/** Prints info of the aio arrays.
|
||||
@param[in,out] file file where to print */
|
||||
void
|
||||
os_aio_print(FILE* file)
|
||||
void os_aio_print(FILE *file) noexcept
|
||||
{
|
||||
time_t current_time;
|
||||
double time_elapsed;
|
||||
|
|
@ -3614,9 +3529,7 @@ os_aio_print(FILE* file)
|
|||
os_last_printout = current_time;
|
||||
}
|
||||
|
||||
/** Refreshes the statistics used to print per-second averages. */
|
||||
void
|
||||
os_aio_refresh_stats()
|
||||
void os_aio_refresh_stats() noexcept
|
||||
{
|
||||
os_n_fsyncs_old = os_n_fsyncs;
|
||||
|
||||
|
|
|
|||
|
|
@ -723,7 +723,7 @@ row_ins_foreign_trx_print(
|
|||
ut_print_timestamp(dict_foreign_err_file);
|
||||
fputs(" Transaction:\n", dict_foreign_err_file);
|
||||
|
||||
trx_print_low(dict_foreign_err_file, trx, 600,
|
||||
trx_print_low(dict_foreign_err_file, trx,
|
||||
n_rec_locks, n_trx_locks, heap_size);
|
||||
|
||||
mysql_mutex_assert_owner(&dict_foreign_err_mutex);
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ const byte timestamp_max_bytes[7] = {
|
|||
};
|
||||
|
||||
|
||||
static const ulint MAX_DETAILED_ERROR_LEN = 256;
|
||||
static const ulint MAX_DETAILED_ERROR_LEN = 512;
|
||||
|
||||
/*************************************************************//**
|
||||
Set detailed error message for the transaction. */
|
||||
|
|
@ -1764,9 +1764,6 @@ trx_print_low(
|
|||
/*!< in: output stream */
|
||||
const trx_t* trx,
|
||||
/*!< in: transaction */
|
||||
ulint max_query_len,
|
||||
/*!< in: max query length to print,
|
||||
or 0 to use the default max length */
|
||||
ulint n_rec_locks,
|
||||
/*!< in: trx->lock.n_rec_locks */
|
||||
ulint n_trx_locks,
|
||||
|
|
@ -1856,7 +1853,7 @@ state_ok:
|
|||
}
|
||||
|
||||
if (thd) {
|
||||
innobase_mysql_print_thd(f, thd, uint(max_query_len));
|
||||
innobase_mysql_print_thd(f, thd);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1868,13 +1865,11 @@ void
|
|||
trx_print_latched(
|
||||
/*==============*/
|
||||
FILE* f, /*!< in: output stream */
|
||||
const trx_t* trx, /*!< in: transaction */
|
||||
ulint max_query_len) /*!< in: max query length to print,
|
||||
or 0 to use the default max length */
|
||||
const trx_t* trx) /*!< in: transaction */
|
||||
{
|
||||
lock_sys.assert_locked();
|
||||
|
||||
trx_print_low(f, trx, max_query_len,
|
||||
trx_print_low(f, trx,
|
||||
trx->lock.n_rec_locks,
|
||||
UT_LIST_GET_LEN(trx->lock.trx_locks),
|
||||
mem_heap_get_size(trx->lock.lock_heap));
|
||||
|
|
@ -1888,9 +1883,7 @@ void
|
|||
trx_print(
|
||||
/*======*/
|
||||
FILE* f, /*!< in: output stream */
|
||||
const trx_t* trx, /*!< in: transaction */
|
||||
ulint max_query_len) /*!< in: max query length to print,
|
||||
or 0 to use the default max length */
|
||||
const trx_t* trx) /*!< in: transaction */
|
||||
{
|
||||
ulint n_rec_locks, n_trx_locks, heap_size;
|
||||
{
|
||||
|
|
@ -1900,7 +1893,7 @@ trx_print(
|
|||
heap_size= mem_heap_get_size(trx->lock.lock_heap);
|
||||
}
|
||||
|
||||
trx_print_low(f, trx, max_query_len, n_rec_locks, n_trx_locks, heap_size);
|
||||
trx_print_low(f, trx, n_rec_locks, n_trx_locks, heap_size);
|
||||
}
|
||||
|
||||
/** Prepare a transaction.
|
||||
|
|
|
|||
|
|
@ -760,28 +760,34 @@ static bool allow_drop_table_privilege() {
|
|||
PFS_readonly_acl pfs_readonly_acl;
|
||||
|
||||
ACL_internal_access_result
|
||||
PFS_readonly_acl::check(privilege_t want_access, privilege_t *save_priv) const
|
||||
PFS_readonly_acl::check(privilege_t want_access,
|
||||
privilege_t *save_priv, bool any_combination_will_do) const
|
||||
{
|
||||
const privilege_t always_forbidden= INSERT_ACL | UPDATE_ACL | DELETE_ACL
|
||||
| /* CREATE_ACL | */ REFERENCES_ACL | INDEX_ACL | ALTER_ACL
|
||||
| CREATE_VIEW_ACL | SHOW_VIEW_ACL | TRIGGER_ACL | LOCK_TABLES_ACL;
|
||||
|
||||
if (unlikely((want_access & always_forbidden) != NO_ACL))
|
||||
return ACL_INTERNAL_ACCESS_DENIED;
|
||||
|
||||
return ACL_INTERNAL_ACCESS_CHECK_GRANT;
|
||||
if (any_combination_will_do)
|
||||
return want_access & ~always_forbidden
|
||||
? ACL_INTERNAL_ACCESS_CHECK_GRANT: ACL_INTERNAL_ACCESS_DENIED;
|
||||
else
|
||||
return want_access & always_forbidden
|
||||
? ACL_INTERNAL_ACCESS_DENIED : ACL_INTERNAL_ACCESS_CHECK_GRANT;
|
||||
}
|
||||
|
||||
|
||||
PFS_readonly_world_acl pfs_readonly_world_acl;
|
||||
|
||||
ACL_internal_access_result
|
||||
PFS_readonly_world_acl::check(privilege_t want_access, privilege_t *save_priv) const
|
||||
PFS_readonly_world_acl::check(privilege_t want_access,
|
||||
privilege_t *save_priv, bool any_combination_will_do) const
|
||||
{
|
||||
ACL_internal_access_result res= PFS_readonly_acl::check(want_access, save_priv);
|
||||
ACL_internal_access_result res=
|
||||
PFS_readonly_acl::check(want_access, save_priv, any_combination_will_do);
|
||||
if (res == ACL_INTERNAL_ACCESS_CHECK_GRANT)
|
||||
{
|
||||
if (want_access == SELECT_ACL)
|
||||
if (any_combination_will_do ?
|
||||
((want_access & SELECT_ACL) != NO_ACL) : (want_access == SELECT_ACL))
|
||||
res= ACL_INTERNAL_ACCESS_GRANTED;
|
||||
}
|
||||
return res;
|
||||
|
|
@ -790,9 +796,11 @@ PFS_readonly_world_acl::check(privilege_t want_access, privilege_t *save_priv) c
|
|||
PFS_readonly_processlist_acl pfs_readonly_processlist_acl;
|
||||
|
||||
ACL_internal_access_result PFS_readonly_processlist_acl::check(
|
||||
privilege_t want_access, privilege_t *save_priv) const {
|
||||
privilege_t want_access,
|
||||
privilege_t *save_priv, bool any_combination_will_do) const
|
||||
{
|
||||
ACL_internal_access_result res =
|
||||
PFS_readonly_acl::check(want_access, save_priv);
|
||||
PFS_readonly_acl::check(want_access, save_priv, any_combination_will_do);
|
||||
|
||||
if ((res == ACL_INTERNAL_ACCESS_CHECK_GRANT) && (want_access == SELECT_ACL)) {
|
||||
THD *thd = current_thd;
|
||||
|
|
@ -818,34 +826,41 @@ ACL_internal_access_result PFS_readonly_processlist_acl::check(
|
|||
PFS_truncatable_acl pfs_truncatable_acl;
|
||||
|
||||
ACL_internal_access_result
|
||||
PFS_truncatable_acl::check(privilege_t want_access, privilege_t *save_priv) const
|
||||
PFS_truncatable_acl::check(privilege_t want_access,
|
||||
privilege_t *save_priv, bool any_combination_will_do) const
|
||||
{
|
||||
const privilege_t always_forbidden= INSERT_ACL | UPDATE_ACL | DELETE_ACL
|
||||
| /* CREATE_ACL | */ REFERENCES_ACL | INDEX_ACL | ALTER_ACL
|
||||
| CREATE_VIEW_ACL | SHOW_VIEW_ACL | TRIGGER_ACL | LOCK_TABLES_ACL;
|
||||
|
||||
if (unlikely((want_access & always_forbidden) != NO_ACL))
|
||||
return ACL_INTERNAL_ACCESS_DENIED;
|
||||
|
||||
return ACL_INTERNAL_ACCESS_CHECK_GRANT;
|
||||
if (any_combination_will_do)
|
||||
return want_access & ~always_forbidden
|
||||
? ACL_INTERNAL_ACCESS_CHECK_GRANT: ACL_INTERNAL_ACCESS_DENIED;
|
||||
else
|
||||
return want_access & always_forbidden
|
||||
? ACL_INTERNAL_ACCESS_DENIED : ACL_INTERNAL_ACCESS_CHECK_GRANT;
|
||||
}
|
||||
|
||||
|
||||
PFS_truncatable_world_acl pfs_truncatable_world_acl;
|
||||
|
||||
ACL_internal_access_result
|
||||
PFS_truncatable_world_acl::check(privilege_t want_access, privilege_t *save_priv) const
|
||||
PFS_truncatable_world_acl::check(privilege_t want_access,
|
||||
privilege_t *save_priv, bool any_combination_will_do) const
|
||||
{
|
||||
ACL_internal_access_result res= PFS_truncatable_acl::check(want_access, save_priv);
|
||||
ACL_internal_access_result res=
|
||||
PFS_truncatable_acl::check(want_access, save_priv, any_combination_will_do);
|
||||
if (res == ACL_INTERNAL_ACCESS_CHECK_GRANT)
|
||||
{
|
||||
if (want_access == DROP_ACL)
|
||||
if (any_combination_will_do ?
|
||||
((want_access & SELECT_ACL) != NO_ACL) : (want_access == SELECT_ACL))
|
||||
res= ACL_INTERNAL_ACCESS_GRANTED;
|
||||
else if (any_combination_will_do ?
|
||||
((want_access & DROP_ACL) != NO_ACL) : (want_access == DROP_ACL))
|
||||
{
|
||||
if (allow_drop_table_privilege())
|
||||
res= ACL_INTERNAL_ACCESS_GRANTED;
|
||||
}
|
||||
else if (want_access == SELECT_ACL)
|
||||
res= ACL_INTERNAL_ACCESS_GRANTED;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
|
@ -854,44 +869,48 @@ PFS_truncatable_world_acl::check(privilege_t want_access, privilege_t *save_priv
|
|||
PFS_updatable_acl pfs_updatable_acl;
|
||||
|
||||
ACL_internal_access_result
|
||||
PFS_updatable_acl::check(privilege_t want_access, privilege_t *save_priv) const
|
||||
PFS_updatable_acl::check(privilege_t want_access,
|
||||
privilege_t *save_priv, bool any_combination_will_do) const
|
||||
{
|
||||
const privilege_t always_forbidden= INSERT_ACL | DELETE_ACL
|
||||
| /* CREATE_ACL | */ REFERENCES_ACL | INDEX_ACL | ALTER_ACL
|
||||
| CREATE_VIEW_ACL | SHOW_VIEW_ACL | TRIGGER_ACL;
|
||||
|
||||
if (unlikely((want_access & always_forbidden) != NO_ACL))
|
||||
return ACL_INTERNAL_ACCESS_DENIED;
|
||||
|
||||
return ACL_INTERNAL_ACCESS_CHECK_GRANT;
|
||||
if (any_combination_will_do)
|
||||
return want_access & ~always_forbidden
|
||||
? ACL_INTERNAL_ACCESS_CHECK_GRANT: ACL_INTERNAL_ACCESS_DENIED;
|
||||
else
|
||||
return want_access & always_forbidden
|
||||
? ACL_INTERNAL_ACCESS_DENIED : ACL_INTERNAL_ACCESS_CHECK_GRANT;
|
||||
}
|
||||
|
||||
PFS_editable_acl pfs_editable_acl;
|
||||
|
||||
ACL_internal_access_result
|
||||
PFS_editable_acl::check(privilege_t want_access, privilege_t *save_priv) const
|
||||
PFS_editable_acl::check(privilege_t want_access,
|
||||
privilege_t *save_priv, bool any_combination_will_do) const
|
||||
{
|
||||
const privilege_t always_forbidden= /* CREATE_ACL | */ REFERENCES_ACL
|
||||
| INDEX_ACL | ALTER_ACL | CREATE_VIEW_ACL | SHOW_VIEW_ACL | TRIGGER_ACL;
|
||||
|
||||
if (unlikely((want_access & always_forbidden) != NO_ACL))
|
||||
return ACL_INTERNAL_ACCESS_DENIED;
|
||||
|
||||
return ACL_INTERNAL_ACCESS_CHECK_GRANT;
|
||||
if (any_combination_will_do)
|
||||
return want_access & ~always_forbidden
|
||||
? ACL_INTERNAL_ACCESS_CHECK_GRANT: ACL_INTERNAL_ACCESS_DENIED;
|
||||
else
|
||||
return want_access & always_forbidden
|
||||
? ACL_INTERNAL_ACCESS_DENIED : ACL_INTERNAL_ACCESS_CHECK_GRANT;
|
||||
}
|
||||
|
||||
PFS_unknown_acl pfs_unknown_acl;
|
||||
|
||||
ACL_internal_access_result
|
||||
PFS_unknown_acl::check(privilege_t want_access, privilege_t *save_priv) const
|
||||
PFS_unknown_acl::check(privilege_t want_access,
|
||||
privilege_t *save_priv, bool any_combination_will_do) const
|
||||
{
|
||||
const privilege_t always_forbidden= CREATE_ACL
|
||||
| REFERENCES_ACL | INDEX_ACL | ALTER_ACL
|
||||
| CREATE_VIEW_ACL | TRIGGER_ACL;
|
||||
|
||||
if (unlikely((want_access & always_forbidden) != NO_ACL))
|
||||
return ACL_INTERNAL_ACCESS_DENIED;
|
||||
|
||||
/*
|
||||
There is no point in hiding (by enforcing ACCESS_DENIED for SELECT_ACL
|
||||
on performance_schema.*) tables that do not exist anyway.
|
||||
|
|
@ -902,7 +921,12 @@ PFS_unknown_acl::check(privilege_t want_access, privilege_t *save_priv) const
|
|||
The same goes for other DML (INSERT_ACL | UPDATE_ACL | DELETE_ACL),
|
||||
for ease of use: error messages will be less surprising.
|
||||
*/
|
||||
return ACL_INTERNAL_ACCESS_CHECK_GRANT;
|
||||
if (any_combination_will_do)
|
||||
return want_access & ~always_forbidden
|
||||
? ACL_INTERNAL_ACCESS_CHECK_GRANT: ACL_INTERNAL_ACCESS_DENIED;
|
||||
else
|
||||
return want_access & always_forbidden
|
||||
? ACL_INTERNAL_ACCESS_DENIED : ACL_INTERNAL_ACCESS_CHECK_GRANT;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -341,7 +341,7 @@ public:
|
|||
~PFS_readonly_acl() = default;
|
||||
|
||||
ACL_internal_access_result check(privilege_t want_access,
|
||||
privilege_t *save_priv) const override;
|
||||
privilege_t *save_priv, bool any_combination_will_do) const override;
|
||||
};
|
||||
|
||||
/** Singleton instance of PFS_readonly_acl. */
|
||||
|
|
@ -359,7 +359,7 @@ public:
|
|||
~PFS_truncatable_acl() = default;
|
||||
|
||||
ACL_internal_access_result check(privilege_t want_access,
|
||||
privilege_t *save_priv) const override;
|
||||
privilege_t *save_priv, bool any_combination_will_do) const override;
|
||||
};
|
||||
|
||||
/** Singleton instance of PFS_truncatable_acl. */
|
||||
|
|
@ -377,7 +377,7 @@ public:
|
|||
~PFS_updatable_acl() = default;
|
||||
|
||||
ACL_internal_access_result check(privilege_t want_access,
|
||||
privilege_t *save_priv) const override;
|
||||
privilege_t *save_priv, bool any_combination_will_do) const override;
|
||||
};
|
||||
|
||||
/** Singleton instance of PFS_updatable_acl. */
|
||||
|
|
@ -395,7 +395,7 @@ public:
|
|||
~PFS_editable_acl() = default;
|
||||
|
||||
ACL_internal_access_result check(privilege_t want_access,
|
||||
privilege_t *save_priv) const override;
|
||||
privilege_t *save_priv, bool any_combination_will_do) const override;
|
||||
};
|
||||
|
||||
/** Singleton instance of PFS_editable_acl. */
|
||||
|
|
@ -412,7 +412,7 @@ public:
|
|||
~PFS_unknown_acl() = default;
|
||||
|
||||
ACL_internal_access_result check(privilege_t want_access,
|
||||
privilege_t *save_priv) const override;
|
||||
privilege_t *save_priv, bool any_combination_will_do) const override;
|
||||
};
|
||||
|
||||
/** Singleton instance of PFS_unknown_acl. */
|
||||
|
|
@ -430,7 +430,8 @@ public:
|
|||
|
||||
~PFS_readonly_world_acl()
|
||||
{}
|
||||
ACL_internal_access_result check(privilege_t want_access, privilege_t *save_priv) const override;
|
||||
ACL_internal_access_result check(privilege_t want_access,
|
||||
privilege_t *save_priv, bool any_combination_will_do) const override;
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -449,7 +450,8 @@ public:
|
|||
|
||||
~PFS_truncatable_world_acl()
|
||||
{}
|
||||
ACL_internal_access_result check(privilege_t want_access, privilege_t *save_priv) const override;
|
||||
ACL_internal_access_result check(privilege_t want_access,
|
||||
privilege_t *save_priv, bool any_combination_will_do) const override;
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -469,7 +471,7 @@ class PFS_readonly_processlist_acl : public PFS_readonly_acl {
|
|||
{}
|
||||
|
||||
ACL_internal_access_result check(privilege_t want_access,
|
||||
privilege_t *save_priv) const override;
|
||||
privilege_t *save_priv, bool any_combination_will_do) const override;
|
||||
};
|
||||
|
||||
/** Singleton instance of PFS_readonly_processlist_acl */
|
||||
|
|
|
|||
|
|
@ -1543,12 +1543,12 @@ d53_10 double(53,10) NO NULL
|
|||
pk double NO PRI NULL
|
||||
INSERT INTO t1 (f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10,pk) VALUES (12345.12345,12345.12345,0.9,123456789.123,56789.987,11111111.111,8.0,0.0123456789,1234566789123456789,99999999999999999.99999999,1);
|
||||
SELECT f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10 FROM t1;
|
||||
f 12345.1
|
||||
d 11111111.111
|
||||
d10_10 0.0123456789
|
||||
d1_0 8
|
||||
d53 1234566789123456800
|
||||
d53_10 100000000000000000.0000000000
|
||||
f 12345.1
|
||||
f0 12345.1
|
||||
f20_3 56789.988
|
||||
f23_0 123457000
|
||||
|
|
@ -1571,7 +1571,6 @@ Warnings:
|
|||
Warning 1264 Out of range value for column 'd53' at row 1
|
||||
Warning 1264 Out of range value for column 'd53_10' at row 1
|
||||
SELECT f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10 FROM t1;
|
||||
f 12345.1
|
||||
d 0
|
||||
d 11111111.111
|
||||
d 1e81
|
||||
|
|
@ -1588,6 +1587,7 @@ d53_10 0.0000000000
|
|||
d53_10 100000000000000000.0000000000
|
||||
d53_10 10000000000000000000000000000000000000000000.0000000000
|
||||
f 0
|
||||
f 12345.1
|
||||
f 1e38
|
||||
f0 0
|
||||
f0 12345.1
|
||||
|
|
@ -1603,7 +1603,6 @@ r1_1 0.9
|
|||
r1_1 0.9
|
||||
INSERT INTO t1 (f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10,pk) VALUES (-999999999999999999999999,-99999999999.999999999999,-0.9,-999.99999999999999999999,-99999999999999999.999,-999999999999999999999999999999999999999999999999999999999999-0.999,-9,-.9999999999,-999999999999999999999999999999.99999999999999999999999,-9999999999999999999999999999999999999999999.9999999999,4);
|
||||
SELECT f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10 FROM t1;
|
||||
f 12345.1
|
||||
d -1e60
|
||||
d 0
|
||||
d 11111111.111
|
||||
|
|
@ -1626,6 +1625,7 @@ d53_10 100000000000000000.0000000000
|
|||
d53_10 10000000000000000000000000000000000000000000.0000000000
|
||||
f -1e24
|
||||
f 0
|
||||
f 12345.1
|
||||
f 1e38
|
||||
f0 -100000000000
|
||||
f0 0
|
||||
|
|
@ -1654,12 +1654,12 @@ CONCAT('', MAX(d1_0)),
|
|||
CONCAT('', MAX(d10_10)),
|
||||
CONCAT('', MAX(d53)),
|
||||
CONCAT('', MAX(d53_10)) FROM t1;
|
||||
CONCAT('', MAX(f)) 1e38
|
||||
CONCAT('', MAX(d)) 1e81
|
||||
CONCAT('', MAX(d10_10)) 0.9999999999
|
||||
CONCAT('', MAX(d1_0)) 9
|
||||
CONCAT('', MAX(d53)) 100000000000000000000000000000000000000000000000000000
|
||||
CONCAT('', MAX(d53_10)) 10000000000000000000000000000000000000000000.0000000000
|
||||
CONCAT('', MAX(f)) 1e38
|
||||
CONCAT('', MAX(f0)) 1e38
|
||||
CONCAT('', MAX(f20_3)) 99999998430674940.000
|
||||
CONCAT('', MAX(f23_0)) 1e38
|
||||
|
|
@ -1688,7 +1688,6 @@ Warning 1264 Out of range value for column 'd10_10' at row 1
|
|||
Warning 1264 Out of range value for column 'd53' at row 1
|
||||
Warning 1264 Out of range value for column 'd53_10' at row 1
|
||||
SELECT f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10 FROM t1;
|
||||
f 12345.1
|
||||
d -1e60
|
||||
d 0
|
||||
d 11111111.111
|
||||
|
|
@ -1716,6 +1715,7 @@ d53_10 10000000000000000000000000000000000000000000.0000000000
|
|||
d53_10 10000000000000000000000000000000000000000000.0000000000
|
||||
f -1e24
|
||||
f 0
|
||||
f 12345.1
|
||||
f 1e38
|
||||
f 3.40282e38
|
||||
f0 -100000000000
|
||||
|
|
@ -1763,7 +1763,6 @@ Warning 1264 Out of range value for column 'd10_10' at row 1
|
|||
Warning 1264 Out of range value for column 'd53' at row 1
|
||||
Warning 1264 Out of range value for column 'd53_10' at row 1
|
||||
SELECT f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10 FROM t1;
|
||||
f 12345.1
|
||||
d -1e60
|
||||
d 0
|
||||
d 11111111.111
|
||||
|
|
@ -1796,6 +1795,7 @@ d53_10 10000000000000000000000000000000000000000000.0000000000
|
|||
d53_10 10000000000000000000000000000000000000000000.0000000000
|
||||
f -1e24
|
||||
f 0
|
||||
f 12345.1
|
||||
f 1e38
|
||||
f 3.40282e38
|
||||
f 3.40282e38
|
||||
|
|
|
|||
|
|
@ -1330,12 +1330,12 @@ d53_10 double(53,10) YES NULL
|
|||
pk double NO PRI NULL
|
||||
INSERT INTO t1 (f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10,pk) VALUES (12345.12345,12345.12345,0.9,123456789.123,56789.987,11111111.111,8.0,0.0123456789,1234566789123456789,99999999999999999.99999999,1);
|
||||
SELECT f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10 FROM t1;
|
||||
f 12345.1
|
||||
d 11111111.111
|
||||
d10_10 0.0123456789
|
||||
d1_0 8
|
||||
d53 1234566789123456800
|
||||
d53_10 100000000000000000.0000000000
|
||||
f 12345.1
|
||||
f0 12345.1
|
||||
f20_3 56789.988
|
||||
f23_0 123457000
|
||||
|
|
@ -1358,7 +1358,6 @@ Warnings:
|
|||
Warning 1264 Out of range value for column 'd53' at row 1
|
||||
Warning 1264 Out of range value for column 'd53_10' at row 1
|
||||
SELECT f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10 FROM t1;
|
||||
f 12345.1
|
||||
d 0
|
||||
d 11111111.111
|
||||
d 1e81
|
||||
|
|
@ -1375,6 +1374,7 @@ d53_10 0.0000000000
|
|||
d53_10 100000000000000000.0000000000
|
||||
d53_10 10000000000000000000000000000000000000000000.0000000000
|
||||
f 0
|
||||
f 12345.1
|
||||
f 1e38
|
||||
f0 0
|
||||
f0 12345.1
|
||||
|
|
@ -1390,7 +1390,6 @@ r1_1 0.9
|
|||
r1_1 0.9
|
||||
INSERT INTO t1 (f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10,pk) VALUES (-999999999999999999999999,-99999999999.999999999999,-0.9,-999.99999999999999999999,-99999999999999999.999,-999999999999999999999999999999999999999999999999999999999999-0.999,-9,-.9999999999,-999999999999999999999999999999.99999999999999999999999,-9999999999999999999999999999999999999999999.9999999999,4);
|
||||
SELECT f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10 FROM t1;
|
||||
f 12345.1
|
||||
d -1e60
|
||||
d 0
|
||||
d 11111111.111
|
||||
|
|
@ -1413,6 +1412,7 @@ d53_10 100000000000000000.0000000000
|
|||
d53_10 10000000000000000000000000000000000000000000.0000000000
|
||||
f -1e24
|
||||
f 0
|
||||
f 12345.1
|
||||
f 1e38
|
||||
f0 -100000000000
|
||||
f0 0
|
||||
|
|
@ -1441,12 +1441,12 @@ CONCAT('', MAX(d1_0)),
|
|||
CONCAT('', MAX(d10_10)),
|
||||
CONCAT('', MAX(d53)),
|
||||
CONCAT('', MAX(d53_10)) FROM t1;
|
||||
CONCAT('', MAX(f)) 1e38
|
||||
CONCAT('', MAX(d)) 1e81
|
||||
CONCAT('', MAX(d10_10)) 0.9999999999
|
||||
CONCAT('', MAX(d1_0)) 9
|
||||
CONCAT('', MAX(d53)) 100000000000000000000000000000000000000000000000000000
|
||||
CONCAT('', MAX(d53_10)) 10000000000000000000000000000000000000000000.0000000000
|
||||
CONCAT('', MAX(f)) 1e38
|
||||
CONCAT('', MAX(f0)) 1e38
|
||||
CONCAT('', MAX(f20_3)) 99999998430674940.000
|
||||
CONCAT('', MAX(f23_0)) 1e38
|
||||
|
|
@ -1475,7 +1475,6 @@ Warning 1264 Out of range value for column 'd10_10' at row 1
|
|||
Warning 1264 Out of range value for column 'd53' at row 1
|
||||
Warning 1264 Out of range value for column 'd53_10' at row 1
|
||||
SELECT f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10 FROM t1;
|
||||
f 12345.1
|
||||
d -1e60
|
||||
d 0
|
||||
d 11111111.111
|
||||
|
|
@ -1503,6 +1502,7 @@ d53_10 10000000000000000000000000000000000000000000.0000000000
|
|||
d53_10 10000000000000000000000000000000000000000000.0000000000
|
||||
f -1e24
|
||||
f 0
|
||||
f 12345.1
|
||||
f 1e38
|
||||
f 3.40282e38
|
||||
f0 -100000000000
|
||||
|
|
@ -1550,7 +1550,6 @@ Warning 1264 Out of range value for column 'd10_10' at row 1
|
|||
Warning 1264 Out of range value for column 'd53' at row 1
|
||||
Warning 1264 Out of range value for column 'd53_10' at row 1
|
||||
SELECT f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10 FROM t1;
|
||||
f 12345.1
|
||||
d -1e60
|
||||
d 0
|
||||
d 11111111.111
|
||||
|
|
@ -1583,6 +1582,7 @@ d53_10 10000000000000000000000000000000000000000000.0000000000
|
|||
d53_10 10000000000000000000000000000000000000000000.0000000000
|
||||
f -1e24
|
||||
f 0
|
||||
f 12345.1
|
||||
f 1e38
|
||||
f 3.40282e38
|
||||
f 3.40282e38
|
||||
|
|
|
|||
|
|
@ -206,12 +206,12 @@ d53_10 double(53,10) unsigned YES NULL
|
|||
pk double unsigned NO PRI NULL
|
||||
INSERT INTO t1 (f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10,pk) VALUES (12345.12345,12345.12345,0.9,123456789.123,56789.987,11111111.111,8.0,0.0123456789,1234566789123456789,99999999999999999.99999999,1);
|
||||
SELECT f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10 FROM t1;
|
||||
f 12345.1
|
||||
d 11111111.111
|
||||
d10_10 0.0123456789
|
||||
d1_0 8
|
||||
d53 1234566789123456800
|
||||
d53_10 100000000000000000.0000000000
|
||||
f 12345.1
|
||||
f0 12345.1
|
||||
f20_3 56789.988
|
||||
f23_0 123457000
|
||||
|
|
@ -234,7 +234,6 @@ Warnings:
|
|||
Warning 1264 Out of range value for column 'd53' at row 1
|
||||
Warning 1264 Out of range value for column 'd53_10' at row 1
|
||||
SELECT f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10 FROM t1;
|
||||
f 12345.1
|
||||
d 0
|
||||
d 11111111.111
|
||||
d 1e81
|
||||
|
|
@ -251,6 +250,7 @@ d53_10 0.0000000000
|
|||
d53_10 100000000000000000.0000000000
|
||||
d53_10 10000000000000000000000000000000000000000000.0000000000
|
||||
f 0
|
||||
f 12345.1
|
||||
f 1e38
|
||||
f0 0
|
||||
f0 12345.1
|
||||
|
|
@ -277,7 +277,6 @@ Warning 1264 Out of range value for column 'd10_10' at row 1
|
|||
Warning 1264 Out of range value for column 'd53' at row 1
|
||||
Warning 1264 Out of range value for column 'd53_10' at row 1
|
||||
SELECT f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10 FROM t1;
|
||||
f 12345.1
|
||||
d 0
|
||||
d 0
|
||||
d 11111111.111
|
||||
|
|
@ -300,6 +299,7 @@ d53_10 100000000000000000.0000000000
|
|||
d53_10 10000000000000000000000000000000000000000000.0000000000
|
||||
f 0
|
||||
f 0
|
||||
f 12345.1
|
||||
f 1e38
|
||||
f0 0
|
||||
f0 0
|
||||
|
|
@ -328,12 +328,12 @@ CONCAT('', MAX(d1_0)),
|
|||
CONCAT('', MAX(d10_10)),
|
||||
CONCAT('', MAX(d53)),
|
||||
CONCAT('', MAX(d53_10)) FROM t1;
|
||||
CONCAT('', MAX(f)) 1e38
|
||||
CONCAT('', MAX(d)) 1e81
|
||||
CONCAT('', MAX(d10_10)) 0.9999999999
|
||||
CONCAT('', MAX(d1_0)) 9
|
||||
CONCAT('', MAX(d53)) 100000000000000000000000000000000000000000000000000000
|
||||
CONCAT('', MAX(d53_10)) 10000000000000000000000000000000000000000000.0000000000
|
||||
CONCAT('', MAX(f)) 1e38
|
||||
CONCAT('', MAX(f0)) 1e38
|
||||
CONCAT('', MAX(f20_3)) 99999998430674940.000
|
||||
CONCAT('', MAX(f23_0)) 1e38
|
||||
|
|
@ -362,7 +362,6 @@ Warning 1264 Out of range value for column 'd10_10' at row 1
|
|||
Warning 1264 Out of range value for column 'd53' at row 1
|
||||
Warning 1264 Out of range value for column 'd53_10' at row 1
|
||||
SELECT f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10 FROM t1;
|
||||
f 12345.1
|
||||
d 0
|
||||
d 0
|
||||
d 11111111.111
|
||||
|
|
@ -390,6 +389,7 @@ d53_10 10000000000000000000000000000000000000000000.0000000000
|
|||
d53_10 10000000000000000000000000000000000000000000.0000000000
|
||||
f 0
|
||||
f 0
|
||||
f 12345.1
|
||||
f 1e38
|
||||
f 3.40282e38
|
||||
f0 0
|
||||
|
|
@ -437,7 +437,6 @@ Warning 1264 Out of range value for column 'd10_10' at row 1
|
|||
Warning 1264 Out of range value for column 'd53' at row 1
|
||||
Warning 1264 Out of range value for column 'd53_10' at row 1
|
||||
SELECT f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10 FROM t1;
|
||||
f 12345.1
|
||||
d 0
|
||||
d 0
|
||||
d 11111111.111
|
||||
|
|
@ -470,6 +469,7 @@ d53_10 10000000000000000000000000000000000000000000.0000000000
|
|||
d53_10 10000000000000000000000000000000000000000000.0000000000
|
||||
f 0
|
||||
f 0
|
||||
f 12345.1
|
||||
f 1e38
|
||||
f 3.40282e38
|
||||
f 3.40282e38
|
||||
|
|
|
|||
|
|
@ -28,10 +28,6 @@ DROP EVENT ev1;
|
|||
SELECT TABLE_NAME, COLUMN_NAME, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME
|
||||
FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE ORDER BY TABLE_NAME;
|
||||
TABLE_NAME COLUMN_NAME REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME
|
||||
Warning 1286 Unknown storage engine 'InnoDB'
|
||||
Warning 1286 Unknown storage engine 'InnoDB'
|
||||
Warning 1286 Unknown storage engine 'InnoDB'
|
||||
Warnings:
|
||||
column_stats column_name NULL NULL
|
||||
column_stats db_name NULL NULL
|
||||
column_stats table_name NULL NULL
|
||||
|
|
@ -93,3 +89,7 @@ time_zone_transition Time_zone_id NULL NULL
|
|||
time_zone_transition Transition_time NULL NULL
|
||||
time_zone_transition_type Time_zone_id NULL NULL
|
||||
time_zone_transition_type Transition_type_id NULL NULL
|
||||
Warnings:
|
||||
Warning 1286 Unknown storage engine 'InnoDB'
|
||||
Warning 1286 Unknown storage engine 'InnoDB'
|
||||
Warning 1286 Unknown storage engine 'InnoDB'
|
||||
|
|
|
|||
|
|
@ -27,12 +27,12 @@ d53_10 double(53,10) YES NULL
|
|||
pk double NO PRI NULL
|
||||
INSERT INTO t1 (f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10,pk) VALUES (12345.12345,12345.12345,0.9,123456789.123,56789.987,11111111.111,8.0,0.0123456789,1234566789123456789,99999999999999999.99999999,1);
|
||||
SELECT f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10 FROM t1;
|
||||
f 12345.1
|
||||
d 11111111.111
|
||||
d10_10 0.0123456789
|
||||
d1_0 8
|
||||
d53 1234566789123456800
|
||||
d53_10 100000000000000000.0000000000
|
||||
f 12345.1
|
||||
f0 12345.1
|
||||
f20_3 56789.988
|
||||
f23_0 123457000
|
||||
|
|
@ -55,7 +55,6 @@ Warnings:
|
|||
Warning 1264 Out of range value for column 'd53' at row 1
|
||||
Warning 1264 Out of range value for column 'd53_10' at row 1
|
||||
SELECT f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10 FROM t1;
|
||||
f 12345.1
|
||||
d 0
|
||||
d 11111111.111
|
||||
d 1e81
|
||||
|
|
@ -72,6 +71,7 @@ d53_10 0.0000000000
|
|||
d53_10 100000000000000000.0000000000
|
||||
d53_10 10000000000000000000000000000000000000000000.0000000000
|
||||
f 0
|
||||
f 12345.1
|
||||
f 1e38
|
||||
f0 0
|
||||
f0 12345.1
|
||||
|
|
@ -87,7 +87,6 @@ r1_1 0.9
|
|||
r1_1 0.9
|
||||
INSERT INTO t1 (f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10,pk) VALUES (-999999999999999999999999,-99999999999.999999999999,-0.9,-999.99999999999999999999,-99999999999999999.999,-999999999999999999999999999999999999999999999999999999999999-0.999,-9,-.9999999999,-999999999999999999999999999999.99999999999999999999999,-9999999999999999999999999999999999999999999.9999999999,4);
|
||||
SELECT f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10 FROM t1;
|
||||
f 12345.1
|
||||
d -1e60
|
||||
d 0
|
||||
d 11111111.111
|
||||
|
|
@ -110,6 +109,7 @@ d53_10 100000000000000000.0000000000
|
|||
d53_10 10000000000000000000000000000000000000000000.0000000000
|
||||
f -1e24
|
||||
f 0
|
||||
f 12345.1
|
||||
f 1e38
|
||||
f0 -100000000000
|
||||
f0 0
|
||||
|
|
@ -138,12 +138,12 @@ CONCAT('', MAX(d1_0)),
|
|||
CONCAT('', MAX(d10_10)),
|
||||
CONCAT('', MAX(d53)),
|
||||
CONCAT('', MAX(d53_10)) FROM t1;
|
||||
CONCAT('', MAX(f)) 1e38
|
||||
CONCAT('', MAX(d)) 1e81
|
||||
CONCAT('', MAX(d10_10)) 0.9999999999
|
||||
CONCAT('', MAX(d1_0)) 9
|
||||
CONCAT('', MAX(d53)) 100000000000000000000000000000000000000000000000000000
|
||||
CONCAT('', MAX(d53_10)) 10000000000000000000000000000000000000000000.0000000000
|
||||
CONCAT('', MAX(f)) 1e38
|
||||
CONCAT('', MAX(f0)) 1e38
|
||||
CONCAT('', MAX(f20_3)) 99999998430674940.000
|
||||
CONCAT('', MAX(f23_0)) 1e38
|
||||
|
|
@ -172,7 +172,6 @@ Warning 1264 Out of range value for column 'd10_10' at row 1
|
|||
Warning 1264 Out of range value for column 'd53' at row 1
|
||||
Warning 1264 Out of range value for column 'd53_10' at row 1
|
||||
SELECT f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10 FROM t1;
|
||||
f 12345.1
|
||||
d -1e60
|
||||
d 0
|
||||
d 11111111.111
|
||||
|
|
@ -200,6 +199,7 @@ d53_10 10000000000000000000000000000000000000000000.0000000000
|
|||
d53_10 10000000000000000000000000000000000000000000.0000000000
|
||||
f -1e24
|
||||
f 0
|
||||
f 12345.1
|
||||
f 1e38
|
||||
f 3.40282e38
|
||||
f0 -100000000000
|
||||
|
|
@ -247,7 +247,6 @@ Warning 1264 Out of range value for column 'd10_10' at row 1
|
|||
Warning 1264 Out of range value for column 'd53' at row 1
|
||||
Warning 1264 Out of range value for column 'd53_10' at row 1
|
||||
SELECT f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10 FROM t1;
|
||||
f 12345.1
|
||||
d -1e60
|
||||
d 0
|
||||
d 11111111.111
|
||||
|
|
@ -280,6 +279,7 @@ d53_10 10000000000000000000000000000000000000000000.0000000000
|
|||
d53_10 10000000000000000000000000000000000000000000.0000000000
|
||||
f -1e24
|
||||
f 0
|
||||
f 12345.1
|
||||
f 1e38
|
||||
f 3.40282e38
|
||||
f 3.40282e38
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue