SQLite

Check-in [3516ca29da]
Login

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

Overview
Comment:Fix minor problems with the SSE hooks. (CVS 2483)
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 3516ca29da5f28adc1fd4da42ca5551d154b6320
User & Date: danielk1977 2005-05-26 12:37:30.000
Context
2005-05-26
14:41
If SSE is enabled, set the P1 field of OP_AggInit instructions to the number of arguments that will be passed to the aggregate function. (CVS 2484) (check-in: 7f67b9f0f3 user: danielk1977 tags: trunk)
12:37
Fix minor problems with the SSE hooks. (CVS 2483) (check-in: 3516ca29da user: danielk1977 tags: trunk)
2005-05-25
10:45
Rearrange code so that SSE can invoke the collation factory. (CVS 2482) (check-in: ea061d2ed3 user: danielk1977 tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/main.c.
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
**
*************************************************************************
** Main file for the SQLite library.  The routines in this file
** implement the programmer interface to the library.  Routines in
** other files are for internal use by SQLite and should not be
** accessed by users of the library.
**
** $Id: main.c,v 1.291 2005/05/25 04:11:56 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include "os.h"
#include <ctype.h>

/*
** The following constant value is used by the SQLITE_BIGENDIAN and







|







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
**
*************************************************************************
** Main file for the SQLite library.  The routines in this file
** implement the programmer interface to the library.  Routines in
** other files are for internal use by SQLite and should not be
** accessed by users of the library.
**
** $Id: main.c,v 1.292 2005/05/26 12:37:30 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include "os.h"
#include <ctype.h>

/*
** The following constant value is used by the SQLITE_BIGENDIAN and
126
127
128
129
130
131
132




133
134
135
136
137
138
139

  if( !db ){
    return SQLITE_OK;
  }
  if( sqlite3SafetyCheck(db) ){
    return SQLITE_MISUSE;
  }





  /* If there are any outstanding VMs, return SQLITE_BUSY. */
  if( db->pVdbe ){
    sqlite3Error(db, SQLITE_BUSY, 
        "Unable to close due to unfinalised statements");
    return SQLITE_BUSY;
  }







>
>
>
>







126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143

  if( !db ){
    return SQLITE_OK;
  }
  if( sqlite3SafetyCheck(db) ){
    return SQLITE_MISUSE;
  }

#ifdef SQLITE_SSE
  sqlite3_finalize(db->pFetch);
#endif 

  /* If there are any outstanding VMs, return SQLITE_BUSY. */
  if( db->pVdbe ){
    sqlite3Error(db, SQLITE_BUSY, 
        "Unable to close due to unfinalised statements");
    return SQLITE_BUSY;
  }
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
      assert( pDbList==db );
      pDbList = db->pNext;
    }
    sqlite3OsLeaveMutex();
  }
#endif

#ifdef SQLITE_SSE
  sqlite3_finalize(db->pFetch);
#endif 

  db->magic = SQLITE_MAGIC_ERROR;
  sqliteFree(db);
  return SQLITE_OK;
}

/*
** Rollback all database files.







<
<
<
<







200
201
202
203
204
205
206




207
208
209
210
211
212
213
      assert( pDbList==db );
      pDbList = db->pNext;
    }
    sqlite3OsLeaveMutex();
  }
#endif





  db->magic = SQLITE_MAGIC_ERROR;
  sqliteFree(db);
  return SQLITE_OK;
}

/*
** Rollback all database files.
Changes to src/vdbeaux.c.
349
350
351
352
353
354
355



356
357
358
359
360
361
362
void sqlite3VdbeChangeP3(Vdbe *p, int addr, const char *zP3, int n){
  Op *pOp;
  assert( p->magic==VDBE_MAGIC_INIT );
  if( p==0 || p->aOp==0 ){
    if( n==P3_DYNAMIC || n==P3_KEYINFO_HANDOFF ){
      sqliteFree((void*)zP3);
    }



    return;
  }
  if( addr<0 || addr>=p->nOp ){
    addr = p->nOp - 1;
    if( addr<0 ) return;
  }
  pOp = &p->aOp[addr];







>
>
>







349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
void sqlite3VdbeChangeP3(Vdbe *p, int addr, const char *zP3, int n){
  Op *pOp;
  assert( p->magic==VDBE_MAGIC_INIT );
  if( p==0 || p->aOp==0 ){
    if( n==P3_DYNAMIC || n==P3_KEYINFO_HANDOFF ){
      sqliteFree((void*)zP3);
    }
    if( n==P3_MEM ){
      sqlite3ValueFree((sqlite3_value *)zP3);
    }
    return;
  }
  if( addr<0 || addr>=p->nOp ){
    addr = p->nOp - 1;
    if( addr<0 ) return;
  }
  pOp = &p->aOp[addr];