Skip to content
Permalink
Browse files
MDEV-23466 SIGABRT on SELECT WSREP_LAST_SEEN_GTID
SELECT WSREP_LAST_SEEN_GTID aborts the server if no provider is
loaded.
  • Loading branch information
sciascid authored and Jan Lindström committed Aug 19, 2020
1 parent fe3284b commit f8bf5b0
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 3 deletions.
@@ -0,0 +1,3 @@
SELECT WSREP_LAST_SEEN_GTID();
WSREP_LAST_SEEN_GTID()
00000000-0000-0000-0000-000000000000:-1
@@ -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
@@ -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());

0 comments on commit f8bf5b0

Please sign in to comment.