transactd 3.8.0 → 3.8.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c0a57f053d27928a7d9c43c519b041409148e84a
4
- data.tar.gz: 3c5ab3051ac77819d4c49b29f99f1f7111bebc90
3
+ metadata.gz: b392f1c4ee8d715502df819a612f65693af6a778
4
+ data.tar.gz: 73977ee53f8147cdb846460e0b365ce23cb488ce
5
5
  SHA512:
6
- metadata.gz: 09912b2aa99f706ee680e34793e4a3760a30544e40f09af573bd3dc832669149d2210d229b453b97a82ec4763602c39cf24e151981c9a9e4d694b3b3e8bed7c7
7
- data.tar.gz: 31fb981b7c2dcbcf3433d0e318fe36680848a9c37c84e24404fb1298ad73ed65720c9727db444ee4daee4ddc14233ff82dc580fa713edbbd67e7fb73fd43a508
6
+ metadata.gz: 2227c267f17c2285fcd3d6652ec46127d1cf8231d18ecd51722cb6207ce0349f706e7a2d9cab5976cd7aa55b90c9a41f935ab91e47cc62a2694eac859590fbb7
7
+ data.tar.gz: 3bd07a60952ad9bd7d46f2fae96b697eafd4a9b33c5537e9061a1f2e4d1f2d474e172d8da0af43a9b17936371593f0d746e5fdb84194adeeb68b0fe41b48ae56
Binary file
Binary file
data/build/tdclc/tdclc.rc CHANGED
@@ -29,8 +29,8 @@
29
29
  //
30
30
 
31
31
  VS_VERSION_INFO VERSIONINFO
32
- FILEVERSION 3,8,0,256
33
- PRODUCTVERSION 3,8,0,256
32
+ FILEVERSION 3,8,2,259
33
+ PRODUCTVERSION 3,8,2,259
34
34
  FILEFLAGSMASK 0x3fL
35
35
  #ifdef _DEBUG
36
36
  FILEFLAGS 0x1L
@@ -47,9 +47,9 @@ BEGIN
47
47
  BEGIN
48
48
  VALUE "CompanyName", "BizStation Corp."
49
49
  VALUE "FileDescription", "Transactd C client"
50
- VALUE "FileVersion", "3.8.0.256"
50
+ VALUE "FileVersion", "3.8.2.259"
51
51
  VALUE "LegalCopyright", "Copyright(C) 2016 BizStation Corp"
52
- VALUE "ProductVersion", "3.8.0.256"
52
+ VALUE "ProductVersion", "3.8.2.259"
53
53
  VALUE "ProductName", "Transactd Client (GPL V2)"
54
54
  END
55
55
  END
@@ -29,8 +29,8 @@
29
29
  //
30
30
 
31
31
  VS_VERSION_INFO VERSIONINFO
32
- FILEVERSION 3,8,0,256
33
- PRODUCTVERSION 3,8,0,256
32
+ FILEVERSION 3,8,2,259
33
+ PRODUCTVERSION 3,8,2,259
34
34
  FILEFLAGSMASK 0x3fL
35
35
  #ifdef _DEBUG
36
36
  FILEFLAGS 0x1L
@@ -47,9 +47,9 @@ BEGIN
47
47
  BEGIN
48
48
  VALUE "CompanyName", "BizStation Corp."
49
49
  VALUE "FileDescription", "Transactd C++ client"
50
- VALUE "FileVersion", "3.8.0.256"
50
+ VALUE "FileVersion", "3.8.2.259"
51
51
  VALUE "LegalCopyright", "Copyright(C) 2016 BizStation Corp"
52
- VALUE "ProductVersion", "3.8.0.256"
52
+ VALUE "ProductVersion", "3.8.2.259"
53
53
  VALUE "ProductName", "Transactd Client (GPL V2)"
54
54
  END
55
55
  END
@@ -29,8 +29,8 @@
29
29
  //
30
30
 
31
31
  VS_VERSION_INFO VERSIONINFO
32
- FILEVERSION 3,8,0,256
33
- PRODUCTVERSION 3,8,0,256
32
+ FILEVERSION 3,8,2,259
33
+ PRODUCTVERSION 3,8,2,259
34
34
  FILEFLAGSMASK 0x3fL
35
35
  #ifdef _DEBUG
36
36
  FILEFLAGS 0x1L
@@ -47,9 +47,9 @@ BEGIN
47
47
  BEGIN
48
48
  VALUE "CompanyName", "BizStation Corp."
49
49
  VALUE "FileDescription", "Transactd Ruby client"
50
- VALUE "FileVersion", "3.8.0.256"
50
+ VALUE "FileVersion", "3.8.2.259"
51
51
  VALUE "LegalCopyright", "Copyright(C) 2016 BizStation Corp"
52
- VALUE "ProductVersion", "3.8.0.256"
52
+ VALUE "ProductVersion", "3.8.2.259"
53
53
  VALUE "ProductName", "Transactd Client (GPL V2)"
54
54
  END
55
55
  END
@@ -1513,10 +1513,7 @@ void table::setRecordFromPacked(const uchar* packedPtr, uint size,
1513
1513
  if (fd->null_bit && nullable)
1514
1514
  {
1515
1515
  isNull = (*null_ptr & null_bit) != 0;
1516
- if (isNull)
1517
- fd->set_null();
1518
- else
1519
- fd->set_notnull();
1516
+
1520
1517
  if (null_bit == (uchar)128)
1521
1518
  {
1522
1519
  ++null_ptr;
@@ -1531,6 +1528,7 @@ void table::setRecordFromPacked(const uchar* packedPtr, uint size,
1531
1528
  {
1532
1529
  if (!isNull)
1533
1530
  {
1531
+ fd->set_notnull();
1534
1532
  int len = fd->pack_length();
1535
1533
  if (isVarType(fd->type()))
1536
1534
  {
@@ -1545,8 +1543,12 @@ void table::setRecordFromPacked(const uchar* packedPtr, uint size,
1545
1543
  memcpy(fd->ptr, p, len);
1546
1544
  p += len;
1547
1545
  size -= len;
1548
- }else
1546
+ }
1547
+ else
1548
+ {
1549
+ fd->set_null();
1549
1550
  memset(fd->ptr, 0, fd->pack_length());
1551
+ }
1550
1552
  }
1551
1553
  }
1552
1554
  if (m_table->s->blob_fields)
@@ -309,7 +309,7 @@ class prepareHandler
309
309
  #define MAX_KEY_SEGMENT 8
310
310
  void makeKeyFieldBitmap(std::bitset<256>& bts, char keynum)
311
311
  {
312
- if (keynum >= 0)
312
+ if (keynum >= 0 && keynum < (int)m_table->s->keys)
313
313
  {
314
314
  const KEY* key = &m_table->key_info[(int)keynum];
315
315
  if (key)
@@ -328,7 +328,7 @@ class prepareHandler
328
328
 
329
329
  void makeKeyFieldBitmap(int keynum)
330
330
  {
331
- if (keynum >= 0)
331
+ if (keynum >= 0 && keynum < (int)m_table->s->keys)
332
332
  {
333
333
  const KEY* key = &m_table->key_info[(int)keynum];
334
334
  if (key)
@@ -1239,6 +1239,8 @@ inline int moveVaileRecord(table* src)
1239
1239
  #define MOVE_TYPE_KEY 0
1240
1240
  #define MOVE_TYPE_NONKEY -1
1241
1241
  #define MOVE_TYPE_MULTI -2
1242
+ #define MOVE_TYPE_MULTI_FIRST_READED -3
1243
+
1242
1244
 
1243
1245
  inline void moveNextRecord(table* src, short keyNum)
1244
1246
  {
@@ -1253,7 +1255,7 @@ inline void moveNextRecord(table* src, short keyNum)
1253
1255
  inline char_td findUniqueKeynum(table* src)
1254
1256
  {
1255
1257
  const tabledef* td = src->tableDef();
1256
- if (td->parentKeyNum != 0xff) return td->parentKeyNum;
1258
+ if (td->primaryKeyNum != 0xff) return td->primaryKeyNum;
1257
1259
  for (int i=0;i<td->keyCount;++i)
1258
1260
  {
1259
1261
  const keydef* kd = &td->keyDefs[i];
@@ -1272,6 +1274,8 @@ inline void moveFirstRecord(table* src, short keyNum)
1272
1274
  }
1273
1275
  else if (keyNum == MOVE_TYPE_NONKEY)
1274
1276
  src->stepFirst();
1277
+ else if (keyNum == MOVE_TYPE_MULTI_FIRST_READED)
1278
+ ;
1275
1279
  else
1276
1280
  {
1277
1281
  query q;
@@ -729,7 +729,7 @@ std::string sqlBuilder::sqlCreateTable(const char* fileName, fileSpec* fs,
729
729
  uchar_td charsetIndexServer, const clsrv_ver* ver)
730
730
  {
731
731
  tabledef table;
732
- memset(&table, 0, sizeof(tabledef));
732
+ table.cleanup();
733
733
  table.setFileNameA(fileName);
734
734
  table.charsetIndex = mysql::charsetIndex(GetACP());
735
735
  table.schemaCodePage = CP_UTF8;
@@ -265,6 +265,12 @@ struct extRequestSeeks
265
265
  #pragma pack(pop)
266
266
  pragma_pop;
267
267
 
268
+
269
+ #define JUDGE_TYPE_NONE 0
270
+ #define JUDGE_TYPE_GT_OR_LE 1
271
+ #define JUDGE_TYPE_EQUAL 2
272
+
273
+
268
274
  class fields;
269
275
  class fieldAdapter
270
276
  {
@@ -295,7 +301,7 @@ public:
295
301
  void reset()
296
302
  {
297
303
  m_keySeg = 0xff;
298
- m_judgeType = 0;
304
+ m_judgeType = JUDGE_TYPE_NONE;
299
305
  m_sizeBytes = 0;
300
306
  m_judge = false;
301
307
  m_matched = false;
@@ -349,7 +355,7 @@ public:
349
355
  m_compFunc = fd->getCompFunc(m_sizeBytes);
350
356
  if (fd->opr == 2)
351
357
  {
352
- m_judgeType = 0;
358
+ m_judgeType = JUDGE_TYPE_NONE;
353
359
  return 0;
354
360
  }
355
361
  if (key)
@@ -373,7 +379,7 @@ public:
373
379
  if (valid && (is_cl_casein == is_srv_casein))
374
380
  {
375
381
  m_keySeg = (unsigned char)segmentIndex + 1;
376
- m_judgeType = (comp == eEqual) ? 2 : 1;
382
+ m_judgeType = (comp == eEqual) ? JUDGE_TYPE_EQUAL : JUDGE_TYPE_GT_OR_LE;
377
383
  }
378
384
  break;
379
385
  }
@@ -504,12 +510,15 @@ public:
504
510
  std::vector<fieldAdapter>::iterator cur = m_fields.begin();
505
511
  std::vector<fieldAdapter>::iterator end = begin + lastIndex;
506
512
  char tmpOpr = (lastIndex != req.logicalCount) ? end->m_fd->opr : 0;
513
+
514
+ // Sort conditions by current Keysegments order.
507
515
  std::sort(begin, end);
516
+
508
517
  bool flag = true;
509
518
  while (cur != end)
510
519
  {
511
520
  const_cast<logicalField*>(cur->m_fd)->opr = 1; // and
512
- if (flag && cur->m_judgeType == 2)
521
+ if (flag && cur->m_judgeType == JUDGE_TYPE_EQUAL && 1 == cur->m_keySeg)
513
522
  cur->m_judge = true;
514
523
  else
515
524
  flag = false;
@@ -517,7 +526,7 @@ public:
517
526
  }
518
527
 
519
528
  // if first logic is first segmnet then first logic can judge.
520
- if ((begin->m_keySeg == 1) && begin->m_judgeType)
529
+ if (begin != end && begin->m_keySeg == 1 && begin->m_judgeType)
521
530
  begin->m_judge = true;
522
531
 
523
532
  if (lastIndex == req.logicalCount)
@@ -670,7 +670,7 @@ struct handshale_t
670
670
  */
671
671
  #define C_INTERFACE_VER_MAJOR "3"//##1 Build marker! Don't remove
672
672
  #define C_INTERFACE_VER_MINOR "8"//##2 Build marker! Don't remove
673
- #define C_INTERFACE_VER_RELEASE "0"//##3 Build marker! Don't remove
673
+ #define C_INTERFACE_VER_RELEASE "2"//##3 Build marker! Don't remove
674
674
 
675
675
  /* dnamic load library name.
676
676
  The default extention of Mac is ".boudle", Therefore ".so" is popular. */
@@ -734,7 +734,7 @@ struct handshale_t
734
734
 
735
735
  #define CPP_INTERFACE_VER_MAJOR "3"//##4 Build marker! Don't remove
736
736
  #define CPP_INTERFACE_VER_MINOR "8"//##5 Build marker! Don't remove
737
- #define CPP_INTERFACE_VER_RELEASE "0"//##6 Build marker! Don't remove
737
+ #define CPP_INTERFACE_VER_RELEASE "2"//##6 Build marker! Don't remove
738
738
 
739
739
  /* use autolink tdclcpp */
740
740
  #if (__BCPLUSPLUS__ || _MSC_VER)
@@ -771,6 +771,6 @@ struct handshale_t
771
771
 
772
772
  #define TRANSACTD_VER_MAJOR 3//##7 Build marker! Don't remove
773
773
  #define TRANSACTD_VER_MINOR 8//##8 Build marker! Don't remove
774
- #define TRANSACTD_VER_RELEASE 0//##9 Build marker! Don't remove
774
+ #define TRANSACTD_VER_RELEASE 2//##9 Build marker! Don't remove
775
775
 
776
776
  #endif // BZS_DB_PROTOCOL_TDAP_TDAPCAPI_H
@@ -3071,7 +3071,7 @@ void testCompTimeStampMa()
3071
3071
  comp1Func compFunc = getCompFunc(ft_mytimestamp, len, eEqual, 0);
3072
3072
  maTimeStamp ld(4, true), rd(4, true);
3073
3073
  ld = _T("1970-01-02 00:00:59.0000"); rd = _T("1970-01-02 00:00:59.0001"); l = ld.getValue(); r = rd.getValue();
3074
- BOOST_CHECK(compFunc((const char*)&l, (const char*)&r, len) == -1);
3074
+ BOOST_CHECK(compFunc((const char*)&l, (const char*)&r, len) < 0);
3075
3075
  ld = _T("1970-01-02 00:00:59.0001"); rd = _T("1970-01-02 00:00:59.0001"); l = ld.getValue(); r = rd.getValue();
3076
3076
  BOOST_CHECK(compFunc((const char*)&l, (const char*)&r, len) == 0);
3077
3077
  ld = _T("1970-01-02 00:00:59.0001"); rd = _T("1970-01-02 00:00:59.0000"); l = ld.getValue(); r = rd.getValue();
@@ -3083,7 +3083,7 @@ void testCompTimeStampMa()
3083
3083
  comp1Func compFunc = getCompFunc(ft_mytimestamp, len, eEqual, 0);
3084
3084
  maTimeStamp ld(5, true), rd(5, true);
3085
3085
  ld = _T("1970-01-02 00:00:59.00001"); rd = _T("1970-01-02 00:00:59.00002"); l = ld.getValue(); r = rd.getValue();
3086
- BOOST_CHECK(compFunc((const char*)&l, (const char*)&r, len) == -1);
3086
+ BOOST_CHECK(compFunc((const char*)&l, (const char*)&r, len) < 0);
3087
3087
  ld = _T("1970-01-02 00:00:59.00001"); rd = _T("1970-01-02 00:00:59.00001"); l = ld.getValue(); r = rd.getValue();
3088
3088
  BOOST_CHECK(compFunc((const char*)&l, (const char*)&r, len) == 0);
3089
3089
  ld = _T("1970-01-02 00:00:59.00001"); rd = _T("1970-01-02 00:00:59.00000"); l = ld.getValue(); r = rd.getValue();
@@ -3094,7 +3094,7 @@ void testCompTimeStampMa()
3094
3094
  comp1Func compFunc = getCompFunc(ft_mytimestamp, len, eEqual, 0);
3095
3095
  maTimeStamp ld(6, true), rd(6, true);
3096
3096
  ld = _T("1970-01-02 01:00:59.999999"); rd = _T("1970-01-02 10:00:59.100001"); l = ld.getValue(); r = rd.getValue();
3097
- BOOST_CHECK(compFunc((const char*)&l, (const char*)&r, len) == -1);
3097
+ BOOST_CHECK(compFunc((const char*)&l, (const char*)&r, len) < 0);
3098
3098
  ld = _T("1970-01-02 00:00:59.000001"); rd = _T("1970-01-02 00:00:59.000001"); l = ld.getValue(); r = rd.getValue();
3099
3099
  BOOST_CHECK(compFunc((const char*)&l, (const char*)&r, len) == 0);
3100
3100
  ld = _T("1970-01-02 10:00:59.000000"); rd = _T("1970-01-02 10:00:58.999999"); l = ld.getValue(); r = rd.getValue();
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: transactd
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.8.0
4
+ version: 3.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - BizStation Corp.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-24 00:00:00.000000000 Z
11
+ date: 2018-02-15 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Transactd client for ruby gem
14
14
  email: transactd@bizstation.jp