SQLite

Check-in [4c22da76ca]
Login

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

Overview
Comment:Fix two compiler warnings from OS-X. (CVS 823)
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 4c22da76ca91f3c59dac1c529e82ac3b04b767bd
User & Date: drh 2003-01-11 14:25:40.000
Context
2003-01-11
15:02
Remove the aOrder() array from where.c. (CVS 824) (check-in: b2c1edb47f user: drh tags: trunk)
14:25
Fix two compiler warnings from OS-X. (CVS 823) (check-in: 4c22da76ca user: drh tags: trunk)
14:19
Document the SHOW_DATATYPES pragma and add tests for it to the test suite. Make sure datatypes are show even for aliased columns. Tickets #220 and #221. (CVS 822) (check-in: e84d3afe7b user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/encode.c.
11
12
13
14
15
16
17
18
19

20
21
22
23
24
25
26
*************************************************************************
** This file contains helper routines used to translate binary data into
** a null-terminated string (suitable for use in SQLite) and back again.
** These are convenience routines for use by people who want to store binary
** data in an SQLite database.  The code in this file is used by any other
** part of the SQLite library.
**
** $Id: encode.c,v 1.3 2002/09/16 11:44:06 drh Exp $
*/


/*
** Encode a binary buffer "in" of size n bytes so that it contains
** no instances of characters '\'' or '\000'.  The output is 
** null-terminated and can be used as a string value in an INSERT
** or UPDATE statement.  Use sqlite_decode_binary() to convert the
** string back into its original binary.







|

>







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
*************************************************************************
** This file contains helper routines used to translate binary data into
** a null-terminated string (suitable for use in SQLite) and back again.
** These are convenience routines for use by people who want to store binary
** data in an SQLite database.  The code in this file is used by any other
** part of the SQLite library.
**
** $Id: encode.c,v 1.4 2003/01/11 14:25:40 drh Exp $
*/
#include <string.h>

/*
** Encode a binary buffer "in" of size n bytes so that it contains
** no instances of characters '\'' or '\000'.  The output is 
** null-terminated and can be used as a string value in an INSERT
** or UPDATE statement.  Use sqlite_decode_binary() to convert the
** string back into its original binary.
Changes to src/where.c.
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This module contains C code that generates VDBE code used to process
** the WHERE clause of SQL statements.  Also found here are subroutines
** to generate VDBE code to evaluate expressions.
**
** $Id: where.c,v 1.69 2002/12/04 21:50:16 drh Exp $
*/
#include "sqliteInt.h"

/*
** The query generator uses an array of instances of this structure to
** help it analyze the subexpressions of the WHERE clause.  Each WHERE
** clause subexpression is separated from the others by an AND operator.







|







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This module contains C code that generates VDBE code used to process
** the WHERE clause of SQL statements.  Also found here are subroutines
** to generate VDBE code to evaluate expressions.
**
** $Id: where.c,v 1.70 2003/01/11 14:25:40 drh Exp $
*/
#include "sqliteInt.h"

/*
** The query generator uses an array of instances of this structure to
** help it analyze the subexpressions of the WHERE clause.  Each WHERE
** clause subexpression is separated from the others by an AND operator.
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
  ** array fills up, the last entry might point to an expression which
  ** contains additional unfactored AND operators.
  */
  memset(aExpr, 0, sizeof(aExpr));
  nExpr = exprSplit(ARRAYSIZE(aExpr), aExpr, pWhere);
  if( nExpr==ARRAYSIZE(aExpr) ){
    char zBuf[50];
    sprintf(zBuf, "%d", ARRAYSIZE(aExpr)-1);
    sqliteSetString(&pParse->zErrMsg, "WHERE clause too complex - no more "
       "than ", zBuf, " terms allowed", 0);
    pParse->nErr++;
    return 0;
  }
  
  /* Allocate space for aOrder[] */







|







344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
  ** array fills up, the last entry might point to an expression which
  ** contains additional unfactored AND operators.
  */
  memset(aExpr, 0, sizeof(aExpr));
  nExpr = exprSplit(ARRAYSIZE(aExpr), aExpr, pWhere);
  if( nExpr==ARRAYSIZE(aExpr) ){
    char zBuf[50];
    sprintf(zBuf, "%d", (int)ARRAYSIZE(aExpr)-1);
    sqliteSetString(&pParse->zErrMsg, "WHERE clause too complex - no more "
       "than ", zBuf, " terms allowed", 0);
    pParse->nErr++;
    return 0;
  }
  
  /* Allocate space for aOrder[] */