Commit 0379a691 authored by Otto Kekäläinen's avatar Otto Kekäläinen
Browse files

Update upstream source from tag 'upstream/5.5.64'

Update to upstream version '5.5.64'
with Debian dir b7957bbeb847da5eea7ad7ce27dbb476ae08d867
parents cbc39f88 b9a9fe5c
......@@ -2,6 +2,7 @@
Copyright (c) 1996, 2009, Innobase Oy. All Rights Reserved.
Copyright (c) 2017, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2019, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
......@@ -564,6 +565,7 @@ trx_rollback_or_clean_recovered(
switch (trx->state) {
case TRX_NOT_STARTED:
case TRX_PREPARED:
case TRX_PREPARED_RECOVERED:
continue;
case TRX_COMMITTED_IN_MEMORY:
......
/*****************************************************************************
Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2019, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
......@@ -1355,7 +1356,7 @@ trx_sys_init_at_db_start(void)
trx = UT_LIST_GET_FIRST(trx_sys->trx_list);
for (;;) {
ut_ad(trx->state != TRX_PREPARED_RECOVERED);
if (trx->state != TRX_PREPARED) {
rows_to_undo += trx->undo_no;
}
......
/*****************************************************************************
Copyright (c) 1996, 2011, Innobase Oy. All Rights Reserved.
Copyright (c) 2019, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
......@@ -481,7 +482,8 @@ trx_free_prepared(
trx_t* trx) /*!< in, own: trx object */
{
ut_ad(mutex_own(&kernel_mutex));
ut_a(trx->state == TRX_PREPARED);
ut_a(trx->state == TRX_PREPARED
|| trx->state == TRX_PREPARED_RECOVERED);
ut_a(trx->magic_n == TRX_MAGIC_N);
/* Prepared transactions are sort of active; they allow
......@@ -1148,10 +1150,11 @@ trx_commit_off_kernel(
lsn = 0;
}
ut_ad(trx->state == TRX_ACTIVE || trx->state == TRX_PREPARED);
ut_ad(trx->state == TRX_ACTIVE || trx->state == TRX_PREPARED
|| trx->state == TRX_PREPARED_RECOVERED);
ut_ad(mutex_own(&kernel_mutex));
if (UNIV_UNLIKELY(trx->state == TRX_PREPARED)) {
if (UNIV_UNLIKELY(trx->state != TRX_ACTIVE)) {
ut_a(trx_n_prepared > 0);
trx_n_prepared--;
}
......@@ -2359,6 +2362,7 @@ trx_recover_for_mysql(
while (trx) {
if (trx->state == TRX_PREPARED) {
trx->state = TRX_PREPARED_RECOVERED;
xid_list[count] = trx->xid;
if (count == 0) {
......@@ -2383,13 +2387,25 @@ trx_recover_for_mysql(
count++;
if (count == len) {
break;
goto partial;
}
}
trx = UT_LIST_GET_NEXT(trx_list, trx);
}
/* After returning the full list, reset the state, because
init_server_components() wants to recover the collection of
transactions twice, by first calling tc_log->open() and then
ha_recover() directly. */
for (trx = UT_LIST_GET_FIRST(trx_sys->trx_list); trx;
trx = UT_LIST_GET_NEXT(trx_list, trx)) {
if (trx->state == TRX_PREPARED_RECOVERED) {
trx->state = TRX_PREPARED;
}
}
partial:
mutex_exit(&kernel_mutex);
if (count > 0){
......@@ -2431,7 +2447,8 @@ trx_get_trx_by_xid(
the same */
if (trx->is_recovered
&& trx->state == TRX_PREPARED
&& (trx->state == TRX_PREPARED
|| trx->state == TRX_PREPARED_RECOVERED)
&& xid->gtrid_length == trx->xid.gtrid_length
&& xid->bqual_length == trx->xid.bqual_length
&& memcmp(xid->data, trx->xid.data,
......
......@@ -401,9 +401,10 @@ IF("$ENV{EXTRA_LIGHT_ARGS}")
ENDIF()
FILE(REMOVE mysql_server.wixobj extra.wixobj)
STRING(REPLACE " " ";" EXTRA_WIX_PREPROCESSOR_FLAGS_LIST ${EXTRA_WIX_PREPROCESSOR_FLAGS})
EXECUTE_PROCESS(
COMMAND ${CANDLE_EXECUTABLE}
${EXTRA_WIX_PREPROCESSOR_FLAGS}
${EXTRA_WIX_PREPROCESSOR_FLAGS_LIST}
${CANDLE_ARCH}
-ext WixUtilExtension
-ext WixFirewallExtension
......@@ -413,7 +414,7 @@ EXECUTE_PROCESS(
EXECUTE_PROCESS(
COMMAND ${CANDLE_EXECUTABLE} ${CANDLE_ARCH}
${EXTRA_WIX_PREPROCESSOR_FLAGS}
${EXTRA_WIX_PREPROCESSOR_FLAGS_LIST}
-ext WixUtilExtension
-ext WixFirewallExtension
${CMAKE_CURRENT_BINARY_DIR}/extra.wxs
......
Supports Markdown
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