summaryrefslogtreecommitdiff
path: root/sql/sql_cursor.cc
diff options
context:
space:
mode:
authorunknown <gbichot@dl145h.mysql.com>2006-09-28 13:19:43 +0200
committerunknown <gbichot@dl145h.mysql.com>2006-09-28 13:19:43 +0200
commit5e2c06a1c7d937b039fb7a2132506cf7703313d1 (patch)
treed7eb3a3db71c34f7b2c9bde03075012adf43e52c /sql/sql_cursor.cc
parent80fc43c1fecd63a4927004ff06a1c4d26a389cf5 (diff)
downloadmariadb-git-5e2c06a1c7d937b039fb7a2132506cf7703313d1.tar.gz
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
Diffstat (limited to 'sql/sql_cursor.cc')
-rw-r--r--sql/sql_cursor.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/sql_cursor.cc b/sql/sql_cursor.cc
index 2784e71ccae..82ee8d72d33 100644
--- a/sql/sql_cursor.cc
+++ b/sql/sql_cursor.cc
@@ -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;
}