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

A fix and a test case for Bug#6513 "Test Suite: Values inserted by using

cursor is interpreted latin1 character and Bug#9819 "Cursors: Mysql Server
Crash while fetching from table with 5 million records."
A fix for a possible memory leak when fetching into an SP cursor
in a long loop.
The patch uses a common implementation of cursors in the binary protocol and 
in stored procedures and implements materialized cursors.
For implementation details, see comments in sql_cursor.cc
This commit is contained in:
konstantin@mysql.com
2005-09-22 02:11:21 +04:00
parent e89c5220b5
commit 6f8d3c4844
30 changed files with 1567 additions and 857 deletions

View File

@ -1544,6 +1544,19 @@ void Query_arena::free_items()
}
void Query_arena::set_query_arena(Query_arena *set)
{
mem_root= set->mem_root;
free_list= set->free_list;
state= set->state;
}
void Query_arena::cleanup_stmt()
{
DBUG_ASSERT("Query_arena::cleanup_stmt()" == "not implemented");
}
/*
Statement functions
*/
@ -1601,12 +1614,6 @@ void Statement::restore_backup_statement(Statement *stmt, Statement *backup)
}
void Statement::close_cursor()
{
DBUG_ASSERT("Statement::close_cursor()" == "not implemented");
}
void THD::end_statement()
{
/* Cleanup SQL processing state to resuse this statement in next query. */
@ -1648,13 +1655,6 @@ void THD::restore_active_arena(Query_arena *set, Query_arena *backup)
DBUG_VOID_RETURN;
}
void Query_arena::set_query_arena(Query_arena *set)
{
mem_root= set->mem_root;
free_list= set->free_list;
state= set->state;
}
Statement::~Statement()
{
/*
@ -1723,9 +1723,11 @@ int Statement_map::insert(Statement *statement)
void Statement_map::close_transient_cursors()
{
#ifdef TO_BE_IMPLEMENTED
Statement *stmt;
while ((stmt= transient_cursor_list.head()))
stmt->close_cursor(); /* deletes itself from the list */
#endif
}