SQLite

Check-in [469718f1]
Login

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

Overview
Comment:Ensure that all prepared statements are expired and forced to reprepare whenever the database text encoding changes. Forum post 43cbfc4d23.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 469718f106e1cfa7f8f4714a9e743108c361af81e0258061c2b76880a7c352ae
User & Date: drh 2023-05-12 10:52:12
Context
2023-05-12
12:45
Fix harmless typos in comments. (check-in: 607c3efb user: drh tags: trunk)
10:52
Ensure that all prepared statements are expired and forced to reprepare whenever the database text encoding changes. Forum post 43cbfc4d23. (check-in: 469718f1 user: drh tags: trunk)
2023-05-11
21:15
Add restriction (5) to the omit-noop-join optimization. Fix for the issue reported by [forum/forumpost/49f2c7f690|forum post 49f2c7f690]. (check-in: 3e9c9bbd user: drh tags: trunk)
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/callback.c.

181
182
183
184
185
186
187

188
189
190
191
192
193
194
void sqlite3SetTextEncoding(sqlite3 *db, u8 enc){
  assert( enc==SQLITE_UTF8 || enc==SQLITE_UTF16LE || enc==SQLITE_UTF16BE );
  db->enc = enc;
  /* EVIDENCE-OF: R-08308-17224 The default collating function for all
  ** strings is BINARY. 
  */
  db->pDfltColl = sqlite3FindCollSeq(db, enc, sqlite3StrBINARY, 0);

}

/*
** This function is responsible for invoking the collation factory callback
** or substituting a collation sequence of a different encoding when the
** requested collation sequence is not available in the desired encoding.
** 







>







181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
void sqlite3SetTextEncoding(sqlite3 *db, u8 enc){
  assert( enc==SQLITE_UTF8 || enc==SQLITE_UTF16LE || enc==SQLITE_UTF16BE );
  db->enc = enc;
  /* EVIDENCE-OF: R-08308-17224 The default collating function for all
  ** strings is BINARY. 
  */
  db->pDfltColl = sqlite3FindCollSeq(db, enc, sqlite3StrBINARY, 0);
  sqlite3ExpirePreparedStatements(db, 1);
}

/*
** This function is responsible for invoking the collation factory callback
** or substituting a collation sequence of a different encoding when the
** requested collation sequence is not available in the desired encoding.
**