summaryrefslogtreecommitdiff
path: root/libmysql
diff options
context:
space:
mode:
authorunknown <hf@deer.(none)>2003-07-23 15:23:20 +0500
committerunknown <hf@deer.(none)>2003-07-23 15:23:20 +0500
commit41e77ddf657bd14a14ab7b48a4b2f8bad12b0d69 (patch)
tree4f5589680b89450eee716ef28e4b85348fdb2c1f /libmysql
parentceb2374b69e37e18fa014f6685725fa4c5e52383 (diff)
downloadmariadb-git-41e77ddf657bd14a14ab7b48a4b2f8bad12b0d69.tar.gz
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
Diffstat (limited to 'libmysql')
-rw-r--r--libmysql/libmysql.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c
index a90fb2f1205..d75f217585d 100644
--- a/libmysql/libmysql.c
+++ b/libmysql/libmysql.c
@@ -868,7 +868,7 @@ mysql_fetch_lengths(MYSQL_RES *res)
if (!(column=res->current_row))
return 0; /* Something is wrong */
if (res->data)
- fetch_lengths(res->lengths, column, res->field_count);
+ (*res->methods->fetch_lengths)(res->lengths, column, res->field_count);
return res->lengths;
}
@@ -979,6 +979,7 @@ mysql_list_fields(MYSQL *mysql, const char *table, const char *wild)
free_rows(query);
DBUG_RETURN(NULL);
}
+ result->methods= mysql->methods;
result->field_alloc=mysql->field_alloc;
mysql->fields=0;
result->field_count = (uint) query->rows;
@@ -1704,6 +1705,7 @@ mysql_prepare_result(MYSQL_STMT *stmt)
MYF(MY_WME | MY_ZEROFILL))))
return 0;
+ result->methods= stmt->mysql->methods;
result->eof=1; /* Marker for buffered */
result->fields= stmt->fields;
result->field_count= stmt->field_count;
@@ -3193,6 +3195,7 @@ int STDCALL mysql_stmt_store_result(MYSQL_STMT *stmt)
set_stmt_error(stmt, CR_OUT_OF_MEMORY, unknown_sqlstate);
DBUG_RETURN(1);
}
+ result->methods= mysql->methods;
stmt->result_buffered= 1;
if (!(result->data= read_binary_rows(stmt)))
{