1
0
mirror of https://github.com/mariadb-corporation/mariadb-connector-c.git synced 2025-08-07 02:42:49 +03:00

cleanup (patch provided by Alexander Barkov)

move function prototypes used in mariadb_lib.c and mariadb_stmt.c
to include/ma_priv.h
This commit is contained in:
Georg Richter
2020-01-20 17:44:49 +01:00
parent ffbdaaac2b
commit a1283d0b10
3 changed files with 40 additions and 16 deletions

View File

@@ -27,6 +27,7 @@
#include <ma_string.h>
#include <mariadb_ctype.h>
#include <ma_common.h>
#include "ma_priv.h"
#include "ma_context.h"
#include "mysql.h"
#include "mariadb_version.h"
@@ -771,7 +772,7 @@ static size_t rset_field_offsets[]= {
MYSQL_FIELD *
unpack_fields(MYSQL_DATA *data,MA_MEM_ROOT *alloc,uint fields,
my_bool default_value, my_bool long_flag_protocol __attribute__((unused)))
my_bool default_value)
{
MYSQL_ROWS *row;
MYSQL_FIELD *field,*result;
@@ -2195,9 +2196,7 @@ get_info:
if (!(fields=mysql->methods->db_read_rows(mysql,(MYSQL_FIELD*) 0,8)))
return(-1);
if (!(mysql->fields=unpack_fields(fields,&mysql->field_alloc,
(uint) field_count,1,
(my_bool) test(mysql->server_capabilities &
CLIENT_LONG_FLAG))))
(uint) field_count, 1)))
return(-1);
mysql->status=MYSQL_STATUS_GET_RESULT;
mysql->field_count=field_count;
@@ -2528,9 +2527,7 @@ mysql_list_fields(MYSQL *mysql, const char *table, const char *wild)
result->eof=1;
result->field_count = (uint) query->rows;
result->fields= unpack_fields(query,&result->field_alloc,
result->field_count,1,
(my_bool) test(mysql->server_capabilities &
CLIENT_LONG_FLAG));
result->field_count, 1);
if (result->fields)
return(result);
@@ -2555,9 +2552,8 @@ mysql_list_processes(MYSQL *mysql)
field_count=(uint) net_field_length(&pos);
if (!(fields = mysql->methods->db_read_rows(mysql,(MYSQL_FIELD*) 0,5)))
return(NULL);
if (!(mysql->fields=unpack_fields(fields,&mysql->field_alloc,field_count,0,
(my_bool) test(mysql->server_capabilities &
CLIENT_LONG_FLAG))))
if (!(mysql->fields=unpack_fields(fields, &mysql->field_alloc,
field_count, 0)))
return(NULL);
mysql->status=MYSQL_STATUS_GET_RESULT;
mysql->field_count=field_count;