Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
-
None
Description
To get metadata information for the binary protocol (prepared statements), a resultset handle must be allocated via mysql_stmt_result_metadata() which contains a pointer to stmt-> fields. Afterwards this handle must be released via mysql_free_result().
Instead of allocating and freeing memory it would be much simpler to have an additional API function mariadb_stmt_fetch_fields() which just returns stmt->fields:
MYSQL_FIELD STDCALL *mariadb_stmt_fetch_fields(MYSQL_STMT *stmt)
|
{
|
if (stmt) |
return stmt->fields; |
return NULL; |
}
|
Attachments
Activity
Field | Original Value | New Value |
---|---|---|
Description |
To get metadata information for the binary protocol (prepared statements), a resultset handle must be allocated(via {{mysql_stmt_result_metadata()}} which contains a pointer to {{stmt-> fields}}. Afterwards this handle must be released via {{mysql_free_result()}}.
Instead of allocating and freeing memory it would be much simpler to have an additional API function {{mysql_stmt_fetch_fields()}} which just returns {{stmt->fields}}: {code:java} MYSQL_FIELD STDCALL *mysql_stmt_fetch_fields(MYSQL_STMT *stmt) { if (stmt) return stmt->fields; return NULL; } {code} |
To get metadata information for the binary protocol (prepared statements), a resultset handle must be allocated via {{mysql_stmt_result_metadata()}} which contains a pointer to {{stmt-> fields}}. Afterwards this handle must be released via {{mysql_free_result()}}.
Instead of allocating and freeing memory it would be much simpler to have an additional API function {{mysql_stmt_fetch_fields()}} which just returns {{stmt->fields}}: {code:java} MYSQL_FIELD STDCALL *mysql_stmt_fetch_fields(MYSQL_STMT *stmt) { if (stmt) return stmt->fields; return NULL; } {code} |
Description |
To get metadata information for the binary protocol (prepared statements), a resultset handle must be allocated via {{mysql_stmt_result_metadata()}} which contains a pointer to {{stmt-> fields}}. Afterwards this handle must be released via {{mysql_free_result()}}.
Instead of allocating and freeing memory it would be much simpler to have an additional API function {{mysql_stmt_fetch_fields()}} which just returns {{stmt->fields}}: {code:java} MYSQL_FIELD STDCALL *mysql_stmt_fetch_fields(MYSQL_STMT *stmt) { if (stmt) return stmt->fields; return NULL; } {code} |
To get metadata information for the binary protocol (prepared statements), a resultset handle must be allocated via {{mysql_stmt_result_metadata()}} which contains a pointer to {{stmt-> fields}}. Afterwards this handle must be released via {{mysql_free_result()}}.
Instead of allocating and freeing memory it would be much simpler to have an additional API function {{mariadb_stmt_fetch_fields()}} which just returns {{stmt->fields}}: {code:java} MYSQL_FIELD STDCALL *mariadb_stmt_fetch_fields(MYSQL_STMT *stmt) { if (stmt) return stmt->fields; return NULL; } {code} |
Summary | Add new api function mysql_stmt_fetch_fields | Add new api function mariadb_stmt_fetch_fields |
Assignee | Georg Richter [ georg ] | Lawrin Novitsky [ lawrin ] |
Status | Open [ 1 ] | In Review [ 10002 ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
Fix Version/s | 3.2 [ 23723 ] | |
Fix Version/s | 3.1.0 [ 22519 ] |
Fix Version/s | 3.2.0 [ 25122 ] | |
Fix Version/s | 3.2 [ 23723 ] |
Component/s | Documentation [ 16811 ] |
Assignee | Lawrin Novitsky [ lawrin ] | Georg Richter [ georg ] |
Fix Version/s | 3.1.0 [ 22519 ] | |
Fix Version/s | 3.2.0 [ 25122 ] |
Resolution | Fixed [ 1 ] | |
Status | Stalled [ 10000 ] | Closed [ 6 ] |
Workflow | MariaDB connectors [ 88574 ] | MariaDB v4 [ 161133 ] |