Version: 13.0-alpha-14
Build #: 30653
Build Date: 2012-Dec-18 04:02:10 AM
For Greenplum FluidShell connection, get error that current transaction is aborted
1.) I get Error:current transaction is aborted, commands ignored until end of transaction block for a sequence of steps i perform in a Greenplum Fluidshell terminal
2.) We had addressed this issue for query analyzer - see issue 7941
Wanted to see if we had extended this to FluidShell as well ??
Sequence to reproduce
/home/tariq$:1> autocommit off
/home/tariq$:1> select * from tariq.design @
/home/tariq$:1> insert into tariq.design values(100,'loss1') @
/home/tariq$:1>rollback
/home/tariq$:1>commit
/home/tariq$:1> insert into tariq.design values(1001,'tar') @
/home/tariq$:1>commit
/home/tariq$:1> insert into tariq.design values(1001,'tar')
/home/tariq$:2>commit
/home/tariq$:2>
/home/tariq$:2> select * from tariq.design @
>[Error] Script lines: 1-3 --------------------------
ERROR: syntax error at or near "select"
Position: 46
Line: 2
[Executed: 12/19/2012 2:25:13 PM] [Execution: 0ms]
/home/tariq$:1> select * from tariq.design @
>[Error] Script lines: 1-2 --------------------------
ERROR: current transaction is aborted, commands ignored until end of transaction block
Line: 1
[Executed: 12/19/2012 2:25:15 PM] [Execution: 0ms]
/home/tariq$:2>autocommit off
/home/tariq$:1> select * from tariq.design @
>[Error] Script lines: 1-2 --------------------------
ERROR: current transaction is aborted, commands ignored until end of transaction block
Line: 1
|
84 KB
|
101 KB
This test case turned 'auto commit' off at the very beginning by executing '\autocommit off' command, this will put subsequently executed SQL statements in a transaction. In Greenplum, once an error occurred in a transaction, subsequent SQLs simply won't execute and a 'current transaction is aborted, commands ignored until end of transaction block' error is always reported. When a transaction in an error state, nothing would work, you cannot rollback that transaction, nor turned 'auto commit' back on.
Applying this test case to ADS Query Analyzer, same error can be produced there.
Issue #7941 modified ConnectionSupport.supportDDLRollback() and let it return FALSE if server is Greenplum. This method will return FALSE for Oracle, MySQL, Sybase..., as well. I tried the same test case against Oracle 10g and MySQL 5.0, they don't have problem to handle it.
PostgreSQL seems to be working fine as well against this test case. It seems that this problem is Greenplum specific.
For the time being, for Greenplum server:
(1) user cannot turn 'auto commit' off,
(2) user needs to close FS/Query Analyzer tab if ran into this sort of error.
This problem is not specific to FluidShell. It also occurs in Query Analyzer. Simple set of steps to reproduce in Query Analyzer:
1) Turn off AutoCommit using icon in Query Analyzer
2) execute invalid sql stmt: "selects * from films"
3) execute valid sql stmt: "select * from films". You'll receive an error message (as expected): ERROR: current transaction is aborted, commands ignored until end of transaction block
4) Use "Rollback" icon in Query Analyzer. You'll receive the same error message: ERROR: current transaction is aborted, commands ignored until end of transaction block
At this point in time, the only way to recover is to reconnect so that a new connection is created. This issue exists w/ both the older & newer version of the postgres JDBC driver.
This problem is not specific to FluidShell. It also occurs in Query Analyzer. Simple set of steps to reproduce in Query Analyzer:
1) Turn off AutoCommit using icon in Query Analyzer
2) execute invalid sql stmt: "selects * from films"
3) execute valid sql stmt: "select * from films". You'll receive an error message (as expected): ERROR: current transaction is aborted, commands ignored until end of transaction block
4) Use "Rollback" icon in Query Analyzer. You'll receive the same error message: ERROR: current transaction is aborted, commands ignored until end of transaction block
At this point in time, the only way to recover is to reconnect so that a new connection is created. This issue exists w/ both the older & newer version of the postgres JDBC driver.
Issue #8105 |
New |
Completion |
No due date |
No fixed build |
No time estimate |
1 issue link |
relates to #7941
Issue #7941For Greenplum, If create table GUI encounters server error, transaction is not rolled back correctly. |
This test case turned 'auto commit' off at the very beginning by executing '\autocommit off' command, this will put subsequently executed SQL statements in a transaction. In Greenplum, once an error occurred in a transaction, subsequent SQLs simply won't execute and a 'current transaction is aborted, commands ignored until end of transaction block' error is always reported. When a transaction in an error state, nothing would work, you cannot rollback that transaction, nor turned 'auto commit' back on.
Applying this test case to ADS Query Analyzer, same error can be produced there.
Issue #7941 modified ConnectionSupport.supportDDLRollback() and let it return FALSE if server is Greenplum. This method will return FALSE for Oracle, MySQL, Sybase..., as well. I tried the same test case against Oracle 10g and MySQL 5.0, they don't have problem to handle it.
PostgreSQL seems to be working fine as well against this test case. It seems that this problem is Greenplum specific.
For the time being, for Greenplum server:
(1) user cannot turn 'auto commit' off,
(2) user needs to close FS/Query Analyzer tab if ran into this sort of error.