1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-02 14:47:37 +03:00

Merge tag 'mariadb-10.0.33' into bb-10.0-galera

This commit is contained in:
Sachin Setiya
2017-11-03 12:34:05 +05:30
558 changed files with 55330 additions and 5790 deletions

View File

@ -73,6 +73,14 @@ KEY_CREATE_INFO default_key_create_info=
ulong total_ha= 0;
/* number of storage engines (from handlertons[]) that support 2pc */
ulong total_ha_2pc= 0;
#ifndef DBUG_OFF
/*
Number of non-mandatory 2pc handlertons whose initialization failed
to estimate total_ha_2pc value under supposition of the failures
have not occcured.
*/
ulong failed_ha_2pc= 0;
#endif
/* size of savepoint storage area (see ha_init) */
ulong savepoint_alloc_size= 0;
@ -645,6 +653,10 @@ err_deinit:
(void) plugin->plugin->deinit(NULL);
err:
#ifndef DBUG_OFF
if (hton->prepare && hton->state == SHOW_OPTION_YES)
failed_ha_2pc++;
#endif
my_free(hton);
err_no_hton_memory:
plugin->data= NULL;
@ -1893,7 +1905,7 @@ static my_bool xarecover_handlerton(THD *unused, plugin_ref plugin,
{
#ifndef DBUG_OFF
char buf[XIDDATASIZE*4+6]; // see xid_to_str
sql_print_information("ignore xid %s", xid_to_str(buf, info->list+i));
DBUG_PRINT("info", ("ignore xid %s", xid_to_str(buf, info->list+i)));
#endif
xid_cache_insert(info->list+i, XA_PREPARED);
info->found_foreign_xids++;
@ -1910,19 +1922,31 @@ static my_bool xarecover_handlerton(THD *unused, plugin_ref plugin,
tc_heuristic_recover == TC_HEURISTIC_RECOVER_COMMIT)
{
#ifndef DBUG_OFF
char buf[XIDDATASIZE*4+6]; // see xid_to_str
sql_print_information("commit xid %s", xid_to_str(buf, info->list+i));
int rc=
#endif
hton->commit_by_xid(hton, info->list+i);
#ifndef DBUG_OFF
if (rc == 0)
{
char buf[XIDDATASIZE*4+6]; // see xid_to_str
DBUG_PRINT("info", ("commit xid %s", xid_to_str(buf, info->list+i)));
}
#endif
hton->commit_by_xid(hton, info->list+i);
}
else
{
#ifndef DBUG_OFF
char buf[XIDDATASIZE*4+6]; // see xid_to_str
sql_print_information("rollback xid %s",
xid_to_str(buf, info->list+i));
int rc=
#endif
hton->rollback_by_xid(hton, info->list+i);
#ifndef DBUG_OFF
if (rc == 0)
{
char buf[XIDDATASIZE*4+6]; // see xid_to_str
DBUG_PRINT("info", ("rollback xid %s",
xid_to_str(buf, info->list+i)));
}
#endif
hton->rollback_by_xid(hton, info->list+i);
}
}
if (got < info->len)
@ -1944,7 +1968,8 @@ int ha_recover(HASH *commit_list)
/* commit_list and tc_heuristic_recover cannot be set both */
DBUG_ASSERT(info.commit_list==0 || tc_heuristic_recover==0);
/* if either is set, total_ha_2pc must be set too */
DBUG_ASSERT(info.dry_run || total_ha_2pc>(ulong)opt_bin_log);
DBUG_ASSERT(info.dry_run ||
(failed_ha_2pc + total_ha_2pc) > (ulong)opt_bin_log);
if (total_ha_2pc <= (ulong)opt_bin_log)
DBUG_RETURN(0);