Skip to content

Commit d26d468

Browse files
janlindstromsysprg
authored andcommitted
MDEV-37136 : sql/wsrep_allowlist_service.cc:40:27: runtime error: member call on null pointer of type 'Wsrep_schema'
Problem was that we used wsrep_schema pointer before it was initialized. Fix is to allow all connections when wsrep_schema is not yet initialized and check allowed connections only when wsrep_schema has been initialized. Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
1 parent aa3dd63 commit d26d468

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

sql/wsrep_allowlist_service.cc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,12 @@ bool Wsrep_allowlist_service::allowlist_cb (
3636
const wsrep::const_buffer& value)
3737
WSREP_NOEXCEPT
3838
{
39-
std::string string_value(value.data());
40-
bool res= wsrep_schema->allowlist_check(key, string_value);
39+
bool res=true; // allow all connections
40+
if (wsrep_schema)
41+
{
42+
std::string string_value(value.data());
43+
res= wsrep_schema->allowlist_check(key, string_value);
44+
}
4145
return res;
4246
}
4347

0 commit comments

Comments
 (0)