Neat trick with db_list
The problem was that the code said:
db_foreach select_forums { select forum_id from ... } {
notification::request::new ...
}
which caused the db_foreach and the notification::request::new to use different database handles, which happens to mean they'll not be part of the same transaction. Hence this caused a deadlock.
I serialized the two db-calls to say
foreach forum_id [db_list select_forums {}] {
notification::request::new ...
}
so that the db_list call returns before the foreach loop starts, causing the two to use the same transaction (or, rather, the inner call uses the active transaction).
02:49 AM, 23 Aug 2003 by Jade Rubick Permalink | Comments (0)
12:58 PM, 08 Aug 2003 by Jade Rubick Permalink | Comments (0)
| August 2003 | ||||||
| S | M | T | W | T | F | S |
| 1 | 2 | |||||
| 3 | 4 | 5 | 6 | 7 | 8 | 9 |
| 10 | 11 | 12 | 13 | 14 | 15 | 16 |
| 17 | 18 | 19 | 20 | 21 | 22 | 23 |
| 24 | 25 | 26 | 27 | 28 | 29 | 30 |
| 31 | ||||||