diff options
author | drh <drh@noemail.net> | 2015-07-24 22:21:01 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2015-07-24 22:21:01 +0000 |
commit | 87c44ef2f76229eeb5086e8e5ddb41a0fc6db150 (patch) | |
tree | 54ce2790f5a626dccb880bbb6210ec1ab9cdda54 /src/func.c | |
parent | 244c8d7077ea25763bf2efce123da2f7d2d811cc (diff) | |
parent | 24fa5435ee5485f0779f14b58d6291174c9c3eb7 (diff) | |
download | sqlite-87c44ef2f76229eeb5086e8e5ddb41a0fc6db150.tar.gz sqlite-87c44ef2f76229eeb5086e8e5ddb41a0fc6db150.zip |
Merge test improvements and minor fixes from trunk.
FossilOrigin-Name: 0298a9a780695b666e7c683700d9f2f889d6f826
Diffstat (limited to 'src/func.c')
-rw-r--r-- | src/func.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/func.c b/src/func.c index d0565357d..6ecd74396 100644 --- a/src/func.c +++ b/src/func.c @@ -1122,16 +1122,14 @@ static void zeroblobFunc( sqlite3_value **argv ){ i64 n; - sqlite3 *db = sqlite3_context_db_handle(context); + int rc; assert( argc==1 ); UNUSED_PARAMETER(argc); n = sqlite3_value_int64(argv[0]); - testcase( n==db->aLimit[SQLITE_LIMIT_LENGTH] ); - testcase( n==db->aLimit[SQLITE_LIMIT_LENGTH]+1 ); - if( n>db->aLimit[SQLITE_LIMIT_LENGTH] ){ - sqlite3_result_error_toobig(context); - }else{ - sqlite3_result_zeroblob(context, (int)n); /* IMP: R-00293-64994 */ + if( n<0 ) n = 0; + rc = sqlite3_result_zeroblob64(context, n); /* IMP: R-00293-64994 */ + if( rc ){ + sqlite3_result_error_code(context, rc); } } |