transactd 3.2.1 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/bin/common/{tdclc_32_3_2.dll → tdclc_32_3_3.dll} +0 -0
  3. data/bin/common/{tdclc_64_3_2.dll → tdclc_64_3_3.dll} +0 -0
  4. data/build/swig/ruby/tdclrb_wrap.cpp +117 -549
  5. data/build/tdclc/tdclc.cbproj +1 -1
  6. data/build/tdclc/tdclc.rc +4 -4
  7. data/build/tdclcpp/tdclcpp.rc +4 -4
  8. data/build/tdclcpp/tdclcpp_bc.cbproj +1 -1
  9. data/build/tdclrb/tdclrb.rc +4 -4
  10. data/source/bzs/db/IBlobBuffer.h +2 -1
  11. data/source/bzs/db/blobBuffer.h +11 -10
  12. data/source/bzs/db/engine/mysql/database.cpp +13 -25
  13. data/source/bzs/db/engine/mysql/database.h +1 -8
  14. data/source/bzs/db/engine/mysql/mysqlProtocol.cpp +85 -68
  15. data/source/bzs/db/protocol/tdap/client/connMgr.cpp +99 -2
  16. data/source/bzs/db/protocol/tdap/client/connMgr.h +28 -2
  17. data/source/bzs/db/protocol/tdap/client/nsTable.cpp +21 -2
  18. data/source/bzs/db/protocol/tdap/client/nsTable.h +2 -1
  19. data/source/bzs/db/protocol/tdap/client/serializer.cpp +2 -2
  20. data/source/bzs/db/protocol/tdap/client/table.cpp +4 -19
  21. data/source/bzs/db/protocol/tdap/client/table.h +1 -2
  22. data/source/bzs/db/protocol/tdap/client/trdboostapiInternal.h +7 -0
  23. data/source/bzs/db/protocol/tdap/myDateTime.cpp +3 -2
  24. data/source/bzs/db/protocol/tdap/mysql/tdapCommandExecuter.cpp +49 -32
  25. data/source/bzs/db/protocol/tdap/mysql/tdapCommandExecuter.h +8 -6
  26. data/source/bzs/db/protocol/tdap/tdapSchema.h +9 -5
  27. data/source/bzs/db/protocol/tdap/tdapcapi.h +15 -5
  28. data/source/bzs/db/transactd/connManager.cpp +32 -8
  29. data/source/bzs/db/transactd/connManager.h +3 -2
  30. data/source/bzs/db/transactd/connectionRecord.h +37 -9
  31. data/source/bzs/db/transactd/transactd.cpp +21 -3
  32. data/source/bzs/test/tdclatl/test_v3.js +14 -3
  33. data/source/bzs/test/tdclphp/transactd_Test.php +3 -1
  34. data/source/bzs/test/tdclphp/transactd_v3_Test.php +11 -2
  35. data/source/bzs/test/tdclrb/transactd_spec.rb +3 -1
  36. data/source/bzs/test/tdclrb/transactd_v3_spec.rb +11 -1
  37. data/source/bzs/test/trdclengn/test_trdclengn.cpp +3 -1
  38. data/source/global/tdclatl/ConnMgr.cpp +20 -0
  39. data/source/global/tdclatl/ConnMgr.h +2 -0
  40. data/source/global/tdclatl/ConnRecord.cpp +13 -5
  41. data/source/global/tdclatl/ConnRecord.h +1 -0
  42. data/source/global/tdclatl/ConnRecords.h +2 -1
  43. data/source/global/tdclatl/tdclatl.idl +7 -0
  44. metadata +4 -4
@@ -1,7 +1,7 @@
1
1
  #ifndef BZS_DB_PROTOCOL_TDAP_MYSQL_TDAPCOMMANDEXECUTER_H
2
2
  #define BZS_DB_PROTOCOL_TDAP_MYSQL_TDAPCOMMANDEXECUTER_H
3
3
  /*=================================================================
4
- Copyright (C) 2012 2013 BizStation Corp All rights reserved.
4
+ Copyright (C) 2012-2016 BizStation Corp All rights reserved.
5
5
 
6
6
  This program is free software; you can redistribute it and/or
7
7
  modify it under the terms of the GNU General Public License
@@ -99,6 +99,7 @@ public:
99
99
  inline int errorCode(int ha_error) { return tdap::mysql::errorCode(ha_error);}
100
100
  inline short_td errorCodeSht(int ha_error) { return (short_td)tdap::mysql::errorCode(ha_error);}
101
101
  netsvc::server::IAppModule* mod() { return m_mod; };
102
+ friend class commandExecuter;
102
103
  };
103
104
 
104
105
  /** Command dispatcher for connectionManager
@@ -107,18 +108,19 @@ class connMgrExecuter
107
108
  {
108
109
  request& m_req;
109
110
  __int64 m_modHandle;
110
-
111
+ blobBuffer* m_blobBuffer;
111
112
  int definedDatabases(char* buf, size_t& size);
112
113
  int schemaTables(char* buf, size_t& size);
113
114
  int definedTables(char* buf, size_t& size);
114
115
  int definedViews(char* buf, size_t& size);
115
- int slaveStatus(char* buf, size_t& size);
116
+ int slaveStatus(netsvc::server::netWriter* nw);
116
117
  int systemVariables(char* buf, size_t& size);
118
+ int statusVariables(char* buf, size_t& size);
117
119
  int read(char* buf, size_t& size);
118
120
  int disconnectOne(char* buf, size_t& size);
119
121
  int disconnectAll(char* buf, size_t& size);
120
122
  public:
121
- connMgrExecuter(request& req, unsigned __int64 parent);
123
+ connMgrExecuter(request& req, unsigned __int64 parent, blobBuffer* bb);
122
124
  int commandExec(netsvc::server::netWriter* nw);
123
125
  };
124
126
 
@@ -146,8 +148,8 @@ public:
146
148
  int execute(netsvc::server::netWriter* nw)
147
149
  {
148
150
  if (m_req.op == TD_STASTISTICS)
149
- return connMgrExecuter(m_req, (unsigned __int64)m_dbExec->mod())
150
- .commandExec(nw);
151
+ return connMgrExecuter(m_req, (unsigned __int64)m_dbExec->mod(),
152
+ m_dbExec->m_blobBuffer).commandExec(nw);
151
153
  return m_dbExec->commandExec(m_req, nw);
152
154
  }
153
155
 
@@ -1,7 +1,7 @@
1
1
  #ifndef BZS_DB_PROTOCOL_TDAP_TDAPSCHEMA_H
2
2
  #define BZS_DB_PROTOCOL_TDAP_TDAPSCHEMA_H
3
3
  /* =================================================================
4
- Copyright (C) 2000-2013 BizStation Corp All rights reserved.
4
+ Copyright (C) 2000-2016 BizStation Corp All rights reserved.
5
5
 
6
6
  This program is free software; you can redistribute it and/or
7
7
  modify it under the terms of the GNU General Public License
@@ -900,10 +900,14 @@ private:
900
900
  unsigned int size = f->size;
901
901
  //Copy data size
902
902
  memcpy(dest, &size, sizeByte);
903
- //Copy data
904
- memcpy(blobBlock, f->data(), size);
905
- //Copy data ptr
906
- memcpy(dest + sizeByte, &blobBlock, sizeof(char*));
903
+ //Copy data
904
+ if (size)
905
+ {
906
+ memcpy(blobBlock, f->data(), size);
907
+ //Copy data ptr
908
+ memcpy(dest + sizeByte, &blobBlock, sizeof(char*));
909
+ }else
910
+ memset(dest + sizeByte, 0, sizeof(char*));
907
911
  hd->nextField = (blobField*)f->next();
908
912
  if (fieldNum == hd->fieldCount - 1)
909
913
  ++hd->curRow;
@@ -1,7 +1,7 @@
1
1
  #ifndef BZS_DB_PROTOCOL_TDAP_TDAPCAPI_H
2
2
  #define BZS_DB_PROTOCOL_TDAP_TDAPCAPI_H
3
3
  /* =================================================================
4
- Copyright (C) 2012 2013 BizStation Corp All rights reserved.
4
+ Copyright (C) 2012 2013-2016 BizStation Corp All rights reserved.
5
5
 
6
6
  This program is free software; you can redistribute it and/or
7
7
  modify it under the terms of the GNU General Public License
@@ -201,6 +201,7 @@ typedef void(__STDCALL* WIN_TPOOL_SHUTDOWN_PTR)();
201
201
  #define TD_STSTCS_TABLE_LIST 6
202
202
  #define TD_STSTCS_VIEW_LIST 7
203
203
  #define TD_STSTCS_SLAVE_STATUS 8
204
+ #define TD_STSTCS_STATUS_VARIABLES 9
204
205
 
205
206
  /** connect sub operation
206
207
  */
@@ -607,13 +608,22 @@ struct handshale_t
607
608
  #define TD_VAR_TIMESTAMPMODE 17
608
609
  #define TD_VAR_SIZE 18
609
610
 
611
+ /* server status variables index */
612
+ #define TD_SVAR_TCP_CONNECTIONS 0
613
+ #define TD_SVAR_TCP_WAIT_THREADS 1
614
+ #define TD_SVAR_TPOOL_CONNECTIONS 2
615
+ #define TD_SVAR_TPOOL_WAIT_THREADS 3
616
+ #define TD_SVAR_PIPE_CONNECTIONS 4
617
+ #define TD_SVAR_PIPE_WAIT_THREADS 5
618
+ #define TD_SVAR_OPEN_DBS 6
619
+ #define TD_SVAR_SIZE 7
610
620
  /** @endcond */
611
621
 
612
622
  /* In the case of "tdclcppxxx" library of msvc, The ($TargetName) is not changed automatically.
613
623
  If you change this version then you need change The ($TargetName) project options too.
614
624
  */
615
625
  #define C_INTERFACE_VER_MAJOR "3"//##1 Build marker! Don't remove
616
- #define C_INTERFACE_VER_MINOR "2"//##2 Build marker! Don't remove
626
+ #define C_INTERFACE_VER_MINOR "3"//##2 Build marker! Don't remove
617
627
  #define C_INTERFACE_VER_RELEASE "0"//##3 Build marker! Don't remove
618
628
 
619
629
  /* dnamic load library name.
@@ -677,8 +687,8 @@ struct handshale_t
677
687
  */
678
688
 
679
689
  #define CPP_INTERFACE_VER_MAJOR "3"//##4 Build marker! Don't remove
680
- #define CPP_INTERFACE_VER_MINOR "2"//##5 Build marker! Don't remove
681
- #define CPP_INTERFACE_VER_RELEASE "1"//##6 Build marker! Don't remove
690
+ #define CPP_INTERFACE_VER_MINOR "3"//##5 Build marker! Don't remove
691
+ #define CPP_INTERFACE_VER_RELEASE "0"//##6 Build marker! Don't remove
682
692
 
683
693
  /* use autolink tdclcpp */
684
694
  #if (__BCPLUSPLUS__ || _MSC_VER)
@@ -714,7 +724,7 @@ struct handshale_t
714
724
 
715
725
 
716
726
  #define TRANSACTD_VER_MAJOR 3//##7 Build marker! Don't remove
717
- #define TRANSACTD_VER_MINOR 2//##8 Build marker! Don't remove
727
+ #define TRANSACTD_VER_MINOR 3//##8 Build marker! Don't remove
718
728
  #define TRANSACTD_VER_RELEASE 0//##9 Build marker! Don't remove
719
729
 
720
730
  #endif // BZS_DB_PROTOCOL_TDAP_TDAPCAPI_H
@@ -1,5 +1,5 @@
1
1
  /*=================================================================
2
- Copyright (C) 2013 BizStation Corp All rights reserved.
2
+ Copyright (C) 2013-2016 BizStation Corp All rights reserved.
3
3
 
4
4
  This program is free software; you can redistribute it and/or
5
5
  modify it under the terms of the GNU General Public License
@@ -29,8 +29,12 @@
29
29
  /* implemnts in transactd.cpp */
30
30
  extern const char* get_trd_sys_var(int index);
31
31
 
32
+ /* implemnts in transactd.cpp */
33
+ extern const unsigned int* get_trd_status_var(int index);
32
34
 
33
- extern int getSlaveStatus(THD* thd, bzs::db::transactd::connection::records& recs);
35
+ /* implemnts in mysqlProtocol.cpp */
36
+ extern int getSlaveStatus(THD* thd, bzs::db::transactd::connection::records& recs,
37
+ bzs::db::IblobBuffer* bb);
34
38
 
35
39
  namespace bzs
36
40
  {
@@ -195,6 +199,7 @@ const connection::records& connManager::systemVariables() const
195
199
  m_records.push_back(connection::record());
196
200
  connection::record& rec = m_records[m_records.size() - 1];
197
201
  rec.id = i;
202
+ rec.type = 1;
198
203
  switch(i)
199
204
  {
200
205
  case TD_VER_DB:
@@ -204,13 +209,13 @@ const connection::records& connManager::systemVariables() const
204
209
  case TD_VAR_ISOLATION:
205
210
  case TD_VAR_AUTHTYPE:
206
211
  case TD_VAR_HSLISTENPORT:
207
- strncpy(rec.value, p , 65);
212
+ strncpy(rec.name, p , 65);
208
213
  break;
209
214
  case TD_VER_SERVER:
210
- sprintf_s(rec.value, 65, "%d.%d.%d", TRANSACTD_VER_MAJOR, TRANSACTD_VER_MINOR, TRANSACTD_VER_RELEASE);
215
+ sprintf_s(rec.name, 65, "%d.%d.%d", TRANSACTD_VER_MAJOR, TRANSACTD_VER_MINOR, TRANSACTD_VER_RELEASE);
211
216
  break;
212
217
  default:
213
- _ltoa_s(*((unsigned int*)p), rec.value, 65, 10);
218
+ _ltoa_s(*((unsigned int*)p), rec.name, 65, 10);
214
219
  break;
215
220
  }
216
221
  }
@@ -218,6 +223,25 @@ const connection::records& connManager::systemVariables() const
218
223
  return m_records;
219
224
  }
220
225
 
226
+ const connection::records& connManager::statusVariables() const
227
+ {
228
+ m_records.clear();
229
+ for (int i = 0 ; i < TD_SVAR_SIZE; ++i)
230
+ {
231
+ const unsigned int* p = ::get_trd_status_var(i);
232
+ m_records.push_back(connection::record());
233
+ if (p)
234
+ {
235
+ connection::record& rec = m_records[m_records.size() - 1];
236
+ rec.type = 0;
237
+ rec.id = i;
238
+ rec.longValue = *p;
239
+ }
240
+ }
241
+ return m_records;
242
+ }
243
+
244
+
221
245
  const connection::records& connManager::definedDatabases() const
222
246
  {
223
247
  m_records.clear();
@@ -308,13 +332,13 @@ bool connManager::checkGlobalACL(THD* thd, ulong wantAccess) const
308
332
  cp_security_ctx(thd)->skip_grants();
309
333
  else
310
334
  ::setGrant(thd, mod->host(), mod->user(), NULL);
311
- bool ret = (cp_masterAccess(thd) & wantAccess) != 0;
335
+ bool ret = (cp_masterAccess(thd) & wantAccess) != 0;
312
336
  if (!ret)
313
337
  m_stat = STATUS_ACCESS_DENIED;
314
338
  return ret;
315
339
  }
316
340
 
317
- const connection::records& connManager::readSlaveStatus() const
341
+ const connection::records& connManager::readSlaveStatus(blobBuffer* bb) const
318
342
  {
319
343
  m_records.clear();
320
344
  try
@@ -328,7 +352,7 @@ const connection::records& connManager::readSlaveStatus() const
328
352
  if (!checkGlobalACL(thd.get(), SUPER_ACL | REPL_CLIENT_ACL))
329
353
  return m_records;
330
354
 
331
- m_stat = errorCode(getSlaveStatus(thd.get(), m_records));
355
+ m_stat = errorCode(getSlaveStatus(thd.get(), m_records, bb));
332
356
  }
333
357
  catch (bzs::rtl::exception& e)
334
358
  {
@@ -1,7 +1,7 @@
1
1
  #ifndef BZS_DB_TRANSACTD_CONNMANAGER_H
2
2
  #define BZS_DB_TRANSACTD_CONNMANAGER_H
3
3
  /*=================================================================
4
- Copyright (C) 2013 BizStation Corp All rights reserved.
4
+ Copyright (C) 2013-2016 BizStation Corp All rights reserved.
5
5
 
6
6
  This program is free software; you can redistribute it and/or
7
7
  modify it under the terms of the GNU General Public License
@@ -60,11 +60,12 @@ public:
60
60
  connManager(unsigned __int64 me) : m_me(me), m_stat(0){};
61
61
  virtual ~connManager();
62
62
  const connection::records& systemVariables() const;
63
+ const connection::records& statusVariables() const;
63
64
  const connection::records& getRecords(unsigned __int64 conid, int dbid) const;
64
65
  const connection::records& definedDatabases() const;
65
66
  const connection::records& schemaTables(const char* dbname) const;
66
67
  const connection::records& definedTables(const char* dbname, int type) const;
67
- const connection::records& readSlaveStatus() const;
68
+ const connection::records& readSlaveStatus(blobBuffer* bb) const;
68
69
  void disconnect(unsigned __int64 conid);
69
70
  void disconnectAll();
70
71
  short stat() const {return m_stat;}
@@ -1,7 +1,7 @@
1
1
  #ifndef BZS_DB_TRANSACTD_CONNECTIONRECORD_H
2
2
  #define BZS_DB_TRANSACTD_CONNECTIONRECORD_H
3
3
  /*=================================================================
4
- Copyright (C) 2013 2016 BizStation Corp All rights reserved.
4
+ Copyright (C) 2013-2016 BizStation Corp All rights reserved.
5
5
 
6
6
  This program is free software; you can redistribute it and/or
7
7
  modify it under the terms of the GNU General Public License
@@ -117,7 +117,7 @@ struct record
117
117
  union
118
118
  {
119
119
  __int64 conId; // 8 byte
120
- __int64 longValue;
120
+ __int64 longValue;
121
121
  struct
122
122
  {
123
123
  unsigned int delCount;
@@ -136,11 +136,7 @@ struct record
136
136
  unsigned int type;
137
137
  };
138
138
 
139
- union // 67 byte
140
- {
141
- char name[CON_REC_VALUE_SIZE];
142
- char value[CON_REC_VALUE_SIZE];
143
- };
139
+ char name[CON_REC_VALUE_SIZE]; // 67 byte
144
140
  union
145
141
  {
146
142
  char status; // 1 byte
@@ -155,17 +151,49 @@ struct record
155
151
  char dummy : 2;
156
152
  };
157
153
  };
158
-
154
+
159
155
 
160
156
  #ifdef _UNICODE
161
- inline _TCHAR* nameW(_TCHAR* buf, int size)
157
+ inline const wchar_t* t_name(wchar_t* buf, int size) const
162
158
  {
163
159
  MultiByteToWideChar(CP_UTF8, 0, name, -1, buf, size);
164
160
  return buf;
165
161
  }
162
+ const wchar_t* value(wchar_t* buf, int size) const
163
+ {
164
+ if (type == 0)
165
+ {
166
+ _i64tow_s(longValue, buf, size, 10);
167
+ return buf;
168
+ }else if (type == 1)
169
+ {
170
+ MultiByteToWideChar(CP_UTF8, 0, name, -1, buf, size);
171
+ return buf;
172
+ }
173
+ MultiByteToWideChar(CP_UTF8, 0, (char*)longValue, -1, buf, size);
174
+ return buf;
175
+ }
176
+ #else
177
+ inline const char* t_name(char* /*buf*/, int /*size*/) const
178
+ {
179
+ return name;
180
+ }
181
+ const char* value(char* buf, int size) const
182
+ {
183
+ if (type == 0)
184
+ {
185
+ _i64toa_s(longValue, buf, size, 10);
186
+ return buf;
187
+ }else if (type == 1)
188
+ return name;
189
+ return (char*)longValue;
190
+ }
166
191
  #endif
167
192
  }; // 20 + 68 = 88
193
+
194
+ #ifdef MYSQL_DYNAMIC_PLUGIN
168
195
  typedef std::vector<record> records;
196
+ #endif
169
197
 
170
198
  } // connection
171
199
  } // transactd
@@ -1,5 +1,5 @@
1
1
  /*=================================================================
2
- Copyright (C) 2012 2013 BizStation Corp All rights reserved.
2
+ Copyright (C) 2012-2016 BizStation Corp All rights reserved.
3
3
 
4
4
  This program is free software; you can redistribute it and/or
5
5
  modify it under the terms of the GNU General Public License
@@ -338,14 +338,32 @@ const char* get_trd_sys_var(int index)
338
338
  return NULL;
339
339
  }
340
340
 
341
+
342
+ const unsigned int* get_trd_status_var(int index)
343
+ {
344
+ switch(index)
345
+ {
346
+ case TD_SVAR_TCP_CONNECTIONS:return &cpt::g_connections;
347
+ case TD_SVAR_TCP_WAIT_THREADS:return &cpt::g_waitThread;
348
+ case TD_SVAR_TPOOL_CONNECTIONS:return &tpool::g_connections;
349
+ case TD_SVAR_TPOOL_WAIT_THREADS:return &tpool::server::m_threadPoolSize;
350
+ #ifdef PIPE_SERVER
351
+ case TD_SVAR_PIPE_CONNECTIONS:return &pipe::g_connections;
352
+ case TD_SVAR_PIPE_WAIT_THREADS:return &pipe::g_waitThread;
353
+ #endif
354
+ case TD_SVAR_OPEN_DBS:return &g_openDatabases;
355
+ };
356
+ return NULL;
357
+ }
358
+
341
359
  /** show status struct.
342
360
  */
343
361
  static st_mysql_show_var g_statusVariables[] = {
344
362
  { "trnsctd_tcp_connections", (char*)&cpt::g_connections, SHOW_INT },
345
363
  { "trnsctd_tcp_wait_threads", (char*)&cpt::g_waitThread, SHOW_INT },
346
364
  { "trnsctd_tpool_connections", (char*)&tpool::g_connections, SHOW_INT },
347
- { "trnsctd_tpool_threads", (char*)&tpool::server::m_threadPoolSize,
348
- SHOW_INT },
365
+ { "trnsctd_tpool_threads", (char*)&tpool::server::m_threadPoolSize, SHOW_INT },
366
+
349
367
  #ifdef PIPE_SERVER
350
368
  { "trnsctd_pipe_connections", (char*)&pipe::g_connections, SHOW_INT },
351
369
  { "trnsctd_pipe_wait_threads", (char*)&pipe::g_waitThread, SHOW_INT },
@@ -748,14 +748,25 @@ function testConnMgr(uri)
748
748
  var size = recs.size;
749
749
  mgr.RemoveSystemDb(recs);
750
750
  checkNotEqual(size , recs.size, "RemoveSystemDb recs");
751
+
752
+ //sysvar
753
+ recs = mgr.sysvars();
754
+ checkEqual(mgr.stat , 0, "mgr.sysvars");
755
+ checkEqual(mgr.sysvarName(0) , "database_version", "mgr.sysvarName");
756
+
757
+ //statusvar
758
+ recs = mgr.statusvars();
759
+ checkEqual(mgr.stat , 0, "mgr.statusvars");
760
+ checkEqual(mgr.statusvarName(0) , "tcp_connections", "mgr.statusvarName");
751
761
 
752
762
  //slaveStatus
753
763
  recs = mgr.slaveStatus();
754
764
  checkEqual(mgr.stat , 0, "mgr.slaveStatus");
765
+ checkEqual(mgr.slaveStatusName(0) , "Slave_IO_State", "mgr.slaveStatusName");
755
766
  var status = "";
756
- /*for (var i = 0; i<recs.size; ++i)
757
- status += (mgr.SlaveStatusName(i) + "\t:" + recs(i).value + "\n");
758
- */
767
+ for (var i = 0; i<recs.size; ++i)
768
+ status += (mgr.slaveStatusName(i) + "\t:" + recs(i).value + "\n");
769
+
759
770
  mgr.disconnect();
760
771
  checkEqual(mgr.stat , 0, "mgr.disconnect");
761
772
  WScript.Echo("\n\n" + status);
@@ -1856,11 +1856,13 @@ class transactdTest extends PHPUnit_Framework_TestCase
1856
1856
  $expected_count = $expected_count + 1;
1857
1857
  // estimate count
1858
1858
  $count = $tb->recordCount(true);
1859
- $is_valid_count = (abs($count - $expected_count) < 5000);
1859
+ $this->assertEquals($tb->stat(), 0);
1860
+ $is_valid_count = (abs($count - $expected_count) < 10000);
1860
1861
  $this->assertTrue($is_valid_count);
1861
1862
  if (! $is_valid_count)
1862
1863
  print("true record count = " . $expected_count . " and estimate recordCount count = " . $count);
1863
1864
  $this->assertEquals($tb->recordCount(false), $expected_count); // true count
1865
+ $this->assertEquals($tb->stat(), 0);
1864
1866
  $vv = TEST_COUNT * 3 / 4 + 1;
1865
1867
  $tb->clearBuffer();
1866
1868
  $tb->setFV(FDI_ID, $vv);
@@ -849,12 +849,21 @@ class transactdTest extends PHPUnit_Framework_TestCase
849
849
  $this->assertEquals($mgr->stat(), 0);
850
850
  $this->assertEquals($recs->size(), count($recs));
851
851
  $this->assertNotEquals($recs->size(), $size);
852
- // slaveStatus
852
+ //sysvar
853
+ $recs = $mgr->sysvars();
854
+ $this->assertEquals($mgr->stat(), 0);
855
+ $this->assertEquals(bz\connMgr::sysvarName(0), "database_version");
856
+ //statusvar
857
+ $recs = $mgr->statusvars();
858
+ $this->assertEquals($mgr->stat(), 0);
859
+ $this->assertEquals(bz\connMgr::statusvarName(0), "tcp_connections");
860
+ //slaveStatus
853
861
  $recs = $mgr->slaveStatus();
854
862
  $this->assertEquals($mgr->stat(), 0);
863
+ $this->assertEquals(bz\connMgr::slaveStatusName(0), "Slave_IO_State");
855
864
  for ($i = 0; $i < $recs->size(); $i++)
856
865
  {
857
- echo(PHP_EOL . $mgr->slaveStatusName($i) . "\t:" . $recs[$i]->value);
866
+ echo(PHP_EOL . bz\connMgr::slaveStatusName($i) . "\t:" . $recs[$i]->value);
858
867
  }
859
868
  $mgr->disconnect();
860
869
  $this->assertEquals($mgr->stat(), 0);