Re: [fpc-devel] fcl-db bugs/improvements/patches

2011-02-16 Thread michael . vancanneyt


I will look at them today.

Michael.

On Wed, 16 Feb 2011, LacaK wrote:


Hi *,
there are some waiting bugs with patches, which are relative simple and IMHO 
they can not affect negatively product quality.
I summarize them here, for quick review them, so if then they can go into 
2.4.4 release:


1. http://bugs.freepascal.org/view.php?id=17188 and 
http://bugs.freepascal.org/view.php?id=18718

This fix add missing cases so all existing should work as before

2. http://bugs.freepascal.org/view.php?id=18649
This fix adds (or replaces) new datatype BIGINT to SQLite3Connection

3. http://bugs.freepascal.org/view.php?id=18670
This fix adds new datatype NCHAR, NVARCHAR, NCLOB to SQLite3Connection

4. http://bugs.freepascal.org/view.php?id=14944
This fix adds support for transactions in ODBCConnection

5. http://bugs.freepascal.org/view.php?id=16885
This fix adds missing TOracleConnection.RowsAffected method

6. http://bugs.freepascal.org/view.php?id=18699
This fixes Dialect 1 case

Thanks
-Laco.
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] fcl-db bugs/improvements/patches

2011-02-16 Thread Joost van der Sluis
On Wed, 2011-02-16 at 11:30 +0100, michael.vancann...@wisa.be wrote:
 I will look at them today.

They all need improvement or a better review or testcases or break
backwards compatibility.

Joost.



___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] fcl-db bugs/improvements/patches

2011-02-16 Thread michael . vancanneyt



On Wed, 16 Feb 2011, Joost van der Sluis wrote:


On Wed, 2011-02-16 at 11:30 +0100, michael.vancann...@wisa.be wrote:

I will look at them today.


They all need improvement or a better review or testcases or break
backwards compatibility.


The BIGINT or NCHAR stuff not, I would think ?

I'll have a look.

Michael.
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] fcl-db bugs/improvements/patches

2011-02-16 Thread Joost van der Sluis
On Wed, 2011-02-16 at 11:59 +0100, michael.vancann...@wisa.be wrote:
 
 On Wed, 16 Feb 2011, Joost van der Sluis wrote:
 
  On Wed, 2011-02-16 at 11:30 +0100, michael.vancann...@wisa.be wrote:
  I will look at them today.
 
  They all need improvement or a better review or testcases or break
  backwards compatibility.
 
 The BIGINT or NCHAR stuff not, I would think ?
 
 I'll have a look.

BIGINT leads to a backwards compatibility issue with largeint not being
recognized anymore. (not a real problem I think, but it must be
documented in user-changes) And I think to fix this a revision has to be
reverted, not committed? Which leads to a new issue: we need to add a
test that test for the problem introduced with the revision being
reverted. (ie: recognition of fieldtypes when the first record is NULL)

The nchar stuff doesn't have tests. I don't even know if ftWideString
and such are working at all. The basic tests for these types have to be
added.

Joost.

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] fcl-db bugs/improvements/patches

2011-02-16 Thread LacaK



They all need improvement or a better review or testcases or break
backwards compatibility.
  

The BIGINT or NCHAR stuff not, I would think ?

I'll have a look.



BIGINT leads to a backwards compatibility issue with largeint not being
recognized anymore. (not a real problem I think, but it must be
documented in user-changes)
then we can leave largeint and add bigint this will be safe in all 
aspects. And largeint can be dropped later (as obsolete, non-standard).



 And I think to fix this a revision has to be
reverted, not committed? Which leads to a new issue: we need to add a
test that test for the problem introduced with the revision being
reverted. (ie: recognition of fieldtypes when the first record is NULL)
  
yes this problem was revealed, but does not affect fix as I wrote in bug 
tracker we must always rely on sqlite3_column_decltype()
and only when no useful information will be available then use as 
workaround (or hack) sqlite3_column_type()



The nchar stuff doesn't have tests.
yes it is true, but they can be added later ... but NCHAR is not 
supported by all databases so it must be implemented carefully



 I don't even know if ftWideString
and such are working at all.
for me it works ... and as TWideStringField is descendant of 
TStringField (which have tests), there is big chance, that it will work



 The basic tests for these types have to be
added.

  
if some patches are problematic, then leave it for future ... but please 
comment my list and let me know if I can do something to help.

IMHO at least points 4,5,6 are safe.

Thanks
Laco.

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] fcl-db bugs/improvements/patches

2011-02-16 Thread LacaK
Michael can you please look also at this 
http://bugs.freepascal.org/view.php?id=17510

Thanks
Laco.



I will look at them today.

Michael.

On Wed, 16 Feb 2011, LacaK wrote:


Hi *,
there are some waiting bugs with patches, which are relative simple 
and IMHO they can not affect negatively product quality.
I summarize them here, for quick review them, so if then they can go 
into 2.4.4 release:


1. http://bugs.freepascal.org/view.php?id=17188 and 
http://bugs.freepascal.org/view.php?id=18718

This fix add missing cases so all existing should work as before

2. http://bugs.freepascal.org/view.php?id=18649
This fix adds (or replaces) new datatype BIGINT to SQLite3Connection

3. http://bugs.freepascal.org/view.php?id=18670
This fix adds new datatype NCHAR, NVARCHAR, NCLOB to SQLite3Connection

4. http://bugs.freepascal.org/view.php?id=14944
This fix adds support for transactions in ODBCConnection

5. http://bugs.freepascal.org/view.php?id=16885
This fix adds missing TOracleConnection.RowsAffected method

6. http://bugs.freepascal.org/view.php?id=18699
This fixes Dialect 1 case

Thanks
-Laco.
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel



___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] fcl-db bugs/improvements/patches

2011-02-16 Thread Joost van der Sluis
On Wed, 2011-02-16 at 13:41 +0100, LacaK wrote:
  4. http://bugs.freepascal.org/view.php?id=14944
  This fix adds support for transactions in ODBCConnection

Adding transactions so close to a release is not a good idea, imho. It
could be added in trunk, though. But first run the testsuite with this
patch for at least mysql/mssql and firebird using odbc.

  5. http://bugs.freepascal.org/view.php?id=16885
  This fix adds missing TOracleConnection.RowsAffected method

A regression-test has to be performed before this can be comitted.
(Needs an oracle setup)

  6. http://bugs.freepascal.org/view.php?id=18699
  This fixes Dialect 1 case

The question in the bug-report has to be answered.

So even 4,5 and 6 are not that easy. (If they were, they were already
applied)

Joost.

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] fcl-db bugs/improvements/patches

2011-02-16 Thread LacaK

Hi Joost,
thanks for reply

4. http://bugs.freepascal.org/view.php?id=14944
This fix adds support for transactions in ODBCConnection



Adding transactions so close to a release is not a good idea, imho. It
could be added in trunk, though.

ok, no objections from me side
only to explain: ODBC works by default in auto-commit mode, and this 
behavior is not affected by fix so all remains as is.
only when you supply to TODBCConnection.Params: 'Autocommit=false' or 
'AutoCommit=0' you will switch to manual commit.

without this all works as before.


 But first run the testsuite with this
patch for at least mysql/mssql and firebird using odbc.

  

;-) please, no


5. http://bugs.freepascal.org/view.php?id=16885
This fix adds missing TOracleConnection.RowsAffected method



A regression-test has to be performed before this can be comitted.
(Needs an oracle setup)

  
Why do you think, that this patch can lead to problems, ATM RowsAffected 
is not implemented, so it always returns -1.

So nobody can use / rely on this value.
So I think, that provide some (untested) solution is better than nothing 
... and we can wait for users feedback

(I do not have Oracle instaled, so I can not help, test)


6. http://bugs.freepascal.org/view.php?id=18699
This fixes Dialect 1 case



The question in the bug-report has to be answered.
  

answered


So even 4,5 and 6 are not that easy. (If they were, they were already
applied)
  

;-) ok

Thanks
Laco.

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] fcl-db bugs/improvements/patches

2011-02-16 Thread LacaK
When I already have start this thread, I would like also point to this 
bugs (their are both more or less about the same):

http://bugs.freepascal.org/view.php?id=14730
http://bugs.freepascal.org/view.php?id=18162

Now I can not primary talk about NULL paramters, but about ukInsert case 
(in Procedure TCustomSQLQuery.ApplyRecUpdate).
There is serious bug in fact, that FInsertQuery is assigned only once 
(using function InsertRecQuery), when FIRST insert is applied.

And InsertRecQuery construct SQL insert but only for NOT NULL values.

Example:
1. we have table1 with some 3 columns: col1, col2, col3
2. I Append record and set only 1st column, then Post
3. I ApplyUpdates ... insert is constructed INSERT INTO table1 (col1) 
VALUES(:col1)

4. I Append second record and fill all 3 columns, then Post
5. I ApplyUpdates ... but no new insert is constructed (because 
FInsertQry is already assigned), but is used existing from step 3

6. So columns col2 and col3 are never inserted to database

Do you see ?

Thanks
Laco.
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel