1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

simple speed & space optimization:

- Avoid full inline of mark_trx_read_write() for many functions
- Avoid somewhat expensive tests for every write/update/delete row 

sql/handler.h:
  Adde ha_start_of_new_statement() to reset internal variables as part of the code in "open_table" that resets TABLE object for the new statement
  Faster mark_trx_read_write_part()
sql/sql_base.cc:
  Don't manipulate table->file internal structs directly
This commit is contained in:
Michael Widenius
2010-03-25 15:33:39 +02:00
parent 2b17c453a7
commit 2c77c9ea25
3 changed files with 22 additions and 6 deletions

View File

@@ -3110,11 +3110,14 @@ int handler::ha_check(THD *thd, HA_CHECK_OPT *check_opt)
if it is started.
*/
inline
void
handler::mark_trx_read_write()
handler::mark_trx_read_write_part2()
{
Ha_trx_info *ha_info= &ha_thd()->ha_data[ht->slot].ha_info[0];
/* Don't call this function again for this statement */
mark_trx_done= TRUE;
/*
When a storage engine method is called, the transaction must
have been started, unless it's a DDL call, for which the