/ Ticket Change Details
Login
Overview

Artifact ID: aab555b07ecbd0ff5936e943870d75f51b61fa29
Ticket: 25ee81271091ec27a8c5e00eeffc02949a712cb7
PRAGMA case_sensitive_like=1 fails
User & Date: drh 2011-06-26 23:07:10
Changes

  1. comment changed to:
    The following test program reports that the PRAGMA fails:
    
    <blockquote><verbatim>
    #include <stdio.h>
    #include "sqlite3.h"
    
    int main(void){
      sqlite3 *db3;
      char *errmsg;
      int err;
    
      sqlite3_open("test.db", &db3);
      err = sqlite3_exec(db3, "PRAGMA case_sensitive_like=1;", 0, 0, &errmsg);
      if (err != SQLITE_OK){
        printf("Error %d: %s\n", err, errmsg);
        sqlite3_free(errmsg);
      }
      return 0;
    }
    </verbatim></blockquote>
    
    This problem was reported on the mailing list by Greg Stein.  Investigation
    shows that the PRAGMA actually works; it simply returns an SQLITE_SCHEMA
    error code instead of SQLITE_OK.  The problem was introduced by
    check-in [957b2ab67c61] by the removal of "p->expired = 0;" from 
    the sqlite3VdbeAddOp3().  The case_sensitive_like function causes
    a new LIKE function to be registered, which sets "p->expired = 1",
    leading to the error.  It is unclear (yet) why this problem was not
    picked up by tests.
    
  2. Untracked field detected: "Application_Fault"
  3. foundin changed to: "3.7.7"
  4. severity changed to: "Important"
  5. status changed to: "Open"
  6. subsystem changed to: "Unknown"
  7. title changed to: "PRAGMA case_sensitive_like=1 fails"
  8. type changed to: "Code_Defect"