Commit ded756c9 authored by Jan Lindström's avatar Jan Lindström

MDEV-5408: Crash in mariadb-wsrep during plugin load at startup

Analysis: If wsrep_provider is not specified ("none") the wsrep is not
initialized.

Fix: Add additional guard not to call wsrep->post_rollback if 
wsrep_provider is not specified.
parent 3df2aa94
......@@ -248,11 +248,13 @@ int wsrep_commit(handlerton *hton, THD *thd, bool all)
Transaction didn't go through wsrep->pre_commit() so just roll back
possible changes to clean state.
*/
if (wsrep->post_rollback(wsrep, &thd->wsrep_trx_handle))
{
DBUG_PRINT("wsrep", ("setting rollback fail"));
WSREP_ERROR("settting rollback fail: thd: %llu SQL: %s",
if (WSREP_PROVIDER_EXISTS) {
if (wsrep->post_rollback(wsrep, &thd->wsrep_trx_handle))
{
DBUG_PRINT("wsrep", ("setting rollback fail"));
WSREP_ERROR("settting rollback fail: thd: %llu SQL: %s",
(long long)thd->real_id, thd->query());
}
}
wsrep_cleanup_transaction(thd);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment