Commit 39f82b4e authored by Seppo Jaakola's avatar Seppo Jaakola

References: MDEV-4953

Calling ha_start_of_new_statement() for all table handlers under partition engine.
This will enable innodb transactions to be declared as read/write.
parent f68a7611
......@@ -1171,6 +1171,13 @@ class ha_partition :public handler
DBUG_ASSERT(h == m_file[i]->ht);
return h;
}
#ifdef WITH_WSREP
void wsrep_reset_files()
{
for (uint i=0; i < m_tot_parts; i++)
m_file[i]->ha_start_of_new_statement();
}
#endif /* WITH_WSREP */
};
#endif /* HA_PARTITION_INCLUDED */
......@@ -40,6 +40,9 @@
#include "sql_select.h"
#include "sql_derived.h"
#include "mdl.h" // MDL_wait_for_graph_visitor
#ifdef WITH_WSREP
#include "ha_partition.h"
#endif /* WITH_WSREP */
/* INFORMATION_SCHEMA name */
LEX_STRING INFORMATION_SCHEMA_NAME= {C_STRING_WITH_LEN("information_schema")};
......@@ -3930,6 +3933,12 @@ void TABLE::init(THD *thd, TABLE_LIST *tl)
insert_values= 0;
fulltext_searched= 0;
file->ha_start_of_new_statement();
#ifdef WITH_WSREP
if (file->ht->db_type == DB_TYPE_PARTITION_DB)
{
((ha_partition*)file)->wsrep_reset_files();
}
#endif
reginfo.impossible_range= 0;
created= TRUE;
......
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