mirror of
https://github.com/MariaDB/server.git
synced 2025-01-15 19:42:28 +01:00
SCRUM: embedde library
Minor fixes libmysqld/lib_sql.cc: Comment added libmysqld/libmysqld.c: this part of code should be moved under if (mysql)
This commit is contained in:
parent
af1c7280f4
commit
01397f5d19
2 changed files with 12 additions and 6 deletions
|
@ -72,6 +72,12 @@ emb_advanced_command(MYSQL *mysql, enum enum_server_command command,
|
|||
mysql->field_count= 0;
|
||||
|
||||
thd->store_globals(); // Fix if more than one connect
|
||||
/*
|
||||
We have to call free_old_query before we start to fill mysql->fields
|
||||
for new query. In the case of embedded server we collect field data
|
||||
during query execution (not during data retrieval as it is in remote
|
||||
client). So we have to call free_old_query here
|
||||
*/
|
||||
free_old_query(mysql);
|
||||
result= dispatch_command(command, thd, (char *) arg, arg_length + 1);
|
||||
|
||||
|
|
|
@ -311,14 +311,14 @@ error:
|
|||
void STDCALL mysql_close(MYSQL *mysql)
|
||||
{
|
||||
DBUG_ENTER("mysql_close");
|
||||
if (mysql->methods != &embedded_methods)
|
||||
{
|
||||
cli_mysql_close(mysql);
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
if (mysql) /* Some simple safety */
|
||||
{
|
||||
if (mysql->methods != &embedded_methods)
|
||||
{
|
||||
cli_mysql_close(mysql);
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
my_free(mysql->options.user,MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(mysql->options.host,MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(mysql->options.password,MYF(MY_ALLOW_ZERO_PTR));
|
||||
|
|
Loading…
Reference in a new issue