/ Check-in [d2a0af7a]
Login

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

Overview
Comment:Minor tweak the the b-tree balancer.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | btree-tuning
Files: files | file ages | folders
SHA1: d2a0af7a37e390439c3001fedb5834f47fb24a1f
User & Date: drh 2016-07-14 19:48:08
Context
2016-07-23
19:18
Small tweak to the btree balancer for improved tree balance. check-in: 8817dedb user: drh tags: trunk
2016-07-14
19:48
Minor tweak the the b-tree balancer. Closed-Leaf check-in: d2a0af7a user: drh tags: btree-tuning
19:13
Fix ALTER TABLE so that it does not promote the schema version past 3, as that will cause DESC indexes to go corrupt. Ticket [f68bf68513a1c]. check-in: a7db6e45 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/btree.c.

  7336   7336       d = r + 1 - leafData;
  7337   7337       (void)cachedCellSize(&b, d);
  7338   7338       do{
  7339   7339         assert( d<nMaxCells );
  7340   7340         assert( r<nMaxCells );
  7341   7341         (void)cachedCellSize(&b, r);
  7342   7342         if( szRight!=0
  7343         -       && (bBulk || szRight+b.szCell[d]+2 > szLeft-(b.szCell[r]+2)) ){
         7343  +       && (bBulk || szRight+b.szCell[d]+2 > szLeft-(b.szCell[r]+(i==k-1?0:2)))){
  7344   7344           break;
  7345   7345         }
  7346   7346         szRight += b.szCell[d] + 2;
  7347   7347         szLeft -= b.szCell[r] + 2;
  7348   7348         cntNew[i-1] = r;
  7349   7349         r--;
  7350   7350         d--;