Skip to content
This repository was archived by the owner on Sep 27, 2019. It is now read-only.

Commit ad6f26b

Browse files
Tianyi Chenapavlo
authored andcommitted
revert the constraint violation exception in my.
1 parent f7f56f0 commit ad6f26b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/storage/data_table.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,14 +318,14 @@ bool DataTable::InstallVersion(const AbstractTuple *tuple,
318318
ItemPointer *index_entry_ptr) {
319319
if (CheckConstraints(tuple) == false) {
320320
LOG_TRACE("InsertVersion(): Constraint violated");
321-
throw Exception("Constraint violated");
321+
return false;
322322
}
323323

324324
// Index checks and updates
325325
if (InsertInSecondaryIndexes(tuple, targets_ptr, transaction,
326326
index_entry_ptr) == false) {
327327
LOG_TRACE("Index constraint violated");
328-
throw Exception("Constraint violated");
328+
return false;
329329
}
330330
return true;
331331
}

0 commit comments

Comments
 (0)