[erlang-patches] odbcserver.c 64bit support

Raimo Niskanen <>
Thu Jan 17 11:40:04 CET 2013


On Thu, Jan 10, 2013 at 04:54:15PM +0900, satoshi kinoshita wrote:
> At Mon, 3 Dec 2012 12:39:38 +0100,
> Henrik Nord wrote:
> > 
> > 
> > On 11/29/2012 08:22 AM, satoshi kinoshita wrote:
> > > I found antoher 64bit related bug in odbcserver.c.
> > > It affects only param_query for stored-procedure
> > > with OUT parameter of SQL_C_SLONG type.
> > Can you add a testcase for this problem?
> 
> The branch now includes both fix and some test cases.
> 
> - The original bug I found is for 64 bit gcc(used to compile odbcserver.c).
>   Test cases should succeed with odbcserver compiled using 32 bit gcc
>   even without the fix.
> 
> - oracle test case may need to set scrollable_cursors option to off
>   depending on the driver(I tested with Oracle ODBC driver from
>   following rpm package on
>   centos6: oracle-instantclient11.2-odbc-11.2.0.3.0-1.x86_64,
>   which seems like *not* supporting srollabel_cursors).
> 
> 
> - postgresql test case is not actually checking the values of OUT params
>   of the stored function.
>   Though I'm still trying to write some more test cases to
>   check actual out values,
>   I think it's enough because it's checking
>   the fix (I mean this test case succeeds with my fix
>   and fails without it).
> 
> - I have no time to setup and test this fix with mysql:).
>   It just skips the test cases when the RDBMS macro is defined as 'mysql'.

I have added a comment explaining the postgres pecularity.
    https://github.com/RaimoNiskanen/otp/commit/3a8bd0f1e6c6b39082c13eea3f1ac3e49a4ac444

The branch looks a bit messy with commits for both "set scrollable_cursor
to off for oracle driver" and "rollback disabling scrollable _cursor for
oracle". Why not add the code as commented out?

There are two "drop procedure after testing" that could be squashed.

The last two commits "postgresql test case for 64bit bg for param_query"
and bine "explain postgres pecularity for maram query out paramters" should
be squashed.

Can you do this cleanup or should I?

It would be nice to have a better working test case for postgres, but I have
pounded my forhead against a wall for a while trying to procuce one and it
indeed seems that postgres does not return anything in out parameters, just
in the result set. There are indications for that in the documentation for
the procedural langguage 'sql', at least.

It would also be nice if it was possible to procduce a test case that does
not use stored procedures since they are so implementation specific. Do you
think it would be possible to use something like "SELECT .. INTO ?" for
that. I have tried with no success...

> 
> 
> 
> 
> ---Patch--------------------------------------------------
> git fetch git://github.com/kinogmt/otp.git odbc64
> https://github.com/kinogmt/otp/compare/maint...odbc64
> https://github.com/kinogmt/otp/compare/maint...odbc64.patch
> -----------------------------------------------------------
> 
> Thanks,
> Kinoshtia
> _______________________________________________
> erlang-patches mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-patches

-- 

/ Raimo Niskanen, Erlang/OTP, Ericsson AB


More information about the erlang-patches mailing list