SQLite

Check-in [d1fe8ab4a1]
Login

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

Overview
Comment:Reorder variable declarations in the previous check-in to avoid putting code before declarations when not testing.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: d1fe8ab4a176180053d35300ad0540a27c6cd76d
User & Date: drh 2010-07-06 09:29:01.000
Context
2010-07-06
10:55
Before calling Tcl_ExitThread() in a multi-threaded test, call Tcl_DoOneEvent() as many times as necessary to handle any queued events. (check-in: b3399b4078 user: dan tags: trunk)
09:29
Reorder variable declarations in the previous check-in to avoid putting code before declarations when not testing. (check-in: d1fe8ab4a1 user: drh tags: trunk)
07:36
Ensure the correct error code is returned if an attempt to parse a database schema made by an ATTACH statement fails. (check-in: c272196115 user: dan tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/prepare.c.
69
70
71
72
73
74
75
76
77
78

79
80
81
82
83
84
85
    corruptSchema(pData, argv[0], 0);
  }else if( argv[2] && argv[2][0] ){
    /* Call the parser to process a CREATE TABLE, INDEX or VIEW.
    ** But because db->init.busy is set to 1, no VDBE code is generated
    ** or executed.  All the parser does is build the internal data
    ** structures that describe the table, index, or view.
    */
    TESTONLY(int rcp);            /* Return code from sqlite3_prepare() */
    int rc;
    sqlite3_stmt *pStmt;


    assert( db->init.busy );
    db->init.iDb = iDb;
    db->init.newTnum = atoi(argv[1]);
    db->init.orphanTrigger = 0;
    TESTONLY(rcp = ) sqlite3_prepare(db, argv[2], -1, &pStmt, 0);
    rc = db->errCode;







<


>







69
70
71
72
73
74
75

76
77
78
79
80
81
82
83
84
85
    corruptSchema(pData, argv[0], 0);
  }else if( argv[2] && argv[2][0] ){
    /* Call the parser to process a CREATE TABLE, INDEX or VIEW.
    ** But because db->init.busy is set to 1, no VDBE code is generated
    ** or executed.  All the parser does is build the internal data
    ** structures that describe the table, index, or view.
    */

    int rc;
    sqlite3_stmt *pStmt;
    TESTONLY(int rcp);            /* Return code from sqlite3_prepare() */

    assert( db->init.busy );
    db->init.iDb = iDb;
    db->init.newTnum = atoi(argv[1]);
    db->init.orphanTrigger = 0;
    TESTONLY(rcp = ) sqlite3_prepare(db, argv[2], -1, &pStmt, 0);
    rc = db->errCode;