sqllogictest
Check-in [ab656a0873]
Not logged in

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

Overview
Comment:Update makefiles to build SQLite with the necessary options. Update SQLite to the latest version. Change run-all.sh so that it runs tests in sorted order.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:ab656a08739dbccee247719dfa082388a9e7e967
User & Date: drh 2010-12-07 03:33:33
Context
2010-12-07
03:38
More changes in support of evidence testing. check-in: fb75130b8f user: drh tags: trunk
03:33
Update makefiles to build SQLite with the necessary options. Update SQLite to the latest version. Change run-all.sh so that it runs tests in sorted order. check-in: ab656a0873 user: drh tags: trunk
02:30
Add the --parameters command-line option. If the argument is optimizer=N with N a number, then on the SQLite engine, invoke sqlite3_test_control() to disable the optimizations identified by bitmask N. Update the run-all.sh script so that all tests are run three times with different optimizer settings - to verify that the same answers are generated regardless. check-in: 3a0c7f7549 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/Makefile.no-odbc.

37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
OPTS += -DSQLITE_OMIT_ANALYZE
OPTS += -DSQLITE_OMIT_ATTACH
OPTS += -DSQLITE_OMIT_AUTHORIZATION
OPTS += -DSQLITE_OMIT_AUTOINCREMENT
OPTS += -DSQLITE_OMIT_AUTOVACUUM
#OPTS += -DSQLITE_OMIT_BUILTIN_TEST
OPTS += -DSQLITE_OMIT_COMPLETE
OPTS += -DSQLITE_OMIT_CONFLICT_CLAUSE
OPTS += -DSQLITE_OMIT_DATETIME_FUNCS
OPTS += -DSQLITE_OMIT_GET_TABLE
OPTS += -DSQLITE_OMIT_INCRBLOB
OPTS += -DSQLITE_OMIT_LOAD_EXTENSION
OPTS += -DSQLITE_OMIT_MEMORYDB
OPTS += -DSQLITE_OMIT_PRAGMA
OPTS += -DSQLITE_OMIT_REINDEX







|







37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
OPTS += -DSQLITE_OMIT_ANALYZE
OPTS += -DSQLITE_OMIT_ATTACH
OPTS += -DSQLITE_OMIT_AUTHORIZATION
OPTS += -DSQLITE_OMIT_AUTOINCREMENT
OPTS += -DSQLITE_OMIT_AUTOVACUUM
#OPTS += -DSQLITE_OMIT_BUILTIN_TEST
OPTS += -DSQLITE_OMIT_COMPLETE
#OPTS += -DSQLITE_OMIT_CONFLICT_CLAUSE
OPTS += -DSQLITE_OMIT_DATETIME_FUNCS
OPTS += -DSQLITE_OMIT_GET_TABLE
OPTS += -DSQLITE_OMIT_INCRBLOB
OPTS += -DSQLITE_OMIT_LOAD_EXTENSION
OPTS += -DSQLITE_OMIT_MEMORYDB
OPTS += -DSQLITE_OMIT_PRAGMA
OPTS += -DSQLITE_OMIT_REINDEX

Changes to src/run-all.sh.

1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh
#
# Run this script to run all test cases
#
find ../test -name '*.test' -print |
  while read i
  do
    ./sqllogictest -verify $i
    ./sqllogictest -verify -parameter optimizer=64 $i
    ./sqllogictest -verify -parameter optimizer=255 $i
  done




|






1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh
#
# Run this script to run all test cases
#
find ../test -name '*.test' -print | sort |
  while read i
  do
    ./sqllogictest -verify $i
    ./sqllogictest -verify -parameter optimizer=64 $i
    ./sqllogictest -verify -parameter optimizer=255 $i
  done

Changes to src/sqlite3.c.

103320
103321
103322
103323
103324
103325
103326
103327
103328
103329
103330
103331
103332
103333
103334
103335
103336
103337
103338
103339
103340
103341
103342
103343
103344
103345
......
103348
103349
103350
103351
103352
103353
103354
103355
103356
103357

103358
103359
103360
103361
103362
103363
103364
103365
103366
103367
103368
103369
103370
103371
103372
103373
103374
103375
103376
103377
103378
103379
103380
103381
103382
103383
103384
103385
103386
103387
103388
103389
103390
103391
103392
103393
103394
103395
103396
103397
103398
103399
103400
103401
103402
103403
103404
103405
103406
103407
103408
103409
103410
103411
103412
103413
103414
103415
103416
103417
103418
......
103420
103421
103422
103423
103424
103425
103426
103427
103428
103429
103430
103431
103432
103433
103434
103435
103436
103437
103438
103439
103440
......
103512
103513
103514
103515
103516
103517
103518
103519
103520
103521
103522
103523
103524
103525
103526
103527
103528
103529
103530
103531
103532
103533
103534
103535
103536
103537
103538
103539
103540
103541
103542
103543
103544
103545
103546
103547


103548
103549
103550
103551
103552
103553
103554
103555
103556
103557
103558
103559
103560
103561
103562
103563
** The code in this file implements a function that determines whether
** or not a given identifier is really an SQL keyword.  The same thing
** might be implemented more directly using a hand-written hash table.
** But by using this automatically generated code, the size of the code
** is substantially reduced.  This is important for embedded applications
** on platforms with limited memory.
*/
/* Hash score: 139 */
static int keywordCode(const char *z, int n){
  /* zText[] encodes 695 bytes of keywords in 452 bytes */
  /*   BEFOREIGNOREGEXPLAINDEXEDESCAPEACHECKEYCONSTRAINTERSECTABLEFT      */
  /*   HENDEFERRABLELSELECTRANSACTIONATURALIKEXCEPTRIGGERAISEXCLUSIVE     */
  /*   XISTSAVEPOINTOFFSETEMPORARYUNIQUERYBEGINNEREFERENCESBETWEEN        */
  /*   OTNULLIMITCASCADELETECASECOLLATECREATECURRENT_DATEGROUPDATE        */
  /*   IMMEDIATEJOINSERTMATCHAVINGLOBYPLANDEFAULTRELEASEVALUESWHEN        */
  /*   WHERESTRICTABORTAFTERIGHTCASTCOMMITCROSSCURRENT_TIMESTAMP          */
  /*   RIMARYDEFERREDISTINCTDROPFAILFROMFULLIFINSTEADISNULLORDER          */
  /*   OLLBACKOUTEROWUNIONUSINGVIEWINITIALLY                              */
  static const char zText[451] = {
    'B','E','F','O','R','E','I','G','N','O','R','E','G','E','X','P','L','A',
    'I','N','D','E','X','E','D','E','S','C','A','P','E','A','C','H','E','C',
    'K','E','Y','C','O','N','S','T','R','A','I','N','T','E','R','S','E','C',
    'T','A','B','L','E','F','T','H','E','N','D','E','F','E','R','R','A','B',
    'L','E','L','S','E','L','E','C','T','R','A','N','S','A','C','T','I','O',
    'N','A','T','U','R','A','L','I','K','E','X','C','E','P','T','R','I','G',
    'G','E','R','A','I','S','E','X','C','L','U','S','I','V','E','X','I','S',
................................................................................
    'N','N','E','R','E','F','E','R','E','N','C','E','S','B','E','T','W','E',
    'E','N','O','T','N','U','L','L','I','M','I','T','C','A','S','C','A','D',
    'E','L','E','T','E','C','A','S','E','C','O','L','L','A','T','E','C','R',
    'E','A','T','E','C','U','R','R','E','N','T','_','D','A','T','E','G','R',
    'O','U','P','D','A','T','E','I','M','M','E','D','I','A','T','E','J','O',
    'I','N','S','E','R','T','M','A','T','C','H','A','V','I','N','G','L','O',
    'B','Y','P','L','A','N','D','E','F','A','U','L','T','R','E','L','E','A',
    'S','E','V','A','L','U','E','S','W','H','E','N','W','H','E','R','E','S',
    'T','R','I','C','T','A','B','O','R','T','A','F','T','E','R','I','G','H',
    'T','C','A','S','T','C','O','M','M','I','T','C','R','O','S','S','C','U',

    'R','R','E','N','T','_','T','I','M','E','S','T','A','M','P','R','I','M',
    'A','R','Y','D','E','F','E','R','R','E','D','I','S','T','I','N','C','T',
    'D','R','O','P','F','A','I','L','F','R','O','M','F','U','L','L','I','F',
    'I','N','S','T','E','A','D','I','S','N','U','L','L','O','R','D','E','R',
    'O','L','L','B','A','C','K','O','U','T','E','R','O','W','U','N','I','O',
    'N','U','S','I','N','G','V','I','E','W','I','N','I','T','I','A','L','L',
    'Y',
  };
  static const unsigned char aHash[127] = {
      65,  90,  99,  63,   0,  41,   0,   0,  75,   0,  66,   0,   0,
      38,   4,  70,  96,   0,  81,  76,  67,  95,   0,  23,   0,   0,
      34,   0, 102,  78,   0,  19,  36,   0,   1,   0,   0,  58,  59,
       0,  57,  11,   0,  44,  71,  87,   0, 101,  86,   0,   0,  40,
       0,  88,  21,   0,   0,   0, 104,   0,  20,   0,  10,  68,  22,
       0,   0,   0, 106,  91,  48, 105,  45,  25,  61,   0,  72,   0,
      85,  29,   0,  84,   0,   0,   0,  82,   2,  83,  80,  94,   6,
      14,  93,   0,  79,   0,  74,  73,  69,  31,   0, 103,   0,  97,
      50,  42,  53,   0,   0,  16,  35,   0, 100,   0,  15,   0,   0,
      26,   0,  77,  51,  52,   0,  17,  49,   0,  62,
  };
  static const unsigned char aNext[106] = {
       0,   0,   0,   0,   0,   0,   0,   0,   0,   9,   0,   0,   0,
       0,   0,   0,   0,   0,   5,   0,   0,   0,   0,   0,  12,   0,
       0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
      32,   0,  18,   0,   0,   0,   0,  28,   0,  27,   0,  46,   0,
       0,   0,   0,   0,   0,  54,   0,   0,   8,  43,   0,  37,   0,
       0,  39,   0,   0,   0,   0,  33,   0,   0,   0,   0,   0,   0,
       0,   0,  24,   0,   0,   0,   3,  60,   0,   0,  13,   0,  89,
       0,   0,  92,   0,   7,  64,   0,  30,  98,  55,  47,   0,  56,
       0,   0,
  };
  static const unsigned char aLen[106] = {
       6,   7,   3,   6,   6,   7,   7,   5,   4,   6,   4,   5,   3,
      10,   9,   2,   5,   4,   4,   3,  10,   4,   6,  11,   6,   2,
       7,   4,   6,   7,   5,   9,   6,   9,   4,   2,   6,   2,   3,
       9,   4,   2,   6,   5,   5,   5,  10,   7,   7,   3,   2,   4,
       5,   7,   3,   6,   4,   7,   6,  12,   5,   6,   9,   4,   6,
       5,   6,   4,   2,   4,   3,   7,   7,   2,   6,   4,   5,   8,
       5,   5,   5,   4,   6,   5,  17,  12,   7,   8,   8,   2,   4,
       4,   4,   4,   2,   7,   6,   5,   8,   5,   3,   5,   5,   4,
       9,   3,
  };
  static const unsigned short int aOffset[106] = {
       0,   2,   2,   6,  10,  13,  18,  18,  24,  25,  30,  32,  36,
      39,  46,  46,  54,  57,  60,  62,  64,  73,  75,  80,  85,  89,
      90,  96,  99, 104, 110, 114, 122, 127, 133, 135, 136, 136, 139,
     141, 141, 145, 150, 153, 158, 161, 165, 175, 181, 181, 181, 184,
     187, 192, 193, 197, 203, 207, 214, 220, 232, 235, 241, 250, 252,
     258, 262, 267, 270, 272, 274, 276, 283, 287, 290, 296, 300, 303,
     311, 316, 320, 325, 329, 335, 340, 340, 356, 363, 370, 371, 378,
     382, 386, 390, 394, 396, 403, 409, 413, 421, 425, 428, 433, 438,
     442, 447,
  };
  static const unsigned char aCode[106] = {
    TK_BEFORE,     TK_FOREIGN,    TK_FOR,        TK_IGNORE,     TK_LIKE_KW,    
    TK_EXPLAIN,    TK_INDEXED,    TK_INDEX,      TK_DESC,       TK_ESCAPE,     
    TK_EACH,       TK_CHECK,      TK_KEY,        TK_CONSTRAINT, TK_INTERSECT,  
    TK_IN,         TK_TABLE,      TK_JOIN_KW,    TK_THEN,       TK_END,        
    TK_DEFERRABLE, TK_ELSE,       TK_SELECT,     TK_TRANSACTION,TK_ACTION,     
    TK_ON,         TK_JOIN_KW,    TK_LIKE_KW,    TK_EXCEPT,     TK_TRIGGER,    
    TK_RAISE,      TK_EXCLUSIVE,  TK_EXISTS,     TK_SAVEPOINT,  TK_INTO,       
................................................................................
    TK_TEMP,       TK_OR,         TK_UNIQUE,     TK_QUERY,      TK_BEGIN,      
    TK_JOIN_KW,    TK_REFERENCES, TK_BETWEEN,    TK_NOTNULL,    TK_NOT,        
    TK_NO,         TK_NULL,       TK_LIMIT,      TK_CASCADE,    TK_ASC,        
    TK_DELETE,     TK_CASE,       TK_COLLATE,    TK_CREATE,     TK_CTIME_KW,   
    TK_GROUP,      TK_UPDATE,     TK_IMMEDIATE,  TK_JOIN,       TK_INSERT,     
    TK_MATCH,      TK_HAVING,     TK_LIKE_KW,    TK_BY,         TK_PLAN,       
    TK_AND,        TK_DEFAULT,    TK_RELEASE,    TK_AS,         TK_VALUES,     
    TK_WHEN,       TK_WHERE,      TK_RESTRICT,   TK_ABORT,      TK_AFTER,      
    TK_JOIN_KW,    TK_CAST,       TK_COMMIT,     TK_JOIN_KW,    TK_CTIME_KW,   
    TK_CTIME_KW,   TK_PRIMARY,    TK_DEFERRED,   TK_DISTINCT,   TK_IS,         
    TK_DROP,       TK_FAIL,       TK_FROM,       TK_JOIN_KW,    TK_IF,         
    TK_INSTEAD,    TK_ISNULL,     TK_ORDER,      TK_ROLLBACK,   TK_JOIN_KW,    
    TK_ROW,        TK_UNION,      TK_USING,      TK_VIEW,       TK_INITIALLY,  
    TK_ALL,        
  };
  int h, i;
  if( n<2 ) return TK_ID;
  h = ((charMap(z[0])*4) ^
      (charMap(z[n-1])*3) ^
      n) % 127;
  for(i=((int)aHash[h])-1; i>=0; i=((int)aNext[i])-1){
................................................................................
      testcase( i==70 ); /* AND */
      testcase( i==71 ); /* DEFAULT */
      testcase( i==72 ); /* RELEASE */
      testcase( i==73 ); /* AS */
      testcase( i==74 ); /* VALUES */
      testcase( i==75 ); /* WHEN */
      testcase( i==76 ); /* WHERE */
      testcase( i==77 ); /* RESTRICT */
      testcase( i==78 ); /* ABORT */
      testcase( i==79 ); /* AFTER */
      testcase( i==80 ); /* RIGHT */
      testcase( i==81 ); /* CAST */
      testcase( i==82 ); /* COMMIT */
      testcase( i==83 ); /* CROSS */
      testcase( i==84 ); /* CURRENT_TIMESTAMP */
      testcase( i==85 ); /* CURRENT_TIME */
      testcase( i==86 ); /* PRIMARY */
      testcase( i==87 ); /* DEFERRED */
      testcase( i==88 ); /* DISTINCT */
      testcase( i==89 ); /* IS */
      testcase( i==90 ); /* DROP */
      testcase( i==91 ); /* FAIL */
      testcase( i==92 ); /* FROM */
      testcase( i==93 ); /* FULL */
      testcase( i==94 ); /* IF */
      testcase( i==95 ); /* INSTEAD */
      testcase( i==96 ); /* ISNULL */
      testcase( i==97 ); /* ORDER */
      testcase( i==98 ); /* ROLLBACK */
      testcase( i==99 ); /* OUTER */
      testcase( i==100 ); /* ROW */
      testcase( i==101 ); /* UNION */
      testcase( i==102 ); /* USING */
      testcase( i==103 ); /* VIEW */
      testcase( i==104 ); /* INITIALLY */
      testcase( i==105 ); /* ALL */


      return aCode[i];
    }
  }
  return TK_ID;
}
SQLITE_PRIVATE int sqlite3KeywordCode(const unsigned char *z, int n){
  return keywordCode((char*)z, n);
}
#define SQLITE_N_KEYWORD 106

/************** End of keywordhash.h *****************************************/
/************** Continuing where we left off in tokenize.c *******************/


/*
** If X is a character that can be used in an identifier then







|

|





|
|
|
|







 







|
|
|
>
|
|
|
|
|
|
<


|
|
|
|
|
|
|
|
|


|





|
|
|
|

|





|
|
|
|

|






|
|
|

|







 







|
|
|
|
|
|
|







 







|


|


|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>
>








|







103320
103321
103322
103323
103324
103325
103326
103327
103328
103329
103330
103331
103332
103333
103334
103335
103336
103337
103338
103339
103340
103341
103342
103343
103344
103345
......
103348
103349
103350
103351
103352
103353
103354
103355
103356
103357
103358
103359
103360
103361
103362
103363
103364

103365
103366
103367
103368
103369
103370
103371
103372
103373
103374
103375
103376
103377
103378
103379
103380
103381
103382
103383
103384
103385
103386
103387
103388
103389
103390
103391
103392
103393
103394
103395
103396
103397
103398
103399
103400
103401
103402
103403
103404
103405
103406
103407
103408
103409
103410
103411
103412
103413
103414
103415
103416
103417
103418
......
103420
103421
103422
103423
103424
103425
103426
103427
103428
103429
103430
103431
103432
103433
103434
103435
103436
103437
103438
103439
103440
......
103512
103513
103514
103515
103516
103517
103518
103519
103520
103521
103522
103523
103524
103525
103526
103527
103528
103529
103530
103531
103532
103533
103534
103535
103536
103537
103538
103539
103540
103541
103542
103543
103544
103545
103546
103547
103548
103549
103550
103551
103552
103553
103554
103555
103556
103557
103558
103559
103560
103561
103562
103563
103564
103565
** The code in this file implements a function that determines whether
** or not a given identifier is really an SQL keyword.  The same thing
** might be implemented more directly using a hand-written hash table.
** But by using this automatically generated code, the size of the code
** is substantially reduced.  This is important for embedded applications
** on platforms with limited memory.
*/
/* Hash score: 145 */
static int keywordCode(const char *z, int n){
  /* zText[] encodes 712 bytes of keywords in 467 bytes */
  /*   BEFOREIGNOREGEXPLAINDEXEDESCAPEACHECKEYCONSTRAINTERSECTABLEFT      */
  /*   HENDEFERRABLELSELECTRANSACTIONATURALIKEXCEPTRIGGERAISEXCLUSIVE     */
  /*   XISTSAVEPOINTOFFSETEMPORARYUNIQUERYBEGINNEREFERENCESBETWEEN        */
  /*   OTNULLIMITCASCADELETECASECOLLATECREATECURRENT_DATEGROUPDATE        */
  /*   IMMEDIATEJOINSERTMATCHAVINGLOBYPLANDEFAULTRELEASEVALUESWHEN        */
  /*   WHEREPLACEABORTAFTERESTRICTCASTCOMMITCONFLICTCROSS                 */
  /*   CURRENT_TIMESTAMPRIMARYDEFERREDISTINCTDROPFAILFROMFULLIF           */
  /*   INSTEADISNULLORDERIGHTOUTEROLLBACKROWUNIONUSINGVIEWINITIALLY       */
  static const char zText[466] = {
    'B','E','F','O','R','E','I','G','N','O','R','E','G','E','X','P','L','A',
    'I','N','D','E','X','E','D','E','S','C','A','P','E','A','C','H','E','C',
    'K','E','Y','C','O','N','S','T','R','A','I','N','T','E','R','S','E','C',
    'T','A','B','L','E','F','T','H','E','N','D','E','F','E','R','R','A','B',
    'L','E','L','S','E','L','E','C','T','R','A','N','S','A','C','T','I','O',
    'N','A','T','U','R','A','L','I','K','E','X','C','E','P','T','R','I','G',
    'G','E','R','A','I','S','E','X','C','L','U','S','I','V','E','X','I','S',
................................................................................
    'N','N','E','R','E','F','E','R','E','N','C','E','S','B','E','T','W','E',
    'E','N','O','T','N','U','L','L','I','M','I','T','C','A','S','C','A','D',
    'E','L','E','T','E','C','A','S','E','C','O','L','L','A','T','E','C','R',
    'E','A','T','E','C','U','R','R','E','N','T','_','D','A','T','E','G','R',
    'O','U','P','D','A','T','E','I','M','M','E','D','I','A','T','E','J','O',
    'I','N','S','E','R','T','M','A','T','C','H','A','V','I','N','G','L','O',
    'B','Y','P','L','A','N','D','E','F','A','U','L','T','R','E','L','E','A',
    'S','E','V','A','L','U','E','S','W','H','E','N','W','H','E','R','E','P',
    'L','A','C','E','A','B','O','R','T','A','F','T','E','R','E','S','T','R',
    'I','C','T','C','A','S','T','C','O','M','M','I','T','C','O','N','F','L',
    'I','C','T','C','R','O','S','S','C','U','R','R','E','N','T','_','T','I',
    'M','E','S','T','A','M','P','R','I','M','A','R','Y','D','E','F','E','R',
    'R','E','D','I','S','T','I','N','C','T','D','R','O','P','F','A','I','L',
    'F','R','O','M','F','U','L','L','I','F','I','N','S','T','E','A','D','I',
    'S','N','U','L','L','O','R','D','E','R','I','G','H','T','O','U','T','E',
    'R','O','L','L','B','A','C','K','R','O','W','U','N','I','O','N','U','S',
    'I','N','G','V','I','E','W','I','N','I','T','I','A','L','L','Y',

  };
  static const unsigned char aHash[127] = {
      65,  91, 102,  63,   0,  41,   0,   0,  75,   0,  66,   0,   0,
      38,   4,  70,  97,   0, 100,  76,  67,  96,   0,  23,   0,   0,
      34,   0, 104,  81,   0,  19,  36,   0,   1,   0,   0,  58,  59,
       0,  57,  11,   0,  44,  71,  88,   0, 103,  87,   0,   0,  40,
       0,  89,  21,   0,   0,   0, 106,   0,  20,   0,  10,  68,  22,
       0,   0,   0, 108,  92,  48, 107,  45,  25,  61,   0,  72,   0,
      86,  29,   0,  85,   0,   0,   0,  82,   2,  83,  80,  95,   6,
      14,  94,   0,  79,   0,  74,  78,  69,  31,   0, 105,   0,  98,
      50,  42,  53,   0,   0,  16,  35,   0, 101,   0,  15,   0,   0,
      26,   0,  77,  51,  52,   0,  17,  49,   0,  62,
  };
  static const unsigned char aNext[108] = {
       0,   0,   0,   0,   0,   0,   0,   0,   0,   9,   0,   0,   0,
       0,   0,   0,   0,   0,   5,   0,   0,   0,   0,   0,  12,   0,
       0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
      32,   0,  18,   0,   0,   0,   0,  28,   0,  27,   0,  46,   0,
       0,   0,   0,   0,   0,  54,   0,   0,   8,  43,   0,  37,   0,
       0,  39,   0,   0,   0,   0,  33,   0,   0,   0,   0,   0,  73,
       0,   0,   0,   0,   0,   0,   0,   3,  60,   0,   0,  13,   0,
      90,  84,   0,  93,   0,   7,  64,   0,  24,  99,  30,  55,  47,
       0,  56,   0,   0,
  };
  static const unsigned char aLen[108] = {
       6,   7,   3,   6,   6,   7,   7,   5,   4,   6,   4,   5,   3,
      10,   9,   2,   5,   4,   4,   3,  10,   4,   6,  11,   6,   2,
       7,   4,   6,   7,   5,   9,   6,   9,   4,   2,   6,   2,   3,
       9,   4,   2,   6,   5,   5,   5,  10,   7,   7,   3,   2,   4,
       5,   7,   3,   6,   4,   7,   6,  12,   5,   6,   9,   4,   6,
       5,   6,   4,   2,   4,   3,   7,   7,   2,   6,   4,   5,   7,
       5,   5,   8,   4,   6,   8,   5,  17,  12,   7,   8,   8,   2,
       4,   4,   4,   4,   2,   7,   6,   5,   5,   5,   8,   3,   5,
       5,   4,   9,   3,
  };
  static const unsigned short int aOffset[108] = {
       0,   2,   2,   6,  10,  13,  18,  18,  24,  25,  30,  32,  36,
      39,  46,  46,  54,  57,  60,  62,  64,  73,  75,  80,  85,  89,
      90,  96,  99, 104, 110, 114, 122, 127, 133, 135, 136, 136, 139,
     141, 141, 145, 150, 153, 158, 161, 165, 175, 181, 181, 181, 184,
     187, 192, 193, 197, 203, 207, 214, 220, 232, 235, 241, 250, 252,
     258, 262, 267, 270, 272, 274, 276, 283, 287, 290, 296, 300, 303,
     310, 315, 319, 327, 331, 337, 345, 350, 350, 366, 373, 380, 381,
     388, 392, 396, 400, 404, 406, 413, 419, 423, 428, 432, 440, 443,
     448, 453, 457, 462,
  };
  static const unsigned char aCode[108] = {
    TK_BEFORE,     TK_FOREIGN,    TK_FOR,        TK_IGNORE,     TK_LIKE_KW,    
    TK_EXPLAIN,    TK_INDEXED,    TK_INDEX,      TK_DESC,       TK_ESCAPE,     
    TK_EACH,       TK_CHECK,      TK_KEY,        TK_CONSTRAINT, TK_INTERSECT,  
    TK_IN,         TK_TABLE,      TK_JOIN_KW,    TK_THEN,       TK_END,        
    TK_DEFERRABLE, TK_ELSE,       TK_SELECT,     TK_TRANSACTION,TK_ACTION,     
    TK_ON,         TK_JOIN_KW,    TK_LIKE_KW,    TK_EXCEPT,     TK_TRIGGER,    
    TK_RAISE,      TK_EXCLUSIVE,  TK_EXISTS,     TK_SAVEPOINT,  TK_INTO,       
................................................................................
    TK_TEMP,       TK_OR,         TK_UNIQUE,     TK_QUERY,      TK_BEGIN,      
    TK_JOIN_KW,    TK_REFERENCES, TK_BETWEEN,    TK_NOTNULL,    TK_NOT,        
    TK_NO,         TK_NULL,       TK_LIMIT,      TK_CASCADE,    TK_ASC,        
    TK_DELETE,     TK_CASE,       TK_COLLATE,    TK_CREATE,     TK_CTIME_KW,   
    TK_GROUP,      TK_UPDATE,     TK_IMMEDIATE,  TK_JOIN,       TK_INSERT,     
    TK_MATCH,      TK_HAVING,     TK_LIKE_KW,    TK_BY,         TK_PLAN,       
    TK_AND,        TK_DEFAULT,    TK_RELEASE,    TK_AS,         TK_VALUES,     
    TK_WHEN,       TK_WHERE,      TK_REPLACE,    TK_ABORT,      TK_AFTER,      
    TK_RESTRICT,   TK_CAST,       TK_COMMIT,     TK_CONFLICT,   TK_JOIN_KW,    
    TK_CTIME_KW,   TK_CTIME_KW,   TK_PRIMARY,    TK_DEFERRED,   TK_DISTINCT,   
    TK_IS,         TK_DROP,       TK_FAIL,       TK_FROM,       TK_JOIN_KW,    
    TK_IF,         TK_INSTEAD,    TK_ISNULL,     TK_ORDER,      TK_JOIN_KW,    
    TK_JOIN_KW,    TK_ROLLBACK,   TK_ROW,        TK_UNION,      TK_USING,      
    TK_VIEW,       TK_INITIALLY,  TK_ALL,        
  };
  int h, i;
  if( n<2 ) return TK_ID;
  h = ((charMap(z[0])*4) ^
      (charMap(z[n-1])*3) ^
      n) % 127;
  for(i=((int)aHash[h])-1; i>=0; i=((int)aNext[i])-1){
................................................................................
      testcase( i==70 ); /* AND */
      testcase( i==71 ); /* DEFAULT */
      testcase( i==72 ); /* RELEASE */
      testcase( i==73 ); /* AS */
      testcase( i==74 ); /* VALUES */
      testcase( i==75 ); /* WHEN */
      testcase( i==76 ); /* WHERE */
      testcase( i==77 ); /* REPLACE */
      testcase( i==78 ); /* ABORT */
      testcase( i==79 ); /* AFTER */
      testcase( i==80 ); /* RESTRICT */
      testcase( i==81 ); /* CAST */
      testcase( i==82 ); /* COMMIT */
      testcase( i==83 ); /* CONFLICT */
      testcase( i==84 ); /* CROSS */
      testcase( i==85 ); /* CURRENT_TIMESTAMP */
      testcase( i==86 ); /* CURRENT_TIME */
      testcase( i==87 ); /* PRIMARY */
      testcase( i==88 ); /* DEFERRED */
      testcase( i==89 ); /* DISTINCT */
      testcase( i==90 ); /* IS */
      testcase( i==91 ); /* DROP */
      testcase( i==92 ); /* FAIL */
      testcase( i==93 ); /* FROM */
      testcase( i==94 ); /* FULL */
      testcase( i==95 ); /* IF */
      testcase( i==96 ); /* INSTEAD */
      testcase( i==97 ); /* ISNULL */
      testcase( i==98 ); /* ORDER */
      testcase( i==99 ); /* RIGHT */
      testcase( i==100 ); /* OUTER */
      testcase( i==101 ); /* ROLLBACK */
      testcase( i==102 ); /* ROW */
      testcase( i==103 ); /* UNION */
      testcase( i==104 ); /* USING */
      testcase( i==105 ); /* VIEW */
      testcase( i==106 ); /* INITIALLY */
      testcase( i==107 ); /* ALL */
      return aCode[i];
    }
  }
  return TK_ID;
}
SQLITE_PRIVATE int sqlite3KeywordCode(const unsigned char *z, int n){
  return keywordCode((char*)z, n);
}
#define SQLITE_N_KEYWORD 108

/************** End of keywordhash.h *****************************************/
/************** Continuing where we left off in tokenize.c *******************/


/*
** If X is a character that can be used in an identifier then

Changes to src/sqllogictest.mk.

37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
OPTS += -DSQLITE_OMIT_ANALYZE
OPTS += -DSQLITE_OMIT_ATTACH
OPTS += -DSQLITE_OMIT_AUTHORIZATION
OPTS += -DSQLITE_OMIT_AUTOINCREMENT
OPTS += -DSQLITE_OMIT_AUTOVACUUM
#OPTS += -DSQLITE_OMIT_BUILTIN_TEST
OPTS += -DSQLITE_OMIT_COMPLETE
OPTS += -DSQLITE_OMIT_CONFLICT_CLAUSE
OPTS += -DSQLITE_OMIT_DATETIME_FUNCS
OPTS += -DSQLITE_OMIT_GET_TABLE
OPTS += -DSQLITE_OMIT_INCRBLOB
OPTS += -DSQLITE_OMIT_LOAD_EXTENSION
OPTS += -DSQLITE_OMIT_MEMORYDB
OPTS += -DSQLITE_OMIT_PRAGMA
OPTS += -DSQLITE_OMIT_REINDEX







|







37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
OPTS += -DSQLITE_OMIT_ANALYZE
OPTS += -DSQLITE_OMIT_ATTACH
OPTS += -DSQLITE_OMIT_AUTHORIZATION
OPTS += -DSQLITE_OMIT_AUTOINCREMENT
OPTS += -DSQLITE_OMIT_AUTOVACUUM
#OPTS += -DSQLITE_OMIT_BUILTIN_TEST
OPTS += -DSQLITE_OMIT_COMPLETE
#OPTS += -DSQLITE_OMIT_CONFLICT_CLAUSE
OPTS += -DSQLITE_OMIT_DATETIME_FUNCS
OPTS += -DSQLITE_OMIT_GET_TABLE
OPTS += -DSQLITE_OMIT_INCRBLOB
OPTS += -DSQLITE_OMIT_LOAD_EXTENSION
OPTS += -DSQLITE_OMIT_MEMORYDB
OPTS += -DSQLITE_OMIT_PRAGMA
OPTS += -DSQLITE_OMIT_REINDEX