Skip to content

Commit

Permalink
increment key can not be null
Browse files Browse the repository at this point in the history
  • Loading branch information
junwen12221 committed Jun 13, 2022
1 parent 21ea4a8 commit 656fdb9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions common/src/main/java/io/mycat/SimpleColumnInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ public SimpleColumnInfo(@NonNull String columnName, int precision, int scale, @N
nullable = false;
}

//自增键不能为null
if (autoIncrement){
nullable = false;
}

this.jdbcType = jdbcType;
this.nullable = nullable;
this.autoIncrement = autoIncrement;
Expand Down

0 comments on commit 656fdb9

Please sign in to comment.