提交 be2326c6 authored 作者: Thomas Mueller's avatar Thomas Mueller

For foreign key constraints, the metadata column…

For foreign key constraints, the metadata column INFORMATION_SCHEMA.INDEXES.CONSTRAINT_NAME was not set for non-unique indexes.
上级 0e5417b3
......@@ -733,7 +733,7 @@ public class MetaTable extends Table {
String constraintName = null;
for (int k = 0; constraints != null && k < constraints.size(); k++) {
Constraint constraint = constraints.get(k);
if (constraint.getUniqueIndex() == index) {
if (constraint.usesIndex(index)) {
if (index.getIndexType().isPrimaryKey()) {
if (constraint.getConstraintType().equals(Constraint.PRIMARY_KEY)) {
constraintName = constraint.getName();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论