summaryrefslogtreecommitdiff
path: root/include/mysql.h.pp
diff options
context:
space:
mode:
authorAlexander Nozdrin <alexander.nozdrin@oracle.com>2011-05-06 17:39:20 +0400
committerAlexander Nozdrin <alexander.nozdrin@oracle.com>2011-05-06 17:39:20 +0400
commit32a41e5a25b9683ef79f5787d211c96561637e77 (patch)
treede9a20a6c8fddf18d59a1dd66965c327e19b2505 /include/mysql.h.pp
parentacbe82380eef7bf41966763b4fc82b17e4c7fb44 (diff)
downloadmariadb-git-32a41e5a25b9683ef79f5787d211c96561637e77.tar.gz
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.
Diffstat (limited to 'include/mysql.h.pp')
-rw-r--r--include/mysql.h.pp3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/mysql.h.pp b/include/mysql.h.pp
index 169a8b30e2b..15ec563dfc2 100644
--- a/include/mysql.h.pp
+++ b/include/mysql.h.pp
@@ -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
{