Daniel Shahaf wrote on Sun, Jun 26, 2011 at 15:40:04 +0300:
> Hyrum K Wright wrote on Sat, Jun 25, 2011 at 21:11:28 -0500:
> > On Sat, Jun 25, 2011 at 7:26 PM, Daniel Shahaf <d.s_at_daniel.shahaf.name> wrote:
> > > Arfrever Frehtes Taifersar Arahesis wrote on Sat, Jun 25, 2011 at 21:16:31 +0200:
> > >> svn: E200030: database schema has changed, executing statement 'PRAGMA case_sensitive_like=1;PRAGMA synchronous=OFF;PRAGMA recursive_triggers=ON;'
> > >>
> > >
> > > client-test fails with the same error.
> > >
> > >> Subversion works after downgrade of SQLite to 3.7.6.3.
> >
> > Can we come up with a reproducible minimum case to send upstream to
> > the SQLite devs? I suspect they'd be interested, as this release
> > shouldn't have broken any kind of compatibility. (I can work on it
> > Monday if nobody beats me to it.)
>
> Dropping the CASE_SENSITIVE_LIKE pragma cases the issue to go away.
>
Here's an example program:
[[[
#include <assert.h>
#include <stdio.h>
#include "sqlite3.h"
#define BUSY_TIMEOUT 10000
int main(void)
{
sqlite3 *db3;
const char *path = "foo.db";
int flags = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE;
#ifdef SQLITE_OPEN_NOMUTEX
flags |= SQLITE_OPEN_NOMUTEX;
#endif
assert(SQLITE_OK == sqlite3_open_v2(path, &db3, flags, NULL));
assert(SQLITE_OK == sqlite3_busy_timeout(db3, BUSY_TIMEOUT));
assert(SQLITE_OK == sqlite3_busy_timeout(db3, BUSY_TIMEOUT));
{
char *errmsg;
int err = sqlite3_exec(db3, "PRAGMA case_sensitive_like=1;", NULL, NULL, &errmsg);
if (err != SQLITE_OK)
printf("Error %d: %s\n", err, errmsg), sqlite3_free(errmsg);
}
return 0;
}
]]]
Compiling it:
[[[
for i in 3.7.6.3 3.7.7; do
gcc -I sqlite-$i -W -Wall -ldl -lpthread -o foo-$i foo.c sqlite-$i/sqlite3.c
done
]]]
Running it:
[[[
% for i in foo-*; do echo ./$i; ./$i; done
./foo-3.7.6.3
./foo-3.7.7
Error 17: database schema has changed
%
]]]
> >
> > -Hyrum
Received on 2011-06-26 15:21:46 CEST