[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-devel] Using binary database for 0.26?
From: |
Christof Petig |
Subject: |
Re: [Monotone-devel] Using binary database for 0.26? |
Date: |
Wed, 18 Jan 2006 09:24:43 +0100 |
User-agent: |
Mozilla Thunderbird 1.0.7 (X11/20051013) |
Timothy Brownawell schrieb:
> [schema_migration.cc]
> +// we could as well use the fact that uuencoded gzip starts with H4sI
> +// but we can not change comments on fields
>
> This comment seems kind of opaque.
Hm. I agree. Unmigrated values have to start with H4sI (uuencoded gzip).
The temporary table stuff is only needed to change the comment on a
column, so if sqlite3 had a way of modifying an comment all would come
down to an UPDATE. This comment only expressed my disappointment with
such a lengthy way to realize "ALTER TABLE COMMENT".
> Why does it need the "WHERE delta like 'H4sI%'" and
> "WHERE length(keydata)>160" conditions on all the UPDATEs?
It should not need any WHERE condition (this condition should apply to
all unmigrated values). But having experienced pgsql updating a row
multiple times I decided to play safe. Those experiences are many years
ago and IIRC this is in violation of the SQL standard (?) but I did not
trust sqlite3 fully, yet. My fears seem to be unneeded according to my
experience.
We could drop all where conditions as well, to make the intent more clear?
> (In particular the length ones. Even if monotone doesn't normally
> generate keys that big, does it require that they're not? Could someone
> have modified it to generate longer keys (so the not-base64 version
> would still be longer than 160), and would that be interoperable?)
Since migrate_schema would only be called once on the table it should
not hurt.
> tests/t_migrate_schema.at hasn't been updated.
Sorry. The test passed, so I didn't know about it. Will add one.
Christof
signature.asc
Description: OpenPGP digital signature