1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

SCRUM - adding client into embedded server

error handling fixed
fetch_lengths made to work differently in embedded and client cases


include/mysql.h:
  removed 'embedded' error containers - they're unnecessary now
  added declarations for fetch_lengths to be 'virtual'
include/sql_common.h:
  fetch_lengths declaration removed
libmysql/libmysql.c:
  implementations for fetch_lengths to be 'virtual' added
libmysqld/lib_sql.cc:
  error informations now is moved from thd->net to mysql-net
libmysqld/libmysqld.c:
  error data is in mysql->net now
sql-common/client.c:
  we have to return old fetch_lengths implementation for 'client' case
sql/protocol.cc:
  handling of sqlstate for embedded library added
This commit is contained in:
unknown
2003-07-23 15:23:20 +05:00
parent ceb2374b69
commit 41e77ddf65
7 changed files with 65 additions and 22 deletions

View File

@ -76,8 +76,13 @@ emb_advanced_command(MYSQL *mysql, enum enum_server_command command,
if (!skip_check)
result= thd->net.last_errno ? -1 : 0;
mysql->last_error= thd->net.last_error;
mysql->net.last_errno= thd->net.last_errno;
if ((mysql->net.last_errno= thd->net.last_errno))
{
memcpy(mysql->net.last_error, thd->net.last_error,
sizeof(mysql->net.last_error));
memcpy(mysql->net.sqlstate, thd->net.sqlstate,
sizeof(mysql->net.sqlstate));
}
mysql->warning_count= ((THD*)mysql->thd)->total_warn_count;
return result;
}
@ -292,7 +297,6 @@ void init_embedded_mysql(MYSQL *mysql, int client_flag, char *db)
{
THD *thd = (THD *)mysql->thd;
thd->mysql= mysql;
mysql->last_error= thd->net.last_error;
}
void *create_embedded_thd(int client_flag, char *db)