diff --git a/mysql-test/include/have_innodb.combinations b/mysql-test/include/have_innodb.combinations
index 49ae741..1d8bb63 100644
--- a/mysql-test/include/have_innodb.combinations
+++ b/mysql-test/include/have_innodb.combinations
@@ -1,19 +1,3 @@
-[innodb_plugin]
-ignore-builtin-innodb
-plugin-load-add=$HA_INNODB_SO
-innodb
-innodb-cmpmem
-innodb-cmp-per-index
-innodb-trx
-innodb-locks
-innodb-buffer-pool-stats
-innodb-buffer-page
-innodb-buffer-page-lru
-innodb-sys-foreign
-innodb-sys-foreign-cols
-innodb-sys-tables
-innodb-metrics
-
 [xtradb_plugin]
 ignore-builtin-innodb
 plugin-load-add=$HA_XTRADB_SO
diff --git a/storage/xtradb/handler/ha_innodb.cc b/storage/xtradb/handler/ha_innodb.cc
index caf7a3e..fc625a6 100644
--- a/storage/xtradb/handler/ha_innodb.cc
+++ b/storage/xtradb/handler/ha_innodb.cc
@@ -1878,6 +1878,7 @@ innobase_srv_conc_enter_innodb(
 	trx_t*	trx)	/*!< in: transaction handle */
 {
 #ifdef WITH_WSREP
+    assert(trx->mysql_thd);
 	if (wsrep_on(trx->mysql_thd) && 
 	    wsrep_thd_is_BF(trx->mysql_thd, FALSE)) return;
 #endif /* WITH_WSREP */
@@ -1916,6 +1917,7 @@ innobase_srv_conc_exit_innodb(
 	ut_ad(!sync_thread_levels_nonempty_trx(trx->has_search_latch));
 #endif /* UNIV_SYNC_DEBUG */
 #ifdef WITH_WSREP
+    assert(trx->mysql_thd);
 	if (wsrep_on(trx->mysql_thd) && 
 	    wsrep_thd_is_BF(trx->mysql_thd, FALSE)) return;
 #endif /* WITH_WSREP */
@@ -4621,6 +4623,7 @@ innobase_commit_low(
 		trx_commit_for_mysql(trx);
 	}
 #ifdef WITH_WSREP
+    //assert(thd);
 	if (wsrep_on(thd)) { thd_proc_info(thd, tmp); }
 #endif /* WITH_WSREP */
 }
@@ -8665,6 +8668,7 @@ ha_innobase::write_row(
 
 	sql_command = thd_sql_command(user_thd);
 
+    assert(user_thd);
 	if ((sql_command == SQLCOM_ALTER_TABLE
 	     || sql_command == SQLCOM_OPTIMIZE
 	     || sql_command == SQLCOM_CREATE_INDEX
@@ -8677,6 +8681,7 @@ ha_innobase::write_row(
 	     || sql_command == SQLCOM_DROP_INDEX)
 	    && num_write_row >= 10000) {
 #ifdef WITH_WSREP
+    assert(user_thd);
 		if (wsrep_on(user_thd) && sql_command == SQLCOM_LOAD) {
 			WSREP_DEBUG("forced trx split for LOAD: %s", 
 				    wsrep_thd_query(user_thd));
@@ -8716,6 +8721,7 @@ ha_innobase::write_row(
 			;
 		} else if (src_table == prebuilt->table) {
 #ifdef WITH_WSREP
+    assert(user_thd);
 			if (wsrep_on(user_thd)                              &&
 			    wsrep_load_data_splitting                       &&
 			    sql_command == SQLCOM_LOAD                      &&
@@ -8748,6 +8754,7 @@ ha_innobase::write_row(
 			prebuilt->sql_stat_start = TRUE;
 		} else {
 #ifdef WITH_WSREP
+    assert(user_thd);
 			if (wsrep_on(user_thd)                              &&
 			    wsrep_load_data_splitting                       &&
 			    sql_command == SQLCOM_LOAD                      &&
@@ -8894,6 +8901,7 @@ ha_innobase::write_row(
 				      prebuilt->autoinc_offset,
 				      prebuilt->autoinc_increment);
 
+    assert(current_thd);
                                if (wsrep_on(current_thd)                     &&
                                    auto_inc_inserted                         &&
                                    wsrep_drupal_282555_workaround            &&
@@ -8977,6 +8985,9 @@ ha_innobase::write_row(
 						   user_thd);
 
 #ifdef WITH_WSREP
+    if (!error_result                                &&
+	    wsrep_thd_exec_mode(user_thd) == LOCAL_STATE )
+    assert(user_thd);
 	if (!error_result                                &&
 	    wsrep_thd_exec_mode(user_thd) == LOCAL_STATE &&
 	    wsrep_on(user_thd)                           &&
@@ -9498,6 +9509,9 @@ ha_innobase::update_row(
 	innobase_active_small();
 
 #ifdef WITH_WSREP
+    if (error == DB_SUCCESS                                &&
+	    wsrep_thd_exec_mode(user_thd) == LOCAL_STATE )
+    assert(user_thd);
 	if (error == DB_SUCCESS                          &&
 	    wsrep_thd_exec_mode(user_thd) == LOCAL_STATE &&
 	    wsrep_on(user_thd)                           &&
@@ -9563,6 +9577,9 @@ ha_innobase::delete_row(
 	innobase_active_small();
 
 #ifdef WITH_WSREP
+    if (error == DB_SUCCESS                                &&
+	    wsrep_thd_exec_mode(user_thd) == LOCAL_STATE )
+    assert(user_thd);
 	if (error == DB_SUCCESS                          &&
             wsrep_thd_exec_mode(user_thd) == LOCAL_STATE &&
             wsrep_on(user_thd)                           &&
@@ -10806,6 +10823,7 @@ wsrep_append_foreign_key(
 	int   cache_key_len;
     bool const copy = true;
 
+    assert(trx->mysql_thd);
 	if (!wsrep_on(trx->mysql_thd) ||
 	    wsrep_thd_exec_mode(thd) != LOCAL_STATE)
 		return DB_SUCCESS;
@@ -15500,6 +15518,7 @@ ha_innobase::external_lock(
 		DBUG_EXECUTE_IF("no_innodb_binlog_errors", skip = true;);
 		if (!skip) {
 #ifdef WITH_WSREP
+    assert(thd);
 			if (!wsrep_on(thd) || wsrep_thd_exec_mode(thd) == LOCAL_STATE)
 			{
 #endif /* WITH_WSREP */
@@ -16653,6 +16672,7 @@ ha_innobase::get_auto_increment(
 				    increment,
 				    thd_get_thread_id(ha_thd()),
 				    current, autoinc);
+            assert(ha_thd());
 			if (!wsrep_on(ha_thd()))
 			{
 			current = autoinc - prebuilt->autoinc_increment;
diff --git a/storage/xtradb/lock/lock0lock.cc b/storage/xtradb/lock/lock0lock.cc
index 40ab9d9..142ad97 100644
--- a/storage/xtradb/lock/lock0lock.cc
+++ b/storage/xtradb/lock/lock0lock.cc
@@ -1751,6 +1751,7 @@ wsrep_kill_victim(
         ut_ad(trx_mutex_own(lock->trx));
 
 	/* quit for native mysql */
+    assert(trx->mysql_thd);
 	if (!wsrep_on(trx->mysql_thd)) return;
 
 	my_bool bf_this  = wsrep_thd_is_BF(trx->mysql_thd, FALSE);
@@ -1835,6 +1836,7 @@ lock_rec_other_has_conflicting(
 
 #ifdef WITH_WSREP
 		if (lock_rec_has_to_wait(TRUE, trx, mode, lock, is_supremum)) {
+    //assert(trx->mysql_thd);
 			if (wsrep_on(trx->mysql_thd)) {
 				trx_mutex_enter(lock->trx);
 				wsrep_kill_victim(trx, lock);
@@ -2289,6 +2291,7 @@ lock_rec_create(
 	ut_ad(index->table->n_ref_count > 0 || !index->table->can_be_evicted);
 
 #ifdef WITH_WSREP
+    //assert(trx->mysql_thd);
 	if (c_lock                      &&
 	    wsrep_on(trx->mysql_thd)    &&
 	    wsrep_thd_is_BF(trx->mysql_thd, FALSE)) {
diff --git a/storage/xtradb/lock/lock0wait.cc b/storage/xtradb/lock/lock0wait.cc
index a447027..1fb7629 100644
--- a/storage/xtradb/lock/lock0wait.cc
+++ b/storage/xtradb/lock/lock0wait.cc
@@ -197,6 +197,7 @@ wsrep_is_BF_lock_timeout(
 /*====================*/
     trx_t* trx) /* in: trx to check for lock priority */
 {
+           // assert(trx->mysql_thd);
        if (wsrep_on(trx->mysql_thd) &&
            wsrep_thd_is_BF(trx->mysql_thd, FALSE)) {
                fprintf(stderr, "WSREP: BF lock wait long\n");
@@ -402,6 +403,7 @@ lock_wait_suspend_thread(
 	if (lock_wait_timeout < 100000000
 	    && wait_time > (double) lock_wait_timeout) {
 #ifdef WITH_WSREP
+            //assert(trx->mysql_thd);
                 if (!wsrep_on(trx->mysql_thd) ||
                     (!wsrep_is_BF_lock_timeout(trx) &&
                      trx->error_state != DB_DEADLOCK)) {
diff --git a/storage/xtradb/row/row0upd.cc b/storage/xtradb/row/row0upd.cc
index 91dbc52..e2deccf 100644
--- a/storage/xtradb/row/row0upd.cc
+++ b/storage/xtradb/row/row0upd.cc
@@ -1988,6 +1988,8 @@ row_upd_sec_index_entry(
 					index, offsets, thr, &mtr);
 			}
 #ifdef WITH_WSREP
+if (err == DB_SUCCESS && !referenced)
+    //assert(trx->mysql_thd);
 			if (err == DB_SUCCESS && !referenced                  &&
 			    wsrep_on(trx->mysql_thd)                          &&
 			    !wsrep_thd_is_BF(trx->mysql_thd, FALSE)           &&
@@ -2279,6 +2281,8 @@ row_upd_clust_rec_by_insert(
 			}
 		}
 #ifdef WITH_WSREP
+if (!referenced )
+    //assert(trx->mysql_thd);
 		if (!referenced && wsrep_on(trx->mysql_thd)                  &&
 		    !(parent && que_node_get_type(parent) == QUE_NODE_UPDATE &&
 		      ((upd_node_t*)parent)->cascade_node == node)           &&
@@ -2548,7 +2552,8 @@ row_upd_del_mark_clust_rec(
 	}
 #ifdef WITH_WSREP
 	trx_t* trx = thr_get_trx(thr) ;
-
+if (err == DB_SUCCESS && !referenced && trx)
+   //assert(trx->mysql_thd);
 	if (err == DB_SUCCESS && !referenced && trx && wsrep_on(trx->mysql_thd) &&
 	    !(parent && que_node_get_type(parent) == QUE_NODE_UPDATE &&
 	      ((upd_node_t*)parent)->cascade_node == node)           &&
diff --git a/storage/xtradb/srv/srv0conc.cc b/storage/xtradb/srv/srv0conc.cc
index 1d77da6..4c6d9ca 100644
--- a/storage/xtradb/srv/srv0conc.cc
+++ b/storage/xtradb/srv/srv0conc.cc
@@ -218,6 +218,7 @@ srv_conc_enter_innodb_with_atomics(
 	for (;;) {
 		ulint	sleep_in_us;
 #ifdef WITH_WSREP
+        assert(trx->mysql_thd);
 		if (wsrep_on(trx->mysql_thd) && 
 		    wsrep_trx_is_aborting(trx->mysql_thd)) {
 			if (wsrep_debug)
@@ -431,6 +432,7 @@ srv_conc_enter_innodb_without_atomics(
 		return;
 	}
 #ifdef WITH_WSREP
+        assert(trx->mysql_thd);
 	if (wsrep_on(trx->mysql_thd) && 
 	    wsrep_thd_is_brute_force(trx->mysql_thd)) {
 		srv_conc_force_enter_innodb(trx);
@@ -515,6 +517,7 @@ srv_conc_enter_innodb_without_atomics(
 	srv_conc.n_waiting++;
 
 #ifdef WITH_WSREP
+        assert(trx->mysql_thd);
 	if (wsrep_on(trx->mysql_thd) && 
 	    wsrep_trx_is_aborting(trx->mysql_thd)) {
 		os_fast_mutex_unlock(&srv_conc_mutex);
diff --git a/storage/xtradb/trx/trx0roll.cc b/storage/xtradb/trx/trx0roll.cc
index 335ef88..7223efd 100644
--- a/storage/xtradb/trx/trx0roll.cc
+++ b/storage/xtradb/trx/trx0roll.cc
@@ -381,6 +381,7 @@ trx_rollback_to_savepoint_for_mysql_low(
 	trx->op_info = "";
 
 #ifdef WITH_WSREP
+    assert(trx->mysql_thd);
 	if (wsrep_on(trx->mysql_thd) &&
 	    trx->lock.was_chosen_as_deadlock_victim) {
 		trx->lock.was_chosen_as_deadlock_victim = FALSE;
@@ -1036,6 +1037,7 @@ trx_roll_try_truncate(
 	}
 
 #ifdef WITH_WSREP_OUT
+    assert(trx->mysql_thd);
 	if (wsrep_on(trx->mysql_thd)) {
 		trx->lock.was_chosen_as_deadlock_victim = FALSE;
 	}
