From: | "Tsunakawa, Takayuki" <tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com> |
---|---|
To: | "pgsql-odbc(at)postgresql(dot)org" <pgsql-odbc(at)postgresql(dot)org> |
Subject: | Some bug fixes and improvements |
Date: | 2016-03-29 02:17:03 |
Message-ID: | 0A3221C70F24FB45833433255569204D1F53B952@G01JPEXMBYT05 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-odbc |
Hello, Inoue-san and all,
While I'm learning the psqlODBC source code and investigating the cause of the scroll cursor crash problem I reported in January, I found some bugs and useless code fragments. Please find the attached patches to remove them. I hope these will be included in the next release.
However, I've not been able to find the cause of the crash. The code of psqlODBC is pretty complex, particularly around handling cursors, isn't it?
The below are the brief descriptions of the patches:
[bind_mem_failure.patch]
The existing memory is not freed upon realloc() failure.
PGAPI_BindCol() doesn't check the failure of extend_getdata_info().
[duplicate_env_alloc.patch]
setup.c:test_connection() calls EN_Constructor() twice, leaking small memory.
[flag_overwrite.patch]
Checking a flag bit mistakenly resets other flag bits. I don't know what failure this would cause.
[ineffective_code.patch]
The third stricmp() in writeDriverCommoninfo() is useless, because the second one causes the function to return.
SC_get_errormsg() definition is repeated twice in succession.
CC_on_abort_partial() is not used.
In info.c:SQLGetInfo(), "len = 0" is unnecessary because len is assigned at the end of the function.
In execute.c:PGAPI_ExecDirect(), flag doesn't need to be set as its value doesn't change.
PODBC_PER_STATEMENT_ROLLBACK is not used.
[multi_stmt_prepare.patch]
The statement linked list is not properly chained, which throws away some statements. I don't know what failure this would cause.
[win_build.patch]
LINKMT is not used in the build process.
ADDL_INC should be ADD_INC. Just a typo.
The CLEAN target doesn't delete .pdb files.
Regards
Takayuki Tsunakawa
Attachment | Content-Type | Size |
---|---|---|
bind_mem_failure.patch | application/octet-stream | 1.3 KB |
duplicate_env_alloc.patch | application/octet-stream | 586 bytes |
flag_overwrite.patch | application/octet-stream | 1.4 KB |
ineffective_code.patch | application/octet-stream | 4.2 KB |
multi_stmt_prepare.patch | application/octet-stream | 327 bytes |
win_build.patch | application/octet-stream | 1.4 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tsunakawa, Takayuki | 2016-03-29 03:10:30 | Re: Question regarding accessing only tables to which the user has access |
Previous Message | Fernando Luna | 2016-03-28 17:40:39 | Question regarding accessing only tables to which the user has access |