MCPcopy Create free account
hub / github.com/Tencent/phxsql / stmt_has_updated_trans_table

Function stmt_has_updated_trans_table

phx_percona/percona/sql/binlog.cc:2130–2142  ·  view source on GitHub ↗

This function checks if a transactional table was updated by the current statement. @param thd The client thread that executed the current statement. @return @c true if a transactional table was updated, @c false otherwise. */

Source from the content-addressed store, hash-verified

2128 @c true if a transactional table was updated, @c false otherwise.
2129*/
2130bool
2131stmt_has_updated_trans_table(const THD *thd)
2132{
2133 Ha_trx_info *ha_info;
2134
2135 for (ha_info= thd->transaction.stmt.ha_list; ha_info;
2136 ha_info= ha_info->next())
2137 {
2138 if (ha_info->is_trx_read_write() && ha_info->ht() != binlog_hton)
2139 return (TRUE);
2140 }
2141 return (FALSE);
2142}
2143
2144/**
2145 This function checks if a transaction, either a multi-statement

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected