MySQL 8.4.0
Source Code Documentation
Server_side_cursor Class Referenceabstract

Server_side_cursor – an interface for materialized implementation of cursors. More...

#include <sql_cursor.h>

Inheritance diagram for Server_side_cursor:
[legend]

Public Member Functions

 Server_side_cursor (Query_result *result_arg)
 
virtual bool is_open () const =0
 
virtual bool open (THD *thd)=0
 
virtual bool fetch (ulong num_rows)=0
 
virtual void close ()=0
 
virtual ~Server_side_cursor ()
 

Static Public Member Functions

static void * operator new (size_t size, MEM_ROOT *mem_root, const std::nothrow_t &=std::nothrow) noexcept
 
static void operator delete (void *, size_t)
 
static void operator delete (void *, MEM_ROOT *, const std::nothrow_t &) noexcept
 

Public Attributes

MEM_ROOT mem_root {key_memory_TABLE, 1024}
 For allocation of Handler objects for the temporary table. More...
 

Protected Attributes

Query_arena m_arena
 
Query_resultm_result
 Row destination used for fetch. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ Server_side_cursor()

Server_side_cursor::Server_side_cursor ( Query_result result_arg)
inline

◆ ~Server_side_cursor()

virtual Server_side_cursor::~Server_side_cursor ( )
inlinevirtual

Member Function Documentation

◆ close()

virtual void Server_side_cursor::close ( )
pure virtual

Implemented in Materialized_cursor.

◆ fetch()

virtual bool Server_side_cursor::fetch ( ulong  num_rows)
pure virtual

Implemented in Materialized_cursor.

◆ is_open()

virtual bool Server_side_cursor::is_open ( ) const
pure virtual

Implemented in Materialized_cursor.

◆ open()

virtual bool Server_side_cursor::open ( THD thd)
pure virtual

Implemented in Materialized_cursor.

◆ operator delete() [1/2]

static void Server_side_cursor::operator delete ( void *  ,
MEM_ROOT ,
const std::nothrow_t &   
)
inlinestaticnoexcept

◆ operator delete() [2/2]

static void Server_side_cursor::operator delete ( void *  ,
size_t   
)
inlinestatic

◆ operator new()

static void * Server_side_cursor::operator new ( size_t  size,
MEM_ROOT mem_root,
const std::nothrow_t &  = std::nothrow 
)
inlinestaticnoexcept

Member Data Documentation

◆ m_arena

Query_arena Server_side_cursor::m_arena
protected

◆ m_result

Query_result* Server_side_cursor::m_result
protected

Row destination used for fetch.

◆ mem_root

MEM_ROOT Server_side_cursor::mem_root {key_memory_TABLE, 1024}

For allocation of Handler objects for the temporary table.

The prepared statement's mem_root cannot be used, since the handler may be created and deleted several times. The execution mem_root cannot be used since creation of and retrieval from a cursor are in different executions.


The documentation for this class was generated from the following file: