[ofbiz-framework] branch release17.12 updated: Fixed: DatabaseUtil::getColumnInfo does not retrieve PK due to connection-locks (OFBIZ-11312)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[ofbiz-framework] branch release17.12 updated: Fixed: DatabaseUtil::getColumnInfo does not retrieve PK due to connection-locks (OFBIZ-11312)

jleroux@apache.org
This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch release17.12
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/release17.12 by this push:
     new 6622277  Fixed: DatabaseUtil::getColumnInfo does not retrieve PK due to connection-locks (OFBIZ-11312)
6622277 is described below

commit 6622277585bff8dbb65067028d2c01a0ac8b30f3
Author: Jacques Le Roux <[hidden email]>
AuthorDate: Sat Jul 4 11:52:19 2020 +0200

    Fixed: DatabaseUtil::getColumnInfo does not retrieve PK due to connection-locks (OFBIZ-11312)
   
    I wrongly removed a line when backporting by hand
---
 .../entity/src/main/java/org/apache/ofbiz/entity/jdbc/DatabaseUtil.java  | 1 +
 1 file changed, 1 insertion(+)

diff --git a/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/DatabaseUtil.java b/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/DatabaseUtil.java
index b108a41..a264be6 100644
--- a/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/DatabaseUtil.java
+++ b/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/DatabaseUtil.java
@@ -1161,6 +1161,7 @@ public class DatabaseUtil {
                     if (pkCount == 0) {
                         Debug.logInfo("Searching in " + tableNames.size() + " tables for primary key fields ...", module);
                         for (String curTable: tableNames) {
+                            curTable = curTable.substring(curTable.indexOf('.') + 1); //cut off schema name
                             try (ResultSet rsPks = dbData.getPrimaryKeys(null, lookupSchemaName, curTable)) {
                                 pkCount += checkPrimaryKeyInfo(rsPks, lookupSchemaName, needsUpperCase, colInfo, messages);
                             } catch (Exception e1) {