Bug 1549912 Comment 6 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

I was looking into my permissions.sqlite, and I think I found the cause.

```
sqlite> pragma user_version;
9
```

A new profile results in `10`.

STR:
1) create a new profile
2) go to about:preferences#privacy-sitedata -> Manage Permissions
3) add "https://www.mozilla.org/" then Allow then Save Changes
4) quit firefox
5) run `sqlite permissions.sqlite "pragma user_version=9"
6) start firefox go back to about:preferences#privacy-sitedata -> Manage Permissions
7) see no permissions

For my permissions.sqlite from my profile that's been around for years.. even after clearing out the data:
```
$ sqlite3 permissions.sqlite .dump
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE IF NOT EXISTS "moz_perms_v6" ( id INTEGER PRIMARY KEY,origin TEXT,type TEXT,permission INTEGER,expireType INTEGER,expireTime INTEGER,modificationTime INTEGER);
CREATE TABLE IF NOT EXISTS "moz_perms" ( id INTEGER PRIMARY KEY,origin TEXT,type TEXT,permission INTEGER,expireType INTEGER,expireTime INTEGER,modificationTime INTEGER);
COMMIT;

$ sqlite3 permissions.sqlite "PRAGMA user_version"
9
```
I was looking into my permissions.sqlite, and I think I found the cause.

```
sqlite> pragma user_version;
9
```

A new profile results in `10`.

STR:
1) create a new profile
2) go to about:preferences#privacy-sitedata -> Manage Permissions
3) add "https://www.mozilla.org/" then Allow then Save Changes
4) quit firefox
5) run `sqlite permissions.sqlite "pragma user_version=9"
6) start firefox go back to about:preferences#privacy-sitedata -> Manage Permissions
7) see no permissions

For my permissions.sqlite from my profile that's been around for years.. even after clearing out the data, I see the regression, so it seems to be independent of table contents/data:
```
$ sqlite3 permissions.sqlite .dump
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE IF NOT EXISTS "moz_perms_v6" ( id INTEGER PRIMARY KEY,origin TEXT,type TEXT,permission INTEGER,expireType INTEGER,expireTime INTEGER,modificationTime INTEGER);
CREATE TABLE IF NOT EXISTS "moz_perms" ( id INTEGER PRIMARY KEY,origin TEXT,type TEXT,permission INTEGER,expireType INTEGER,expireTime INTEGER,modificationTime INTEGER);
COMMIT;

$ sqlite3 permissions.sqlite "PRAGMA user_version"
9
```
I was looking into my permissions.sqlite, and I think I found the cause.

```
sqlite> pragma user_version;
9
```

A new profile results in `10`.

~STR:~
~1) create a new profile~
~2) go to about:preferences#privacy-sitedata -> Manage Permissions~
~3) add "https://www.mozilla.org/" then Allow then Save Changes~
~4) quit firefox~
~5) run `sqlite permissions.sqlite "pragma user_version=9"~
~6) start firefox go back to about:preferences#privacy-sitedata -> Manage Permissions~
~7) see no permissions~

For my permissions.sqlite from my profile that's been around for years.. even after clearing out the data, I see the regression, so it seems to be independent of table contents/data:
```
$ sqlite3 permissions.sqlite .dump
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE IF NOT EXISTS "moz_perms_v6" ( id INTEGER PRIMARY KEY,origin TEXT,type TEXT,permission INTEGER,expireType INTEGER,expireTime INTEGER,modificationTime INTEGER);
CREATE TABLE IF NOT EXISTS "moz_perms" ( id INTEGER PRIMARY KEY,origin TEXT,type TEXT,permission INTEGER,expireType INTEGER,expireTime INTEGER,modificationTime INTEGER);
COMMIT;

$ sqlite3 permissions.sqlite "PRAGMA user_version"
9
```

Back to Bug 1549912 Comment 6