/ Check-in [a443b07e]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:Test that an explicit collation sequence overrides an implicit one attached to a 'new' reference (it does). No code changes. (CVS 4186)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: a443b07ed659223401ee7acaf613d0b04f33fc89
User & Date: danielk1977 2007-07-26 10:16:30
Context
2007-07-30
14:40
Fix a bug with explicit collation sequences attached to a column reference expression that is on the right-hand-side of a binary comparison operator. (CVS 4187) check-in: 7b699686 user: danielk1977 tags: trunk
2007-07-26
10:16
Test that an explicit collation sequence overrides an implicit one attached to a 'new' reference (it does). No code changes. (CVS 4186) check-in: a443b07e user: danielk1977 tags: trunk
06:50
Fix two obscure memory leaks that can follow a malloc() failure in sqlite3_set_auxdata(). Ticket #2534. (CVS 4185) check-in: b88af182 user: danielk1977 tags: trunk
Changes
Hide Diffs Unified Diffs Show Whitespace Changes Patch

Changes to test/collate6.test.

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
...
102
103
104
105
106
107
108
109


110



























111
#    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.  The
# focus of this script is collation sequences in concert with triggers.
#
# $Id: collate6.test,v 1.2 2004/11/04 04:42:28 drh Exp $

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

# There are no tests in this file that will work without
# trigger support.
#
................................................................................
} {}

do_test collate6-1.9 {
  execsql {
    DROP TABLE collate6tab;
  }
} {}































finish_test







|







 








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

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
...
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
#    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.  The
# focus of this script is collation sequences in concert with triggers.
#
# $Id: collate6.test,v 1.3 2007/07/26 10:16:30 danielk1977 Exp $

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

# There are no tests in this file that will work without
# trigger support.
#
................................................................................
} {}

do_test collate6-1.9 {
  execsql {
    DROP TABLE collate6tab;
  }
} {}

# Test that an explicit collation sequence overrides an implicit 
# one attached to a 'new' reference.
#
do_test collate6-2.1 {
  execsql {
    CREATE TABLE abc(a COLLATE binary, b, c);
    CREATE TABLE def(a, b, c);
    CREATE TRIGGER abc_t1 AFTER INSERT ON abc BEGIN
      INSERT INTO def SELECT * FROM abc WHERE a < new.a COLLATE nocase;
    END
  }
} {}
do_test collate6-2.2 {
  execsql {
    INSERT INTO abc VALUES('One', 'Two', 'Three');
    INSERT INTO abc VALUES('one', 'two', 'three');
    SELECT * FROM def;
  }
} {}
do_test collate6-2.3 {
  execsql {
    UPDATE abc SET a = 'four' WHERE a = 'one';
    CREATE TRIGGER abc_t2 AFTER UPDATE ON abc BEGIN
      INSERT INTO def SELECT * FROM abc WHERE a < new.a COLLATE nocase;
    END;
    SELECT * FROM def;
  }
} {}


finish_test