fix bug when load data into table partitioned by columns containing auto-inc value

This commit is contained in:
wjhh2008
2023-04-03 14:14:31 +00:00
committed by ob-robot
parent 5d8cb11b64
commit 0765e69043
2 changed files with 15 additions and 2 deletions

View File

@ -1447,7 +1447,11 @@ int ObAutoincrementService::calc_prev_value(const uint64_t max_value,
if (max_value <= offset) {
prev_value = max_value;
} else {
prev_value = ((max_value - offset) / increment) * increment + offset;
if (0 == increment) {
ret = OB_ERR_UNEXPECTED;
} else {
prev_value = ((max_value - offset) / increment) * increment + offset;
}
}
LOG_INFO("out of range for column. calc prev value",
K(prev_value), K(max_value), K(offset), K(increment));