mirror of
https://github.com/sqlite/sqlite.git
synced 2025-12-10 22:22:40 +03:00
comparison operation within the result-set of a SELECT statement. FossilOrigin-Name: d6bb7c42ff6309ce168ccdcf03b4cdabfccfc9e2a911d254ac7dc4fea4aa2bc1
37 lines
915 B
Plaintext
37 lines
915 B
Plaintext
# 2017 April 11
|
|
#
|
|
# 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.
|
|
#
|
|
|
|
set testdir [file dirname $argv0]
|
|
source $testdir/tester.tcl
|
|
set testprefix indexexpr2
|
|
|
|
do_execsql_test 1 {
|
|
CREATE TABLE t1(a, b);
|
|
INSERT INTO t1 VALUES(1, 'one');
|
|
INSERT INTO t1 VALUES(2, 'two');
|
|
INSERT INTO t1 VALUES(3, 'three');
|
|
|
|
CREATE INDEX i1 ON t1(b || 'x');
|
|
}
|
|
|
|
do_execsql_test 1.1 {
|
|
SELECT 'TWOX' == (b || 'x') FROM t1 WHERE (b || 'x')>'onex'
|
|
} {0 0}
|
|
|
|
do_execsql_test 1.2 {
|
|
SELECT 'TWOX' == (b || 'x') COLLATE nocase FROM t1 WHERE (b || 'x')>'onex'
|
|
} {0 1}
|
|
|
|
finish_test
|
|
|