sync/sql_func.yml2
branchsync
changeset 3060 910548a84da0
parent 2845 d474c5ebfec8
child 3102 50a03176b73f
     1.1 --- a/sync/sql_func.yml2	Mon Oct 15 22:07:40 2018 +0200
     1.2 +++ b/sync/sql_func.yml2	Tue Oct 16 01:09:14 2018 +0200
     1.3 @@ -11,10 +11,8 @@
     1.4  function "init_sql" {
     1.5      param "sql";
     1.6      ||
     1.7 -        static const char *sql = `copy '$sql'`;
     1.8 -        static const size_t len = sizeof(`copy '$sql'`);
     1.9          sqlite3_stmt *_sql;
    1.10 -        int int_result = sqlite3_prepare_v2(session->db, sql, (int) len, &_sql, NULL);
    1.11 +        int int_result = sqlite3_prepare_v2(session->db, `copy '$sql'`, -1, &_sql, NULL);
    1.12          assert(int_result == SQLITE_OK);
    1.13          if (!(int_result == SQLITE_OK))
    1.14              return PEP_UNKNOWN_ERROR;