Megatest

Check-in [85fa0e2f14]
Login
Overview
Comment:Added missing schema patch for test_rundat
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.64
Files: files | file ages | folders
SHA1: 85fa0e2f1429aadd858971eec1a3798867a5112e
User & Date: mrwellan on 2017-06-28 14:01:33
Other Links: branch diff | manifest | tags
Context
2017-07-05
12:32
added speculative fix to send-receive to address issues seen by Eric Brown in ticket 220402979 check-in: 6890b4c9d0 user: bjbarcla tags: v1.64
2017-07-04
22:59
Merged from v1.64 check-in: c269abcad7 user: matt tags: v1.65
2017-06-30
09:37
Run sync-to-megatest.db instead of in process sync when sync time exceeds 300 ms. Closed-Leaf check-in: 22e44afa46 user: mrwellan tags: v1.64-external-sync
2017-06-29
23:17
queued coalesced queries (trying again) check-in: 0a1b205bcf user: matt tags: v1.64-coalesced-queries
17:50
Partial implementation of -keep-records, still some work to do... check-in: c10b954bde user: mrwellan tags: v1.64-keep-records
2017-06-28
14:01
Added missing schema patch for test_rundat check-in: 85fa0e2f14 user: mrwellan tags: v1.64
2017-06-27
22:23
Switched back to doing cleaning out of old records in -cleanup-db and added cleanup of test_rundat and test_steps tables. check-in: 299fe5e984 user: matt tags: v1.64
Changes

Modified db.scm from [57bd021663] to [43a8d2d12e].

856
857
858
859
860
861
862
863








864
865
866
867
868
869
870
                              count  INTEGER,
                              last_update INTEGER DEFAULT (strftime('%s','now')))")
  (sqlite3:execute maindb "CREATE TRIGGER  IF NOT EXISTS update_run_stats_trigger AFTER UPDATE ON run_stats
                             FOR EACH ROW
                               BEGIN 
                                 UPDATE run_stats SET last_update=(strftime('%s','now'))
                                   WHERE id=old.id;
                               END;"))









(define (db:adj-target db)
  (let ((fields    (configf:get-section *configdat* "fields"))
	(field-num 0))
    ;; because we will be refreshing the keys table it is best to clear it here
    (sqlite3:execute db "DELETE FROM keys;")
    (for-each







|
>
>
>
>
>
>
>
>







856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
                              count  INTEGER,
                              last_update INTEGER DEFAULT (strftime('%s','now')))")
  (sqlite3:execute maindb "CREATE TRIGGER  IF NOT EXISTS update_run_stats_trigger AFTER UPDATE ON run_stats
                             FOR EACH ROW
                               BEGIN 
                                 UPDATE run_stats SET last_update=(strftime('%s','now'))
                                   WHERE id=old.id;
                               END;")
  (sqlite3:execute maindb "CREATE TABLE IF NOT EXISTS test_rundat (
                              id           INTEGER PRIMARY KEY,
                              test_id      INTEGER,
                              update_time  TIMESTAMP,
                              cpuload      INTEGER DEFAULT -1,
                              diskfree     INTEGER DEFAULT -1,
                              diskusage    INTGER DEFAULT -1,
                              run_duration INTEGER DEFAULT 0);"))

(define (db:adj-target db)
  (let ((fields    (configf:get-section *configdat* "fields"))
	(field-num 0))
    ;; because we will be refreshing the keys table it is best to clear it here
    (sqlite3:execute db "DELETE FROM keys;")
    (for-each