mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Immediately fail a CREATE TABLE statement that attempts to create a
table that has a generated column loop. Legacy allows the table to be created but the table would not be usable for anything. FossilOrigin-Name: 3237bf964117c1ef71143042837ef21872bb3d04bfd682075672e768953ec802
This commit is contained in:
11
src/vdbe.c
11
src/vdbe.c
@@ -6908,11 +6908,18 @@ case OP_CreateBtree: { /* out2 */
|
||||
** Run the SQL statement or statements specified in the P4 string.
|
||||
*/
|
||||
case OP_SqlExec: {
|
||||
char *zErr;
|
||||
|
||||
sqlite3VdbeIncrWriteCounter(p, 0);
|
||||
db->nSqlExec++;
|
||||
rc = sqlite3_exec(db, pOp->p4.z, 0, 0, 0);
|
||||
zErr = 0;
|
||||
rc = sqlite3_exec(db, pOp->p4.z, 0, 0, &zErr);
|
||||
db->nSqlExec--;
|
||||
if( rc ) goto abort_due_to_error;
|
||||
if( rc || zErr ){
|
||||
sqlite3VdbeError(p, "%s", zErr);
|
||||
sqlite3_free(zErr);
|
||||
goto abort_due_to_error;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user