mysql multistatement query problem(if one query fail how we rollback)
Posted by: amit pathak
Date: March 16, 2011 07:11AM

Hello all,
I am using Mysql c api for database interaction, I want to know that if one query of Mysql multi statement fail then how we roll back all query which successfully executed..
ex-
mysql_query(conn,"select * from account_db; select count(*) from account_dbb;select * from account_db")
if there are a scenario where queries are dependent to each other and here if one query fail then related other query should be rollback for making database consistency,[ mysql multi statement execute query one by one so how we will check all query will be run , if all can be run, then only process continue]
Here in this example , second query is wrong, i want to do, if anyone query fail, no changes should be occour in database, is this possible?

Options: ReplyQuote


Subject
Views
Written By
Posted
mysql multistatement query problem(if one query fail how we rollback)
1538
March 16, 2011 07:11AM


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.