[CONC-347] Add new api function mariadb_stmt_fetch_fields Created: 2018-07-25 Updated: 2021-05-10 Resolved: 2021-05-10 |
|
| Status: | Closed |
| Project: | MariaDB Connector/C |
| Component/s: | Documentation |
| Affects Version/s: | None |
| Fix Version/s: | 3.1.0 |
| Type: | Task | Priority: | Major |
| Reporter: | Georg Richter | Assignee: | Georg Richter |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | 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:
|
| Comments |
| Comment by Georg Richter [ 2018-07-25 ] |
|
Hi, can you please review - implementation can be found in cc_python branch. |
| Comment by Lawrin Novitsky [ 2018-07-25 ] |
|
Are you sure that you should do the same in mysql_stmt_result_metadata? i.e. only copy pointer to fields from stmt. What if application somehow stores and uses that MYSQL_RES structure after stmt handler somehow changed? well, probably effectively means closed. I can't think of any good reason for that, but still. |