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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
258a3d16
Commit
258a3d16
authored
Apr 30, 2004
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/kostja/mysql/mysql-4.1-root
parents
f9038942
e73e26f3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
75 additions
and
0 deletions
+75
-0
include/mysql.h
include/mysql.h
+23
-0
libmysql/libmysql.c
libmysql/libmysql.c
+50
-0
libmysql/libmysql.def
libmysql/libmysql.def
+2
-0
No files found.
include/mysql.h
View file @
258a3d16
...
...
@@ -589,8 +589,25 @@ typedef struct st_mysql_stmt
my_bool
bind_result_done
;
/* output buffers were supplied */
/* mysql_stmt_close() had to cancel this result */
my_bool
unbuffered_fetch_cancelled
;
/*
Is set to true if we need to calculate field->max_length for
metadata fields when doing mysql_stmt_store_result.
*/
my_bool
update_max_length
;
}
MYSQL_STMT
;
enum
enum_stmt_attr_type
{
/*
When doing mysql_stmt_store_result calculate max_length attribute
of statement metadata. This is to be consistent with the old API,
where this was done automatically.
In the new API we do that only by request because it slows down
mysql_stmt_store_result sufficiently.
*/
STMT_ATTR_UPDATE_MAX_LENGTH
};
typedef
struct
st_mysql_methods
{
...
...
@@ -648,6 +665,12 @@ int STDCALL mysql_stmt_fetch_column(MYSQL_STMT *stmt, MYSQL_BIND *bind,
unsigned
long
offset
);
int
STDCALL
mysql_stmt_store_result
(
MYSQL_STMT
*
stmt
);
unsigned
long
STDCALL
mysql_stmt_param_count
(
MYSQL_STMT
*
stmt
);
my_bool
STDCALL
mysql_stmt_attr_set
(
MYSQL_STMT
*
stmt
,
enum
enum_stmt_attr_type
attr_type
,
const
void
*
attr
);
my_bool
STDCALL
mysql_stmt_attr_get
(
MYSQL_STMT
*
stmt
,
enum
enum_stmt_attr_type
attr_type
,
void
*
attr
);
my_bool
STDCALL
mysql_stmt_bind_param
(
MYSQL_STMT
*
stmt
,
MYSQL_BIND
*
bnd
);
my_bool
STDCALL
mysql_stmt_bind_result
(
MYSQL_STMT
*
stmt
,
MYSQL_BIND
*
bnd
);
my_bool
STDCALL
mysql_stmt_close
(
MYSQL_STMT
*
stmt
);
...
...
libmysql/libmysql.c
View file @
258a3d16
...
...
@@ -2514,6 +2514,56 @@ stmt_read_row_no_data(MYSQL_STMT *stmt __attribute__((unused)),
return
MYSQL_NO_DATA
;
}
/*
Get/set statement attributes
SYNOPSIS
mysql_stmt_attr_get()
mysql_stmt_attr_set()
attr_type statemenet attribute
value casted to const void * pointer to value.
RETURN VALUE
0 success
!0 wrong attribute type
*/
my_bool
STDCALL
mysql_stmt_attr_set
(
MYSQL_STMT
*
stmt
,
enum
enum_stmt_attr_type
attr_type
,
const
void
*
value
)
{
switch
(
attr_type
)
{
case
STMT_ATTR_UPDATE_MAX_LENGTH
:
/*
Do we need a flags variable for all attributes or a bool for each
attribute?
*/
stmt
->
update_max_length
=
value
?
*
(
const
my_bool
*
)
value
:
0
;
break
;
default:
return
TRUE
;
}
return
FALSE
;
}
my_bool
STDCALL
mysql_stmt_attr_get
(
MYSQL_STMT
*
stmt
,
enum
enum_stmt_attr_type
attr_type
,
void
*
value
)
{
switch
(
attr_type
)
{
case
STMT_ATTR_UPDATE_MAX_LENGTH
:
*
(
unsigned
long
*
)
value
=
stmt
->
update_max_length
;
break
;
default:
return
TRUE
;
}
return
FALSE
;
}
/*
Execute the prepared query
*/
...
...
libmysql/libmysql.def
View file @
258a3d16
...
...
@@ -127,3 +127,5 @@ EXPORTS
mysql_stmt_prepare
mysql_stmt_init
mysql_stmt_insert_id
mysql_stmt_attr_get
mysql_stmt_attr_set
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