MySQL Forums
Forum List  »  InnoDB

Update query gives no result but insert query gives result in 1 transaction
Posted by: newbie
Date: August 05, 2008 10:49AM

Dear All,
I have 2 queries which I run under one transaction but for some rare cases the update query give no result but there is no error generated but in all cases the insert query works. Part of the logs show the queries have been posted below.

080804 14:40:21 207 Connect root@localhost on mpcms4
207 Query SHOW VARIABLES
207 Query SHOW COLLATION
207 Query SET character_set_results=NULL
207 Init DB mpcms4
207 Query Select tblProduct.productTotalStock, tblProduct.productBooked, tblProduct.productCode, tblProduct.productName, tblProduct.productPrice, tblProduct.rrpMarkUpType, tblProduct.rrpMarkUpFixed, tblProduct.rrpMarkUpAmount, tblProduct.rrpMarkUpPercentage, tblProduct.productTotalAmount From tblProduct Where productID=1592
208 Connect root@localhost on mpcms4
208 Query SHOW VARIABLES
208 Query SHOW COLLATION
208 Query SET character_set_results=NULL
208 Init DB mpcms4
208 Query SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ
208 Query BEGIN
208 Query Update tblProduct Set tblProduct.productBooked = tblProduct.productBooked + 1 Where tblProduct.productID=1592
208 Query Insert into tblTempReceipt Set productType='Accessory', productID=1592, stockID ='6', stockSIQ ='1', employeeID = '9', tempReceiptTimeStamp='2008:08:04 02:40:21'
208 Query COMMIT
208 Quit
207 Quit

080804 14:51:50 214 Connect root@localhost on mpcms4
214 Query SHOW VARIABLES
214 Query SHOW COLLATION
214 Query SET character_set_results=NULL
214 Init DB mpcms4
214 Query Select tblProduct.productTotalStock, tblProduct.productBooked, tblProduct.productCode, tblProduct.productName, tblProduct.productPrice, tblProduct.rrpMarkUpType, tblProduct.rrpMarkUpFixed, tblProduct.rrpMarkUpAmount, tblProduct.rrpMarkUpPercentage, tblProduct.productTotalAmount From tblProduct Where productID=1068
215 Connect root@localhost on mpcms4
215 Query SHOW VARIABLES
215 Query SHOW COLLATION
215 Query SET character_set_results=NULL
215 Init DB mpcms4
215 Query SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ
215 Query BEGIN
215 Query Update tblProduct Set tblProduct.productBooked = tblProduct.productBooked + 1 Where tblProduct.productID=1068
215 Query Insert into tblTempReceipt Set productType='Accessory', productID=1068, stockID ='7', stockSIQ ='1', employeeID = '9', tempReceiptTimeStamp='2008:08:04 02:51:50'
215 Query COMMIT
215 Quit
214 Quit

Options: ReplyQuote


Subject
Views
Written By
Posted
Update query gives no result but insert query gives result in 1 transaction
2845
August 05, 2008 10:49AM


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.