[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Monotone-devel] mtn: error: sqlite error: unable to open database file
From: |
Ludovic Brenta |
Subject: |
[Monotone-devel] mtn: error: sqlite error: unable to open database file on Cygwin |
Date: |
Mon, 12 Feb 2007 14:42:16 +0100 |
User-agent: |
Mutt/1.5.11 |
Hi all
On Cygwin, in a bash shell:
$ mtn --version
monotone 0.32 (base revision: unknown)
$ mtn --debug db init -d d.mtn # file does not exist yet
[...]
mtn: executing command 'db'
mtn: executing SQL
'SELECT sql FROM sqlite_master
WHERE (type = 'table' OR type = 'index')
AND sql IS NOT NULL
AND name not like 'sqlite_stat%'
ORDER BY name'
mtn: result: 14 (unable to open database file)
mtn: calculate_schema_id sqlite error: 14: unable to open database file
mtn: executing SQL 'ROLLBACK'
mtn: result: 1 (cannot rollback - no transaction is active)
mtn: /home/lapo/packaging/tmp/monotone-0.32/schema_migration.cc:206:
detected error 'E(false)' violated
mtn: statement cache statistics
mtn: prepared 0 statements
mtn: error: sqlite error: unable to open database file
Also:
$ mtn db -d d.mtn execute 'select count(*) from sqlite_master';
mtn: error: sqlite error: unable to open database file
(I reindented for better legibility)
This only happens when I run as an unprivileged user on Windows, even
though I have "full control" on the current and $TMP directories. If
I run as administrator on the local machine, I get no such error. So,
what privileges does monotone require on the database? This is not a
SQLite problem, because
- I can create a new database with a table and insert rows in it just
fine, using the sqlite3 command line tool.
- After getting the above error, I can see the tables in the new
database, again using sqlite3 directly:
C:\.... > sqlite3 d.mtn
sqlite> select count(*) from sqlite_master
...> where (type = 'table' OR type = 'index') and sql IS NOT NULL
...> AND name not like 'sqlite_stat%';
18
sqlite> select * from sqlite_master;
table|files|files|2|CREATE TABLE files
(
id primary key, -- strong hash of file contents
data not null -- compressed contents of a file
)
index|sqlite_autoindex_files_1|files|3|
table|file_deltas|file_deltas|4|CREATE TABLE file_deltas
(
id not null, -- strong hash of file contents
base not null, -- joins with files.id or file_deltas.id
delta not null, -- compressed rdiff to construct current from base
unique(id, base)
)
index|sqlite_autoindex_file_deltas_1|file_deltas|5|
table|manifests|manifests|6|CREATE TABLE manifests
(
id primary key, -- strong hash of all the entries in a manifest
data not null -- compressed, encoded contents of a manifest
)
index|sqlite_autoindex_manifests_1|manifests|7|
table|manifest_deltas|manifest_deltas|8|CREATE TABLE manifest_deltas
(
id not null, -- strong hash of all the entries in a manifest
base not null, -- joins with either manifest.id or manifest_deltas
.id
delta not null, -- rdiff to construct current from base
unique(id, base)
)
index|sqlite_autoindex_manifest_deltas_1|manifest_deltas|9|
table|revisions|revisions|10|CREATE TABLE revisions
(
id primary key, -- SHA1(text of revision)
data not null -- compressed, encoded contents of a revision
)
index|sqlite_autoindex_revisions_1|revisions|11|
table|revision_ancestry|revision_ancestry|12|CREATE TABLE
revision_ancestry
(
parent not null, -- joins with revisions.id
child not null, -- joins with revisions.id
unique(parent, child)
)
index|sqlite_autoindex_revision_ancestry_1|revision_ancestry|13|
table|heights|heights|14|CREATE TABLE heights
(
revision not null, -- joins with revisions.id
height not null, -- complex height, array of big endian u32
integers
unique(revision, height)
)
index|sqlite_autoindex_heights_1|heights|15|
table|rosters|rosters|16|CREATE TABLE rosters
(
id primary key, -- a revision id
checksum not null, -- checksum of 'data', to protect against disk
c orruption
data not null -- compressed, encoded contents of the roster
)
index|sqlite_autoindex_rosters_1|rosters|17|
table|roster_deltas|roster_deltas|18|CREATE TABLE roster_deltas
(
id primary key, -- a revision id
checksum not null, -- checksum of 'delta', to protect against disk
corruption
base not null, -- joins with either rosters.id or roster_deltas
.id
delta not null -- rdiff to construct current from base
)
index|sqlite_autoindex_roster_deltas_1|roster_deltas|19|
table|next_roster_node_number|next_roster_node_number|20|CREATE TABLE
next_roste
r_node_number
(
node primary key -- only one entry in this table, ever
)
index|sqlite_autoindex_next_roster_node_number_1|next_roster_node_number|21|
index|revision_ancestry__child|revision_ancestry|22|CREATE INDEX
revision_ancestry__child ON revision_ancestry (child)
table|public_keys|public_keys|23|CREATE TABLE public_keys
(
hash not null unique, -- hash of remaining fields separated by ":"
id primary key, -- key identifier chosen by user
keydata not null -- RSA public params
)
index|sqlite_autoindex_public_keys_1|public_keys|24|
index|sqlite_autoindex_public_keys_2|public_keys|25|
table|manifest_certs|manifest_certs|26|CREATE TABLE manifest_certs
(
hash not null unique, -- hash of remaining fields separated by ":"
id not null, -- joins with manifests.id or manifest_deltas.id
name not null, -- opaque string chosen by user
value not null, -- opaque blob
keypair not null, -- joins with public_keys.id
signature not null, -- RSA/SHA1 signature of "address@hidden:val]"
unique(name, id, value, keypair, signature)
)
index|sqlite_autoindex_manifest_certs_1|manifest_certs|27|
index|sqlite_autoindex_manifest_certs_2|manifest_certs|28|
table|revision_certs|revision_certs|29|CREATE TABLE revision_certs
(
hash not null unique, -- hash of remaining fields separated by ":"
id not null, -- joins with revisions.id
name not null, -- opaque string chosen by user
value not null, -- opaque blob
keypair not null, -- joins with public_keys.id
signature not null, -- RSA/SHA1 signature of "address@hidden:val]"
unique(name, id, value, keypair, signature)
)
index|sqlite_autoindex_revision_certs_1|revision_certs|30|
index|sqlite_autoindex_revision_certs_2|revision_certs|31|
index|revision_certs__id|revision_certs|32|CREATE INDEX
revision_certs__id ON revision_certs (id)
index|revision_certs__name_value|revision_certs|33|CREATE INDEX
revision_certs__name_value ON revision_certs (name, value)
table|branch_epochs|branch_epochs|34|CREATE TABLE branch_epochs
(
hash not null unique, -- hash of remaining fields separated by
":"
branch not null unique, -- joins with revision_certs.value
epoch not null -- random hex-encoded id
)
index|sqlite_autoindex_branch_epochs_1|branch_epochs|35|
index|sqlite_autoindex_branch_epochs_2|branch_epochs|36|
table|db_vars|db_vars|37|CREATE TABLE db_vars
(
domain not null, -- scope of application of a var
name not null, -- var key
value not null, -- var value
unique(domain, name)
)
index|sqlite_autoindex_db_vars_1|db_vars|38|
--
Ludovic Brenta.
- [Monotone-devel] mtn: error: sqlite error: unable to open database file on Cygwin,
Ludovic Brenta <=