Great. This fixes this particular case. :)
I tried a few different permutations. This one throws a very weird error:
CREATE TABLE TestTable (
id integer primary key,
name varchar,
source_id integer not null,
parent_id integer,
foreign key(source_id, parent_id) references TestTable(source_id, id)
);
CREATE UNIQUE INDEX testindex on TestTable(source_id, id);
PRAGMA foreign_keys=1;
INSERT INTO TestTable VALUES (1, 'Parent', 1, null);
INSERT INTO TestTable VALUES (2, 'Child', 1, 1);
UPDATE TestTable SET parent_id=1000 where id=2;
I shouldn't be able to do that update because I'm setting the parent_id
to a non existent parent.
I get this error:
Error: near line 15: database disk image is malformed
I am starting from a non existent database. With 3.7.4, it (wrongly)
allows the change.
On 11-06-10 12:35 PM, Dan Kennedy wrote:
> On 06/10/2011 10:33 PM, Max wrote:
>> I just grabbed a 3.7.6.3 binary from the sqlite page. The second schema
>> still fails to throw a constraint error.
> Hopefully fixed here:
>
> http://www.sqlite.org/src/info/442d8d8bfe
>
> Grab the zip file from the "Zip Archive" link on the above page.
>
> Dan.
>
>
> _______________________________________________
> sqlite-users mailing list
> [email protected]
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users