[feladat @ 84]
Bugfix. The function zone_count() now also counts zones an owner has
only partial access to, not just those zones the owner has full access
to. This fixes just the count, the zones a user has partial access to
are not (yet!) shown in the "list zones" page.
Bugfix. In the zone listing the "edit" button is now show for users
with access level 1. Untill now they were presented an overview of the
zones they could change, but there was no link for them to actually
edit the zone.
Bugfix. Some of the buttons in the "edit zone" interface that are of
no use to a user with access level 1 have been hidden.
Bugfix. Make sure a user with access level 1 with only partial access
to a zone cannot add new records to that zone. Only the zone owner
should be able to add new record.
Bugfix. If a user with access level 1 edits a record in a zone he has
only partial access to, an error was shown because of call to a non-
existing function in the PEAR:MDB2. This bug was most likely
introduced while migrating from PEAR:DB to PEAR:MDB2.
Bugfix. A user with access level 1 was able to delete all records of a
zone he has only partial access to. Some additional checks have been
added.
Bugfix. If a user with accees level 1 has partial access to one or
more zones starting with a certain character, but did not own at least
one entire zone starting with the same character, the character wasn't
clickable in the "list zone" page.
Interface. If no record or zone id is given for delete_record.php or
delete_domain.php, don't just die but echo a nice message. The i18n
files have not yet been updated to reflect this change.
Interface. If no master IP is given in delete_supermaster.php, don't
just die but echo a nice message. The i18n files have not yet been
updated to reflect this change.
[All fixes by Peter Beernink.]
README.sequence - Additional documentation on manual inserts (using
poweradmin along with other interfaces to the powerdns database).
Removal of "sequence updater"
-----------------------------------------------------------------------
Up to poweradmin version 1.2.7-patched, the code included the so
called "sequence updater". It was written to synchronize poweradmin
with the database after manual inserts of zones and records. This
happens if you insert new zones or records by hand, or have other
interfaces than poweradmin talking to the database as well.
The 1.2.7-patched version of poweradmin was using the PEAR::DB module,
using it's nextID() function. It tells the application what will be
the next ID for insertion. However, mysql has "auto_increment" and
pgsql has "serial". Both allow to do insert with ID's created on the
run, without the need of seperate sequence numbers.
In order to get rid of the incidental errors and the need to hit the
"synchronize database" from time to time, the "sequence updater" has
been removed and the code has been updated to use the "auto_increment"
and "serial" functionality. As long as you do manual inserts the
correct way, this will not cause any problems.
Insert new records and zones the correct way (using other tools)
-----------------------------------------------------------------------
According to the documentation of powerdns (2.9.20), the id column of
the tables domains and records in a mysql setup are created using the
"auto_increment" option and in a pgsql setup using the "serial"
option. [1]
This will allow for auto increments of the id field, as long as no one
does a manual insert, specifying the id. So, let's say we have created
a table, one in mysql, one in pgsql:
CREATE TABLE xmpl_tbl (id INT auto_increment, text TEXT);
CREATE TABLE xmpl_tbl (id SERIAL PRIMARY KEY, text TEXT);
This insert will work in pgsql only:
INSERT INTO xmpl_tbl VALUES (DEFAULT,'First insert test");
These inserts will work in mysql only:
INSERT INTO xmpl_tbl VALUES (NULL,'Third insert test");
INSERT INTO xmpl_tbl VALUES ('','Fourth insert test");
This will work in both mysql and pgsql (as long as id didn't exist
already), but it will break "auto increment" feature in pgsql [2] (can
be fixed using setval() functionality in pgsql):
INSERT INTO xmpl_tbl VALUES (42,'Fifth insert test");
This will work in both mysql and pgsql:
INSERT INTO xmpl_tbl (text) VALUES ('Second insert test");
So, in other words: if you want to insert records and zones into the
powerdns database using other tools and interfaces than poweradmin,
you should make sure you are using the correct syntax.
Limitations
-----------------------------------------------------------------------
Removing the "sequence updater" removes the possibilty to use the
poweradmin code against other databases than mysql and pgsql (or at
least, it is untested).
More information
-----------------------------------------------------------------------
More information can be found here:
- PowerDNS manual, section backends in detail
<http://downloads.powerdns.com/documentation/html/generic-mypgsql-backends.html>
- Postgresql documentation, section Operational Questions
<http://www.postgresql.org/files/documentation/books/aw_pgsql/node196.html#SECTION0029916000000000000000>
- pgsql-bugs mailinglist archive
<http://archives.postgresql.org/pgsql-bugs/2004-11/msg00340.php>
<http://archives.postgresql.org/pgsql-bugs/2004-11/msg00344.php>