1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00
Including client code into embedded library
fixes


libmysql/libmysql.c:
  We should call this way
libmysqld/lib_sql.cc:
  Necessary initializations added
libmysqld/libmysqld.c:
  mysql_close can't be "virtual"
  mysqltest.c calls mysql_close before mysql_connect
sql-common/client.c:
  We have to redo fetch_lengths to count lengths looking at '\0' in string.
  It works slower, but is correct for both client and embedded libraries
This commit is contained in:
unknown
2003-07-18 16:26:35 +05:00
parent bf3af8eeac
commit d17b3e967d
4 changed files with 18 additions and 24 deletions

View File

@ -38,6 +38,7 @@ static char inited, org_my_init_done;
C_MODE_START
#include <mysql.h>
#include "errmsg.h"
#include <sql_common.h>
static int check_connections1(THD * thd);
static int check_connections2(THD * thd);
@ -66,8 +67,10 @@ emb_advanced_command(MYSQL *mysql, enum enum_server_command command,
/* Clear result variables */
thd->clear_error();
mysql->affected_rows= ~(my_ulonglong) 0;
mysql->field_count= 0;
thd->store_globals(); // Fix if more than one connect
free_old_query(mysql);
result= dispatch_command(command, thd, (char *) arg, arg_length + 1);
if (!skip_check)