mirror of
https://github.com/MariaDB/server.git
synced 2025-07-17 12:02:09 +03:00
Merge 10.4 into 10.5
This commit is contained in:
@ -3341,7 +3341,7 @@ static void xb_load_single_table_tablespace(const char *dirname,
|
|||||||
delete file;
|
delete file;
|
||||||
|
|
||||||
if (err != DB_SUCCESS && xtrabackup_backup && !is_empty_file) {
|
if (err != DB_SUCCESS && xtrabackup_backup && !is_empty_file) {
|
||||||
die("Failed to not validate first page of the file %s, error %d",name, (int)err);
|
die("Failed to validate first page of the file %s, error %d",name, (int)err);
|
||||||
}
|
}
|
||||||
|
|
||||||
ut_free(name);
|
ut_free(name);
|
||||||
|
@ -1442,7 +1442,7 @@ typedef void (*register_socket_v1_t)
|
|||||||
@return an instrumented mutex
|
@return an instrumented mutex
|
||||||
*/
|
*/
|
||||||
typedef struct PSI_mutex* (*init_mutex_v1_t)
|
typedef struct PSI_mutex* (*init_mutex_v1_t)
|
||||||
(PSI_mutex_key key, const void *identity);
|
(PSI_mutex_key key, void *identity);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Mutex instrumentation destruction API.
|
Mutex instrumentation destruction API.
|
||||||
@ -1457,7 +1457,7 @@ typedef void (*destroy_mutex_v1_t)(struct PSI_mutex *mutex);
|
|||||||
@return an instrumented rwlock
|
@return an instrumented rwlock
|
||||||
*/
|
*/
|
||||||
typedef struct PSI_rwlock* (*init_rwlock_v1_t)
|
typedef struct PSI_rwlock* (*init_rwlock_v1_t)
|
||||||
(PSI_rwlock_key key, const void *identity);
|
(PSI_rwlock_key key, void *identity);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Rwlock instrumentation destruction API.
|
Rwlock instrumentation destruction API.
|
||||||
@ -1472,7 +1472,7 @@ typedef void (*destroy_rwlock_v1_t)(struct PSI_rwlock *rwlock);
|
|||||||
@return an instrumented cond
|
@return an instrumented cond
|
||||||
*/
|
*/
|
||||||
typedef struct PSI_cond* (*init_cond_v1_t)
|
typedef struct PSI_cond* (*init_cond_v1_t)
|
||||||
(PSI_cond_key key, const void *identity);
|
(PSI_cond_key key, void *identity);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Cond instrumentation destruction API.
|
Cond instrumentation destruction API.
|
||||||
|
@ -409,13 +409,13 @@ typedef void (*register_statement_v1_t)
|
|||||||
typedef void (*register_socket_v1_t)
|
typedef void (*register_socket_v1_t)
|
||||||
(const char *category, struct PSI_socket_info_v1 *info, int count);
|
(const char *category, struct PSI_socket_info_v1 *info, int count);
|
||||||
typedef struct PSI_mutex* (*init_mutex_v1_t)
|
typedef struct PSI_mutex* (*init_mutex_v1_t)
|
||||||
(PSI_mutex_key key, const void *identity);
|
(PSI_mutex_key key, void *identity);
|
||||||
typedef void (*destroy_mutex_v1_t)(struct PSI_mutex *mutex);
|
typedef void (*destroy_mutex_v1_t)(struct PSI_mutex *mutex);
|
||||||
typedef struct PSI_rwlock* (*init_rwlock_v1_t)
|
typedef struct PSI_rwlock* (*init_rwlock_v1_t)
|
||||||
(PSI_rwlock_key key, const void *identity);
|
(PSI_rwlock_key key, void *identity);
|
||||||
typedef void (*destroy_rwlock_v1_t)(struct PSI_rwlock *rwlock);
|
typedef void (*destroy_rwlock_v1_t)(struct PSI_rwlock *rwlock);
|
||||||
typedef struct PSI_cond* (*init_cond_v1_t)
|
typedef struct PSI_cond* (*init_cond_v1_t)
|
||||||
(PSI_cond_key key, const void *identity);
|
(PSI_cond_key key, void *identity);
|
||||||
typedef void (*destroy_cond_v1_t)(struct PSI_cond *cond);
|
typedef void (*destroy_cond_v1_t)(struct PSI_cond *cond);
|
||||||
typedef struct PSI_socket* (*init_socket_v1_t)
|
typedef struct PSI_socket* (*init_socket_v1_t)
|
||||||
(PSI_socket_key key, const my_socket *fd,
|
(PSI_socket_key key, const my_socket *fd,
|
||||||
|
@ -52,17 +52,17 @@ void pfs_register_thread_v1(const char *category,
|
|||||||
int count);
|
int count);
|
||||||
|
|
||||||
PSI_mutex*
|
PSI_mutex*
|
||||||
pfs_init_mutex_v1(PSI_mutex_key key, const void *identity);
|
pfs_init_mutex_v1(PSI_mutex_key key, void *identity);
|
||||||
|
|
||||||
void pfs_destroy_mutex_v1(PSI_mutex* mutex);
|
void pfs_destroy_mutex_v1(PSI_mutex* mutex);
|
||||||
|
|
||||||
PSI_rwlock*
|
PSI_rwlock*
|
||||||
pfs_init_rwlock_v1(PSI_rwlock_key key, const void *identity);
|
pfs_init_rwlock_v1(PSI_rwlock_key key, void *identity);
|
||||||
|
|
||||||
void pfs_destroy_rwlock_v1(PSI_rwlock* rwlock);
|
void pfs_destroy_rwlock_v1(PSI_rwlock* rwlock);
|
||||||
|
|
||||||
PSI_cond*
|
PSI_cond*
|
||||||
pfs_init_cond_v1(PSI_cond_key key, const void *identity);
|
pfs_init_cond_v1(PSI_cond_key key, void *identity);
|
||||||
|
|
||||||
void pfs_destroy_cond_v1(PSI_cond* cond);
|
void pfs_destroy_cond_v1(PSI_cond* cond);
|
||||||
|
|
||||||
|
Submodule libmariadb updated: 0cc16f18c1...42cb1e442c
@ -140,24 +140,16 @@ sub diff {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sub is_set {
|
sub is_subset {
|
||||||
my ($opts, $set_opts)= @_;
|
my ($set, $subset)= @_;
|
||||||
|
my %cache = map { _split_option($_) } @$set;
|
||||||
|
|
||||||
foreach my $opt (@$opts){
|
for (@$subset){
|
||||||
|
my ($name, $value)= _split_option($_);
|
||||||
my ($opt_name1, $value1)= _split_option($opt);
|
return 0 unless exists $cache{$name} and $cache{$name} eq $value;
|
||||||
|
|
||||||
foreach my $set_opt (@$set_opts){
|
|
||||||
my ($opt_name2, $value2)= _split_option($set_opt);
|
|
||||||
|
|
||||||
if ($opt_name1 eq $opt_name2 and $value1 eq $value2){
|
|
||||||
# Option already set
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -626,8 +626,10 @@ sub make_combinations($$@)
|
|||||||
{
|
{
|
||||||
# Skip all other combinations if the values they change
|
# Skip all other combinations if the values they change
|
||||||
# are already fixed in master_opt or slave_opt
|
# are already fixed in master_opt or slave_opt
|
||||||
if (My::Options::is_set($test->{master_opt}, $comb->{comb_opt}) &&
|
# (empty combinations are not considered a subset of anything)
|
||||||
My::Options::is_set($test->{slave_opt}, $comb->{comb_opt}) ){
|
if (@{$comb->{comb_opt}} &&
|
||||||
|
My::Options::is_subset($test->{master_opt}, $comb->{comb_opt}) &&
|
||||||
|
My::Options::is_subset($test->{slave_opt}, $comb->{comb_opt}) ){
|
||||||
|
|
||||||
$test_combs->{$comb->{name}} = 2;
|
$test_combs->{$comb->{name}} = 2;
|
||||||
|
|
||||||
|
@ -183,3 +183,13 @@ ALTER TABLE t1 add column d int default next value for s_not_exits;
|
|||||||
ERROR 42S02: Table 'test.s_not_exits' doesn't exist
|
ERROR 42S02: Table 'test.s_not_exits' doesn't exist
|
||||||
drop table t1;
|
drop table t1;
|
||||||
drop sequence s1;
|
drop sequence s1;
|
||||||
|
#
|
||||||
|
# MDEV 22785 Crash with prepared statements and NEXTVAL()
|
||||||
|
#
|
||||||
|
CREATE SEQUENCE s;
|
||||||
|
CREATE TABLE t1 (id int NOT NULL DEFAULT NEXTVAL(s), PRIMARY KEY (id));
|
||||||
|
PREPARE stmt FROM " INSERT INTO t1 () values ()";
|
||||||
|
INSERT INTO t1 () values ();
|
||||||
|
EXECUTE stmt;
|
||||||
|
DROP TABLE t1;
|
||||||
|
DROP SEQUENCE s;
|
||||||
|
@ -123,3 +123,15 @@ ALTER TABLE t1 add column c int;
|
|||||||
ALTER TABLE t1 add column d int default next value for s_not_exits;
|
ALTER TABLE t1 add column d int default next value for s_not_exits;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
drop sequence s1;
|
drop sequence s1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV 22785 Crash with prepared statements and NEXTVAL()
|
||||||
|
--echo #
|
||||||
|
CREATE SEQUENCE s;
|
||||||
|
CREATE TABLE t1 (id int NOT NULL DEFAULT NEXTVAL(s), PRIMARY KEY (id));
|
||||||
|
PREPARE stmt FROM " INSERT INTO t1 () values ()";
|
||||||
|
INSERT INTO t1 () values ();
|
||||||
|
EXECUTE stmt;
|
||||||
|
# Cleanup
|
||||||
|
DROP TABLE t1;
|
||||||
|
DROP SEQUENCE s;
|
||||||
|
@ -86,7 +86,7 @@ static void register_socket_noop(const char *category NNN,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static PSI_mutex*
|
static PSI_mutex*
|
||||||
init_mutex_noop(PSI_mutex_key key NNN, const void *identity NNN)
|
init_mutex_noop(PSI_mutex_key key NNN, void *identity NNN)
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -97,7 +97,7 @@ static void destroy_mutex_noop(PSI_mutex* mutex NNN)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static PSI_rwlock*
|
static PSI_rwlock*
|
||||||
init_rwlock_noop(PSI_rwlock_key key NNN, const void *identity NNN)
|
init_rwlock_noop(PSI_rwlock_key key NNN, void *identity NNN)
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -108,7 +108,7 @@ static void destroy_rwlock_noop(PSI_rwlock* rwlock NNN)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static PSI_cond*
|
static PSI_cond*
|
||||||
init_cond_noop(PSI_cond_key key NNN, const void *identity NNN)
|
init_cond_noop(PSI_cond_key key NNN, void *identity NNN)
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -310,7 +310,6 @@ sub addall {
|
|||||||
$sth = $dbh->do("REVOKE ALL ON $db.* FROM \'$user\'\@\'$host\'") || die $dbh->errstr;
|
$sth = $dbh->do("REVOKE ALL ON $db.* FROM \'$user\'\@\'$host\'") || die $dbh->errstr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$dbh->do("FLUSH PRIVILEGES") || print STDERR "Can't flush privileges\n";
|
|
||||||
print "Everything is inserted and mysql privileges have been reloaded.\n\n";
|
print "Everything is inserted and mysql privileges have been reloaded.\n\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4536,13 +4536,13 @@ bool table_already_fk_prelocked(TABLE_LIST *tl, LEX_CSTRING *db,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static bool internal_table_exists(TABLE_LIST *global_list,
|
static TABLE_LIST *internal_table_exists(TABLE_LIST *global_list,
|
||||||
const char *table_name)
|
const char *table_name)
|
||||||
{
|
{
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
if (global_list->table_name.str == table_name)
|
if (global_list->table_name.str == table_name)
|
||||||
return 1;
|
return global_list;
|
||||||
} while ((global_list= global_list->next_global));
|
} while ((global_list= global_list->next_global));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -4557,13 +4557,23 @@ add_internal_tables(THD *thd, Query_tables_list *prelocking_ctx,
|
|||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
TABLE_LIST *tmp __attribute__((unused));
|
||||||
DBUG_PRINT("info", ("table name: %s", tables->table_name.str));
|
DBUG_PRINT("info", ("table name: %s", tables->table_name.str));
|
||||||
/*
|
/*
|
||||||
Skip table if already in the list. Can happen with prepared statements
|
Skip table if already in the list. Can happen with prepared statements
|
||||||
*/
|
*/
|
||||||
if (tables->next_local &&
|
if ((tmp= internal_table_exists(global_table_list,
|
||||||
internal_table_exists(global_table_list, tables->table_name.str))
|
tables->table_name.str)))
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
Use the original value for the next local, used by the
|
||||||
|
original prepared statement. We cannot trust the original
|
||||||
|
next_local value as it may have been changed by a previous
|
||||||
|
statement using the same table.
|
||||||
|
*/
|
||||||
|
tables->next_local= tmp;
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
TABLE_LIST *tl= (TABLE_LIST *) thd->alloc(sizeof(TABLE_LIST));
|
TABLE_LIST *tl= (TABLE_LIST *) thd->alloc(sizeof(TABLE_LIST));
|
||||||
if (!tl)
|
if (!tl)
|
||||||
|
@ -4408,11 +4408,8 @@ public:
|
|||||||
for any CTE references.
|
for any CTE references.
|
||||||
*/
|
*/
|
||||||
if (!lex->with_cte_resolution)
|
if (!lex->with_cte_resolution)
|
||||||
{
|
|
||||||
my_message(ER_NO_DB_ERROR, ER(ER_NO_DB_ERROR), MYF(0));
|
my_message(ER_NO_DB_ERROR, ER(ER_NO_DB_ERROR), MYF(0));
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
|
||||||
return FALSE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
to->str= strmake(db.str, db.length);
|
to->str= strmake(db.str, db.length);
|
||||||
|
@ -1826,7 +1826,7 @@ void pfs_register_socket_v1(const char *category,
|
|||||||
@sa PSI_v1::init_mutex.
|
@sa PSI_v1::init_mutex.
|
||||||
*/
|
*/
|
||||||
PSI_mutex*
|
PSI_mutex*
|
||||||
pfs_init_mutex_v1(PSI_mutex_key key, const void *identity)
|
pfs_init_mutex_v1(PSI_mutex_key key, void *identity)
|
||||||
{
|
{
|
||||||
INIT_BODY_V1(mutex, key, identity);
|
INIT_BODY_V1(mutex, key, identity);
|
||||||
}
|
}
|
||||||
@ -1849,7 +1849,7 @@ void pfs_destroy_mutex_v1(PSI_mutex* mutex)
|
|||||||
@sa PSI_v1::init_rwlock.
|
@sa PSI_v1::init_rwlock.
|
||||||
*/
|
*/
|
||||||
PSI_rwlock*
|
PSI_rwlock*
|
||||||
pfs_init_rwlock_v1(PSI_rwlock_key key, const void *identity)
|
pfs_init_rwlock_v1(PSI_rwlock_key key, void *identity)
|
||||||
{
|
{
|
||||||
INIT_BODY_V1(rwlock, key, identity);
|
INIT_BODY_V1(rwlock, key, identity);
|
||||||
}
|
}
|
||||||
@ -1872,7 +1872,7 @@ void pfs_destroy_rwlock_v1(PSI_rwlock* rwlock)
|
|||||||
@sa PSI_v1::init_cond.
|
@sa PSI_v1::init_cond.
|
||||||
*/
|
*/
|
||||||
PSI_cond*
|
PSI_cond*
|
||||||
pfs_init_cond_v1(PSI_cond_key key, const void *identity)
|
pfs_init_cond_v1(PSI_cond_key key, void *identity)
|
||||||
{
|
{
|
||||||
INIT_BODY_V1(cond, key, identity);
|
INIT_BODY_V1(cond, key, identity);
|
||||||
}
|
}
|
||||||
|
@ -44,6 +44,15 @@ IF (WIN32 AND CMAKE_SIZEOF_VOID_P EQUAL 4)
|
|||||||
SKIP_ROCKSDB_PLUGIN("32-Bit Windows are temporarily disabled")
|
SKIP_ROCKSDB_PLUGIN("32-Bit Windows are temporarily disabled")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
#
|
||||||
|
# Also, disable on ARM64 when not Linux
|
||||||
|
# Requires submodule update to v6.16.3
|
||||||
|
# containing commit https://github.com/facebook/rocksdb/commit/ee4bd4780b321ddb5f92a0f4eb956f2a2ebd60dc
|
||||||
|
#
|
||||||
|
IF(CMAKE_SYSTEM_PROCESSOR MATCHES "(arm64|aarch64)" AND NOT CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||||
|
SKIP_ROCKSDB_PLUGIN("ARM64 disabled on all except Linux")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
# This plugin needs recent C++ compilers (it is using C++11 features)
|
# This plugin needs recent C++ compilers (it is using C++11 features)
|
||||||
# Skip build for the old compilers
|
# Skip build for the old compilers
|
||||||
SET(CXX11_FLAGS)
|
SET(CXX11_FLAGS)
|
||||||
|
Reference in New Issue
Block a user