gustafn
committed
on 15 Feb 22
Fixes for Oracle 19c boolean types in query

This fixes the following bug for Oracle:
: select u.user_id,
: u.a… Show more
Fixes for Oracle 19c boolean types in query

This fixes the following bug for Oracle:

:            select u.user_id,

:                   u.authority_id,

:                   u.username,

:                   u.screen_name,

:                   u.priv_name,

:                   u.priv_email,

:                   u.email_verified_p,

:                   u.email_bouncing_p,

:                   u.no_alerts_until,

:                   u.last_visit,

:                   to_char(last_visit, 'YYYY-MM-DD HH24:MI:SS') as last_visit_ansi,

:                   u.second_to_last_visit,

:                   to_char(second_to_last_visit, 'YYYY-MM-DD HH24:MI:SS') as second_to_last_visit_ansi,

:                   u.n_sessions,

:                   u.password,

:                   u.salt,

:                   u.password_question,

:                   u.password_answer,

:                   u.password_changed_date,

:                   extract(day from current_timestamp - password_changed_date) as password_age_days,

:                   u.auth_token,

:                   mm.rel_id,

:                   mr.member_state !>>>!= 'approved' as registered_user_p,

:                   mr.member_state

:            from users u

:                 left join group_member_map mm on mm.member_id = u.user_id

:                                              and mm.group_id  = mm.container_id

:                                              and mm.group_id  = :registered_users_group_id

:                                              and mm.rel_type  = 'membership_rel'

:                 left join membership_rels mr on mr.rel_id = mm.rel_id

:            where u.user_id = :user_id

Show less

openacs-4/.../acs-tcl/tcl/memoize-procs.tcl (+2 -2)
13 13
14 14
15 15 ad_proc -public util_memoize_initialized_p {} {
16 16     Return 1 if the util_memoize cache has been initialized
17 17     and is ready to be used and 0 otherwise.
18 18
19 19 } -
20 20
21 21 if { [catch {ns_cache set util_memoize __util_memoize_installed_p 1} error] } {
22 22     # This definition of util_memoize_initialized_p is for loading during bootstrap.
23 23
24 24     proc  util_memoize_initialized_p {} {
25 25         #
26 26         # If the cache is not yet created (or some other error is
27 27         # raised) the util_memoize cache is not available.
28 28         #
29 29         if {[catch {ns_cache set util_memoize __util_memoize_installed_p 1} error]} {
30 30             return 0
31 31         }
32 32         #
33           # When he call above has succes, the cache is initialized, we
  33         # When he call above has success, the cache is initialized, we
34 34         # can rewrite the function in an always succeeding one and
35 35         # return success as well.
36 36         #
37 37         proc ::util_memoize_initialized_p {} {
38 38             return 1
39 39         }
40 40         return 1
41 41     }
42 42 } else {
43 43     proc util_memoize_initialized_p {} {
44 44         #
45 45         # This definition of util_memoize_initialized_p is just for
46 46         # reloading, since at that time the cache is always
47 47         # initialized.
48 48         #
49 49         return 1
50 50     }
51 51 }
52 52
53 53