You are here

MySQL Total Record count issue

Hi Team, I am using MySQL 5.6 in production server (hosted at AWS). After inserting records online its commited in database, but while executing select count(*) from table_name i am getting the latest count. After exiting from mysql and again login i am able to view the latest count. Transaction isolation in mysql is repeatable-read (both in global and status variables) Kindly help to fix this issue

Can you repeat this at the command line? This is such a basic problem that I expect that it has nothing to do with MySQL but with your environment/application/set-up or testing method...
olicomment

HI Team, The issue is due to autocommit mode is set to off in MySQL and tranasaction level is repeatable read. Due to this we are not able to view the latest record count. It shows only the records committed when i logged in the mysql. Pls suggest how to fix this
kalashacomment

Kalasha,

Since autocommit is disabled, did you issue "COMMIT" after inserting those records ?
If not, then you have to either enable autocommit or commit your DML statements manually (issue "COMMIT" or execute DDL statement)

abdel-mawlacomment