mirror of
https://github.com/MariaDB/server.git
synced 2025-08-21 16:03:24 +03:00
Patch for Bug#12374486 - SEVERE MEMORY LEAK IN PREPARED STATEMENTS
THAT CALL STORED PROCEDURES. The bug was introduced by WL#4435. The problem was that if a stored procedure generated a few result sets with different set of columns, a new memory would be allocated after every EXECUTE for every result set. The fix is to introduce a new memory root in scope of MYSQL_STMT, and to store result-set metadata in that memory root.
This commit is contained in:
@@ -512,6 +512,7 @@ typedef struct st_mysql_bind
|
||||
my_bool is_null_value;
|
||||
void *extension;
|
||||
} MYSQL_BIND;
|
||||
struct st_mysql_stmt_extension;
|
||||
typedef struct st_mysql_stmt
|
||||
{
|
||||
MEM_ROOT mem_root;
|
||||
@@ -541,7 +542,7 @@ typedef struct st_mysql_stmt
|
||||
unsigned char bind_result_done;
|
||||
my_bool unbuffered_fetch_cancelled;
|
||||
my_bool update_max_length;
|
||||
void *extension;
|
||||
struct st_mysql_stmt_extension *extension;
|
||||
} MYSQL_STMT;
|
||||
enum enum_stmt_attr_type
|
||||
{
|
||||
|
Reference in New Issue
Block a user