summaryrefslogtreecommitdiff
path: root/sql-common
diff options
context:
space:
mode:
authorunknown <hf@deer.(none)>2003-09-17 15:18:48 +0500
committerunknown <hf@deer.(none)>2003-09-17 15:18:48 +0500
commit11d36fa83101f6490f22da74f1a2b81588683f4b (patch)
tree7b79a1c150902aa88e46bba39d04e0ac9e78cc44 /sql-common
parentabd0afa368e259da0d63d13bfdc6c0ded1f3edd5 (diff)
parent6b05f916b8bd29af6205a946c4954bc3a2cb62df (diff)
downloadmariadb-git-11d36fa83101f6490f22da74f1a2b81588683f4b.tar.gz
Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into deer.(none):/home/hf/work/mysql-4.1.stmt
Diffstat (limited to 'sql-common')
-rw-r--r--sql-common/client.c27
1 files changed, 15 insertions, 12 deletions
diff --git a/sql-common/client.c b/sql-common/client.c
index 6372adb8550..73fe9e4663c 100644
--- a/sql-common/client.c
+++ b/sql-common/client.c
@@ -636,10 +636,10 @@ void free_rows(MYSQL_DATA *cur)
}
}
-static my_bool STDCALL
+my_bool STDCALL
cli_advanced_command(MYSQL *mysql, enum enum_server_command command,
- const char *header, ulong header_length,
- const char *arg, ulong arg_length, my_bool skip_check)
+ const char *header, ulong header_length,
+ const char *arg, ulong arg_length, my_bool skip_check)
{
NET *net= &mysql->net;
my_bool result= 1;
@@ -1139,8 +1139,8 @@ unpack_fields(MYSQL_DATA *data,MEM_ROOT *alloc,uint fields,
/* Read all rows (fields or data) from server */
-MYSQL_DATA *read_rows(MYSQL *mysql,MYSQL_FIELD *mysql_fields,
- uint fields)
+MYSQL_DATA *cli_read_rows(MYSQL *mysql,MYSQL_FIELD *mysql_fields,
+ uint fields)
{
uint field;
ulong pkt_len;
@@ -1150,7 +1150,7 @@ MYSQL_DATA *read_rows(MYSQL *mysql,MYSQL_FIELD *mysql_fields,
MYSQL_DATA *result;
MYSQL_ROWS **prev_ptr,*cur;
NET *net = &mysql->net;
- DBUG_ENTER("read_rows");
+ DBUG_ENTER("cli_read_rows");
if ((pkt_len= net_safe_read(mysql)) == packet_error)
DBUG_RETURN(0);
@@ -1397,17 +1397,18 @@ mysql_ssl_free(MYSQL *mysql __attribute__((unused)))
*/
static my_bool STDCALL cli_mysql_read_query_result(MYSQL *mysql);
-static MYSQL_RES * STDCALL cli_mysql_store_result(MYSQL *mysql);
static MYSQL_RES * STDCALL cli_mysql_use_result(MYSQL *mysql);
static MYSQL_METHODS client_methods=
{
cli_mysql_read_query_result,
cli_advanced_command,
- cli_mysql_store_result,
+ cli_read_rows,
cli_mysql_use_result,
cli_fetch_lengths,
- cli_list_fields
+ cli_list_fields,
+ cli_read_prepare_result,
+ cli_stmt_execute
};
MYSQL * STDCALL
@@ -2264,7 +2265,8 @@ get_info:
mysql->extra_info= net_field_length_ll(&pos); /* Maybe number of rec */
- if (!(fields=read_rows(mysql,(MYSQL_FIELD*)0,protocol_41(mysql) ? 7 : 5)))
+ if (!(fields=(*mysql->methods->read_rows)(mysql,(MYSQL_FIELD*)0,
+ protocol_41(mysql) ? 7 : 5)))
DBUG_RETURN(1);
if (!(mysql->fields=unpack_fields(fields,&mysql->field_alloc,
(uint) field_count,0,
@@ -2326,7 +2328,7 @@ mysql_real_query(MYSQL *mysql, const char *query, ulong length)
mysql_data_seek may be used.
**************************************************************************/
-static MYSQL_RES * STDCALL cli_mysql_store_result(MYSQL *mysql)
+MYSQL_RES * STDCALL mysql_store_result(MYSQL *mysql)
{
MYSQL_RES *result;
DBUG_ENTER("mysql_store_result");
@@ -2355,7 +2357,8 @@ static MYSQL_RES * STDCALL cli_mysql_store_result(MYSQL *mysql)
result->methods= mysql->methods;
result->eof=1; /* Marker for buffered */
result->lengths=(ulong*) (result+1);
- if (!(result->data=read_rows(mysql,mysql->fields,mysql->field_count)))
+ if (!(result->data=
+ (*mysql->methods->read_rows)(mysql,mysql->fields,mysql->field_count)))
{
my_free((gptr) result,MYF(0));
DBUG_RETURN(0);