summaryrefslogtreecommitdiff
path: root/include/sql_common.h
diff options
context:
space:
mode:
authorunknown <holyfoot@deer.(none)>2006-06-01 17:06:42 +0500
committerunknown <holyfoot@deer.(none)>2006-06-01 17:06:42 +0500
commiteadcf20081b18b28f344552a9902fea2404d55bd (patch)
treed38087a9ddc2cb5e7182d44fada846bcf265fc41 /include/sql_common.h
parentb29e052dbfe5021fefb5d312860a4980c851c24b (diff)
downloadmariadb-git-eadcf20081b18b28f344552a9902fea2404d55bd.tar.gz
bug #16017 (memory leaks in embedded server)
There actually was 3 different problems - hash_user_connections wasn't cleaned one strdupped database name wasn't freed and stmt->mem_root wasn't cleaned as it was replased with mysql->field_alloc for result For the last one - i made the library using stmt's fields to store result if it's the case. include/mysql.h: statement pointer added to the advanced_command to be checked in embedded server include/sql_common.h: stmt added to the cli_advanced_command interface libmysql/libmysql.c: stmt pointer now sent to advanced_command libmysqld/embedded_priv.h: it's enough to send database name to check_embedded_connection libmysqld/lib_sql.cc: Now we store result directly in the MYSQL_STMT structure to avoid extra copying libmysqld/libmysqld.c: it's enough to only send database pointer to check_embedded_connection sql-common/client.c: stmt fake attribute added to cli_advanced_command sql/sql_parse.cc: hash_user_connections isn't used if no access checks compiled
Diffstat (limited to 'include/sql_common.h')
-rw-r--r--include/sql_common.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/sql_common.h b/include/sql_common.h
index c07a4a831bb..52d766d77d2 100644
--- a/include/sql_common.h
+++ b/include/sql_common.h
@@ -33,7 +33,8 @@ void mysql_read_default_options(struct st_mysql_options *options,
my_bool
cli_advanced_command(MYSQL *mysql, enum enum_server_command command,
const char *header, ulong header_length,
- const char *arg, ulong arg_length, my_bool skip_check);
+ const char *arg, ulong arg_length, my_bool skip_check,
+ MYSQL_STMT *stmt);
void set_stmt_errmsg(MYSQL_STMT * stmt, const char *err, int errcode,
const char *sqlstate);