1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Remove THD::stmt_backup

sql/sql_class.cc:
  Statement constructor for the case when it's used for backup only
  was removed.
sql/sql_class.h:
  Remove THD::stmt_backup and simplify Statement constructors.
sql/sql_prepare.cc:
  Use an object on stack instead of THD::stmt_backup
sql/sql_select.cc:
  Use an object on stack instead of THD::stmt_backup
This commit is contained in:
unknown
2005-06-22 23:12:25 +04:00
parent 7eaa6dc1bb
commit 60d6b87775
4 changed files with 39 additions and 60 deletions

View File

@ -1824,6 +1824,7 @@ Cursor::fetch(ulong num_rows)
THD *thd= join->thd;
JOIN_TAB *join_tab= join->join_tab + join->const_tables;
enum_nested_loop_state error= NESTED_LOOP_OK;
Query_arena backup_arena;
DBUG_ENTER("Cursor::fetch");
DBUG_PRINT("enter",("rows: %lu", num_rows));
@ -1835,7 +1836,7 @@ Cursor::fetch(ulong num_rows)
thd->lock= lock;
thd->query_id= query_id;
/* save references to memory, allocated during fetch */
thd->set_n_backup_item_arena(this, &thd->stmt_backup);
thd->set_n_backup_item_arena(this, &backup_arena);
join->fetch_limit+= num_rows;
@ -1851,7 +1852,7 @@ Cursor::fetch(ulong num_rows)
ha_release_temporary_latches(thd);
#endif
thd->restore_backup_item_arena(this, &thd->stmt_backup);
thd->restore_backup_item_arena(this, &backup_arena);
DBUG_ASSERT(thd->free_list == 0);
reset_thd(thd);