It is helpful for performance reasons to be able to send multiple statements (e.g. updates) for execution in a single request. MySQL 5.6 and above support multiple-statement execution.
However, ocaml-mysql does not provide a way to open a connection with the CLIENT_MULTI_STATEMENTS option. The lack of ability to do this is a blocking issue (effectively) for performance reasons for my use case. Allowing this should only involve changing a few lines of code similar to those relating to the CLIENT_FOUND_ROWS flag.
However, since CLIENT_MULTI_STATEMENTS automatically enables the CLIENT_MULTI_RESULTS option, a better solution might be to provide both options, since CLIENT_MULTI_RESULTS is also needed on its own for calling stored procedures that produce result sets. While my use case doesn't need multiple results, perhaps adding API calls to provide the needed access to the C API for retrieving multiple results would be worthwhile as well. (Indeed I can think of scenarios where sending multiple queries for execution simultaneously would be useful.)
It is helpful for performance reasons to be able to send multiple statements (e.g. updates) for execution in a single request. MySQL 5.6 and above support multiple-statement execution.
However, ocaml-mysql does not provide a way to open a connection with the
CLIENT_MULTI_STATEMENTS
option. The lack of ability to do this is a blocking issue (effectively) for performance reasons for my use case. Allowing this should only involve changing a few lines of code similar to those relating to theCLIENT_FOUND_ROWS
flag.However, since
CLIENT_MULTI_STATEMENTS
automatically enables theCLIENT_MULTI_RESULTS
option, a better solution might be to provide both options, sinceCLIENT_MULTI_RESULTS
is also needed on its own for calling stored procedures that produce result sets. While my use case doesn't need multiple results, perhaps adding API calls to provide the needed access to the C API for retrieving multiple results would be worthwhile as well. (Indeed I can think of scenarios where sending multiple queries for execution simultaneously would be useful.)