Update of /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/NPgClient
In directory sc8-pr-cvs1:/tmp/cvs-serv22195/NPgClient
Modified Files:
PgStatement.cs
Log Message:
Prepare for beta 4
Index: PgStatement.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/NPgClient/PgStatement.cs,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** PgStatement.cs 18 Nov 2003 14:19:29 -0000 1.10
--- PgStatement.cs 20 Nov 2003 17:34:43 -0000 1.11
***************
*** 347,353 ****
try
{
- this.rows = new object[fetchSize];
- this.rowIndex = 0;
-
PgOutputPacket packet = new PgOutputPacket(db.Settings.Encoding);
--- 347,350 ----
***************
*** 496,501 ****
object[] row = null;
! if ((!this.allRowsFetched && this.rows.Length == 0) ||
! (!this.allRowsFetched && this.rows.Length >= this.fetchSize))
{
lock (this)
--- 493,499 ----
object[] row = null;
! if ((!this.allRowsFetched && this.rows == null) ||
! (!this.allRowsFetched && this.rows.Length == 0) ||
! (!this.allRowsFetched && this.rowIndex >= this.fetchSize))
{
lock (this)
***************
*** 514,519 ****
}
! if (this.rowIndex >= this.fetchSize ||
! this.rows[this.rowIndex] == null )
{
this.rows = null;
--- 512,518 ----
}
! if (this.rows != null &&
! (this.rowIndex >= this.fetchSize ||
! this.rows[this.rowIndex] == null))
{
this.rows = null;
***************
*** 644,648 ****
case PgBackendCodes.EMPTY_QUERY_RESPONSE:
case PgBackendCodes.NODATA:
! this.hasRows = false;
break;
--- 643,649 ----
case PgBackendCodes.EMPTY_QUERY_RESPONSE:
case PgBackendCodes.NODATA:
! this.hasRows = false;
! this.rows = null;
! this.rowIndex = 0;
break;
***************
*** 732,735 ****
--- 733,742 ----
int fieldCount = packet.ReadShort();
object[] values = new object[fieldCount];
+
+ if (this.rows == null)
+ {
+ this.rows = new object[fetchSize];
+ this.rowIndex = 0;
+ }
for (int i = 0; i < values.Length; i++)
|