[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: SQL backend questions

> For now I have the following questions about some of the columns of the
> meta data tables.

I'll reply by heart because I have no time to cross check everything, and
I won't be at office nor reachable next week.

> 1. ldap_oc_mappings.expect_return column: According to
> test_dbmetadata.sl this is a bitmap that marks whether create_proc (1)
> and delete_proc (2) return a value or not.
> a. What exactly is a bitmap in this context and how should it be
> used/initialised by the stored procedures?  b. Does slapd use the
> returned value?

exactly: think of it as
create_proc returns a value: OR 1
delete_proc returns a value: OR 2

so it can have any value between 0 and 3;although the syntax is tremendous
(I see tons of different ways to do it better, since this info is read
just once at startup), it is required because, despite the use of ODBC,
different RDBMS behave differently; for instance, some of them return a
value after an insert or a delete, and other operations are not possible
until the value is fetched.
As far as I can tell, the value is ignored; error conditions are treated
separately in a more appropriate manner.

> 2. ldap_attr_mappings.sel_expr_u column: no documentation available.
> a. What is the purpose of this column? How is it used?

I think this is ignored right now; "sel_expr_u" info (uppercased, i.e.
naively mormalized, select expressions are built in a consistent manner
from non-normalized select expressions) is legacy.  Please use postgres
examples as a reference, because they're the more up to date.

> 3. ldap_attr_mappings.param_order column: according to
> test_dbmetadata.sl this is a mask that marks if the "keytbl.keycol"
> value comes before or after the value in add_proc (1) and delete_proc
> (2).

I.e. if the update string is something like

"update table set column=? where key=?"

so that bind order is "value" "key"

or "update_proc(?,?)"

where bind order is "key" "value"; this is really something that was
inherited, I don't see any reason to require that update stored procedures
use the same bind order of the update statement.  Please take it as is, I
don't want to break too many (bu how many?) working installations by
cleaning this up.

> a. What exactly is a mask in this context and how should it be used? I
> see in all examples that it's value is "3" (binary 11??). Are there any
> other valid values?

Same as 1; I think 1 means key comes first in add and 2 that key comes
first in delete; please cross-check.

> 4. ldap_attr_mappings.expect_return column: see ldap_oc_mappings

same as 1, afaik.


Pierangelo Masarati

    SysNet - via Dossi,8 27100 Pavia Tel: +390382573859 Fax: +390382476497