HHH-13373 fix the bug that 'different sequence names in differnt dbs' breaks SequenceInformationExtractorMariaDBDatabaseImpl

This commit is contained in:
Nathan Xu 2019-12-13 20:00:55 -05:00 committed by Andrea Boriero
parent 4318349b4d
commit 8fb35947ff

View File

@ -14,7 +14,7 @@
/** /**
* An SQL dialect for MariaDB 10.3 and later, provides sequence support, lock-timeouts, etc. * An SQL dialect for MariaDB 10.3 and later, provides sequence support, lock-timeouts, etc.
* *
* @author Philippe Marschall * @author Philippe Marschall
*/ */
public class MariaDB103Dialect extends MariaDB102Dialect { public class MariaDB103Dialect extends MariaDB102Dialect {
@ -57,7 +57,7 @@ public String getSelectSequenceNextValString(String sequenceName) {
@Override @Override
public String getQuerySequencesString() { public String getQuerySequencesString() {
return "select table_name from information_schema.TABLES where table_type='SEQUENCE'"; return "select table_name from information_schema.TABLES where table_schema = database() and table_type = 'SEQUENCE'";
} }
@Override @Override