Commit 869d1a6a authored by gkodinov@dl145s.mysql.com's avatar gkodinov@dl145s.mysql.com

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

into  dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.1-opt
parents cd094b71 802292ae
......@@ -301,7 +301,6 @@ struct st_mysql_ftparser
struct st_mysql_storage_engine
{
int interface_version;
struct handlerton *handlerton;
};
#endif
......
......@@ -10749,7 +10749,7 @@ SHOW_VAR ndb_status_variables_export[]= {
};
struct st_mysql_storage_engine ndbcluster_storage_engine=
{ MYSQL_HANDLERTON_INTERFACE_VERSION, ndbcluster_hton };
{ MYSQL_HANDLERTON_INTERFACE_VERSION };
mysql_declare_plugin(ndbcluster)
{
......
......@@ -5632,7 +5632,7 @@ static int free_share(PARTITION_SHARE *share)
#endif /* NOT_USED */
struct st_mysql_storage_engine partition_storage_engine=
{ MYSQL_HANDLERTON_INTERFACE_VERSION, partition_hton };
{ MYSQL_HANDLERTON_INTERFACE_VERSION };
mysql_declare_plugin(partition)
{
......
......@@ -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);
......
......@@ -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=
{ MYSQL_HANDLERTON_INTERFACE_VERSION, binlog_hton };
{ MYSQL_HANDLERTON_INTERFACE_VERSION };
mysql_declare_plugin(binlog)
{
......
......@@ -323,7 +323,7 @@ Sensitive_cursor::post_open(THD *thd)
if (ht->create_cursor_read_view)
{
info->ht= ht;
info->read_view= (ht->create_cursor_read_view)();
info->read_view= (ht->create_cursor_read_view)(thd);
++info;
}
}
......@@ -433,7 +433,7 @@ Sensitive_cursor::fetch(ulong num_rows)
thd->set_n_backup_active_arena(this, &backup_arena);
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;
......@@ -454,7 +454,7 @@ Sensitive_cursor::fetch(ulong num_rows)
reset_thd(thd);
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)
{
......@@ -487,7 +487,7 @@ Sensitive_cursor::close()
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->ht= 0;
}
......
......@@ -1571,7 +1571,7 @@ bool ha_archive::check_and_repair(THD *thd)
}
struct st_mysql_storage_engine archive_storage_engine=
{ MYSQL_HANDLERTON_INTERFACE_VERSION, archive_hton };
{ MYSQL_HANDLERTON_INTERFACE_VERSION };
mysql_declare_plugin(archive)
{
......
......@@ -212,7 +212,7 @@ static int blackhole_init(void *p)
}
struct st_mysql_storage_engine blackhole_storage_engine=
{ MYSQL_HANDLERTON_INTERFACE_VERSION, blackhole_hton };
{ MYSQL_HANDLERTON_INTERFACE_VERSION };
mysql_declare_plugin(blackhole)
{
......
......@@ -1516,7 +1516,7 @@ bool ha_tina::check_if_incompatible_data(HA_CREATE_INFO *info,
}
struct st_mysql_storage_engine csv_storage_engine=
{ MYSQL_HANDLERTON_INTERFACE_VERSION, tina_hton };
{ MYSQL_HANDLERTON_INTERFACE_VERSION };
mysql_declare_plugin(csv)
{
......
......@@ -703,7 +703,7 @@ int ha_example::create(const char *name, TABLE *table_arg,
}
struct st_mysql_storage_engine example_storage_engine=
{ MYSQL_HANDLERTON_INTERFACE_VERSION, example_hton };
{ MYSQL_HANDLERTON_INTERFACE_VERSION };
mysql_declare_plugin(example)
......
......@@ -2882,7 +2882,7 @@ int ha_federated::execute_simple_query(const char *query, int len)
}
struct st_mysql_storage_engine federated_storage_engine=
{ MYSQL_HANDLERTON_INTERFACE_VERSION, federated_hton };
{ MYSQL_HANDLERTON_INTERFACE_VERSION };
mysql_declare_plugin(federated)
{
......
......@@ -701,7 +701,7 @@ bool ha_heap::check_if_incompatible_data(HA_CREATE_INFO *info,
}
struct st_mysql_storage_engine heap_storage_engine=
{ MYSQL_HANDLERTON_INTERFACE_VERSION, heap_hton};
{ MYSQL_HANDLERTON_INTERFACE_VERSION };
mysql_declare_plugin(heap)
{
......
......@@ -7529,12 +7529,14 @@ 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 */
THD* thd) /* in: user thread handle */
{
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. */
void
innobase_close_cursor_view(
/*=======================*/
THD* thd, /* in: user thread handle */
void* curview)/* in: Consistent read view to be closed */
{
read_cursor_view_close_for_mysql(check_trx_exists(current_thd),
......@@ -7560,6 +7563,7 @@ restored to a transaction read view. */
void
innobase_set_cursor_view(
/*=====================*/
THD* thd, /* in: user thread handle */
void* curview)/* in: Consistent cursor view to be set */
{
read_cursor_set_for_mysql(check_trx_exists(current_thd),
......@@ -7607,7 +7611,7 @@ SHOW_VAR innodb_status_variables_export[]= {
};
struct st_mysql_storage_engine innobase_storage_engine=
{ MYSQL_HANDLERTON_INTERFACE_VERSION, innobase_hton};
{ MYSQL_HANDLERTON_INTERFACE_VERSION };
mysql_declare_plugin(innobase)
{
......
......@@ -313,9 +313,11 @@ 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 */
THD* thd); /* in: user thread handle */
/***********************************************************************
Close the given consistent cursor view of a transaction and restore
......@@ -325,8 +327,10 @@ corresponding MySQL thread still lacks one. */
void
innobase_close_cursor_view(
/*=======================*/
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
......@@ -336,4 +340,5 @@ restored to a transaction read view. */
void
innobase_set_cursor_view(
/*=====================*/
THD* thd, /* in: user thread handle */
void* curview); /* in: Consistent read view to be set */
......@@ -1801,7 +1801,7 @@ static int myisam_init(void *p)
}
struct st_mysql_storage_engine myisam_storage_engine=
{ MYSQL_HANDLERTON_INTERFACE_VERSION, myisam_hton };
{ MYSQL_HANDLERTON_INTERFACE_VERSION };
mysql_declare_plugin(myisam)
{
......
......@@ -568,7 +568,7 @@ static int myisammrg_init(void *p)
}
struct st_mysql_storage_engine myisammrg_storage_engine=
{ MYSQL_HANDLERTON_INTERFACE_VERSION, myisammrg_hton };
{ MYSQL_HANDLERTON_INTERFACE_VERSION };
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