diff options
author | drh <drh@noemail.net> | 2013-11-26 18:00:29 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2013-11-26 18:00:29 +0000 |
commit | 1b2ee4fe1afb4edd3d04e62daeb133df41809e38 (patch) | |
tree | 3f90016343959f3349a8086cb43c38cb4de975a3 /test/func5.test | |
parent | 212c6be1417860712de4b93b31342b72c9fa89dd (diff) | |
parent | 55fcab39be8186caac6c7d1262a7c943564623bb (diff) | |
download | sqlite-1b2ee4fe1afb4edd3d04e62daeb133df41809e38.tar.gz sqlite-1b2ee4fe1afb4edd3d04e62daeb133df41809e38.zip |
Merge in performance enhancements from trunk.
FossilOrigin-Name: fc9ae839569eb28eb734c52d95676c59b2e27494
Diffstat (limited to 'test/func5.test')
-rw-r--r-- | test/func5.test | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/test/func5.test b/test/func5.test new file mode 100644 index 000000000..83ecb785d --- /dev/null +++ b/test/func5.test @@ -0,0 +1,33 @@ +# 2013-11-21 +# +# 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. +# +#************************************************************************* +# +# Verify that constant string expressions that get factored into initializing +# code are not reused between function parameters and other values in the +# VDBE program, as the function might have changed the encoding. +# +set testdir [file dirname $argv0] +source $testdir/tester.tcl + +do_execsql_test func5-1.1 { + PRAGMA encoding=UTF16le; + CREATE TABLE t1(x,a,b,c); + INSERT INTO t1 VALUES(1,'ab','cd',1); + INSERT INTO t1 VALUES(2,'gh','ef',5); + INSERT INTO t1 VALUES(3,'pqr','fuzzy',99); + INSERT INTO t1 VALUES(4,'abcdefg','xy',22); + INSERT INTO t1 VALUES(5,'shoe','mayer',2953); + SELECT x FROM t1 WHERE c=instr('abcdefg',b) OR a='abcdefg' ORDER BY +x; +} {2 4} +do_execsql_test func5-1.2 { + SELECT x FROM t1 WHERE a='abcdefg' OR c=instr('abcdefg',b) ORDER BY +x; +} {2 4} + +finish_test |