Documentation Source Text

Check-in [bc4c1a7626]
Login

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

Overview
Comment:Document the fact that using PRAGMA case_sensitive_like in a database that uses LIKE operators in the schema can lead to problems.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:bc4c1a7626e875f611a2530b84f7392a07ec16d945954237205d6179a45caa8b
User & Date: drh 2019-05-08 17:26:15
Context
2019-05-17
17:20
Some redirects are now permanent. check-in: dd8def223f user: drh tags: trunk
2019-05-08
17:26
Document the fact that using PRAGMA case_sensitive_like in a database that uses LIKE operators in the schema can lead to problems. check-in: bc4c1a7626 user: drh tags: trunk
16:53
Clarify the ON CONFLICT clause documentation to make clear that FK violations always work as ABORT or ROLLBACK, never FAIL, IGNORE, or REPLACE. check-in: 90a2cca5d0 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to pages/compile.in.

1487
1488
1489
1490
1491
1492
1493





1494
1495
1496
1497
1498
1499
1500
  all entries in a table (in other words, an optimization that helps
  "SELECT count(*) FROM table" run faster) is omitted.
}

COMPILE_OPTION {SQLITE_OMIT_BUILTIN_TEST} {
  This compile-time option has been renamed to [SQLITE_UNTESTABLE].
}






COMPILE_OPTION {SQLITE_OMIT_CAST} {
  This option causes SQLite to omit support for the CAST operator.
}

COMPILE_OPTION {SQLITE_OMIT_CHECK} {
  This option causes SQLite to omit support for CHECK constraints.







>
>
>
>
>







1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
  all entries in a table (in other words, an optimization that helps
  "SELECT count(*) FROM table" run faster) is omitted.
}

COMPILE_OPTION {SQLITE_OMIT_BUILTIN_TEST} {
  This compile-time option has been renamed to [SQLITE_UNTESTABLE].
}

COMPILE_OPTION {SQLITE_OMIT_CASE_SENSITIVE_LIKE_PRAGMA} {
  This compile-time option disables the [PRAGMA case_sensitive_like]
  command.
}

COMPILE_OPTION {SQLITE_OMIT_CAST} {
  This option causes SQLite to omit support for the CAST operator.
}

COMPILE_OPTION {SQLITE_OMIT_CHECK} {
  This option causes SQLite to omit support for CHECK constraints.

Changes to pages/pragma.in.

417
418
419
420
421
422
423
424
425






426
427
428














429
430
431
432
433
434
435
    on the value of the case_sensitive_like pragma.
    ^When case_sensitive_like is disabled, the default LIKE behavior is
    expressed.  ^(When case_sensitive_like is enabled, case becomes
    significant.  So, for example,
    <b>'a' LIKE 'A'</b> is false but <b>'a' LIKE 'a'</b> is still true.)^</p>

    <p>^This pragma uses [sqlite3_create_function()] to overload the
    LIKE and GLOB functions, which may override previous implementations
    of LIKE and GLOB registered by the application.  ^(This pragma






    only changes the behavior of the SQL [LIKE] operator.  It does not
    change the behavior of the [sqlite3_strlike()] C-language interface,
    which is always case insensitive.)^</p>














}

Pragma cell_size_check {
    <p>^(<b>PRAGMA cell_size_check
       <br>PRAGMA cell_size_check = </b><i>boolean</i><b>;</b></p>
    <p>The cell_size_check pragma enables or disables additional sanity
    checking on database b-tree pages as they are initially read from disk.)^







|
|
>
>
>
>
>
>


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







417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
    on the value of the case_sensitive_like pragma.
    ^When case_sensitive_like is disabled, the default LIKE behavior is
    expressed.  ^(When case_sensitive_like is enabled, case becomes
    significant.  So, for example,
    <b>'a' LIKE 'A'</b> is false but <b>'a' LIKE 'a'</b> is still true.)^</p>

    <p>^This pragma uses [sqlite3_create_function()] to overload the
    LIKE functions, which may override previous implementations
    of LIKE registered by the application.  For example, if the application
    is compiled with the [SQLITE_ENABLE_ICU|ICU Extension] which substitutes its
    own LIKE operators that understand Unicode case folding, then invoking
    this pragma will cause LIKE to revert to its default behavior of only
    doing case folding for ASCII characters.

    <p>^(This pragma
    only changes the behavior of the SQL [LIKE] operator.  It does not
    change the behavior of the [sqlite3_strlike()] C-language interface,
    which is always case insensitive.)^  The GLOB operator is always
    case sensitive and is not affected by this PRAGMA.</p>

    <p>If the database schema contains LIKE operators, for example in CHECK
    constraints of table definitions or in the WHERE clause of a
    [partial index], then changing the meaning of the LIKE operator using
    this pragma might cause indexes to disagree with their corresponding
    tables or CHECK constraints to become invalid.  This can lead to
    errors from [PRAGMA integrity_check] and/or incorrect query results
    from queries that use the affected tables or indexes.  For that
    reason, the use of this pragma is discouraged.  This pragma continues
    to be supported for legacy compatibility.  Individual applications
    can disable this pragma at compile-time using the
    [-DSQLITE_OMIT_CASE_SENSITIVE_LIKE_PRAGMA] option.  Future versions
    of SQLite are likely to deprecate this pragma.
}

Pragma cell_size_check {
    <p>^(<b>PRAGMA cell_size_check
       <br>PRAGMA cell_size_check = </b><i>boolean</i><b>;</b></p>
    <p>The cell_size_check pragma enables or disables additional sanity
    checking on database b-tree pages as they are initially read from disk.)^