Обсуждение: Some bug fixes and improvements

Поиск
Список
Период
Сортировка

Some bug fixes and improvements

От
"Tsunakawa, Takayuki"
Дата:
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
inJanuary, I found some bugs and useless code fragments.  Please find the attached patches to remove them.  I hope
thesewill 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
aroundhandling 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
wouldcause. 


[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


Вложения

Re: Some bug fixes and improvements

От
"Inoue, Hiroshi"
Дата:
井上です。

On 2016/03/29 11:17, Tsunakawa, Takayuki wrote:
> 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
inJanuary, I found some bugs and useless code fragments.  Please find the attached patches to remove them.  I hope
thesewill be included in the next release. 

ありがとうございます。
ineffective_code.patchとwin_build.patchを除いてpushしました。
ineffective_code.patchは関しては、なぜCC_on_abort_partialが抜けてしまっ
たのか調べる必要がありま す。 これはsavepoint単位のrollback時に必要な処
理をするものです。
win_build.patchに関しては、使用を勧めてはいないnmake関連のバグを修正する
というのは矛盾を感じるというか何というか。

>
> However, I've not been able to find the cause of the crash.  The code of psqlODBC is pretty complex, particularly
aroundhandling cursors, isn't it? 
とりあえず、 crashについて基本的なことを確認させてください。
  declare/fetchモードですか?
  以前のメールにあったトレースの中で
   psqlodbc35w.dll!SQLFetchScroll(void * StatementHandle=0x007f3b30,
short FetchOrientation=5, long FetchOffset=27326472)
  の引数(FetchOrientation=SQL_FETCH_ABSOLUTEとFetchOffset)は正しいと
考えてよろしいので しょうか?



Re: Some bug fixes and improvements

От
"Tsunakawa, Takayuki"
Дата:
> From: Inoue, Hiroshi [mailto:h-inoue@dream.email.ne.jp]
> ineffective_code.patchは関しては、なぜCC_on_abort_partialが抜けてしま
> っ
> たのか調べる必要がありま す。 これはsavepoint単位のrollback時に必要な
> 処
> 理をするものです。

OK, I eliminated the removal of CC_on_abort_partial().  Please use the revised patch.

Regards
Takayuki Tsunakawa


Вложения