SQLite

Check-in [092ad64f]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix ALTER TABLE so that it works even when compiled using -DSQLITE_DQS=0. Forum post 3c1a00b66fca81fe.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 092ad64faa4ae93b1e09ccd52159621d619e6817bcb4573331e9053d97f731fd
User & Date: drh 2022-01-16 15:15:39
Context
2022-01-16
19:11
Fix test cases so that they all still work even with -DSQLITE_DQS=0. (check-in: 48837766 user: drh tags: trunk)
15:15
Fix ALTER TABLE so that it works even when compiled using -DSQLITE_DQS=0. Forum post 3c1a00b66fca81fe. (check-in: 092ad64f user: drh tags: trunk)
2022-01-14
23:28
Remove code from lemon.c that was made superfluous by [1b22b42e59793af1|check-in 1b22b42e59793af1] in late 2017. (check-in: 6d2f95a4 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/alter.c.
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
     || (pCol->notNull && (pCol->colFlags & COLFLAG_GENERATED)!=0)
    ){
      sqlite3NestedParse(pParse,
        "SELECT CASE WHEN quick_check GLOB 'CHECK*'"
        " THEN raise(ABORT,'CHECK constraint failed')"
        " ELSE raise(ABORT,'NOT NULL constraint failed')"
        " END"
        "  FROM pragma_quick_check(\"%w\",\"%w\")"
        " WHERE quick_check GLOB 'CHECK*' OR quick_check GLOB 'NULL*'",
        zTab, zDb
      );
    }
  }
}








|







446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
     || (pCol->notNull && (pCol->colFlags & COLFLAG_GENERATED)!=0)
    ){
      sqlite3NestedParse(pParse,
        "SELECT CASE WHEN quick_check GLOB 'CHECK*'"
        " THEN raise(ABORT,'CHECK constraint failed')"
        " ELSE raise(ABORT,'NOT NULL constraint failed')"
        " END"
        "  FROM pragma_quick_check(%Q,%Q)"
        " WHERE quick_check GLOB 'CHECK*' OR quick_check GLOB 'NULL*'",
        zTab, zDb
      );
    }
  }
}