SQLite

Check-in [4dc00f5776]
Login

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

Overview
Comment:Fix test script literal.test so that it works with SQLITE_OMIT_ALTER_TABLE builds.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 4dc00f577632c7b13135505007804d42a12f81a9ebd58d4c380727256b054b7e
User & Date: dan 2024-01-22 14:01:07.189
Context
2024-01-23
12:51
Change the shell's --help flag to exit with code 0 instead of 1, per /forum and /chat discussions. (check-in: df563a1857 user: stephan tags: trunk)
2024-01-22
14:16
The -DSQLITE_JSON_BLOB_INPUT_BUG_COMPATIBLE compile-time option causes blob inputs to JSON functions that are not JSONB to be processed as if they where text, immulating historical bugging behavior which some applications have come to rely upon. See [forum:/forumpost/012136abd5292b8d|forum thread 012136abd5292b8d] for discussion. (check-in: 6557222358 user: drh tags: blob-as-json)
14:01
Fix test script literal.test so that it works with SQLITE_OMIT_ALTER_TABLE builds. (check-in: 4dc00f5776 user: dan tags: trunk)
12:56
Fix userauth so that it works together with SQLITE_OMIT_SHARED_CACHE. ([forum:/forumpost/0bfc5888a384d430|Forum post 0bfc5888a384d430]). However, also change to code to issue a deprecation warning whenever SQLITE_USER_AUTHENTICATION is used. (check-in: 249048b0cb user: drh tags: trunk)
11:12
Fix test script literal.test so that it works with SQLITE_OMIT_ALTER_TABLE builds. (check-in: b57327be4b user: dan tags: digit-separators)
Changes
Unified Diff Ignore Whitespace Patch
Changes to test/literal.test.
15
16
17
18
19
20
21

22
23
24
25
26
27








28
29
30
31
32
33
34
set testdir [file dirname $argv0]
source $testdir/tester.tcl
set ::testprefix literal

proc test_literal {tn lit type val} {
  do_execsql_test $tn.1 "SELECT typeof( $lit ), $lit" [list $type $val]


  do_execsql_test $tn.2 "
    DROP TABLE IF EXISTS x1;
    CREATE TABLE x1(a);
    INSERT INTO x1 VALUES(123);
    ALTER TABLE x1 ADD COLUMN b DEFAULT $lit ;
    SELECT typeof(b), b FROM x1;








  " [list $type $val]
}


test_literal 1.0 45                  integer 45
test_literal 1.1 0xFF                integer 255
test_literal 1.2 0xFFFFFFFF          integer [expr 0xFFFFFFFF]







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







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
set testdir [file dirname $argv0]
source $testdir/tester.tcl
set ::testprefix literal

proc test_literal {tn lit type val} {
  do_execsql_test $tn.1 "SELECT typeof( $lit ), $lit" [list $type $val]

  ifcapable altertable {
    do_execsql_test $tn.2 "
      DROP TABLE IF EXISTS x1;
      CREATE TABLE x1(a);
      INSERT INTO x1 VALUES(123);
      ALTER TABLE x1 ADD COLUMN b DEFAULT $lit ;
      SELECT typeof(b), b FROM x1;
    " [list $type $val]
  }

  do_execsql_test $tn.3 "
    DROP TABLE IF EXISTS x1;
    CREATE TABLE x1(a DEFAULT $lit);
    INSERT INTO x1 DEFAULT VALUES;
    SELECT typeof(a), a FROM x1;
  " [list $type $val]
}


test_literal 1.0 45                  integer 45
test_literal 1.1 0xFF                integer 255
test_literal 1.2 0xFFFFFFFF          integer [expr 0xFFFFFFFF]