Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions java/src/main/java/com/genexus/db/DataStoreProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -274,9 +274,7 @@ private void execute(int cursorIdx, Object[] parms, boolean preExecute)
cursor.status = 0;
try
{
executeSavePointOperation("SAVEPOINT gxselectforupdate", cursor);
cursor.postExecute(this, getDataSource());
executeSavePointOperation("RELEASE SAVEPOINT gxselectforupdate", cursor);
}
catch (SQLException e)
{
Expand Down Expand Up @@ -346,7 +344,6 @@ private void execute(int cursorIdx, Object[] parms, boolean preExecute)
{
}
}
executeSavePointOperation("ROLLBACK TO SAVEPOINT gxselectforupdate", cursor);
}
}
retryCount = retryCount + 1;
Expand Down Expand Up @@ -432,23 +429,6 @@ private void setParameters(int cursorIdx, Object[] parms, Cursor cursor,
}
}


private void executeSavePointOperation(String operation, Cursor cursor)
{
if (getDataSource().dbms.getId() == GXDBMS.DBMS_POSTGRESQL && GXutil.dbmsVersion( context, remoteHandle, getDataSource().name) > 7 && cursor instanceof ForEachCursor && cursor.isCurrentOf())
{
try
{
SentenceProvider.executeStatement(this, operation);
}
catch (Exception ex)
{
System.err.println(operation + " error " + ex.getMessage());
ex.printStackTrace();
}
}
}

static Object lock = new Object();

public void readNext(int cursorIdx)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ public static void handleSQLError1(IErrorHandler errorHandler, SQLException e, M
}
if (!context.inErrorHandler)
{
if (e.getCause() != null && e.getCause() instanceof SQLException)
e = ((SQLException)e.getCause());
if (errorHandler != null)
{
context.globals.Gx_err = (short) cursor.status;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,10 @@ public boolean DuplicateKeyValue(SQLException e)
public boolean ObjectLocked(SQLException e)
{
String sqlstate = e.getSQLState().toLowerCase();
if (sqlstate.indexOf("55p03")>=0)
return true;
return false;
String sqlstateCause = "";
if (e.getCause() != null && e.getCause() instanceof SQLException)
sqlstateCause = ((SQLException)e.getCause()).getSQLState().toLowerCase();
return sqlstate.contains("55p03") || sqlstateCause.contains("55p03");
}

public boolean ObjectNotFound(SQLException e)
Expand Down