#803 wrong results in Ubuntu

None
closed-fixed
nobody
MySQL (10)
5
2013-10-25
2010-05-07
Igor Konforti
No

I'm using TOra Version 2.1.1-1 from ubuntu 10.4 and when i ask mySQL simple question as
SELECT SQL_CALC_FOUND_ROWS * FROM events where id > 100;
SET @rows = FOUND_ROWS();
SELECT @rows;
I get @rows to 1
But thats not true cause when i try in MySQL termanal i get:
mysql> SELECT @rows
-> ;
+-------+
| @rows |
+-------+
| 8272 |
+-------+
1 row in set (0.00 sec)
It took me lot of time to figure this out...
There is also problem with results from my procedure where i don't get right result each time...

Discussion

  • Mike Johnson
    Mike Johnson
    2010-06-10

    That's because you're currently not guaranteed to get the same DB connection every time. If that were the case, we'd have to have a connection dedicated to every SQL worksheet, something I might end up doing.

    But if you can run your statements in a single block, you'll get the result you were expecting.

     
  • Ivan Brezina
    Ivan Brezina
    2013-10-25

    • status: open --> closed-fixed
    • Group: -->
     
  • Ivan Brezina
    Ivan Brezina
    2013-10-25

    Fixed in Tora 3 aplha. The Icon "Lock connection" will withdraw a connection from a pool and will run all the queries on the same connection.