Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
04647611
Commit
04647611
authored
Aug 31, 2021
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge 10.3 into 10.4
parents
dc6bc85c
e835cc85
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
81 additions
and
50 deletions
+81
-50
BUILD/SETUP.sh
BUILD/SETUP.sh
+1
-1
extra/mariabackup/xtrabackup.cc
extra/mariabackup/xtrabackup.cc
+1
-1
include/mysql/psi/psi.h
include/mysql/psi/psi.h
+3
-3
include/mysql/psi/psi_abi_v1.h.pp
include/mysql/psi/psi_abi_v1.h.pp
+3
-3
libmariadb
libmariadb
+1
-1
mysql-test/lib/My/Options.pm
mysql-test/lib/My/Options.pm
+7
-15
mysql-test/lib/mtr_cases.pm
mysql-test/lib/mtr_cases.pm
+4
-2
mysql-test/suite/maria/repair.result
mysql-test/suite/maria/repair.result
+0
-7
mysql-test/suite/maria/repair.test
mysql-test/suite/maria/repair.test
+2
-0
mysql-test/suite/sql_sequence/default.result
mysql-test/suite/sql_sequence/default.result
+10
-0
mysql-test/suite/sql_sequence/default.test
mysql-test/suite/sql_sequence/default.test
+12
-0
mysys/psi_noop.c
mysys/psi_noop.c
+3
-3
scripts/mysql_setpermission.sh
scripts/mysql_setpermission.sh
+6
-2
sql/sql_base.cc
sql/sql_base.cc
+15
-5
sql/sql_class.h
sql/sql_class.h
+1
-4
storage/perfschema/pfs.cc
storage/perfschema/pfs.cc
+3
-3
storage/rocksdb/CMakeLists.txt
storage/rocksdb/CMakeLists.txt
+9
-0
No files found.
BUILD/SETUP.sh
View file @
04647611
...
...
@@ -211,7 +211,7 @@ fi
max_no_embedded_configs
=
"
$SSL_LIBRARY
--with-plugins=max"
max_no_qc_configs
=
"
$SSL_LIBRARY
--with-plugins=max --without-query-cache"
max_configs
=
"
$SSL_LIBRARY
--with-plugins=max --with-embedded-server --with-libevent --without-plugin=plugin_file_key_management --with-plugin-rocksdb=dynamic --with-plugin-test_sql_discovery=DYNAMIC --with-plugin-file_key_management=DYNAMIC"
max_configs
=
"
$SSL_LIBRARY
--with-plugins=max --with-embedded-server --with-libevent --without-plugin=plugin_file_key_management --with-plugin-rocksdb=dynamic --with
out-plugin-tokudb --with
-plugin-test_sql_discovery=DYNAMIC --with-plugin-file_key_management=DYNAMIC"
all_configs
=
"
$SSL_LIBRARY
--with-plugins=max --with-embedded-server --with-innodb_plugin --with-libevent"
#
...
...
extra/mariabackup/xtrabackup.cc
View file @
04647611
...
...
@@ -3402,7 +3402,7 @@ static void xb_load_single_table_tablespace(const char *dirname,
delete
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
);
...
...
include/mysql/psi/psi.h
View file @
04647611
...
...
@@ -1149,7 +1149,7 @@ typedef void (*register_socket_v1_t)
@return an instrumented mutex
*/
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.
...
...
@@ -1164,7 +1164,7 @@ typedef void (*destroy_mutex_v1_t)(struct PSI_mutex *mutex);
@return an instrumented rwlock
*/
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.
...
...
@@ -1179,7 +1179,7 @@ typedef void (*destroy_rwlock_v1_t)(struct PSI_rwlock *rwlock);
@return an instrumented cond
*/
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.
...
...
include/mysql/psi/psi_abi_v1.h.pp
View file @
04647611
...
...
@@ -300,13 +300,13 @@ typedef void (*register_statement_v1_t)
typedef
void
(
*
register_socket_v1_t
)
(
const
char
*
category
,
struct
PSI_socket_info_v1
*
info
,
int
count
);
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
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
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
struct
PSI_socket
*
(
*
init_socket_v1_t
)
(
PSI_socket_key
key
,
const
my_socket
*
fd
,
...
...
libmariadb
@
42cb1e44
Subproject commit
0cc16f18c1d87bbe6e360eaf578fcedeb9479114
Subproject commit
42cb1e442c43902e2866bea38d15f2ed1f5d38b3
mysql-test/lib/My/Options.pm
View file @
04647611
...
...
@@ -140,24 +140,16 @@ sub diff {
}
sub
is_set
{
my
(
$opts
,
$set_opts
)
=
@_
;
sub
is_subset
{
my
(
$set
,
$subset
)
=
@_
;
my
%
cache
=
map
{
_split_option
(
$_
)
}
@$set
;
foreach
my
$opt
(
@$opts
){
my
(
$opt_name1
,
$value1
)
=
_split_option
(
$opt
);
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
;
}
}
for
(
@$subset
){
my
(
$name
,
$value
)
=
_split_option
(
$_
);
return
0
unless
exists
$cache
{
$name
}
and
$cache
{
$name
}
eq
$value
;
}
return
0
;
return
1
;
}
...
...
mysql-test/lib/mtr_cases.pm
View file @
04647611
...
...
@@ -626,8 +626,10 @@ sub make_combinations($$@)
{
# Skip all other combinations if the values they change
# are already fixed in master_opt or slave_opt
if
(
My::Options::
is_set
(
$test
->
{
master_opt
},
$comb
->
{
comb_opt
})
&&
My::Options::
is_set
(
$test
->
{
slave_opt
},
$comb
->
{
comb_opt
})
){
# (empty combinations are not considered a subset of anything)
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
;
...
...
mysql-test/suite/maria/repair.result
View file @
04647611
...
...
@@ -29,12 +29,5 @@ CREATE TABLE t1 (i INT) ENGINE=Aria;
INSERT INTO t1 VALUES (1);
SET max_session_mem_used=50000;
REPAIR LOCAL TABLE t1 USE_FRM;
Table Op Msg_type Msg_text
t1 repair error Failed to open partially repaired table
Warnings:
Error 1290 The MariaDB server is running with the --max-thread-mem-used=50000 option so it cannot execute this statement
REPAIR LOCAL TABLE t1;
Table Op Msg_type Msg_text
test.t1 repair Error The MariaDB server is running with the --max-thread-mem-used=50000 option so it cannot execute this statement
test.t1 repair error Corrupt
DROP TABLE t1;
mysql-test/suite/maria/repair.test
View file @
04647611
...
...
@@ -36,6 +36,8 @@ DROP TABLE t1;
CREATE
TABLE
t1
(
i
INT
)
ENGINE
=
Aria
;
INSERT
INTO
t1
VALUES
(
1
);
SET
max_session_mem_used
=
50000
;
--
disable_result_log
REPAIR
LOCAL
TABLE
t1
USE_FRM
;
REPAIR
LOCAL
TABLE
t1
;
--
enable_result_log
DROP
TABLE
t1
;
mysql-test/suite/sql_sequence/default.result
View file @
04647611
...
...
@@ -185,3 +185,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
drop table t1;
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;
mysql-test/suite/sql_sequence/default.test
View file @
04647611
...
...
@@ -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
;
drop
table
t1
;
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
;
mysys/psi_noop.c
View file @
04647611
...
...
@@ -86,7 +86,7 @@ static void register_socket_noop(const char *category NNN,
}
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
;
}
...
...
@@ -97,7 +97,7 @@ static void destroy_mutex_noop(PSI_mutex* mutex NNN)
}
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
;
}
...
...
@@ -108,7 +108,7 @@ static void destroy_rwlock_noop(PSI_rwlock* rwlock NNN)
}
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
;
}
...
...
scripts/mysql_setpermission.sh
View file @
04647611
...
...
@@ -52,6 +52,7 @@ use strict;
use vars qw
(
$dbh
$sth
$hostname
$opt_user
$opt_password
$opt_help
$opt_host
$opt_socket
$opt_port
$host
$version
)
;
my
$sqlport
=
""
;
my
$sqlhost
=
""
;
my
$user
=
""
;
...
...
@@ -84,9 +85,13 @@ if ($opt_password eq '')
print
"
\n
"
;
}
# Using port argument with 'localhost' will cause an error
if
(
$sqlhost
ne
"localhost"
)
{
$sqlport
=
":port=
$opt_port
"
;
}
# make the connection to MariaDB
$dbh
=
DBI->connect
(
"DBI:mysql:mysql:host=
$sqlhost
:port=
$opt_
port
:mysql_socket=
$opt_socket
"
,
$opt_user
,
$opt_password
,
{
PrintError
=>
0
})
||
$dbh
=
DBI->connect
(
"DBI:mysql:mysql:host=
$sqlhost
$sql
port
:mysql_socket=
$opt_socket
"
,
$opt_user
,
$opt_password
,
{
PrintError
=>
0
})
||
die
(
"Can't make a connection to the mysql server.
\n
The error:
$DBI
::errstr"
)
;
# the start of the program
...
...
@@ -278,7 +283,6 @@ sub addall {
$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
"
;
}
...
...
sql/sql_base.cc
View file @
04647611
...
...
@@ -4638,13 +4638,13 @@ bool table_already_fk_prelocked(TABLE_LIST *tl, LEX_CSTRING *db,
}
static
bool
internal_table_exists
(
TABLE_LIST
*
global_list
,
const
char
*
table_name
)
static
TABLE_LIST
*
internal_table_exists
(
TABLE_LIST
*
global_list
,
const
char
*
table_name
)
{
do
{
if
(
global_list
->
table_name
.
str
==
table_name
)
return
1
;
return
global_list
;
}
while
((
global_list
=
global_list
->
next_global
));
return
0
;
}
...
...
@@ -4659,13 +4659,23 @@ add_internal_tables(THD *thd, Query_tables_list *prelocking_ctx,
do
{
TABLE_LIST
*
tmp
__attribute__
((
unused
));
DBUG_PRINT
(
"info"
,
(
"table name: %s"
,
tables
->
table_name
.
str
));
/*
Skip table if already in the list. Can happen with prepared statements
*/
if
(
tables
->
next_local
&&
internal_table_exists
(
global_table_list
,
tables
->
table_name
.
str
))
if
((
tmp
=
internal_table_exists
(
global_table_list
,
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
;
}
TABLE_LIST
*
tl
=
(
TABLE_LIST
*
)
thd
->
alloc
(
sizeof
(
TABLE_LIST
));
if
(
!
tl
)
...
...
sql/sql_class.h
View file @
04647611
...
...
@@ -4249,11 +4249,8 @@ class THD: public THD_count, /* this must be first */
for any CTE references.
*/
if
(
!
lex
->
with_cte_resolution
)
{
my_message
(
ER_NO_DB_ERROR
,
ER
(
ER_NO_DB_ERROR
),
MYF
(
0
));
return
TRUE
;
}
return
FALSE
;
return
TRUE
;
}
to
->
str
=
strmake
(
db
.
str
,
db
.
length
);
...
...
storage/perfschema/pfs.cc
View file @
04647611
...
...
@@ -1496,7 +1496,7 @@ static void register_socket_v1(const char *category,
@sa PSI_v1::init_mutex.
*/
static
PSI_mutex
*
init_mutex_v1
(
PSI_mutex_key
key
,
const
void
*
identity
)
init_mutex_v1
(
PSI_mutex_key
key
,
void
*
identity
)
{
INIT_BODY_V1
(
mutex
,
key
,
identity
);
}
...
...
@@ -1519,7 +1519,7 @@ static void destroy_mutex_v1(PSI_mutex* mutex)
@sa PSI_v1::init_rwlock.
*/
static
PSI_rwlock
*
init_rwlock_v1
(
PSI_rwlock_key
key
,
const
void
*
identity
)
init_rwlock_v1
(
PSI_rwlock_key
key
,
void
*
identity
)
{
INIT_BODY_V1
(
rwlock
,
key
,
identity
);
}
...
...
@@ -1542,7 +1542,7 @@ static void destroy_rwlock_v1(PSI_rwlock* rwlock)
@sa PSI_v1::init_cond.
*/
static
PSI_cond
*
init_cond_v1
(
PSI_cond_key
key
,
const
void
*
identity
)
init_cond_v1
(
PSI_cond_key
key
,
void
*
identity
)
{
INIT_BODY_V1
(
cond
,
key
,
identity
);
}
...
...
storage/rocksdb/CMakeLists.txt
View file @
04647611
...
...
@@ -44,6 +44,15 @@ IF (WIN32 AND CMAKE_SIZEOF_VOID_P EQUAL 4)
SKIP_ROCKSDB_PLUGIN
(
"32-Bit Windows are temporarily disabled"
)
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)
# Skip build for the old compilers
SET
(
CXX11_FLAGS
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment