diff options
author | unknown <bell@sanja.is.com.ua> | 2002-06-09 00:58:05 +0300 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2002-06-09 00:58:05 +0300 |
commit | 6a2eec80b0a47c67a8621d68fc447b170d2c0bce (patch) | |
tree | cb84872ae3c34ad83ac3336e53b65d86952ca6ca /sql | |
parent | fb104d76b5a95cb7056288f4840776cfd5ee7899 (diff) | |
download | mariadb-git-6a2eec80b0a47c67a8621d68fc447b170d2c0bce.tar.gz |
removed unneeded table name pointer
transaction-live memory cleanup moved to ha_commit/ha_rollback
fixed query cache validator to work correctly on systems that allocate unaligned dat
sql/handler.cc:
transaction-live memory cleanup moved to ha_commit/ha_rollback
sql/sql_cache.cc:
removed unneeded table name pointer
fixed debug enter message
fixed query cache validator to work correctly on systems that allocate unaligned data
sql/sql_class.cc:
removed unneeded table name pointer
sql/sql_parse.cc:
transaction-live memory cleanup moved to ha_commit/ha_rollback
sql/table.h:
removed unneeded table name pointer
Diffstat (limited to 'sql')
-rw-r--r-- | sql/handler.cc | 6 | ||||
-rw-r--r-- | sql/sql_cache.cc | 8 | ||||
-rw-r--r-- | sql/sql_class.cc | 6 | ||||
-rw-r--r-- | sql/sql_parse.cc | 2 | ||||
-rw-r--r-- | sql/table.h | 2 |
5 files changed, 13 insertions, 11 deletions
diff --git a/sql/handler.cc b/sql/handler.cc index 7947ae5a9f0..25617d95075 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -316,7 +316,10 @@ int ha_commit_trans(THD *thd, THD_TRANS* trans) sql_print_error("Error: Got error during commit; Binlog is not up to date!"); thd->tx_isolation=thd->session_tx_isolation; if (operation_done) + { statistic_increment(ha_commit_count,&LOCK_status); + thd->transaction.cleanup(); + } } #endif // using transactions DBUG_RETURN(error); @@ -361,7 +364,10 @@ int ha_rollback_trans(THD *thd, THD_TRANS *trans) thd->transaction.trans_log.end_of_file= max_binlog_cache_size; thd->tx_isolation=thd->session_tx_isolation; if (operation_done) + { statistic_increment(ha_rollback_count,&LOCK_status); + thd->transaction.cleanup(); + } } #endif /* USING_TRANSACTIONS */ DBUG_RETURN(error); diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc index b8dfda076c5..ec6f4cf2736 100644 --- a/sql/sql_cache.cc +++ b/sql/sql_cache.cc @@ -1073,7 +1073,8 @@ void Query_cache::invalidate(CHANGED_TABLE_LIST *tables_used) { invalidate_table((byte*) tables_used->key, tables_used->key_length); DBUG_PRINT("qcache", (" db %s, table %s", tables_used->key, - tables_used->table_name)); + tables_used->key+ + strlen(tables_used->key)+1)); } } STRUCT_UNLOCK(&structure_guard_mutex); @@ -1994,7 +1995,7 @@ Query_cache_block * Query_cache::allocate_block(ulong len, my_bool not_less, ulong min, my_bool under_guard) { - DBUG_ENTER("Query_cache::allocate_n_lock_block"); + DBUG_ENTER("Query_cache::allocate_block"); DBUG_PRINT("qcache", ("len %lu, not less %d, min %lu, uder_guard %d", len, not_less,min,under_guard)); @@ -3060,7 +3061,8 @@ my_bool Query_cache::check_integrity(bool not_locked) DBUG_PRINT("qcache", ("block 0x%lx, type %u...", (ulong) block, (uint) block->type)); // Check allignment - if ((ulonglong)block % ALIGN_SIZE(1)) + if ((((ulonglong)block) % (ulonglong)ALIGN_SIZE(1)) != + (((ulonglong)first_block) % (ulonglong)ALIGN_SIZE(1))) { DBUG_PRINT("error", ("block 0x%lx do not aligned by %d", (ulong) block, diff --git a/sql/sql_class.cc b/sql/sql_class.cc index c332181b410..84de7e6ad4a 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -345,11 +345,7 @@ CHANGED_TABLE_LIST* THD::changed_table_dup(TABLE *table) ALIGN_SIZE(sizeof(CHANGED_TABLE_LIST))); new_table->next = 0; new_table->key_length = table->key_length; - uint32 db_len = ((new_table->table_name = - ::strmake(new_table->key, table->table_cache_key, - table->key_length) + 1) - new_table->key); - ::memcpy(new_table->key + db_len, table->table_cache_key + db_len, - table->key_length - db_len); + ::memcpy(new_table->key, table->table_cache_key, table->key_length); return new_table; } diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index a92622a59b1..9e84330ad25 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -2432,7 +2432,6 @@ mysql_execute_command(void) } else res= -1; - thd->transaction.cleanup(); break; } case SQLCOM_ROLLBACK: @@ -2447,7 +2446,6 @@ mysql_execute_command(void) else res= -1; thd->options&= ~(ulong) (OPTION_BEGIN | OPTION_STATUS_NO_TRANS_UPDATE); - thd->transaction.cleanup(); break; default: /* Impossible */ send_ok(&thd->net); diff --git a/sql/table.h b/sql/table.h index 209333c24b7..78f80045b21 100644 --- a/sql/table.h +++ b/sql/table.h @@ -154,7 +154,7 @@ typedef struct st_table_list { typedef struct st_changed_table_list { struct st_changed_table_list *next; - char *key, *table_name; + char *key; uint32 key_length; } CHANGED_TABLE_LIST; |