first patch to odbc

ZIGLIO Frediano Frediano.Ziglio at omnitelvodafone.it
Tue Apr 9 11:59:12 EDT 2002


> 
> Thank you for your patch.  I reviewed it carefully.
> 
> I'm one of the CVS committers, but I'm not understanding the patch so
> I'll leave it to our leader Brian to apply.  However, I thought you
> might be interested in why I don't understand it, and why I 
> decided not
> to apply it.  Some of my reasons are that I lack experience with the
> code, but there are other reasons.
> 
> - In SQLMoreResults() you check for HSTMT twice at the start of the
> function.  I think this is wrong.
> 

Opps... I made an error merge some fix (first time I patched 0.53, 
not current)

> - Many functions you changed so that they return failure instead of
> success.  You didn't say why this change was done.  Do you think this
> might break existing code in other projects?
> 
> - You didn't include a patch to ChangeLog, NEWS or to any 
> documentation
> files.  Whoever applies the patch for you would have to go through all
> other files to see if they have to be changed.

Ok, written in ChangeLog. Reported for ML convenience:
* src/odbc/odbc.c:
- changed return of unimplemented function from SQL_SUCCESS to
SQL_ERROR. User program assume that result are successfully set on
SQL_SUCCESS so user program can read garbage data or do other strange
assuming. Not changed result for function like SQLDisconnect that
work in the same way
- implemented SQLMoreResults and SQLNumParams
- return SQL_ERROR on memory allocation failure
- check all statement entering in functions
- removed some compiler warning due to conversion
- improved SQLFreeStmt (support all type of free) and fix (not unbind
on SQL_CLOSE)
- added some type handling (like SYBINTN) converting from tds to odbc
- fixed some strange indentation

> 
>- The use of // as a comment marker is not K&R.
>

I use mainly C++, sometime ANSI C, what are main differency from K&R and
ANSI ?

>I suggest you have a read of this chapter:
>
>http://www.linuxdoc.org/HOWTO/Software-Release-Practice-HOWTO/patching.html
>

Readed

I updated my patch with your suggestion.

bye
  freddy77

-------------- next part --------------
A non-text attachment was scrubbed...
Name: mypatch-20020409.patch.gz
Type: application/octet-stream
Size: 7714 bytes
Desc: not available
Url : http://lists.ibiblio.org/pipermail/freetds/attachments/20020409/2c7ec27c/mypatch-20020409.patch.obj


More information about the FreeTDS mailing list