diff options
author | Michael Widenius <monty@askmonty.org> | 2010-03-25 15:33:39 +0200 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2010-03-25 15:33:39 +0200 |
commit | 2c77c9ea25d8d01d8e7d6d35f1fdd2e4809be865 (patch) | |
tree | 54a80f2cf0feb2e9be862e1917c8ed21877d69a6 /sql/handler.cc | |
parent | 2b17c453a7267dad0ad9cca1e2d929b05f1e226d (diff) | |
download | mariadb-git-2c77c9ea25d8d01d8e7d6d35f1fdd2e4809be865.tar.gz |
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
Diffstat (limited to 'sql/handler.cc')
-rw-r--r-- | sql/handler.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sql/handler.cc b/sql/handler.cc index d2a2503c49a..a23c1e3c93b 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -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 |