Fossil

Check-in [eddfa8dfbe]
Login

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

Overview
Comment:In db_database_slow(), make sure the prepared statement gets finalized even if the db_prepare_ignore_error() call fails. See [forum:/forumpost/89b5aad9aa|forum post 89b5aad9aa] for a description of the problem that this fixes.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: eddfa8dfbe830c271b5f5a7046bbba866def20bbaf7855289817df6a235f1616
User & Date: drh 2021-05-25 20:58:55.689
Context
2021-05-26
01:05
Set a default busy-timeout of 10 seconds in the "fossil sql" command, before calling sqlite3_exec() to ATTACH auxiliary database files. check-in: 49df85ac05 user: drh tags: trunk
2021-05-25
20:58
In db_database_slow(), make sure the prepared statement gets finalized even if the db_prepare_ignore_error() call fails. See [forum:/forumpost/89b5aad9aa|forum post 89b5aad9aa] for a description of the problem that this fixes. check-in: eddfa8dfbe user: drh tags: trunk
2021-05-22
12:40
In the submenu of the /rptview page: 1) add "Reports" that links to /reportlist page (see [forum:/forumpost/612170e31007|forumpost 612170e3]); 2) fix a "Raw" link, that was incorrect for the case when /rptview is accessed through an alias. The later was addressed in [bed4b0f7fc58], but the bugfix was incomplete. Both of these amendments used to live on 'rptview-submenu-paralink' branch - this check-in places them on trunk. check-in: 3e35068260 user: george tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/db.c.
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720

1721
1722
1723
1724
1725
1726
1727
*/
int db_database_slot(const char *zLabel){
  int iSlot = -1;
  int rc;
  Stmt q;
  if( g.db==0 ) return iSlot;
  rc = db_prepare_ignore_error(&q, "PRAGMA database_list");
  if( rc!=SQLITE_OK ) return iSlot;
  while( db_step(&q)==SQLITE_ROW ){
    if( fossil_strcmp(db_column_text(&q,1),zLabel)==0 ){
      iSlot = db_column_int(&q, 0);
      break;

    }
  }
  db_finalize(&q);
  return iSlot;
}

/*







|
|
|
|
|
>







1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
*/
int db_database_slot(const char *zLabel){
  int iSlot = -1;
  int rc;
  Stmt q;
  if( g.db==0 ) return iSlot;
  rc = db_prepare_ignore_error(&q, "PRAGMA database_list");
  if( rc==SQLITE_OK ){
    while( db_step(&q)==SQLITE_ROW ){
      if( fossil_strcmp(db_column_text(&q,1),zLabel)==0 ){
        iSlot = db_column_int(&q, 0);
        break;
      }
    }
  }
  db_finalize(&q);
  return iSlot;
}

/*