mariadb/sql/sql_cursor.h
Konstantin Osipov 740c0d3a87 Implement WL#5502 Remove dead 5.0 class Sensitive_cursor.
Remove dead and unused code.
Update to reflect the code review requests.

include/thr_lock.h:
  Remove declarations for THR_LOCK_OWNER,
  added along with the patch for sensitive cursors.
mysys/thr_lock.c:
  Remove support for multiple thr_lock requestors
  per THD.
sql/lock.cc:
  Revert the patch that added support for sensitive cursors.
sql/sp_rcontext.cc:
  Updated the use of mysql_open_cursor().
sql/sql_class.cc:
  Move the instance of Server_side_cursor
  from class Prepared_statement to class Statement.
sql/sql_class.h:
  Move the isntance of Server_side_cursor
  from class Prepared_statement to class
  Statement.
  Remove multiple lock_ids of thr_lock.
sql/sql_cursor.cc:
  Remove Sensitive_cursor implementation.
sql/sql_cursor.h:
  Remove declarations for sensitive cursors.
sql/sql_prepare.cc:
  Move the declaration of instance of Server_side_cursor
  from class Statement to class Prepared_statement, 
  where it's used.
sql/sql_select.cc:
  Remove sensitive cursor support.
sql/sql_select.h:
  Remove sensitive cursor support.
sql/sql_union.cc:
  Remove sensitive cursor support.
2010-07-27 16:42:36 +04:00

66 lines
2 KiB
C++

/* Copyright (C) 2005 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#ifndef _sql_cursor_h_
#define _sql_cursor_h_
#ifdef USE_PRAGMA_INTERFACE
#pragma interface /* gcc class interface */
#endif
#include "sql_class.h" /* Query_arena */
class JOIN;
/**
@file
Declarations for implementation of server side cursors. Only
read-only non-scrollable cursors are currently implemented.
*/
/**
Server_side_cursor -- an interface for materialized
implementation of cursors. All cursors are self-contained
(created in their own memory root). For that reason they must
be deleted only using a pointer to Server_side_cursor, not to
its base class.
*/
class Server_side_cursor: protected Query_arena, public Sql_alloc
{
protected:
/** Row destination used for fetch */
select_result *result;
public:
Server_side_cursor(MEM_ROOT *mem_root_arg, select_result *result_arg)
:Query_arena(mem_root_arg, INITIALIZED), result(result_arg)
{}
virtual bool is_open() const= 0;
virtual int open(JOIN *top_level_join)= 0;
virtual void fetch(ulong num_rows)= 0;
virtual void close()= 0;
virtual ~Server_side_cursor();
static void operator delete(void *ptr, size_t size);
};
int mysql_open_cursor(THD *thd, select_result *result,
Server_side_cursor **res);
#endif /* _sql_cusor_h_ */