System.Data.SQLite
Check-in [4578c9236b]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Cherrypick of [2c31a6967460b852], test suite helper procedure fixes.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | branch-1.0.105
Files: files | file ages | folders
SHA1: 4578c9236b7afb294583954dabedfb7e940ac6a7
User & Date: mistachkin 2017-05-11 15:37:36
Context
2017-05-11
15:43
Cherrypick of [cee7126f56f28d0e], fix caching of 'No_SQLiteConnectionNewParser' and 'DefaultFlags_SQLiteConnection'. check-in: 362b7933d5 user: mistachkin tags: branch-1.0.105
15:37
Cherrypick of [2c31a6967460b852], test suite helper procedure fixes. check-in: 4578c9236b user: mistachkin tags: branch-1.0.105
15:36
Cherrypick of [9b146be3f9aef0c3] and [ece910dd8df8ce5f], the Int32.ToString culture fix. check-in: cc5c576e43 user: mistachkin tags: branch-1.0.105
2017-05-08
19:15
Prevent test suite helper procedures 'getDbDefaultPageSize' and 'getDbDefaultCacheSize' from raising script errors. check-in: 2c31a69674 user: mistachkin tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to lib/System.Data.SQLite/common.eagle.

  2131   2131         #
  2132   2132         return [expr {
  2133   2133           [sql execute -execute scalar $db $sql [list param1 String $name]] > 0
  2134   2134         }]
  2135   2135       }
  2136   2136   
  2137   2137       proc getDbDefaultPageSize {} {
  2138         -      return [executeSql "PRAGMA page_size;" scalar]
         2138  +      if {[catch {executeSql "PRAGMA page_size;" scalar} result] == 0} then {
         2139  +        return $result
         2140  +      } else {
         2141  +        return 0
         2142  +      }
  2139   2143       }
  2140   2144   
  2141   2145       proc getDbDefaultCacheSize {} {
  2142         -      return [executeSql "PRAGMA cache_size;" scalar]
         2146  +      if {[catch {executeSql "PRAGMA cache_size;" scalar} result] == 0} then {
         2147  +        return $result
         2148  +      } else {
         2149  +        return 0
         2150  +      }
  2143   2151       }
  2144   2152   
  2145   2153       proc useLegacyDbPageAndCacheSizes { varName } {
  2146   2154         #
  2147   2155         # NOTE: Refer to the specified variable (e.g. "db") in the context of our
  2148   2156         #       caller.  It contains the database connection handle that will be
  2149   2157         #       used to execute queries used to set the page and cache sizes.