SQLite

Check-in [9efb223f4c]
Login

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

Overview
Comment:OOM failures on sqlite3_errmsg16() in an app-defined function are no longer benign.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | oom-handling
Files: files | file ages | folders
SHA1: 9efb223f4ce8ccc00515f8f016f7c494c9ae5096
User & Date: drh 2016-02-05 04:50:27.680
Context
2016-02-05
13:38
Add the slightly faster sqlite3DbMallocRawNN(db,n) routine for the majority cases where db is guaranteed to be not NULL. (Closed-Leaf check-in: 0a802e96ab user: drh tags: oom-handling)
04:50
OOM failures on sqlite3_errmsg16() in an app-defined function are no longer benign. (check-in: 9efb223f4c user: drh tags: oom-handling)
02:50
Minor simplification of schema error reporting. (check-in: a8846aeed9 user: drh tags: oom-handling)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/test_func.c.
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
static void test_agg_errmsg16_step(sqlite3_context *a, int b,sqlite3_value **c){
}
static void test_agg_errmsg16_final(sqlite3_context *ctx){
#ifndef SQLITE_OMIT_UTF16
  const void *z;
  sqlite3 * db = sqlite3_context_db_handle(ctx);
  sqlite3_aggregate_context(ctx, 2048);
  sqlite3BeginBenignMalloc();
  z = sqlite3_errmsg16(db);
  sqlite3EndBenignMalloc();
  sqlite3_result_text16(ctx, z, -1, SQLITE_TRANSIENT);
#endif
}

/*
** Routines for testing the sqlite3_get_auxdata() and sqlite3_set_auxdata()
** interface.







<

<







162
163
164
165
166
167
168

169

170
171
172
173
174
175
176
static void test_agg_errmsg16_step(sqlite3_context *a, int b,sqlite3_value **c){
}
static void test_agg_errmsg16_final(sqlite3_context *ctx){
#ifndef SQLITE_OMIT_UTF16
  const void *z;
  sqlite3 * db = sqlite3_context_db_handle(ctx);
  sqlite3_aggregate_context(ctx, 2048);

  z = sqlite3_errmsg16(db);

  sqlite3_result_text16(ctx, z, -1, SQLITE_TRANSIENT);
#endif
}

/*
** Routines for testing the sqlite3_get_auxdata() and sqlite3_set_auxdata()
** interface.