Asynchronous prepared statements
Posted by: Vlad Paiu
Date: March 15, 2011 02:33AM

Helllo all,

I saw that there is a workaround to run regular queries asynchronously, by using the mysql_send_query func, followed by read_query_result when there is an event on the socket. This mechanism works but I can't really see why it's not documented anywhere on the official website.

Still, I couldn't find such a mechanism for running prepared statements asynchronously by using the libmysql library. I took a look into the sources and saw that mysql_stmt_execute boils down to the following :

cli_advanced_command(mysql, COM_STMT_EXECUTE, buff, sizeof(buff),
(uchar*) packet, length, 1, stmt) ||
(*mysql->methods->read_query_result)(mysql)

so, from what I understand, it could also be done asynchronously, but the API does not allow this for now. Is there any chance there could be some modifications to the prep statements API to allow developers to run asynchronous prepared statements ?

Options: ReplyQuote


Subject
Views
Written By
Posted
Asynchronous prepared statements
3410
March 15, 2011 02:33AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.