Hello,
 

 i have remarked a strange thing, if you do only one transaction by connection 
these counters are not updated , it is normal ?
 

 i have done the test with dotnet provider and node-firebird (they uses the xdr 
remote protocol).
 

 it is very easy to reproduce :
 

 1) Open Connection
 2) Open transaction
 3) do a select query
 4) hard commit on transact
 5) Close connection
 

 ps : if i do a second transaction on the same connection these counters are 
updated.
 

 so if you do a little script that launch N times this little program you 
obtain with gstat -h
 

 IF N = 100
 

 BEFORE :
 

 OIT 1, OAT 2, OST 2, Next 3

 

 AFTER
 

 OIT 1, OAT 2, OST 2,  NEXT 103
 

 [CODE => DOTNET]
 using FirebirdSql.Data.FirebirdClient;
 using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
 

 namespace dotnet_firebird
 {
     class Program
     {
         static void Main(string[] args)
         {
             FirebirdSql.Data.FirebirdClient.FbConnectionStringBuilder scnx = 
new FirebirdSql.Data.FirebirdClient.FbConnectionStringBuilder();
             scnx.UserID = "SYSDBA";
             scnx.Password = "masterkey";
             scnx.DataSource = "127.0.0.1";
             scnx.Database = "c:\\test.fdb";
             int i = 0;
             FbConnection cnx = new FbConnection(scnx.ToString());
             cnx.Open();
             FbTransaction tr = cnx.BeginTransaction();
             FbCommand cmd = new FbCommand("SELECT COUNT(1) FROM TRANSACT", 
cnx, tr);
             FbDataReader _reader = cmd.ExecuteReader();
             while (_reader.Read())
                 Console.WriteLine(_reader.GetString(0));
             _reader.Close();
             tr.Commit();
             i++;
             cnx.Close();
             cnx.Dispose();
         }
     }
 }
 [/CODE]
 

 [CODE => node]
 var fb = require('node-firebird');
 

 var _connection = {
     user : 'SYSDBA',
     password : 'masterkey',
     host : '127.0.0.1',
     port : 3050,
     database : 'test.fdb',
 }
 

 fb.attach(_connection, function (err, cnx) {
     if (err) {
         console.log("can't connect to db");
         return;
     }
     cnx.query("SELECT count(1) FROM TRANSACT", function (err, data) {
         console.log(data);
         
         cnx.detach(function (err) {
             if (err)
                 console.log(err);
         });
     });
 
 });
 [/CODE]

Reply via email to