From 5e2c06a1c7d937b039fb7a2132506cf7703313d1 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 28 Sep 2006 13:19:43 +0200 Subject: In the handlerton, cursor creation function don't have an argument and so the engine calls current_thd to derive transaction information; instead we now pass THD to those functions, it looks more logical (it makes the implicit current_thd parameter more visible). Approved by Brian and Monty. sql/handler.h: cursor's creation functions in the handlerton need a THD, it's better than have the engine call current_thd sql/sql_cursor.cc: pass the THD instead of letting the engine call current_thd storage/innobase/handler/ha_innodb.cc: use the passed THD instead of current_thd storage/innobase/handler/ha_innodb.h: use the passed THD instead of current_thd --- sql/handler.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sql/handler.h') diff --git a/sql/handler.h b/sql/handler.h index 21ddb2c97d9..250d120c533 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -630,9 +630,9 @@ struct handlerton int (*recover)(XID *xid_list, uint len); int (*commit_by_xid)(XID *xid); int (*rollback_by_xid)(XID *xid); - void *(*create_cursor_read_view)(); - void (*set_cursor_read_view)(void *); - void (*close_cursor_read_view)(void *); + void *(*create_cursor_read_view)(THD *thd); + void (*set_cursor_read_view)(THD *thd, void *read_view); + void (*close_cursor_read_view)(THD *thd, void *read_view); handler *(*create)(TABLE_SHARE *table, MEM_ROOT *mem_root); void (*drop_database)(char* path); int (*panic)(enum ha_panic_function flag); -- cgit v1.2.1