MCPcopy Create free account
hub / github.com/MariaDB/server / start_new_trans

Method start_new_trans

sql/sql_class.cc:6756–6778  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6754*/
6755
6756start_new_trans::start_new_trans(THD *thd)
6757{
6758 org_thd= thd;
6759 mdl_savepoint= thd->mdl_context.mdl_savepoint();
6760 memcpy(old_ha_data, thd->ha_data, sizeof(old_ha_data));
6761 thd->reset_n_backup_open_tables_state(&open_tables_state_backup);
6762 for (Ha_data &data : thd->ha_data)
6763 data.reset();
6764 old_transaction= thd->transaction;
6765 thd->transaction= &new_transaction;
6766 new_transaction.on= 1;
6767 in_sub_stmt= thd->in_sub_stmt;
6768 thd->in_sub_stmt= 0;
6769 server_status= thd->server_status;
6770 m_transaction_psi= thd->m_transaction_psi;
6771 thd->m_transaction_psi= 0;
6772 wsrep_on= thd->variables.wsrep_on;
6773 thd->variables.wsrep_on= 0;
6774 thd->server_status&= ~(SERVER_STATUS_IN_TRANS |
6775 SERVER_STATUS_IN_TRANS_READONLY);
6776 thd->server_status|= SERVER_STATUS_AUTOCOMMIT;
6777 mark_in_new_trans(thd->rgi_slave);
6778}
6779
6780
6781void start_new_trans::restore_old_transaction()

Callers

nothing calls this directly

Calls 4

mark_in_new_transFunction · 0.85
mdl_savepointMethod · 0.80
resetMethod · 0.45

Tested by

no test coverage detected