1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

Type of MYSQL_BIND::buffer changed to void *

This commit is contained in:
konstantin@mysql.com
2004-06-25 17:04:33 +04:00
parent 6e1eb6a78c
commit 354e2ba67b
3 changed files with 173 additions and 173 deletions

View File

@ -540,7 +540,7 @@ typedef struct st_mysql_bind
{
unsigned long *length; /* output length pointer */
my_bool *is_null; /* Pointer to null indicators */
char *buffer; /* buffer to get/put data */
void *buffer; /* buffer to get/put data */
enum enum_field_types buffer_type; /* buffer type */
unsigned long buffer_length; /* buffer length, must be set for str/binary */

View File

@ -2200,7 +2200,7 @@ static void store_param_type(char **pos, MYSQL_BIND *param)
static void store_param_tinyint(NET *net, MYSQL_BIND *param)
{
*(net->write_pos++)= (uchar) *param->buffer;
*(net->write_pos++)= *(uchar *) param->buffer;
}
static void store_param_short(NET *net, MYSQL_BIND *param)
@ -3126,7 +3126,7 @@ static void send_data_long(MYSQL_BIND *param, MYSQL_FIELD *field,
case MYSQL_TYPE_NULL: /* do nothing */
break;
case MYSQL_TYPE_TINY:
*param->buffer= (uchar) value;
*(uchar *)param->buffer= (uchar) value;
break;
case MYSQL_TYPE_SHORT:
shortstore(buffer, value);
@ -3486,7 +3486,7 @@ static void fetch_results(MYSQL_BIND *param, MYSQL_FIELD *field, uchar **row)
static void fetch_result_tinyint(MYSQL_BIND *param, uchar **row)
{
*param->buffer= **row;
*(uchar *)param->buffer= **row;
(*row)++;
}
@ -3561,7 +3561,7 @@ static void fetch_result_str(MYSQL_BIND *param, uchar **row)
memcpy(param->buffer, (char *)*row, copy_length);
/* Add an end null if there is room in the buffer */
if (copy_length != param->buffer_length)
*(param->buffer+copy_length)= '\0';
((uchar *)param->buffer)[copy_length]= '\0';
*param->length= length; /* return total length */
*row+= length;
}

File diff suppressed because it is too large Load Diff