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
d7aa81c8
Commit
d7aa81c8
authored
Sep 24, 2021
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge 10.2 into 10.3
parents
a5df5aec
f59f5c4a
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
125 additions
and
147 deletions
+125
-147
libmariadb
libmariadb
+1
-1
mysql-test/suite/galera/r/galera_fulltext.result
mysql-test/suite/galera/r/galera_fulltext.result
+0
-28
mysql-test/suite/galera/t/galera_fulltext.test
mysql-test/suite/galera/t/galera_fulltext.test
+0
-23
scripts/wsrep_sst_common.sh
scripts/wsrep_sst_common.sh
+12
-4
scripts/wsrep_sst_mariabackup.sh
scripts/wsrep_sst_mariabackup.sh
+40
-15
scripts/wsrep_sst_rsync.sh
scripts/wsrep_sst_rsync.sh
+40
-23
storage/innobase/handler/ha_innodb.cc
storage/innobase/handler/ha_innodb.cc
+25
-45
support-files/mysql.server.sh
support-files/mysql.server.sh
+7
-8
No files found.
libmariadb
@
b9917238
Subproject commit
42cb1e442c43902e2866bea38d15f2ed1f5d38b3
Subproject commit
b99172386a740ef0c8136e9a6cd7d9ad9a77b31f
mysql-test/suite/galera/r/galera_fulltext.result
View file @
d7aa81c8
...
@@ -36,34 +36,6 @@ DROP TABLE t1;
...
@@ -36,34 +36,6 @@ DROP TABLE t1;
DROP TABLE ten;
DROP TABLE ten;
connection node_1;
connection node_1;
SET @value=REPEAT (1,5001);
SET @value=REPEAT (1,5001);
CREATE TABLE t (a VARCHAR(5000),FULLTEXT (a)) engine=innodb;
INSERT IGNORE INTO t VALUES(@value);
Warnings:
Warning 1265 Data truncated for column 'a' at row 1
SELECT COUNT(*) FROM t;
COUNT(*)
1
connection node_2;
SELECT COUNT(*) FROM t;
COUNT(*)
1
connection node_1;
DROP TABLE t;
CREATE TABLE t (a VARCHAR(5000)) engine=innodb;
INSERT IGNORE INTO t VALUES(@value);
Warnings:
Warning 1265 Data truncated for column 'a' at row 1
SELECT COUNT(*) FROM t;
COUNT(*)
1
connection node_2;
SELECT COUNT(*) FROM t;
COUNT(*)
1
connection node_1;
DROP TABLE t;
connection node_1;
SET @value=REPEAT (1,5001);
CREATE TABLE t (a VARCHAR(5000),FULLTEXT (a)) engine=innodb DEFAULT CHARSET=utf8;
CREATE TABLE t (a VARCHAR(5000),FULLTEXT (a)) engine=innodb DEFAULT CHARSET=utf8;
INSERT IGNORE INTO t VALUES(@value);
INSERT IGNORE INTO t VALUES(@value);
Warnings:
Warnings:
...
...
mysql-test/suite/galera/t/galera_fulltext.test
View file @
d7aa81c8
...
@@ -60,29 +60,6 @@ SELECT COUNT(f1) = 1000 FROM t1 WHERE MATCH(f1) AGAINST ('abcdefjhk');
...
@@ -60,29 +60,6 @@ SELECT COUNT(f1) = 1000 FROM t1 WHERE MATCH(f1) AGAINST ('abcdefjhk');
DROP
TABLE
t1
;
DROP
TABLE
t1
;
DROP
TABLE
ten
;
DROP
TABLE
ten
;
#
# MDEV-24978 : SIGABRT in __libc_message
#
--
connection
node_1
SET
@
value
=
REPEAT
(
1
,
5001
);
CREATE
TABLE
t
(
a
VARCHAR
(
5000
),
FULLTEXT
(
a
))
engine
=
innodb
;
INSERT
IGNORE
INTO
t
VALUES
(
@
value
);
SELECT
COUNT
(
*
)
FROM
t
;
--
connection
node_2
SELECT
COUNT
(
*
)
FROM
t
;
--
connection
node_1
DROP
TABLE
t
;
CREATE
TABLE
t
(
a
VARCHAR
(
5000
))
engine
=
innodb
;
INSERT
IGNORE
INTO
t
VALUES
(
@
value
);
SELECT
COUNT
(
*
)
FROM
t
;
--
connection
node_2
SELECT
COUNT
(
*
)
FROM
t
;
--
connection
node_1
DROP
TABLE
t
;
#
#
# Case 2: UTF-8
# Case 2: UTF-8
...
...
scripts/wsrep_sst_common.sh
View file @
d7aa81c8
...
@@ -1065,8 +1065,9 @@ check_for_dhparams()
...
@@ -1065,8 +1065,9 @@ check_for_dhparams()
#
#
verify_ca_matches_cert
()
verify_ca_matches_cert
()
{
{
local
ca_path
=
"
$1
"
local
ca
=
"
$1
"
local
cert_path
=
"
$2
"
local
cert
=
"
$2
"
local
path
=
${
3
:-
0
}
# If the openssl utility is not installed, then
# If the openssl utility is not installed, then
# we will not do this certificate check:
# we will not do this certificate check:
...
@@ -1075,8 +1076,15 @@ verify_ca_matches_cert()
...
@@ -1075,8 +1076,15 @@ verify_ca_matches_cert()
return
return
fi
fi
if
!
"
$OPENSSL_BINARY
"
verify
-verbose
-CAfile
"
$ca_path
"
"
$cert_path
"
>
/dev/null 2>&1
local
not_match
=
0
then
if
[
$path
-eq
0
]
;
then
"
$OPENSSL_BINARY
"
verify
-verbose
-CAfile
"
$ca
"
"
$cert
"
>
/dev/null 2>&1
||
not_match
=
1
else
"
$OPENSSL_BINARY
"
verify
-verbose
-CApath
"
$ca
"
"
$cert
"
>
/dev/null 2>&1
||
not_match
=
1
fi
if
[
$not_match
-eq
1
]
;
then
wsrep_log_error
"******** FATAL ERROR ********************************************"
wsrep_log_error
"******** FATAL ERROR ********************************************"
wsrep_log_error
"* The certifcate and CA (certificate authority) do not match. *"
wsrep_log_error
"* The certifcate and CA (certificate authority) do not match. *"
wsrep_log_error
"* It does not appear that the certificate was issued by the CA. *"
wsrep_log_error
"* It does not appear that the certificate was issued by the CA. *"
...
...
scripts/wsrep_sst_mariabackup.sh
View file @
d7aa81c8
...
@@ -34,6 +34,7 @@ ssyslog=""
...
@@ -34,6 +34,7 @@ ssyslog=""
ssystag
=
""
ssystag
=
""
BACKUP_PID
=
""
BACKUP_PID
=
""
tcert
=
""
tcert
=
""
tpath
=
0
tpem
=
""
tpem
=
""
tkey
=
""
tkey
=
""
tmode
=
"DISABLED"
tmode
=
"DISABLED"
...
@@ -85,7 +86,6 @@ readonly SECRET_TAG="secret"
...
@@ -85,7 +86,6 @@ readonly SECRET_TAG="secret"
# Required for backup locks
# Required for backup locks
# For backup locks it is 1 sent by joiner
# For backup locks it is 1 sent by joiner
# 5.6.21 PXC and later can't donate to an older joiner
sst_ver
=
1
sst_ver
=
1
if
[
-n
"
$(
command
-v
pv
)
"
]
&&
pv
--help
|
grep
-qw
--
'-F'
;
then
if
[
-n
"
$(
command
-v
pv
)
"
]
&&
pv
--help
|
grep
-qw
--
'-F'
;
then
...
@@ -339,64 +339,83 @@ get_transfer()
...
@@ -339,64 +339,83 @@ get_transfer()
fi
fi
fi
fi
CN_option
=
",commonname=''"
if
[
$encrypt
-eq
2
]
;
then
if
[
$encrypt
-eq
2
]
;
then
wsrep_log_info
"Using openssl based encryption with socat: with crt and pem"
wsrep_log_info
"Using openssl based encryption with socat: with crt and pem"
if
[
-z
"
$tpem
"
-o
-z
"
$tcert
"
]
;
then
if
[
-z
"
$tpem
"
-o
-z
"
$tcert
"
]
;
then
wsrep_log_error
"Both PEM and CRT files required"
wsrep_log_error
\
"Both PEM file and CRT file (or path) are required"
exit
22
exit
22
fi
fi
if
[
!
-r
"
$tpem
"
-o
!
-r
"
$tcert
"
]
;
then
if
[
!
-r
"
$tpem
"
-o
!
-r
"
$tcert
"
]
;
then
wsrep_log_error
"Both PEM and CRT files must be readable"
wsrep_log_error
\
"Both PEM file and CRT file (or path) must be readable"
exit
22
exit
22
fi
fi
verify_ca_matches_cert
"
$tcert
"
"
$tpem
"
verify_ca_matches_cert
"
$tcert
"
"
$tpem
"
$tpath
tcmd
=
"
$tcmd
,cert='
$tpem
',cafile='
$tcert
'
$sockopt
"
if
[
$tpath
-eq
0
]
;
then
tcmd
=
"
$tcmd
,cert='
$tpem
',cafile='
$tcert
'"
else
tcmd
=
"
$tcmd
,cert='
$tpem
',capath='
$tcert
'"
fi
stagemsg
=
"
$stagemsg
-OpenSSL-Encrypted-2"
stagemsg
=
"
$stagemsg
-OpenSSL-Encrypted-2"
wsrep_log_info
"
$action
with cert=
$tpem
, ca
file
=
$tcert
"
wsrep_log_info
"
$action
with cert=
$tpem
, ca=
$tcert
"
elif
[
$encrypt
-eq
3
-o
$encrypt
-eq
4
]
;
then
elif
[
$encrypt
-eq
3
-o
$encrypt
-eq
4
]
;
then
wsrep_log_info
"Using openssl based encryption with socat: with key and crt"
wsrep_log_info
"Using openssl based encryption with socat: with key and crt"
if
[
-z
"
$tpem
"
-o
-z
"
$tkey
"
]
;
then
if
[
-z
"
$tpem
"
-o
-z
"
$tkey
"
]
;
then
wsrep_log_error
"Both certificate and key files required"
wsrep_log_error
"Both certificate file (or path) "
\
"and key file are required"
exit
22
exit
22
fi
fi
if
[
!
-r
"
$tpem
"
-o
!
-r
"
$tkey
"
]
;
then
if
[
!
-r
"
$tpem
"
-o
!
-r
"
$tkey
"
]
;
then
wsrep_log_error
"Both certificate and key files must be readable"
wsrep_log_error
"Both certificate file (or path) "
\
"and key file must be readable"
exit
22
exit
22
fi
fi
verify_cert_matches_key
"
$tpem
"
"
$tkey
"
verify_cert_matches_key
"
$tpem
"
"
$tkey
"
stagemsg
=
"
$stagemsg
-OpenSSL-Encrypted-3"
stagemsg
=
"
$stagemsg
-OpenSSL-Encrypted-3"
if
[
-z
"
$tcert
"
]
;
then
if
[
-z
"
$tcert
"
]
;
then
if
[
$encrypt
-eq
4
]
;
then
if
[
$encrypt
-eq
4
]
;
then
wsrep_log_error
"Peer certificate required if encrypt=4"
wsrep_log_error
\
"Peer certificate file (or path) required if encrypt=4"
exit
22
exit
22
fi
fi
# no verification
# no verification
tcmd
=
"
$tcmd
,cert='
$tpem
',key='
$tkey
',verify=0
$sockopt
"
CN_option
=
""
tcmd
=
"
$tcmd
,cert='
$tpem
',key='
$tkey
',verify=0"
wsrep_log_info
"
$action
with cert=
$tpem
, key=
$tkey
, verify=0"
wsrep_log_info
"
$action
with cert=
$tpem
, key=
$tkey
, verify=0"
else
else
# CA verification
# CA verification
if
[
!
-r
"
$tcert
"
]
;
then
if
[
!
-r
"
$tcert
"
]
;
then
wsrep_log_error
"Certificate file must be readable"
wsrep_log_error
"Certificate file
or path
must be readable"
exit
22
exit
22
fi
fi
verify_ca_matches_cert
"
$tcert
"
"
$tpem
"
verify_ca_matches_cert
"
$tcert
"
"
$tpem
"
$tpath
if
[
-n
"
$WSREP_SST_OPT_REMOTE_USER
"
]
;
then
if
[
-n
"
$WSREP_SST_OPT_REMOTE_USER
"
]
;
then
CN_option
=
",commonname='
$WSREP_SST_OPT_REMOTE_USER
'"
CN_option
=
",commonname='
$WSREP_SST_OPT_REMOTE_USER
'"
elif
[
$encrypt
-eq
4
]
;
then
elif
[
"
$WSREP_SST_OPT_ROLE
"
=
'joiner'
-o
$encrypt
-eq
4
]
then
CN_option
=
",commonname=''"
CN_option
=
",commonname=''"
elif
is_local_ip
"
$WSREP_SST_OPT_HOST_UNESCAPED
"
;
then
elif
is_local_ip
"
$WSREP_SST_OPT_HOST_UNESCAPED
"
;
then
CN_option
=
',commonname=localhost'
CN_option
=
',commonname=localhost'
else
else
CN_option
=
",commonname='
$WSREP_SST_OPT_HOST_UNESCAPED
'"
CN_option
=
",commonname='
$WSREP_SST_OPT_HOST_UNESCAPED
'"
fi
fi
tcmd
=
"
$tcmd
,cert='
$tpem
',key='
$tkey
',cafile='
$tcert
'
$CN_option$sockopt
"
if
[
$tpath
-eq
0
]
;
then
wsrep_log_info
"
$action
with cert=
$tpem
, key=
$tkey
, cafile=
$tcert
"
tcmd
=
"
$tcmd
,cert='
$tpem
',key='
$tkey
',cafile='
$tcert
'"
else
tcmd
=
"
$tcmd
,cert='
$tpem
',key='
$tkey
',capath='
$tcert
'"
fi
wsrep_log_info
"
$action
with cert=
$tpem
, key=
$tkey
, ca=
$tcert
"
fi
fi
else
else
wsrep_log_info
"Unknown encryption mode: encrypt=
$encrypt
"
wsrep_log_info
"Unknown encryption mode: encrypt=
$encrypt
"
exit
22
exit
22
fi
fi
tcmd
=
"
$tcmd$CN_option$sockopt
"
if
[
"
$WSREP_SST_OPT_ROLE
"
=
'joiner'
]
;
then
if
[
"
$WSREP_SST_OPT_ROLE
"
=
'joiner'
]
;
then
tcmd
=
"
$tcmd
stdio"
tcmd
=
"
$tcmd
stdio"
fi
fi
...
@@ -473,6 +492,12 @@ check_server_ssl_config()
...
@@ -473,6 +492,12 @@ check_server_ssl_config()
"of the tca, tcert and/or tkey in the [sst] section"
"of the tca, tcert and/or tkey in the [sst] section"
fi
fi
fi
fi
if
[
-n
"
$tcert
"
]
;
then
tcert
=
$(
trim_string
"
$tcert
"
)
if
[
"
${
tcert
%/
}
"
!=
"
$tcert
"
]
;
then
tpath
=
1
fi
fi
}
}
read_cnf
()
read_cnf
()
...
...
scripts/wsrep_sst_rsync.sh
View file @
d7aa81c8
...
@@ -236,11 +236,18 @@ check_server_ssl_config()
...
@@ -236,11 +236,18 @@ check_server_ssl_config()
SSLMODE
=
$(
parse_cnf
"
$SST_SECTIONS
"
'ssl-mode'
|
tr
[
:lower:]
[
:upper:]
)
SSLMODE
=
$(
parse_cnf
"
$SST_SECTIONS
"
'ssl-mode'
|
tr
[
:lower:]
[
:upper:]
)
# no old-style SSL config in [sst], check for new one:
# no old-style SSL config in [sst], check for new one:
if
[
-z
"
$SSTKEY
"
-a
-z
"
$SSTCERT
"
-a
-z
"
$SSTCA
"
]
if
[
-z
"
$SSTKEY
"
-a
-z
"
$SSTCERT
"
-a
-z
"
$SSTCA
"
]
;
then
then
check_server_ssl_config
check_server_ssl_config
fi
fi
SSTPATH
=
0
if
[
-n
"
$SSTCA
"
]
;
then
SSTCA
=
$(
trim_string
"
$SSTCA
"
)
if
[
"
${
SSTCA
%/
}
"
!=
"
$SSTCA
"
]
;
then
SSTPATH
=
1
fi
fi
if
[
-z
"
$SSLMODE
"
]
;
then
if
[
-z
"
$SSLMODE
"
]
;
then
# Implicit verification if CA is set and the SSL mode
# Implicit verification if CA is set and the SSL mode
# is not specified by user:
# is not specified by user:
...
@@ -254,9 +261,19 @@ if [ -z "$SSLMODE" ]; then
...
@@ -254,9 +261,19 @@ if [ -z "$SSLMODE" ]; then
fi
fi
fi
fi
if
[
-n
"
$SSTCA
"
]
if
[
-n
"
$SSTCERT
"
-a
-n
"
$SSTKEY
"
]
;
then
then
verify_cert_matches_key
"
$SSTCERT
"
"
$SSTKEY
"
CAFILE_OPT
=
"CAfile =
$SSTCA
"
fi
if
[
-n
"
$SSTCA
"
]
;
then
if
[
$SSTPATH
-eq
0
]
;
then
CAFILE_OPT
=
"CAfile =
$SSTCA
"
else
CAFILE_OPT
=
"CApath =
$SSTCA
"
fi
if
[
-n
"
$SSTCERT
"
]
;
then
verify_ca_matches_cert
"
$SSTCA
"
"
$SSTCERT
"
$SSTPATH
fi
else
else
CAFILE_OPT
=
""
CAFILE_OPT
=
""
fi
fi
...
@@ -272,38 +289,38 @@ then
...
@@ -272,38 +289,38 @@ then
;;
;;
'VERIFY_CA'
)
'VERIFY_CA'
)
VERIFY_OPT
=
'verifyChain = yes'
VERIFY_OPT
=
'verifyChain = yes'
if
[
-n
"
$WSREP_SST_OPT_REMOTE_USER
"
]
;
then
CHECK_OPT
=
"checkHost =
$WSREP_SST_OPT_REMOTE_USER
"
else
# check if the address is an ip-address (v4 or v6):
if
echo
"
$WSREP_SST_OPT_HOST_UNESCAPED
"
|
\
grep
-q
-E
'^([0-9]+(\.[0-9]+){3}|[0-9a-fA-F]*(\:[0-9a-fA-F]*)+)$'
then
CHECK_OPT
=
"checkIP =
$WSREP_SST_OPT_HOST_UNESCAPED
"
else
CHECK_OPT
=
"checkHost =
$WSREP_SST_OPT_HOST
"
fi
if
is_local_ip
"
$WSREP_SST_OPT_HOST_UNESCAPED
"
;
then
CHECK_OPT_LOCAL
=
"checkHost = localhost"
fi
fi
;;
;;
*
)
*
)
wsrep_log_error
"Unrecognized ssl-mode option: '
$SSLMODE
'"
wsrep_log_error
"Unrecognized ssl-mode option: '
$SSLMODE
'"
exit
22
# EINVAL
exit
22
# EINVAL
;;
;;
esac
esac
if
[
-z
"
$
CAFILE_OPT
"
]
;
then
if
[
-z
"
$
SSTCA
"
]
;
then
wsrep_log_error
"Can't have ssl-mode='
$SSLMODE
' without CA file"
wsrep_log_error
"Can't have ssl-mode='
$SSLMODE
' without CA file
or path
"
exit
22
# EINVAL
exit
22
# EINVAL
fi
fi
if
[
-n
"
$WSREP_SST_OPT_REMOTE_USER
"
]
;
then
CHECK_OPT
=
"checkHost =
$WSREP_SST_OPT_REMOTE_USER
"
elif
[
"
$WSREP_SST_OPT_ROLE
"
=
'donor'
]
;
then
# check if the address is an ip-address (v4 or v6):
if
echo
"
$WSREP_SST_OPT_HOST_UNESCAPED
"
|
\
grep
-q
-E
'^([0-9]+(\.[0-9]+){3}|[0-9a-fA-F]*(\:[0-9a-fA-F]*)+)$'
then
CHECK_OPT
=
"checkIP =
$WSREP_SST_OPT_HOST_UNESCAPED
"
else
CHECK_OPT
=
"checkHost =
$WSREP_SST_OPT_HOST
"
fi
if
is_local_ip
"
$WSREP_SST_OPT_HOST_UNESCAPED
"
;
then
CHECK_OPT_LOCAL
=
"checkHost = localhost"
fi
fi
fi
fi
STUNNEL
=
""
STUNNEL
=
""
if
[
-n
"
$SSLMODE
"
-a
"
$SSLMODE
"
!=
'DISABLED'
]
;
then
if
[
-n
"
$SSLMODE
"
-a
"
$SSLMODE
"
!=
'DISABLED'
]
;
then
STUNNEL_BIN
=
"
$(
command
-v
stunnel
)
"
STUNNEL_BIN
=
"
$(
command
-v
stunnel
)
"
if
[
-n
"
$STUNNEL_BIN
"
]
;
then
if
[
-n
"
$STUNNEL_BIN
"
]
;
then
wsrep_log_info
"Using stunnel for SSL encryption: CA
file
: '
$SSTCA
', ssl-mode='
$SSLMODE
'"
wsrep_log_info
"Using stunnel for SSL encryption: CA: '
$SSTCA
', ssl-mode='
$SSLMODE
'"
STUNNEL
=
"
$STUNNEL_BIN
$STUNNEL_CONF
"
STUNNEL
=
"
$STUNNEL_BIN
$STUNNEL_CONF
"
fi
fi
fi
fi
...
...
storage/innobase/handler/ha_innodb.cc
View file @
d7aa81c8
...
@@ -6609,8 +6609,8 @@ wsrep_innobase_mysql_sort(
...
@@ -6609,8 +6609,8 @@ wsrep_innobase_mysql_sort(
case
MYSQL_TYPE_LONG_BLOB
:
case
MYSQL_TYPE_LONG_BLOB
:
case
MYSQL_TYPE_VARCHAR
:
case
MYSQL_TYPE_VARCHAR
:
{
{
uchar
*
tmp_str
;
uchar
tmp_str
[
REC_VERSION_56_MAX_INDEX_COL_LEN
]
=
{
'\0'
}
;
uint
tmp_length
;
uint
tmp_length
=
REC_VERSION_56_MAX_INDEX_COL_LEN
;
/* Use the charset number to pick the right charset struct for
/* Use the charset number to pick the right charset struct for
the comparison. Since the MySQL function get_charset may be
the comparison. Since the MySQL function get_charset may be
...
@@ -6633,12 +6633,7 @@ wsrep_innobase_mysql_sort(
...
@@ -6633,12 +6633,7 @@ wsrep_innobase_mysql_sort(
}
}
}
}
// Note that strnxfrm may change length of string
ut_a
(
str_length
<=
tmp_length
);
tmp_length
=
charset
->
coll
->
strnxfrmlen
(
charset
,
str_length
);
tmp_length
=
tmp_length
*
charset
->
mbmaxlen
;
tmp_length
=
ut_max
(
str_length
,
tmp_length
)
+
charset
->
mbmaxlen
;
tmp_str
=
static_cast
<
uchar
*>
(
ut_malloc_nokey
(
tmp_length
));
ut_ad
(
str_length
<=
tmp_length
);
memcpy
(
tmp_str
,
str
,
str_length
);
memcpy
(
tmp_str
,
str
,
str_length
);
tmp_length
=
charset
->
coll
->
strnxfrm
(
charset
,
str
,
str_length
,
tmp_length
=
charset
->
coll
->
strnxfrm
(
charset
,
str
,
str_length
,
...
@@ -6662,7 +6657,6 @@ wsrep_innobase_mysql_sort(
...
@@ -6662,7 +6657,6 @@ wsrep_innobase_mysql_sort(
ret_length
=
tmp_length
;
ret_length
=
tmp_length
;
}
}
ut_free
(
tmp_str
);
break
;
break
;
}
}
case
MYSQL_TYPE_DECIMAL
:
case
MYSQL_TYPE_DECIMAL
:
...
@@ -7014,7 +7008,7 @@ wsrep_store_key_val_for_row(
...
@@ -7014,7 +7008,7 @@ wsrep_store_key_val_for_row(
THD
*
thd
,
THD
*
thd
,
TABLE
*
table
,
TABLE
*
table
,
uint
keynr
,
/*!< in: key number */
uint
keynr
,
/*!< in: key number */
u
char
*
buff
,
/*!< in/out: buffer for the key value (in MySQL
char
*
buff
,
/*!< in/out: buffer for the key value (in MySQL
format) */
format) */
uint
buff_len
,
/*!< in: buffer length */
uint
buff_len
,
/*!< in: buffer length */
const
uchar
*
record
,
const
uchar
*
record
,
...
@@ -7023,7 +7017,7 @@ wsrep_store_key_val_for_row(
...
@@ -7023,7 +7017,7 @@ wsrep_store_key_val_for_row(
KEY
*
key_info
=
table
->
key_info
+
keynr
;
KEY
*
key_info
=
table
->
key_info
+
keynr
;
KEY_PART_INFO
*
key_part
=
key_info
->
key_part
;
KEY_PART_INFO
*
key_part
=
key_info
->
key_part
;
KEY_PART_INFO
*
end
=
key_part
+
key_info
->
user_defined_key_parts
;
KEY_PART_INFO
*
end
=
key_part
+
key_info
->
user_defined_key_parts
;
u
char
*
buff_start
=
buff
;
char
*
buff_start
=
buff
;
enum_field_types
mysql_type
;
enum_field_types
mysql_type
;
Field
*
field
;
Field
*
field
;
uint
buff_space
=
buff_len
;
uint
buff_space
=
buff_len
;
...
@@ -7035,8 +7029,7 @@ wsrep_store_key_val_for_row(
...
@@ -7035,8 +7029,7 @@ wsrep_store_key_val_for_row(
for
(;
key_part
!=
end
;
key_part
++
)
{
for
(;
key_part
!=
end
;
key_part
++
)
{
uchar
*
sorted
=
NULL
;
uchar
sorted
[
REC_VERSION_56_MAX_INDEX_COL_LEN
]
=
{
'\0'
};
uint
max_len
=
0
;
ibool
part_is_null
=
FALSE
;
ibool
part_is_null
=
FALSE
;
if
(
key_part
->
null_bit
)
{
if
(
key_part
->
null_bit
)
{
...
@@ -7115,14 +7108,10 @@ wsrep_store_key_val_for_row(
...
@@ -7115,14 +7108,10 @@ wsrep_store_key_val_for_row(
true_len
=
key_len
;
true_len
=
key_len
;
}
}
max_len
=
true_len
;
sorted
=
static_cast
<
uchar
*>
(
ut_malloc_nokey
(
max_len
+
1
));
memcpy
(
sorted
,
data
,
true_len
);
memcpy
(
sorted
,
data
,
true_len
);
true_len
=
wsrep_innobase_mysql_sort
(
true_len
=
wsrep_innobase_mysql_sort
(
mysql_type
,
cs
->
number
,
sorted
,
true_len
,
mysql_type
,
cs
->
number
,
sorted
,
true_len
,
max_len
);
REC_VERSION_56_MAX_INDEX_COL_LEN
);
ut_ad
(
true_len
<=
max_len
);
if
(
wsrep_protocol_version
>
1
)
{
if
(
wsrep_protocol_version
>
1
)
{
/* Note that we always reserve the maximum possible
/* Note that we always reserve the maximum possible
length of the true VARCHAR in the key value, though
length of the true VARCHAR in the key value, though
...
@@ -7207,13 +7196,11 @@ wsrep_store_key_val_for_row(
...
@@ -7207,13 +7196,11 @@ wsrep_store_key_val_for_row(
true_len
=
key_len
;
true_len
=
key_len
;
}
}
max_len
=
true_len
;
sorted
=
static_cast
<
uchar
*>
(
ut_malloc_nokey
(
max_len
+
1
));
memcpy
(
sorted
,
blob_data
,
true_len
);
memcpy
(
sorted
,
blob_data
,
true_len
);
true_len
=
wsrep_innobase_mysql_sort
(
true_len
=
wsrep_innobase_mysql_sort
(
mysql_type
,
cs
->
number
,
sorted
,
true_len
,
mysql_type
,
cs
->
number
,
sorted
,
true_len
,
max_len
);
REC_VERSION_56_MAX_INDEX_COL_LEN
);
ut_ad
(
true_len
<=
max_len
);
/* Note that we always reserve the maximum possible
/* Note that we always reserve the maximum possible
length of the BLOB prefix in the key value. */
length of the BLOB prefix in the key value. */
...
@@ -7289,14 +7276,10 @@ wsrep_store_key_val_for_row(
...
@@ -7289,14 +7276,10 @@ wsrep_store_key_val_for_row(
cs
->
mbmaxlen
),
cs
->
mbmaxlen
),
&
error
);
&
error
);
}
}
max_len
=
true_len
;
sorted
=
static_cast
<
uchar
*>
(
ut_malloc_nokey
(
max_len
+
1
));
memcpy
(
sorted
,
src_start
,
true_len
);
memcpy
(
sorted
,
src_start
,
true_len
);
true_len
=
wsrep_innobase_mysql_sort
(
true_len
=
wsrep_innobase_mysql_sort
(
mysql_type
,
cs
->
number
,
sorted
,
true_len
,
mysql_type
,
cs
->
number
,
sorted
,
true_len
,
max_len
);
REC_VERSION_56_MAX_INDEX_COL_LEN
);
ut_ad
(
true_len
<=
max_len
);
if
(
true_len
>
buff_space
)
{
if
(
true_len
>
buff_space
)
{
fprintf
(
stderr
,
fprintf
(
stderr
,
...
@@ -7311,11 +7294,6 @@ wsrep_store_key_val_for_row(
...
@@ -7311,11 +7294,6 @@ wsrep_store_key_val_for_row(
buff
+=
true_len
;
buff
+=
true_len
;
buff_space
-=
true_len
;
buff_space
-=
true_len
;
}
}
if
(
sorted
)
{
ut_free
(
sorted
);
sorted
=
NULL
;
}
}
}
ut_a
(
buff
<=
buff_start
+
buff_len
);
ut_a
(
buff
<=
buff_start
+
buff_len
);
...
@@ -10423,7 +10401,7 @@ wsrep_append_key(
...
@@ -10423,7 +10401,7 @@ wsrep_append_key(
THD
*
thd
,
THD
*
thd
,
trx_t
*
trx
,
trx_t
*
trx
,
TABLE_SHARE
*
table_share
,
TABLE_SHARE
*
table_share
,
const
u
char
*
key
,
const
char
*
key
,
uint16_t
key_len
,
uint16_t
key_len
,
wsrep_key_type
key_type
/*!< in: access type of this key
wsrep_key_type
key_type
/*!< in: access type of this key
(shared, exclusive, semi...) */
(shared, exclusive, semi...) */
...
@@ -10527,8 +10505,8 @@ ha_innobase::wsrep_append_keys(
...
@@ -10527,8 +10505,8 @@ ha_innobase::wsrep_append_keys(
if
(
wsrep_protocol_version
==
0
)
{
if
(
wsrep_protocol_version
==
0
)
{
uint
len
;
uint
len
;
u
char
keyval
[
WSREP_MAX_SUPPORTED_KEY_LENGTH
+
1
]
=
{
'\0'
};
char
keyval
[
WSREP_MAX_SUPPORTED_KEY_LENGTH
+
1
]
=
{
'\0'
};
u
char
*
key
=
&
keyval
[
0
];
char
*
key
=
&
keyval
[
0
];
ibool
is_null
;
ibool
is_null
;
len
=
wsrep_store_key_val_for_row
(
len
=
wsrep_store_key_val_for_row
(
...
@@ -10559,18 +10537,18 @@ ha_innobase::wsrep_append_keys(
...
@@ -10559,18 +10537,18 @@ ha_innobase::wsrep_append_keys(
for
(
i
=
0
;
i
<
table
->
s
->
keys
;
++
i
)
{
for
(
i
=
0
;
i
<
table
->
s
->
keys
;
++
i
)
{
uint
len
;
uint
len
;
u
char
keyval0
[
WSREP_MAX_SUPPORTED_KEY_LENGTH
+
1
]
=
{
'\0'
};
char
keyval0
[
WSREP_MAX_SUPPORTED_KEY_LENGTH
+
1
]
=
{
'\0'
};
u
char
keyval1
[
WSREP_MAX_SUPPORTED_KEY_LENGTH
+
1
]
=
{
'\0'
};
char
keyval1
[
WSREP_MAX_SUPPORTED_KEY_LENGTH
+
1
]
=
{
'\0'
};
u
char
*
key0
=
&
keyval0
[
1
];
char
*
key0
=
&
keyval0
[
1
];
u
char
*
key1
=
&
keyval1
[
1
];
char
*
key1
=
&
keyval1
[
1
];
KEY
*
key_info
=
table
->
key_info
+
i
;
KEY
*
key_info
=
table
->
key_info
+
i
;
ibool
is_null
;
ibool
is_null
;
dict_index_t
*
idx
=
innobase_get_index
(
i
);
dict_index_t
*
idx
=
innobase_get_index
(
i
);
dict_table_t
*
tab
=
(
idx
)
?
idx
->
table
:
NULL
;
dict_table_t
*
tab
=
(
idx
)
?
idx
->
table
:
NULL
;
keyval0
[
0
]
=
(
u
char
)
i
;
keyval0
[
0
]
=
(
char
)
i
;
keyval1
[
0
]
=
(
u
char
)
i
;
keyval1
[
0
]
=
(
char
)
i
;
if
(
!
tab
)
{
if
(
!
tab
)
{
WSREP_WARN
(
"MariaDB-InnoDB key mismatch %s %s"
,
WSREP_WARN
(
"MariaDB-InnoDB key mismatch %s %s"
,
...
@@ -10627,16 +10605,18 @@ ha_innobase::wsrep_append_keys(
...
@@ -10627,16 +10605,18 @@ ha_innobase::wsrep_append_keys(
wsrep_calc_row_hash
(
digest
,
record0
,
table
,
m_prebuilt
);
wsrep_calc_row_hash
(
digest
,
record0
,
table
,
m_prebuilt
);
if
(
int
rcode
=
wsrep_append_key
(
thd
,
trx
,
table_share
,
if
(
int
rcode
=
wsrep_append_key
(
thd
,
trx
,
table_share
,
digest
,
16
,
key_type
))
{
reinterpret_cast
<
char
*>
(
digest
),
16
,
key_type
))
{
DBUG_RETURN
(
rcode
);
DBUG_RETURN
(
rcode
);
}
}
if
(
record1
)
{
if
(
record1
)
{
wsrep_calc_row_hash
(
wsrep_calc_row_hash
(
digest
,
record1
,
table
,
m_prebuilt
);
digest
,
record1
,
table
,
m_prebuilt
);
if
(
int
rcode
=
wsrep_append_key
(
thd
,
trx
,
table_share
,
if
(
int
rcode
=
wsrep_append_key
(
digest
,
16
,
thd
,
trx
,
table_share
,
key_type
))
{
reinterpret_cast
<
char
*>
(
digest
),
16
,
key_type
))
{
DBUG_RETURN
(
rcode
);
DBUG_RETURN
(
rcode
);
}
}
}
}
...
...
support-files/mysql.server.sh
View file @
d7aa81c8
...
@@ -91,16 +91,15 @@ datadir_set=
...
@@ -91,16 +91,15 @@ datadir_set=
#
#
# Use LSB init script functions for printing messages, if possible
# Use LSB init script functions for printing messages, if possible
#
# Include non-LSB RedHat init functions to make systemctl redirect work
init_functions
=
"/etc/init.d/functions"
lsb_functions
=
"/lib/lsb/init-functions"
lsb_functions
=
"/lib/lsb/init-functions"
if
test
-f
$lsb_functions
;
then
if
test
-f
$lsb_functions
;
then
.
$lsb_functions
.
$lsb_functions
else
fi
# Include non-LSB RedHat init functions to make systemctl redirect work
init_functions
=
"/etc/init.d/functions"
if
test
-f
$init_functions
;
then
if
test
-f
$init_functions
;
then
.
$init_functions
.
$init_functions
fi
log_success_msg
()
log_success_msg
()
{
{
echo
" SUCCESS!
$@
"
echo
" SUCCESS!
$@
"
...
...
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