SQLite

Check-in [f2cc159159]
Login

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

Overview
Comment:Add file tkt3461.test with a few examples of bug #3461. Because these tests currently fail they are disabled for now. (CVS 5840)
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: f2cc159159278201809022706c28bc53b6c3c859
User & Date: danielk1977 2008-10-25 09:35:00.000
Context
2008-10-25
15:03
Disable the result-set alias cache when on conditional code branches. Ticket #3461. The column cache and result set alias cache mechanisms are prone to this kind of error and need to be refactored. This check-in should be considered a temporary fix in advance of a more general redesign of the whole mechanism. (CVS 5841) (check-in: 1fa3bbd822 user: drh tags: trunk)
09:35
Add file tkt3461.test with a few examples of bug #3461. Because these tests currently fail they are disabled for now. (CVS 5840) (check-in: f2cc159159 user: danielk1977 tags: trunk)
2008-10-23
05:45
Fix a bug in pragma table_info. Column default values specified as negative numbers (col DEFAULT -1) were being reported as NULL by the pragma. (CVS 5839) (check-in: 0e448bc609 user: danielk1977 tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Added test/tkt3461.test.






































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# 2008 October 25
#
# The author disclaims copyright to this source code.  In place of
# a legal notice, here is a blessing:
#
#    May you do good and not evil.
#    May you find forgiveness for yourself and forgive others.
#    May you share freely, never taking more than you give.
#
#***********************************************************************
# This file implements regression tests for SQLite library.
#
# This file implements tests to verify that ticket #3461 has been
# fixed.  
#
# $Id: tkt3461.test,v 1.1 2008/10/25 09:35:00 danielk1977 Exp $

set testdir [file dirname $argv0]
source $testdir/tester.tcl

####################################
####################################
# REMOVE THESE TWO LINES:
####################################
####################################
finish_test
return

do_test tkt3461-1.1 {
  execsql {
    CREATE TABLE t1(a, b);
    INSERT INTO t1 VALUES(1, 2);
  }
} {}

do_test tkt3461-1.2 {
  execsql { SELECT a, b+1 AS b_plus_one FROM t1 WHERE a=1 }
} {1 3}

do_test tkt3461-1.3 {
  # explain { SELECT a, b+1 AS b_plus_one FROM t1 WHERE a=1 OR b_plus_one }
  # execsql { PRAGMA vdbe_trace = 1 }
  execsql { SELECT a, b+1 AS b_plus_one FROM t1 WHERE a=1 OR b_plus_one }
} {1 3}

do_test tkt3461-2.1 {
  execsql { 
    SELECT a, b+1 AS b_plus_one 
    FROM t1 
    WHERE CASE WHEN a=1 THEN 1 ELSE b_plus_one END 
  }
} {1 3}

do_test tkt3461-3.1 {
  execsql {
    CREATE TABLE t2(c, d);
    INSERT INTO t2 VALUES(3, 4);
  }
  execsql { 
    SELECT a, b+1 AS b_plus_one, c, d 
    FROM t1 LEFT JOIN t2 
    ON (a=c AND d=b_plus_one)
  }
} {1 3 {} {}}

finish_test