transactd 2.2.0-x64-mswin64-100 → 2.3.0-x64-mswin64-100
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/BUILD_UNIX-JA +6 -6
- data/README +20 -18
- data/README-JA +19 -17
- data/RELEASE_NOTE +144 -0
- data/RELEASE_NOTE-JA +153 -0
- data/bin/2.0/transactd.so +0 -0
- data/bin/2.1/transactd.so +0 -0
- data/bin/2.2/transactd.so +0 -0
- data/bin/common/tdclc_64_2_3.dll +0 -0
- data/bin/common/tdclcpp_vc100_64mr_2_3.dll +0 -0
- data/source/bzs/test/tdclrb/transactd_blob_spec.rb +26 -8
- data/source/bzs/test/tdclrb/transactd_kanjischema_spec.rb +13 -6
- data/source/bzs/test/tdclrb/transactd_pool_spec.rb +14 -8
- data/source/bzs/test/tdclrb/transactd_spec.rb +117 -27
- data/transactd.gemspec +1 -1
- metadata +7 -4
- data/bin/common/tdclc_64_2_2.dll +0 -0
- data/bin/common/tdclcpp_vc100_64mr_2_2.dll +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2596599aadfe558a491cd8bcea56206e28ddb1f2
|
4
|
+
data.tar.gz: f3704841763dcfb833e9d6b5913951520372da46
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ec1375332babdf6c237adf478f71eb6102b6f5e19134b2267b972e02f639af6016068921624d95caa6e55ed466e566555aed36365fa5b6d025ff282007fb93f
|
7
|
+
data.tar.gz: 87260cf2b803c11188d0a46e091bbbfb80df039482babb1c0c0a025d82e1da85fb22ceb1c3af0488246938455bf8b7b402d3e7b52eddf79ea02ac35a48edc38b
|
data/BUILD_UNIX-JA
CHANGED
@@ -73,10 +73,10 @@ tar xzf mysql-5.6.20.tar.gz
|
|
73
73
|
pluginディレクトリに展開します。
|
74
74
|
```
|
75
75
|
cd ~
|
76
|
-
wget http://www.bizstation.jp/al/transactd/download/transactd-2.
|
76
|
+
wget http://www.bizstation.jp/al/transactd/download/transactd-2.3.0/transactd-source-2.3.0.zip
|
77
77
|
#Mac OS Xでは
|
78
|
-
#curl -O http://www.bizstation.jp/al/transactd/download/transactd-2.
|
79
|
-
unzip -q transactd-source-2.
|
78
|
+
#curl -O http://www.bizstation.jp/al/transactd/download/transactd-2.3.0/transactd-source-2.3.0.zip
|
79
|
+
unzip -q transactd-source-2.3.0.zip -d transactd
|
80
80
|
mv transactd ~/mysql-5.6.20/plugin/
|
81
81
|
```
|
82
82
|
|
@@ -121,10 +121,10 @@ make install
|
|
121
121
|
からソースコードをダウンロードします。
|
122
122
|
```
|
123
123
|
cd ~
|
124
|
-
wget http://www.bizstation.jp/al/transactd/download/transactd-2.
|
124
|
+
wget http://www.bizstation.jp/al/transactd/download/transactd-2.3.0/transactd-source-2.3.0.zip
|
125
125
|
#Mac OS Xでは
|
126
|
-
#curl curl -O http://www.bizstation.jp/al/transactd/download/transactd-2.
|
127
|
-
unzip -q transactd-source-2.
|
126
|
+
#curl curl -O http://www.bizstation.jp/al/transactd/download/transactd-2.3.0/transactd-source-2.3.0.zip
|
127
|
+
unzip -q transactd-source-2.3.0.zip -d transactd
|
128
128
|
```
|
129
129
|
|
130
130
|
### 5-2 CMakeの実行
|
data/README
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Transactd
|
1
|
+
Transactd readme
|
2
2
|
===============================================================================
|
3
3
|
Transactd is plugin which adds NoSQL access to MySQL/MariaDB.
|
4
4
|
|
@@ -27,7 +27,9 @@ Introduction
|
|
27
27
|
Transactd consists of the server side plugin and the client side modules.
|
28
28
|
The server side plugin is called "Transactd Plugin" and the client side module
|
29
29
|
is called "Transactd clients".
|
30
|
-
|
30
|
+
Transactd has been constantly updated. This text has also been updated with the
|
31
|
+
latest information in this release. Please refer to the RELEASE_NOTE.md the
|
32
|
+
changes in this release.
|
31
33
|
|
32
34
|
|
33
35
|
Preparation of Transactd Plugin binary
|
@@ -45,13 +47,13 @@ mysql>show variables like 'version';
|
|
45
47
|
```
|
46
48
|
The names of file to download are formed under following rules:
|
47
49
|
|
48
|
-
* Windows - transactd-[platform]-2.
|
49
|
-
* Linux - transactd-linux-x86_64-2.
|
50
|
+
* Windows - transactd-[platform]-2.3.0_[mysql-version].zip
|
51
|
+
* Linux - transactd-linux-x86_64-2.3.0_[mysql-version].tar.gz
|
50
52
|
|
51
53
|
[platform] is win32 or win64, [mysql-version] is mysql-5.x.x or mariadb-5.5.x.
|
52
54
|
For example, the URL for Linux-x86_64bit mysql-5.6.14 is as follows:
|
53
55
|
|
54
|
-
http://www.bizstation.jp/al/transactd/download/transactd-2.
|
56
|
+
http://www.bizstation.jp/al/transactd/download/transactd-2.3.0/transactd-linux-x86_64-2.3.0_mysql-5.6.14.tar.gz
|
55
57
|
|
56
58
|
You also can download source code archive and build from it.
|
57
59
|
In this case, the source code of MySQL/MariaDB is also required.
|
@@ -98,8 +100,8 @@ administrator authority.
|
|
98
100
|
|
99
101
|
2. Extract the tar.gz file and move into it.
|
100
102
|
```
|
101
|
-
tar zxf transactd-linux-x86_64-2.
|
102
|
-
cd transactd-linux-x86_64-2.
|
103
|
+
tar zxf transactd-linux-x86_64-2.3.0_mysql-5.6.14.tar.gz
|
104
|
+
cd transactd-linux-x86_64-2.3.0_mysql-5.6.14
|
103
105
|
```
|
104
106
|
|
105
107
|
3. Copy libtransactd.so to `[MySQL|MariaDB installed directory]/lib/plugin`.
|
@@ -130,13 +132,13 @@ The Transactd clients are required to access data through Transactd Plugin.
|
|
130
132
|
Download the Transactd client binaries for your platform.
|
131
133
|
The names of file to download are formed under following rules:
|
132
134
|
|
133
|
-
* Windows - transactd-client-[platform]_with_sdk-2.
|
134
|
-
* Linux - transactd-client-linux-x86_64_with_sdk-2.
|
135
|
+
* Windows - transactd-client-[platform]_with_sdk-2.3.0.zip
|
136
|
+
* Linux - transactd-client-linux-x86_64_with_sdk-2.3.0.tar.gz
|
135
137
|
|
136
138
|
[platform] is win32 or win64.
|
137
139
|
For example, the URL for Linux-x86_64bit is as follows:
|
138
140
|
|
139
|
-
http://www.bizstation.jp/al/transactd/download/transactd-client/transactd-client-linux-x86_64_with_sdk-2.
|
141
|
+
http://www.bizstation.jp/al/transactd/download/transactd-client/transactd-client-linux-x86_64_with_sdk-2.3.0.tar.gz
|
140
142
|
|
141
143
|
|
142
144
|
|
@@ -144,11 +146,11 @@ Installing Transactd clients
|
|
144
146
|
-------------------------------------------------------------------------------
|
145
147
|
|
146
148
|
### Installing on Windows
|
147
|
-
1. Open transactd-client-[platform]_with_sdk-2.
|
148
|
-
2. Select the root folder transactd-client-[platform]-with_sdk-2.
|
149
|
+
1. Open transactd-client-[platform]_with_sdk-2.3.0.zip from explorer.
|
150
|
+
2. Select the root folder transactd-client-[platform]-with_sdk-2.3.0 and
|
149
151
|
copy to a folder of your choice.
|
150
|
-
3. Run the "install.cmd" in the transactd-client-[platform]_with_sdk-2.
|
151
|
-
This command adds "transactd-client-[platform]_with_sdk-2.
|
152
|
+
3. Run the "install.cmd" in the transactd-client-[platform]_with_sdk-2.3.0 folder.
|
153
|
+
This command adds "transactd-client-[platform]_with_sdk-2.3.0\bin" folder to
|
152
154
|
the system environment variables "PATH".
|
153
155
|
|
154
156
|
C++ clients contains the following three files which is placed in bin folder.
|
@@ -178,8 +180,8 @@ There are binaries which is compiled with following 7 compilers:
|
|
178
180
|
|
179
181
|
2. Extract the tar.gz file and move into it.
|
180
182
|
```
|
181
|
-
tar zxf transactd-client-linux-x86_64_with_sdk-2.
|
182
|
-
cd transactd-client-linux-x86_64_with_sdk-2.
|
183
|
+
tar zxf transactd-client-linux-x86_64_with_sdk-2.3.0.tar.gz
|
184
|
+
cd transactd-client-linux-x86_64_with_sdk-2.3.0
|
183
185
|
```
|
184
186
|
|
185
187
|
3. Run the install script.
|
@@ -249,7 +251,7 @@ Test script executes the tests in following order:
|
|
249
251
|
### Executing on Windows
|
250
252
|
1. Move to the client directory.
|
251
253
|
```
|
252
|
-
cd transactd-client-[platform]_with_sdk-2.
|
254
|
+
cd transactd-client-[platform]_with_sdk-2.3.0
|
253
255
|
```
|
254
256
|
|
255
257
|
2. run test:
|
@@ -277,7 +279,7 @@ Test script executes the tests in following order:
|
|
277
279
|
### Executing on Linux
|
278
280
|
1. Move to the client directory.
|
279
281
|
```
|
280
|
-
cd transactd-client-linux-x86_64_with_sdk-2.
|
282
|
+
cd transactd-client-linux-x86_64_with_sdk-2.3.0
|
281
283
|
```
|
282
284
|
|
283
285
|
2. run test:
|
data/README-JA
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Transactd
|
1
|
+
Transactd Readme
|
2
2
|
===============================================================================
|
3
3
|
Transactd PluginはMySQL/MariaDBにNoSQLアクセスを追加するプラグインです。
|
4
4
|
|
@@ -28,6 +28,8 @@ Transactdはプラグインとして動作するサーバー側モジュール
|
|
28
28
|
るクライアント側モジュールから構成されます。
|
29
29
|
以降はこれらを区別して、サーバー側をTransactd Plugin、クライアント側をTransactd
|
30
30
|
クライアントと呼びます。
|
31
|
+
Transactdは、常に更新されています。このテキストもこのリリースの最新の情報に更新
|
32
|
+
されています。今回のリリースでの変更点は RELEASE_NOTE-JA.mdを参照してください。
|
31
33
|
|
32
34
|
|
33
35
|
|
@@ -45,14 +47,14 @@ show variables like 'version';
|
|
45
47
|
```
|
46
48
|
ダウンロードするファイルは
|
47
49
|
|
48
|
-
* Windowsの場合 transactd-[platform]-2.
|
49
|
-
* Linuxの場合 transactd-linux-x86_64-2.
|
50
|
+
* Windowsの場合 transactd-[platform]-2.3.0_[mysql-version].zip
|
51
|
+
* Linuxの場合 transactd-linux-x86_64-2.3.0_[mysql-version].tar.gz
|
50
52
|
|
51
53
|
といった形式です。
|
52
54
|
[platform]はwin32またはwin64、[mysql-version]はmysql-5.x.xまたはmariadb-5.5.xです。
|
53
55
|
たとえば、Linux-x86_64bit mysql-5.6.14用の完全なURLは以下の通りです。
|
54
56
|
|
55
|
-
http://www.bizstation.jp/al/transactd/download/transactd-2.
|
57
|
+
http://www.bizstation.jp/al/transactd/download/transactd-2.3.0/transactd-linux-x86_64-2.3.0_mysql-5.6.14.tar.gz
|
56
58
|
|
57
59
|
また、ソースをダウンロードしてビルドすることもできます。その場合は、
|
58
60
|
MySQL/MariaDBのソースコードも必要です。ビルド方法はソースコード内の
|
@@ -97,8 +99,8 @@ MySQL/MariaDBのバイナリに変更を加えることなく、所定の位置
|
|
97
99
|
|
98
100
|
2. ダウンロードしたtar.gzを解凍し、解凍したフォルダに移動します。
|
99
101
|
```
|
100
|
-
tar zxf transactd-linux-x86_64-2.
|
101
|
-
cd transactd-linux-x86_64-2.
|
102
|
+
tar zxf transactd-linux-x86_64-2.3.0_mysql-5.6.14.tar.gz
|
103
|
+
cd transactd-linux-x86_64-2.3.0_mysql-5.6.14
|
102
104
|
```
|
103
105
|
|
104
106
|
3. [MySQL|MariaDBインストールフォルダ]/lib/pluginに、libtransactd.soをコピー
|
@@ -129,13 +131,13 @@ Transactd Pluginを介してデータにアクセスするにはTransactdクラ
|
|
129
131
|
プラットフォームに合ったビルド済Transactdクライアントをダウンロードします。
|
130
132
|
ダウンロードするファイルは
|
131
133
|
|
132
|
-
* Windowsの場合 transactd-client-[platform]_with_sdk-2.
|
133
|
-
* Linuxの場合 transactd-client-linux-x86_64_with_sdk-2.
|
134
|
+
* Windowsの場合 transactd-client-[platform]_with_sdk-2.3.0.zip
|
135
|
+
* Linuxの場合 transactd-client-linux-x86_64_with_sdk-2.3.0.tar.gz
|
134
136
|
|
135
137
|
といった形式です。[platform]はwin32またはwin64です。
|
136
138
|
たとえば、LINUXの完全なURLは以下の通りです。
|
137
139
|
|
138
|
-
http://www.bizstation.jp/al/transactd/download/transactd-client/transactd-client-linux-x86_64_with_sdk-2.
|
140
|
+
http://www.bizstation.jp/al/transactd/download/transactd-client/transactd-client-linux-x86_64_with_sdk-2.3.0.tar.gz
|
139
141
|
|
140
142
|
|
141
143
|
|
@@ -143,11 +145,11 @@ Transactdクライアントのインストール
|
|
143
145
|
-------------------------------------------------------------------------------
|
144
146
|
|
145
147
|
### Windowsでのインストール
|
146
|
-
1. ダウンロードしたtransactd-client-[platform]_with_sdk-2.
|
147
|
-
2. ルートフォルダーのtransactd-client-[platform]_with_sdk-2.
|
148
|
+
1. ダウンロードしたtransactd-client-[platform]_with_sdk-2.3.0.zipを開きます。
|
149
|
+
2. ルートフォルダーのtransactd-client-[platform]_with_sdk-2.3.0ごと適当なフォルダに
|
148
150
|
コピーします。
|
149
|
-
3. transactd-client-[platform]_with_sdk-2.
|
150
|
-
これによりtransactd-client-[platform]_with_sdk-2.
|
151
|
+
3. transactd-client-[platform]_with_sdk-2.3.0直下にあるinstall.cmdを実行します。
|
152
|
+
これによりtransactd-client-[platform]_with_sdk-2.3.0\binフォルダをシステム環境変数
|
151
153
|
PATHに追加します。
|
152
154
|
|
153
155
|
C++クライアントは binフォルダに配置された以下の3つのDLLからなります。
|
@@ -176,8 +178,8 @@ C++クライアントは binフォルダに配置された以下の3つのDLL
|
|
176
178
|
|
177
179
|
2. ダウンロードしたtar.gzを解凍し、解凍したフォルダに移動します。
|
178
180
|
```
|
179
|
-
tar zxf transactd-client-linux-x86_64_with_sdk-2.
|
180
|
-
cd transactd-client-linux-x86_64_with_sdk-2.
|
181
|
+
tar zxf transactd-client-linux-x86_64_with_sdk-2.3.0.tar.gz
|
182
|
+
cd transactd-client-linux-x86_64_with_sdk-2.3.0
|
181
183
|
```
|
182
184
|
|
183
185
|
3. インストールスクリプトを実行します。
|
@@ -252,7 +254,7 @@ Transactd Pluginとクライアントのインストールが済んだら、テ
|
|
252
254
|
### Windowsでの起動
|
253
255
|
1. クライアントのインストールで解凍したフォルダに移動します
|
254
256
|
```
|
255
|
-
cd transactd-client-[platform]_with_sdk-2.
|
257
|
+
cd transactd-client-[platform]_with_sdk-2.3.0
|
256
258
|
```
|
257
259
|
|
258
260
|
2. テストの起動
|
@@ -279,7 +281,7 @@ Transactd Pluginとクライアントのインストールが済んだら、テ
|
|
279
281
|
### Linuxでの起動
|
280
282
|
1. クライアントのインストールで解凍したフォルダに移動します
|
281
283
|
```
|
282
|
-
cd transactd-client-linux-x86_64_with_sdk-2.
|
284
|
+
cd transactd-client-linux-x86_64_with_sdk-2.3.0
|
283
285
|
```
|
284
286
|
|
285
287
|
2. テストの起動
|
data/RELEASE_NOTE
ADDED
@@ -0,0 +1,144 @@
|
|
1
|
+
Release note
|
2
|
+
|
3
|
+
================================================================================
|
4
|
+
Version 2.3.0 2015-03-20
|
5
|
+
================================================================================
|
6
|
+
|
7
|
+
Upgrade Notes
|
8
|
+
--------------------------------------------------------------------------------
|
9
|
+
* Compatibility between server plugin and clients.
|
10
|
+
You have to upgrade both of the server plugin and client libraries.
|
11
|
+
The protocol that is used communicating between server and client were changed
|
12
|
+
for database::reconnect() method. This version of server plugin and clients
|
13
|
+
has no compatibility with the past versions of them.
|
14
|
+
If you access to 2.2 or earlier version of server plugin with this version of
|
15
|
+
clients, error code SERVER_CLIENT_NOT_COMPATIBLE (3003) will be returned.
|
16
|
+
|
17
|
+
* Some methods were moved.
|
18
|
+
table::usePadChar() and table:: trimPadChar() were moved to fielddef structure.
|
19
|
+
The setter methods of them were put together to setPadCharSettings(bool set,
|
20
|
+
bool trim). By this change, these values can be saved to the schema.
|
21
|
+
This affects to the field types ft_string, ft_wstring, ft_mychar and ft_mywchar.
|
22
|
+
Other field types are not affected.
|
23
|
+
The default value of table::usePadChar() and trimPadChar() are true. If you did
|
24
|
+
not change this value, there is no changes on program behavior.
|
25
|
+
If you changed the values, you have to fix program code.
|
26
|
+
|
27
|
+
For example, the code `tb->setUsePadChar(false);` has to be modified like this:
|
28
|
+
```
|
29
|
+
for (int i = 0 ; i < tb->tableDef()->fieldCount ; ++i)
|
30
|
+
{
|
31
|
+
fielddef* fd = const_cast<fielddef*>(&tb->tableDef()->fieldDefs[i]);
|
32
|
+
fd->setPadCharSettings(false/*set*/, true/*trim*/);
|
33
|
+
}
|
34
|
+
```
|
35
|
+
Note: Changes in this code are volatile, and not saved on schema. Add updating
|
36
|
+
schema code if you need.
|
37
|
+
|
38
|
+
* openTable in transaction.
|
39
|
+
The error code STATUS_ALREADY_INTRANSACTION is added. If openTable is called
|
40
|
+
in transaction, and binary log is enable, the server returns this error.
|
41
|
+
The binary log was supported until now, but there was the problem that if
|
42
|
+
openTable is called in transaction the binlog map will not be generated and
|
43
|
+
replication does not go well. So that, we modified the server plugin to return
|
44
|
+
error if openTable is called in transaction with enable binary log. There is
|
45
|
+
no changes if binary log is disabled.
|
46
|
+
|
47
|
+
New Features
|
48
|
+
--------------------------------------------------------------------------------
|
49
|
+
* Add bias parameter ROW_LOCK_S to seek and step read operations in
|
50
|
+
MULTILOCK_READ_COMMITED transaction.
|
51
|
+
By this, you can control lock in more detail with using shared lock.
|
52
|
+
|
53
|
+
* Add limit option to finish searching to table query with queryBase.
|
54
|
+
In the past, the value of limit option meant that max number of records which
|
55
|
+
will be got with one operation. The clients automatically called read operation
|
56
|
+
many times until the other finish conditions are met. In effect, limit was the
|
57
|
+
option that save receive buffer.
|
58
|
+
If you set true to queryBase::stopAtLimit(), the limit option behaves as finish
|
59
|
+
condition. The default value is false, and it is same as the past behavior.
|
60
|
+
|
61
|
+
* Add findContinue to enum eFindType for table::find(eFindType type).
|
62
|
+
If the last find operation has been finished because of the filter conditions
|
63
|
+
maxRecord or rejectCount, it is able to continue searching from next record
|
64
|
+
with findContinue.
|
65
|
+
To check the cause of finishing the last operation, table::statReasonOfFind()
|
66
|
+
and table::lastFindDirection() which return more detail status were added.
|
67
|
+
|
68
|
+
* Add ActiveTable::readMore(). It is same as above findContinue for ActiveTable.
|
69
|
+
|
70
|
+
* Add first and last method to recordset grouping functions. These methods
|
71
|
+
return first or last record in each group. Strings and numbers are supported.
|
72
|
+
These methods are useful when use non-normalized field values to avoid JOIN
|
73
|
+
for some reason.
|
74
|
+
|
75
|
+
* Add case-insensitive comparison operator to filter and query.
|
76
|
+
To compare strings without case sensitivity, add "i" after the normal
|
77
|
+
comparison operators.
|
78
|
+
|
79
|
+
* Case-sensitive: =, >, < , >=, <=, <>
|
80
|
+
* Case-insensitive: =i, >i, <i, >=i, <=i, <>i
|
81
|
+
|
82
|
+
When the comparison field is same as the index field which is using, setting
|
83
|
+
case sensitivity same as field definition makes performance better. If case
|
84
|
+
sensitivities are different between them, optimization with the indexes is
|
85
|
+
disable and full scan will be needed.
|
86
|
+
|
87
|
+
* Add database::reconnect() which is used to reconnect to database. You can
|
88
|
+
reconnect to database with this method even if server process has been
|
89
|
+
restarted unexpectedly.
|
90
|
+
The reconnection contains reopening tables, recovering cursor positions and
|
91
|
+
record locks. Transactions which have not been commited yet will not be
|
92
|
+
recovered. You have to run it again.
|
93
|
+
There is no way to change the reconnect address at present, but tdclc will
|
94
|
+
support it in the future.
|
95
|
+
|
96
|
+
* Add field types ft_wstring, ft_wzstring, ft_myvarbinary and ft_mywvarbinary
|
97
|
+
to fielddef::lenByCharnum(). You can specify field length with number of
|
98
|
+
characters.
|
99
|
+
|
100
|
+
* Add connectTimeout and netTimeout to client setting file (transactd.ini or
|
101
|
+
transactd.cnf). The default values are following:
|
102
|
+
|
103
|
+
connectTimeout = 20
|
104
|
+
netTimeout = 180
|
105
|
+
|
106
|
+
connectTimeout means timeout seconds for connection. netTimeout means timeout
|
107
|
+
seconds for waiting response from server in a operation.
|
108
|
+
|
109
|
+
* The implementation of TCP reading and writing methods in tdclc were changed to
|
110
|
+
OS native from boost library. It makes performance better and enable timeout
|
111
|
+
settings.
|
112
|
+
|
113
|
+
Other Modifications
|
114
|
+
--------------------------------------------------------------------------------
|
115
|
+
* Fix a bug that filter works wrong for fixed-length string fields.
|
116
|
+
|
117
|
+
* Fix a bug that sortFields and sortField are not in PHP and Ruby interface.
|
118
|
+
|
119
|
+
* Fix a bug that Recordset::UnionRecordset() is not in ActiveX interface.
|
120
|
+
|
121
|
+
* Fix a bug that the server will crash when set invalid key number to table::find
|
122
|
+
operations.
|
123
|
+
|
124
|
+
* Fix a bug that when the table is locked by LOCK TABLES SQL command, after a
|
125
|
+
transaction with writing failed, an unlock row error will occur in retrying.
|
126
|
+
|
127
|
+
* Fix a access violation that occurs in releasing database object in ActiveX
|
128
|
+
interface depending on table releasing order.
|
129
|
+
|
130
|
+
* Fix a problem that "localhost" alias cannot be used without DNS.
|
131
|
+
|
132
|
+
* Fix a bug that i64() method always returns 0 on ft_float field.
|
133
|
+
|
134
|
+
* Fix a bug that field::getFVbin() and table::getFVbin() methods can not read
|
135
|
+
values on ft_string and ft_wstring fields.
|
136
|
+
|
137
|
+
* Fix a bug that the default values of size of shared memory on Windows pipe
|
138
|
+
connection are different between server and clients.
|
139
|
+
|
140
|
+
* Fix a bug that a invalid pointer will be returned when activeTable and query
|
141
|
+
reads ft_text or ft_blob fields without "select fields" filter.
|
142
|
+
|
143
|
+
* The source codes of Transactd plugin supports MySQL 5.7.6.
|
144
|
+
(Build-scripts do not support it yet. Have to fix cmake scripts to build.)
|
data/RELEASE_NOTE-JA
ADDED
@@ -0,0 +1,153 @@
|
|
1
|
+
リリースノート
|
2
|
+
|
3
|
+
================================================================================
|
4
|
+
Version 2.3.0 2015/03/20
|
5
|
+
================================================================================
|
6
|
+
|
7
|
+
バージョンアップ上の注意点
|
8
|
+
--------------------------------------------------------------------------------
|
9
|
+
・サーバー クライアントのバージョン互換性
|
10
|
+
バージョンアップはサーバーとクライアントともに行う必要があります。
|
11
|
+
database::reconnect()の実装のために、クラインアント サーバー間の通信プロトコ
|
12
|
+
ルが変更されました。このため、このバージョンのプラグインとクライアントは過去
|
13
|
+
のバージョンと互換性がありません。
|
14
|
+
新しいクライアントでバージョン2.2以前のサーバーにアクセスすると、
|
15
|
+
SERVER_CLIENT_NOT_COMPATIBLE (3003) エラーが返ります。
|
16
|
+
|
17
|
+
・メソッドの移動
|
18
|
+
table::usePadChar()とtable::trimPadChar()関数はfielddef構造体に移動しました。
|
19
|
+
また、値の設定は、それぞれ別にあった関数が、
|
20
|
+
setPadCharSettings(bool set, bool trim)にまとめられました。これによって、これ
|
21
|
+
らの値をスキーマに保存できるようになりました。
|
22
|
+
この変更は、フィールド型がft_string ft_wstring ft_mychar ft_mywcharにのみ影響
|
23
|
+
があります。それ以外の型には影響ありません。
|
24
|
+
table::usePadChar()とtrimPadChar()の返す値はどちらもデフォルトでtrueでしたが
|
25
|
+
この設定をコードで変更していなければ動作に変更はありません。
|
26
|
+
変更していた場合は、そのテーブルの上記フィールド型を持つフィールドに対して設定
|
27
|
+
を行うようコードの修正が必要です。
|
28
|
+
|
29
|
+
たとえば、tb->setUsePadChar(false)としていた場合、
|
30
|
+
```
|
31
|
+
for (int i = 0 ; i < tb->tableDef()->fieldCount ; ++i)
|
32
|
+
{
|
33
|
+
fielddef* fd = const_cast<fielddef*>(&tb->tableDef()->fieldDefs[i]);
|
34
|
+
fd->setPadCharSettings(false/*set*/, true/*trim*/);
|
35
|
+
}
|
36
|
+
```
|
37
|
+
とします。
|
38
|
+
ただし、このコードは、揮発性でスキーマには保存されていません。必要に応じて保存する
|
39
|
+
コードを追加してください。
|
40
|
+
|
41
|
+
・トランザクション中のテーブルオープン
|
42
|
+
バイナリーログが有効で、トランザクション中にテーブルをオープンすると
|
43
|
+
STATUS_ALREADY_INTRANSACTIONエラーを返すようになりました。
|
44
|
+
従来よりバイナリーログはサポートされていましたが、トランザクション中にテーブル
|
45
|
+
をオープンすると、そのテーブルに対するbinlogマップが生成されず、正しくレプリケ
|
46
|
+
ーションできない問題がありました。そのため、バイナリーログが有効な場合、トラン
|
47
|
+
ザクション中のテーブルオープンはエラーになるようにしました。
|
48
|
+
バイナリーログが無効な場合は、動作に変更はありません。
|
49
|
+
|
50
|
+
新機能
|
51
|
+
--------------------------------------------------------------------------------
|
52
|
+
・MULTILOCK_READ_COMMITEDのトランザクション中のseek step系の読み取りオペレーショ
|
53
|
+
ンのbiasパラメータにROW_LOCK_Sを指定可能にしました。
|
54
|
+
これにより、MULTILOCK_READ_COMMITEDでも、よりロック競合の少ない共有ロックを使用
|
55
|
+
した細かなロック制御が可能です。
|
56
|
+
|
57
|
+
・queryBaseクラスを使ったテーブルクエリーで、limitで設定した値で検索を終了する設
|
58
|
+
定を可能にしました。
|
59
|
+
従来、limitの値は一回のオペレーションで取得するレコードの最大値を示し、クライア
|
60
|
+
ント側でlimit以外の終了条件を満たすまで自動で繰り返し取得オペレーションが行われ
|
61
|
+
ていました。事実上limitは受信データバッファを節約するためだけのものでした。
|
62
|
+
新しく加えた、queryBase::stopAtLimit()関数にtrueをセットすることで、マッチした
|
63
|
+
レコードがlimitに達するとそこで検索を終了できます。
|
64
|
+
デフォルトのfalseの場合の動作は従来と同様です。
|
65
|
+
|
66
|
+
・table::find(eFindType type)で使用されるeFindTypeにfindContinueが追加されました。
|
67
|
+
直前のfind系オペレーションが、フィルター条件のmaxRecordまたはrejectCount
|
68
|
+
によって終了した場合、findContinueを指定すると、その続きから同じ条件で検索を続
|
69
|
+
けることができます。また、直前のfind系オペレーションがそのような条件で終了した
|
70
|
+
かどうかを調べるために、より詳しいステータスを示すtable::statReasonOfFind()と
|
71
|
+
table::lastFindDirection()メソッドが追加されました。
|
72
|
+
|
73
|
+
・ActiveTableにreadMore()メソッドが追加されました。これは上記、findContinueの
|
74
|
+
ActiveTable実装です。
|
75
|
+
|
76
|
+
・recordsetのグルーピング関数に、firstとlast関数が追加されました。これらは、各グ
|
77
|
+
ループの最初または最後のレコードのフィールド値をそのまま返します。
|
78
|
+
値は、数値と文字列の双方をサポートします。
|
79
|
+
これを使用すると非正規化されたフィールドの値を用いてidなどに対する説明のフィー
|
80
|
+
ルドの値をそのまま利用し、JOINを不要にしたりすることができます。
|
81
|
+
|
82
|
+
・フィルターとクエリーの比較演算子に、大文字/小文字を区別しない
|
83
|
+
(case-insensitive)比較の指定ができるようになりました。
|
84
|
+
文字列において大文字/小文字の区別なしに比較するには、従来の6種類の演算子
|
85
|
+
( =, >, < , >= ,<= ,<> ) の後ろにi(アイ)を付加します。
|
86
|
+
( =i, >i, <i , >=i ,<=i ,<>i )
|
87
|
+
|
88
|
+
テーブルのフィルターにおいて、比較対象フィールドが、使用するインデックスのフィ
|
89
|
+
ールドの時は、大文字/小文字区別の指定をテーブル作成時のフィールド定義と同じに
|
90
|
+
するとパフォーマンスが良くなります。異なるとインデックスによる読み取り範囲の最
|
91
|
+
適化が行えずフルスキャンを行う必要が出てきます。
|
92
|
+
|
93
|
+
・ネットワーク接続の再接続コマンド、database::reconnect()が追加されました。不意
|
94
|
+
にサーバープロセスが再起動された場合でも、このメソッドによって 再接続が可能に
|
95
|
+
なりました。再接続は、開いていたテーブルの再オープン、カーソル位置の復元、レ
|
96
|
+
コードロックの復元が行われます。ネットワーク接続の切断時に実行中だったトランザ
|
97
|
+
クションは復元されません。再度実行する必要があります。
|
98
|
+
現在のところ、再接続先の変更は行えません。将来的にはtdclcライブラリ内で接続先の
|
99
|
+
変更がサポートされる予定です。
|
100
|
+
|
101
|
+
・fielddef::lenByCharnum()メソッドは従来、ft_mychar ft_myvarcharのみのサポートで
|
102
|
+
したが、加えてft_wstring ft_wzstring ft_myvarbinary ft_mywvarbinaryもサポート
|
103
|
+
されました。これらのフィールド型の場合も文字数で長さを指定できます。
|
104
|
+
|
105
|
+
・クライアントの設定ファイル(transactd.iniまたはtransactd.cnf)で、connectTimeout
|
106
|
+
とnetTimeoutが追加されました。何も設定しない場合のデフォルト値はそれぞれ以下の
|
107
|
+
通りです。
|
108
|
+
|
109
|
+
connectTimeout = 20
|
110
|
+
netTimeout = 180
|
111
|
+
|
112
|
+
connectTimeoutは接続時のタイムアウト(秒)です。netTimeoutは、オペレーション実行
|
113
|
+
時に、サーバーから応答が返るまでのタイムアウト(秒)です。
|
114
|
+
|
115
|
+
・tdclc内のTCP read writeの実装がboostからOS nativeに変更されました。これによりパ
|
116
|
+
フォーマンスとタイムアウトの設定を可能にしました。
|
117
|
+
|
118
|
+
その他の修正と変更点
|
119
|
+
--------------------------------------------------------------------------------
|
120
|
+
・固定長文字列型フィールドのフィルタリングが正しく行われない場合がある不具合を修
|
121
|
+
正しました。
|
122
|
+
|
123
|
+
・PHPとRubyインタフェースにsortFields sortFieldクラスが欠落していた不具合を修正
|
124
|
+
しました。
|
125
|
+
|
126
|
+
・Active XインターフェースにRecordset::UnionRecordset()メソッドが欠落していた不
|
127
|
+
具合を修正しました。
|
128
|
+
|
129
|
+
・table::find系オペレーション時に不正なキー番号をセットすると、サーバーがクラッ
|
130
|
+
シュする不具合を修正しました。
|
131
|
+
|
132
|
+
・テーブルがSQLコマンドLOCK TABLESでロックされた状態で、書き込みトランザクション
|
133
|
+
が失敗したあと、再トライ時にunlock rowでエラーが発生する不具合を修正しました。
|
134
|
+
|
135
|
+
・ActiveXインターフェースのdatabaseオブジェクトの解放で、テーブルの解放順との順序
|
136
|
+
関係によって、access violationが発生することがある不具合を修正しました。
|
137
|
+
|
138
|
+
・DNSが使用できないクライアントにおいて、接続先の指定にlocalhostが使用できない問
|
139
|
+
題を修正しました。
|
140
|
+
|
141
|
+
・ft_float型のフィールドでi64()による読み取りが常にゼロを返す不具合を修正しました。
|
142
|
+
|
143
|
+
・ft_string型とft_wstring型のフィールドでfield::getFVbin()とtable::getFVbin()に
|
144
|
+
よる値の読み取りができない不具合を修正しました。
|
145
|
+
|
146
|
+
・Windowsのパイプ接続時の共有メモリサイズのデフォルト値が、サーバーとクライアント
|
147
|
+
で異なる不具合を修正しました。
|
148
|
+
|
149
|
+
・activeTableクエリーによるft_textとft_blobフィールドの読み取りで、フィールドの
|
150
|
+
絞り込みが無い場合、不正なポインターを返す不具合を修正しました。
|
151
|
+
|
152
|
+
・Transactdプラグインのソースコードを MySQL 5.7.6対応にしました。cmakeは現在未対応
|
153
|
+
です。ビルドにはcmakeの修正が必要です。
|
data/bin/2.0/transactd.so
CHANGED
Binary file
|
data/bin/2.1/transactd.so
CHANGED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -21,17 +21,24 @@
|
|
21
21
|
require 'transactd'
|
22
22
|
require 'base64'
|
23
23
|
|
24
|
+
def getEnv(valuename)
|
25
|
+
return ENV[valuename] if ENV[valuename] != nil
|
26
|
+
return ''
|
27
|
+
end
|
28
|
+
|
24
29
|
def getHost()
|
25
|
-
hostname = '
|
26
|
-
|
27
|
-
hostname = ENV['TRANSACTD_RSPEC_HOST']
|
28
|
-
end
|
30
|
+
hostname = getEnv('TRANSACTD_RSPEC_HOST')
|
31
|
+
hostname = '127.0.0.1/' if hostname == ''
|
29
32
|
hostname = hostname + '/' unless (hostname =~ /\/$/)
|
30
33
|
return hostname
|
31
34
|
end
|
32
35
|
|
33
36
|
HOSTNAME = getHost()
|
34
|
-
|
37
|
+
USERNAME = getEnv('TRANSACTD_RSPEC_USER')
|
38
|
+
USERPART = USERNAME == '' ? '' : USERNAME + '@'
|
39
|
+
PASSWORD = getEnv('TRANSACTD_RSPEC_PASS')
|
40
|
+
PASSPART = PASSWORD == '' ? '' : '&pwd=' + PASSWORD
|
41
|
+
URL = 'tdap://' + USERPART + HOSTNAME + 'test_blob?dbfile=test.bdf' + PASSPART
|
35
42
|
TABLENAME = 'comments'
|
36
43
|
FDI_ID = 0
|
37
44
|
FDI_USER_ID = 1
|
@@ -234,9 +241,6 @@ describe Transactd, 'blob' do
|
|
234
241
|
# 3... but not found because filtered
|
235
242
|
tb.findNext(true)
|
236
243
|
expect(tb.stat()).to eq Transactd::STATUS_EOF
|
237
|
-
# 2... but changing seek-direction is not allowed
|
238
|
-
tb.findPrev(true)
|
239
|
-
expect(tb.stat()).to eq Transactd::STATUS_PROGRAM_ERROR
|
240
244
|
db.close()
|
241
245
|
end
|
242
246
|
|
@@ -322,6 +326,20 @@ describe Transactd, 'blob' do
|
|
322
326
|
db.close()
|
323
327
|
end
|
324
328
|
|
329
|
+
it 'use recordset' do
|
330
|
+
image = getTestBinary()
|
331
|
+
db = Transactd::Database.new()
|
332
|
+
openDatabase(db)
|
333
|
+
at = Transactd::ActiveTable.new(db, TABLENAME)
|
334
|
+
q = Transactd::Query.new()
|
335
|
+
q.where('id', '=', 1)
|
336
|
+
rs = at.index(0).keyValue(1).read(q)
|
337
|
+
expect(rs.count()).to eq 1
|
338
|
+
f = rs[0].getField(FDI_IMAGE);
|
339
|
+
expect(f.getBin()).to eq image
|
340
|
+
db.close()
|
341
|
+
end
|
342
|
+
|
325
343
|
it 'drop' do
|
326
344
|
db = Transactd::Database.new()
|
327
345
|
dropDatabase(db)
|
@@ -23,18 +23,25 @@ require 'transactd'
|
|
23
23
|
require 'rbconfig'
|
24
24
|
IS_WINDOWS = (RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/)
|
25
25
|
|
26
|
+
def getEnv(valuename)
|
27
|
+
return ENV[valuename] if ENV[valuename] != nil
|
28
|
+
return ''
|
29
|
+
end
|
30
|
+
|
26
31
|
def getHost()
|
27
|
-
hostname = '
|
28
|
-
|
29
|
-
hostname = ENV['TRANSACTD_RSPEC_HOST']
|
30
|
-
end
|
32
|
+
hostname = getEnv('TRANSACTD_RSPEC_HOST')
|
33
|
+
hostname = '127.0.0.1/' if hostname == ''
|
31
34
|
hostname = hostname + '/' unless (hostname =~ /\/$/)
|
32
35
|
return hostname
|
33
36
|
end
|
34
37
|
|
35
38
|
HOSTNAME = getHost()
|
36
|
-
|
37
|
-
|
39
|
+
USERNAME = getEnv('TRANSACTD_RSPEC_USER')
|
40
|
+
USERPART = USERNAME == '' ? '' : USERNAME + '@'
|
41
|
+
PASSWORD = getEnv('TRANSACTD_RSPEC_PASS')
|
42
|
+
PASSPART = PASSWORD == '' ? '' : '&pwd=' + PASSWORD
|
43
|
+
URL = 'tdap://' + USERPART + HOSTNAME + 'test?dbfile=test.bdf' + PASSPART
|
44
|
+
URL_KANJI = 'tdap://' + USERPART + HOSTNAME + 'テスト?dbfile=構成.bdf' + PASSPART
|
38
45
|
FDI_ID = 0
|
39
46
|
FDN_ID = '番号'.encode('UTF-8')
|
40
47
|
FDI_NAME = 1
|
@@ -21,28 +21,34 @@
|
|
21
21
|
require 'transactd'
|
22
22
|
require 'thwait'
|
23
23
|
|
24
|
+
def getEnv(valuename)
|
25
|
+
return ENV[valuename] if ENV[valuename] != nil
|
26
|
+
return ''
|
27
|
+
end
|
28
|
+
|
24
29
|
def getHost()
|
25
|
-
hostname = '
|
26
|
-
|
27
|
-
hostname = ENV['TRANSACTD_RSPEC_HOST']
|
28
|
-
end
|
29
|
-
hostname = hostname + '/' unless (hostname =~ /\/$/)
|
30
|
+
hostname = getEnv('TRANSACTD_RSPEC_HOST')
|
31
|
+
hostname = '127.0.0.1' if hostname == ''
|
30
32
|
return hostname
|
31
33
|
end
|
32
34
|
|
33
35
|
PROTOCOL = 'tdap'
|
34
|
-
HOSTNAME = getHost()
|
36
|
+
HOSTNAME = getHost()
|
37
|
+
USERNAME = getEnv('TRANSACTD_RSPEC_USER')
|
38
|
+
USERPART = USERNAME == '' ? '' : USERNAME + '@'
|
39
|
+
PASSWORD = getEnv('TRANSACTD_RSPEC_PASS')
|
40
|
+
PASSPART = PASSWORD == '' ? '' : '&pwd=' + PASSWORD
|
35
41
|
DBNAME = 'querytest'
|
36
42
|
SCHEMANAME = 'test'
|
37
43
|
BDFNAME = '?dbfile=' + SCHEMANAME + '.bdf'
|
38
|
-
URL = PROTOCOL + '://' + HOSTNAME + '/' + DBNAME + BDFNAME
|
44
|
+
URL = PROTOCOL + '://' + USERPART + HOSTNAME + '/' + DBNAME + BDFNAME + PASSPART
|
39
45
|
TABLENAME = 'user'
|
40
46
|
|
41
47
|
describe Transactd, 'pool' do
|
42
48
|
it 'create ConnectParams' do
|
43
49
|
cp = Transactd::ConnectParams.new(URL)
|
44
50
|
expect(cp.uri()).to eq URL
|
45
|
-
cp = Transactd::ConnectParams.new(PROTOCOL, HOSTNAME, DBNAME, SCHEMANAME)
|
51
|
+
cp = Transactd::ConnectParams.new(PROTOCOL, HOSTNAME, DBNAME, SCHEMANAME, USERNAME, PASSWORD)
|
46
52
|
expect(cp.uri()).to eq URL
|
47
53
|
end
|
48
54
|
|
@@ -23,16 +23,24 @@ require 'transactd'
|
|
23
23
|
require 'rbconfig'
|
24
24
|
IS_WINDOWS = (RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/)
|
25
25
|
|
26
|
+
def getEnv(valuename)
|
27
|
+
return ENV[valuename] if ENV[valuename] != nil
|
28
|
+
return ''
|
29
|
+
end
|
30
|
+
|
26
31
|
def getHost()
|
27
|
-
hostname = '
|
28
|
-
|
29
|
-
hostname = ENV['TRANSACTD_RSPEC_HOST']
|
30
|
-
end
|
32
|
+
hostname = getEnv('TRANSACTD_RSPEC_HOST')
|
33
|
+
hostname = '127.0.0.1/' if hostname == ''
|
31
34
|
hostname = hostname + '/' unless (hostname =~ /\/$/)
|
32
35
|
return hostname
|
33
36
|
end
|
34
37
|
|
35
38
|
HOSTNAME = getHost()
|
39
|
+
USERNAME = getEnv('TRANSACTD_RSPEC_USER')
|
40
|
+
USERPART = USERNAME == '' ? '' : USERNAME + '@'
|
41
|
+
PASSWORD = getEnv('TRANSACTD_RSPEC_PASS')
|
42
|
+
PASSPART = PASSWORD == '' ? '' : '&pwd=' + PASSWORD
|
43
|
+
PASSPART2 = PASSWORD == '' ? '' : '?pwd=' + PASSWORD
|
36
44
|
DBNAME = 'test'
|
37
45
|
DBNAME_VAR = 'testvar'
|
38
46
|
DBNAME_SF = 'testString'
|
@@ -40,10 +48,12 @@ DBNAME_QT = 'querytest'
|
|
40
48
|
TABLENAME = 'user'
|
41
49
|
PROTOCOL = 'tdap://'
|
42
50
|
BDFNAME = '?dbfile=test.bdf'
|
43
|
-
URL = PROTOCOL + HOSTNAME + DBNAME + BDFNAME
|
44
|
-
URL_VAR = PROTOCOL + HOSTNAME + DBNAME_VAR + BDFNAME
|
45
|
-
URL_SF = PROTOCOL + HOSTNAME + DBNAME_SF + BDFNAME
|
46
|
-
URL_QT = PROTOCOL + HOSTNAME + DBNAME_QT + BDFNAME
|
51
|
+
URL = PROTOCOL + USERPART + HOSTNAME + DBNAME + BDFNAME + PASSPART
|
52
|
+
URL_VAR = PROTOCOL + USERPART + HOSTNAME + DBNAME_VAR + BDFNAME + PASSPART
|
53
|
+
URL_SF = PROTOCOL + USERPART + HOSTNAME + DBNAME_SF + BDFNAME + PASSPART
|
54
|
+
URL_QT = PROTOCOL + USERPART + HOSTNAME + DBNAME_QT + BDFNAME + PASSPART
|
55
|
+
URL_HOST = PROTOCOL + USERPART + HOSTNAME + PASSPART2
|
56
|
+
URL_DB = PROTOCOL + USERPART + HOSTNAME + DBNAME + PASSPART2
|
47
57
|
FDI_ID = 0
|
48
58
|
FDI_NAME = 1
|
49
59
|
FDI_GROUP = 2
|
@@ -97,8 +107,18 @@ def testCreateTable(db)
|
|
97
107
|
|
98
108
|
fd = dbdef.insertField(1, 1)
|
99
109
|
fd.setName('name')
|
100
|
-
fd.type = Transactd::Ft_zstring
|
101
110
|
fd.len = 33
|
111
|
+
|
112
|
+
#test padChar
|
113
|
+
fd.type = Transactd::Ft_string
|
114
|
+
fd.setPadCharSettings(true, false)
|
115
|
+
expect(fd.usePadChar()).to eq true;
|
116
|
+
expect(fd.trimPadChar()).to eq false;
|
117
|
+
fd.setPadCharSettings(false, true)
|
118
|
+
expect(fd.usePadChar()).to eq false;
|
119
|
+
expect(fd.trimPadChar()).to eq true;
|
120
|
+
|
121
|
+
fd.type = Transactd::Ft_zstring
|
102
122
|
dbdef.updateTableDef(1)
|
103
123
|
expect(dbdef.stat()).to eq 0
|
104
124
|
|
@@ -183,7 +203,7 @@ end
|
|
183
203
|
|
184
204
|
def testVersion()
|
185
205
|
db = Transactd::Database.new()
|
186
|
-
db.connect(
|
206
|
+
db.connect(URL_HOST)
|
187
207
|
expect(db.stat()).to eq 0
|
188
208
|
vv = Transactd::BtrVersions.new()
|
189
209
|
db.getBtrVersion(vv)
|
@@ -623,7 +643,7 @@ def testSnapshot()
|
|
623
643
|
expect(db.stat()).to eq 0
|
624
644
|
expect(tbg).not_to be nil
|
625
645
|
db2 = Transactd::Database.new()
|
626
|
-
db2.connect(
|
646
|
+
db2.connect(URL_DB, true)
|
627
647
|
expect(db2.stat()).to eq 0
|
628
648
|
tb2 = testOpenTable(db2)
|
629
649
|
expect(tb2).not_to be nil
|
@@ -753,7 +773,7 @@ def testTransactionLockRepeatable()
|
|
753
773
|
tb = testOpenTable(db)
|
754
774
|
expect(tb).not_to be nil
|
755
775
|
db2 = Transactd::Database.new()
|
756
|
-
db2.connect(
|
776
|
+
db2.connect(URL_DB, true)
|
757
777
|
expect(db2.stat()).to eq 0
|
758
778
|
tb2 = testOpenTable(db2)
|
759
779
|
expect(tb2).not_to be nil
|
@@ -984,7 +1004,7 @@ def testTransactionLockReadCommited()
|
|
984
1004
|
tb = testOpenTable(db)
|
985
1005
|
expect(tb).not_to be nil
|
986
1006
|
db2 = Transactd::Database.new()
|
987
|
-
db2.connect(
|
1007
|
+
db2.connect(URL_DB, true)
|
988
1008
|
expect(db2.stat()).to eq 0
|
989
1009
|
tb2 = testOpenTable(db2)
|
990
1010
|
expect(tb2).not_to be nil
|
@@ -1249,7 +1269,7 @@ def testRecordLock()
|
|
1249
1269
|
tb = testOpenTable(db)
|
1250
1270
|
expect(tb).not_to be nil
|
1251
1271
|
db2 = Transactd::Database.new()
|
1252
|
-
db2.connect(
|
1272
|
+
db2.connect(URL_DB, true)
|
1253
1273
|
expect(db2.stat()).to eq 0
|
1254
1274
|
tb2 = testOpenTable(db2)
|
1255
1275
|
expect(tb2).not_to be nil
|
@@ -1385,7 +1405,7 @@ def testConflict()
|
|
1385
1405
|
db = Transactd::Database.new()
|
1386
1406
|
tb = testOpenTable(db)
|
1387
1407
|
db2 = Transactd::Database.new()
|
1388
|
-
db2.connect(
|
1408
|
+
db2.connect(URL_DB, true)
|
1389
1409
|
expect(db2.stat()).to eq 0
|
1390
1410
|
expect(tb).not_to be nil
|
1391
1411
|
tb2 = testOpenTable(db2)
|
@@ -1444,7 +1464,7 @@ def testExclusive()
|
|
1444
1464
|
|
1445
1465
|
# Can not open database from other connections.
|
1446
1466
|
db2 = Transactd::Database.new()
|
1447
|
-
db2.connect(
|
1467
|
+
db2.connect(URL_DB, true)
|
1448
1468
|
expect(db2.stat()).to eq 0
|
1449
1469
|
db2.open(URL, Transactd::TYPE_SCHEMA_BDF)
|
1450
1470
|
# database open error. Check database::stat()
|
@@ -1467,7 +1487,7 @@ def testExclusive()
|
|
1467
1487
|
db2.close()
|
1468
1488
|
|
1469
1489
|
# Normal open
|
1470
|
-
db2.connect(
|
1490
|
+
db2.connect(URL_DB, true)
|
1471
1491
|
db2.open(URL, Transactd::TYPE_SCHEMA_BDF, Transactd::TD_OPEN_NORMAL)
|
1472
1492
|
expect(db2.stat()).to eq 0
|
1473
1493
|
db2.close()
|
@@ -1629,7 +1649,7 @@ def testMissingUpdate()
|
|
1629
1649
|
# Get lock(X) same record in parallel.
|
1630
1650
|
w = Thread.new {
|
1631
1651
|
db2 = Transactd::Database.new()
|
1632
|
-
db2.connect(
|
1652
|
+
db2.connect(URL_DB, true)
|
1633
1653
|
expect(db2.stat()).to eq 0
|
1634
1654
|
db2.open(URL, Transactd::TYPE_SCHEMA_BDF, Transactd::TD_OPEN_NORMAL)
|
1635
1655
|
expect(db2.stat()).to eq 0
|
@@ -1643,7 +1663,7 @@ def testMissingUpdate()
|
|
1643
1663
|
db2.close()
|
1644
1664
|
v2
|
1645
1665
|
}
|
1646
|
-
sleep(0.
|
1666
|
+
sleep(0.5)
|
1647
1667
|
v = tb.getFVint(FDI_ID)
|
1648
1668
|
v = v + 1
|
1649
1669
|
tb.setFV(FDI_ID, v)
|
@@ -1673,7 +1693,7 @@ def testMissingUpdate()
|
|
1673
1693
|
# Get lock(X) same record in parallel.
|
1674
1694
|
w = Thread.new {
|
1675
1695
|
db2 = Transactd::Database.new()
|
1676
|
-
db2.connect(
|
1696
|
+
db2.connect(URL_DB, true)
|
1677
1697
|
expect(db2.stat()).to eq 0
|
1678
1698
|
db2.open(URL, Transactd::TYPE_SCHEMA_BDF, Transactd::TD_OPEN_NORMAL)
|
1679
1699
|
expect(db2.stat()).to eq 0
|
@@ -1688,7 +1708,7 @@ def testMissingUpdate()
|
|
1688
1708
|
db2.close()
|
1689
1709
|
v2
|
1690
1710
|
}
|
1691
|
-
sleep(0.
|
1711
|
+
sleep(0.5)
|
1692
1712
|
v = tb.getFVint(FDI_ID)
|
1693
1713
|
tb.del()
|
1694
1714
|
v2 = w.join().value
|
@@ -1787,12 +1807,12 @@ end
|
|
1787
1807
|
|
1788
1808
|
def testLogin()
|
1789
1809
|
db = Transactd::Database.new()
|
1790
|
-
db.connect(
|
1810
|
+
db.connect(URL_HOST)
|
1791
1811
|
expect(db.stat()).to eq 0
|
1792
1812
|
if db.stat() == 0
|
1793
1813
|
# second connection
|
1794
1814
|
db2 = Transactd::Database.new()
|
1795
|
-
db2.connect(
|
1815
|
+
db2.connect(URL_HOST, true)
|
1796
1816
|
expect(db2.stat()).to eq 0
|
1797
1817
|
db2.disconnect()
|
1798
1818
|
db.disconnect()
|
@@ -1811,7 +1831,7 @@ def testLogin()
|
|
1811
1831
|
db.close()
|
1812
1832
|
expect(db.stat()).to eq 0
|
1813
1833
|
# true database name
|
1814
|
-
db.connect(
|
1834
|
+
db.connect(URL_DB)
|
1815
1835
|
expect(db.stat()).to eq 0
|
1816
1836
|
if (db.stat() == 0)
|
1817
1837
|
db.disconnect()
|
@@ -1821,7 +1841,7 @@ def testLogin()
|
|
1821
1841
|
testDropDatabase(db)
|
1822
1842
|
db.disconnect()
|
1823
1843
|
expect(db.stat()).to eq 0
|
1824
|
-
db.connect(
|
1844
|
+
db.connect(URL_DB)
|
1825
1845
|
expect(db.stat()).to eq (Transactd::ERROR_NO_DATABASE)
|
1826
1846
|
db.disconnect()
|
1827
1847
|
expect(db.stat()).to eq 1
|
@@ -2835,11 +2855,11 @@ def createQTextention(db)
|
|
2835
2855
|
end
|
2836
2856
|
|
2837
2857
|
def insertQT(db, maxId)
|
2838
|
-
db.beginTrn()
|
2839
2858
|
# insert user data
|
2840
2859
|
tb = db.openTable('user', Transactd::TD_OPEN_NORMAL)
|
2841
2860
|
expect(db.stat()).to eq 0
|
2842
2861
|
expect(tb).not_to be nil
|
2862
|
+
db.beginTrn()
|
2843
2863
|
tb.clearBuffer()
|
2844
2864
|
for i in 1..maxId
|
2845
2865
|
tb.setFV(0, i)
|
@@ -2848,11 +2868,13 @@ def insertQT(db, maxId)
|
|
2848
2868
|
tb.insert()
|
2849
2869
|
expect(tb.stat()).to eq 0
|
2850
2870
|
end
|
2871
|
+
db.endTrn()
|
2851
2872
|
tb.close()
|
2852
2873
|
# insert groups data
|
2853
2874
|
tb = db.openTable('groups', Transactd::TD_OPEN_NORMAL)
|
2854
2875
|
expect(db.stat()).to eq 0
|
2855
2876
|
expect(tb).not_to be nil
|
2877
|
+
db.beginTrn()
|
2856
2878
|
tb.clearBuffer()
|
2857
2879
|
for i in 1..100
|
2858
2880
|
tb.setFV(0, i)
|
@@ -2860,11 +2882,13 @@ def insertQT(db, maxId)
|
|
2860
2882
|
tb.insert()
|
2861
2883
|
expect(tb.stat()).to eq 0
|
2862
2884
|
end
|
2885
|
+
db.endTrn()
|
2863
2886
|
tb.close()
|
2864
2887
|
# insert extention data
|
2865
2888
|
tb = db.openTable('extention', Transactd::TD_OPEN_NORMAL)
|
2866
2889
|
expect(db.stat()).to eq 0
|
2867
2890
|
expect(tb).not_to be nil
|
2891
|
+
db.beginTrn()
|
2868
2892
|
tb.clearBuffer()
|
2869
2893
|
for i in 1..maxId
|
2870
2894
|
tb.setFV(0, i)
|
@@ -2873,8 +2897,8 @@ def insertQT(db, maxId)
|
|
2873
2897
|
tb.insert()
|
2874
2898
|
expect(tb.stat()).to eq 0
|
2875
2899
|
end
|
2876
|
-
tb.close()
|
2877
2900
|
db.endTrn()
|
2901
|
+
tb.close()
|
2878
2902
|
end
|
2879
2903
|
|
2880
2904
|
def testCreateQueryTest()
|
@@ -2931,6 +2955,8 @@ def testNewDelete()
|
|
2931
2955
|
a = Transactd::Avg.new(fns)
|
2932
2956
|
mi = Transactd::Min.new(fns)
|
2933
2957
|
ma = Transactd::Max.new(fns)
|
2958
|
+
la = Transactd::Last.new(fns)
|
2959
|
+
fa = Transactd::First.new(fns)
|
2934
2960
|
rs = Transactd::Recordset.new()
|
2935
2961
|
# have to explicitly release
|
2936
2962
|
atu.release()
|
@@ -3284,6 +3310,64 @@ def testServerPrepareJoin()
|
|
3284
3310
|
db.close()
|
3285
3311
|
end
|
3286
3312
|
|
3313
|
+
def testReadMore()
|
3314
|
+
db = Transactd::Database.new()
|
3315
|
+
db.open(URL_QT)
|
3316
|
+
expect(db.stat()).to eq 0
|
3317
|
+
|
3318
|
+
atu = Transactd::ActiveTable.new(db, 'user')
|
3319
|
+
atu.alias('名前', 'name')
|
3320
|
+
q = Transactd::Query.new()
|
3321
|
+
|
3322
|
+
#isStopAtLimit
|
3323
|
+
expect(q.isStopAtLimit()).to eq false
|
3324
|
+
|
3325
|
+
q.select('id', 'name', 'group')
|
3326
|
+
.where('name', '=', '1*')
|
3327
|
+
.reject(70).limit(8).stopAtLimit(true)
|
3328
|
+
expect(q.isStopAtLimit()).to eq true
|
3329
|
+
|
3330
|
+
stmt1 = atu.prepare(q)
|
3331
|
+
expect(stmt1).not_to eq nil
|
3332
|
+
rs = atu.index(0).keyValue(18).read(stmt1)
|
3333
|
+
expect(rs.size()).to eq 2
|
3334
|
+
|
3335
|
+
#readMore
|
3336
|
+
rs2 = atu.readMore()
|
3337
|
+
expect(rs2.size()).to eq 8
|
3338
|
+
rs.unionRecordset(rs2)
|
3339
|
+
expect(rs.size()).to eq 10
|
3340
|
+
end
|
3341
|
+
|
3342
|
+
def testFirstLastGroupFunction()
|
3343
|
+
db = Transactd::Database.new()
|
3344
|
+
db.open(URL_QT)
|
3345
|
+
expect(db.stat()).to eq 0
|
3346
|
+
|
3347
|
+
atu = Transactd::ActiveTable.new(db, 'user')
|
3348
|
+
atu.alias('名前', 'name')
|
3349
|
+
q = Transactd::Query.new()
|
3350
|
+
q.select('id', 'name', 'group')
|
3351
|
+
.where('name', '=', '1*')
|
3352
|
+
.reject(70).limit(8).stopAtLimit(true)
|
3353
|
+
stmt1 = atu.prepare(q)
|
3354
|
+
expect(stmt1).not_to eq nil
|
3355
|
+
rs = atu.index(0).keyValue(0).read(stmt1)
|
3356
|
+
expect(rs.size()).to eq 8
|
3357
|
+
|
3358
|
+
#grouping first and last
|
3359
|
+
gq = Transactd::GroupQuery.new()
|
3360
|
+
target = Transactd::FieldNames.new()
|
3361
|
+
target.addValue('name');
|
3362
|
+
last = Transactd::Last.new(target, 'last_rec_name')
|
3363
|
+
first = Transactd::First.new(target, 'first_rec_name')
|
3364
|
+
gq.addFunction(last);
|
3365
|
+
gq.addFunction(first);
|
3366
|
+
rs.groupBy(gq);
|
3367
|
+
expect(rs[0]['first_rec_name']).to eq "1 user";
|
3368
|
+
expect(rs[0]['last_rec_name']).to eq "16 user";
|
3369
|
+
end
|
3370
|
+
|
3287
3371
|
def testWirtableRecord()
|
3288
3372
|
db = Transactd::Database.new()
|
3289
3373
|
db.open(URL_QT)
|
@@ -3474,6 +3558,12 @@ describe Transactd do
|
|
3474
3558
|
it 'activetable and prepare (server)' do
|
3475
3559
|
testServerPrepareJoin()
|
3476
3560
|
end
|
3561
|
+
it 'activetable and readMore' do
|
3562
|
+
testReadMore()
|
3563
|
+
end
|
3564
|
+
it 'Grouping and first and last' do
|
3565
|
+
testFirstLastGroupFunction()
|
3566
|
+
end
|
3477
3567
|
it 'write with writableRecord' do
|
3478
3568
|
testWirtableRecord()
|
3479
3569
|
end
|
data/transactd.gemspec
CHANGED
@@ -44,7 +44,7 @@ spec_build = Gem::Specification.new do |s|
|
|
44
44
|
raise 'Can not read versions from ' + verfile + ' (' + ver_str + ')' if ver_str.length == 0
|
45
45
|
s.version = ver_str
|
46
46
|
|
47
|
-
binary_file = File.join('bin', RUBY_VERSION.
|
47
|
+
binary_file = File.join('bin', RUBY_VERSION.sub(/(\d+\.\d+)\..*/, '\1'), 'transactd.so')
|
48
48
|
binarymode = File.exist?(binary_file)
|
49
49
|
|
50
50
|
if binarymode
|
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: 2.
|
4
|
+
version: 2.3.0
|
5
5
|
platform: x64-mswin64-100
|
6
6
|
authors:
|
7
7
|
- BizStation Corp.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-03-31 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Transactd client for ruby gem
|
14
14
|
email: transactd@bizstation.jp
|
@@ -19,9 +19,10 @@ extra_rdoc_files: []
|
|
19
19
|
files:
|
20
20
|
- bin/2.0/transactd.so
|
21
21
|
- bin/2.1/transactd.so
|
22
|
+
- bin/2.2/transactd.so
|
22
23
|
- build/tdclrb/bldgem/extconf.rb
|
23
|
-
- bin/common/
|
24
|
-
- bin/common/
|
24
|
+
- bin/common/tdclcpp_vc100_64mr_2_3.dll
|
25
|
+
- bin/common/tdclc_64_2_3.dll
|
25
26
|
- build/tdclrb/gem/detect.rb
|
26
27
|
- build/tdclrb/gem/helper.rb
|
27
28
|
- build/tdclrb/gem/INSTALLLOG.win32
|
@@ -47,6 +48,8 @@ files:
|
|
47
48
|
- ./README-JA
|
48
49
|
- ./README_ORMSRCGEN
|
49
50
|
- ./README_ORMSRCGEN-JA
|
51
|
+
- ./RELEASE_NOTE
|
52
|
+
- ./RELEASE_NOTE-JA
|
50
53
|
- ./transactd.gemspec
|
51
54
|
homepage: http://www.bizstation.jp/ja/transactd
|
52
55
|
licenses:
|
data/bin/common/tdclc_64_2_2.dll
DELETED
Binary file
|
Binary file
|