SQLite

Check-in [7f17956dfb]
Login

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

Overview
Comment:Do not use deprecated interfaces internally when compiling with SQLITE_OMIT_DEPRECATED. Ticket #3813. (CVS 6523)
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 7f17956dfbf3090fd5832378e77bd83a525fed9d
User & Date: drh 2009-04-20 12:07:37.000
Context
2009-04-20
12:31
Clarify the documentation to make it clear that sqlite3_interrupt() does not effect new SQL statements that are started after the running statement count reaches zero. Ticket #3815. (CVS 6524) (check-in: 3182e8bf69 user: drh tags: trunk)
12:07
Do not use deprecated interfaces internally when compiling with SQLITE_OMIT_DEPRECATED. Ticket #3813. (CVS 6523) (check-in: 7f17956dfb user: drh tags: trunk)
11:34
Speed improvements by avoiding unnecessary calls to fstat() and ftruncate(). (CVS 6522) (check-in: 5b7e3a411a user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/func.c.
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
** This file contains the C functions that implement various SQL
** functions of SQLite.  
**
** There is only one exported symbol in this file - the function
** sqliteRegisterBuildinFunctions() found at the bottom of the file.
** All other code has file scope.
**
** $Id: func.c,v 1.233 2009/04/15 15:16:53 drh Exp $
*/
#include "sqliteInt.h"
#include <stdlib.h>
#include <assert.h>
#include "vdbeInt.h"

/*







|







12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
** This file contains the C functions that implement various SQL
** functions of SQLite.  
**
** There is only one exported symbol in this file - the function
** sqliteRegisterBuildinFunctions() found at the bottom of the file.
** All other code has file scope.
**
** $Id: func.c,v 1.234 2009/04/20 12:07:37 drh Exp $
*/
#include "sqliteInt.h"
#include <stdlib.h>
#include <assert.h>
#include "vdbeInt.h"

/*
1256
1257
1258
1259
1260
1261
1262

1263
1264



1265


1266
1267
1268
1269
1270
1271
1272
  int nVal, nSep;
  assert( argc==1 || argc==2 );
  if( sqlite3_value_type(argv[0])==SQLITE_NULL ) return;
  pAccum = (StrAccum*)sqlite3_aggregate_context(context, sizeof(*pAccum));

  if( pAccum ){
    sqlite3 *db = sqlite3_context_db_handle(context);

    pAccum->useMalloc = 1;
    pAccum->mxAlloc = db->aLimit[SQLITE_LIMIT_LENGTH];



    if( sqlite3_aggregate_count(context)>1 ){


      if( argc==2 ){
        zSep = (char*)sqlite3_value_text(argv[1]);
        nSep = sqlite3_value_bytes(argv[1]);
      }else{
        zSep = ",";
        nSep = 1;
      }







>


>
>
>
|
>
>







1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
  int nVal, nSep;
  assert( argc==1 || argc==2 );
  if( sqlite3_value_type(argv[0])==SQLITE_NULL ) return;
  pAccum = (StrAccum*)sqlite3_aggregate_context(context, sizeof(*pAccum));

  if( pAccum ){
    sqlite3 *db = sqlite3_context_db_handle(context);
    int n;
    pAccum->useMalloc = 1;
    pAccum->mxAlloc = db->aLimit[SQLITE_LIMIT_LENGTH];
#ifdef SQLITE_OMIT_DEPRECATED
    n = context->pMem->n;
#else
    n = sqlite3_aggregate_count(context);
#endif
    if( n>1 ){
      if( argc==2 ){
        zSep = (char*)sqlite3_value_text(argv[1]);
        nSep = sqlite3_value_bytes(argv[1]);
      }else{
        zSep = ",";
        nSep = 1;
      }