SQLite

View Ticket
Login
Ticket Hash: acd12990885d927645a036e0acda6abf3d88ce4b
Title: CREATE TABLE AS fails with a false report of database corruption
Status: Fixed Type: Code_Defect
Severity: Important Priority: Immediate
Subsystem: Unknown Resolution: Fixed
Last Modified: 2015-09-09 13:28:24
Version Found In: 3.8.11.1
User Comments:
drh added on 2015-09-09 12:34:14: (text/x-fossil-wiki)
The second statement in the following script reports an SQLITE_CORRUPT error:

<blockquote><verbatim>
CREATE TABLE t1(a);
CREATE TABLE t2 AS SELECT name FROM sqlite_master;
</verbatim></blockquote>

The database is not actually corrupt.  This is a malfunction in the CREATE TABLE AS statement.

Bisecting indicates that this problem was introduced by check-in
[972881c6d3] on [2013-11-21], first released with version 3.8.2.