Opened 8 years ago

Closed 8 years ago

#1717 closed defect (fixed)

missing diffs table in database

Reported by: jelte Owned by: jelte
Priority: medium Milestone: Sprint-20120306
Component: data source Version:
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: DNS Feature Depending on Ticket:
Estimated Difficulty: 0 Add Hours to Ticket: 0
Total Hours: 0 Internal?: no

Description

As reported on the users list, sometimes there is a table missing from the database on new installs.

It looks as though it is a reflection of the move to the new datasource API; we still have the old one in the code, because it is still used in a few places.

This old one never got the new table, so what I think happens is that sometimes, on first startup, the old implementation just happens to get hit first, and creates the database without the new table.

Of course the real solution is to hunt down and remove the final few places where the old API is still used, but in the meantime, a quick fix would be to simply add the diffs table to the create statements in sqlite3_datasrc.cc

Putting the 'trivial' fix in here, I think it is pretty trivial (just look at the sqlite3_accessor.cc file from which I copied it)

Subtickets

Change History (5)

comment:1 follow-up: Changed 8 years ago by jelte

  • Owner set to UnAssigned
  • Status changed from new to reviewing

Copied the diffs table creation to the old datasource implementation. Since the old api doesn't actually make use of this (and we need to get rid of it), I don't really think it needs unit testing, and the change is quite trivial)

(note: we would have probably run into this much earlier had we actually increased the schema version value)

Proposed changelog:

[bug] jelte
Upon initial sqlite3 database creation, the 'diffs' table is now always created. This already happened most of the time, but there are a few cases where it was skipped, resulting in potential errors in xfrout later.
(Trac #1717, git X)

Last edited 8 years ago by jelte (previous) (diff)

comment:2 Changed 8 years ago by jaspain

Commenting here to receive updates by email. See https://lists.isc.org/pipermail/bind10-users/2012-February/000256.html. Retest with next release.

Last edited 8 years ago by jaspain (previous) (diff)

comment:3 in reply to: ↑ 1 Changed 8 years ago by jinmei

Replying to jelte:

Copied the diffs table creation to the old datasource implementation. Since the old api doesn't actually make use of this (and we need to get rid of it), I don't really think it needs unit testing, and the change is quite trivial)

It looks okay.

comment:4 Changed 8 years ago by jinmei

  • Owner changed from UnAssigned to jelte

comment:5 Changed 8 years ago by jelte

  • Resolution set to fixed
  • Status changed from reviewing to closed

Thanks, merged this to master, closing ticket.

Note: See TracTickets for help on using tickets.