HHH-12534: SAP HANA dialects use unqualified dummy table in queries

This commit is contained in:
Jonathan Bregler 2018-04-30 21:56:04 +02:00 committed by Vlad Mihalcea
parent 2b18e0efa5
commit da14797ba8
3 changed files with 9 additions and 9 deletions

View File

@ -1025,7 +1025,7 @@ public abstract class AbstractHANADialect extends Dialect {
@Override @Override
public String getCurrentTimestampSelectString() { public String getCurrentTimestampSelectString() {
return "select current_timestamp from dummy"; return "select current_timestamp from sys.dummy";
} }
@Override @Override
@ -1099,7 +1099,7 @@ public abstract class AbstractHANADialect extends Dialect {
@Override @Override
public String getSequenceNextValString(final String sequenceName) { public String getSequenceNextValString(final String sequenceName) {
return "select " + getSelectSequenceNextValString( sequenceName ) + " from dummy"; return "select " + getSelectSequenceNextValString( sequenceName ) + " from sys.dummy";
} }
@Override @Override
@ -1314,7 +1314,7 @@ public abstract class AbstractHANADialect extends Dialect {
@Override @Override
public String getSelectGUIDString() { public String getSelectGUIDString() {
return "select sysuuid from dummy"; return "select sysuuid from sys.dummy";
} }
@Override @Override
@ -1404,7 +1404,7 @@ public abstract class AbstractHANADialect extends Dialect {
@Override @Override
public String getCurrentSchemaCommand() { public String getCurrentSchemaCommand() {
return "select current_schema from dummy"; return "select current_schema from sys.dummy";
} }
@Override @Override

View File

@ -52,7 +52,7 @@ public class SequenceValueExtractor {
} }
else if ( dialect instanceof AbstractHANADialect ) { else if ( dialect instanceof AbstractHANADialect ) {
queryString = "select " + sequenceName + ".currval from dummy"; queryString = "select " + sequenceName + ".currval from sys.dummy";
} }
else { else {
queryString = "select currval('" + sequenceName + "');"; queryString = "select currval('" + sequenceName + "');";

View File

@ -144,7 +144,7 @@ public class HANAStoredProcedureTest extends BaseEntityManagerFunctionalTestCase
" BEGIN " + " BEGIN " +
" p_recordset = " + " p_recordset = " +
" SELECT 1 as id " + " SELECT 1 as id " +
" FROM DUMMY; " + " FROM SYS.DUMMY; " +
" END; " ); " END; " );
statement.executeUpdate( statement.executeUpdate(
"CREATE OR REPLACE " + "CREATE OR REPLACE " +
@ -152,8 +152,8 @@ public class HANAStoredProcedureTest extends BaseEntityManagerFunctionalTestCase
" BEGIN " + " BEGIN " +
" p_recordset = " + " p_recordset = " +
" SELECT 1 as id " + " SELECT 1 as id " +
" FROM DUMMY; " + " FROM SYS.DUMMY; " +
" SELECT 1 INTO p_value FROM DUMMY; " + " SELECT 1 INTO p_value FROM SYS.DUMMY; " +
" END; " ); " END; " );
} }
finally { finally {
@ -365,7 +365,7 @@ public class HANAStoredProcedureTest extends BaseEntityManagerFunctionalTestCase
try { try {
Integer phoneCount = (Integer) entityManager Integer phoneCount = (Integer) entityManager
.createNativeQuery( "SELECT fn_count_phones(:personId) FROM DUMMY" ) .createNativeQuery( "SELECT fn_count_phones(:personId) FROM SYS.DUMMY" )
.setParameter( "personId", 1 ) .setParameter( "personId", 1 )
.getSingleResult(); .getSingleResult();
assertEquals( Integer.valueOf( 2 ), phoneCount ); assertEquals( Integer.valueOf( 2 ), phoneCount );