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
6a042281
Commit
6a042281
authored
Aug 26, 2020
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge 10.2 into 10.3
parents
65f30050
21a96581
Changes
15
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
129 additions
and
133 deletions
+129
-133
mysql-test/suite/galera/t/mdev-22543.test
mysql-test/suite/galera/t/mdev-22543.test
+10
-10
mysql-test/suite/galera_3nodes/disabled.def
mysql-test/suite/galera_3nodes/disabled.def
+19
-0
mysql-test/suite/innodb/r/foreign_key.result
mysql-test/suite/innodb/r/foreign_key.result
+0
-1
mysql-test/suite/innodb/t/foreign_key.test
mysql-test/suite/innodb/t/foreign_key.test
+0
-1
mysql-test/suite/sys_vars/r/foreign_key_checks_basic.result
mysql-test/suite/sys_vars/r/foreign_key_checks_basic.result
+1
-1
mysql-test/suite/sys_vars/r/unique_checks_basic.result
mysql-test/suite/sys_vars/r/unique_checks_basic.result
+1
-1
sql/mdl.cc
sql/mdl.cc
+8
-17
sql/sys_vars.ic
sql/sys_vars.ic
+5
-2
sql/wsrep_sst.cc
sql/wsrep_sst.cc
+5
-13
sql/wsrep_sst.h
sql/wsrep_sst.h
+0
-2
sql/wsrep_utils.cc
sql/wsrep_utils.cc
+3
-1
sql/wsrep_utils.h
sql/wsrep_utils.h
+1
-1
storage/innobase/include/row0upd.h
storage/innobase/include/row0upd.h
+12
-18
storage/innobase/row/row0upd.cc
storage/innobase/row/row0upd.cc
+59
-64
storage/innobase/trx/trx0rec.cc
storage/innobase/trx/trx0rec.cc
+5
-1
No files found.
mysql-test/suite/galera/t/mdev-22543.test
View file @
6a042281
mysql-test/suite/galera_3nodes/disabled.def
View file @
6a042281
##############################################################################
#
# List the test cases that are to be disabled temporarily.
#
# Separate the test case name and the comment with ':'.
#
# <testcasename> : MDEV-<xxxx> <comment>
#
# Do not use any TAB characters for whitespace.
#
##############################################################################
galera_ipv6_mariabackup : MDEV-23573 Could not open '../galera/include/have_mariabackup.inc'
galera_ipv6_mariabackup_section : MDEV-23574 Could not open '../galera/include/have_mariabackup.inc'
galera_ipv6_mysqldump : MDEV-23576 WSREP_SST: [ERROR] rsync daemon port '16008' has been taken
galera_ipv6_rsyn : MDEV-23581 WSREP_SST: [ERROR] rsync daemon port '16008' has been taken
galera_ipv6_rsync_section : MDEV-23580 WSREP_SST: [ERROR] rsync daemon port '16008' has been taken
galera_ipv6_xtrabackup-v2 : MDEV-23575 WSREP_SST: [ERROR] innobackupex not in path
galera_ist_gcache_rollover : MDEV-23578 WSREP: exception caused by message: {v=0,t=1,ut=255,o=4,s=0,sr=0,as=1,f=6,src=50524cfe,srcvid=view_id(REG,50524cfe,4),insvid=view_id(UNKNOWN,00000000,0),ru=00000000,r=[-1,-1],fs=75,nl=(}
galera_slave_options_do :MDEV-8798
galera_slave_options_ignore : MDEV-8798
mysql-test/suite/innodb/r/foreign_key.result
View file @
6a042281
...
...
@@ -167,7 +167,6 @@ PRIMARY KEY (store_id),
UNIQUE KEY idx_unique_manager (manager_staff_id),
CONSTRAINT fk_store_staff FOREIGN KEY (manager_staff_id) REFERENCES staff (staff_id) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE=InnoDB;
SET FOREIGN_KEY_CHECKS=DEFAULT;
LOCK TABLE staff WRITE;
UNLOCK TABLES;
DROP TABLES staff, store;
...
...
mysql-test/suite/innodb/t/foreign_key.test
View file @
6a042281
...
...
@@ -136,7 +136,6 @@ CREATE TABLE store (
UNIQUE
KEY
idx_unique_manager
(
manager_staff_id
),
CONSTRAINT
fk_store_staff
FOREIGN
KEY
(
manager_staff_id
)
REFERENCES
staff
(
staff_id
)
ON
DELETE
RESTRICT
ON
UPDATE
CASCADE
)
ENGINE
=
InnoDB
;
SET
FOREIGN_KEY_CHECKS
=
DEFAULT
;
LOCK
TABLE
staff
WRITE
;
UNLOCK
TABLES
;
...
...
mysql-test/suite/sys_vars/r/foreign_key_checks_basic.result
View file @
6a042281
...
...
@@ -7,7 +7,7 @@ SET @@session.foreign_key_checks = 1;
SET @@session.foreign_key_checks = DEFAULT;
SELECT @@session.foreign_key_checks;
@@session.foreign_key_checks
0
1
'#---------------------FN_DYNVARS_032_02-------------------------#'
SET foreign_key_checks = 1;
SELECT @@foreign_key_checks;
...
...
mysql-test/suite/sys_vars/r/unique_checks_basic.result
View file @
6a042281
...
...
@@ -7,7 +7,7 @@ SET @@session.unique_checks= 1;
SET @@session.unique_checks= DEFAULT;
SELECT @@session.unique_checks;
@@session.unique_checks
0
1
'#--------------------FN_DYNVARS_005_04-------------------------#'
SET @@session.unique_checks =1;
SELECT @@session.unique_checks;
...
...
sql/mdl.cc
View file @
6a042281
...
...
@@ -26,7 +26,6 @@
#include <mysql/psi/mysql_stage.h>
#include "wsrep_mysqld.h"
#include "wsrep_thd.h"
#include "wsrep_sst.h"
#ifdef HAVE_PSI_INTERFACE
static
PSI_mutex_key
key_MDL_wait_LOCK_wait_status
;
...
...
@@ -2148,17 +2147,10 @@ MDL_context::acquire_lock(MDL_request *mdl_request, double lock_wait_timeout)
wait_status
=
m_wait
.
timed_wait
(
m_owner
,
&
abs_shortwait
,
FALSE
,
mdl_request
->
key
.
get_wait_state_name
());
THD
*
thd
=
m_owner
->
get_thd
();
if
(
wait_status
!=
MDL_wait
::
EMPTY
)
break
;
/* Check if the client is gone while we were waiting. */
if
(
!
thd_is_connected
(
thd
))
{
#if defined(WITH_WSREP) && !defined(EMBEDDED_LIBRARY)
// During SST client might not be connected
if
(
!
wsrep_is_sst_progress
())
#endif
if
(
!
thd_is_connected
(
m_owner
->
get_thd
()))
{
/*
* The client is disconnected. Don't wait forever:
...
...
@@ -2168,7 +2160,6 @@ MDL_context::acquire_lock(MDL_request *mdl_request, double lock_wait_timeout)
wait_status
=
MDL_wait
::
TIMEOUT
;
break
;
}
}
mysql_prlock_wrlock
(
&
lock
->
m_rwlock
);
if
(
lock
->
needs_notification
(
ticket
))
...
...
sql/sys_vars.ic
View file @
6a042281
...
...
@@ -1817,13 +1817,16 @@ public:
return false;
}
void session_save_default(THD *thd, set_var *var)
{ var->save_result.ulonglong_value= global_var(ulonglong) & bitmask; }
{
var->save_result.ulonglong_value=
(reverse_semantics == !(global_var(ulonglong) & bitmask));
}
void global_save_default(THD *thd, set_var *var)
{ var->save_result.ulonglong_value= option.def_value; }
uchar *valptr(THD *thd, ulonglong val)
{
thd->sys_var_tmp.my_bool_value=
reverse_semantics ^ ((val & bitmask) != 0
);
thd->sys_var_tmp.my_bool_value=
(reverse_semantics == !(val & bitmask)
);
return (uchar*) &thd->sys_var_tmp.my_bool_value;
}
uchar *session_value_ptr(THD *thd, const LEX_CSTRING *base)
...
...
sql/wsrep_sst.cc
View file @
6a042281
/* Copyright 2008-20
15
Codership Oy <http://www.codership.com>
/* Copyright 2008-20
20
Codership Oy <http://www.codership.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
...
...
@@ -186,7 +186,6 @@ bool wsrep_before_SE()
static
bool
sst_complete
=
false
;
static
bool
sst_needed
=
false
;
static
bool
sst_in_progress
=
false
;
#define WSREP_EXTEND_TIMEOUT_INTERVAL 30
#define WSREP_TIMEDWAIT_SECONDS 10
...
...
@@ -1548,11 +1547,11 @@ static void* sst_donor_thread (void* a)
wsrep_uuid_t
ret_uuid
=
WSREP_UUID_UNDEFINED
;
// seqno of complete SST
wsrep_seqno_t
ret_seqno
=
WSREP_SEQNO_UNDEFINED
;
// SST is now in progress
sst_in_progress
=
true
;
wsp
::
thd
thd
(
FALSE
);
// w
e turn off wsrep_on for this THD so that it can
// W
e turn off wsrep_on for this THD so that it can
// operate with wsrep_ready == OFF
// We also set this SST thread THD as system thread
wsp
::
thd
thd
(
FALSE
,
true
);
wsp
::
process
proc
(
arg
->
cmd
,
"r"
,
arg
->
env
);
err
=
proc
.
error
();
...
...
@@ -1651,8 +1650,6 @@ static void* sst_donor_thread (void* a)
wsrep
->
sst_sent
(
wsrep
,
&
state_id
,
-
err
);
proc
.
wait
();
sst_in_progress
=
false
;
return
NULL
;
}
...
...
@@ -1827,8 +1824,3 @@ void wsrep_SE_initialized()
{
SE_initialized
=
true
;
}
bool
wsrep_is_sst_progress
()
{
return
(
sst_in_progress
);
}
sql/wsrep_sst.h
View file @
6a042281
...
...
@@ -77,14 +77,12 @@ extern void wsrep_SE_init_grab(); /*! grab init critical section */
extern
void
wsrep_SE_init_wait
();
/*! wait for SE init to complete */
extern
void
wsrep_SE_init_done
();
/*! signal that SE init is complte */
extern
void
wsrep_SE_initialized
();
/*! mark SE initialization complete */
extern
bool
wsrep_is_sst_progress
();
#else
#define wsrep_SE_initialized() do { } while(0)
#define wsrep_SE_init_grab() do { } while(0)
#define wsrep_SE_init_done() do { } while(0)
#define wsrep_sst_continue() (0)
#define wsrep_is_sst_progress() (0)
#endif
/* WITH_WSREP */
#endif
/* WSREP_SST_H */
sql/wsrep_utils.cc
View file @
6a042281
...
...
@@ -414,7 +414,7 @@ process::wait ()
return
err_
;
}
thd
::
thd
(
my_bool
won
)
:
init
(),
ptr
(
new
THD
(
0
))
thd
::
thd
(
my_bool
won
,
bool
system_thread
)
:
init
(),
ptr
(
new
THD
(
0
))
{
if
(
ptr
)
{
...
...
@@ -422,6 +422,8 @@ thd::thd (my_bool won) : init(), ptr(new THD(0))
ptr
->
store_globals
();
ptr
->
variables
.
option_bits
&=
~
OPTION_BIN_LOG
;
// disable binlog
ptr
->
variables
.
wsrep_on
=
won
;
if
(
system_thread
)
ptr
->
system_thread
=
SYSTEM_THREAD_GENERIC
;
ptr
->
security_ctx
->
master_access
=
~
(
ulong
)
0
;
lex_start
(
ptr
);
}
...
...
sql/wsrep_utils.h
View file @
6a042281
...
...
@@ -298,7 +298,7 @@ class thd
public:
thd
(
my_bool
wsrep_on
);
thd
(
my_bool
wsrep_on
,
bool
system_thread
=
false
);
~
thd
();
THD
*
const
ptr
;
};
...
...
storage/innobase/include/row0upd.h
View file @
6a042281
...
...
@@ -249,24 +249,18 @@ row_upd_index_replace_new_col_vals_index_pos(
const
upd_t
*
update
,
mem_heap_t
*
heap
)
MY_ATTRIBUTE
((
nonnull
));
/***********************************************************//**
Replaces the new column values stored in the update vector to the index entry
given. */
void
row_upd_index_replace_new_col_vals
(
/*===============================*/
dtuple_t
*
entry
,
/*!< in/out: index entry where replaced;
the clustered index record must be
covered by a lock or a page latch to
prevent deletion (rollback or purge) */
dict_index_t
*
index
,
/*!< in: index; NOTE that this may also be a
non-clustered index */
const
upd_t
*
update
,
/*!< in: an update vector built for the
CLUSTERED index so that the field number in
an upd_field is the clustered index position */
mem_heap_t
*
heap
)
/*!< in: memory heap for allocating and
copying the new values */
MY_ATTRIBUTE
((
nonnull
));
/** Replace the new column values stored in the update vector,
during trx_undo_prev_version_build().
@param entry clustered index tuple where the values are replaced
(the clustered index leaf page latch must be held)
@param index clustered index
@param update update vector for the clustered index
@param heap memory heap for allocating and copying values
@return whether the previous version was built successfully */
bool
row_upd_index_replace_new_col_vals
(
dtuple_t
*
entry
,
const
dict_index_t
&
index
,
const
upd_t
*
update
,
mem_heap_t
*
heap
)
MY_ATTRIBUTE
((
nonnull
,
warn_unused_result
));
/***********************************************************//**
Replaces the new column values stored in the update vector. */
void
...
...
storage/innobase/row/row0upd.cc
View file @
6a042281
...
...
@@ -1201,7 +1201,9 @@ containing also the reference to the external part
@param[in,out] len input - length of prefix to
fetch; output: fetched length of the prefix
@param[in,out] heap heap where to allocate
@return BLOB prefix */
@return BLOB prefix
@retval NULL if the record is incomplete (should only happen
in row_vers_vc_matches_cluster() executed concurrently with another purge) */
static
byte
*
row_upd_ext_fetch
(
...
...
@@ -1216,10 +1218,7 @@ row_upd_ext_fetch(
*
len
=
btr_copy_externally_stored_field_prefix
(
buf
,
*
len
,
page_size
,
data
,
local_len
);
/* We should never update records containing a half-deleted BLOB. */
ut_a
(
*
len
);
return
(
buf
);
return
*
len
?
buf
:
NULL
;
}
/** Replaces the new column value stored in the update vector in
...
...
@@ -1230,9 +1229,11 @@ the given index entry field.
@param[in] uf update field
@param[in,out] heap memory heap for allocating and copying
the new value
@param[in] page_size page size */
@param[in] page_size page size
@return whether the previous version was built successfully */
MY_ATTRIBUTE
((
nonnull
,
warn_unused_result
))
static
void
bool
row_upd_index_replace_new_col_val
(
dfield_t
*
dfield
,
const
dict_field_t
*
field
,
...
...
@@ -1247,7 +1248,7 @@ row_upd_index_replace_new_col_val(
dfield_copy_data
(
dfield
,
&
uf
->
new_val
);
if
(
dfield_is_null
(
dfield
))
{
return
;
return
true
;
}
len
=
dfield_get_len
(
dfield
);
...
...
@@ -1265,6 +1266,9 @@ row_upd_index_replace_new_col_val(
data
=
row_upd_ext_fetch
(
data
,
l
,
page_size
,
&
len
,
heap
);
if
(
UNIV_UNLIKELY
(
!
data
))
{
return
false
;
}
}
len
=
dtype_get_at_most_n_mbchars
(
col
->
prtype
,
...
...
@@ -1278,7 +1282,7 @@ row_upd_index_replace_new_col_val(
dfield_dup
(
dfield
,
heap
);
}
return
;
return
true
;
}
switch
(
uf
->
orig_len
)
{
...
...
@@ -1317,6 +1321,8 @@ row_upd_index_replace_new_col_val(
dfield_set_ext
(
dfield
);
break
;
}
return
true
;
}
/** Apply an update vector to an index entry.
...
...
@@ -1358,68 +1364,57 @@ row_upd_index_replace_new_col_vals_index_pos(
update
,
i
,
false
);
}
if
(
uf
)
{
row_upd_index_replace_new_col_val
(
if
(
uf
&&
UNIV_UNLIKELY
(
!
row_upd_index_replace_new_col_val
(
dtuple_get_nth_field
(
entry
,
i
),
field
,
col
,
uf
,
heap
,
page_size
);
field
,
col
,
uf
,
heap
,
page_size
)))
{
ut_error
;
}
}
}
/***********************************************************//**
Replaces the new column values stored in the update vector to the index entry
given. */
void
row_upd_index_replace_new_col_vals
(
/*===============================*/
dtuple_t
*
entry
,
/*!< in/out: index entry where replaced;
the clustered index record must be
covered by a lock or a page latch to
prevent deletion (rollback or purge) */
dict_index_t
*
index
,
/*!< in: index; NOTE that this may also be a
non-clustered index */
const
upd_t
*
update
,
/*!< in: an update vector built for the
CLUSTERED index so that the field number in
an upd_field is the clustered index position */
mem_heap_t
*
heap
)
/*!< in: memory heap for allocating and
copying the new values */
/** Replace the new column values stored in the update vector,
during trx_undo_prev_version_build().
@param entry clustered index tuple where the values are replaced
(the clustered index leaf page latch must be held)
@param index clustered index
@param update update vector for the clustered index
@param heap memory heap for allocating and copying values
@return whether the previous version was built successfully */
bool
row_upd_index_replace_new_col_vals
(
dtuple_t
*
entry
,
const
dict_index_t
&
index
,
const
upd_t
*
update
,
mem_heap_t
*
heap
)
{
ulint
i
;
const
dict_index_t
*
clust_index
=
dict_table_get_first_index
(
index
->
table
);
const
page_size_t
&
page_size
=
dict_table_page_size
(
index
->
table
);
ut_ad
(
!
index
->
table
->
skip_alter_undo
);
ut_ad
(
index
.
is_primary
());
const
page_size_t
&
page_size
=
dict_table_page_size
(
index
.
table
);
ut_ad
(
!
index
.
table
->
skip_alter_undo
);
dtuple_set_info_bits
(
entry
,
update
->
info_bits
);
for
(
i
=
0
;
i
<
dict_index_get_n_fields
(
index
);
i
++
)
{
const
dict_field_t
*
field
;
const
dict_col_t
*
col
;
const
upd_field_t
*
uf
;
field
=
dict_index_get_nth_field
(
index
,
i
);
col
=
dict_field_get_col
(
field
);
if
(
col
->
is_virtual
())
{
const
dict_v_col_t
*
vcol
=
reinterpret_cast
<
const
dict_v_col_t
*>
(
col
);
for
(
ulint
i
=
0
;
i
<
index
.
n_fields
;
i
++
)
{
const
dict_field_t
*
field
=
&
index
.
fields
[
i
];
const
dict_col_t
*
col
=
dict_field_get_col
(
field
);
const
upd_field_t
*
uf
;
uf
=
upd_get_field_by_field_no
(
update
,
vcol
->
v_pos
,
true
);
}
else
{
uf
=
upd_get_field_by_field_no
(
update
,
dict_col_get_clust_pos
(
col
,
clust_index
),
false
);
if
(
col
->
is_virtual
())
{
const
dict_v_col_t
*
vcol
=
reinterpret_cast
<
const
dict_v_col_t
*>
(
col
);
uf
=
upd_get_field_by_field_no
(
update
,
vcol
->
v_pos
,
true
);
}
else
uf
=
upd_get_field_by_field_no
(
update
,
dict_col_get_clust_pos
(
col
,
&
index
),
false
);
if
(
uf
)
{
row_upd_index_replace_new_col_val
(
dtuple_get_nth_field
(
entry
,
i
),
field
,
col
,
uf
,
heap
,
page_size
);
}
if
(
!
uf
)
continue
;
if
(
!
row_upd_index_replace_new_col_val
(
dtuple_get_nth_field
(
entry
,
i
),
field
,
col
,
uf
,
heap
,
page_size
))
return
false
;
}
return
true
;
}
/** Replaces the virtual column values stored in the update vector.
...
...
@@ -2441,7 +2436,7 @@ row_upd_sec_index_entry(
#ifdef UNIV_DEBUG
mtr_commit
(
&
mtr
);
mtr_start
(
&
mtr
);
ut_ad
(
btr_validate_index
(
index
,
0
,
false
));
ut_ad
(
btr_validate_index
(
index
,
0
,
false
)
==
DB_SUCCESS
);
ut_ad
(
0
);
#endif
/* UNIV_DEBUG */
break
;
...
...
storage/innobase/trx/trx0rec.cc
View file @
6a042281
...
...
@@ -2377,7 +2377,11 @@ trx_undo_prev_version_build(
/* The page containing the clustered index record
corresponding to entry is latched in mtr. Thus the
following call is safe. */
row_upd_index_replace_new_col_vals
(
entry
,
index
,
update
,
heap
);
if
(
!
row_upd_index_replace_new_col_vals
(
entry
,
*
index
,
update
,
heap
))
{
ut_a
(
v_status
&
TRX_UNDO_PREV_IN_PURGE
);
return
false
;
}
/* Get number of externally stored columns in updated record */
const
ulint
n_ext
=
dtuple_get_n_ext
(
entry
);
...
...
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