Changes On Branch exp-foreign-keys
Not logged in

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

Changes In Branch exp-foreign-keys Excluding Merge-Ins

This is equivalent to a diff from 558a17a686 to 19844445d0

2012-12-27
03:06
Do not interpret MSIE version 6 and earlier as "human" for the purposes of automatically enabling hyperlinks. check-in: 747e1e50d5 user: drh tags: trunk
2012-12-23
07:23
Add support for running raw TH1 commands via the web interface (requires setup permissions). Closed-Leaf check-in: 6358cc3714 user: mistachkin tags: adminTh1
2012-12-22
14:36
Use NULL rather than 0 for values in the MLINK table that are empty. Leaf check-in: 19844445d0 user: drh tags: exp-foreign-keys
13:48
Update SQLite to the latest trunk, with support for the foreign_key_check pragma. check-in: 558a17a686 user: drh tags: trunk
2012-12-21
13:31
Correct typo in the description of the moderation setup page. check-in: c89a694d54 user: mistachkin tags: trunk

Changes to src/db.c.

330
331
332
333
334
335
336





337
338
339
340
341
342
343
** to the SQL variable.  Contrast this to bind_blob() which treats
** the Blob object like an SQL BLOB.
*/
int db_bind_str(Stmt *pStmt, const char *zParamName, Blob *pBlob){
  return sqlite3_bind_text(pStmt->pStmt, paramIdx(pStmt, zParamName),
                          blob_buffer(pBlob), blob_size(pBlob), SQLITE_STATIC);
}






/*
** Step the SQL statement.  Return either SQLITE_ROW or an error code
** or SQLITE_OK if the statement finishes successfully.
*/
int db_step(Stmt *pStmt){
  int rc;






>
>
>
>
>







330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
** to the SQL variable.  Contrast this to bind_blob() which treats
** the Blob object like an SQL BLOB.
*/
int db_bind_str(Stmt *pStmt, const char *zParamName, Blob *pBlob){
  return sqlite3_bind_text(pStmt->pStmt, paramIdx(pStmt, zParamName),
                          blob_buffer(pBlob), blob_size(pBlob), SQLITE_STATIC);
}

/* Clear all bindings */
int db_clear_bindings(Stmt *pStmt){
  return sqlite3_clear_bindings(pStmt->pStmt);
}

/*
** Step the SQL statement.  Return either SQLITE_ROW or an error code
** or SQLITE_OK if the statement finishes successfully.
*/
int db_step(Stmt *pStmt){
  int rc;

Changes to src/manifest.c.

1182
1183
1184
1185
1186
1187
1188

1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
    fid = uuid_to_rid(zToUuid, 1);
    if( isPublic ) content_make_public(fid);
  }
  db_static_prepare(&s1,
    "INSERT INTO mlink(mid,pid,fid,fnid,pfnid,mperm)"
    "VALUES(:m,:p,:f,:n,:pfn,:mp)"
  );

  db_bind_int(&s1, ":m", mid);
  db_bind_int(&s1, ":p", pid);
  db_bind_int(&s1, ":f", fid);
  db_bind_int(&s1, ":n", fnid);
  db_bind_int(&s1, ":pfn", pfnid);
  db_bind_int(&s1, ":mp", mperm);
  db_exec(&s1);
  if( pid && fid ){
    content_deltify(pid, fid, 0);
  }
}







>

|
|

|







1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
    fid = uuid_to_rid(zToUuid, 1);
    if( isPublic ) content_make_public(fid);
  }
  db_static_prepare(&s1,
    "INSERT INTO mlink(mid,pid,fid,fnid,pfnid,mperm)"
    "VALUES(:m,:p,:f,:n,:pfn,:mp)"
  );
  db_clear_bindings(&s1);
  db_bind_int(&s1, ":m", mid);
  if( pid ) db_bind_int(&s1, ":p", pid);
  if( fid ) db_bind_int(&s1, ":f", fid);
  db_bind_int(&s1, ":n", fnid);
  if( pfnid) db_bind_int(&s1, ":pfn", pfnid);
  db_bind_int(&s1, ":mp", mperm);
  db_exec(&s1);
  if( pid && fid ){
    content_deltify(pid, fid, 0);
  }
}