Megatest

Check-in [73727dc595]
Login
Overview
Comment:Added extra info condition->list
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.80-revolution
Files: files | file ages | folders
SHA1: 73727dc595e26e6c0da54d9450c5e131a8e6f711
User & Date: mrwellan on 2023-12-08 15:27:04
Other Links: branch diff | manifest | tags
Context
2023-12-16
19:50
Merged 7372 check-in: f605e2b0d5 user: matt tags: v1.80-revolution-multi-server
2023-12-13
13:06
Moved the addition of /.mtdb for db paths up to db:setup, and removed it from other places. Initial implementation of -cleanup-db. check-in: b9d51df3ee user: mmgraham tags: v1.80-revolution
2023-12-12
14:38
More files transitioned to dual build. check-in: 32e5dbb77c user: mrwellan tags: v1.80-revolution-ck5
2023-12-08
15:27
Added extra info condition->list check-in: 73727dc595 user: mrwellan tags: v1.80-revolution
2023-12-04
05:44
Bumped version check-in: f603771e69 user: mrwellan tags: v1.80-revolution, v1.8023
Changes

Modified dbmod.scm from [918f6405bd] to [99ee74ba02].

515
516
517
518
519
520
521
522

523
524
525
526
527
528
529
530
531
532
533

534
535
536
537
538
539
540
515
516
517
518
519
520
521

522
523
524
525
526
527
528
529
530
531
532

533
534
535
536
537
538
539
540







-
+










-
+







		    (start-ms   (current-milliseconds))
		    (new-ids    (sqlite3:fold-row (lambda (res id)(cons id res)) '() dbh newrec)))
	       ;; (debug:print 0 *default-log-port* "Got "(length aux-ids)" in aux-ids and "(length main-ids)" in main-ids")
	       (update-changed (length new-ids) table "new records")
	       (mutex-lock! *db-transaction-mutex*)
	       (handle-exceptions
		   exn
		   (debug:print 0 *default-log-port* "Transaction update of "table" failed.")
		   (debug:print 0 *default-log-port* "Transaction update of "table" failed. "(condition->list exn))
		 (sqlite3:with-transaction
		  dbh
		  (lambda ()
		    (for-each (lambda (id)
				(sqlite3:execute dbh stmt2 id))
			      new-ids))))
	       
	       (if (member "last_update" fields)
		   (handle-exceptions
		       exn
		       (debug:print 0 *default-log-port* "Transaction update of "table" failed.")
		       (debug:print 0 *default-log-port* "Transaction update of "table" failed. "(condition->list exn))
		     (sqlite3:with-transaction
		      dbh
		      (lambda ()
			(let* ((changed-ids  (sqlite3:fold-row (lambda (res id)(cons id res)) '() dbh changedrec)))
			  (update-changed (length changed-ids) table "changed records")
			  (for-each (lambda (id)
				      (sqlite3:execute dbh stmt9 id id))
597
598
599
600
601
602
603
604

605
606
607
608
609
610
611
597
598
599
600
601
602
603

604
605
606
607
608
609
610
611







-
+







		  (stmt3    (conc "UPDATE "table" SET ("no-id-fields-str") = ("questionmarks") WHERE id=?;"))
		  (start-ms (current-milliseconds)))
	     (debug:print 0 *default-log-port* "stmt3="stmt3)
	     (if (sqlite3:auto-committing? dbh1)
		 (begin
       	           (handle-exceptions
		     exn
		     (debug:print 0 *default-log-port* "Transaction update of "table" failed.")
		     (debug:print 0 *default-log-port* "Transaction update of "table" failed. "(condition->list exn))
		     (sqlite3:with-transaction
		      dbh1
		      (lambda ()
		        (sqlite3:execute dbh1 stmt1)    ;; get all new rows

		      #;(if (member "last_update" fields)
			  (sqlite3:execute dbh1 stmt8))    ;; get all updated rows