You've already forked mariadb-connector-c
mirror of
https://github.com/mariadb-corporation/mariadb-connector-c.git
synced 2025-08-08 14:02:17 +03:00
[MDEV-30366] Bulk unitary result flag client implementation part.
With MDEV-30366, server now permit to send a result-set containing generated id and Affected rows for each bulk operation. This feature can be enabled with option MARIADB_OPT_BULK_UNIT_RESULTS when server supports it.
This commit is contained in:
@@ -911,7 +911,7 @@ unsigned char* ma_stmt_execute_generate_bulk_request(MYSQL_STMT *stmt, size_t *r
|
||||
0 4 Statement id
|
||||
4 2 Flags (cursor type):
|
||||
STMT_BULK_FLAG_CLIENT_SEND_TYPES = 128
|
||||
STMT_BULK_FLAG_INSERT_ID_REQUEST = 64
|
||||
STMT_BULK_FLAG_SEND_UNIT_RESULTS = 64
|
||||
-----------------------------------------
|
||||
if (stmt->send_types_to_server):
|
||||
for (i=0; i < param_count; i++)
|
||||
@@ -964,6 +964,9 @@ unsigned char* ma_stmt_execute_generate_bulk_request(MYSQL_STMT *stmt, size_t *r
|
||||
/* todo: request to return auto generated ids */
|
||||
if (stmt->send_types_to_server)
|
||||
flags|= STMT_BULK_FLAG_CLIENT_SEND_TYPES;
|
||||
if (MARIADB_STMT_BULK_UNIT_RESULTS_SUPPORTED(stmt))
|
||||
flags|= STMT_BULK_FLAG_SEND_UNIT_RESULTS;
|
||||
|
||||
int2store(p, flags);
|
||||
p+=2;
|
||||
|
||||
|
Reference in New Issue
Block a user