summaryrefslogtreecommitdiff
path: root/libmysqld
diff options
context:
space:
mode:
authorserg@serg.mylan <>2006-03-06 23:20:19 +0100
committerserg@serg.mylan <>2006-03-06 23:20:19 +0100
commit84ff8192ff1e51544313d087515c27eca47d800e (patch)
tree90649294541eacf0cf33eba6a623a88c9ff1da9f /libmysqld
parent6feaef7517cc6e2ae8f854885d1b0e7e4a9e9be7 (diff)
parent5a1672dd664f97d6cccda17360415160365df866 (diff)
downloadmariadb-git-84ff8192ff1e51544313d087515c27eca47d800e.tar.gz
merged
Diffstat (limited to 'libmysqld')
-rw-r--r--libmysqld/lib_sql.cc54
1 files changed, 22 insertions, 32 deletions
diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc
index d74dc8cd2d3..6c520797d4f 100644
--- a/libmysqld/lib_sql.cc
+++ b/libmysqld/lib_sql.cc
@@ -38,6 +38,7 @@ int check_user(THD *thd, enum enum_server_command command,
const char *passwd, uint passwd_len, const char *db,
bool check_count);
C_MODE_START
+
#include <mysql.h>
#undef ER
#include "errmsg.h"
@@ -46,22 +47,6 @@ C_MODE_START
static my_bool emb_read_query_result(MYSQL *mysql);
-C_MODE_END
-
-void THD::clear_data_list()
-{
- while (first_data)
- {
- MYSQL_DATA *data= first_data;
- first_data= data->embedded_info->next;
- free_rows(data);
- }
- data_tail= &first_data;
- free_rows(cur_data);
- cur_data= 0;
-}
-
-C_MODE_START
/*
Reads error information from the MYSQL_DATA and puts
@@ -426,15 +411,6 @@ MYSQL_METHODS embedded_methods=
emb_read_rows_from_cursor
};
-C_MODE_END
-
-void THD::clear_error()
-{
- net.last_error[0]= 0;
- net.last_errno= 0;
- net.report_error= 0;
-}
-
/*
Make a copy of array and the strings array points to
*/
@@ -461,11 +437,7 @@ char **copy_arguments(int argc, char **argv)
return res;
}
-
-extern "C"
-{
-
-char ** copy_arguments_ptr= 0;
+char ** copy_arguments_ptr= 0;
int init_embedded_server(int argc, char **argv, char **groups)
{
@@ -580,9 +552,7 @@ void end_embedded_server()
clean_up(0);
}
-} /* extern "C" */
-C_MODE_START
void init_embedded_mysql(MYSQL *mysql, int client_flag, char *db)
{
THD *thd = (THD *)mysql->thd;
@@ -701,6 +671,26 @@ err:
C_MODE_END
+void THD::clear_data_list()
+{
+ while (first_data)
+ {
+ MYSQL_DATA *data= first_data;
+ first_data= data->embedded_info->next;
+ free_rows(data);
+ }
+ data_tail= &first_data;
+ free_rows(cur_data);
+ cur_data= 0;
+}
+
+void THD::clear_error()
+{
+ net.last_error[0]= 0;
+ net.last_errno= 0;
+ net.report_error= 0;
+}
+
static char *dup_str_aux(MEM_ROOT *root, const char *from, uint length,
CHARSET_INFO *fromcs, CHARSET_INFO *tocs)
{