Commit 13d83102 authored by unknown's avatar unknown

Merge bk-internal:/home/bk/mysql-5.1

into  dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.1-opt
parents ca2372d7 8b833dc9
...@@ -301,7 +301,6 @@ struct st_mysql_ftparser ...@@ -301,7 +301,6 @@ struct st_mysql_ftparser
struct st_mysql_storage_engine struct st_mysql_storage_engine
{ {
int interface_version; int interface_version;
struct handlerton *handlerton;
}; };
#endif #endif
......
...@@ -10749,7 +10749,7 @@ SHOW_VAR ndb_status_variables_export[]= { ...@@ -10749,7 +10749,7 @@ SHOW_VAR ndb_status_variables_export[]= {
}; };
struct st_mysql_storage_engine ndbcluster_storage_engine= struct st_mysql_storage_engine ndbcluster_storage_engine=
{ MYSQL_HANDLERTON_INTERFACE_VERSION, ndbcluster_hton }; { MYSQL_HANDLERTON_INTERFACE_VERSION };
mysql_declare_plugin(ndbcluster) mysql_declare_plugin(ndbcluster)
{ {
......
...@@ -5632,7 +5632,7 @@ static int free_share(PARTITION_SHARE *share) ...@@ -5632,7 +5632,7 @@ static int free_share(PARTITION_SHARE *share)
#endif /* NOT_USED */ #endif /* NOT_USED */
struct st_mysql_storage_engine partition_storage_engine= struct st_mysql_storage_engine partition_storage_engine=
{ MYSQL_HANDLERTON_INTERFACE_VERSION, partition_hton }; { MYSQL_HANDLERTON_INTERFACE_VERSION };
mysql_declare_plugin(partition) mysql_declare_plugin(partition)
{ {
......
...@@ -630,9 +630,9 @@ struct handlerton ...@@ -630,9 +630,9 @@ struct handlerton
int (*recover)(XID *xid_list, uint len); int (*recover)(XID *xid_list, uint len);
int (*commit_by_xid)(XID *xid); int (*commit_by_xid)(XID *xid);
int (*rollback_by_xid)(XID *xid); int (*rollback_by_xid)(XID *xid);
void *(*create_cursor_read_view)(); void *(*create_cursor_read_view)(THD *thd);
void (*set_cursor_read_view)(void *); void (*set_cursor_read_view)(THD *thd, void *read_view);
void (*close_cursor_read_view)(void *); void (*close_cursor_read_view)(THD *thd, void *read_view);
handler *(*create)(TABLE_SHARE *table, MEM_ROOT *mem_root); handler *(*create)(TABLE_SHARE *table, MEM_ROOT *mem_root);
void (*drop_database)(char* path); void (*drop_database)(char* path);
int (*panic)(enum ha_panic_function flag); int (*panic)(enum ha_panic_function flag);
......
...@@ -4678,7 +4678,7 @@ int TC_LOG_BINLOG::recover(IO_CACHE *log, Format_description_log_event *fdle) ...@@ -4678,7 +4678,7 @@ int TC_LOG_BINLOG::recover(IO_CACHE *log, Format_description_log_event *fdle)
} }
struct st_mysql_storage_engine binlog_storage_engine= struct st_mysql_storage_engine binlog_storage_engine=
{ MYSQL_HANDLERTON_INTERFACE_VERSION, binlog_hton }; { MYSQL_HANDLERTON_INTERFACE_VERSION };
mysql_declare_plugin(binlog) mysql_declare_plugin(binlog)
{ {
......
...@@ -323,7 +323,7 @@ Sensitive_cursor::post_open(THD *thd) ...@@ -323,7 +323,7 @@ Sensitive_cursor::post_open(THD *thd)
if (ht->create_cursor_read_view) if (ht->create_cursor_read_view)
{ {
info->ht= ht; info->ht= ht;
info->read_view= (ht->create_cursor_read_view)(); info->read_view= (ht->create_cursor_read_view)(thd);
++info; ++info;
} }
} }
...@@ -433,7 +433,7 @@ Sensitive_cursor::fetch(ulong num_rows) ...@@ -433,7 +433,7 @@ Sensitive_cursor::fetch(ulong num_rows)
thd->set_n_backup_active_arena(this, &backup_arena); thd->set_n_backup_active_arena(this, &backup_arena);
for (info= ht_info; info->read_view ; info++) for (info= ht_info; info->read_view ; info++)
(info->ht->set_cursor_read_view)(info->read_view); (info->ht->set_cursor_read_view)(thd, info->read_view);
join->fetch_limit+= num_rows; join->fetch_limit+= num_rows;
...@@ -454,7 +454,7 @@ Sensitive_cursor::fetch(ulong num_rows) ...@@ -454,7 +454,7 @@ Sensitive_cursor::fetch(ulong num_rows)
reset_thd(thd); reset_thd(thd);
for (info= ht_info; info->read_view; info++) for (info= ht_info; info->read_view; info++)
(info->ht->set_cursor_read_view)(0); (info->ht->set_cursor_read_view)(thd, 0);
if (error == NESTED_LOOP_CURSOR_LIMIT) if (error == NESTED_LOOP_CURSOR_LIMIT)
{ {
...@@ -487,7 +487,7 @@ Sensitive_cursor::close() ...@@ -487,7 +487,7 @@ Sensitive_cursor::close()
for (Engine_info *info= ht_info; info->read_view; info++) for (Engine_info *info= ht_info; info->read_view; info++)
{ {
(info->ht->close_cursor_read_view)(info->read_view); (info->ht->close_cursor_read_view)(thd, info->read_view);
info->read_view= 0; info->read_view= 0;
info->ht= 0; info->ht= 0;
} }
......
...@@ -1571,7 +1571,7 @@ bool ha_archive::check_and_repair(THD *thd) ...@@ -1571,7 +1571,7 @@ bool ha_archive::check_and_repair(THD *thd)
} }
struct st_mysql_storage_engine archive_storage_engine= struct st_mysql_storage_engine archive_storage_engine=
{ MYSQL_HANDLERTON_INTERFACE_VERSION, archive_hton }; { MYSQL_HANDLERTON_INTERFACE_VERSION };
mysql_declare_plugin(archive) mysql_declare_plugin(archive)
{ {
......
...@@ -212,7 +212,7 @@ static int blackhole_init(void *p) ...@@ -212,7 +212,7 @@ static int blackhole_init(void *p)
} }
struct st_mysql_storage_engine blackhole_storage_engine= struct st_mysql_storage_engine blackhole_storage_engine=
{ MYSQL_HANDLERTON_INTERFACE_VERSION, blackhole_hton }; { MYSQL_HANDLERTON_INTERFACE_VERSION };
mysql_declare_plugin(blackhole) mysql_declare_plugin(blackhole)
{ {
......
...@@ -1516,7 +1516,7 @@ bool ha_tina::check_if_incompatible_data(HA_CREATE_INFO *info, ...@@ -1516,7 +1516,7 @@ bool ha_tina::check_if_incompatible_data(HA_CREATE_INFO *info,
} }
struct st_mysql_storage_engine csv_storage_engine= struct st_mysql_storage_engine csv_storage_engine=
{ MYSQL_HANDLERTON_INTERFACE_VERSION, tina_hton }; { MYSQL_HANDLERTON_INTERFACE_VERSION };
mysql_declare_plugin(csv) mysql_declare_plugin(csv)
{ {
......
...@@ -703,7 +703,7 @@ int ha_example::create(const char *name, TABLE *table_arg, ...@@ -703,7 +703,7 @@ int ha_example::create(const char *name, TABLE *table_arg,
} }
struct st_mysql_storage_engine example_storage_engine= struct st_mysql_storage_engine example_storage_engine=
{ MYSQL_HANDLERTON_INTERFACE_VERSION, example_hton }; { MYSQL_HANDLERTON_INTERFACE_VERSION };
mysql_declare_plugin(example) mysql_declare_plugin(example)
......
...@@ -2882,7 +2882,7 @@ int ha_federated::execute_simple_query(const char *query, int len) ...@@ -2882,7 +2882,7 @@ int ha_federated::execute_simple_query(const char *query, int len)
} }
struct st_mysql_storage_engine federated_storage_engine= struct st_mysql_storage_engine federated_storage_engine=
{ MYSQL_HANDLERTON_INTERFACE_VERSION, federated_hton }; { MYSQL_HANDLERTON_INTERFACE_VERSION };
mysql_declare_plugin(federated) mysql_declare_plugin(federated)
{ {
......
...@@ -701,7 +701,7 @@ bool ha_heap::check_if_incompatible_data(HA_CREATE_INFO *info, ...@@ -701,7 +701,7 @@ bool ha_heap::check_if_incompatible_data(HA_CREATE_INFO *info,
} }
struct st_mysql_storage_engine heap_storage_engine= struct st_mysql_storage_engine heap_storage_engine=
{ MYSQL_HANDLERTON_INTERFACE_VERSION, heap_hton}; { MYSQL_HANDLERTON_INTERFACE_VERSION };
mysql_declare_plugin(heap) mysql_declare_plugin(heap)
{ {
......
...@@ -7529,12 +7529,14 @@ This consistent view is then used inside of MySQL when accessing records ...@@ -7529,12 +7529,14 @@ This consistent view is then used inside of MySQL when accessing records
using a cursor. */ using a cursor. */
void* void*
innobase_create_cursor_view(void) innobase_create_cursor_view(
/*=============================*/ /*========================*/
/* out: Pointer to cursor view or NULL */ /* out: pointer to cursor
view or NULL */
THD* thd) /* in: user thread handle */
{ {
return(read_cursor_view_create_for_mysql( return(read_cursor_view_create_for_mysql(
check_trx_exists(current_thd))); check_trx_exists(thd)));
} }
/*********************************************************************** /***********************************************************************
...@@ -7545,6 +7547,7 @@ corresponding MySQL thread still lacks one. */ ...@@ -7545,6 +7547,7 @@ corresponding MySQL thread still lacks one. */
void void
innobase_close_cursor_view( innobase_close_cursor_view(
/*=======================*/ /*=======================*/
THD* thd, /* in: user thread handle */
void* curview)/* in: Consistent read view to be closed */ void* curview)/* in: Consistent read view to be closed */
{ {
read_cursor_view_close_for_mysql(check_trx_exists(current_thd), read_cursor_view_close_for_mysql(check_trx_exists(current_thd),
...@@ -7560,6 +7563,7 @@ restored to a transaction read view. */ ...@@ -7560,6 +7563,7 @@ restored to a transaction read view. */
void void
innobase_set_cursor_view( innobase_set_cursor_view(
/*=====================*/ /*=====================*/
THD* thd, /* in: user thread handle */
void* curview)/* in: Consistent cursor view to be set */ void* curview)/* in: Consistent cursor view to be set */
{ {
read_cursor_set_for_mysql(check_trx_exists(current_thd), read_cursor_set_for_mysql(check_trx_exists(current_thd),
...@@ -7607,7 +7611,7 @@ SHOW_VAR innodb_status_variables_export[]= { ...@@ -7607,7 +7611,7 @@ SHOW_VAR innodb_status_variables_export[]= {
}; };
struct st_mysql_storage_engine innobase_storage_engine= struct st_mysql_storage_engine innobase_storage_engine=
{ MYSQL_HANDLERTON_INTERFACE_VERSION, innobase_hton}; { MYSQL_HANDLERTON_INTERFACE_VERSION };
mysql_declare_plugin(innobase) mysql_declare_plugin(innobase)
{ {
......
...@@ -313,9 +313,11 @@ This consistent view is then used inside of MySQL when accessing records ...@@ -313,9 +313,11 @@ This consistent view is then used inside of MySQL when accessing records
using a cursor. */ using a cursor. */
void* void*
innobase_create_cursor_view(void); innobase_create_cursor_view(
/*=============================*/ /*========================*/
/* out: Pointer to cursor view or NULL */ /* out: pointer to cursor
view or NULL */
THD* thd); /* in: user thread handle */
/*********************************************************************** /***********************************************************************
Close the given consistent cursor view of a transaction and restore Close the given consistent cursor view of a transaction and restore
...@@ -325,8 +327,10 @@ corresponding MySQL thread still lacks one. */ ...@@ -325,8 +327,10 @@ corresponding MySQL thread still lacks one. */
void void
innobase_close_cursor_view( innobase_close_cursor_view(
/*=======================*/ /*=======================*/
THD* thd, /* in: user thread handle */
void* curview); /* in: Consistent read view to be closed */ void* curview); /* in: Consistent read view to be closed */
/*********************************************************************** /***********************************************************************
Set the given consistent cursor view to a transaction which is created Set the given consistent cursor view to a transaction which is created
if the corresponding MySQL thread still lacks one. If the given if the corresponding MySQL thread still lacks one. If the given
...@@ -336,4 +340,5 @@ restored to a transaction read view. */ ...@@ -336,4 +340,5 @@ restored to a transaction read view. */
void void
innobase_set_cursor_view( innobase_set_cursor_view(
/*=====================*/ /*=====================*/
THD* thd, /* in: user thread handle */
void* curview); /* in: Consistent read view to be set */ void* curview); /* in: Consistent read view to be set */
...@@ -1801,7 +1801,7 @@ static int myisam_init(void *p) ...@@ -1801,7 +1801,7 @@ static int myisam_init(void *p)
} }
struct st_mysql_storage_engine myisam_storage_engine= struct st_mysql_storage_engine myisam_storage_engine=
{ MYSQL_HANDLERTON_INTERFACE_VERSION, myisam_hton }; { MYSQL_HANDLERTON_INTERFACE_VERSION };
mysql_declare_plugin(myisam) mysql_declare_plugin(myisam)
{ {
......
...@@ -568,7 +568,7 @@ static int myisammrg_init(void *p) ...@@ -568,7 +568,7 @@ static int myisammrg_init(void *p)
} }
struct st_mysql_storage_engine myisammrg_storage_engine= struct st_mysql_storage_engine myisammrg_storage_engine=
{ MYSQL_HANDLERTON_INTERFACE_VERSION, myisammrg_hton }; { MYSQL_HANDLERTON_INTERFACE_VERSION };
mysql_declare_plugin(myisammrg) mysql_declare_plugin(myisammrg)
{ {
......
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