1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-10 01:02:56 +03:00

Avoid using the transient value in the UTF-16 collation needed callback. (CVS 2816)

FossilOrigin-Name: ab6241af29b2e9f5f094b83c13afebe44a8ad6bc
This commit is contained in:
drh
2005-12-14 22:51:16 +00:00
parent 268803a95b
commit 26abcb1eef
3 changed files with 13 additions and 11 deletions

View File

@@ -1,5 +1,5 @@
C Properly\szero-terminate\sUTF-16\scollation\snames\son\san\nsqlite3_collation_needed16\scallback.\s(CVS\s2815)
D 2005-12-14T20:11:30
C Avoid\susing\sthe\stransient\svalue\sin\sthe\sUTF-16\scollation\sneeded\scallback.\s(CVS\s2816)
D 2005-12-14T22:51:17
F Makefile.in e3c6b3a38d734d41574c04f2fc90d18de2b87102
F Makefile.linux-gcc aee18d8a05546dcf1888bd4547e442008a49a092
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
@@ -37,7 +37,7 @@ F src/auth.c 31e2304bef67f44d635655f44234387ea7d21454
F src/btree.c de0fc1a0f6a4631001ffb6070d1b7588cdebcbc5
F src/btree.h 1ed561263ca0e335bc3e81d761c9d5ff8c22f61e
F src/build.c 306dde3134acd8f1c9f3821d81c3cb598af91280
F src/callback.c 16f8198d3c187daeccc7593edb7e06f9eb10c772
F src/callback.c 62066afd516f220575e81b1a1239ab92a2eae252
F src/complete.c df1681cef40dec33a286006981845f87b194e7a4
F src/date.c bb079317bff6a2b78aba5c0d2ddae5f6f03acfb7
F src/delete.c 6010a081edda9871895260def092e852f0bb60a0
@@ -327,7 +327,7 @@ F www/tclsqlite.tcl ddcf912ea48695603c8ed7efb29f0812ef8d1b49
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
F www/version3.tcl a99cf5f6d8bd4d5537584a2b342f0fb9fa601d8b
F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513
P 1637f3796015d1582ed8c6bc8bdf8c067b4bade9
R 63c8dfd64520196af72348a822d41225
P 71a49d05bf174025c0d9141b8905c48f43e42541
R f16c049475a49b8d2690563dd058c2bb
U drh
Z 0e5476dc8c71cffe7a1439467de52a42
Z 92b09f7f2e0683668576a9a0f2bc9232

View File

@@ -1 +1 @@
71a49d05bf174025c0d9141b8905c48f43e42541
ab6241af29b2e9f5f094b83c13afebe44a8ad6bc

View File

@@ -13,7 +13,7 @@
** This file contains functions used to access the internal hash tables
** of user defined functions and collation sequences.
**
** $Id: callback.c,v 1.6 2005/12/14 20:11:30 drh Exp $
** $Id: callback.c,v 1.7 2005/12/14 22:51:17 drh Exp $
*/
#include "sqliteInt.h"
@@ -35,11 +35,13 @@ static void callCollNeeded(sqlite3 *db, const char *zName, int nName){
#ifndef SQLITE_OMIT_UTF16
if( db->xCollNeeded16 ){
char const *zExternal;
sqlite3_value *pTmp = sqlite3GetTransientValue(db);
sqlite3_value *pTmp = sqlite3ValueNew();
sqlite3ValueSetStr(pTmp, nName, zName, SQLITE_UTF8, SQLITE_STATIC);
zExternal = sqlite3ValueText(pTmp, SQLITE_UTF16NATIVE);
if( !zExternal ) return;
db->xCollNeeded16(db->pCollNeededArg, db, (int)db->enc, zExternal);
if( zExternal ){
db->xCollNeeded16(db->pCollNeededArg, db, (int)db->enc, zExternal);
}
sqlite3ValueFree(pTmp);
}
#endif
}