LuaSQLite3

Check-in [0da9110fc8]
Login

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

Overview
Comment:Reset persistent statements when for-loop terminates.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 0da9110fc8c23073c1524d56287337077b44d094
User & Date: e@ecd9bf9a-ecc1-ed47-8102-3ce978d4cc14 2006-09-04 20:24:52
Context
2006-10-02
21:29
Generalize Makefile. Update dist target for Subversion. Add examples to repo. Update HISTORY file and add to repo. check-in: 340683bc64 user: e@ecd9bf9a-ecc1-ed47-8102-3ce978d4cc14 tags: trunk
2006-09-04
20:24
Reset persistent statements when for-loop terminates. check-in: 0da9110fc8 user: e@ecd9bf9a-ecc1-ed47-8102-3ce978d4cc14 tags: trunk
2006-09-02
04:55
Add automatic re-prepare of stepped statements yielding schema errors. check-in: 22341c42be user: e@ecd9bf9a-ecc1-ed47-8102-3ce978d4cc14 tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to lsqlite3.c.

1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
    if (svm->temp) {
        /* finalize and check for errors */
        result = sqlite3_finalize(vm);
        svm->vm = NULL;
        cleanupvm(L, svm);
    }
    else if (result == SQLITE_DONE) {
        result = SQLITE_OK;
    }

    if (result != SQLITE_OK) {
        lua_pushstring(L, sqlite3_errmsg(svm->db->db));
        lua_error(L);
    }
    return 0;







|







1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
    if (svm->temp) {
        /* finalize and check for errors */
        result = sqlite3_finalize(vm);
        svm->vm = NULL;
        cleanupvm(L, svm);
    }
    else if (result == SQLITE_DONE) {
        result = sqlite3_reset(vm);
    }

    if (result != SQLITE_OK) {
        lua_pushstring(L, sqlite3_errmsg(svm->db->db));
        lua_error(L);
    }
    return 0;