I have a problem here where first my application will do a select statement then immediately it will run begin and commit statement. I have attached my log file too. The problem now is that if you notice for all the Id such 76,78,80,82, 84 and 86 you have proper begin and commit. I dont understand why for 88 there is a begin statement but no other statement like commit. Is something very suprising because if there is problem with my application then all should fail but I am puzzled why is it not committed.
Are you using InnoDB tables?
Is there an uncommitted transaction in SHOW INNODB STATUS?
Yes I am using all innodb tables.Attached is my file for the innodb engine status. I am dont see any uncommited transaction. Actually what this status gives you in depth about what is happening to my db is it ?
It is possible that you have AUTOCOMMIT set, so BEGIN and COMMIT are useless anyway.
I have done this settings init_connect=‘set autocommit=0’ in my my.ini file. But when I run this query select @@autocommit; it still shows the answer as 1. Why is this happening? Thank you.
I can’t answer that. You need to troubleshoot. Start by learning about global and session variables in the MySQL manual, and check the global value. If that’s not the problem, then also check what your mysql client is doing. (Is it command-line, sqlyog, phpmysqladmin, etc? Check what it does.) Look at SELECT CONNECTION_ID() and then look at what queries that session has executed in the log.