mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 20:12:31 +01:00
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:
parent
f68a7611d1
commit
39f82b4e6e
2 changed files with 16 additions and 0 deletions
|
@ -1171,6 +1171,13 @@ public:
|
||||||
DBUG_ASSERT(h == m_file[i]->ht);
|
DBUG_ASSERT(h == m_file[i]->ht);
|
||||||
return h;
|
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 */
|
#endif /* HA_PARTITION_INCLUDED */
|
||||||
|
|
|
@ -40,6 +40,9 @@
|
||||||
#include "sql_select.h"
|
#include "sql_select.h"
|
||||||
#include "sql_derived.h"
|
#include "sql_derived.h"
|
||||||
#include "mdl.h" // MDL_wait_for_graph_visitor
|
#include "mdl.h" // MDL_wait_for_graph_visitor
|
||||||
|
#ifdef WITH_WSREP
|
||||||
|
#include "ha_partition.h"
|
||||||
|
#endif /* WITH_WSREP */
|
||||||
|
|
||||||
/* INFORMATION_SCHEMA name */
|
/* INFORMATION_SCHEMA name */
|
||||||
LEX_STRING INFORMATION_SCHEMA_NAME= {C_STRING_WITH_LEN("information_schema")};
|
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;
|
insert_values= 0;
|
||||||
fulltext_searched= 0;
|
fulltext_searched= 0;
|
||||||
file->ha_start_of_new_statement();
|
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;
|
reginfo.impossible_range= 0;
|
||||||
created= TRUE;
|
created= TRUE;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue