/ Check-in [6696cd18]
Login

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

Overview
Comment:Ensure that "PRAGMA case_sensitive_like" and "PRAGMA shrink_memory" set the number of output columns to 0 (as they are statements that return no data).
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 6696cd1878be4bd44a24841b04163e52d847711e
User & Date: dan 2017-01-06 13:49:40
Context
2017-01-09
06:33
Upgrade this branch to 3.16 plus the various fixes that appeared after its release. check-in: d0e212d0 user: dan tags: begin-concurrent
2017-01-07
00:56
Avoid duplicate b-tree searches in the duplicate row detector used to implement DISTINCT. check-in: d577dda0 user: drh tags: trunk
00:42
This hack illustrates how to use the VDBE_PROFILE mechanism to show which bytecode operators are using resources other than time. In this case, the number of loops through the binary search code in sqlite3BtreeMovetoUnpacked() is measured, for the purpose of helping to identify unnecessary btree searches. check-in: 746b1836 user: drh tags: vdbe-aux-perf
2017-01-06
13:52
Ensure that "PRAGMA case_sensitive_like" and "PRAGMA shrink_memory" set the number of output columns to 0 (as they are statements that return no data). check-in: 4a97ba4e user: dan tags: branch-3.16
13:49
Ensure that "PRAGMA case_sensitive_like" and "PRAGMA shrink_memory" set the number of output columns to 0 (as they are statements that return no data). check-in: 6696cd18 user: dan tags: trunk
11:55
Improve handling of corrupt data in fts5. check-in: 609ac1c7 user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/pragma.h.

   171    171     /* ePragTyp:  */ PragTyp_CACHE_SPILL,
   172    172     /* ePragFlg:  */ PragFlg_Result0|PragFlg_SchemaReq|PragFlg_NoColumns1,
   173    173     /* ColNames:  */ 0, 0,
   174    174     /* iArg:      */ 0 },
   175    175   #endif
   176    176    {/* zName:     */ "case_sensitive_like",
   177    177     /* ePragTyp:  */ PragTyp_CASE_SENSITIVE_LIKE,
   178         -  /* ePragFlg:  */ 0,
          178  +  /* ePragFlg:  */ PragFlg_NoColumns,
   179    179     /* ColNames:  */ 0, 0,
   180    180     /* iArg:      */ 0 },
   181    181    {/* zName:     */ "cell_size_check",
   182    182     /* ePragTyp:  */ PragTyp_FLAG,
   183    183     /* ePragFlg:  */ PragFlg_Result0|PragFlg_NoColumns1,
   184    184     /* ColNames:  */ 0, 0,
   185    185     /* iArg:      */ SQLITE_CellSizeCk },
................................................................................
   489    489     /* ePragTyp:  */ PragTyp_FLAG,
   490    490     /* ePragFlg:  */ PragFlg_Result0|PragFlg_NoColumns1,
   491    491     /* ColNames:  */ 0, 0,
   492    492     /* iArg:      */ SQLITE_ShortColNames },
   493    493   #endif
   494    494    {/* zName:     */ "shrink_memory",
   495    495     /* ePragTyp:  */ PragTyp_SHRINK_MEMORY,
   496         -  /* ePragFlg:  */ 0,
          496  +  /* ePragFlg:  */ PragFlg_NoColumns,
   497    497     /* ColNames:  */ 0, 0,
   498    498     /* iArg:      */ 0 },
   499    499    {/* zName:     */ "soft_heap_limit",
   500    500     /* ePragTyp:  */ PragTyp_SOFT_HEAP_LIMIT,
   501    501     /* ePragFlg:  */ PragFlg_Result0,
   502    502     /* ColNames:  */ 0, 0,
   503    503     /* iArg:      */ 0 },

Changes to test/pragma4.test.

    62     62   
    63     63     # Without RHS:
    64     64     do_pragma_ncol_test 1.$tn.1 [lindex [split $sql =] 0] 1
    65     65   
    66     66     # With RHS:
    67     67     do_pragma_ncol_test 1.$tn.2 $sql  0
    68     68   }
           69  +
           70  +# These pragmas should never return any values.
           71  +#
           72  +foreach {tn sql} {
           73  +  1 "PRAGMA shrink_memory"
           74  +  2 "PRAGMA shrink_memory = 10"
           75  +  3 "PRAGMA case_sensitive_like = 0"
           76  +  4 "PRAGMA case_sensitive_like = 1"
           77  +  5 "PRAGMA case_sensitive_like"
           78  +} {
           79  +
           80  +  do_pragma_ncol_test 1.$tn.1 $sql 0
           81  +}
    69     82   
    70     83   
    71     84   finish_test

Changes to tool/mkpragmatab.tcl.

   267    267     COLS: table rowid parent fkid
   268    268     IF:   !defined(SQLITE_OMIT_FOREIGN_KEY) && !defined(SQLITE_OMIT_TRIGGER)
   269    269   
   270    270     NAME: parser_trace
   271    271     IF:   defined(SQLITE_DEBUG) && !defined(SQLITE_OMIT_PARSER_TRACE)
   272    272   
   273    273     NAME: case_sensitive_like
          274  +  FLAG: NoColumns
   274    275   
   275    276     NAME: integrity_check
   276    277     FLAG: NeedSchema
   277    278     IF:   !defined(SQLITE_OMIT_INTEGRITY_CHECK)
   278    279   
   279    280     NAME: quick_check
   280    281     TYPE: INTEGRITY_CHECK
................................................................................
   324    325     COLS: busy log checkpointed
   325    326     IF:   !defined(SQLITE_OMIT_WAL)
   326    327   
   327    328     NAME: wal_autocheckpoint
   328    329     IF:   !defined(SQLITE_OMIT_WAL)
   329    330   
   330    331     NAME: shrink_memory
          332  +  FLAG: NoColumns
   331    333   
   332    334     NAME: busy_timeout
   333    335     FLAG: Result0
   334    336     COLS: timeout
   335    337   
   336    338     NAME: lock_status
   337    339     FLAG: Result0