From 76b8386550be1015c0f81bcc3bffe86115aa92c2 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 30 Sep 2006 12:49:46 -0700 Subject: This patch adds handlerton passing to functions. NDB and Innodb still require a global hanlderton in the main code due to the nature of the sql_cache call back function (should be solveable... another patch). Partitioning now has a flag to allow disabling of engines from being compatible with partitioning. Cleaned up heap naming convention on panic call. include/heap.h: Added new function sql/ha_ndbcluster.cc: Updated hanlderton functions sql/ha_ndbcluster_binlog.cc: Updated handlerton functions. sql/handler.cc: Updated handlerton functions. sql/handler.h: Updated hanlderton functions sql/log.cc: Updated handlerton functions sql/mysql_priv.h: Updated handlerton functions sql/mysqld.cc: Added Legacy handlerton functions sql/partition_info.cc: Added flag support for marking engines not compatible with partitioning sql/sql_cursor.cc: Updated hanlderton functions sql/sql_show.cc: Updated hanlderton functions sql/sql_tablespace.cc: Update for handlerton functions storage/archive/ha_archive.cc: Update for hanlderton functions storage/archive/ha_archive.h: Update for handlerton functions storage/blackhole/ha_blackhole.cc: Update for handlerton functions storage/csv/ha_tina.cc: Update for handlerton functions storage/csv/ha_tina.h: Update for handlerton functions storage/federated/ha_federated.cc: Updated for handlerton functions storage/federated/ha_federated.h: Updated for handlerton functions storage/heap/ha_heap.cc: Update for handlerton functions storage/heap/hp_panic.c: Update of function name storage/heap/hp_test1.c: Update of function name storage/heap/hp_test2.c: Update of function name. storage/innobase/handler/ha_innodb.cc: Update of function name storage/innobase/handler/ha_innodb.h: Update of function name storage/myisam/ha_myisam.cc: Update of function name. storage/myisammrg/ha_myisammrg.cc: Update of function name --- sql/log.cc | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) (limited to 'sql/log.cc') diff --git a/sql/log.cc b/sql/log.cc index 9c2efb04a44..05758fd6e7d 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -46,13 +46,13 @@ static Muted_query_log_event invisible_commit; static bool test_if_number(const char *str, long *res, bool allow_wildcards); -static int binlog_init(); -static int binlog_close_connection(THD *thd); -static int binlog_savepoint_set(THD *thd, void *sv); -static int binlog_savepoint_rollback(THD *thd, void *sv); -static int binlog_commit(THD *thd, bool all); -static int binlog_rollback(THD *thd, bool all); -static int binlog_prepare(THD *thd, bool all); +static int binlog_init(void *p); +static int binlog_close_connection(handlerton *hton, THD *thd); +static int binlog_savepoint_set(handlerton *hton, THD *thd, void *sv); +static int binlog_savepoint_rollback(handlerton *hton, THD *thd, void *sv); +static int binlog_commit(handlerton *hton, THD *thd, bool all); +static int binlog_rollback(handlerton *hton, THD *thd, bool all); +static int binlog_prepare(handlerton *hton, THD *thd, bool all); sql_print_message_func sql_print_message_handlers[3] = { @@ -1171,7 +1171,7 @@ int binlog_init(void *p) return 0; } -static int binlog_close_connection(THD *thd) +static int binlog_close_connection(handlerton *hton, THD *thd) { binlog_trx_data *const trx_data= (binlog_trx_data*) thd->ha_data[binlog_hton->slot]; @@ -1184,7 +1184,8 @@ static int binlog_close_connection(THD *thd) } static int -binlog_end_trans(THD *thd, binlog_trx_data *trx_data, Log_event *end_ev) +binlog_end_trans(THD *thd, binlog_trx_data *trx_data, + Log_event *end_ev) { DBUG_ENTER("binlog_end_trans"); int error=0; @@ -1238,7 +1239,7 @@ binlog_end_trans(THD *thd, binlog_trx_data *trx_data, Log_event *end_ev) DBUG_RETURN(error); } -static int binlog_prepare(THD *thd, bool all) +static int binlog_prepare(handlerton *hton, THD *thd, bool all) { /* do nothing. @@ -1249,7 +1250,7 @@ static int binlog_prepare(THD *thd, bool all) return 0; } -static int binlog_commit(THD *thd, bool all) +static int binlog_commit(handlerton *hton, THD *thd, bool all) { DBUG_ENTER("binlog_commit"); binlog_trx_data *const trx_data= @@ -1273,7 +1274,7 @@ static int binlog_commit(THD *thd, bool all) DBUG_RETURN(binlog_end_trans(thd, trx_data, &invisible_commit)); } -static int binlog_rollback(THD *thd, bool all) +static int binlog_rollback(handlerton *hton, THD *thd, bool all) { DBUG_ENTER("binlog_rollback"); int error=0; @@ -1326,7 +1327,7 @@ static int binlog_rollback(THD *thd, bool all) that case there is no need to have it in the binlog). */ -static int binlog_savepoint_set(THD *thd, void *sv) +static int binlog_savepoint_set(handlerton *hton, THD *thd, void *sv) { DBUG_ENTER("binlog_savepoint_set"); binlog_trx_data *const trx_data= @@ -1342,7 +1343,7 @@ static int binlog_savepoint_set(THD *thd, void *sv) DBUG_RETURN(error); } -static int binlog_savepoint_rollback(THD *thd, void *sv) +static int binlog_savepoint_rollback(handlerton *hton, THD *thd, void *sv) { DBUG_ENTER("binlog_savepoint_rollback"); binlog_trx_data *const trx_data= -- cgit v1.2.1