Commit d3c13fb0 authored by marko's avatar marko

storage/innobase/handler: Merge changes from MySQL AB:

ChangeSet
  2006/09/30 18:44:42-07:00 brian@zim.(none) 
  Merge zim.(none):/home/brian/mysql/merge-5.1
  into  zim.(none):/home/brian/mysql/arch-5.1

ChangeSet
  2006/09/30 12:49:46-07:00 brian@zim.(none) 
  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. 

ChangeSet
  2006/09/29 17:19:02-07:00 brian@zim.(none) 
  This removes the passing of global hton to engine instance. 

ChangeSet
  2006/09/28 13:22:56+02:00 gbichot@dl145h.mysql.com 
  Merge gbichot@bk-internal:/home/bk/mysql-5.1-arch
  into  dl145h.mysql.com:/users/gbichot/mysql-5.1-arch

ChangeSet
  2006/09/28 13:19:43+02:00 gbichot@dl145h.mysql.com 
  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.

ChangeSet
  2006/09/26 22:51:53-07:00 brian@zim.(none) 
  Merge zim.(none):/home/brian/mysql/merge-5.1
  into  zim.(none):/home/brian/mysql/arch-5.1
parent c50358f6
......@@ -24,3 +24,6 @@ noinst_LIBRARIES = libhandler.a
libhandler_a_SOURCES = ha_innodb.cc
EXTRA_PROGRAMS =
# Don't update the files from bitkeeper
%::SCCS/s.%
This diff is collapsed.
......@@ -80,7 +80,7 @@ class ha_innobase: public handler
/* Init values for the class: */
public:
ha_innobase(TABLE_SHARE *table_arg);
ha_innobase(handlerton *hton, TABLE_SHARE *table_arg);
~ha_innobase() {}
/*
Get the row type from the storage engine. If this method returns
......@@ -238,8 +238,8 @@ extern ulong srv_flush_log_at_trx_commit;
}
int innobase_init(void);
int innobase_end(ha_panic_function type);
bool innobase_flush_logs(void);
int innobase_end(handlerton *hton, ha_panic_function type);
bool innobase_flush_logs(handlerton *hton);
uint innobase_get_free_space(void);
/*
......@@ -256,14 +256,14 @@ int innobase_commit_complete(void* trx_handle);
void innobase_store_binlog_offset_and_flush_log(char *binlog_name,longlong offset);
#endif
void innobase_drop_database(char *path);
bool innobase_show_status(THD* thd, stat_print_fn*, enum ha_stat_type);
void innobase_drop_database(handlerton *hton, char *path);
bool innobase_show_status(handlerton *hton, THD* thd, stat_print_fn*, enum ha_stat_type);
int innobase_release_temporary_latches(THD *thd);
int innobase_release_temporary_latches(handlerton *hton, THD *thd);
void innobase_store_binlog_offset_and_flush_log(char *binlog_name,longlong offset);
void innobase_store_binlog_offset_and_flush_log(handlerton *hton, char *binlog_name,longlong offset);
int innobase_start_trx_and_assign_read_view(THD* thd);
int innobase_start_trx_and_assign_read_view(handlerton *hton, THD* thd);
/***********************************************************************
This function is used to prepare X/Open XA distributed transaction */
......@@ -271,6 +271,7 @@ This function is used to prepare X/Open XA distributed transaction */
int innobase_xa_prepare(
/*====================*/
/* out: 0 or error number */
handlerton *hton, /* in: innobase hton */
THD* thd, /* in: handle to the MySQL thread of the user
whose XA transaction should be prepared */
bool all); /* in: TRUE - commit transaction
......@@ -283,6 +284,7 @@ int innobase_xa_recover(
/*====================*/
/* out: number of prepared transactions
stored in xid_list */
handlerton *hton, /* in: innobase hton */
XID* xid_list, /* in/out: prepared transactions */
uint len); /* in: number of slots in xid_list */
......@@ -293,6 +295,7 @@ which is in the prepared state */
int innobase_commit_by_xid(
/*=======================*/
/* out: 0 or error number */
handlerton *hton, /* in: innobase hton */
XID* xid); /* in : X/Open XA Transaction Identification */
/***********************************************************************
......@@ -301,6 +304,7 @@ which is in the prepared state */
int innobase_rollback_by_xid(
/* out: 0 or error number */
handlerton *hton, /* in: innobase hton */
XID *xid); /* in : X/Open XA Transaction Identification */
......@@ -311,9 +315,10 @@ This consistent view is then used inside of MySQL when accessing records
using a cursor. */
void*
innobase_create_cursor_view(void);
/*=============================*/
/* out: Pointer to cursor view or NULL */
innobase_create_cursor_view(
/* out: Pointer to cursor view or NULL */
handlerton *hton, /* in: innobase hton */
THD* thd); /* in: user thread handle */
/***********************************************************************
Close the given consistent cursor view of a transaction and restore
......@@ -323,8 +328,11 @@ corresponding MySQL thread still lacks one. */
void
innobase_close_cursor_view(
/*=======================*/
handlerton *hton, /* in: innobase hton */
THD* thd, /* in: user thread handle */
void* curview); /* in: Consistent read view to be closed */
/***********************************************************************
Set the given consistent cursor view to a transaction which is created
if the corresponding MySQL thread still lacks one. If the given
......@@ -334,4 +342,6 @@ restored to a transaction read view. */
void
innobase_set_cursor_view(
/*=====================*/
handlerton *hton, /* in: innobase hton */
THD* thd, /* in: user thread handle */
void* curview); /* in: Consistent read view to be set */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment