Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Merge updates from trunk. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | toTypeFuncs |
Files: | files | file ages | folders |
SHA1: |
375dfe288fd0c4eb3c343a3cb23a7e38 |
User & Date: | mistachkin 2013-08-29 01:11:45.298 |
Context
2013-08-29
| ||
01:17 | Prevent the implementation of the toreal() SQL function from being 'optimized' by MSVC. (check-in: 047bd1c245 user: mistachkin tags: toTypeFuncs) | |
01:11 | Merge updates from trunk. (check-in: 375dfe288f user: mistachkin tags: toTypeFuncs) | |
01:09 | Small enhancements to unit testing infrastructure. (check-in: 9229aeb361 user: mistachkin tags: trunk) | |
01:01 | Fix boundary case for the toreal() SQL function. (check-in: abe82c634c user: mistachkin tags: toTypeFuncs) | |
Changes
Changes to Makefile.msc.
︙ | |||
89 90 91 92 93 94 95 96 97 98 99 100 101 102 | 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | + + + + + + + + | # 3 == SQLITE_WIN32_MALLOC_VALIDATE: Validate the Win32 native heap per call. # 4 == SQLITE_DEBUG_OS_TRACE: Enables output from the OSTRACE() macros. # 5 == SQLITE_ENABLE_IOTRACE: Enables output from the IOTRACE() macros. # !IFNDEF DEBUG DEBUG = 0 !ENDIF # Enable use of available compiler optimizations? Normally, this should be # non-zero. Setting this to zero, thus disabling all compiler optimizations, # can be useful for testing. # !IFNDEF OPTIMIZATIONS OPTIMIZATIONS = 2 !ENDIF # Check for the predefined command macro CC. This should point to the compiler # binary for the target platform. If it is not defined, simply define it to # the legacy default value 'cl.exe'. # !IFNDEF CC CC = cl.exe |
︙ | |||
339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 | 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 | + + + + | # !IFNDEF TCLSH_CMD TCLSH_CMD = tclsh85 !ENDIF # Compiler options needed for programs that use the readline() library. # !IFNDEF READLINE_FLAGS READLINE_FLAGS = -DHAVE_READLINE=0 !ENDIF # The library that programs using readline() must link against. # !IFNDEF LIBREADLINE LIBREADLINE = !ENDIF # Should the database engine be compiled threadsafe # TCC = $(TCC) -DSQLITE_THREADSAFE=1 RCC = $(RCC) -DSQLITE_THREADSAFE=1 # Do threads override each others locks by default (1), or do we test (-1) |
︙ | |||
393 394 395 396 397 398 399 | 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 | - - + - - + + - + + + + + + + + + + + + + + + | RCC = $(RCC) $(OPT_FEATURE_FLAGS) # Add in any optional parameters specified on the make commane line # ie. make "OPTS=-DSQLITE_ENABLE_FOO=1 -DSQLITE_OMIT_FOO=1". TCC = $(TCC) $(OPTS) RCC = $(RCC) $(OPTS) |
︙ | |||
461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 | 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 | + + | # If ICU support is enabled, add the linker options for it. !IF $(USE_ICU)!=0 LTLIBPATHS = $(LTLIBPATHS) /LIBPATH:$(ICULIBDIR) LTLIBS = $(LTLIBS) $(LIBICU) !ENDIF # nawk compatible awk. !IFNDEF NAWK NAWK = gawk.exe !ENDIF # You should not have to change anything below this line ############################################################################### # Object files for the SQLite library (non-amalgamation). # LIBOBJS0 = vdbe.lo parse.lo alter.lo analyze.lo attach.lo auth.lo \ |
︙ |
Changes to test/tester.tcl.
︙ | |||
10 11 12 13 14 15 16 | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | - + | #*********************************************************************** # This file implements some common TCL routines used for regression # testing the SQLite library # # $Id: tester.tcl,v 1.143 2009/04/09 01:23:49 drh Exp $ #------------------------------------------------------------------------- |
︙ | |||
38 39 40 41 42 43 44 45 46 47 48 49 50 51 | 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | + | # # dbcksum DB DBNAME # allcksum ?DB? # cksum ?DB? # # Commands to execute/explain SQL statements: # # memdbsql SQL # stepsql DB SQL # execsql2 SQL # explain_no_trace SQL # explain SQL ?DB? # catchsql SQL ?DB? # execsql SQL ?DB? # |
︙ | |||
76 77 78 79 80 81 82 | 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | - + - + | # wal_is_wal_mode # wal_set_journal_mode ?DB? # wal_check_journal_mode TESTNAME?DB? # permutation # presql # |
︙ | |||
118 119 120 121 122 123 124 | 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 | - + | } if {[info exists ::G(perm:dbconfig)]} { set ::dbhandle [lindex $args 0] uplevel #0 $::G(perm:dbconfig) } set res } else { |
︙ | |||
286 287 288 289 290 291 292 293 294 295 296 297 298 299 | 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | file delete -force $filename } else { file delete $filename } } } } if {$::tcl_platform(platform) eq "windows"} { proc do_remove_win32_dir {args} { set nRetry [getFileRetries] ;# Maximum number of retries. set nDelay [getFileRetryDelay] ;# Delay in ms before retrying. foreach dirName $args { # On windows, sometimes even a [remove_win32_dir] can fail just after # a directory is emptied. The cause is usually "tag-alongs" - programs # like anti-virus software, automatic backup tools and various explorer # extensions that keep a file open a little longer than we expect, # causing the delete to fail. # # The solution is to wait a short amount of time before retrying the # removal. # if {$nRetry > 0} { for {set i 0} {$i < $nRetry} {incr i} { set rc [catch { remove_win32_dir $dirName } msg] if {$rc == 0} break if {$nDelay > 0} { after $nDelay } } if {$rc} { error $msg } } else { remove_win32_dir $dirName } } } proc do_delete_win32_file {args} { set nRetry [getFileRetries] ;# Maximum number of retries. set nDelay [getFileRetryDelay] ;# Delay in ms before retrying. foreach fileName $args { # On windows, sometimes even a [delete_win32_file] can fail just after # a file is closed. The cause is usually "tag-alongs" - programs like # anti-virus software, automatic backup tools and various explorer # extensions that keep a file open a little longer than we expect, # causing the delete to fail. # # The solution is to wait a short amount of time before retrying the # delete. # if {$nRetry > 0} { for {set i 0} {$i < $nRetry} {incr i} { set rc [catch { delete_win32_file $fileName } msg] if {$rc == 0} break if {$nDelay > 0} { after $nDelay } } if {$rc} { error $msg } } else { delete_win32_file $fileName } } } } proc execpresql {handle args} { trace remove execution $handle enter [list execpresql $handle] if {[info exists ::G(perm:presql)]} { $handle eval $::G(perm:presql) } } |
︙ | |||
308 309 310 311 312 313 314 | 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 | - - + + | # The following block only runs the first time this file is sourced. It # does not run in slave interpreters (since the ::cmdlinearg array is # populated before the test script is run in slave interpreters). # if {[info exists cmdlinearg]==0} { |
︙ | |||
338 339 340 341 342 343 344 | 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 | - + | set cmdlinearg(start) "" set cmdlinearg(match) "" set leftover [list] foreach a $argv { switch -regexp -- $a { {^-+pause$} { |
︙ | |||
401 402 403 404 405 406 407 | 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 | - - + + | } } set argv $leftover # Install the malloc layer used to inject OOM errors. And the 'automatic' # extensions. This only needs to be done once for the process. # |
︙ | |||
512 513 514 515 516 517 518 | 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 | - + - + | # Increment the number of tests run # proc incr_ntest {} { set_test_counter count [expr [set_test_counter count] + 1] } |
︙ | |||
624 625 626 627 628 629 630 | 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 | - + - + | uplevel [list do_test $name [ subst -nocommands { realnum_normalize [ $cmd ] } ] [realnum_normalize $expected]] } proc fix_testname {varname} { upvar $varname testname |
︙ | |||
716 717 718 719 720 721 722 | 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 | - + | proc delete_all_data {} { db eval {SELECT tbl_name AS t FROM sqlite_master WHERE type = 'table'} { db eval "DELETE FROM '[string map {' ''} $t]'" } } |
︙ | |||
979 980 981 982 983 984 985 986 987 988 989 990 991 992 | 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 | + + + + + + + + + | db eval $sql data { foreach f $data(*) { lappend result $f $data($f) } } return $result } # Use a temporary in-memory database to execute SQL statements # proc memdbsql {sql} { sqlite3 memdb :memory: set result [memdb eval $sql] memdb close return $result } # Use the non-callback API to execute multiple SQL statements # proc stepsql {dbptr sql} { set sql [string trim $sql] set r 0 while {[string length $sql]>0} { |
︙ | |||
1094 1095 1096 1097 1098 1099 1100 | 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 | - + - + | set blocksize "" set crashdelay 1 set prngseed 0 set tclbody {} set crashfile "" set dc "" set sql [lindex $args end] |
︙ | |||
1148 1149 1150 1151 1152 1153 1154 | 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 | - + - + | puts $f "$sql" puts $f "}" } close $f set r [catch { exec [info nameofexec] crash.tcl >@stdout } msg] |
︙ | |||
1184 1185 1186 1187 1188 1189 1190 | 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 | - + | } expr 0 } # Usage: do_ioerr_test <test number> <options...> # # This proc is used to implement test cases that check that IO errors |
︙ | |||
1213 1214 1215 1216 1217 1218 1219 | 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 | - + | set ::ioerropts(-ckrefcount) 0 set ::ioerropts(-restoreprng) 1 array set ::ioerropts $args # TEMPORARY: For 3.5.9, disable testing of extended result codes. There are # a couple of obscure IO errors that do not return them. set ::ioerropts(-erc) 0 |
︙ | |||
1237 1238 1239 1240 1241 1242 1243 | 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 | - + - + - + | set ::go 1 #reset_prng_state for {set n $::ioerropts(-start)} {$::go} {incr n} { set ::TN $n incr ::ioerropts(-count) -1 if {$::ioerropts(-count)<0} break |
︙ | |||
1318 1319 1320 1321 1322 1323 1324 | 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 | - - + + - + - + | #puts "s=$s r=$r q=$q" expr { ($s && !$r && !$q) || (!$s && $r && $q) } } {1} set ::sqlite_io_error_hit 0 set ::sqlite_io_error_pending 0 |
︙ | |||
1443 1444 1445 1446 1447 1448 1449 | 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 | - + | append txt $prag-[$db eval "PRAGMA $prag"]\n } # puts txt=$txt return [md5 $txt] } # Generate a checksum based on the contents of a single database with |
︙ | |||
1537 1538 1539 1540 1541 1542 1543 | 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 | - - + + - + - + | ifcapable trigger&&foreignkey { $db eval "PRAGMA foreign_keys = $pk" } } #------------------------------------------------------------------------- # If a test script is executed with global variable $::G(perm:name) set to |
︙ | |||
1656 1657 1658 1659 1660 1661 1662 | 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 | - + - + | # is not thread-safe. # if {[info exists ::run_thread_tests_called]==0} { do_test ${tail}-closeallfiles { expr {$::sqlite_open_file_count>0} } {0} } set ::sqlite_open_file_count 0 |
︙ |
Changes to test/wild001.test.
︙ | |||
38 39 40 41 42 43 44 | 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | - - - - | # This test should work the same with and without SQLITE_ENABLE_STAT3 # ############################################################################### set testdir [file dirname $argv0] source $testdir/tester.tcl |
︙ |
Changes to test/win32longpath.test.
︙ | |||
15 16 17 18 19 20 21 | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | if {$tcl_platform(platform)!="windows"} return set testdir [file dirname $argv0] source $testdir/tester.tcl set testprefix win32longpath |
︙ |