@@ -1244,14 +1244,14 @@ void trans_register_ha(THD *thd, bool all, handlerton *ht_arg, ulonglong trxid)
1244
1244
1245
1245
if (all)
1246
1246
{
1247
- trans= &thd->transaction . all ;
1247
+ trans= &thd->transaction -> all ;
1248
1248
thd->server_status |= SERVER_STATUS_IN_TRANS;
1249
1249
if (thd->tx_read_only )
1250
1250
thd->server_status |= SERVER_STATUS_IN_TRANS_READONLY;
1251
1251
DBUG_PRINT (" info" , (" setting SERVER_STATUS_IN_TRANS" ));
1252
1252
}
1253
1253
else
1254
- trans= &thd->transaction . stmt ;
1254
+ trans= &thd->transaction -> stmt ;
1255
1255
1256
1256
ha_info= thd->ha_data [ht_arg->slot ].ha_info + (all ? 1 : 0 );
1257
1257
@@ -1263,8 +1263,8 @@ void trans_register_ha(THD *thd, bool all, handlerton *ht_arg, ulonglong trxid)
1263
1263
trans->no_2pc |=(ht_arg->prepare ==0 );
1264
1264
1265
1265
/* Set implicit xid even if there's explicit XA, it will be ignored anyway. */
1266
- if (thd->transaction . implicit_xid .is_null ())
1267
- thd->transaction . implicit_xid .set (thd->query_id );
1266
+ if (thd->transaction -> implicit_xid .is_null ())
1267
+ thd->transaction -> implicit_xid .set (thd->query_id );
1268
1268
1269
1269
/*
1270
1270
Register transaction start in performance schema if not done already.
@@ -1327,7 +1327,7 @@ static int prepare_or_error(handlerton *ht, THD *thd, bool all)
1327
1327
int ha_prepare (THD *thd)
1328
1328
{
1329
1329
int error=0 , all=1 ;
1330
- THD_TRANS *trans=all ? &thd->transaction . all : &thd->transaction . stmt ;
1330
+ THD_TRANS *trans=all ? &thd->transaction -> all : &thd->transaction -> stmt ;
1331
1331
Ha_trx_info *ha_info= trans->ha_list ;
1332
1332
DBUG_ENTER (" ha_prepare" );
1333
1333
@@ -1377,7 +1377,7 @@ uint ha_count_rw_all(THD *thd, Ha_trx_info **ptr_ha_info)
1377
1377
{
1378
1378
unsigned rw_ha_count= 0 ;
1379
1379
1380
- for (auto ha_info= thd->transaction . all .ha_list ; ha_info;
1380
+ for (auto ha_info= thd->transaction -> all .ha_list ; ha_info;
1381
1381
ha_info= ha_info->next ())
1382
1382
{
1383
1383
if (ha_info->is_trx_read_write ())
@@ -1472,15 +1472,15 @@ int ha_commit_trans(THD *thd, bool all)
1472
1472
'all' means that this is either an explicit commit issued by
1473
1473
user, or an implicit commit issued by a DDL.
1474
1474
*/
1475
- THD_TRANS *trans= all ? &thd->transaction . all : &thd->transaction . stmt ;
1475
+ THD_TRANS *trans= all ? &thd->transaction -> all : &thd->transaction -> stmt ;
1476
1476
/*
1477
1477
"real" is a nick name for a transaction for which a commit will
1478
1478
make persistent changes. E.g. a 'stmt' transaction inside a 'all'
1479
1479
transation is not 'real': even though it's possible to commit it,
1480
1480
the changes are not durable as they might be rolled back if the
1481
1481
enclosing 'all' transaction is rolled back.
1482
1482
*/
1483
- bool is_real_trans= ((all || thd->transaction . all .ha_list == 0 ) &&
1483
+ bool is_real_trans= ((all || thd->transaction -> all .ha_list == 0 ) &&
1484
1484
!(thd->variables .option_bits & OPTION_GTID_BEGIN));
1485
1485
Ha_trx_info *ha_info= trans->ha_list ;
1486
1486
bool need_prepare_ordered, need_commit_ordered;
@@ -1507,8 +1507,8 @@ int ha_commit_trans(THD *thd, bool all)
1507
1507
flags will not get propagated to its normal transaction's
1508
1508
counterpart.
1509
1509
*/
1510
- DBUG_ASSERT (thd->transaction . stmt .ha_list == NULL ||
1511
- trans == &thd->transaction . stmt );
1510
+ DBUG_ASSERT (thd->transaction -> stmt .ha_list == NULL ||
1511
+ trans == &thd->transaction -> stmt );
1512
1512
1513
1513
if (thd->in_sub_stmt )
1514
1514
{
@@ -1538,7 +1538,7 @@ int ha_commit_trans(THD *thd, bool all)
1538
1538
*/
1539
1539
if (is_real_trans)
1540
1540
{
1541
- thd->transaction . cleanup ();
1541
+ thd->transaction -> cleanup ();
1542
1542
MYSQL_COMMIT_TRANSACTION (thd->m_transaction_psi );
1543
1543
thd->m_transaction_psi = NULL ;
1544
1544
}
@@ -1649,7 +1649,7 @@ int ha_commit_trans(THD *thd, bool all)
1649
1649
// Here, the call will not commit inside InnoDB. It is only working
1650
1650
// around closing thd->transaction.stmt open by TR_table::open().
1651
1651
if (all)
1652
- commit_one_phase_2 (thd, false , &thd->transaction . stmt , false );
1652
+ commit_one_phase_2 (thd, false , &thd->transaction -> stmt , false );
1653
1653
}
1654
1654
}
1655
1655
#endif
@@ -1710,11 +1710,11 @@ int ha_commit_trans(THD *thd, bool all)
1710
1710
goto done;
1711
1711
}
1712
1712
1713
- DBUG_ASSERT (thd->transaction . implicit_xid .get_my_xid () ==
1714
- thd->transaction . implicit_xid .quick_get_my_xid ());
1715
- DBUG_ASSERT (!thd->transaction . xid_state .is_explicit_XA () ||
1713
+ DBUG_ASSERT (thd->transaction -> implicit_xid .get_my_xid () ==
1714
+ thd->transaction -> implicit_xid .quick_get_my_xid ());
1715
+ DBUG_ASSERT (!thd->transaction -> xid_state .is_explicit_XA () ||
1716
1716
thd->lex ->xa_opt == XA_ONE_PHASE);
1717
- xid= thd->transaction . implicit_xid .quick_get_my_xid ();
1717
+ xid= thd->transaction -> implicit_xid .quick_get_my_xid ();
1718
1718
1719
1719
#ifdef WITH_WSREP
1720
1720
if (run_wsrep_hooks && !error)
@@ -1845,7 +1845,7 @@ int ha_commit_trans(THD *thd, bool all)
1845
1845
1846
1846
int ha_commit_one_phase (THD *thd, bool all)
1847
1847
{
1848
- THD_TRANS *trans=all ? &thd->transaction . all : &thd->transaction . stmt ;
1848
+ THD_TRANS *trans=all ? &thd->transaction -> all : &thd->transaction -> stmt ;
1849
1849
/*
1850
1850
"real" is a nick name for a transaction for which a commit will
1851
1851
make persistent changes. E.g. a 'stmt' transaction inside a 'all'
@@ -1859,7 +1859,7 @@ int ha_commit_one_phase(THD *thd, bool all)
1859
1859
ha_commit_one_phase() can be called with an empty
1860
1860
transaction.all.ha_list, see why in trans_register_ha()).
1861
1861
*/
1862
- bool is_real_trans= ((all || thd->transaction . all .ha_list == 0 ) &&
1862
+ bool is_real_trans= ((all || thd->transaction -> all .ha_list == 0 ) &&
1863
1863
!(thd->variables .option_bits & OPTION_GTID_BEGIN));
1864
1864
int res;
1865
1865
DBUG_ENTER (" ha_commit_one_phase" );
@@ -1906,16 +1906,16 @@ commit_one_phase_2(THD *thd, bool all, THD_TRANS *trans, bool is_real_trans)
1906
1906
if (all)
1907
1907
{
1908
1908
#ifdef HAVE_QUERY_CACHE
1909
- if (thd->transaction . changed_tables )
1910
- query_cache.invalidate (thd, thd->transaction . changed_tables );
1909
+ if (thd->transaction -> changed_tables )
1910
+ query_cache.invalidate (thd, thd->transaction -> changed_tables );
1911
1911
#endif
1912
1912
}
1913
1913
}
1914
1914
/* Free resources and perform other cleanup even for 'empty' transactions. */
1915
1915
if (is_real_trans)
1916
1916
{
1917
1917
thd->has_waiter = false ;
1918
- thd->transaction . cleanup ();
1918
+ thd->transaction -> cleanup ();
1919
1919
if (count >= 2 )
1920
1920
statistic_increment (transactions_multi_engine, LOCK_status);
1921
1921
}
@@ -1927,7 +1927,7 @@ commit_one_phase_2(THD *thd, bool all, THD_TRANS *trans, bool is_real_trans)
1927
1927
int ha_rollback_trans (THD *thd, bool all)
1928
1928
{
1929
1929
int error=0 ;
1930
- THD_TRANS *trans=all ? &thd->transaction . all : &thd->transaction . stmt ;
1930
+ THD_TRANS *trans=all ? &thd->transaction -> all : &thd->transaction -> stmt ;
1931
1931
Ha_trx_info *ha_info= trans->ha_list , *ha_info_next;
1932
1932
/*
1933
1933
"real" is a nick name for a transaction for which a commit will
@@ -1942,15 +1942,15 @@ int ha_rollback_trans(THD *thd, bool all)
1942
1942
ha_commit_one_phase() is called with an empty
1943
1943
transaction.all.ha_list, see why in trans_register_ha()).
1944
1944
*/
1945
- bool is_real_trans=all || thd->transaction . all .ha_list == 0 ;
1945
+ bool is_real_trans=all || thd->transaction -> all .ha_list == 0 ;
1946
1946
DBUG_ENTER (" ha_rollback_trans" );
1947
1947
1948
1948
/*
1949
1949
We must not rollback the normal transaction if a statement
1950
1950
transaction is pending.
1951
1951
*/
1952
- DBUG_ASSERT (thd->transaction . stmt .ha_list == NULL ||
1953
- trans == &thd->transaction . stmt );
1952
+ DBUG_ASSERT (thd->transaction -> stmt .ha_list == NULL ||
1953
+ trans == &thd->transaction -> stmt );
1954
1954
1955
1955
#ifdef HAVE_REPLICATION
1956
1956
if (is_real_trans)
@@ -1967,7 +1967,7 @@ int ha_rollback_trans(THD *thd, bool all)
1967
1967
builds, we explicitly do the signalling before rolling back.
1968
1968
*/
1969
1969
DBUG_ASSERT (!(thd->rgi_slave && thd->rgi_slave ->did_mark_start_commit ) ||
1970
- thd->transaction . xid_state .is_explicit_XA ());
1970
+ thd->transaction -> xid_state .is_explicit_XA ());
1971
1971
if (thd->rgi_slave && thd->rgi_slave ->did_mark_start_commit )
1972
1972
thd->rgi_slave ->unmark_start_commit ();
1973
1973
}
@@ -2042,10 +2042,10 @@ int ha_rollback_trans(THD *thd, bool all)
2042
2042
transaction hasn't been started in any transactional storage engine.
2043
2043
*/
2044
2044
if (thd->transaction_rollback_request )
2045
- thd->transaction . xid_state .set_error (thd->get_stmt_da ()->sql_errno ());
2045
+ thd->transaction -> xid_state .set_error (thd->get_stmt_da ()->sql_errno ());
2046
2046
2047
2047
thd->has_waiter = false ;
2048
- thd->transaction . cleanup ();
2048
+ thd->transaction -> cleanup ();
2049
2049
}
2050
2050
if (all)
2051
2051
thd->transaction_rollback_request = FALSE ;
@@ -2063,7 +2063,7 @@ int ha_rollback_trans(THD *thd, bool all)
2063
2063
it doesn't matter if a warning is pushed to a system thread or not:
2064
2064
No one will see it...
2065
2065
*/
2066
- if (is_real_trans && thd->transaction . all .modified_non_trans_table &&
2066
+ if (is_real_trans && thd->transaction -> all .modified_non_trans_table &&
2067
2067
!thd->slave_thread && thd->killed < KILL_CONNECTION)
2068
2068
push_warning (thd, Sql_condition::WARN_LEVEL_WARN,
2069
2069
ER_WARNING_NOT_COMPLETE_ROLLBACK,
@@ -2405,8 +2405,8 @@ commit_checkpoint_notify_ha(handlerton *hton, void *cookie)
2405
2405
bool ha_rollback_to_savepoint_can_release_mdl (THD *thd)
2406
2406
{
2407
2407
Ha_trx_info *ha_info;
2408
- THD_TRANS *trans= (thd->in_sub_stmt ? &thd->transaction . stmt :
2409
- &thd->transaction . all );
2408
+ THD_TRANS *trans= (thd->in_sub_stmt ? &thd->transaction -> stmt :
2409
+ &thd->transaction -> all );
2410
2410
2411
2411
DBUG_ENTER (" ha_rollback_to_savepoint_can_release_mdl" );
2412
2412
@@ -2430,8 +2430,8 @@ bool ha_rollback_to_savepoint_can_release_mdl(THD *thd)
2430
2430
int ha_rollback_to_savepoint (THD *thd, SAVEPOINT *sv)
2431
2431
{
2432
2432
int error=0 ;
2433
- THD_TRANS *trans= (thd->in_sub_stmt ? &thd->transaction . stmt :
2434
- &thd->transaction . all );
2433
+ THD_TRANS *trans= (thd->in_sub_stmt ? &thd->transaction -> stmt :
2434
+ &thd->transaction -> all );
2435
2435
Ha_trx_info *ha_info, *ha_info_next;
2436
2436
2437
2437
DBUG_ENTER (" ha_rollback_to_savepoint" );
@@ -2516,8 +2516,8 @@ int ha_savepoint(THD *thd, SAVEPOINT *sv)
2516
2516
}
2517
2517
#endif /* WITH_WSREP */
2518
2518
int error=0 ;
2519
- THD_TRANS *trans= (thd->in_sub_stmt ? &thd->transaction . stmt :
2520
- &thd->transaction . all );
2519
+ THD_TRANS *trans= (thd->in_sub_stmt ? &thd->transaction -> stmt :
2520
+ &thd->transaction -> all );
2521
2521
Ha_trx_info *ha_info= trans->ha_list ;
2522
2522
DBUG_ENTER (" ha_savepoint" );
2523
2523
@@ -5021,7 +5021,7 @@ int ha_enable_transaction(THD *thd, bool on)
5021
5021
DBUG_ENTER (" ha_enable_transaction" );
5022
5022
DBUG_PRINT (" enter" , (" on: %d" , (int ) on));
5023
5023
5024
- if ((thd->transaction . on = on))
5024
+ if ((thd->transaction -> on = on))
5025
5025
{
5026
5026
/*
5027
5027
Now all storage engines should have transaction handling enabled.
0 commit comments