Commit 47f14153 authored by JINMEI Tatuya's avatar JINMEI Tatuya

[1891] reject attempt of deleting NSEC3 before start transaction.

parent 9a4619a0
......@@ -1197,8 +1197,10 @@ void
const string (&params)[DEL_PARAM_COUNT])
// TBD: no transaction check
if (!dbparameters_->updating_zone) {
isc_throw(DataSourceError, "deleting NSEC3-related record in SQLite3 "
"data source without transaction");
doUpdate<const string (&)[DEL_PARAM_COUNT]>(
*dbparameters_, DEL_NSEC3_RECORD, params,
"delete NSEC3 record from zone");
......@@ -1180,6 +1180,10 @@ TEST_F(SQLite3Update, deleteNonexistent) {
TEST_F(SQLite3Update, invalidDelete) {
// An attempt of delete before an explicit start of transaction
EXPECT_THROW(accessor->deleteRecordInZone(del_params), DataSourceError);
// Same for NSEC3.
TEST_F(SQLite3Update, emptyTransaction) {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment