Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Fix a problem in lsm_write() occuring if the same pointer is passed as both key and value. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | multi-process |
Files: | files | file ages | folders |
SHA1: |
27ef4e84c11b2ecb1f737127146bd0a4 |
User & Date: | dan 2012-08-25 19:04:20.867 |
Context
2012-08-25
| ||
19:17 | Fix another bug to do with large key-value pairs. check-in: 511a91e121 user: dan tags: multi-process | |
19:04 | Fix a problem in lsm_write() occuring if the same pointer is passed as both key and value. check-in: 27ef4e84c1 user: dan tags: multi-process | |
18:51 | Fix a problem with large key/value pairs. check-in: e229e3e35f user: dan tags: multi-process | |
Changes
Changes to src/lsm_tree.c.
︙ | ︙ | |||
571 572 573 574 575 576 577 | iRet = iWrite; pDb->treehdr.iWrite = iWrite + nByte; pDb->treehdr.nByte += nByte; } return iRet; } | < < < < < < < < < < | 571 572 573 574 575 576 577 578 579 580 581 582 583 584 | iRet = iWrite; pDb->treehdr.iWrite = iWrite + nByte; pDb->treehdr.nByte += nByte; } return iRet; } /* ** Allocate and zero nByte bytes of space within the *-shm file. */ static void *treeShmallocZero(lsm_db *pDb, int nByte, u32 *piPtr, int *pRc){ u32 iPtr; void *p; iPtr = treeShmalloc(pDb, 1, nByte, pRc); |
︙ | ︙ | |||
652 653 654 655 656 657 658 | int nAvail; iWrite = pDb->treehdr.iWrite; nAvail = LSM_SHM_CHUNK_SIZE - (iWrite & (LSM_SHM_CHUNK_SIZE-1)); assert( ((iWrite+nAvail) % LSM_SHM_CHUNK_SIZE)==0 ); nAlloc = LSM_MIN(nAvail, nRem); | | | > | 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 | int nAvail; iWrite = pDb->treehdr.iWrite; nAvail = LSM_SHM_CHUNK_SIZE - (iWrite & (LSM_SHM_CHUNK_SIZE-1)); assert( ((iWrite+nAvail) % LSM_SHM_CHUNK_SIZE)==0 ); nAlloc = LSM_MIN(nAvail, nRem); aAlloc = treeShmptr(pDb, treeShmalloc(pDb, 0, nAlloc, pRc), pRc); if( aAlloc==0 ) break; memcpy(aAlloc, &a[n-nRem], nAlloc); nRem -= nAlloc; } a = pVal; n = nRem = nVal; pVal = 0; } if( *pRc ) return 0; #if 0 printf("store: %d %s\n", (int)iPtr, (char *)pKey); #endif return p; |
︙ | ︙ |