freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] [GRAYMAIL] Re: "Fix affected rows after insert with prepared query" side effect
- From: Frediano Ziglio <freddy77 AT gmail.com>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] [GRAYMAIL] Re: "Fix affected rows after insert with prepared query" side effect
- Date: Wed, 11 May 2016 21:23:38 +0100
2016-05-11 6:07 GMT+01:00 John Kendall <john AT capps.com>:
>
>> On May 10, 2016, at 3:34 PM, Frediano Ziglio <freddy77 AT gmail.com> wrote:
>>
>> 2016-05-10 22:31 GMT+01:00 John Kendall <john AT capps.com>:
>>> It appears the patch for this ("fix ct-library rows count") has broken
>>> compute in ctlib:
>>>
>>>
>>> select col=1 into #tbl insert #tbl values (2) select * from #tbl
>>> compute sum(col)
>>> (1 row affected)
>>> (1 row affected)
>>> col
>>> -----------
>>> 1
>>> 2
>>> 2
>>>
>>> (3 rows affected)
>>>
>>> dblib (and ctlib RC1) does the expected:
>>>
>>> select col=1 into #tbl insert #tbl values (2) select * from #tbl
>>> compute sum(col)
>>> (1 row affected)
>>> (1 row affected)
>>> col
>>> -----------
>>> 1
>>> 2
>>> sum
>>> ===========
>>> 3
>>>
>>> (3 rows affected)
>>>
>>>
>>> Sorry to keep finding things!
>>>
>>> John
>>>
>>>
>>
>> Can you put some more detailed examples? Which program did you use?
>>
>> Frediano
>
> I'm using sqsh.
>
> The compute clause should return an extra result line. In the example I
> have given above, the table is a single column table with two rows with
> values 1 and 2. Adding the compute sum clause to the select should return
> a compute result of 3, instead it is returns an extra copy of the last row.
> My example is not a special case, no compute (sum, max, min, avg, etc)
> results seem to be returning from any queries with a compute clause. I
> never saw this problem before RC4. Backing out the 'fix ct-library rows
> count' patch on ct.c makes it return the expected result.
>
> John
>
Just to be sure, can you test 1.0rc5 ?
Frediano
-
Re: [freetds] "Fix affected rows after insert with prepared query" side effect,
John Kendall, 05/04/2016
- <Possible follow-up(s)>
-
Re: [freetds] "Fix affected rows after insert with prepared query" side effect,
John Kendall, 05/10/2016
-
Re: [freetds] "Fix affected rows after insert with prepared query" side effect,
Frediano Ziglio, 05/10/2016
-
Re: [freetds] "Fix affected rows after insert with prepared query" side effect,
Sergio NNX, 05/10/2016
- Re: [freetds] "Fix affected rows after insert with prepared query" side effect, Frediano Ziglio, 05/11/2016
-
Re: [freetds] [GRAYMAIL] Re: "Fix affected rows after insert with prepared query" side effect,
John Kendall, 05/11/2016
- Re: [freetds] [GRAYMAIL] Re: "Fix affected rows after insert with prepared query" side effect, Frediano Ziglio, 05/11/2016
-
Re: [freetds] [GRAYMAIL] Re: "Fix affected rows after insert with prepared query" side effect,
Frediano Ziglio, 05/11/2016
- Re: [freetds] "Fix affected rows after insert with prepared query" side effect, John Kendall, 05/11/2016
- Re: [freetds] "Fix affected rows after insert with prepared query" side effect, John Kendall, 05/11/2016
-
Re: [freetds] "Fix affected rows after insert with prepared query" side effect,
Sergio NNX, 05/10/2016
-
Re: [freetds] "Fix affected rows after insert with prepared query" side effect,
Frediano Ziglio, 05/10/2016
Archive powered by MHonArc 2.6.24.