Closed GoogleCodeExporter closed 9 years ago
Incidentally, anything sent after that in the same request (being in or out of
the
transaction) is not processed.
This would yield no results (and is not reflected in the database).
-------
begin;
insert into movie values (1800,'dracula negro',1972,8.9,14182);
insert into movie values (1801,'bacula',1972,8.9,14182);
select * from movie;
commit;
-------
Original comment by tah...@gmail.com
on 20 Nov 2008 at 12:23
[deleted comment]
Note the "out of the transaction" part.
-------
begin;
insert into movie values (1800,'dracula negro',1972,8.9,14182);
select * from movie;
commit;
insert into movie values (1801,'bacula',1972,8.9,14182);
-------
Besides not returning SUCCESS=0 for the transaction, the behavior is correct.
However, nos processing the external INSERT is not.
Original comment by tah...@gmail.com
on 20 Nov 2008 at 12:29
Turns out it is not transaction related. Nor specific to reading or writing.
Something as simple as this breaks it:
-------------
select * from fake where id=1000; -- table doesn't exist
select * from movie where id=1000; -- this query should yield something
-------------
Expected result:
----------------
Should return:
{'MYSQL_ERRNO': 1146,
'MYSQL_ERROR': "Table 'test.mov' doesn't exist",
'ROLLBACK_ON_ERROR': 1,
'ROLLBACK_ON_ERROR_SUCCESS': 1,
'SUCCESS': 0}
{'RESULT': {'HEADER': ['id', 'title', 'year', 'score', 'votes'],
'ROWS': [[1000,
"can't buy me love",
1987,
7.4000000000000004,
366]],
'TYPES': ['MYSQL_TYPE_LONG',
'MYSQL_TYPE_STRING',
'MYSQL_TYPE_NEWDECIMAL',
'MYSQL_TYPE_FLOAT',
'MYSQL_TYPE_LONG']}}
Returned instead:
-----------------
{'MYSQL_ERRNO': 1146,
'MYSQL_ERROR': "Table 'test.mov' doesn't exist",
'ROLLBACK_ON_ERROR': 1,
'ROLLBACK_ON_ERROR_SUCCESS': 1,
'SUCCESS': 0}
Additional details:
-------------------
If the queries are executed in reverse, only the RESULT dictionary is returned.
The
ERRORS are not in the response
Original comment by tah...@gmail.com
on 20 Nov 2008 at 4:19
It has been fixed in trunk.
Great report BTW! :-)
Original comment by alobbs
on 21 Nov 2008 at 9:08
Original issue reported on code.google.com by
tah...@gmail.com
on 20 Nov 2008 at 12:19