# Query problem

**URL:** <https://forums.percona.com/t/query-problem/1367>\
**Category:** Other MySQL® Questions\
**Created:** [March 18, 2010, 3:17am UTC](https://forums.percona.com/t/query-problem/1367 "2010-03-18T03:17:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![saradhij2ee](https://avatars.discourse-cdn.com/v4/letter/s/c57346/32.png) [@saradhij2ee](https://forums.percona.com/u/saradhij2ee)\
**Post date:** [March 18, 2010, 3:17am UTC](https://forums.percona.com/t/query-problem/1367/1 "2010-03-18T03:17:53Z")

</div>

I have a table called VOLUN\_BMI\_RESULT. when I update this table(autoCommit is false), trigger will get execute and it inserts data in the VOLUN\_BMI\_RESULT$AUD.Before commiting this I am performing some other operation in that, I used the following query

Oracle

* * *

SELECT \* FROM (SELECT RESULT,pkid FROM VOLUN\_BMI\_RESULT$AUD where VOLUN\_ID = ‘SY-0900004’ ORDER BY pkid DESC, ROWNUM DESC) WHERE ROWNUM=1.

while debugging, when I execute above query from java API it is showing uncommited row(i.e row to be commited) as first row.which is correct and works fine.

MySQL

* * *

SELECT p.RESULT,pkid FROM VOLUN\_BMI\_RESULT$AUD p ,(SELECT @rownum:=0) r where p.VOLUN\_ID = ‘SY-0900004’ order by p.pkid desc limit 1

while debugging, when I execute above query from java API it is showing max among commited rows as first row.

My problem is, why MySQL query is not showing uncommited row as Max row like oracle query.

---

<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:** [March 18, 2010, 8:55am UTC](https://forums.percona.com/t/query-problem/1367/2 "2010-03-18T08:55:58Z")

</div>

Transaction isolation level.

By the way, trigger-based auditing will not work with statement-based replication if there are auto-increment columns.
