Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
13b09b10
Commit
13b09b10
authored
Jun 25, 2004
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Type of MYSQL_BIND::buffer changed to void *
parent
7e75366b
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
173 additions
and
173 deletions
+173
-173
include/mysql.h
include/mysql.h
+1
-1
libmysql/libmysql.c
libmysql/libmysql.c
+4
-4
tests/client_test.c
tests/client_test.c
+168
-168
No files found.
include/mysql.h
View file @
13b09b10
...
@@ -540,7 +540,7 @@ typedef struct st_mysql_bind
...
@@ -540,7 +540,7 @@ typedef struct st_mysql_bind
{
{
unsigned
long
*
length
;
/* output length pointer */
unsigned
long
*
length
;
/* output length pointer */
my_bool
*
is_null
;
/* Pointer to null indicators */
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 */
enum
enum_field_types
buffer_type
;
/* buffer type */
unsigned
long
buffer_length
;
/* buffer length, must be set for str/binary */
unsigned
long
buffer_length
;
/* buffer length, must be set for str/binary */
...
...
libmysql/libmysql.c
View file @
13b09b10
...
@@ -2200,7 +2200,7 @@ static void store_param_type(char **pos, MYSQL_BIND *param)
...
@@ -2200,7 +2200,7 @@ static void store_param_type(char **pos, MYSQL_BIND *param)
static
void
store_param_tinyint
(
NET
*
net
,
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
)
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,
...
@@ -3126,7 +3126,7 @@ static void send_data_long(MYSQL_BIND *param, MYSQL_FIELD *field,
case
MYSQL_TYPE_NULL
:
/* do nothing */
case
MYSQL_TYPE_NULL
:
/* do nothing */
break
;
break
;
case
MYSQL_TYPE_TINY
:
case
MYSQL_TYPE_TINY
:
*
param
->
buffer
=
(
uchar
)
value
;
*
(
uchar
*
)
param
->
buffer
=
(
uchar
)
value
;
break
;
break
;
case
MYSQL_TYPE_SHORT
:
case
MYSQL_TYPE_SHORT
:
shortstore
(
buffer
,
value
);
shortstore
(
buffer
,
value
);
...
@@ -3486,7 +3486,7 @@ static void fetch_results(MYSQL_BIND *param, MYSQL_FIELD *field, uchar **row)
...
@@ -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
)
static
void
fetch_result_tinyint
(
MYSQL_BIND
*
param
,
uchar
**
row
)
{
{
*
param
->
buffer
=
**
row
;
*
(
uchar
*
)
param
->
buffer
=
**
row
;
(
*
row
)
++
;
(
*
row
)
++
;
}
}
...
@@ -3561,7 +3561,7 @@ static void fetch_result_str(MYSQL_BIND *param, uchar **row)
...
@@ -3561,7 +3561,7 @@ static void fetch_result_str(MYSQL_BIND *param, uchar **row)
memcpy
(
param
->
buffer
,
(
char
*
)
*
row
,
copy_length
);
memcpy
(
param
->
buffer
,
(
char
*
)
*
row
,
copy_length
);
/* Add an end null if there is room in the buffer */
/* Add an end null if there is room in the buffer */
if
(
copy_length
!=
param
->
buffer_length
)
if
(
copy_length
!=
param
->
buffer_length
)
*
(
param
->
buffer
+
copy_length
)
=
'\0'
;
((
uchar
*
)
param
->
buffer
)[
copy_length
]
=
'\0'
;
*
param
->
length
=
length
;
/* return total length */
*
param
->
length
=
length
;
/* return total length */
*
row
+=
length
;
*
row
+=
length
;
}
}
...
...
tests/client_test.c
View file @
13b09b10
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment