there was a long discussion how to fix this but we didn't get to consensus.
please keep it as is. we need to start this discussion again.

Thanks,
Alexander Malysh

Am 04.09.2009 um 14:42 schrieb Damián Viano:

On Fri, Sep 04, 2009 at 02:26:57PM +0200, Alexander Malysh wrote:
they are all correct if you speak about limit and rownum. we are unable
to pass limit or rownum clause to sdb engine because it's abstraction
of DBs and we don't know which DB is used.

I get he's talking about:

WHERE %S=:1 AND %S=:2 AND %S=:3 AND ROWNUM < 2",
                             ^^^^ this extra condition

 Damián Viano(Des).

Am 04.09.2009 um 14:11 schrieb Alejandro Guerrieri:

BTW, while I'm adding the meta_data field on all DB engines, and I've
noticed a difference on dlr_oracle.c, on dlr_get_oracle:

   sql = octstr_format("SELECT %S, %S, %S, %S, %S, %S, %S FROM %S
WHERE %S=:1 AND %S=:2 AND %S=:3 AND ROWNUM < 2",
                       fields->field_mask, fields->field_serv,
                       fields->field_url, fields->field_src,
                       fields->field_dst, fields->field_boxc,
                       fields->table, fields->field_smsc,
                       fields->field_ts, fields->field_dst);

While on all other engines, field_dst is not used on the condition:

pgsql:
        sql = octstr_format("SELECT %s, %s, %s, %s, %s, %s FROM %s WHERE
%s='%s' AND %s='%s' LIMIT 1;",

sdb:
        sql = octstr_format("SELECT %s, %s, %s, %s, %s, %s FROM %s WHERE
%s='%s' AND %s='%s' %s", [NO LIMIT CLAUSE]

mysql:
sql = octstr_format("SELECT %S, %S, %S, %S, %S, %S FROM %S WHERE %S=?
AND %S=? LIMIT 1",

and so on.

Any reason why this is done that way? Which one should be fixed?

Regards,
--
Alejandro Guerrieri
[email protected]


Reply via email to