summaryrefslogtreecommitdiff
path: root/sql-common
diff options
context:
space:
mode:
authorunknown <patg@krsna.patg.net>2005-02-23 00:29:57 -0800
committerunknown <patg@krsna.patg.net>2005-02-23 00:29:57 -0800
commitaec302676a839c41e69399bf73091273f1c0b60f (patch)
treee5e25ce017a261231b13aa0deb1e42dacb10c6d8 /sql-common
parent65492347e86bfddd54627c0f6dda483e075a5ec6 (diff)
downloadmariadb-git-aec302676a839c41e69399bf73091273f1c0b60f.tar.gz
WL #2094 Federated Storage Handler
This is the first changeset of suggested changes recommended in Kostja's review of my patch, 1.1846, which includes only functionality changes. Style changes/Documentation patch to follow. include/mysql.h: removed declaration of cli_fetch_lengths per Kostja's suggestion libmysql/libmysql.c: moved mysql_fetch_lengths to client.c (for server to access) per Kostja's suggestion sql-common/client.c: added back 'static' to function definition, added mysql_fetch_lengths sql/ha_federated.cc: changed to use defines as opposed to hardcoded values sql/ha_federated.h: took out duplicate table_flag, fixed a resolve mistake
Diffstat (limited to 'sql-common')
-rw-r--r--sql-common/client.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/sql-common/client.c b/sql-common/client.c
index 2e60b8aad24..aece4230fe0 100644
--- a/sql-common/client.c
+++ b/sql-common/client.c
@@ -1121,7 +1121,7 @@ void mysql_read_default_options(struct st_mysql_options *options,
else the lengths are calculated from the offset between pointers.
**************************************************************************/
-void cli_fetch_lengths(ulong *to, MYSQL_ROW column,
+static void cli_fetch_lengths(ulong *to, MYSQL_ROW column,
unsigned int field_count)
{
ulong *prev_length;
@@ -2628,6 +2628,25 @@ mysql_fetch_row(MYSQL_RES *res)
}
+/**************************************************************************
+ Get column lengths of the current row
+ If one uses mysql_use_result, res->lengths contains the length information,
+ else the lengths are calculated from the offset between pointers.
+**************************************************************************/
+
+ulong * STDCALL
+mysql_fetch_lengths(MYSQL_RES *res)
+{
+ MYSQL_ROW column;
+
+ if (!(column=res->current_row))
+ return 0; /* Something is wrong */
+ if (res->data)
+ (*res->methods->fetch_lengths)(res->lengths, column, res->field_count);
+ return res->lengths;
+}
+
+
int STDCALL
mysql_options(MYSQL *mysql,enum mysql_option option, const char *arg)
{