# Committed but line not exist in the database.

**URL:** <https://forums.percona.com/t/committed-but-line-not-exist-in-the-database/1263>\
**Category:** Other MySQL® Questions\
**Created:** [September 18, 2009, 10:13pm UTC](https://forums.percona.com/t/committed-but-line-not-exist-in-the-database/1263 "2009-09-18T22:13:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![newtomysql](https://avatars.discourse-cdn.com/v4/letter/n/a183cd/32.png) [@newtomysql](https://forums.percona.com/u/newtomysql)\
**Post date:** [September 18, 2009, 10:13pm UTC](https://forums.percona.com/t/committed-but-line-not-exist-in-the-database/1263/1 "2009-09-18T22:13:25Z")

</div>

Dear All,  
I have a very funny scenario. I have system where it reads the  
value from another db and updates my local db. I put the whole thing  
into a transaction it have been working very fine. Suddenly I find in  
my log file as below for two different cases. I notice the insert into  
product have been commited but when I check my databased this lines are  
not there. What whould have gone wrong possibly as there is no rollback  
and commited well rite.

First Case

090917 23:07:11 580 Connect [root&#64;localhost](mailto:root&#64;localhost) on mpcms4  
580 Query SHOW VARIABLES  
580 Query SHOW COLLATION  
580 Query SET character\_set\_results=NULL  
580 Init DB mpcms4  
580 Query SET SESSION TRANSACTION ISOLATION LEVEL  
REPEATABLE READ  
580 Query BEGIN  
090917 23:07:19 580 Query Insert into tblProduct Set  
productID  
=3220,productCategoryID=‘14’,productSubCategoryID=‘41’,produ ctBrandID=‘1010’,productGroupID=‘21’,productStatusID=‘1’,pro ductCode=‘GIFT-ITEC-PS-STD-O’,productName=‘SE  
PHONE  
STRING’,productType=‘Accessory’,rrpMarkUpType=‘Fixed’,rrpMar kUpAmount=0,rrpMarkUpFixed=10,rrpMarkUpPercentage=0  
090917 23:07:20 580 Query Update tblProduct Set  
productCategoryID=‘14’,productSubCategoryID=‘41’,productBran dID=‘1010’,productGroupID=‘21’,productStatusID=‘1’,productCo de=‘GIFT-ITEC-PS-STD-O’,productName=‘ITECH  
PHONE  
STRING’,productType=‘Accessory’,rrpMarkUpType=‘Fixed’,rrpMar kUpAmount=0,rrpMarkUpFixed=10,rrpMarkUpPercentage=0  
Where productID = 3220  
090917 23:07:21 580 Query Insert into tblProduct Set  
productID  
=3221,productCategoryID=‘14’,productSubCategoryID=‘25’,produ ctBrandID=‘1010’,productGroupID=‘21’,productStatusID=‘1’,pro ductCode=‘GIFT-SE-PS-STD-O’,productName=‘SE  
PHONE  
STRING’,productType=‘Accessory’,rrpMarkUpType=‘Fixed’,rrpMar kUpAmount=0,rrpMarkUpFixed=10,rrpMarkUpPercentage=0  
580 Query COMMIT  
090917 23:07:22 580 Quit

Second Case  
090917 23:37:33 631 Connect [root&#64;localhost](mailto:root&#64;localhost) on mpcms4  
631 Query SHOW VARIABLES  
631 Query SHOW COLLATION  
631 Query SET character\_set\_results=NULL  
631 Init DB mpcms4  
631 Query SET SESSION TRANSACTION ISOLATION LEVEL  
REPEATABLE READ  
631 Query BEGIN  
090917 23:38:04 631 Query Insert into tblProductGroup Set  
productGroupID  
=819,productGroupCode=‘BLB2’,productGroupDescription=‘BLB2’  
090917 23:38:05 631 Query Insert into tblProduct Set  
productID  
=3222,productCategoryID=‘6’,productSubCategoryID=‘1’,product BrandID=‘277’,productGroupID=‘819’,productStatusID=‘34’,prod uctCode=‘ACC-BAT-NK-BLB2-MAX’,productName=‘MOMAX  
BATTERY  
BLB2’,productType=‘Accessory’,rrpMarkUpType=‘Fixed’,rrpMarkU pAmount=0,rrpMarkUpFixed=29,rrpMarkUpPercentage=0  
090917 23:38:06 631 Query COMMIT  
090917 23:38:07 631 Quit

---

<div class="post-metadata">

**Author:** ![xaprb](https://avatars.discourse-cdn.com/v4/letter/x/49beb7/32.png) [@xaprb](https://forums.percona.com/u/xaprb)\
**Post date:** [December 25, 2009, 7:07am UTC](https://forums.percona.com/t/committed-but-line-not-exist-in-the-database/1263/2 "2009-12-25T07:07:18Z")

</div>

You are probably in repeatable-read mode and will not notice the new rows until you restart your transaction.

---

<div class="post-metadata">

**Author:** ![newtomysql](https://avatars.discourse-cdn.com/v4/letter/n/a183cd/32.png) [@newtomysql](https://forums.percona.com/u/newtomysql)\
**Post date:** [December 25, 2009, 9:50am UTC](https://forums.percona.com/t/committed-but-line-not-exist-in-the-database/1263/3 "2009-12-25T09:50:33Z")

</div>

Dear Xaprb,  
I dont get you why your said that I am in repetable-read mode. But why only this case n not other cases ? Quite confuse? What is the best manner to distributed transaction? Thank you.
