Ingres and RDMS don't actually support FOR UPDATE

At least not in SELECT statements. They do support it
in DECLARE CURSOR, which is perhaps where the confusion
arose?

Related to HHH-14210
This commit is contained in:
Gavin King 2020-09-11 21:15:17 +02:00 committed by Andrea Boriero
parent 12a31ef438
commit 852786d984
2 changed files with 10 additions and 25 deletions

View File

@ -293,15 +293,16 @@ public class IngresDialect extends Dialect {
// lock acquisition support ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/**
* <TT>FOR UPDATE</TT> only supported for cursors
*
* @return the empty string
*/
@Override
public boolean supportsOuterJoinForUpdate() {
return getVersion() >= 930;
public String getForUpdateString() {
return "";
}
@Override
public boolean forUpdateOfColumns() {
return getVersion() >= 930;
}
// current timestamp support ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@ -222,25 +222,9 @@ public class RDMSOS2200Dialect extends Dialect {
}
/**
* The RDMS DB supports the 'FOR UPDATE OF' clause. However, the RDMS-JDBC
* driver does not support this feature, so a false is return.
* The base dialect also returns a false, but we will leave this over-ride
* in to make sure it stays false.
* <p/>
* {@inheritDoc}
*/
@Override
public boolean forUpdateOfColumns() {
return false;
}
/**
* Since the RDMS-JDBC driver does not support for updates, this string is
* set to an empty string. Whenever, the driver does support this feature,
* the returned string should be " FOR UPDATE OF". Note that RDMS does not
* support the string 'FOR UPDATE' string.
* <p/>
* {@inheritDoc}
* <TT>FOR UPDATE</TT> only supported for cursors
*
* @return the empty string
*/
@Override
public String getForUpdateString() {