Merge "Implement postgres, fixes to eventual, and many bug fixes"
authorBrendan Tschaen <ctschaen@att.com>
Wed, 15 May 2019 15:08:05 +0000 (15:08 +0000)
committerGerrit Code Review <gerrit@onap.org>
Wed, 15 May 2019 15:08:05 +0000 (15:08 +0000)
1  2 
mdbc-server/src/main/java/org/onap/music/mdbc/MdbcConnection.java

@@@ -505,9 -500,10 +500,10 @@@ public class MdbcConnection implements 
      public void preStatementHook(final String sql) throws MDBCServiceException, SQLException {
          //TODO: verify ownership of keys here
          //Parse tables from the sql query
 -        Map<String, List<SQLOperation>> tableToInstruction = QueryProcessor.parseSqlQuery(sql);
 +        Map<String, List<SQLOperation>> tableToInstruction = QueryProcessor.parseSqlQuery(sql, table_set);
          //Check ownership of keys
-         List<Range> queryTables = MDBCUtils.getTables(tableToInstruction);
+         String defaultSchema = dbi.getSchema();
+         List<Range> queryTables = MDBCUtils.getTables(defaultSchema, tableToInstruction);
          if (this.partition!=null) {
              List<Range> snapshot = this.partition.getSnapshot();
              if(snapshot!=null){