/ Check-in [cda998f0]
Login

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

Overview
Comment:Small size reduction and performance increase in the string duplicator.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:cda998f080cb00779d8c0d1c83d8fe2b74462cd4
User & Date: drh 2016-10-17 00:48:06
Context
2016-10-17
15:28
Changes to support interrupting a checkpoint using sqlite3_interrupt(). check-in: c88d36e2 user: dan tags: trunk
00:48
Small size reduction and performance increase in the string duplicator. check-in: cda998f0 user: drh tags: trunk
2016-10-15
18:37
Add documentation for the OP_SorterInsert opcode, formerly omitted by mistake. No changes to code. check-in: 16d88a90 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/malloc.c.

722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
*/
char *sqlite3DbStrDup(sqlite3 *db, const char *z){
  char *zNew;
  size_t n;
  if( z==0 ){
    return 0;
  }
  n = sqlite3Strlen30(z) + 1;
  assert( (n&0x7fffffff)==n );
  zNew = sqlite3DbMallocRaw(db, (int)n);
  if( zNew ){
    memcpy(zNew, z, n);
  }
  return zNew;
}
char *sqlite3DbStrNDup(sqlite3 *db, const char *z, u64 n){
  char *zNew;







|
<
|







722
723
724
725
726
727
728
729

730
731
732
733
734
735
736
737
*/
char *sqlite3DbStrDup(sqlite3 *db, const char *z){
  char *zNew;
  size_t n;
  if( z==0 ){
    return 0;
  }
  n = strlen(z) + 1;

  zNew = sqlite3DbMallocRaw(db, n);
  if( zNew ){
    memcpy(zNew, z, n);
  }
  return zNew;
}
char *sqlite3DbStrNDup(sqlite3 *db, const char *z, u64 n){
  char *zNew;