[erlang-patches] Patch for ODBC module

Fredrik fredrik@REDACTED
Thu Jan 10 09:34:51 CET 2013


Hello Danil!
Please rebase this patch on current 'master' branch and fix the problem.
 From what is written in the 'how-to submit patches' on github you have 
done the right thing, we will update the wiki soon.

BR Fredrik Gustafsson
Erlang OTP Team
On 01/10/2013 05:19 AM, Danil Onishchenko wrote:
> Hi, Fredrik.
> When I was working on my patch I used the branch "maint" of OTP
> repository as a base because in the guide for submitting patches it
> was writed "Base your patch on maint if you are fixing a bug...". I
> compared the source file odbcserver.c in the branches "maint" and
> "master-pu" and found out that definitions of functions ‘get_diagnos’
> and ‘encode_error_message’ in those branches are different.
> In "maint" they are
> static diagnos get_diagnos(SQLSMALLINT handleType, SQLHANDLE handle);
> static db_result_msg encode_error_message(char *reason);
>
> and in "master"
> static diagnos get_diagnos(SQLSMALLINT handleType, SQLHANDLE handle,
> Boolean extendedErrors);
> static db_result_msg encode_error_message(char *reason, char *errCode,
> SQLINTEGER nativeError);
>
> So my patch is proper for the "maint" branch and it is not for
> "master" branch. Is my choise of the branch wrong? Should I use
> "master" as a base instead of "maint"?
>
> Also I sent a patch "odbc:param_query/3 and odbc:param_query/4" which
> I based on the branch "maint" too. Should I fix it for "master"?
>
> 2013/1/9 Fredrik<fredrik@REDACTED>:
>> Hello again,
>> This patch fails to build:
>> "
>>
>> odbcserver.c: In function ‘db_connect’:
>> odbcserver.c:538:2: error: too few arguments to function ‘get_diagnos’
>> odbcserver.c:250:16: note: declared here
>> odbcserver.c:541:2: error: too few arguments to function
>> ‘encode_error_message’
>> odbcserver.c:157:22: note: declared here
>>
>> "
>> Please fix this and give notice when it is done.
>>
>>
>> BR Fredrik Gustafsson
>> Erlang OTP Team
>> On 01/09/2013 09:53 AM, Kernel Panic wrote:
>>> Hi, folks.
>>> I created a patch for erlang odbc module which solves the problem with
>>> setup autocommit mode for connections established by Oracle ODBC
>>> driver in Linux.
>>> The issue: Oracle ODBC driver for Linux ignores setup autocommit mode
>>> during driver initialization before a connection to database has been
>>> established (in odbc module autocommit is set this way). My patch
>>> solves this problem by setting autocommit mode after a connection to
>>> database has been established.
>>> Actually it's an Oracle ODBC driver problem, but  it could be very
>>> useful to add this fix to erlang odbc module, because this module
>>> allow to set autocommit mode only at the moment of connection
>>> creation.
>>> I sent this patch earlier in October 2012 but I didn't receive any
>>> feedback.
>>>
>>> My updates:
>>> git fetch git@REDACTED:RubberCthulhu/otp.git odbc-oracle-autocommit-fix
>>>
>>> https://github.com/RubberCthulhu/otp/compare/odbc-oracle-autocommit-fix
>>>
>>> https://github.com/RubberCthulhu/otp/compare/odbc-oracle-autocommit-fix.patch
>>>
>>> Danil Onishchenko, alevandal@REDACTED
>>> _______________________________________________
>>> erlang-patches mailing list
>>> erlang-patches@REDACTED
>>> http://erlang.org/mailman/listinfo/erlang-patches
>>




More information about the erlang-patches mailing list