MDEV-23466 SIGABRT on SELECT WSREP_LAST_SEEN_GTID
SELECT WSREP_LAST_SEEN_GTID aborts the server if no provider is loaded.
This commit is contained in:
parent
fe3284b2cc
commit
f8bf5b0f84
3
mysql-test/suite/wsrep/r/MDEV-23466.result
Normal file
3
mysql-test/suite/wsrep/r/MDEV-23466.result
Normal file
@ -0,0 +1,3 @@
|
||||
SELECT WSREP_LAST_SEEN_GTID();
|
||||
WSREP_LAST_SEEN_GTID()
|
||||
00000000-0000-0000-0000-000000000000:-1
|
8
mysql-test/suite/wsrep/t/MDEV-23466.cnf
Normal file
8
mysql-test/suite/wsrep/t/MDEV-23466.cnf
Normal file
@ -0,0 +1,8 @@
|
||||
!include ../my.cnf
|
||||
|
||||
[mysqld.1]
|
||||
wsrep-on=OFF
|
||||
binlog-format=ROW
|
||||
wsrep-provider=none
|
||||
wsrep-cluster-address='gcomm://'
|
||||
innodb_autoinc_lock_mode=2
|
10
mysql-test/suite/wsrep/t/MDEV-23466.test
Normal file
10
mysql-test/suite/wsrep/t/MDEV-23466.test
Normal file
@ -0,0 +1,10 @@
|
||||
#
|
||||
# MDEV-23466: SIGABRT in wsrep::server_state::provider on
|
||||
# SELECT WSREP_LAST_SEEN_GTID() on optimized builds
|
||||
#
|
||||
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_wsrep.inc
|
||||
--source include/have_binlog_format_row.inc
|
||||
|
||||
SELECT WSREP_LAST_SEEN_GTID();
|
@ -5379,9 +5379,13 @@ String *Item_func_wsrep_last_written_gtid::val_str_ascii(String *str)
|
||||
|
||||
String *Item_func_wsrep_last_seen_gtid::val_str_ascii(String *str)
|
||||
{
|
||||
/* TODO: Should call Wsrep_server_state.instance().last_committed_gtid()
|
||||
instead. */
|
||||
wsrep::gtid gtid= Wsrep_server_state::instance().provider().last_committed_gtid();
|
||||
wsrep::gtid gtid= wsrep::gtid::undefined();
|
||||
if (Wsrep_server_state::instance().is_provider_loaded())
|
||||
{
|
||||
/* TODO: Should call Wsrep_server_state.instance().last_committed_gtid()
|
||||
instead. */
|
||||
gtid= Wsrep_server_state::instance().provider().last_committed_gtid();
|
||||
}
|
||||
if (gtid_str.alloc(wsrep::gtid_c_str_len()))
|
||||
{
|
||||
my_error(ER_OUTOFMEMORY, wsrep::gtid_c_str_len());
|
||||
|
Loading…
x
Reference in New Issue
Block a user