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.
This commit is contained in:
Seppo Jaakola 2013-08-27 23:40:49 +03:00
parent f68a7611d1
commit 39f82b4e6e
2 changed files with 16 additions and 0 deletions

View file

@ -1171,6 +1171,13 @@ public:
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 */

View file

@ -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;