/ Check-in [1cdae2db]
Login

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

Overview
Comment:Make sure the RTree sqlite3_blob handle is reset prior to renaming the table.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 1cdae2db3c54970a1811e597065724578408c84d49d75b8fe25d56281ddc2e94
User & Date: drh 2017-04-08 01:09:14
Context
2017-04-08
09:12
Have fts5 close any open blob-handle when a new savepoint is opened. This ensures that fts5 does not prevent DROP TABLE statements (which always open a savepoint) from succeeding. check-in: a921ada8 user: dan tags: trunk
01:09
Make sure the RTree sqlite3_blob handle is reset prior to renaming the table. check-in: 1cdae2db user: drh tags: trunk
00:55
Fix the ".dump" command so that it works with ".headers on". Also fix the display of ".mode insert" with ".headers on". check-in: a6ce57ee user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Show Whitespace Changes Patch

Changes to ext/rtree/rtree.c.

3194
3195
3196
3197
3198
3199
3200

3201
3202
3203
3204
3205
3206
3207
    "ALTER TABLE %Q.'%q_parent' RENAME TO \"%w_parent\";"
    "ALTER TABLE %Q.'%q_rowid'  RENAME TO \"%w_rowid\";"
    , pRtree->zDb, pRtree->zName, zNewName 
    , pRtree->zDb, pRtree->zName, zNewName 
    , pRtree->zDb, pRtree->zName, zNewName
  );
  if( zSql ){

    rc = sqlite3_exec(pRtree->db, zSql, 0, 0, 0);
    sqlite3_free(zSql);
  }
  return rc;
}









>







3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
    "ALTER TABLE %Q.'%q_parent' RENAME TO \"%w_parent\";"
    "ALTER TABLE %Q.'%q_rowid'  RENAME TO \"%w_rowid\";"
    , pRtree->zDb, pRtree->zName, zNewName 
    , pRtree->zDb, pRtree->zName, zNewName 
    , pRtree->zDb, pRtree->zName, zNewName
  );
  if( zSql ){
    nodeBlobReset(pRtree);
    rc = sqlite3_exec(pRtree->db, zSql, 0, 0, 0);
    sqlite3_free(zSql);
  }
  return rc;
}