mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-27 20:41:58 +03:00
Fixes for OMIT_UTF16 and OMIT_COMPOUND (CVS 2993)
FossilOrigin-Name: f58bbdc0ac6e618686c598aaafb3a41b972e078e
This commit is contained in:
22
manifest
22
manifest
@ -1,5 +1,5 @@
|
||||
C Improve\scoverage\sof\sexpr.c\sand\sbtree.c\sslightly.\s(CVS\s2992)
|
||||
D 2006-01-23T05:50:58
|
||||
C Fixes\sfor\sOMIT_UTF16\sand\sOMIT_COMPOUND\s(CVS\s2993)
|
||||
D 2006-01-23T07:52:38
|
||||
F Makefile.in ab3ffd8d469cef4477257169b82810030a6bb967
|
||||
F Makefile.linux-gcc aee18d8a05546dcf1888bd4547e442008a49a092
|
||||
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
|
||||
@ -73,7 +73,7 @@ F src/sqlite.h.in 492580f7e3ff71eb43193eb7bb98e2d549889ce3
|
||||
F src/sqliteInt.h 8cbeb4346a70ca47a2ec5935ec26b5c7f0b1948f
|
||||
F src/table.c 486dcfce532685b53b5a2b5da8bba0ded6fb2316
|
||||
F src/tclsqlite.c d650bea0248fc0a310ddc2cb94273a3a5021fddf
|
||||
F src/test1.c bcdd1978cb4f576611917948728acd09ede9c85d
|
||||
F src/test1.c 846b3731af01ac90bad583f55e7969c8fb232172
|
||||
F src/test2.c ca74a1d8aeb7d9606e8f6b762c5daf85c1a3f92b
|
||||
F src/test3.c 86e99724ee898b119ed575ef9f98618afe7e5e5d
|
||||
F src/test4.c ff4e9406b3d2809966d8f0e82468ac5508be9f56
|
||||
@ -90,13 +90,13 @@ F src/vacuum.c 3865673cc66acd0717ecd517f6b8fdb2a5e7924b
|
||||
F src/vdbe.c e04bf3035a7dc547e80ba1130a716a7e8c9f7c93
|
||||
F src/vdbe.h 8729a4ee16ff9aeab2af9667df3cf300ff978e13
|
||||
F src/vdbeInt.h eb3f86ab08ef11635bc78eb88c3ff13f923c233b
|
||||
F src/vdbeapi.c 75eabedc09b3b2a6f2d256f85704b8b0cc0f50fa
|
||||
F src/vdbeapi.c dcb2636f49b4807e34960d52a2fc257b3a751140
|
||||
F src/vdbeaux.c 1dce6e5f51d6119220e12ecbceccccf97ca8b8be
|
||||
F src/vdbefifo.c 9efb94c8c3f4c979ebd0028219483f88e57584f5
|
||||
F src/vdbemem.c 2034e93b32c14bda6e306bb54e3a8e930b963027
|
||||
F src/where.c 7ce7a52fdc696d26cd9f9c939dc972585d3dd72d
|
||||
F tclinstaller.tcl 046e3624671962dc50f0481d7c25b38ef803eb42
|
||||
F test/aggerror.test b2223511ec37fcdeca023b5a261900f18261aad8
|
||||
F test/aggerror.test b854de90f530ae37be68fbfe6de40e111358cbb2
|
||||
F test/all.test 5df90d015ca63fcef2a4b62c24f7316b66c4bfd4
|
||||
F test/alter.test d2569ed639946be29cfcae9117942b4a6d01f719
|
||||
F test/alter2.test cc0b8832e4e98605dbc26910efd4bb89abe59cb2
|
||||
@ -189,8 +189,8 @@ F test/lock3.test 615111293cf32aa2ed16d01c6611737651c96fb9
|
||||
F test/main.test b12f01d49a5c805a33fa6c0ef168691f63056e79
|
||||
F test/malloc.test ce6d1e7e79f9db967b51e1975b50760af66db90d
|
||||
F test/malloc2.test e6e321db96d6c94cb18bf82ad7215070c41e624e
|
||||
F test/malloc3.test 5494b3fac35a2362584c97dc5655c2c3227c798a
|
||||
F test/malloc4.test 2e29d155eb4b4808019ef47eeedfcbe9e09e0f05
|
||||
F test/malloc3.test fd4186bee73c2a2638f4e2a05a684c06836f725b
|
||||
F test/malloc4.test 59cd02f71b363302a04c4e77b97c0a1572eaa210
|
||||
F test/malloc5.test 7425272e263325fda7d32cb55706e52b5c09e7e0
|
||||
F test/manydb.test 8de36b8d33aab5ef295b11d9e95310aeded31af8
|
||||
F test/memdb.test ed97df0414a6e33e043e3eeffccb54d06098d0ae
|
||||
@ -223,7 +223,7 @@ F test/select2.test f3c2678c3a9f3cf08ec4988a3845bda64be6d9e3
|
||||
F test/select3.test 8fece41cd8f2955131b3f973a7123bec60b6e65e
|
||||
F test/select4.test c239f516aa31f42f2ef7c6d7cd01105f08f934ca
|
||||
F test/select5.test 0b47058d3e916c1fc9fe81f44b438e02bade21ce
|
||||
F test/select6.test 22f4b0c591b75464519ec5085b3385ac60698eb2
|
||||
F test/select6.test d8ea108b65607399580f2765df0aee5e464b0fd8
|
||||
F test/select7.test 1bf795b948c133a15a2a5e99d3270e652ec58ce6
|
||||
F test/server1.test e328b8e641ba8fe9273132cfef497383185dc1f5
|
||||
F test/shared.test 8f8bc93c23b45ec63e1b11b8f3d8d018af47a58b
|
||||
@ -344,7 +344,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9
|
||||
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
|
||||
F www/version3.tcl a99cf5f6d8bd4d5537584a2b342f0fb9fa601d8b
|
||||
F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513
|
||||
P a65e85f0e01f3bca5f4e78999c10db3916824b5b
|
||||
R 3297151c316e2b9323e59dbed5915963
|
||||
P cc2e8e87cfd474b4dc6833ee0c38e2cd2dd3a494
|
||||
R e7686387c0d32f2c77df0a39b8385c89
|
||||
U danielk1977
|
||||
Z 1bc72467bea30951a32409adca1d9341
|
||||
Z de4e011a442de96ed72224d63af9baef
|
||||
|
@ -1 +1 @@
|
||||
cc2e8e87cfd474b4dc6833ee0c38e2cd2dd3a494
|
||||
f58bbdc0ac6e618686c598aaafb3a41b972e078e
|
@ -13,7 +13,7 @@
|
||||
** is not included in the SQLite library. It is used for automated
|
||||
** testing of the SQLite library.
|
||||
**
|
||||
** $Id: test1.c,v 1.201 2006/01/20 15:45:36 drh Exp $
|
||||
** $Id: test1.c,v 1.202 2006/01/23 07:52:38 danielk1977 Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "tcl.h"
|
||||
@ -578,9 +578,11 @@ static void countStep(sqlite3_context *context, int argc, sqlite3_value **argv){
|
||||
int v = sqlite3_value_int(argv[0]);
|
||||
if( v==40 ){
|
||||
sqlite3_result_error(context, "value of 40 handed to x_count", -1);
|
||||
#ifndef SQLITE_OMIT_UTF16
|
||||
}else if( v==41 ){
|
||||
const char zUtf16ErrMsg[] = { 0, 0x61, 0, 0x62, 0, 0x63, 0, 0, 0};
|
||||
sqlite3_result_error16(context, &zUtf16ErrMsg[1-SQLITE_BIGENDIAN], -1);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -95,10 +95,12 @@ void sqlite3_result_error(sqlite3_context *pCtx, const char *z, int n){
|
||||
pCtx->isError = 1;
|
||||
sqlite3VdbeMemSetStr(&pCtx->s, z, n, SQLITE_UTF8, SQLITE_TRANSIENT);
|
||||
}
|
||||
#ifndef SQLITE_OMIT_UTF16
|
||||
void sqlite3_result_error16(sqlite3_context *pCtx, const void *z, int n){
|
||||
pCtx->isError = 1;
|
||||
sqlite3VdbeMemSetStr(&pCtx->s, z, n, SQLITE_UTF16NATIVE, SQLITE_TRANSIENT);
|
||||
}
|
||||
#endif
|
||||
void sqlite3_result_int(sqlite3_context *pCtx, int iVal){
|
||||
sqlite3VdbeMemSetInt64(&pCtx->s, (i64)iVal);
|
||||
}
|
||||
|
@ -13,7 +13,7 @@
|
||||
# This file implements tests for calling sqlite3_result_error()
|
||||
# from within an aggregate function implementation.
|
||||
#
|
||||
# $Id: aggerror.test,v 1.1 2006/01/20 15:45:37 drh Exp $
|
||||
# $Id: aggerror.test,v 1.2 2006/01/23 07:52:41 danielk1977 Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@ -50,14 +50,16 @@ do_test aggfunc-1.3 {
|
||||
SELECT x_count(a) FROM t1;
|
||||
}
|
||||
} {1 {value of 40 handed to x_count}}
|
||||
do_test aggfunc-1.4 {
|
||||
ifcapable utf16 {
|
||||
do_test aggfunc-1.4 {
|
||||
execsql {
|
||||
UPDATE t1 SET a=41 WHERE a=40
|
||||
}
|
||||
catchsql {
|
||||
SELECT x_count(a) FROM t1;
|
||||
}
|
||||
} {1 abc}
|
||||
} {1 abc}
|
||||
}
|
||||
do_test aggfunc-1.5 {
|
||||
execsql {
|
||||
SELECT x_count(*) FROM t1
|
||||
|
@ -13,7 +13,7 @@
|
||||
# correctly. The emphasis of these tests are the _prepare(), _step() and
|
||||
# _finalize() calls.
|
||||
#
|
||||
# $Id: malloc3.test,v 1.8 2006/01/20 16:32:04 danielk1977 Exp $
|
||||
# $Id: malloc3.test,v 1.9 2006/01/23 07:52:41 danielk1977 Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@ -644,7 +644,7 @@ proc run_test {arglist {pcstart 0} {iFailStart 1}} {
|
||||
# Turn of the Tcl interface's prepared statement caching facility.
|
||||
db cache size 0
|
||||
|
||||
run_test $::run_test_script
|
||||
run_test $::run_test_script 9 1
|
||||
# run_test [lrange $::run_test_script 0 3] 0 63
|
||||
sqlite_malloc_fail 0
|
||||
db close
|
||||
|
@ -12,7 +12,7 @@
|
||||
# This file contains tests to ensure that the library handles malloc() failures
|
||||
# correctly. The emphasis in this file is on sqlite3_column_XXX() APIs.
|
||||
#
|
||||
# $Id: malloc4.test,v 1.2 2005/12/09 14:25:12 danielk1977 Exp $
|
||||
# $Id: malloc4.test,v 1.3 2006/01/23 07:52:41 danielk1977 Exp $
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# NOTES ON EXPECTED BEHAVIOUR
|
||||
@ -33,6 +33,11 @@ if {[info command sqlite_malloc_stat]==""} {
|
||||
return
|
||||
}
|
||||
|
||||
ifcapable !utf16 {
|
||||
finish_test
|
||||
return
|
||||
}
|
||||
|
||||
proc do_stmt_test {id sql} {
|
||||
set ::sql $sql
|
||||
set go 1
|
||||
|
@ -12,7 +12,7 @@
|
||||
# focus of this file is testing SELECT statements that contain
|
||||
# subqueries in their FROM clause.
|
||||
#
|
||||
# $Id: select6.test,v 1.22 2006/01/22 00:14:39 drh Exp $
|
||||
# $Id: select6.test,v 1.23 2006/01/23 07:52:41 danielk1977 Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@ -301,48 +301,48 @@ do_test select6-5.2 {
|
||||
|
||||
# Tests of compound sub-selects
|
||||
#
|
||||
ifcapable compound {
|
||||
do_test select5-6.1 {
|
||||
execsql {
|
||||
DELETE FROM t1 WHERE x>4;
|
||||
SELECT * FROM t1
|
||||
}
|
||||
} {1 1 2 2 3 2 4 3}
|
||||
do_test select6-6.2 {
|
||||
ifcapable compound {
|
||||
do_test select6-6.2 {
|
||||
execsql {
|
||||
SELECT * FROM (
|
||||
SELECT x AS 'a' FROM t1 UNION ALL SELECT x+10 AS 'a' FROM t1
|
||||
) ORDER BY a;
|
||||
}
|
||||
} {1 2 3 4 11 12 13 14}
|
||||
do_test select6-6.3 {
|
||||
} {1 2 3 4 11 12 13 14}
|
||||
do_test select6-6.3 {
|
||||
execsql {
|
||||
SELECT * FROM (
|
||||
SELECT x AS 'a' FROM t1 UNION ALL SELECT x+1 AS 'a' FROM t1
|
||||
) ORDER BY a;
|
||||
}
|
||||
} {1 2 2 3 3 4 4 5}
|
||||
do_test select6-6.4 {
|
||||
} {1 2 2 3 3 4 4 5}
|
||||
do_test select6-6.4 {
|
||||
execsql {
|
||||
SELECT * FROM (
|
||||
SELECT x AS 'a' FROM t1 UNION SELECT x+1 AS 'a' FROM t1
|
||||
) ORDER BY a;
|
||||
}
|
||||
} {1 2 3 4 5}
|
||||
do_test select6-6.5 {
|
||||
} {1 2 3 4 5}
|
||||
do_test select6-6.5 {
|
||||
execsql {
|
||||
SELECT * FROM (
|
||||
SELECT x AS 'a' FROM t1 INTERSECT SELECT x+1 AS 'a' FROM t1
|
||||
) ORDER BY a;
|
||||
}
|
||||
} {2 3 4}
|
||||
do_test select6-6.6 {
|
||||
} {2 3 4}
|
||||
do_test select6-6.6 {
|
||||
execsql {
|
||||
SELECT * FROM (
|
||||
SELECT x AS 'a' FROM t1 EXCEPT SELECT x*2 AS 'a' FROM t1
|
||||
) ORDER BY a;
|
||||
}
|
||||
} {1 3}
|
||||
} {1 3}
|
||||
} ;# ifcapable compound
|
||||
|
||||
# Subselects with no FROM clause
|
||||
|
Reference in New Issue
Block a user