mirror of
https://github.com/sqlite/sqlite.git
synced 2026-01-06 08:01:16 +03:00
Change the PRAGMA parser to use a binary search for the pragma name.
Also: Minor performance enhancement to sqlite3DbFree() and to the token dequoter. FossilOrigin-Name: 870c030b4e1854e6e0d39907fadbd82774c16f56
This commit is contained in:
@@ -484,6 +484,7 @@ void sqlite3_free(void *p){
|
||||
*/
|
||||
void sqlite3DbFree(sqlite3 *db, void *p){
|
||||
assert( db==0 || sqlite3_mutex_held(db->mutex) );
|
||||
if( p==0 ) return;
|
||||
if( db ){
|
||||
if( db->pnBytesFreed ){
|
||||
*db->pnBytesFreed += sqlite3DbMallocSize(db, p);
|
||||
|
||||
634
src/pragma.c
634
src/pragma.c
File diff suppressed because it is too large
Load Diff
@@ -193,7 +193,8 @@ int sqlite3Dequote(char *z){
|
||||
case '[': quote = ']'; break; /* For MS SqlServer compatibility */
|
||||
default: return -1;
|
||||
}
|
||||
for(i=1, j=0; ALWAYS(z[i]); i++){
|
||||
for(i=1, j=0;; i++){
|
||||
assert( z[i] );
|
||||
if( z[i]==quote ){
|
||||
if( z[i+1]==quote ){
|
||||
z[j++] = quote;
|
||||
|
||||
Reference in New Issue
Block a user