summaryrefslogtreecommitdiff
path: root/sql/mysql_priv.h
diff options
context:
space:
mode:
authorAlexander Ivanov <alexi1952@yandex.ru>2009-10-16 15:20:09 +0400
committerAlexander Ivanov <alexi1952@yandex.ru>2009-10-16 15:20:09 +0400
commit6bc7eab161508115168359460b9d52aff153dbaf (patch)
tree51ca9db10993d7cc1a7697149266bbaf702e0657 /sql/mysql_priv.h
parent8ea19fa73e86a3c27917a92affd6a9e43763c7ce (diff)
downloadmariadb-git-6bc7eab161508115168359460b9d52aff153dbaf.tar.gz
MWL#36: Add a mysqlbinlog option to change the used database.
Make sql_alloc() declaration "public" for a client context. The reason is that sql_alloc() is used in definition of some common purpose stuff (e.g. sql_list.*). To make this stuff available for a client context we declare sql_alloc() as a "virtual function", i.e. as a function that is already declared but must be defined in this context (note that definition of sql_alloc() in thr_malloc.cc is #ifndef'ed for MYSQL_CLIENT). Also make sql_string.h repeatedly includable.
Diffstat (limited to 'sql/mysql_priv.h')
-rw-r--r--sql/mysql_priv.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h
index 63d5621742e..50399d441a7 100644
--- a/sql/mysql_priv.h
+++ b/sql/mysql_priv.h
@@ -92,12 +92,16 @@ extern MYSQL_PLUGIN_IMPORT const char *primary_key_name;
#include "unireg.h"
void init_sql_alloc(MEM_ROOT *root, uint block_size, uint pre_alloc_size);
+#endif // MYSQL_CLIENT
+
void *sql_alloc(size_t);
void *sql_calloc(size_t);
char *sql_strdup(const char *str);
char *sql_strmake(const char *str, size_t len);
void *sql_memdup(const void * ptr, size_t size);
void sql_element_free(void *ptr);
+
+#ifndef MYSQL_CLIENT
char *sql_strmake_with_convert(const char *str, size_t arg_length,
CHARSET_INFO *from_cs,
size_t max_res_length,