Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Enhanced testing and documentation of sqlite3_result_error_code(). Ticket #2940. (CVS 4983) |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
5be56dbe879f89351239accf5069e4cb |
User & Date: | drh 2008-04-10 17:14:07.000 |
Context
2008-04-10
| ||
17:27 | Add the --ostrace and --ossummary options to tester.tcl. To log calls the vfs layer from within test scripts. (CVS 4984) (check-in: e1322415d0 user: danielk1977 tags: trunk) | |
17:14 | Enhanced testing and documentation of sqlite3_result_error_code(). Ticket #2940. (CVS 4983) (check-in: 5be56dbe87 user: drh tags: trunk) | |
16:47 | Disable nuisance warnings on borland compilers. ticket #2936. (CVS 4982) (check-in: 1e094ecfd7 user: drh tags: trunk) | |
Changes
Changes to src/sqlite.h.in.
︙ | |||
26 27 28 29 30 31 32 | 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | - + | ** on how SQLite interfaces are suppose to operate. ** ** The name of this file under configuration management is "sqlite.h.in". ** The makefile makes some minor changes to this file (such as inserting ** the version number) and changes its name to "sqlite3.h" as ** part of the build process. ** |
︙ | |||
3942 3943 3944 3945 3946 3947 3948 | 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 | - + + | ** bytes (not characters) from the 2nd parameter as the error message. ** The sqlite3_result_error() and sqlite3_result_error16() ** routines make a copy private copy of the error message text before ** they return. Hence, the calling function can deallocate or ** modify the text after they return without harm. ** The sqlite3_result_error_code() function changes the error code ** returned by SQLite as a result of an error in a function. By default, |
︙ |
Changes to src/test_func.c.
︙ | |||
8 9 10 11 12 13 14 | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | - + | ** May you find forgiveness for yourself and forgive others. ** May you share freely, never taking more than you give. ** ************************************************************************* ** Code for testing all sorts of SQLite interfaces. This code ** implements new SQL functions used by the test scripts. ** |
︙ | |||
186 187 188 189 190 191 192 | 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 | - + + - + + + + + | } } sqlite3_result_text(pCtx, zRet, 2*nArg-1, free_test_auxdata); } /* ** A function to test error reporting from user functions. This function |
︙ |
Changes to test/capi3c.test.
︙ | |||
9 10 11 12 13 14 15 | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | - + | # #*********************************************************************** # This file implements regression tests for SQLite library. # # This is a copy of the capi3.test file that has been adapted to # test the new sqlite3_prepare_v2 interface. # |
︙ | |||
83 84 85 86 87 88 89 90 91 92 93 94 95 96 | 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | + | } {1} do_test capi3c-1.6 { sqlite3_errcode $DB } {SQLITE_ERROR} do_test capi3c-1.7 { sqlite3_errmsg $DB } {no such column: namex} ifcapable {utf16} { do_test capi3c-2.1 { set sql16 [utf16 {SELECT name FROM sqlite_master}] set STMT [sqlite3_prepare16_v2 $DB $sql16 -1 ::TAIL] sqlite3_finalize $STMT utf8 $::TAIL |
︙ | |||
1239 1240 1241 1242 1243 1244 1245 | 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 | - + + + + + + + + + + + + + + + + + + + + + + | } {SQLITE_ERROR} do_test capi3c-21.6 { sqlite3_finalize $STMT } {SQLITE_INTERRUPT} do_test capi3c-21.7 { sqlite3_errcode $DB } {SQLITE_INTERRUPT} |
Changes to test/func.test.
1 2 3 4 5 6 7 8 9 10 11 12 13 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | - + | # 2001 September 15 # # 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. The # focus of this file is testing built-in functions. # |
︙ | |||
531 532 533 534 535 536 537 | 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 | - - + - + + + + + + + + + | do_test func-14.2 { catch { db function [string repeat X 256] {return "hello"} } } {1} do_test func-15.1 { |
︙ |