Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Compatibility with SQLite 3.8.2 as external library |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | sqlite3-compat |
| Files: | files | file ages | folders |
| SHA1: |
09472e8897c974cb7b955a72fd416ab1 |
| User & Date: | jan.nijtmans 2014-04-21 18:41:00.311 |
Context
|
2014-06-05
| ||
| 08:12 | Compatibility back to SQLite 3.7.17 (when configuring with --disable-internal-sqlite) ... (check-in: b6670e0545 user: jan.nijtmans tags: sqlite3-compat) | |
|
2014-04-21
| ||
| 18:41 | Compatibility with SQLite 3.8.2 as external library ... (check-in: 09472e8897 user: jan.nijtmans tags: sqlite3-compat) | |
| 13:24 | Update the built-in SQLite to 3.8.5 alpha, including all of the latest performance enhancements and bug fixes. ... (check-in: 88aa2e375a user: drh tags: trunk) | |
Changes
Changes to src/descendants.c.
| ︙ | ︙ | |||
155 156 157 158 159 160 161 162 163 164 165 166 167 168 |
}
/*
** Load the record ID rid and up to N-1 closest ancestors into
** the "ok" table.
*/
void compute_ancestors(int rid, int N, int directOnly){
db_multi_exec(
"WITH RECURSIVE "
" ancestor(rid, mtime) AS ("
" SELECT %d, mtime FROM event WHERE objid=%d "
" UNION "
" SELECT plink.pid, event.mtime"
" FROM ancestor, plink, event"
| > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
}
/*
** Load the record ID rid and up to N-1 closest ancestors into
** the "ok" table.
*/
void compute_ancestors(int rid, int N, int directOnly){
#if USE_SYSTEM_SQLITE+0==1
if( sqlite3_libversion_number()<3008003 ){
Bag seen;
PQueue queue;
Stmt ins;
Stmt q;
bag_init(&seen);
pqueuex_init(&queue);
bag_insert(&seen, rid);
pqueuex_insert(&queue, rid, 0.0, 0);
db_prepare(&ins, "INSERT OR IGNORE INTO ok VALUES(:rid)");
db_prepare(&q,
"SELECT a.pid, b.mtime FROM plink a LEFT JOIN plink b ON b.cid=a.pid"
" WHERE a.cid=:rid %s",
directOnly ? " AND a.isprim" : ""
);
while( (N--)>0 && (rid = pqueuex_extract(&queue, 0))!=0 ){
db_bind_int(&ins, ":rid", rid);
db_step(&ins);
db_reset(&ins);
db_bind_int(&q, ":rid", rid);
while( db_step(&q)==SQLITE_ROW ){
int pid = db_column_int(&q, 0);
double mtime = db_column_double(&q, 1);
if( bag_insert(&seen, pid) ){
pqueuex_insert(&queue, pid, -mtime, 0);
}
}
db_reset(&q);
}
bag_clear(&seen);
pqueuex_clear(&queue);
db_finalize(&ins);
db_finalize(&q);
} else
#endif
db_multi_exec(
"WITH RECURSIVE "
" ancestor(rid, mtime) AS ("
" SELECT %d, mtime FROM event WHERE objid=%d "
" UNION "
" SELECT plink.pid, event.mtime"
" FROM ancestor, plink, event"
|
| ︙ | ︙ |
Changes to src/main.c.
| ︙ | ︙ | |||
568 569 570 571 572 573 574 |
#endif
int main(int argc, char **argv)
#endif
{
const char *zCmdName = "unknown";
int idx;
int rc;
| | | | 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 |
#endif
int main(int argc, char **argv)
#endif
{
const char *zCmdName = "unknown";
int idx;
int rc;
if( sqlite3_libversion_number()<3008002 ){
fossil_fatal("Unsuitable SQLite version %s, must be at least 3.8.2",
sqlite3_libversion());
}
sqlite3_config(SQLITE_CONFIG_SINGLETHREAD);
sqlite3_config(SQLITE_CONFIG_LOG, fossil_sqlite_log, 0);
memset(&g, 0, sizeof(g));
g.now = time(0);
g.httpHeader = empty_blob;
|
| ︙ | ︙ |