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

View File

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

View File

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