Index: openacs-4/packages/acs-tcl/tcl/01-database-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/01-database-procs.tcl,v diff -u -r1.1.2.11 -r1.1.2.12 --- openacs-4/packages/acs-tcl/tcl/01-database-procs.tcl 18 May 2020 21:20:20 -0000 1.1.2.11 +++ openacs-4/packages/acs-tcl/tcl/01-database-procs.tcl 22 May 2020 10:45:41 -0000 1.1.2.12 @@ -2032,6 +2032,7 @@ incr count } } else { + set columns {} db_multirow_helper } Index: openacs-4/packages/acs-tcl/tcl/test/db-proc-test-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/test/db-proc-test-procs.tcl,v diff -u -r1.1.2.1 -r1.1.2.2 --- openacs-4/packages/acs-tcl/tcl/test/db-proc-test-procs.tcl 8 May 2020 13:12:58 -0000 1.1.2.1 +++ openacs-4/packages/acs-tcl/tcl/test/db-proc-test-procs.tcl 22 May 2020 10:45:41 -0000 1.1.2.2 @@ -10,7 +10,8 @@ -cats {api db smoke} \ -error_level "error" \ -procs { - ::db_transaction ::db_multirow + ::db_multirow + ::template::multirow } \ db__transaction_bug_3440 { @@ -89,8 +90,20 @@ aa_equals "New row exists after db_multirow with 2 tuples" $res2 "val1" } + aa_log "Start test section 2" - aa_log "End test section 1" + # + # Create a multirow woth 0 entries and append a row "manually" + # For details, see # https://openacs.org/bugtracker/openacs/bug?bug_number=3441 + # + db_multirow person_mr noxql { SELECT person_id, first_names, + last_name FROM persons WHERE false + } + + aa_equals "have empty multirow" [template::multirow size person_mr] 0 + template::multirow append person_mr 1234 “Ed” “Grooberman” + aa_equals "have one tuple in multirow" [template::multirow size person_mr] 1 + aa_log "Test End" } -teardown_code {