diff options
author | hf@deer.(none) <> | 2004-07-22 20:54:25 +0500 |
---|---|---|
committer | hf@deer.(none) <> | 2004-07-22 20:54:25 +0500 |
commit | 94bfeb839399486eb90f2fc5dd25cdb4761d71bd (patch) | |
tree | ecfe787be62082cf510021730f7750916b699945 /sql-common | |
parent | 5eadafe56960a5df27007ae382c1c5445cc1ed9a (diff) | |
download | mariadb-git-94bfeb839399486eb90f2fc5dd25cdb4761d71bd.tar.gz |
Fixes for bugs in embedded library:
#4700 (Unsigned value returned as signed)
just no appropriate checking
#4701 (Errors returned earlier than expected)
all errors returned from send_command()
#4702 (Result isn't freed properly if there's no retrieval)
flush_use_result has only 'client' version and should
be made 'virtual'
Diffstat (limited to 'sql-common')
-rw-r--r-- | sql-common/client.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sql-common/client.c b/sql-common/client.c index 738904657cc..3046395f7d2 100644 --- a/sql-common/client.c +++ b/sql-common/client.c @@ -723,7 +723,7 @@ void set_mysql_error(MYSQL *mysql, int errcode, const char *sqlstate) Flush result set sent from server */ -void flush_use_result(MYSQL *mysql) +static void cli_flush_use_result(MYSQL *mysql) { /* Clear the current execution status */ DBUG_PRINT("warning",("Not all packets read, clearing them")); @@ -842,7 +842,7 @@ mysql_free_result(MYSQL_RES *result) mysql->unbuffered_fetch_owner= 0; if (mysql->status == MYSQL_STATUS_USE_RESULT) { - flush_use_result(mysql); + (*mysql->methods->flush_use_result)(mysql); mysql->status=MYSQL_STATUS_READY; } } @@ -1493,7 +1493,8 @@ static MYSQL_METHODS client_methods= cli_advanced_command, cli_read_rows, cli_use_result, - cli_fetch_lengths + cli_fetch_lengths, + cli_flush_use_result #ifndef MYSQL_SERVER ,cli_list_fields, cli_read_prepare_result, |