[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: SQL indices a WC format bump and 1.7

From: Branko Čibej <brane_at_xbc.nu>
Date: Mon, 03 Oct 2011 20:53:31 +0200

On 03.10.2011 11:03, Philip Martin wrote:
> Branko Čibej <brane_at_xbc.nu> writes:
>
>> On 02.09.2011 22:56, Greg Stein wrote:
>>> On Fri, Sep 2, 2011 at 13:18, Mark Phippard <markphip_at_gmail.com> wrote:
>>>> Pardon my ignorance, but in a scenario like this where we want to just
>>>> change some of the indexes, aren't we able to just bump the WC format
>>>> on the fly automatically? IOW, can't we just make a format 30 with
>>>> all these index changes and have it automatically upgrade any format
>>>> 29 WC it comes across?
>>> We cannot bump the format during the 1.7.x series because 1.7.0 would
>>> not understand format N+1 produced by (say) 1.7.2.
>>>
>>> One thing that we could do: have 1.7.x "understand" all formats from
>>> 29 through 39. We only make changes that are both forward and backward
>>> compatible (e.g. presence/absence of an index does not affect 1.7.x
>>> from using the wc.db). For 1.8.0, we autobump to format 40 with our
>>> various changes.
>>>
>> Wouldn't it just be easier to look at the actual database to see if the
>> indexes are there. Adding an index does not change the database schema,
>> only query performance (hopefully for the better). Therefore it doesn't
>> require a format bump.
> The SQL that would have made use of the index is probably broken (I'm
> not enough of an SQLite expert to say for sure).

Oh, that query is broken, certainly. One should never use GROUP BY and
expect to get consistent values in the grouped fields.

Just pointing out that adding (or even removing) an index does not
require a wc-db version bump.

-- Brane
Received on 2011-10-03 20:54:12 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.