mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-17 15:03:18 +00:00
When getMaxTableNameLength returns 0 (no limit) don't try to index a String by -1.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@6019 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
@@ -1391,7 +1391,7 @@ public class DatabaseManager
|
|||||||
Map<String, ColumnInfo> results = new HashMap<String, ColumnInfo>();
|
Map<String, ColumnInfo> results = new HashMap<String, ColumnInfo>();
|
||||||
|
|
||||||
int max = metadata.getMaxTableNameLength();
|
int max = metadata.getMaxTableNameLength();
|
||||||
String tname = (table.length() >= max) ? table
|
String tname = ((max > 0) && (table.length() >= max)) ? table
|
||||||
.substring(0, max - 1) : table;
|
.substring(0, max - 1) : table;
|
||||||
|
|
||||||
pkcolumns = metadata.getPrimaryKeys(catalog, schema, tname);
|
pkcolumns = metadata.getPrimaryKeys(catalog, schema, tname);
|
||||||
|
Reference in New Issue
Block a user