1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

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
This commit is contained in:
unknown
2006-09-28 13:19:43 +02:00
parent 80fc43c1fe
commit 5e2c06a1c7
4 changed files with 23 additions and 14 deletions

View File

@@ -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;
}