mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge 10.5 into 10.6
This commit is contained in:
@@ -5564,9 +5564,22 @@ xtrabackup_apply_delta(
|
|||||||
buf + FSP_HEADER_OFFSET + FSP_SIZE);
|
buf + FSP_HEADER_OFFSET + FSP_SIZE);
|
||||||
if (mach_read_from_4(buf
|
if (mach_read_from_4(buf
|
||||||
+ FIL_PAGE_SPACE_ID)) {
|
+ FIL_PAGE_SPACE_ID)) {
|
||||||
|
#ifdef _WIN32
|
||||||
|
os_offset_t last_page =
|
||||||
|
os_file_get_size(dst_file) /
|
||||||
|
page_size;
|
||||||
|
|
||||||
|
/* os_file_set_size() would
|
||||||
|
shrink the size of the file */
|
||||||
|
if (last_page < n_pages &&
|
||||||
|
!os_file_set_size(
|
||||||
|
dst_path, dst_file,
|
||||||
|
n_pages * page_size))
|
||||||
|
#else
|
||||||
if (!os_file_set_size(
|
if (!os_file_set_size(
|
||||||
dst_path, dst_file,
|
dst_path, dst_file,
|
||||||
n_pages * page_size))
|
n_pages * page_size))
|
||||||
|
#endif /* _WIN32 */
|
||||||
goto error;
|
goto error;
|
||||||
} else if (fil_space_t* space
|
} else if (fil_space_t* space
|
||||||
= fil_system.sys_space) {
|
= fil_system.sys_space) {
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
# We use this --source include to mark a test as taking long to run.
|
# We use this --source include to mark a test as taking long to run.
|
||||||
# We can use this to schedule such test early (to not be left with
|
# We can use this to schedule such test early (to not be left with
|
||||||
# only one or two long tests running, and rests of works idle), or to
|
# only one or two long tests running, and rests of workers idle), or to
|
||||||
# run a quick test skipping long-running test cases.
|
# run a quick test skipping long-running test cases.
|
||||||
|
|
||||||
--source include/no_valgrind_without_big.inc
|
--source include/no_valgrind_without_big.inc
|
||||||
|
@@ -2,6 +2,7 @@
|
|||||||
# Tests BACKUP STAGE locking
|
# Tests BACKUP STAGE locking
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
|
--source include/long_test.inc
|
||||||
--source include/have_innodb.inc
|
--source include/have_innodb.inc
|
||||||
--source include/have_metadata_lock_info.inc
|
--source include/have_metadata_lock_info.inc
|
||||||
--source include/not_embedded.inc
|
--source include/not_embedded.inc
|
||||||
|
@@ -137,3 +137,11 @@ drop user baz@baz;
|
|||||||
#
|
#
|
||||||
# End of 10.3 tests
|
# End of 10.3 tests
|
||||||
#
|
#
|
||||||
|
#
|
||||||
|
# MDEV-34501: SIGSEGV in pfs_start_mutex_wait_v1, __strlen_avx2, or __strlen_evex from safe_mutex_lock on CREATE DEFINER when using skip-grant-tables
|
||||||
|
#
|
||||||
|
CREATE DEFINER=a PROCEDURE p() SELECT 1;
|
||||||
|
CREATE DEFINER=a FUNCTION f() RETURNS INT RETURN 100;
|
||||||
|
DROP PROCEDURE p;
|
||||||
|
DROP FUNCTION f;
|
||||||
|
# End of 10.5 tests
|
||||||
|
@@ -168,3 +168,14 @@ drop user baz@baz;
|
|||||||
--echo #
|
--echo #
|
||||||
--echo # End of 10.3 tests
|
--echo # End of 10.3 tests
|
||||||
--echo #
|
--echo #
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-34501: SIGSEGV in pfs_start_mutex_wait_v1, __strlen_avx2, or __strlen_evex from safe_mutex_lock on CREATE DEFINER when using skip-grant-tables
|
||||||
|
--echo #
|
||||||
|
CREATE DEFINER=a PROCEDURE p() SELECT 1;
|
||||||
|
CREATE DEFINER=a FUNCTION f() RETURNS INT RETURN 100;
|
||||||
|
|
||||||
|
DROP PROCEDURE p;
|
||||||
|
DROP FUNCTION f;
|
||||||
|
|
||||||
|
--echo # End of 10.5 tests
|
||||||
|
@@ -388,5 +388,14 @@ ERROR 23000: Column 'c2' in FROM is ambiguous
|
|||||||
DROP PROCEDURE p2;
|
DROP PROCEDURE p2;
|
||||||
DROP TABLE t1, t2;
|
DROP TABLE t1, t2;
|
||||||
#
|
#
|
||||||
|
# MDEV-34501: SIGSEGV in pfs_start_mutex_wait_v1, __strlen_avx2, or __strlen_evex from safe_mutex_lock on CREATE DEFINER when using skip-grant-tables
|
||||||
|
#
|
||||||
|
# This test is a duplicate of the one located in the file skip_grants.test
|
||||||
|
# and placed here to check the same test case against embedded-server
|
||||||
|
CREATE DEFINER=a PROCEDURE p() SELECT 1;
|
||||||
|
CREATE DEFINER=a FUNCTION f() RETURNS INT RETURN 100;
|
||||||
|
DROP PROCEDURE p;
|
||||||
|
DROP FUNCTION f;
|
||||||
|
#
|
||||||
# End of 10.5 tests
|
# End of 10.5 tests
|
||||||
#
|
#
|
||||||
|
@@ -414,6 +414,26 @@ CALL p2 (@a,@c);
|
|||||||
DROP PROCEDURE p2;
|
DROP PROCEDURE p2;
|
||||||
DROP TABLE t1, t2;
|
DROP TABLE t1, t2;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-34501: SIGSEGV in pfs_start_mutex_wait_v1, __strlen_avx2, or __strlen_evex from safe_mutex_lock on CREATE DEFINER when using skip-grant-tables
|
||||||
|
--echo #
|
||||||
|
--echo # This test is a duplicate of the one located in the file skip_grants.test
|
||||||
|
--echo # and placed here to check the same test case against embedded-server
|
||||||
|
|
||||||
|
# Disable warnings before running the following CREATE PROCEDURE/FUNCTION
|
||||||
|
# statement since the warning message
|
||||||
|
# "The user specified as a definer ('a'@'%') does not exist"
|
||||||
|
# is output in case the test be run against a regular server
|
||||||
|
# and isn't output if embedded server is used (@sa sp_process_definer()
|
||||||
|
# in sql_parse.cc).
|
||||||
|
--disable_warnings
|
||||||
|
CREATE DEFINER=a PROCEDURE p() SELECT 1;
|
||||||
|
CREATE DEFINER=a FUNCTION f() RETURNS INT RETURN 100;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
|
DROP PROCEDURE p;
|
||||||
|
DROP FUNCTION f;
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # End of 10.5 tests
|
--echo # End of 10.5 tests
|
||||||
--echo #
|
--echo #
|
||||||
|
@@ -18,6 +18,7 @@
|
|||||||
# - with annotated events, default checksums and minimal binlog row image
|
# - with annotated events, default checksums and minimal binlog row image
|
||||||
#
|
#
|
||||||
|
|
||||||
|
--source include/long_test.inc
|
||||||
# The test can take very long time with valgrind
|
# The test can take very long time with valgrind
|
||||||
--source include/not_valgrind.inc
|
--source include/not_valgrind.inc
|
||||||
|
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
# Checking of other prerequisites is in charset_master.test #
|
# Checking of other prerequisites is in charset_master.test #
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
--source include/no_valgrind_without_big.inc
|
--source include/long_test.inc
|
||||||
--source include/have_innodb.inc
|
--source include/have_innodb.inc
|
||||||
|
|
||||||
# Starting with MariaDB 10.6, ensure that DDL recovery will have completed
|
# Starting with MariaDB 10.6, ensure that DDL recovery will have completed
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--source include/long_test.inc
|
||||||
--source include/have_innodb.inc
|
--source include/have_innodb.inc
|
||||||
|
|
||||||
set session transaction isolation level read committed;
|
set session transaction isolation level read committed;
|
||||||
|
@@ -412,3 +412,16 @@ update t1 set a=point(5,5), b=point(5,5), c=5 where i < 3;
|
|||||||
ERROR HY000: Lost connection to server during query
|
ERROR HY000: Lost connection to server during query
|
||||||
insert into t1 values(5, point(5,5), point(5,5), 5);
|
insert into t1 values(5, point(5,5), point(5,5), 5);
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
#
|
||||||
|
# MDEV-35420 Server aborts while deleting the record
|
||||||
|
# in spatial index
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (c POINT NOT NULL, SPATIAL(c)) engine=InnoDB;
|
||||||
|
CHECK TABLE t1;
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t1 check status OK
|
||||||
|
SET STATEMENT unique_checks=0,foreign_key_checks=0 FOR
|
||||||
|
START TRANSACTION;
|
||||||
|
INSERT INTO t1 SELECT ST_GeomFromText('POINT(114368751 656950466)') FROM seq_1_to_512;
|
||||||
|
ROLLBACK;
|
||||||
|
DROP TABLE t1;
|
||||||
|
@@ -8,6 +8,7 @@
|
|||||||
# Avoid CrashReporter popup on Mac
|
# Avoid CrashReporter popup on Mac
|
||||||
--source include/not_crashrep.inc
|
--source include/not_crashrep.inc
|
||||||
--source include/have_innodb_16k.inc
|
--source include/have_innodb_16k.inc
|
||||||
|
--source include/have_sequence.inc
|
||||||
|
|
||||||
CREATE TABLE t4 (id bigint(12) unsigned NOT NULL auto_increment,
|
CREATE TABLE t4 (id bigint(12) unsigned NOT NULL auto_increment,
|
||||||
c2 varchar(15) collate utf8_bin default NULL,
|
c2 varchar(15) collate utf8_bin default NULL,
|
||||||
@@ -475,3 +476,15 @@ update t1 set a=point(5,5), b=point(5,5), c=5 where i < 3;
|
|||||||
insert into t1 values(5, point(5,5), point(5,5), 5);
|
insert into t1 values(5, point(5,5), point(5,5), 5);
|
||||||
|
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-35420 Server aborts while deleting the record
|
||||||
|
--echo # in spatial index
|
||||||
|
--echo #
|
||||||
|
CREATE TABLE t1 (c POINT NOT NULL, SPATIAL(c)) engine=InnoDB;
|
||||||
|
CHECK TABLE t1;
|
||||||
|
SET STATEMENT unique_checks=0,foreign_key_checks=0 FOR
|
||||||
|
START TRANSACTION;
|
||||||
|
INSERT INTO t1 SELECT ST_GeomFromText('POINT(114368751 656950466)') FROM seq_1_to_512;
|
||||||
|
ROLLBACK;
|
||||||
|
DROP TABLE t1;
|
||||||
|
@@ -4,6 +4,9 @@
|
|||||||
#
|
#
|
||||||
CREATE TABLE t (pk INT PRIMARY KEY) ENGINE=InnoDB ROW_FORMAT=COMPRESSED;
|
CREATE TABLE t (pk INT PRIMARY KEY) ENGINE=InnoDB ROW_FORMAT=COMPRESSED;
|
||||||
ALTER TABLE t PARTITION BY KEY(pk);
|
ALTER TABLE t PARTITION BY KEY(pk);
|
||||||
|
# Incremental backup
|
||||||
|
# Prepare fullbackup
|
||||||
|
# Prepare incremental backup
|
||||||
# shutdown server
|
# shutdown server
|
||||||
# remove datadir
|
# remove datadir
|
||||||
# xtrabackup move back
|
# xtrabackup move back
|
||||||
|
@@ -16,12 +16,18 @@ CREATE TABLE t (pk INT PRIMARY KEY) ENGINE=InnoDB ROW_FORMAT=COMPRESSED;
|
|||||||
|
|
||||||
ALTER TABLE t PARTITION BY KEY(pk);
|
ALTER TABLE t PARTITION BY KEY(pk);
|
||||||
|
|
||||||
|
--echo # Incremental backup
|
||||||
--exec $XTRABACKUP --backup --target-dir=$incremental_dir --incremental-basedir=$basedir --protocol=tcp --port=$MASTER_MYPORT --user=root > $incremental_dir.log 2>&1
|
--exec $XTRABACKUP --backup --target-dir=$incremental_dir --incremental-basedir=$basedir --protocol=tcp --port=$MASTER_MYPORT --user=root > $incremental_dir.log 2>&1
|
||||||
|
--echo # Prepare fullbackup
|
||||||
--exec $XTRABACKUP --prepare --target-dir=$basedir --user=root > $MYSQL_TMP_DIR/backup_prepare_0.log 2>&1
|
--exec $XTRABACKUP --prepare --target-dir=$basedir --user=root > $MYSQL_TMP_DIR/backup_prepare_0.log 2>&1
|
||||||
--exec $XTRABACKUP --prepare --target-dir=$basedir --incremental-dir=$incremental_dir --user=root > $MYSQL_TMP_DIR/backup_prepare_1.log
|
--echo # Prepare incremental backup
|
||||||
--cat_file $MYSQL_TMP_DIR/backup_prepare_1.log
|
--exec $XTRABACKUP --prepare --target-dir=$basedir --incremental-dir=$incremental_dir --user=root > $MYSQL_TMP_DIR/backup_prepare_1.log 2>&1
|
||||||
let $targetdir=$basedir;
|
let $targetdir=$basedir;
|
||||||
-- source include/restart_and_restore.inc
|
-- source include/restart_and_restore.inc
|
||||||
|
|
||||||
SHOW CREATE TABLE t;
|
SHOW CREATE TABLE t;
|
||||||
DROP TABLE t;
|
DROP TABLE t;
|
||||||
|
remove_file $incremental_dir.log;
|
||||||
|
remove_file $MYSQL_TMP_DIR/backup_prepare_0.log;
|
||||||
|
remove_file $MYSQL_TMP_DIR/backup_prepare_1.log;
|
||||||
|
rmdir $basedir;
|
||||||
|
rmdir $incremental_dir;
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
|
--source include/long_test.inc
|
||||||
--source include/have_debug.inc
|
--source include/have_debug.inc
|
||||||
--source include/no_valgrind_without_big.inc
|
|
||||||
--source include/innodb_undo_tablespaces.inc
|
--source include/innodb_undo_tablespaces.inc
|
||||||
|
|
||||||
--echo ########
|
--echo ########
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--source include/long_test.inc
|
||||||
--source include/have_innodb.inc
|
--source include/have_innodb.inc
|
||||||
--source include/have_partition.inc
|
--source include/have_partition.inc
|
||||||
--source include/have_debug_sync.inc
|
--source include/have_debug_sync.inc
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--source include/long_test.inc
|
||||||
--source include/have_partition.inc
|
--source include/have_partition.inc
|
||||||
--source include/have_debug_sync.inc
|
--source include/have_debug_sync.inc
|
||||||
|
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--source include/long_test.inc
|
||||||
--source include/have_partition.inc
|
--source include/have_partition.inc
|
||||||
--source include/have_debug_sync.inc
|
--source include/have_debug_sync.inc
|
||||||
|
|
||||||
|
@@ -12,6 +12,8 @@ INSERT INTO t1 VALUES (1, 0);
|
|||||||
connection server_2;
|
connection server_2;
|
||||||
SET sql_log_bin=0;
|
SET sql_log_bin=0;
|
||||||
call mtr.add_suppression('Master command COM_REGISTER_SLAVE failed: failed registering on master, reconnecting to try again');
|
call mtr.add_suppression('Master command COM_REGISTER_SLAVE failed: failed registering on master, reconnecting to try again');
|
||||||
|
call mtr.add_suppression('Slave I/O: .*Lost connection to server during query');
|
||||||
|
call mtr.add_suppression("Slave I/O thread couldn't register on master");
|
||||||
SET sql_log_bin=1;
|
SET sql_log_bin=1;
|
||||||
include/stop_slave.inc
|
include/stop_slave.inc
|
||||||
CHANGE MASTER TO master_host = '127.0.0.1', master_port = MASTER_PORT,
|
CHANGE MASTER TO master_host = '127.0.0.1', master_port = MASTER_PORT,
|
||||||
|
@@ -1 +1 @@
|
|||||||
--master-retry-count=100 --slave-net-timeout=10
|
--master-retry-count=500 --slave-net-timeout=10
|
||||||
|
@@ -24,6 +24,8 @@ INSERT INTO t1 VALUES (1, 0);
|
|||||||
--sync_with_master
|
--sync_with_master
|
||||||
SET sql_log_bin=0;
|
SET sql_log_bin=0;
|
||||||
call mtr.add_suppression('Master command COM_REGISTER_SLAVE failed: failed registering on master, reconnecting to try again');
|
call mtr.add_suppression('Master command COM_REGISTER_SLAVE failed: failed registering on master, reconnecting to try again');
|
||||||
|
call mtr.add_suppression('Slave I/O: .*Lost connection to server during query');
|
||||||
|
call mtr.add_suppression("Slave I/O thread couldn't register on master");
|
||||||
SET sql_log_bin=1;
|
SET sql_log_bin=1;
|
||||||
--source include/stop_slave.inc
|
--source include/stop_slave.inc
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
--replace_result $MASTER_MYPORT MASTER_PORT
|
||||||
|
@@ -9,6 +9,7 @@
|
|||||||
# * Various states of master and heartbeat
|
# * Various states of master and heartbeat
|
||||||
# * Circular replication
|
# * Circular replication
|
||||||
#############################################################
|
#############################################################
|
||||||
|
--source include/long_test.inc
|
||||||
--source include/master-slave.inc
|
--source include/master-slave.inc
|
||||||
#
|
#
|
||||||
# The test runs long and does not have any specifics to
|
# The test runs long and does not have any specifics to
|
||||||
|
@@ -4,6 +4,7 @@
|
|||||||
# Please check all dependent tests after modifying it
|
# Please check all dependent tests after modifying it
|
||||||
#
|
#
|
||||||
|
|
||||||
|
source include/long_test.inc;
|
||||||
source include/not_embedded.inc;
|
source include/not_embedded.inc;
|
||||||
source include/have_innodb.inc;
|
source include/have_innodb.inc;
|
||||||
source include/master-slave.inc;
|
source include/master-slave.inc;
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--source include/long_test.inc
|
||||||
--source include/have_binlog_format_statement.inc
|
--source include/have_binlog_format_statement.inc
|
||||||
set global rpl_semi_sync_master_wait_point=AFTER_SYNC;
|
set global rpl_semi_sync_master_wait_point=AFTER_SYNC;
|
||||||
source rpl_semi_sync.test;
|
source rpl_semi_sync.test;
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--source include/long_test.inc
|
||||||
--source include/have_binlog_format_row.inc
|
--source include/have_binlog_format_row.inc
|
||||||
set global rpl_semi_sync_master_wait_point=AFTER_SYNC;
|
set global rpl_semi_sync_master_wait_point=AFTER_SYNC;
|
||||||
source rpl_semi_sync.test;
|
source rpl_semi_sync.test;
|
||||||
|
@@ -4,6 +4,7 @@
|
|||||||
# Please check all dependent tests after modifying it
|
# Please check all dependent tests after modifying it
|
||||||
#
|
#
|
||||||
|
|
||||||
|
--source include/long_test.inc
|
||||||
--source include/have_binlog_format_row.inc
|
--source include/have_binlog_format_row.inc
|
||||||
--source include/master-slave.inc
|
--source include/master-slave.inc
|
||||||
|
|
||||||
|
@@ -673,7 +673,7 @@ const char* dbug_print_row(TABLE *table, const uchar *rec, bool print_names)
|
|||||||
move_back_guard.engage();
|
move_back_guard.engage();
|
||||||
}
|
}
|
||||||
|
|
||||||
SCOPE_VALUE(table->read_set, (table->read_set && table->write_set) ?
|
SCOPE_VALUE(table->read_set, (table->reginfo.lock_type >= TL_WRITE_ALLOW_WRITE) ?
|
||||||
table->write_set : table->read_set);
|
table->write_set : table->read_set);
|
||||||
|
|
||||||
output.length(0);
|
output.length(0);
|
||||||
|
22
sql/slave.cc
22
sql/slave.cc
@@ -3186,21 +3186,23 @@ static bool send_show_master_info_data(THD *thd, Master_info *mi, bool full,
|
|||||||
if (full)
|
if (full)
|
||||||
protocol->store(mi->connection_name.str, mi->connection_name.length,
|
protocol->store(mi->connection_name.str, mi->connection_name.length,
|
||||||
&my_charset_bin);
|
&my_charset_bin);
|
||||||
|
|
||||||
mysql_mutex_lock(&mi->run_lock);
|
mysql_mutex_lock(&mi->run_lock);
|
||||||
|
THD *sql_thd= mi->rli.sql_driver_thd;
|
||||||
|
const char *slave_sql_running_state=
|
||||||
|
sql_thd ? sql_thd->get_proc_info() : "";
|
||||||
|
THD *io_thd= mi->io_thd;
|
||||||
|
const char *slave_io_running_state= io_thd ? io_thd->get_proc_info() : "";
|
||||||
|
mysql_mutex_unlock(&mi->run_lock);
|
||||||
|
|
||||||
if (full)
|
if (full)
|
||||||
{
|
|
||||||
/*
|
/*
|
||||||
Show what the sql driver replication thread is doing
|
Show what the sql driver replication thread is doing
|
||||||
This is only meaningful if there is only one slave thread.
|
This is only meaningful if there is only one slave thread.
|
||||||
*/
|
*/
|
||||||
msg= (mi->rli.sql_driver_thd ?
|
protocol->store_string_or_null(slave_sql_running_state, &my_charset_bin);
|
||||||
mi->rli.sql_driver_thd->get_proc_info() : "");
|
|
||||||
protocol->store_string_or_null(msg, &my_charset_bin);
|
|
||||||
}
|
|
||||||
msg= mi->io_thd ? mi->io_thd->get_proc_info() : "";
|
|
||||||
protocol->store_string_or_null(msg, &my_charset_bin);
|
|
||||||
|
|
||||||
mysql_mutex_unlock(&mi->run_lock);
|
protocol->store_string_or_null(slave_io_running_state, &my_charset_bin);
|
||||||
|
|
||||||
mysql_mutex_lock(&mi->data_lock);
|
mysql_mutex_lock(&mi->data_lock);
|
||||||
mysql_mutex_lock(&mi->rli.data_lock);
|
mysql_mutex_lock(&mi->rli.data_lock);
|
||||||
@@ -3374,10 +3376,6 @@ static bool send_show_master_info_data(THD *thd, Master_info *mi, bool full,
|
|||||||
|
|
||||||
protocol->store((uint32) mi->rli.get_sql_delay());
|
protocol->store((uint32) mi->rli.get_sql_delay());
|
||||||
// SQL_Remaining_Delay
|
// SQL_Remaining_Delay
|
||||||
// THD::proc_info is not protected by any lock, so we read it once
|
|
||||||
// to ensure that we use the same value throughout this function.
|
|
||||||
const char *slave_sql_running_state=
|
|
||||||
mi->rli.sql_driver_thd ? mi->rli.sql_driver_thd->proc_info : "";
|
|
||||||
if (slave_sql_running_state == stage_sql_thd_waiting_until_delay.m_name)
|
if (slave_sql_running_state == stage_sql_thd_waiting_until_delay.m_name)
|
||||||
{
|
{
|
||||||
time_t t= my_time(0), sql_delay_end= mi->rli.get_sql_delay_end();
|
time_t t= my_time(0), sql_delay_end= mi->rli.get_sql_delay_end();
|
||||||
|
@@ -12975,6 +12975,9 @@ LEX_USER *get_current_user(THD *thd, LEX_USER *user, bool lock)
|
|||||||
if (is_invalid_role_name(user->user.str))
|
if (is_invalid_role_name(user->user.str))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
if (!initialized)
|
||||||
|
return dup;
|
||||||
|
|
||||||
if (lock)
|
if (lock)
|
||||||
mysql_mutex_lock(&acl_cache->lock);
|
mysql_mutex_lock(&acl_cache->lock);
|
||||||
if (find_acl_role(dup->user.str))
|
if (find_acl_role(dup->user.str))
|
||||||
|
@@ -303,7 +303,7 @@ Sql_cmd_truncate_table::handler_truncate(THD *thd, TABLE_LIST *table_ref,
|
|||||||
bool Sql_cmd_truncate_table::lock_table(THD *thd, TABLE_LIST *table_ref,
|
bool Sql_cmd_truncate_table::lock_table(THD *thd, TABLE_LIST *table_ref,
|
||||||
bool *hton_can_recreate)
|
bool *hton_can_recreate)
|
||||||
{
|
{
|
||||||
handlerton *hton;
|
const handlerton *hton;
|
||||||
bool versioned;
|
bool versioned;
|
||||||
bool sequence= false;
|
bool sequence= false;
|
||||||
TABLE *table= NULL;
|
TABLE *table= NULL;
|
||||||
@@ -374,8 +374,12 @@ bool Sql_cmd_truncate_table::lock_table(THD *thd, TABLE_LIST *table_ref,
|
|||||||
table we need to find out default partition
|
table we need to find out default partition
|
||||||
handlerton.
|
handlerton.
|
||||||
*/
|
*/
|
||||||
const handlerton *ht= share->default_part_plugin ?
|
const handlerton* const ht=
|
||||||
plugin_hton(share->default_part_plugin) : hton;
|
#ifdef WITH_PARTITION_STORAGE_ENGINE
|
||||||
|
share->default_part_plugin ?
|
||||||
|
plugin_hton(share->default_part_plugin) :
|
||||||
|
#endif
|
||||||
|
hton;
|
||||||
|
|
||||||
if (ht && !wsrep_should_replicate_ddl(thd, ht))
|
if (ht && !wsrep_should_replicate_ddl(thd, ht))
|
||||||
{
|
{
|
||||||
|
@@ -235,7 +235,7 @@ struct AUTHID
|
|||||||
LEX_CSTRING user, host;
|
LEX_CSTRING user, host;
|
||||||
void init() { memset(this, 0, sizeof(*this)); }
|
void init() { memset(this, 0, sizeof(*this)); }
|
||||||
void copy(MEM_ROOT *root, const LEX_CSTRING *usr, const LEX_CSTRING *host);
|
void copy(MEM_ROOT *root, const LEX_CSTRING *usr, const LEX_CSTRING *host);
|
||||||
bool is_role() const { return user.str[0] && !host.str[0]; }
|
bool is_role() const { return user.str[0] && (!host.str || !host.str[0]); }
|
||||||
void set_lex_string(LEX_CSTRING *l, char *buf)
|
void set_lex_string(LEX_CSTRING *l, char *buf)
|
||||||
{
|
{
|
||||||
if (is_role())
|
if (is_role())
|
||||||
|
@@ -504,10 +504,10 @@ rtr_pcur_move_to_next(
|
|||||||
rtr_rec_t rec;
|
rtr_rec_t rec;
|
||||||
rec = rtr_info->matches->matched_recs->back();
|
rec = rtr_info->matches->matched_recs->back();
|
||||||
rtr_info->matches->matched_recs->pop_back();
|
rtr_info->matches->matched_recs->pop_back();
|
||||||
|
cursor->btr_cur.page_cur.block = rtr_info->matches->block;
|
||||||
mysql_mutex_unlock(&rtr_info->matches->rtr_match_mutex);
|
mysql_mutex_unlock(&rtr_info->matches->rtr_match_mutex);
|
||||||
|
|
||||||
cursor->btr_cur.page_cur.rec = rec.r_rec;
|
cursor->btr_cur.page_cur.rec = rec.r_rec;
|
||||||
cursor->btr_cur.page_cur.block = rtr_info->matches->block;
|
|
||||||
|
|
||||||
DEBUG_SYNC_C("rtr_pcur_move_to_next_return");
|
DEBUG_SYNC_C("rtr_pcur_move_to_next_return");
|
||||||
return(true);
|
return(true);
|
||||||
@@ -1565,7 +1565,10 @@ rtr_check_discard_page(
|
|||||||
if (auto matches = rtr_info->matches) {
|
if (auto matches = rtr_info->matches) {
|
||||||
mysql_mutex_lock(&matches->rtr_match_mutex);
|
mysql_mutex_lock(&matches->rtr_match_mutex);
|
||||||
|
|
||||||
if (matches->block->page.id() == id) {
|
/* matches->block could be nullptr when cursor
|
||||||
|
encounters empty table */
|
||||||
|
if (rtr_info->matches->block
|
||||||
|
&& matches->block->page.id() == id) {
|
||||||
matches->matched_recs->clear();
|
matches->matched_recs->clear();
|
||||||
matches->valid = false;
|
matches->valid = false;
|
||||||
}
|
}
|
||||||
@@ -2201,6 +2204,15 @@ rtr_cur_search_with_match(
|
|||||||
ut_ad(orig_mode
|
ut_ad(orig_mode
|
||||||
!= PAGE_CUR_RTREE_LOCATE);
|
!= PAGE_CUR_RTREE_LOCATE);
|
||||||
|
|
||||||
|
/* Collect matched records on page */
|
||||||
|
offsets = rec_get_offsets(
|
||||||
|
rec, index, offsets,
|
||||||
|
index->n_fields,
|
||||||
|
ULINT_UNDEFINED, &heap);
|
||||||
|
|
||||||
|
mysql_mutex_lock(
|
||||||
|
&rtr_info->matches->rtr_match_mutex);
|
||||||
|
|
||||||
if (!match_init) {
|
if (!match_init) {
|
||||||
rtr_init_match(
|
rtr_init_match(
|
||||||
rtr_info->matches,
|
rtr_info->matches,
|
||||||
@@ -2208,14 +2220,12 @@ rtr_cur_search_with_match(
|
|||||||
match_init = true;
|
match_init = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Collect matched records on page */
|
|
||||||
offsets = rec_get_offsets(
|
|
||||||
rec, index, offsets,
|
|
||||||
index->n_fields,
|
|
||||||
ULINT_UNDEFINED, &heap);
|
|
||||||
rtr_leaf_push_match_rec(
|
rtr_leaf_push_match_rec(
|
||||||
rec, rtr_info, offsets,
|
rec, rtr_info, offsets,
|
||||||
page_is_comp(page));
|
page_is_comp(page));
|
||||||
|
|
||||||
|
mysql_mutex_unlock(
|
||||||
|
&rtr_info->matches->rtr_match_mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
last_match_rec = rec;
|
last_match_rec = rec;
|
||||||
|
@@ -48,10 +48,13 @@ User=mysql
|
|||||||
Group=mysql
|
Group=mysql
|
||||||
|
|
||||||
# CAP_IPC_LOCK To allow memlock to be used as non-root user
|
# CAP_IPC_LOCK To allow memlock to be used as non-root user
|
||||||
|
# These are enabled by default
|
||||||
|
AmbientCapabilities=CAP_IPC_LOCK
|
||||||
|
|
||||||
# CAP_DAC_OVERRIDE To allow auth_pam_tool (which is SUID root) to read /etc/shadow when it's chmod 0
|
# CAP_DAC_OVERRIDE To allow auth_pam_tool (which is SUID root) to read /etc/shadow when it's chmod 0
|
||||||
# does nothing for non-root, not needed if /etc/shadow is u+r
|
# does nothing for non-root, not needed if /etc/shadow is u+r
|
||||||
# CAP_AUDIT_WRITE auth_pam_tool needs it on Debian for whatever reason
|
# CAP_AUDIT_WRITE auth_pam_tool needs it on Debian for whatever reason
|
||||||
AmbientCapabilities=CAP_IPC_LOCK CAP_DAC_OVERRIDE CAP_AUDIT_WRITE
|
CapabilityBoundingSet=CAP_DAC_OVERRIDE CAP_AUDIT_WRITE
|
||||||
|
|
||||||
# PrivateDevices=true implies NoNewPrivileges=true and
|
# PrivateDevices=true implies NoNewPrivileges=true and
|
||||||
# SUID auth_pam_tool suddenly doesn't do setuid anymore
|
# SUID auth_pam_tool suddenly doesn't do setuid anymore
|
||||||
|
@@ -178,10 +178,13 @@ PrivateNetwork=false
|
|||||||
##
|
##
|
||||||
|
|
||||||
# CAP_IPC_LOCK To allow memlock to be used as non-root user
|
# CAP_IPC_LOCK To allow memlock to be used as non-root user
|
||||||
|
# These are enabled by default
|
||||||
|
AmbientCapabilities=CAP_IPC_LOCK
|
||||||
|
|
||||||
# CAP_DAC_OVERRIDE To allow auth_pam_tool (which is SUID root) to read /etc/shadow when it's chmod 0
|
# CAP_DAC_OVERRIDE To allow auth_pam_tool (which is SUID root) to read /etc/shadow when it's chmod 0
|
||||||
# does nothing for non-root, not needed if /etc/shadow is u+r
|
# does nothing for non-root, not needed if /etc/shadow is u+r
|
||||||
# CAP_AUDIT_WRITE auth_pam_tool needs it on Debian for whatever reason
|
# CAP_AUDIT_WRITE auth_pam_tool needs it on Debian for whatever reason
|
||||||
AmbientCapabilities=CAP_IPC_LOCK CAP_DAC_OVERRIDE CAP_AUDIT_WRITE
|
CapabilityBoundingSet=CAP_DAC_OVERRIDE CAP_AUDIT_WRITE
|
||||||
|
|
||||||
# PrivateDevices=true implies NoNewPrivileges=true and
|
# PrivateDevices=true implies NoNewPrivileges=true and
|
||||||
# SUID auth_pam_tool suddenly doesn't do setuid anymore
|
# SUID auth_pam_tool suddenly doesn't do setuid anymore
|
||||||
|
@@ -28,10 +28,11 @@ startup script in %{_sysconfdir}/init.d/.
|
|||||||
|
|
||||||
if [ "$old_family" != "$new_family" ]; then
|
if [ "$old_family" != "$new_family" ]; then
|
||||||
error_text="$error_text
|
error_text="$error_text
|
||||||
Upgrading directly from MySQL $old_family to MariaDB $new_family may not
|
Upgrading directly from MariaDB or MySQL $old_family
|
||||||
be safe in all cases. A manual dump and restore using mysqldump is
|
to MariaDB $new_family may not be safe in all cases.
|
||||||
recommended. It is important to review the MariaDB manual's Upgrading
|
A manual dump and restore using mariadb-dump (or mysqldump) is recommended.
|
||||||
section for version-specific incompatibilities.
|
It is important to review the MariaDB manual's Upgrading section for
|
||||||
|
version-specific incompatibilities.
|
||||||
"
|
"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -39,23 +40,23 @@ section for version-specific incompatibilities.
|
|||||||
cat <<HERE >&2
|
cat <<HERE >&2
|
||||||
|
|
||||||
******************************************************************
|
******************************************************************
|
||||||
A MySQL or MariaDB server package ($installed) is installed.
|
A MariaDB or MySQL server package ($installed) is installed.
|
||||||
$error_text
|
$error_text
|
||||||
A manual upgrade is required.
|
A manual upgrade is required.
|
||||||
|
|
||||||
- Ensure that you have a complete, working backup of your data and my.cnf
|
- Ensure that you have a complete, working backup of your data and my.cnf
|
||||||
files
|
files
|
||||||
- Shut down the MySQL server cleanly
|
- Shut down the MariaDB or MySQL server cleanly
|
||||||
- Remove the existing MySQL packages. Usually this command will
|
- Remove the existing MariaDB or MySQL packages. Usually this command will
|
||||||
list the packages you should remove:
|
list the packages you should remove:
|
||||||
rpm -qa | grep -i '^mysql-'
|
rpm -qa | grep -iE '^(mariadb|mysql)-'
|
||||||
|
|
||||||
You may choose to use 'rpm --nodeps -ev <package-name>' to remove
|
You may choose to use 'rpm --nodeps -ev <package-name>' to remove
|
||||||
the package which contains the mysqlclient shared library. The
|
the package which contains the mysqlclient shared library. The
|
||||||
library will be reinstalled by the MariaDB-shared package.
|
library will be reinstalled by the MariaDB-shared package.
|
||||||
- Install the new MariaDB packages supplied by $myvendor
|
- Install the new MariaDB packages supplied by $myvendor
|
||||||
- Ensure that the MariaDB server is started
|
- Ensure that the MariaDB server is started
|
||||||
- Run the 'mysql_upgrade' program
|
- Run the 'mariadb-upgrade' program
|
||||||
|
|
||||||
This is a brief description of the upgrade process. Important details
|
This is a brief description of the upgrade process. Important details
|
||||||
can be found in the MariaDB manual, in the Upgrading section.
|
can be found in the MariaDB manual, in the Upgrading section.
|
||||||
@@ -65,8 +66,8 @@ HERE
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Create a MySQL user and group. Do not report any problems if it already exists.
|
# Create a MariaDB user and group. Do not report any problems if it already exists.
|
||||||
groupadd -r %{mysqld_group} 2> /dev/null || true
|
groupadd -r %{mysqld_group} 2> /dev/null || true
|
||||||
useradd -M -r --home %{mysqldatadir} --shell /sbin/nologin --comment "MySQL server" --gid %{mysqld_group} %{mysqld_user} 2> /dev/null || true
|
useradd -M -r --home %{mysqldatadir} --shell /sbin/nologin --comment "MariaDB server" --gid %{mysqld_group} %{mysqld_user} 2> /dev/null || true
|
||||||
# The user may already exist, make sure it has the proper group nevertheless (BUG#12823)
|
# The user may already exist, make sure it has the proper group nevertheless (BUG#12823)
|
||||||
usermod --gid %{mysqld_group} %{mysqld_user} 2> /dev/null || true
|
usermod --gid %{mysqld_group} %{mysqld_user} 2> /dev/null || true
|
||||||
|
Reference in New Issue
Block a user