SQLite

Check-in [b078f09bff]
Login

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

Overview
Comment:Call sqlite3_free() instead of free() to release a buffer allocated by sqlite3_vmprintf() in test_async.c (test suite bug only). (CVS 3708)
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: b078f09bffee5863d595d281f2ecd14e1c9ec727
User & Date: danielk1977 2007-03-22 15:20:00.000
Context
2007-03-22
15:22
In os_unix.c, make a distinction between pread() and pread64(). Add a new compile-time macro USE_PREAD64 to select the latter. (CVS 3709) (check-in: 177cd92910 user: drh tags: trunk)
15:20
Call sqlite3_free() instead of free() to release a buffer allocated by sqlite3_vmprintf() in test_async.c (test suite bug only). (CVS 3708) (check-in: b078f09bff user: danielk1977 tags: trunk)
00:14
Refactor PLWriter to remove owned buffer. DLCollector (Document List Collector) now handles the case where PLWriter (Position List Writer) needed a local buffer. Change to using the associated DLWriter (Document List Writer) buffer, which reduces the number of memory copies needed in doclist processing, and brings PLWriter operation in line with DLWriter operation. (CVS 3707) (check-in: d04fa3a13a user: shess tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/test_async.c.
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
static void asyncTrace(const char *zFormat, ...){
  char *z;
  va_list ap;
  va_start(ap, zFormat);
  z = sqlite3_vmprintf(zFormat, ap);
  va_end(ap);
  fprintf(stderr, "[%d] %s", (int)pthread_self(), z);
  free(z);
}

/*
** THREAD SAFETY NOTES
**
** Basic rules:
**







|







110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
static void asyncTrace(const char *zFormat, ...){
  char *z;
  va_list ap;
  va_start(ap, zFormat);
  z = sqlite3_vmprintf(zFormat, ap);
  va_end(ap);
  fprintf(stderr, "[%d] %s", (int)pthread_self(), z);
  sqlite3_free(z);
}

/*
** THREAD SAFETY NOTES
**
** Basic rules:
**