0000: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0010: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0020: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0030: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0040: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 0d ###############.
0050: 0a 23 0d 0a 23 20 74 6b 74 2d 35 38 65 64 33 31 .#..# tkt-58ed31
0060: 38 66 32 66 2e 65 61 67 6c 65 20 2d 2d 0d 0a 23 8f2f.eagle --..#
0070: 0d 0a 23 20 57 72 69 74 74 65 6e 20 62 79 20 4a ..# Written by J
0080: 6f 65 20 4d 69 73 74 61 63 68 6b 69 6e 2e 0d 0a oe Mistachkin...
0090: 23 20 52 65 6c 65 61 73 65 64 20 74 6f 20 74 68 # Released to th
00a0: 65 20 70 75 62 6c 69 63 20 64 6f 6d 61 69 6e 2c e public domain,
00b0: 20 75 73 65 20 61 74 20 79 6f 75 72 20 6f 77 6e use at your own
00c0: 20 72 69 73 6b 21 0d 0a 23 0d 0a 23 23 23 23 23 risk!..#..#####
00d0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
00e0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
00f0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0100: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0110: 23 23 23 23 23 23 23 23 23 23 0d 0a 0d 0a 70 61 ##########....pa
0120: 63 6b 61 67 65 20 72 65 71 75 69 72 65 20 45 61 ckage require Ea
0130: 67 6c 65 0d 0a 70 61 63 6b 61 67 65 20 72 65 71 gle..package req
0140: 75 69 72 65 20 45 61 67 6c 65 2e 4c 69 62 72 61 uire Eagle.Libra
0150: 72 79 0d 0a 70 61 63 6b 61 67 65 20 72 65 71 75 ry..package requ
0160: 69 72 65 20 45 61 67 6c 65 2e 54 65 73 74 0d 0a ire Eagle.Test..
0170: 0d 0a 72 75 6e 54 65 73 74 50 72 6f 6c 6f 67 75 ..runTestPrologu
0180: 65 0d 0a 0d 0a 23 23 23 23 23 23 23 23 23 23 23 e....###########
0190: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
01a0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
01b0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
01c0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
01d0: 23 23 23 23 0d 0a 0d 0a 70 61 63 6b 61 67 65 20 ####....package
01e0: 72 65 71 75 69 72 65 20 53 79 73 74 65 6d 2e 44 require System.D
01f0: 61 74 61 2e 53 51 4c 69 74 65 2e 54 65 73 74 0d ata.SQLite.Test.
0200: 0a 72 75 6e 53 51 4c 69 74 65 54 65 73 74 50 72 .runSQLiteTestPr
0210: 6f 6c 6f 67 75 65 0d 0a 0d 0a 23 23 23 23 23 23 ologue....######
0220: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0230: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0240: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0250: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0260: 23 23 23 23 23 23 23 23 23 0d 0a 0d 0a 70 72 6f #########....pro
0270: 63 20 67 65 74 53 65 74 74 69 6e 67 52 65 61 64 c getSettingRead
0280: 43 6f 75 6e 74 20 7b 20 6e 61 6d 65 20 7d 20 7b Count { name } {
0290: 0d 0a 20 20 69 66 20 7b 5b 68 61 76 65 43 6f 6e .. if {[haveCon
02a0: 73 74 72 61 69 6e 74 20 62 75 69 6c 64 43 6f 6e straint buildCon
02b0: 66 69 67 75 72 61 74 69 6f 6e 2e 44 65 62 75 67 figuration.Debug
02c0: 5d 20 26 26 20 5b 63 61 74 63 68 20 7b 0d 0a 20 ] && [catch {..
02d0: 20 20 20 6f 62 6a 65 63 74 20 69 6e 76 6f 6b 65 object invoke
02e0: 20 2d 66 6c 61 67 73 20 2b 4e 6f 6e 50 75 62 6c -flags +NonPubl
02f0: 69 63 20 2d 61 6c 69 61 73 20 5c 0d 0a 20 20 20 ic -alias \..
0300: 20 20 20 20 20 53 79 73 74 65 6d 2e 44 61 74 61 System.Data
0310: 2e 53 51 4c 69 74 65 2e 55 6e 73 61 66 65 4e 61 .SQLite.UnsafeNa
0320: 74 69 76 65 4d 65 74 68 6f 64 73 20 73 65 74 74 tiveMethods sett
0330: 69 6e 67 52 65 61 64 43 6f 75 6e 74 73 0d 0a 20 ingReadCounts..
0340: 20 7d 20 73 65 74 74 69 6e 67 52 65 61 64 43 6f } settingReadCo
0350: 75 6e 74 73 5d 20 3d 3d 20 30 7d 20 74 68 65 6e unts] == 0} then
0360: 20 7b 0d 0a 20 20 20 20 69 66 20 7b 5b 24 73 65 {.. if {[$se
0370: 74 74 69 6e 67 52 65 61 64 43 6f 75 6e 74 73 20 ttingReadCounts
0380: 54 72 79 47 65 74 56 61 6c 75 65 20 24 6e 61 6d TryGetValue $nam
0390: 65 20 76 61 6c 75 65 5d 7d 20 74 68 65 6e 20 7b e value]} then {
03a0: 0d 0a 20 20 20 20 20 20 74 70 75 74 73 20 24 3a .. tputs $:
03b0: 3a 74 65 73 74 5f 63 68 61 6e 6e 65 6c 20 5b 61 :test_channel [a
03c0: 70 70 65 6e 64 41 72 67 73 20 5c 0d 0a 20 20 20 ppendArgs \..
03d0: 20 20 20 20 20 20 20 22 2d 2d 2d 2d 20 73 65 74 "---- set
03e0: 74 69 6e 67 20 5c 22 22 20 24 6e 61 6d 65 20 22 ting \"" $name "
03f0: 5c 22 20 77 61 73 20 72 65 61 64 20 22 20 24 76 \" was read " $v
0400: 61 6c 75 65 20 22 20 74 69 6d 65 73 5c 6e 22 5d alue " times\n"]
0410: 0d 0a 0d 0a 20 20 20 20 20 20 72 65 74 75 72 6e .... return
0420: 20 24 76 61 6c 75 65 0d 0a 20 20 20 20 7d 0d 0a $value.. }..
0430: 20 20 7d 0d 0a 0d 0a 20 20 74 70 75 74 73 20 24 }.... tputs $
0440: 3a 3a 74 65 73 74 5f 63 68 61 6e 6e 65 6c 20 5b ::test_channel [
0450: 61 70 70 65 6e 64 41 72 67 73 20 5c 0d 0a 20 20 appendArgs \..
0460: 20 20 20 20 22 2d 2d 2d 2d 20 73 65 74 74 69 6e "---- settin
0470: 67 20 5c 22 22 20 24 6e 61 6d 65 20 22 5c 22 20 g \"" $name "\"
0480: 77 61 73 20 6e 6f 74 20 72 65 61 64 5c 6e 22 5d was not read\n"]
0490: 0d 0a 0d 0a 20 20 72 65 74 75 72 6e 20 2d 31 0d .... return -1.
04a0: 0a 7d 0d 0a 0d 0a 23 23 23 23 23 23 23 23 23 23 .}....##########
04b0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
04c0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
04d0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
04e0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
04f0: 23 23 23 23 23 0d 0a 0d 0a 72 65 70 6f 72 74 53 #####....reportS
0500: 51 4c 69 74 65 52 65 73 6f 75 72 63 65 73 20 24 QLiteResources $
0510: 74 65 73 74 5f 63 68 61 6e 6e 65 6c 20 74 72 75 test_channel tru
0520: 65 0d 0a 0d 0a 23 23 23 23 23 23 23 23 23 23 23 e....###########
0530: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0540: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0550: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0560: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0570: 23 23 23 23 0d 0a 0d 0a 72 75 6e 54 65 73 74 20 ####....runTest
0580: 7b 74 65 73 74 20 74 6b 74 2d 35 38 65 64 33 31 {test tkt-58ed31
0590: 38 66 32 66 2d 31 2e 31 20 7b 73 74 61 6e 64 61 8f2f-1.1 {standa
05a0: 72 64 20 47 65 74 44 65 66 61 75 6c 74 44 62 54 rd GetDefaultDbT
05b0: 79 70 65 20 75 73 61 67 65 7d 20 2d 73 65 74 75 ype usage} -setu
05c0: 70 20 7b 0d 0a 20 20 73 65 74 75 70 44 62 20 5b p {.. setupDb [
05d0: 73 65 74 20 66 69 6c 65 4e 61 6d 65 20 74 6b 74 set fileName tkt
05e0: 2d 35 38 65 64 33 31 38 66 32 66 2d 31 2e 31 2e -58ed318f2f-1.1.
05f0: 64 62 5d 0d 0a 7d 20 2d 62 6f 64 79 20 7b 0d 0a db]..} -body {..
0600: 20 20 73 71 6c 20 65 78 65 63 75 74 65 20 24 64 sql execute $d
0610: 62 20 7b 0d 0a 20 20 20 20 43 52 45 41 54 45 20 b {.. CREATE
0620: 54 41 42 4c 45 20 74 31 28 78 2c 20 79 29 3b 0d TABLE t1(x, y);.
0630: 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f . INSERT INTO
0640: 20 74 31 20 28 78 2c 20 79 29 20 56 41 4c 55 45 t1 (x, y) VALUE
0650: 53 28 30 2c 20 31 29 3b 0d 0a 20 20 20 20 49 4e S(0, 1);.. IN
0660: 53 45 52 54 20 49 4e 54 4f 20 74 31 20 28 78 2c SERT INTO t1 (x,
0670: 20 79 29 20 56 41 4c 55 45 53 28 27 30 27 2c 20 y) VALUES('0',
0680: 27 31 27 29 3b 0d 0a 20 20 7d 0d 0a 0d 0a 20 20 '1');.. }....
0690: 73 71 6c 20 65 78 65 63 75 74 65 20 2d 65 78 65 sql execute -exe
06a0: 63 75 74 65 20 72 65 61 64 65 72 20 2d 66 6f 72 cute reader -for
06b0: 6d 61 74 20 6c 69 73 74 20 24 64 62 20 22 53 45 mat list $db "SE
06c0: 4c 45 43 54 20 78 2c 20 79 20 46 52 4f 4d 20 74 LECT x, y FROM t
06d0: 31 3b 22 0d 0a 0d 0a 20 20 65 78 70 72 20 7b 5b 1;".... expr {[
06e0: 67 65 74 53 65 74 74 69 6e 67 52 65 61 64 43 6f getSettingReadCo
06f0: 75 6e 74 20 55 73 65 5f 53 51 4c 69 74 65 43 6f unt Use_SQLiteCo
0700: 6e 76 65 72 74 5f 44 65 66 61 75 6c 74 44 62 54 nvert_DefaultDbT
0710: 79 70 65 5d 20 3d 3d 20 31 7d 0d 0a 7d 20 2d 63 ype] == 1}..} -c
0720: 6c 65 61 6e 75 70 20 7b 0d 0a 20 20 63 6c 65 61 leanup {.. clea
0730: 6e 75 70 44 62 20 24 66 69 6c 65 4e 61 6d 65 0d nupDb $fileName.
0740: 0a 0d 0a 20 20 75 6e 73 65 74 20 2d 6e 6f 63 6f ... unset -noco
0750: 6d 70 6c 61 69 6e 20 64 62 20 66 69 6c 65 4e 61 mplain db fileNa
0760: 6d 65 0d 0a 7d 20 2d 63 6f 6e 73 74 72 61 69 6e me..} -constrain
0770: 74 73 20 5c 0d 0a 7b 65 61 67 6c 65 20 6d 6f 6e ts \..{eagle mon
0780: 6f 42 75 67 32 38 20 63 6f 6d 6d 61 6e 64 2e 73 oBug28 command.s
0790: 71 6c 20 63 6f 6d 70 69 6c 65 2e 44 41 54 41 20 ql compile.DATA
07a0: 53 51 4c 69 74 65 20 53 79 73 74 65 6d 2e 44 61 SQLite System.Da
07b0: 74 61 2e 53 51 4c 69 74 65 5c 0d 0a 62 75 69 6c ta.SQLite\..buil
07c0: 64 43 6f 6e 66 69 67 75 72 61 74 69 6f 6e 2e 44 dConfiguration.D
07d0: 65 62 75 67 7d 20 2d 72 65 73 75 6c 74 20 7b 54 ebug} -result {T
07e0: 72 75 65 7d 7d 0d 0a 0d 0a 23 23 23 23 23 23 23 rue}}....#######
07f0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0800: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0810: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0820: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0830: 23 23 23 23 23 23 23 23 0d 0a 0d 0a 72 65 70 6f ########....repo
0840: 72 74 53 51 4c 69 74 65 52 65 73 6f 75 72 63 65 rtSQLiteResource
0850: 73 20 24 74 65 73 74 5f 63 68 61 6e 6e 65 6c 20 s $test_channel
0860: 74 72 75 65 0d 0a 0d 0a 23 23 23 23 23 23 23 23 true....########
0870: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0880: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0890: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
08a0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
08b0: 23 23 23 23 23 23 23 0d 0a 0d 0a 72 75 6e 54 65 #######....runTe
08c0: 73 74 20 7b 74 65 73 74 20 74 6b 74 2d 35 38 65 st {test tkt-58e
08d0: 64 33 31 38 66 32 66 2d 31 2e 32 20 7b 6e 6f 20 d318f2f-1.2 {no
08e0: 70 72 6f 70 65 72 74 79 20 47 65 74 44 65 66 61 property GetDefa
08f0: 75 6c 74 44 62 54 79 70 65 20 75 73 61 67 65 7d ultDbType usage}
0900: 20 2d 73 65 74 75 70 20 7b 0d 0a 20 20 73 65 74 -setup {.. set
0910: 75 70 44 62 20 5b 73 65 74 20 66 69 6c 65 4e 61 upDb [set fileNa
0920: 6d 65 20 74 6b 74 2d 35 38 65 64 33 31 38 66 32 me tkt-58ed318f2
0930: 66 2d 31 2e 32 2e 64 62 5d 20 22 22 20 22 22 20 f-1.2.db] "" ""
0940: 22 22 20 55 73 65 43 6f 6e 6e 65 63 74 69 6f 6e "" UseConnection
0950: 54 79 70 65 73 0d 0a 7d 20 2d 62 6f 64 79 20 7b Types..} -body {
0960: 0d 0a 20 20 73 71 6c 20 65 78 65 63 75 74 65 20 .. sql execute
0970: 24 64 62 20 7b 0d 0a 20 20 20 20 43 52 45 41 54 $db {.. CREAT
0980: 45 20 54 41 42 4c 45 20 74 31 28 78 2c 20 79 29 E TABLE t1(x, y)
0990: 3b 0d 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e ;.. INSERT IN
09a0: 54 4f 20 74 31 20 28 78 2c 20 79 29 20 56 41 4c TO t1 (x, y) VAL
09b0: 55 45 53 28 30 2c 20 31 29 3b 0d 0a 20 20 20 20 UES(0, 1);..
09c0: 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 28 INSERT INTO t1 (
09d0: 78 2c 20 79 29 20 56 41 4c 55 45 53 28 27 30 27 x, y) VALUES('0'
09e0: 2c 20 27 31 27 29 3b 0d 0a 20 20 7d 0d 0a 0d 0a , '1');.. }....
09f0: 20 20 73 71 6c 20 65 78 65 63 75 74 65 20 2d 65 sql execute -e
0a00: 78 65 63 75 74 65 20 72 65 61 64 65 72 20 2d 66 xecute reader -f
0a10: 6f 72 6d 61 74 20 6c 69 73 74 20 24 64 62 20 22 ormat list $db "
0a20: 53 45 4c 45 43 54 20 78 2c 20 79 20 46 52 4f 4d SELECT x, y FROM
0a30: 20 74 31 3b 22 0d 0a 0d 0a 20 20 65 78 70 72 20 t1;".... expr
0a40: 7b 5b 67 65 74 53 65 74 74 69 6e 67 52 65 61 64 {[getSettingRead
0a50: 43 6f 75 6e 74 20 55 73 65 5f 53 51 4c 69 74 65 Count Use_SQLite
0a60: 43 6f 6e 76 65 72 74 5f 44 65 66 61 75 6c 74 44 Convert_DefaultD
0a70: 62 54 79 70 65 5d 20 3d 3d 20 31 7d 0d 0a 7d 20 bType] == 1}..}
0a80: 2d 63 6c 65 61 6e 75 70 20 7b 0d 0a 20 20 63 6c -cleanup {.. cl
0a90: 65 61 6e 75 70 44 62 20 24 66 69 6c 65 4e 61 6d eanupDb $fileNam
0aa0: 65 0d 0a 0d 0a 20 20 75 6e 73 65 74 20 2d 6e 6f e.... unset -no
0ab0: 63 6f 6d 70 6c 61 69 6e 20 64 62 20 66 69 6c 65 complain db file
0ac0: 4e 61 6d 65 0d 0a 7d 20 2d 63 6f 6e 73 74 72 61 Name..} -constra
0ad0: 69 6e 74 73 20 5c 0d 0a 7b 65 61 67 6c 65 20 6d ints \..{eagle m
0ae0: 6f 6e 6f 42 75 67 32 38 20 63 6f 6d 6d 61 6e 64 onoBug28 command
0af0: 2e 73 71 6c 20 63 6f 6d 70 69 6c 65 2e 44 41 54 .sql compile.DAT
0b00: 41 20 53 51 4c 69 74 65 20 53 79 73 74 65 6d 2e A SQLite System.
0b10: 44 61 74 61 2e 53 51 4c 69 74 65 5c 0d 0a 62 75 Data.SQLite\..bu
0b20: 69 6c 64 43 6f 6e 66 69 67 75 72 61 74 69 6f 6e ildConfiguration
0b30: 2e 44 65 62 75 67 7d 20 2d 72 65 73 75 6c 74 20 .Debug} -result
0b40: 7b 54 72 75 65 7d 7d 0d 0a 0d 0a 23 23 23 23 23 {True}}....#####
0b50: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0b60: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0b70: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0b80: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0b90: 23 23 23 23 23 23 23 23 23 23 0d 0a 0d 0a 72 65 ##########....re
0ba0: 70 6f 72 74 53 51 4c 69 74 65 52 65 73 6f 75 72 portSQLiteResour
0bb0: 63 65 73 20 24 74 65 73 74 5f 63 68 61 6e 6e 65 ces $test_channe
0bc0: 6c 20 74 72 75 65 0d 0a 0d 0a 23 23 23 23 23 23 l true....######
0bd0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0be0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0bf0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0c00: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0c10: 23 23 23 23 23 23 23 23 23 0d 0a 0d 0a 72 75 6e #########....run
0c20: 54 65 73 74 20 7b 74 65 73 74 20 74 6b 74 2d 35 Test {test tkt-5
0c30: 38 65 64 33 31 38 66 32 66 2d 31 2e 33 20 7b 6e 8ed318f2f-1.3 {n
0c40: 6f 20 66 6c 61 67 20 47 65 74 44 65 66 61 75 6c o flag GetDefaul
0c50: 74 44 62 54 79 70 65 20 75 73 61 67 65 7d 20 2d tDbType usage} -
0c60: 73 65 74 75 70 20 7b 0d 0a 20 20 73 65 74 75 70 setup {.. setup
0c70: 44 62 20 5b 73 65 74 20 66 69 6c 65 4e 61 6d 65 Db [set fileName
0c80: 20 74 6b 74 2d 35 38 65 64 33 31 38 66 32 66 2d tkt-58ed318f2f-
0c90: 31 2e 33 2e 64 62 5d 20 22 22 20 22 22 20 22 22 1.3.db] "" "" ""
0ca0: 20 22 22 20 5c 0d 0a 20 20 20 20 20 20 22 44 65 "" \.. "De
0cb0: 66 61 75 6c 74 44 62 54 79 70 65 3d 53 74 72 69 faultDbType=Stri
0cc0: 6e 67 3b 22 0d 0a 7d 20 2d 62 6f 64 79 20 7b 0d ng;"..} -body {.
0cd0: 0a 20 20 73 71 6c 20 65 78 65 63 75 74 65 20 24 . sql execute $
0ce0: 64 62 20 7b 0d 0a 20 20 20 20 43 52 45 41 54 45 db {.. CREATE
0cf0: 20 54 41 42 4c 45 20 74 31 28 78 2c 20 79 29 3b TABLE t1(x, y);
0d00: 0d 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 .. INSERT INT
0d10: 4f 20 74 31 20 28 78 2c 20 79 29 20 56 41 4c 55 O t1 (x, y) VALU
0d20: 45 53 28 30 2c 20 31 29 3b 0d 0a 20 20 20 20 49 ES(0, 1);.. I
0d30: 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 28 78 NSERT INTO t1 (x
0d40: 2c 20 79 29 20 56 41 4c 55 45 53 28 27 30 27 2c , y) VALUES('0',
0d50: 20 27 31 27 29 3b 0d 0a 20 20 7d 0d 0a 0d 0a 20 '1');.. }....
0d60: 20 73 71 6c 20 65 78 65 63 75 74 65 20 2d 65 78 sql execute -ex
0d70: 65 63 75 74 65 20 72 65 61 64 65 72 20 2d 66 6f ecute reader -fo
0d80: 72 6d 61 74 20 6c 69 73 74 20 24 64 62 20 22 53 rmat list $db "S
0d90: 45 4c 45 43 54 20 78 2c 20 79 20 46 52 4f 4d 20 ELECT x, y FROM
0da0: 74 31 3b 22 0d 0a 0d 0a 20 20 65 78 70 72 20 7b t1;".... expr {
0db0: 5b 67 65 74 53 65 74 74 69 6e 67 52 65 61 64 43 [getSettingReadC
0dc0: 6f 75 6e 74 20 55 73 65 5f 53 51 4c 69 74 65 43 ount Use_SQLiteC
0dd0: 6f 6e 76 65 72 74 5f 44 65 66 61 75 6c 74 44 62 onvert_DefaultDb
0de0: 54 79 70 65 5d 20 3d 3d 20 2d 31 7d 0d 0a 7d 20 Type] == -1}..}
0df0: 2d 63 6c 65 61 6e 75 70 20 7b 0d 0a 20 20 63 6c -cleanup {.. cl
0e00: 65 61 6e 75 70 44 62 20 24 66 69 6c 65 4e 61 6d eanupDb $fileNam
0e10: 65 0d 0a 0d 0a 20 20 75 6e 73 65 74 20 2d 6e 6f e.... unset -no
0e20: 63 6f 6d 70 6c 61 69 6e 20 64 62 20 66 69 6c 65 complain db file
0e30: 4e 61 6d 65 0d 0a 7d 20 2d 63 6f 6e 73 74 72 61 Name..} -constra
0e40: 69 6e 74 73 20 5c 0d 0a 7b 65 61 67 6c 65 20 6d ints \..{eagle m
0e50: 6f 6e 6f 42 75 67 32 38 20 63 6f 6d 6d 61 6e 64 onoBug28 command
0e60: 2e 73 71 6c 20 63 6f 6d 70 69 6c 65 2e 44 41 54 .sql compile.DAT
0e70: 41 20 53 51 4c 69 74 65 20 53 79 73 74 65 6d 2e A SQLite System.
0e80: 44 61 74 61 2e 53 51 4c 69 74 65 5c 0d 0a 62 75 Data.SQLite\..bu
0e90: 69 6c 64 43 6f 6e 66 69 67 75 72 61 74 69 6f 6e ildConfiguration
0ea0: 2e 44 65 62 75 67 7d 20 2d 72 65 73 75 6c 74 20 .Debug} -result
0eb0: 7b 54 72 75 65 7d 7d 0d 0a 0d 0a 23 23 23 23 23 {True}}....#####
0ec0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0ed0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0ee0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0ef0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0f00: 23 23 23 23 23 23 23 23 23 23 0d 0a 0d 0a 72 65 ##########....re
0f10: 70 6f 72 74 53 51 4c 69 74 65 52 65 73 6f 75 72 portSQLiteResour
0f20: 63 65 73 20 24 74 65 73 74 5f 63 68 61 6e 6e 65 ces $test_channe
0f30: 6c 20 74 72 75 65 0d 0a 0d 0a 23 23 23 23 23 23 l true....######
0f40: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0f50: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0f60: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0f70: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0f80: 23 23 23 23 23 23 23 23 23 0d 0a 0d 0a 72 75 6e #########....run
0f90: 54 65 73 74 20 7b 74 65 73 74 20 74 6b 74 2d 35 Test {test tkt-5
0fa0: 38 65 64 33 31 38 66 32 66 2d 31 2e 34 20 7b 7a 8ed318f2f-1.4 {z
0fb0: 65 72 6f 20 47 65 74 44 65 66 61 75 6c 74 44 62 ero GetDefaultDb
0fc0: 54 79 70 65 20 75 73 61 67 65 7d 20 2d 73 65 74 Type usage} -set
0fd0: 75 70 20 7b 0d 0a 20 20 73 65 74 75 70 44 62 20 up {.. setupDb
0fe0: 5b 73 65 74 20 66 69 6c 65 4e 61 6d 65 20 74 6b [set fileName tk
0ff0: 74 2d 35 38 65 64 33 31 38 66 32 66 2d 31 2e 34 t-58ed318f2f-1.4
1000: 2e 64 62 5d 20 22 22 20 22 22 20 22 22 20 55 73 .db] "" "" "" Us
1010: 65 43 6f 6e 6e 65 63 74 69 6f 6e 54 79 70 65 73 eConnectionTypes
1020: 20 5c 0d 0a 20 20 20 20 20 20 22 44 65 66 61 75 \.. "Defau
1030: 6c 74 44 62 54 79 70 65 3d 53 74 72 69 6e 67 3b ltDbType=String;
1040: 22 0d 0a 7d 20 2d 62 6f 64 79 20 7b 0d 0a 20 20 "..} -body {..
1050: 73 71 6c 20 65 78 65 63 75 74 65 20 24 64 62 20 sql execute $db
1060: 7b 0d 0a 20 20 20 20 43 52 45 41 54 45 20 54 41 {.. CREATE TA
1070: 42 4c 45 20 74 31 28 78 2c 20 79 29 3b 0d 0a 20 BLE t1(x, y);..
1080: 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 INSERT INTO t
1090: 31 20 28 78 2c 20 79 29 20 56 41 4c 55 45 53 28 1 (x, y) VALUES(
10a0: 30 2c 20 31 29 3b 0d 0a 20 20 20 20 49 4e 53 45 0, 1);.. INSE
10b0: 52 54 20 49 4e 54 4f 20 74 31 20 28 78 2c 20 79 RT INTO t1 (x, y
10c0: 29 20 56 41 4c 55 45 53 28 27 30 27 2c 20 27 31 ) VALUES('0', '1
10d0: 27 29 3b 0d 0a 20 20 7d 0d 0a 0d 0a 20 20 73 71 ');.. }.... sq
10e0: 6c 20 65 78 65 63 75 74 65 20 2d 65 78 65 63 75 l execute -execu
10f0: 74 65 20 72 65 61 64 65 72 20 2d 66 6f 72 6d 61 te reader -forma
1100: 74 20 6c 69 73 74 20 24 64 62 20 22 53 45 4c 45 t list $db "SELE
1110: 43 54 20 78 2c 20 79 20 46 52 4f 4d 20 74 31 3b CT x, y FROM t1;
1120: 22 0d 0a 0d 0a 20 20 65 78 70 72 20 7b 5b 67 65 ".... expr {[ge
1130: 74 53 65 74 74 69 6e 67 52 65 61 64 43 6f 75 6e tSettingReadCoun
1140: 74 20 55 73 65 5f 53 51 4c 69 74 65 43 6f 6e 76 t Use_SQLiteConv
1150: 65 72 74 5f 44 65 66 61 75 6c 74 44 62 54 79 70 ert_DefaultDbTyp
1160: 65 5d 20 3d 3d 20 2d 31 7d 0d 0a 7d 20 2d 63 6c e] == -1}..} -cl
1170: 65 61 6e 75 70 20 7b 0d 0a 20 20 63 6c 65 61 6e eanup {.. clean
1180: 75 70 44 62 20 24 66 69 6c 65 4e 61 6d 65 0d 0a upDb $fileName..
1190: 0d 0a 20 20 75 6e 73 65 74 20 2d 6e 6f 63 6f 6d .. unset -nocom
11a0: 70 6c 61 69 6e 20 64 62 20 66 69 6c 65 4e 61 6d plain db fileNam
11b0: 65 0d 0a 7d 20 2d 63 6f 6e 73 74 72 61 69 6e 74 e..} -constraint
11c0: 73 20 5c 0d 0a 7b 65 61 67 6c 65 20 6d 6f 6e 6f s \..{eagle mono
11d0: 42 75 67 32 38 20 63 6f 6d 6d 61 6e 64 2e 73 71 Bug28 command.sq
11e0: 6c 20 63 6f 6d 70 69 6c 65 2e 44 41 54 41 20 53 l compile.DATA S
11f0: 51 4c 69 74 65 20 53 79 73 74 65 6d 2e 44 61 74 QLite System.Dat
1200: 61 2e 53 51 4c 69 74 65 5c 0d 0a 62 75 69 6c 64 a.SQLite\..build
1210: 43 6f 6e 66 69 67 75 72 61 74 69 6f 6e 2e 44 65 Configuration.De
1220: 62 75 67 7d 20 2d 72 65 73 75 6c 74 20 7b 54 72 bug} -result {Tr
1230: 75 65 7d 7d 0d 0a 0d 0a 23 23 23 23 23 23 23 23 ue}}....########
1240: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
1250: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
1260: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
1270: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
1280: 23 23 23 23 23 23 23 0d 0a 0d 0a 72 65 70 6f 72 #######....repor
1290: 74 53 51 4c 69 74 65 52 65 73 6f 75 72 63 65 73 tSQLiteResources
12a0: 20 24 74 65 73 74 5f 63 68 61 6e 6e 65 6c 20 74 $test_channel t
12b0: 72 75 65 0d 0a 0d 0a 23 23 23 23 23 23 23 23 23 rue....#########
12c0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
12d0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
12e0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
12f0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
1300: 23 23 23 23 23 23 0d 0a 0d 0a 72 75 6e 54 65 73 ######....runTes
1310: 74 20 7b 74 65 73 74 20 74 6b 74 2d 35 38 65 64 t {test tkt-58ed
1320: 33 31 38 66 32 66 2d 31 2e 35 20 7b 73 74 61 6e 318f2f-1.5 {stan
1330: 64 61 72 64 20 47 65 74 44 65 66 61 75 6c 74 54 dard GetDefaultT
1340: 79 70 65 4e 61 6d 65 20 75 73 61 67 65 7d 20 2d ypeName usage} -
1350: 73 65 74 75 70 20 7b 0d 0a 20 20 73 65 74 75 70 setup {.. setup
1360: 44 62 20 5b 73 65 74 20 66 69 6c 65 4e 61 6d 65 Db [set fileName
1370: 20 74 6b 74 2d 35 38 65 64 33 31 38 66 32 66 2d tkt-58ed318f2f-
1380: 31 2e 35 2e 64 62 5d 0d 0a 7d 20 2d 62 6f 64 79 1.5.db]..} -body
1390: 20 7b 0d 0a 20 20 73 65 74 20 63 6f 6e 6e 65 63 {.. set connec
13a0: 74 69 6f 6e 20 5b 67 65 74 44 62 43 6f 6e 6e 65 tion [getDbConne
13b0: 63 74 69 6f 6e 5d 0d 0a 0d 0a 20 20 73 71 6c 20 ction].... sql
13c0: 65 78 65 63 75 74 65 20 24 64 62 20 7b 0d 0a 20 execute $db {..
13d0: 20 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 CREATE TABLE
13e0: 74 31 28 78 2c 20 79 29 3b 0d 0a 20 20 20 20 49 t1(x, y);.. I
13f0: 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 28 78 NSERT INTO t1 (x
1400: 2c 20 79 29 20 56 41 4c 55 45 53 28 30 2c 20 31 , y) VALUES(0, 1
1410: 29 3b 0d 0a 20 20 20 20 49 4e 53 45 52 54 20 49 );.. INSERT I
1420: 4e 54 4f 20 74 31 20 28 78 2c 20 79 29 20 56 41 NTO t1 (x, y) VA
1430: 4c 55 45 53 28 27 30 27 2c 20 27 31 27 29 3b 0d LUES('0', '1');.
1440: 0a 20 20 7d 0d 0a 0d 0a 20 20 73 65 74 20 63 6f . }.... set co
1450: 6c 75 6d 6e 73 20 5b 24 63 6f 6e 6e 65 63 74 69 lumns [$connecti
1460: 6f 6e 20 47 65 74 53 63 68 65 6d 61 20 43 4f 4c on GetSchema COL
1470: 55 4d 4e 53 5d 0d 0a 0d 0a 20 20 65 78 70 72 20 UMNS].... expr
1480: 7b 5b 67 65 74 53 65 74 74 69 6e 67 52 65 61 64 {[getSettingRead
1490: 43 6f 75 6e 74 20 55 73 65 5f 53 51 4c 69 74 65 Count Use_SQLite
14a0: 43 6f 6e 76 65 72 74 5f 44 65 66 61 75 6c 74 54 Convert_DefaultT
14b0: 79 70 65 4e 61 6d 65 5d 20 3d 3d 20 31 7d 0d 0a ypeName] == 1}..
14c0: 7d 20 2d 63 6c 65 61 6e 75 70 20 7b 0d 0a 20 20 } -cleanup {..
14d0: 63 6c 65 61 6e 75 70 44 62 20 24 66 69 6c 65 4e cleanupDb $fileN
14e0: 61 6d 65 0d 0a 0d 0a 20 20 66 72 65 65 44 62 43 ame.... freeDbC
14f0: 6f 6e 6e 65 63 74 69 6f 6e 0d 0a 0d 0a 20 20 75 onnection.... u
1500: 6e 73 65 74 20 2d 6e 6f 63 6f 6d 70 6c 61 69 6e nset -nocomplain
1510: 20 63 6f 6c 75 6d 6e 73 20 63 6f 6e 6e 65 63 74 columns connect
1520: 69 6f 6e 20 64 62 20 66 69 6c 65 4e 61 6d 65 0d ion db fileName.
1530: 0a 7d 20 2d 63 6f 6e 73 74 72 61 69 6e 74 73 20 .} -constraints
1540: 5c 0d 0a 7b 65 61 67 6c 65 20 6d 6f 6e 6f 42 75 \..{eagle monoBu
1550: 67 32 38 20 63 6f 6d 6d 61 6e 64 2e 73 71 6c 20 g28 command.sql
1560: 63 6f 6d 70 69 6c 65 2e 44 41 54 41 20 53 51 4c compile.DATA SQL
1570: 69 74 65 20 53 79 73 74 65 6d 2e 44 61 74 61 2e ite System.Data.
1580: 53 51 4c 69 74 65 5c 0d 0a 62 75 69 6c 64 43 6f SQLite\..buildCo
1590: 6e 66 69 67 75 72 61 74 69 6f 6e 2e 44 65 62 75 nfiguration.Debu
15a0: 67 7d 20 2d 72 65 73 75 6c 74 20 7b 54 72 75 65 g} -result {True
15b0: 7d 7d 0d 0a 0d 0a 23 23 23 23 23 23 23 23 23 23 }}....##########
15c0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
15d0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
15e0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
15f0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
1600: 23 23 23 23 23 0d 0a 0d 0a 72 65 70 6f 72 74 53 #####....reportS
1610: 51 4c 69 74 65 52 65 73 6f 75 72 63 65 73 20 24 QLiteResources $
1620: 74 65 73 74 5f 63 68 61 6e 6e 65 6c 20 74 72 75 test_channel tru
1630: 65 0d 0a 0d 0a 23 23 23 23 23 23 23 23 23 23 23 e....###########
1640: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
1650: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
1660: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
1670: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
1680: 23 23 23 23 0d 0a 0d 0a 72 75 6e 54 65 73 74 20 ####....runTest
1690: 7b 74 65 73 74 20 74 6b 74 2d 35 38 65 64 33 31 {test tkt-58ed31
16a0: 38 66 32 66 2d 31 2e 36 20 7b 6e 6f 20 70 72 6f 8f2f-1.6 {no pro
16b0: 70 65 72 74 79 20 47 65 74 44 65 66 61 75 6c 74 perty GetDefault
16c0: 54 79 70 65 4e 61 6d 65 20 75 73 61 67 65 7d 20 TypeName usage}
16d0: 2d 73 65 74 75 70 20 7b 0d 0a 20 20 73 65 74 75 -setup {.. setu
16e0: 70 44 62 20 5b 73 65 74 20 66 69 6c 65 4e 61 6d pDb [set fileNam
16f0: 65 20 74 6b 74 2d 35 38 65 64 33 31 38 66 32 66 e tkt-58ed318f2f
1700: 2d 31 2e 36 2e 64 62 5d 20 22 22 20 22 22 20 22 -1.6.db] "" "" "
1710: 22 20 55 73 65 43 6f 6e 6e 65 63 74 69 6f 6e 54 " UseConnectionT
1720: 79 70 65 73 0d 0a 7d 20 2d 62 6f 64 79 20 7b 0d ypes..} -body {.
1730: 0a 20 20 73 65 74 20 63 6f 6e 6e 65 63 74 69 6f . set connectio
1740: 6e 20 5b 67 65 74 44 62 43 6f 6e 6e 65 63 74 69 n [getDbConnecti
1750: 6f 6e 5d 0d 0a 0d 0a 20 20 73 71 6c 20 65 78 65 on].... sql exe
1760: 63 75 74 65 20 24 64 62 20 7b 0d 0a 20 20 20 20 cute $db {..
1770: 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 CREATE TABLE t1(
1780: 78 2c 20 79 29 3b 0d 0a 20 20 20 20 49 4e 53 45 x, y);.. INSE
1790: 52 54 20 49 4e 54 4f 20 74 31 20 28 78 2c 20 79 RT INTO t1 (x, y
17a0: 29 20 56 41 4c 55 45 53 28 30 2c 20 31 29 3b 0d ) VALUES(0, 1);.
17b0: 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f . INSERT INTO
17c0: 20 74 31 20 28 78 2c 20 79 29 20 56 41 4c 55 45 t1 (x, y) VALUE
17d0: 53 28 27 30 27 2c 20 27 31 27 29 3b 0d 0a 20 20 S('0', '1');..
17e0: 7d 0d 0a 0d 0a 20 20 73 65 74 20 63 6f 6c 75 6d }.... set colum
17f0: 6e 73 20 5b 24 63 6f 6e 6e 65 63 74 69 6f 6e 20 ns [$connection
1800: 47 65 74 53 63 68 65 6d 61 20 43 4f 4c 55 4d 4e GetSchema COLUMN
1810: 53 5d 0d 0a 0d 0a 20 20 65 78 70 72 20 7b 5b 67 S].... expr {[g
1820: 65 74 53 65 74 74 69 6e 67 52 65 61 64 43 6f 75 etSettingReadCou
1830: 6e 74 20 55 73 65 5f 53 51 4c 69 74 65 43 6f 6e nt Use_SQLiteCon
1840: 76 65 72 74 5f 44 65 66 61 75 6c 74 54 79 70 65 vert_DefaultType
1850: 4e 61 6d 65 5d 20 3d 3d 20 31 7d 0d 0a 7d 20 2d Name] == 1}..} -
1860: 63 6c 65 61 6e 75 70 20 7b 0d 0a 20 20 63 6c 65 cleanup {.. cle
1870: 61 6e 75 70 44 62 20 24 66 69 6c 65 4e 61 6d 65 anupDb $fileName
1880: 0d 0a 0d 0a 20 20 66 72 65 65 44 62 43 6f 6e 6e .... freeDbConn
1890: 65 63 74 69 6f 6e 0d 0a 0d 0a 20 20 75 6e 73 65 ection.... unse
18a0: 74 20 2d 6e 6f 63 6f 6d 70 6c 61 69 6e 20 63 6f t -nocomplain co
18b0: 6c 75 6d 6e 73 20 63 6f 6e 6e 65 63 74 69 6f 6e lumns connection
18c0: 20 64 62 20 66 69 6c 65 4e 61 6d 65 0d 0a 7d 20 db fileName..}
18d0: 2d 63 6f 6e 73 74 72 61 69 6e 74 73 20 5c 0d 0a -constraints \..
18e0: 7b 65 61 67 6c 65 20 6d 6f 6e 6f 42 75 67 32 38 {eagle monoBug28
18f0: 20 63 6f 6d 6d 61 6e 64 2e 73 71 6c 20 63 6f 6d command.sql com
1900: 70 69 6c 65 2e 44 41 54 41 20 53 51 4c 69 74 65 pile.DATA SQLite
1910: 20 53 79 73 74 65 6d 2e 44 61 74 61 2e 53 51 4c System.Data.SQL
1920: 69 74 65 5c 0d 0a 62 75 69 6c 64 43 6f 6e 66 69 ite\..buildConfi
1930: 67 75 72 61 74 69 6f 6e 2e 44 65 62 75 67 7d 20 guration.Debug}
1940: 2d 72 65 73 75 6c 74 20 7b 54 72 75 65 7d 7d 0d -result {True}}.
1950: 0a 0d 0a 23 23 23 23 23 23 23 23 23 23 23 23 23 ...#############
1960: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
1970: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
1980: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
1990: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
19a0: 23 23 0d 0a 0d 0a 72 65 70 6f 72 74 53 51 4c 69 ##....reportSQLi
19b0: 74 65 52 65 73 6f 75 72 63 65 73 20 24 74 65 73 teResources $tes
19c0: 74 5f 63 68 61 6e 6e 65 6c 20 74 72 75 65 0d 0a t_channel true..
19d0: 0d 0a 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ..##############
19e0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
19f0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
1a00: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
1a10: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
1a20: 23 0d 0a 0d 0a 72 75 6e 54 65 73 74 20 7b 74 65 #....runTest {te
1a30: 73 74 20 74 6b 74 2d 35 38 65 64 33 31 38 66 32 st tkt-58ed318f2
1a40: 66 2d 31 2e 37 20 7b 6e 6f 20 66 6c 61 67 20 47 f-1.7 {no flag G
1a50: 65 74 44 65 66 61 75 6c 74 54 79 70 65 4e 61 6d etDefaultTypeNam
1a60: 65 20 75 73 61 67 65 7d 20 2d 73 65 74 75 70 20 e usage} -setup
1a70: 7b 0d 0a 20 20 73 65 74 75 70 44 62 20 5b 73 65 {.. setupDb [se
1a80: 74 20 66 69 6c 65 4e 61 6d 65 20 74 6b 74 2d 35 t fileName tkt-5
1a90: 38 65 64 33 31 38 66 32 66 2d 31 2e 37 2e 64 62 8ed318f2f-1.7.db
1aa0: 5d 20 22 22 20 22 22 20 22 22 20 22 22 20 5c 0d ] "" "" "" "" \.
1ab0: 0a 20 20 20 20 20 20 22 44 65 66 61 75 6c 74 44 . "DefaultD
1ac0: 62 54 79 70 65 3d 53 74 72 69 6e 67 3b 22 0d 0a bType=String;"..
1ad0: 7d 20 2d 62 6f 64 79 20 7b 0d 0a 20 20 73 65 74 } -body {.. set
1ae0: 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 5b 67 65 74 connection [get
1af0: 44 62 43 6f 6e 6e 65 63 74 69 6f 6e 5d 0d 0a 0d DbConnection]...
1b00: 0a 20 20 73 71 6c 20 65 78 65 63 75 74 65 20 24 . sql execute $
1b10: 64 62 20 7b 0d 0a 20 20 20 20 43 52 45 41 54 45 db {.. CREATE
1b20: 20 54 41 42 4c 45 20 74 31 28 78 2c 20 79 29 3b TABLE t1(x, y);
1b30: 0d 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 .. INSERT INT
1b40: 4f 20 74 31 20 28 78 2c 20 79 29 20 56 41 4c 55 O t1 (x, y) VALU
1b50: 45 53 28 30 2c 20 31 29 3b 0d 0a 20 20 20 20 49 ES(0, 1);.. I
1b60: 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 28 78 NSERT INTO t1 (x
1b70: 2c 20 79 29 20 56 41 4c 55 45 53 28 27 30 27 2c , y) VALUES('0',
1b80: 20 27 31 27 29 3b 0d 0a 20 20 7d 0d 0a 0d 0a 20 '1');.. }....
1b90: 20 73 65 74 20 63 6f 6c 75 6d 6e 73 20 5b 24 63 set columns [$c
1ba0: 6f 6e 6e 65 63 74 69 6f 6e 20 47 65 74 53 63 68 onnection GetSch
1bb0: 65 6d 61 20 43 4f 4c 55 4d 4e 53 5d 0d 0a 0d 0a ema COLUMNS]....
1bc0: 20 20 65 78 70 72 20 7b 5b 67 65 74 53 65 74 74 expr {[getSett
1bd0: 69 6e 67 52 65 61 64 43 6f 75 6e 74 20 55 73 65 ingReadCount Use
1be0: 5f 53 51 4c 69 74 65 43 6f 6e 76 65 72 74 5f 44 _SQLiteConvert_D
1bf0: 65 66 61 75 6c 74 54 79 70 65 4e 61 6d 65 5d 20 efaultTypeName]
1c00: 3d 3d 20 2d 31 7d 0d 0a 7d 20 2d 63 6c 65 61 6e == -1}..} -clean
1c10: 75 70 20 7b 0d 0a 20 20 63 6c 65 61 6e 75 70 44 up {.. cleanupD
1c20: 62 20 24 66 69 6c 65 4e 61 6d 65 0d 0a 0d 0a 20 b $fileName....
1c30: 20 66 72 65 65 44 62 43 6f 6e 6e 65 63 74 69 6f freeDbConnectio
1c40: 6e 0d 0a 0d 0a 20 20 75 6e 73 65 74 20 2d 6e 6f n.... unset -no
1c50: 63 6f 6d 70 6c 61 69 6e 20 63 6f 6c 75 6d 6e 73 complain columns
1c60: 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 64 62 20 66 connection db f
1c70: 69 6c 65 4e 61 6d 65 0d 0a 7d 20 2d 63 6f 6e 73 ileName..} -cons
1c80: 74 72 61 69 6e 74 73 20 5c 0d 0a 7b 65 61 67 6c traints \..{eagl
1c90: 65 20 6d 6f 6e 6f 42 75 67 32 38 20 63 6f 6d 6d e monoBug28 comm
1ca0: 61 6e 64 2e 73 71 6c 20 63 6f 6d 70 69 6c 65 2e and.sql compile.
1cb0: 44 41 54 41 20 53 51 4c 69 74 65 20 53 79 73 74 DATA SQLite Syst
1cc0: 65 6d 2e 44 61 74 61 2e 53 51 4c 69 74 65 5c 0d em.Data.SQLite\.
1cd0: 0a 62 75 69 6c 64 43 6f 6e 66 69 67 75 72 61 74 .buildConfigurat
1ce0: 69 6f 6e 2e 44 65 62 75 67 7d 20 2d 72 65 73 75 ion.Debug} -resu
1cf0: 6c 74 20 7b 54 72 75 65 7d 7d 0d 0a 0d 0a 23 23 lt {True}}....##
1d00: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
1d10: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
1d20: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
1d30: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
1d40: 23 23 23 23 23 23 23 23 23 23 23 23 23 0d 0a 0d #############...
1d50: 0a 72 65 70 6f 72 74 53 51 4c 69 74 65 52 65 73 .reportSQLiteRes
1d60: 6f 75 72 63 65 73 20 24 74 65 73 74 5f 63 68 61 ources $test_cha
1d70: 6e 6e 65 6c 20 74 72 75 65 0d 0a 0d 0a 23 23 23 nnel true....###
1d80: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
1d90: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
1da0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
1db0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
1dc0: 23 23 23 23 23 23 23 23 23 23 23 23 0d 0a 0d 0a ############....
1dd0: 72 75 6e 54 65 73 74 20 7b 74 65 73 74 20 74 6b runTest {test tk
1de0: 74 2d 35 38 65 64 33 31 38 66 32 66 2d 31 2e 38 t-58ed318f2f-1.8
1df0: 20 7b 7a 65 72 6f 20 47 65 74 44 65 66 61 75 6c {zero GetDefaul
1e00: 74 54 79 70 65 4e 61 6d 65 20 75 73 61 67 65 7d tTypeName usage}
1e10: 20 2d 73 65 74 75 70 20 7b 0d 0a 20 20 73 65 74 -setup {.. set
1e20: 75 70 44 62 20 5b 73 65 74 20 66 69 6c 65 4e 61 upDb [set fileNa
1e30: 6d 65 20 74 6b 74 2d 35 38 65 64 33 31 38 66 32 me tkt-58ed318f2
1e40: 66 2d 31 2e 38 2e 64 62 5d 20 22 22 20 22 22 20 f-1.8.db] "" ""
1e50: 22 22 20 55 73 65 43 6f 6e 6e 65 63 74 69 6f 6e "" UseConnection
1e60: 54 79 70 65 73 20 5c 0d 0a 20 20 20 20 20 20 22 Types \.. "
1e70: 44 65 66 61 75 6c 74 54 79 70 65 4e 61 6d 65 3d DefaultTypeName=
1e80: 54 45 58 54 3b 22 0d 0a 7d 20 2d 62 6f 64 79 20 TEXT;"..} -body
1e90: 7b 0d 0a 20 20 73 65 74 20 63 6f 6e 6e 65 63 74 {.. set connect
1ea0: 69 6f 6e 20 5b 67 65 74 44 62 43 6f 6e 6e 65 63 ion [getDbConnec
1eb0: 74 69 6f 6e 5d 0d 0a 0d 0a 20 20 73 71 6c 20 65 tion].... sql e
1ec0: 78 65 63 75 74 65 20 24 64 62 20 7b 0d 0a 20 20 xecute $db {..
1ed0: 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 CREATE TABLE t
1ee0: 31 28 78 2c 20 79 29 3b 0d 0a 20 20 20 20 49 4e 1(x, y);.. IN
1ef0: 53 45 52 54 20 49 4e 54 4f 20 74 31 20 28 78 2c SERT INTO t1 (x,
1f00: 20 79 29 20 56 41 4c 55 45 53 28 30 2c 20 31 29 y) VALUES(0, 1)
1f10: 3b 0d 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e ;.. INSERT IN
1f20: 54 4f 20 74 31 20 28 78 2c 20 79 29 20 56 41 4c TO t1 (x, y) VAL
1f30: 55 45 53 28 27 30 27 2c 20 27 31 27 29 3b 0d 0a UES('0', '1');..
1f40: 20 20 7d 0d 0a 0d 0a 20 20 73 65 74 20 63 6f 6c }.... set col
1f50: 75 6d 6e 73 20 5b 24 63 6f 6e 6e 65 63 74 69 6f umns [$connectio
1f60: 6e 20 47 65 74 53 63 68 65 6d 61 20 43 4f 4c 55 n GetSchema COLU
1f70: 4d 4e 53 5d 0d 0a 0d 0a 20 20 65 78 70 72 20 7b MNS].... expr {
1f80: 5b 67 65 74 53 65 74 74 69 6e 67 52 65 61 64 43 [getSettingReadC
1f90: 6f 75 6e 74 20 55 73 65 5f 53 51 4c 69 74 65 43 ount Use_SQLiteC
1fa0: 6f 6e 76 65 72 74 5f 44 65 66 61 75 6c 74 54 79 onvert_DefaultTy
1fb0: 70 65 4e 61 6d 65 5d 20 3d 3d 20 2d 31 7d 0d 0a peName] == -1}..
1fc0: 7d 20 2d 63 6c 65 61 6e 75 70 20 7b 0d 0a 20 20 } -cleanup {..
1fd0: 63 6c 65 61 6e 75 70 44 62 20 24 66 69 6c 65 4e cleanupDb $fileN
1fe0: 61 6d 65 0d 0a 0d 0a 20 20 66 72 65 65 44 62 43 ame.... freeDbC
1ff0: 6f 6e 6e 65 63 74 69 6f 6e 0d 0a 0d 0a 20 20 75 onnection.... u
2000: 6e 73 65 74 20 2d 6e 6f 63 6f 6d 70 6c 61 69 6e nset -nocomplain
2010: 20 63 6f 6c 75 6d 6e 73 20 63 6f 6e 6e 65 63 74 columns connect
2020: 69 6f 6e 20 64 62 20 66 69 6c 65 4e 61 6d 65 0d ion db fileName.
2030: 0a 7d 20 2d 63 6f 6e 73 74 72 61 69 6e 74 73 20 .} -constraints
2040: 5c 0d 0a 7b 65 61 67 6c 65 20 6d 6f 6e 6f 42 75 \..{eagle monoBu
2050: 67 32 38 20 63 6f 6d 6d 61 6e 64 2e 73 71 6c 20 g28 command.sql
2060: 63 6f 6d 70 69 6c 65 2e 44 41 54 41 20 53 51 4c compile.DATA SQL
2070: 69 74 65 20 53 79 73 74 65 6d 2e 44 61 74 61 2e ite System.Data.
2080: 53 51 4c 69 74 65 5c 0d 0a 62 75 69 6c 64 43 6f SQLite\..buildCo
2090: 6e 66 69 67 75 72 61 74 69 6f 6e 2e 44 65 62 75 nfiguration.Debu
20a0: 67 7d 20 2d 72 65 73 75 6c 74 20 7b 54 72 75 65 g} -result {True
20b0: 7d 7d 0d 0a 0d 0a 23 23 23 23 23 23 23 23 23 23 }}....##########
20c0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
20d0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
20e0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
20f0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
2100: 23 23 23 23 23 0d 0a 0d 0a 72 65 70 6f 72 74 53 #####....reportS
2110: 51 4c 69 74 65 52 65 73 6f 75 72 63 65 73 20 24 QLiteResources $
2120: 74 65 73 74 5f 63 68 61 6e 6e 65 6c 20 74 72 75 test_channel tru
2130: 65 0d 0a 0d 0a 23 23 23 23 23 23 23 23 23 23 23 e....###########
2140: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
2150: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
2160: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
2170: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
2180: 23 23 23 23 0d 0a 0d 0a 72 75 6e 54 65 73 74 20 ####....runTest
2190: 7b 74 65 73 74 20 74 6b 74 2d 35 38 65 64 33 31 {test tkt-58ed31
21a0: 38 66 32 66 2d 31 2e 39 20 7b 7a 65 72 6f 20 44 8f2f-1.9 {zero D
21b0: 65 66 61 75 6c 74 44 62 54 79 70 65 20 73 65 74 efaultDbType set
21c0: 74 69 6e 67 73 20 72 65 61 64 7d 20 2d 73 65 74 tings read} -set
21d0: 75 70 20 7b 0d 0a 20 20 73 65 74 75 70 44 62 20 up {.. setupDb
21e0: 5b 73 65 74 20 66 69 6c 65 4e 61 6d 65 20 74 6b [set fileName tk
21f0: 74 2d 35 38 65 64 33 31 38 66 32 66 2d 31 2e 39 t-58ed318f2f-1.9
2200: 2e 64 62 5d 20 22 22 20 22 22 20 22 22 20 4e 6f .db] "" "" "" No
2210: 43 6f 6e 76 65 72 74 53 65 74 74 69 6e 67 73 0d ConvertSettings.
2220: 0a 7d 20 2d 62 6f 64 79 20 7b 0d 0a 20 20 73 71 .} -body {.. sq
2230: 6c 20 65 78 65 63 75 74 65 20 24 64 62 20 7b 0d l execute $db {.
2240: 0a 20 20 20 20 43 52 45 41 54 45 20 54 41 42 4c . CREATE TABL
2250: 45 20 74 31 28 78 2c 20 79 29 3b 0d 0a 20 20 20 E t1(x, y);..
2260: 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 INSERT INTO t1
2270: 28 78 2c 20 79 29 20 56 41 4c 55 45 53 28 30 2c (x, y) VALUES(0,
2280: 20 31 29 3b 0d 0a 20 20 20 20 49 4e 53 45 52 54 1);.. INSERT
2290: 20 49 4e 54 4f 20 74 31 20 28 78 2c 20 79 29 20 INTO t1 (x, y)
22a0: 56 41 4c 55 45 53 28 27 30 27 2c 20 27 31 27 29 VALUES('0', '1')
22b0: 3b 0d 0a 20 20 7d 0d 0a 0d 0a 20 20 73 71 6c 20 ;.. }.... sql
22c0: 65 78 65 63 75 74 65 20 2d 65 78 65 63 75 74 65 execute -execute
22d0: 20 72 65 61 64 65 72 20 2d 66 6f 72 6d 61 74 20 reader -format
22e0: 6c 69 73 74 20 24 64 62 20 22 53 45 4c 45 43 54 list $db "SELECT
22f0: 20 78 2c 20 79 20 46 52 4f 4d 20 74 31 3b 22 0d x, y FROM t1;".
2300: 0a 0d 0a 20 20 65 78 70 72 20 7b 5b 67 65 74 53 ... expr {[getS
2310: 65 74 74 69 6e 67 52 65 61 64 43 6f 75 6e 74 20 ettingReadCount
2320: 55 73 65 5f 53 51 4c 69 74 65 43 6f 6e 76 65 72 Use_SQLiteConver
2330: 74 5f 44 65 66 61 75 6c 74 44 62 54 79 70 65 5d t_DefaultDbType]
2340: 20 3d 3d 20 2d 31 7d 0d 0a 7d 20 2d 63 6c 65 61 == -1}..} -clea
2350: 6e 75 70 20 7b 0d 0a 20 20 63 6c 65 61 6e 75 70 nup {.. cleanup
2360: 44 62 20 24 66 69 6c 65 4e 61 6d 65 0d 0a 0d 0a Db $fileName....
2370: 20 20 75 6e 73 65 74 20 2d 6e 6f 63 6f 6d 70 6c unset -nocompl
2380: 61 69 6e 20 64 62 20 66 69 6c 65 4e 61 6d 65 0d ain db fileName.
2390: 0a 7d 20 2d 63 6f 6e 73 74 72 61 69 6e 74 73 20 .} -constraints
23a0: 5c 0d 0a 7b 65 61 67 6c 65 20 6d 6f 6e 6f 42 75 \..{eagle monoBu
23b0: 67 32 38 20 63 6f 6d 6d 61 6e 64 2e 73 71 6c 20 g28 command.sql
23c0: 63 6f 6d 70 69 6c 65 2e 44 41 54 41 20 53 51 4c compile.DATA SQL
23d0: 69 74 65 20 53 79 73 74 65 6d 2e 44 61 74 61 2e ite System.Data.
23e0: 53 51 4c 69 74 65 5c 0d 0a 62 75 69 6c 64 43 6f SQLite\..buildCo
23f0: 6e 66 69 67 75 72 61 74 69 6f 6e 2e 44 65 62 75 nfiguration.Debu
2400: 67 7d 20 2d 72 65 73 75 6c 74 20 7b 54 72 75 65 g} -result {True
2410: 7d 7d 0d 0a 0d 0a 23 23 23 23 23 23 23 23 23 23 }}....##########
2420: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
2430: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
2440: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
2450: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
2460: 23 23 23 23 23 0d 0a 0d 0a 72 65 70 6f 72 74 53 #####....reportS
2470: 51 4c 69 74 65 52 65 73 6f 75 72 63 65 73 20 24 QLiteResources $
2480: 74 65 73 74 5f 63 68 61 6e 6e 65 6c 20 74 72 75 test_channel tru
2490: 65 0d 0a 0d 0a 23 23 23 23 23 23 23 23 23 23 23 e....###########
24a0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
24b0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
24c0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
24d0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
24e0: 23 23 23 23 0d 0a 0d 0a 72 75 6e 54 65 73 74 20 ####....runTest
24f0: 7b 74 65 73 74 20 74 6b 74 2d 35 38 65 64 33 31 {test tkt-58ed31
2500: 38 66 32 66 2d 31 2e 31 30 20 7b 7a 65 72 6f 20 8f2f-1.10 {zero
2510: 44 65 66 61 75 6c 74 54 79 70 65 4e 61 6d 65 20 DefaultTypeName
2520: 73 65 74 74 69 6e 67 73 20 72 65 61 64 7d 20 2d settings read} -
2530: 73 65 74 75 70 20 7b 0d 0a 20 20 73 65 74 75 70 setup {.. setup
2540: 44 62 20 5b 73 65 74 20 66 69 6c 65 4e 61 6d 65 Db [set fileName
2550: 20 74 6b 74 2d 35 38 65 64 33 31 38 66 32 66 2d tkt-58ed318f2f-
2560: 31 2e 31 30 2e 64 62 5d 20 22 22 20 22 22 20 22 1.10.db] "" "" "
2570: 22 20 4e 6f 43 6f 6e 76 65 72 74 53 65 74 74 69 " NoConvertSetti
2580: 6e 67 73 0d 0a 7d 20 2d 62 6f 64 79 20 7b 0d 0a ngs..} -body {..
2590: 20 20 73 65 74 20 63 6f 6e 6e 65 63 74 69 6f 6e set connection
25a0: 20 5b 67 65 74 44 62 43 6f 6e 6e 65 63 74 69 6f [getDbConnectio
25b0: 6e 5d 0d 0a 0d 0a 20 20 73 71 6c 20 65 78 65 63 n].... sql exec
25c0: 75 74 65 20 24 64 62 20 7b 0d 0a 20 20 20 20 43 ute $db {.. C
25d0: 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 78 REATE TABLE t1(x
25e0: 2c 20 79 29 3b 0d 0a 20 20 20 20 49 4e 53 45 52 , y);.. INSER
25f0: 54 20 49 4e 54 4f 20 74 31 20 28 78 2c 20 79 29 T INTO t1 (x, y)
2600: 20 56 41 4c 55 45 53 28 30 2c 20 31 29 3b 0d 0a VALUES(0, 1);..
2610: 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 INSERT INTO
2620: 74 31 20 28 78 2c 20 79 29 20 56 41 4c 55 45 53 t1 (x, y) VALUES
2630: 28 27 30 27 2c 20 27 31 27 29 3b 0d 0a 20 20 7d ('0', '1');.. }
2640: 0d 0a 0d 0a 20 20 73 65 74 20 63 6f 6c 75 6d 6e .... set column
2650: 73 20 5b 24 63 6f 6e 6e 65 63 74 69 6f 6e 20 47 s [$connection G
2660: 65 74 53 63 68 65 6d 61 20 43 4f 4c 55 4d 4e 53 etSchema COLUMNS
2670: 5d 0d 0a 0d 0a 20 20 65 78 70 72 20 7b 5b 67 65 ].... expr {[ge
2680: 74 53 65 74 74 69 6e 67 52 65 61 64 43 6f 75 6e tSettingReadCoun
2690: 74 20 55 73 65 5f 53 51 4c 69 74 65 43 6f 6e 76 t Use_SQLiteConv
26a0: 65 72 74 5f 44 65 66 61 75 6c 74 54 79 70 65 4e ert_DefaultTypeN
26b0: 61 6d 65 5d 20 3d 3d 20 2d 31 7d 0d 0a 7d 20 2d ame] == -1}..} -
26c0: 63 6c 65 61 6e 75 70 20 7b 0d 0a 20 20 63 6c 65 cleanup {.. cle
26d0: 61 6e 75 70 44 62 20 24 66 69 6c 65 4e 61 6d 65 anupDb $fileName
26e0: 0d 0a 0d 0a 20 20 66 72 65 65 44 62 43 6f 6e 6e .... freeDbConn
26f0: 65 63 74 69 6f 6e 0d 0a 0d 0a 20 20 75 6e 73 65 ection.... unse
2700: 74 20 2d 6e 6f 63 6f 6d 70 6c 61 69 6e 20 63 6f t -nocomplain co
2710: 6c 75 6d 6e 73 20 63 6f 6e 6e 65 63 74 69 6f 6e lumns connection
2720: 20 64 62 20 66 69 6c 65 4e 61 6d 65 0d 0a 7d 20 db fileName..}
2730: 2d 63 6f 6e 73 74 72 61 69 6e 74 73 20 5c 0d 0a -constraints \..
2740: 7b 65 61 67 6c 65 20 6d 6f 6e 6f 42 75 67 32 38 {eagle monoBug28
2750: 20 63 6f 6d 6d 61 6e 64 2e 73 71 6c 20 63 6f 6d command.sql com
2760: 70 69 6c 65 2e 44 41 54 41 20 53 51 4c 69 74 65 pile.DATA SQLite
2770: 20 53 79 73 74 65 6d 2e 44 61 74 61 2e 53 51 4c System.Data.SQL
2780: 69 74 65 5c 0d 0a 62 75 69 6c 64 43 6f 6e 66 69 ite\..buildConfi
2790: 67 75 72 61 74 69 6f 6e 2e 44 65 62 75 67 7d 20 guration.Debug}
27a0: 2d 72 65 73 75 6c 74 20 7b 54 72 75 65 7d 7d 0d -result {True}}.
27b0: 0a 0d 0a 23 23 23 23 23 23 23 23 23 23 23 23 23 ...#############
27c0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
27d0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
27e0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
27f0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
2800: 23 23 0d 0a 0d 0a 72 65 70 6f 72 74 53 51 4c 69 ##....reportSQLi
2810: 74 65 52 65 73 6f 75 72 63 65 73 20 24 74 65 73 teResources $tes
2820: 74 5f 63 68 61 6e 6e 65 6c 20 74 72 75 65 0d 0a t_channel true..
2830: 0d 0a 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ..##############
2840: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
2850: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
2860: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
2870: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
2880: 23 0d 0a 0d 0a 72 75 6e 54 65 73 74 20 7b 74 65 #....runTest {te
2890: 73 74 20 74 6b 74 2d 35 38 65 64 33 31 38 66 32 st tkt-58ed318f2
28a0: 66 2d 31 2e 31 31 20 7b 6e 6f 72 6d 61 6c 20 53 f-1.11 {normal S
28b0: 51 4c 69 74 65 43 6f 6e 76 65 72 74 20 73 65 74 QLiteConvert set
28c0: 74 69 6e 67 73 20 75 73 61 67 65 7d 20 2d 73 65 tings usage} -se
28d0: 74 75 70 20 7b 0d 0a 20 20 73 65 74 75 70 44 62 tup {.. setupDb
28e0: 20 5b 73 65 74 20 66 69 6c 65 4e 61 6d 65 20 74 [set fileName t
28f0: 6b 74 2d 35 38 65 64 33 31 38 66 32 66 2d 31 2e kt-58ed318f2f-1.
2900: 31 31 2e 64 62 5d 0d 0a 7d 20 2d 62 6f 64 79 20 11.db]..} -body
2910: 7b 0d 0a 20 20 73 65 74 20 63 6f 6e 6e 65 63 74 {.. set connect
2920: 69 6f 6e 20 5b 67 65 74 44 62 43 6f 6e 6e 65 63 ion [getDbConnec
2930: 74 69 6f 6e 5d 0d 0a 0d 0a 20 20 73 71 6c 20 65 tion].... sql e
2940: 78 65 63 75 74 65 20 24 64 62 20 7b 0d 0a 20 20 xecute $db {..
2950: 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 CREATE TABLE t
2960: 31 28 78 2c 20 79 29 3b 0d 0a 20 20 20 20 49 4e 1(x, y);.. IN
2970: 53 45 52 54 20 49 4e 54 4f 20 74 31 20 28 78 2c SERT INTO t1 (x,
2980: 20 79 29 20 56 41 4c 55 45 53 28 30 2c 20 31 29 y) VALUES(0, 1)
2990: 3b 0d 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e ;.. INSERT IN
29a0: 54 4f 20 74 31 20 28 78 2c 20 79 29 20 56 41 4c TO t1 (x, y) VAL
29b0: 55 45 53 28 27 30 27 2c 20 27 31 27 29 3b 0d 0a UES('0', '1');..
29c0: 20 20 7d 0d 0a 0d 0a 20 20 73 71 6c 20 65 78 65 }.... sql exe
29d0: 63 75 74 65 20 2d 65 78 65 63 75 74 65 20 72 65 cute -execute re
29e0: 61 64 65 72 20 2d 66 6f 72 6d 61 74 20 6c 69 73 ader -format lis
29f0: 74 20 24 64 62 20 22 53 45 4c 45 43 54 20 78 2c t $db "SELECT x,
2a00: 20 79 20 46 52 4f 4d 20 74 31 3b 22 0d 0a 20 20 y FROM t1;"..
2a10: 73 65 74 20 63 6f 6c 75 6d 6e 73 20 5b 24 63 6f set columns [$co
2a20: 6e 6e 65 63 74 69 6f 6e 20 47 65 74 53 63 68 65 nnection GetSche
2a30: 6d 61 20 43 4f 4c 55 4d 4e 53 5d 0d 0a 0d 0a 20 ma COLUMNS]....
2a40: 20 23 0d 0a 20 20 23 20 54 4f 44 4f 3a 20 54 68 #.. # TODO: Th
2a50: 65 73 65 20 63 6f 75 6e 74 73 20 6d 61 79 20 6e ese counts may n
2a60: 65 65 64 20 74 6f 20 62 65 20 75 70 64 61 74 65 eed to be update
2a70: 64 20 69 6e 20 66 75 74 75 72 65 20 76 65 72 73 d in future vers
2a80: 69 6f 6e 73 2e 0d 0a 20 20 23 0d 0a 20 20 65 78 ions... #.. ex
2a90: 70 72 20 7b 5b 67 65 74 53 65 74 74 69 6e 67 52 pr {[getSettingR
2aa0: 65 61 64 43 6f 75 6e 74 20 55 73 65 5f 53 51 4c eadCount Use_SQL
2ab0: 69 74 65 43 6f 6e 76 65 72 74 5f 44 65 66 61 75 iteConvert_Defau
2ac0: 6c 74 44 62 54 79 70 65 5d 20 3d 3d 20 31 20 26 ltDbType] == 1 &
2ad0: 26 20 5c 0d 0a 20 20 20 20 20 20 5b 67 65 74 53 & \.. [getS
2ae0: 65 74 74 69 6e 67 52 65 61 64 43 6f 75 6e 74 20 ettingReadCount
2af0: 55 73 65 5f 53 51 4c 69 74 65 43 6f 6e 76 65 72 Use_SQLiteConver
2b00: 74 5f 44 65 66 61 75 6c 74 54 79 70 65 4e 61 6d t_DefaultTypeNam
2b10: 65 5d 20 3d 3d 20 31 7d 0d 0a 7d 20 2d 63 6c 65 e] == 1}..} -cle
2b20: 61 6e 75 70 20 7b 0d 0a 20 20 63 6c 65 61 6e 75 anup {.. cleanu
2b30: 70 44 62 20 24 66 69 6c 65 4e 61 6d 65 0d 0a 0d pDb $fileName...
2b40: 0a 20 20 66 72 65 65 44 62 43 6f 6e 6e 65 63 74 . freeDbConnect
2b50: 69 6f 6e 0d 0a 0d 0a 20 20 75 6e 73 65 74 20 2d ion.... unset -
2b60: 6e 6f 63 6f 6d 70 6c 61 69 6e 20 63 6f 6c 75 6d nocomplain colum
2b70: 6e 73 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 64 62 ns connection db
2b80: 20 66 69 6c 65 4e 61 6d 65 0d 0a 7d 20 2d 63 6f fileName..} -co
2b90: 6e 73 74 72 61 69 6e 74 73 20 5c 0d 0a 7b 65 61 nstraints \..{ea
2ba0: 67 6c 65 20 6d 6f 6e 6f 42 75 67 32 38 20 63 6f gle monoBug28 co
2bb0: 6d 6d 61 6e 64 2e 73 71 6c 20 63 6f 6d 70 69 6c mmand.sql compil
2bc0: 65 2e 44 41 54 41 20 53 51 4c 69 74 65 20 53 79 e.DATA SQLite Sy
2bd0: 73 74 65 6d 2e 44 61 74 61 2e 53 51 4c 69 74 65 stem.Data.SQLite
2be0: 5c 0d 0a 62 75 69 6c 64 43 6f 6e 66 69 67 75 72 \..buildConfigur
2bf0: 61 74 69 6f 6e 2e 44 65 62 75 67 7d 20 2d 72 65 ation.Debug} -re
2c00: 73 75 6c 74 20 7b 54 72 75 65 7d 7d 0d 0a 0d 0a sult {True}}....
2c10: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
2c20: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
2c30: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
2c40: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
2c50: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 0d ###############.
2c60: 0a 0d 0a 72 65 70 6f 72 74 53 51 4c 69 74 65 52 ...reportSQLiteR
2c70: 65 73 6f 75 72 63 65 73 20 24 74 65 73 74 5f 63 esources $test_c
2c80: 68 61 6e 6e 65 6c 20 74 72 75 65 0d 0a 0d 0a 23 hannel true....#
2c90: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
2ca0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
2cb0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
2cc0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
2cd0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 0d 0a ##############..
2ce0: 0d 0a 72 75 6e 54 65 73 74 20 7b 74 65 73 74 20 ..runTest {test
2cf0: 74 6b 74 2d 35 38 65 64 33 31 38 66 32 66 2d 31 tkt-58ed318f2f-1
2d00: 2e 31 32 20 7b 7a 65 72 6f 20 53 51 4c 69 74 65 .12 {zero SQLite
2d10: 43 6f 6e 76 65 72 74 20 73 65 74 74 69 6e 67 73 Convert settings
2d20: 20 75 73 61 67 65 7d 20 2d 73 65 74 75 70 20 7b usage} -setup {
2d30: 0d 0a 20 20 73 65 74 75 70 44 62 20 5b 73 65 74 .. setupDb [set
2d40: 20 66 69 6c 65 4e 61 6d 65 20 74 6b 74 2d 35 38 fileName tkt-58
2d50: 65 64 33 31 38 66 32 66 2d 31 2e 31 32 2e 64 62 ed318f2f-1.12.db
2d60: 5d 20 22 22 20 22 22 20 22 22 20 4e 6f 43 6f 6e ] "" "" "" NoCon
2d70: 76 65 72 74 53 65 74 74 69 6e 67 73 0d 0a 7d 20 vertSettings..}
2d80: 2d 62 6f 64 79 20 7b 0d 0a 20 20 73 65 74 20 63 -body {.. set c
2d90: 6f 6e 6e 65 63 74 69 6f 6e 20 5b 67 65 74 44 62 onnection [getDb
2da0: 43 6f 6e 6e 65 63 74 69 6f 6e 5d 0d 0a 0d 0a 20 Connection]....
2db0: 20 73 71 6c 20 65 78 65 63 75 74 65 20 24 64 62 sql execute $db
2dc0: 20 7b 0d 0a 20 20 20 20 43 52 45 41 54 45 20 54 {.. CREATE T
2dd0: 41 42 4c 45 20 74 31 28 78 2c 20 79 29 3b 0d 0a ABLE t1(x, y);..
2de0: 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 INSERT INTO
2df0: 74 31 20 28 78 2c 20 79 29 20 56 41 4c 55 45 53 t1 (x, y) VALUES
2e00: 28 30 2c 20 31 29 3b 0d 0a 20 20 20 20 49 4e 53 (0, 1);.. INS
2e10: 45 52 54 20 49 4e 54 4f 20 74 31 20 28 78 2c 20 ERT INTO t1 (x,
2e20: 79 29 20 56 41 4c 55 45 53 28 27 30 27 2c 20 27 y) VALUES('0', '
2e30: 31 27 29 3b 0d 0a 20 20 7d 0d 0a 0d 0a 20 20 73 1');.. }.... s
2e40: 71 6c 20 65 78 65 63 75 74 65 20 2d 65 78 65 63 ql execute -exec
2e50: 75 74 65 20 72 65 61 64 65 72 20 2d 66 6f 72 6d ute reader -form
2e60: 61 74 20 6c 69 73 74 20 24 64 62 20 22 53 45 4c at list $db "SEL
2e70: 45 43 54 20 78 2c 20 79 20 46 52 4f 4d 20 74 31 ECT x, y FROM t1
2e80: 3b 22 0d 0a 20 20 73 65 74 20 63 6f 6c 75 6d 6e ;".. set column
2e90: 73 20 5b 24 63 6f 6e 6e 65 63 74 69 6f 6e 20 47 s [$connection G
2ea0: 65 74 53 63 68 65 6d 61 20 43 4f 4c 55 4d 4e 53 etSchema COLUMNS
2eb0: 5d 0d 0a 0d 0a 20 20 65 78 70 72 20 7b 5b 67 65 ].... expr {[ge
2ec0: 74 53 65 74 74 69 6e 67 52 65 61 64 43 6f 75 6e tSettingReadCoun
2ed0: 74 20 55 73 65 5f 53 51 4c 69 74 65 43 6f 6e 76 t Use_SQLiteConv
2ee0: 65 72 74 5f 44 65 66 61 75 6c 74 44 62 54 79 70 ert_DefaultDbTyp
2ef0: 65 5d 20 3d 3d 20 2d 31 20 26 26 20 5c 0d 0a 20 e] == -1 && \..
2f00: 20 20 20 20 20 5b 67 65 74 53 65 74 74 69 6e 67 [getSetting
2f10: 52 65 61 64 43 6f 75 6e 74 20 55 73 65 5f 53 51 ReadCount Use_SQ
2f20: 4c 69 74 65 43 6f 6e 76 65 72 74 5f 44 65 66 61 LiteConvert_Defa
2f30: 75 6c 74 54 79 70 65 4e 61 6d 65 5d 20 3d 3d 20 ultTypeName] ==
2f40: 2d 31 7d 0d 0a 7d 20 2d 63 6c 65 61 6e 75 70 20 -1}..} -cleanup
2f50: 7b 0d 0a 20 20 63 6c 65 61 6e 75 70 44 62 20 24 {.. cleanupDb $
2f60: 66 69 6c 65 4e 61 6d 65 0d 0a 0d 0a 20 20 66 72 fileName.... fr
2f70: 65 65 44 62 43 6f 6e 6e 65 63 74 69 6f 6e 0d 0a eeDbConnection..
2f80: 0d 0a 20 20 75 6e 73 65 74 20 2d 6e 6f 63 6f 6d .. unset -nocom
2f90: 70 6c 61 69 6e 20 63 6f 6c 75 6d 6e 73 20 63 6f plain columns co
2fa0: 6e 6e 65 63 74 69 6f 6e 20 64 62 20 66 69 6c 65 nnection db file
2fb0: 4e 61 6d 65 0d 0a 7d 20 2d 63 6f 6e 73 74 72 61 Name..} -constra
2fc0: 69 6e 74 73 20 5c 0d 0a 7b 65 61 67 6c 65 20 6d ints \..{eagle m
2fd0: 6f 6e 6f 42 75 67 32 38 20 63 6f 6d 6d 61 6e 64 onoBug28 command
2fe0: 2e 73 71 6c 20 63 6f 6d 70 69 6c 65 2e 44 41 54 .sql compile.DAT
2ff0: 41 20 53 51 4c 69 74 65 20 53 79 73 74 65 6d 2e A SQLite System.
3000: 44 61 74 61 2e 53 51 4c 69 74 65 5c 0d 0a 62 75 Data.SQLite\..bu
3010: 69 6c 64 43 6f 6e 66 69 67 75 72 61 74 69 6f 6e ildConfiguration
3020: 2e 44 65 62 75 67 7d 20 2d 72 65 73 75 6c 74 20 .Debug} -result
3030: 7b 54 72 75 65 7d 7d 0d 0a 0d 0a 23 23 23 23 23 {True}}....#####
3040: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
3050: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
3060: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
3070: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
3080: 23 23 23 23 23 23 23 23 23 23 0d 0a 0d 0a 72 65 ##########....re
3090: 6e 61 6d 65 20 67 65 74 53 65 74 74 69 6e 67 52 name getSettingR
30a0: 65 61 64 43 6f 75 6e 74 20 22 22 0d 0a 0d 0a 23 eadCount ""....#
30b0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
30c0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
30d0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
30e0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
30f0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 0d 0a ##############..
3100: 0d 0a 72 65 70 6f 72 74 53 51 4c 69 74 65 52 65 ..reportSQLiteRe
3110: 73 6f 75 72 63 65 73 20 24 74 65 73 74 5f 63 68 sources $test_ch
3120: 61 6e 6e 65 6c 20 74 72 75 65 0d 0a 0d 0a 23 23 annel true....##
3130: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
3140: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
3150: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
3160: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
3170: 23 23 23 23 23 23 23 23 23 23 23 23 23 0d 0a 0d #############...
3180: 0a 72 75 6e 53 51 4c 69 74 65 54 65 73 74 45 70 .runSQLiteTestEp
3190: 69 6c 6f 67 75 65 0d 0a 72 75 6e 54 65 73 74 45 ilogue..runTestE
31a0: 70 69 6c 6f 67 75 65 0d 0a pilogue..