In case an application uses a data type which has no corresponding MariaDB data type, additional memory needs to be allocated, and the data needs to be converted.
Speaking of bulk insert, additional memory needs to be allocated for all parameters, so it would be much more efficient to have a callback function which retrieves the parameters from the application for each row.
When retrieving information (mysql_stmt_fetch) raw data will be converted to the bind buffers, afterwards the application needs to convert the bind buffers to the application specific format.
It would be much more efficient to allow the application to access the raw data and convert the data directly into required types.
New parameters for mysql_stmt_attr_set/get:
- STMT_ATTR_CB_DATA: registers user data which will be passed to the callback functions as first parameter
- STMT_ATTR_CB_PARAM: registers the call back function for parameters
- STMT_ATTR_CB_RESULT: registers the call back function for result fetching