"Fix affected rows after insert with prepared query" side effect

John Kendall <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
On Oct 19, 2015 this patch was applied to ct.c:

"Fix affected rows after insert with prepared query"

This patch has the side-effect of a 'rows affected' being displayed for every select statement within a ASE stored procedure.  For example, sp_help returns 136 extra 'rows affected' lines.  See below.  Backing out this patch stops this from happening.  I only tested this on sp_help, but I figured that was enough.  FYI, this patch does not have this effect on MS SQL 2008's sp_help sproc.

John


sqsh> sp_help Movetype
(1 row affected)
 Name                             Owner                Object_type                             
 -------------------------------- -------------------- ----------------------------------------
 Movetype                         dbo                  user table                              

 Column_name                                      Type             Length                   Pre
 ------------------------------------------------ ---------------- ------------------------ ---
 movetype                                         char                  2                   NUL
 move_desc                                        char                 20                   NUL
 move_revenue                                     bit                   1                   NUL

(1 row affected)
(1 row affected)
(1 row affected)
(0 rows affected)
(1 row affected)
(0 rows affected)
(1 row affected)
(1 row affected)
(1 row affected)
(1 row affected)
(1 row affected)
(1 row affected)
(1 row affected)
Object has the following indexes

(1 row affected)
(1 row affected)
(1 row affected)
(1 row affected)
(1 row affected)
(1 row affected)
(1 row affected)
(1 row affected)
(0 rows affected)
(8 rows affected)
(1 row affected)
(1 row affected)
(1 row affected)
(1 row affected)
(1 row affected)
(1 row affected)
(1 row affected)
(1 row affected)
(1 row affected)
(1 row affected)
(1 row affected)
(1 row affected)
(1 row affected)
(1 row affected)
(1 row affected)
(1 row affected)
(1 row affected)
(1 row affected)
(1 row affected)
(0 rows affected)
... etc
<snip>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.