ibm_db 0.9.2 → 0.9.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/CHANGES +81 -79
  2. data/README +6 -7
  3. data/ext/ibm_db.c +24 -4
  4. metadata +81 -74
data/CHANGES CHANGED
@@ -1,79 +1,81 @@
1
- Change Log
2
- ==============
3
-
4
- 2007/11/30 (IBM_DB adapter 0.9.2, driver 0.9.1):
5
- - Lifted index length limitation (18 chars) and fixed multiple index creation
6
- - Fixed [#13294] limit/offset breaks subselect in db2 adapter
7
- - Fixed error handling for metadata retrieval (tables, columns, indexes)
8
-
9
- 2007/11/07 (IBM_DB adapter 0.9.1, driver 0.9.1):
10
- - Fixed ibm_db driver VC80 runtime issue on Windows
11
-
12
- 2007/09/28 (IBM_DB adapter 0.9.0, driver 0.9.0):
13
- - Fixed ibm_db gem 0.8.5 incompatibility with DB2 CLI 9.1 FP3 and below
14
-
15
- 2007/09/13 (IBM_DB adapter 0.8.5, driver 0.8.5):
16
- - Fixed Ruby driver crash on Windows Vista [#13357]
17
-
18
- 2007/07/05 (IBM_DB adapter 0.8.0, driver 0.7.0):
19
- - Support for Informix Dynamic Server 11.10
20
- - New driver method get_last_serial_value to retrieve last inserted serial
21
- value for Informix Dynamic Server
22
-
23
- 2007/06/19 (IBM_DB adapter 0.7.5, driver 0.6.0):
24
- - Driver code (ibm_db.c) remains at the same level: 0.6.0 (no changes)
25
- - Fixed client attributes initialization on connection setup [11264]
26
- - Fixed rake db:schema:dump native data types limits incompatible with table create
27
-
28
- 2007/06/01 (IBM_DB adapter 0.7.0, driver 0.6.0):
29
- - Driver code (ibm_db.c) remains at the same level: 0.6.0 (no changes)
30
- - Fixed remaining failure on {:null => true} option for XML data type [#10877]
31
- - Fixed handling of {:id => false} option during table creation in DB2 for zOS
32
- - Fixed handle_lobs failures in table creation for has_many/belongs_to [#10701]
33
- - Fixe db2-i5-zOS.yaml content (removed inadvertent tab) [#11234]
34
-
35
- 2007/05/10 (IBM_DB adapter 0.6.5, driver 0.6.0):
36
- - Driver code (ibm_db.c) remains at the same level: 0.6.0 (no changes)
37
- - Fixed regression for reconnect after being inactive (connection recycle)
38
- - Fixed rake db:schema:load failures on boolean data type [#10683]
39
- - Fixed XML default option (:null => true for XML data type) [#10754]
40
- - Fixed DB2 for zOS version 9 handling of column changes for DEFAULT NULL
41
-
42
- 2007/04/30 (0.6.0):
43
- - Support for remote connections to DB2 Universal Database on z/OS version 9
44
- - Support for result set pagination via ActiveRecord add_limit_offset! method
45
- for DB2 Universal Database on z/OS and i5/OS
46
- - Defect fixes
47
- - Improved documentation
48
-
49
- 2007/04/20 (0.4.6):
50
- - Fixed XML columns creation default value (NOT NULL)
51
- - Fixed border case for IS NULL in where clauses
52
- - Improved documentation (connection attributes)
53
-
54
- 2007/04/20 (0.4.5):
55
- - Fixed reconnect problems: driver (IBM_DB::active) and adapter (active)
56
- - Client connection attribute rename (app_user to replace user)
57
- - Improved support for ROWID data type (DB2 for zOS version 8 and 9)
58
-
59
- 2007/03/21 (0.4.0):
60
- - Support added for remote connectivity to DB2 zOS version 8
61
- - Support added for remote connectivity to DB2 i5 v5r3 and v5r4
62
- - Improved migration support (added change_column method)
63
- - Support for setting and retrieving values for client attributes (user,
64
- account, application, workstation)
65
-
66
- 2006/10/31 (0.2.0):
67
- - Significant performance improvements
68
- - Improved stored procedure support at driver level
69
- - Added support for Large Object data types (LOBs) greater than 32K (BLOB, CLOB, XML) in size
70
- - Added XML data type support for native storage of XML documents
71
- - Significant quality improvements, through many bug fixes in the driver and adapter
72
- - Improved migration support (added add_column and remove_column methods)
73
-
74
- 2006/06/07 (0.1.0):
75
-
76
- - Fixed compatibility issue with other adapters
77
- - If a schema is omitted in database.yml, the username is now used as default schema
78
- - Introduced descriptive CLI error messages when a connection or an execute statement fails
79
- - Introduced check against schema in method 'indexes'
1
+ Change Log
2
+ ==============
3
+ 2008/03/10 (IBM_DB adapter 0.9.3, driver 0.9.3):
4
+ - Resolved the issue of truncation of output when stored procedure was called
5
+
6
+ 2007/11/30 (IBM_DB adapter 0.9.2, driver 0.9.1):
7
+ - Lifted index length limitation (18 chars) and fixed multiple index creation
8
+ - Fixed [#13294] limit/offset breaks subselect in db2 adapter
9
+ - Fixed error handling for metadata retrieval (tables, columns, indexes)
10
+
11
+ 2007/11/07 (IBM_DB adapter 0.9.1, driver 0.9.1):
12
+ - Fixed ibm_db driver VC80 runtime issue on Windows
13
+
14
+ 2007/09/28 (IBM_DB adapter 0.9.0, driver 0.9.0):
15
+ - Fixed ibm_db gem 0.8.5 incompatibility with DB2 CLI 9.1 FP3 and below
16
+
17
+ 2007/09/13 (IBM_DB adapter 0.8.5, driver 0.8.5):
18
+ - Fixed Ruby driver crash on Windows Vista [#13357]
19
+
20
+ 2007/07/05 (IBM_DB adapter 0.8.0, driver 0.7.0):
21
+ - Support for Informix Dynamic Server 11.10
22
+ - New driver method get_last_serial_value to retrieve last inserted serial
23
+ value for Informix Dynamic Server
24
+
25
+ 2007/06/19 (IBM_DB adapter 0.7.5, driver 0.6.0):
26
+ - Driver code (ibm_db.c) remains at the same level: 0.6.0 (no changes)
27
+ - Fixed client attributes initialization on connection setup [11264]
28
+ - Fixed rake db:schema:dump native data types limits incompatible with table create
29
+
30
+ 2007/06/01 (IBM_DB adapter 0.7.0, driver 0.6.0):
31
+ - Driver code (ibm_db.c) remains at the same level: 0.6.0 (no changes)
32
+ - Fixed remaining failure on {:null => true} option for XML data type [#10877]
33
+ - Fixed handling of {:id => false} option during table creation in DB2 for zOS
34
+ - Fixed handle_lobs failures in table creation for has_many/belongs_to [#10701]
35
+ - Fixe db2-i5-zOS.yaml content (removed inadvertent tab) [#11234]
36
+
37
+ 2007/05/10 (IBM_DB adapter 0.6.5, driver 0.6.0):
38
+ - Driver code (ibm_db.c) remains at the same level: 0.6.0 (no changes)
39
+ - Fixed regression for reconnect after being inactive (connection recycle)
40
+ - Fixed rake db:schema:load failures on boolean data type [#10683]
41
+ - Fixed XML default option (:null => true for XML data type) [#10754]
42
+ - Fixed DB2 for zOS version 9 handling of column changes for DEFAULT NULL
43
+
44
+ 2007/04/30 (0.6.0):
45
+ - Support for remote connections to DB2 Universal Database on z/OS version 9
46
+ - Support for result set pagination via ActiveRecord add_limit_offset! method
47
+ for DB2 Universal Database on z/OS and i5/OS
48
+ - Defect fixes
49
+ - Improved documentation
50
+
51
+ 2007/04/20 (0.4.6):
52
+ - Fixed XML columns creation default value (NOT NULL)
53
+ - Fixed border case for IS NULL in where clauses
54
+ - Improved documentation (connection attributes)
55
+
56
+ 2007/04/20 (0.4.5):
57
+ - Fixed reconnect problems: driver (IBM_DB::active) and adapter (active)
58
+ - Client connection attribute rename (app_user to replace user)
59
+ - Improved support for ROWID data type (DB2 for zOS version 8 and 9)
60
+
61
+ 2007/03/21 (0.4.0):
62
+ - Support added for remote connectivity to DB2 zOS version 8
63
+ - Support added for remote connectivity to DB2 i5 v5r3 and v5r4
64
+ - Improved migration support (added change_column method)
65
+ - Support for setting and retrieving values for client attributes (user,
66
+ account, application, workstation)
67
+
68
+ 2006/10/31 (0.2.0):
69
+ - Significant performance improvements
70
+ - Improved stored procedure support at driver level
71
+ - Added support for Large Object data types (LOBs) greater than 32K (BLOB, CLOB, XML) in size
72
+ - Added XML data type support for native storage of XML documents
73
+ - Significant quality improvements, through many bug fixes in the driver and adapter
74
+ - Improved migration support (added add_column and remove_column methods)
75
+
76
+ 2006/06/07 (0.1.0):
77
+
78
+ - Fixed compatibility issue with other adapters
79
+ - If a schema is omitted in database.yml, the username is now used as default schema
80
+ - Introduced descriptive CLI error messages when a connection or an execute statement fails
81
+ - Introduced check against schema in method 'indexes'
data/README CHANGED
@@ -1,6 +1,6 @@
1
1
  =====================================================================
2
- README for the IBM_DB Adapter 0.9.1 and Driver 0.9.1 (2007/11/07)
3
- For ActiveRecord Version 1.15.3 (and Rails 1.2.3)
2
+ README for the IBM_DB Adapter 0.9.2 and Driver 0.9.1 (2007/11/30)
3
+ For ActiveRecord Version 1.15.5 (and Rails 1.2.5)
4
4
  =====================================================================
5
5
 
6
6
  Supported Operating Systems
@@ -213,12 +213,11 @@ here only for reference, and also involves running the unit tests.
213
213
  $ export IBM_DB_LIB=/opt/ibm/db2/V9.1/lib32
214
214
 
215
215
  Windows platforms:
216
- - Install Visual C++ 2003, Platform SDK (latest), .Net SDK Version 1.1 from:
217
- http://wiki.tcl.tk/11431
216
+ - Install Visual C++ 2005, Platform SDK (latest), .Net SDK (latest)
218
217
  - Set environment:
219
- CALL "C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\SetEnv.Cmd"
220
- CALL "C:\Program Files\Microsoft Visual C++ Toolkit 2003\vcvars32.bat"
221
- SET LIB=%LIB%;C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib
218
+ CALL "C:\Program Files\Microsoft Platform SDK for Windows Server 2005\SetEnv.Cmd"
219
+ CALL "C:\Program Files\Microsoft Visual C++ Toolkit 2005\vcvars32.bat"
220
+ SET LIB=%LIB%;C:\Program Files\Microsoft Visual Studio .NET 2005\Vc8\lib
222
221
  - To configure database connection parameters edit config.yaml
223
222
 
224
223
  Build and Execution:
data/ext/ibm_db.c CHANGED
@@ -10,7 +10,7 @@
10
10
  +----------------------------------------------------------------------+
11
11
  */
12
12
 
13
- #define MODULE_RELEASE "0.9.1"
13
+ #define MODULE_RELEASE "0.9.3"
14
14
 
15
15
  #ifdef HAVE_CONFIG_H
16
16
  #include "config.h"
@@ -3187,6 +3187,7 @@ static int _ruby_ibm_db_bind_data( stmt_handle *stmt_res, param_node *curr, VALU
3187
3187
  SQLSMALLINT valueType;
3188
3188
  SQLPOINTER paramValuePtr;
3189
3189
  int nullterm = 0;
3190
+ int origlen = 0;
3190
3191
 
3191
3192
  /* Have to use SQLBindFileToParam if PARAM is type PARAM_FILE */
3192
3193
  if ( curr->param_type == PARAM_FILE) {
@@ -3256,7 +3257,10 @@ static int _ruby_ibm_db_bind_data( stmt_handle *stmt_res, param_node *curr, VALU
3256
3257
  break;
3257
3258
 
3258
3259
  case T_STRING:
3260
+ {
3261
+ int origlen = 0;
3259
3262
  curr->svalue = rb_str2cstr(*bind_data, &curr->ivalue);
3263
+ origlen = curr->ivalue;
3260
3264
  /*
3261
3265
  * An extra parameter is given by the client to pick the size of the string
3262
3266
  * returned. The string is then truncate past that size. If no size is
@@ -3265,10 +3269,22 @@ static int _ruby_ibm_db_bind_data( stmt_handle *stmt_res, param_node *curr, VALU
3265
3269
  if (curr->size != 0) {
3266
3270
  curr->ivalue = curr->size;
3267
3271
  }
3268
- curr->svalue = memcpy(ALLOC_N(char, curr->ivalue+1), curr->svalue, curr->ivalue);
3269
- curr->svalue[curr->ivalue] = '\0';
3272
+ if (curr->param_type == SQL_PARAM_OUTPUT || curr->param_type == SQL_PARAM_INPUT_OUTPUT) {
3273
+ if (curr->size == 0) {
3274
+ if (curr->ivalue < curr->param_size) {
3275
+ curr->ivalue = curr->param_size;
3276
+ }
3277
+ }
3278
+ curr->svalue = memcpy(ALLOC_N(char, curr->ivalue+1), curr->svalue, origlen);
3279
+ curr->svalue[origlen] = '\0';
3280
+ }
3281
+ else {
3282
+ curr->svalue = memcpy(ALLOC_N(char, curr->ivalue+1), curr->svalue, curr->ivalue);
3283
+ curr->svalue[curr->ivalue] = '\0';
3284
+ }
3285
+ }
3270
3286
 
3271
- switch ( curr->data_type ) {
3287
+ switch ( curr->data_type ) {
3272
3288
  case SQL_CLOB:
3273
3289
  if (curr->param_type == SQL_PARAM_OUTPUT || curr->param_type == SQL_PARAM_INPUT_OUTPUT) {
3274
3290
  curr->bind_indicator = curr->ivalue;
@@ -3318,6 +3334,9 @@ static int _ruby_ibm_db_bind_data( stmt_handle *stmt_res, param_node *curr, VALU
3318
3334
  default:
3319
3335
  valueType = SQL_C_CHAR;
3320
3336
  curr->bind_indicator = curr->ivalue;
3337
+ if (curr->param_type == SQL_PARAM_OUTPUT || curr->param_type == SQL_PARAM_INPUT_OUTPUT) {
3338
+ curr->bind_indicator = SQL_NTS;
3339
+ }
3321
3340
  paramValuePtr = (SQLPOINTER)(curr->svalue);
3322
3341
  }
3323
3342
  rc = SQLBindParameter(stmt_res->hstmt, curr->param_num,
@@ -3331,6 +3350,7 @@ static int _ruby_ibm_db_bind_data( stmt_handle *stmt_res, param_node *curr, VALU
3331
3350
 
3332
3351
  case T_NIL:
3333
3352
  curr->ivalue = SQL_NULL_DATA;
3353
+ curr->bind_indicator = SQL_NULL_DATA;
3334
3354
  rc = SQLBindParameter(stmt_res->hstmt, curr->param_num,
3335
3355
  curr->param_type, SQL_C_DEFAULT, curr->data_type, curr->param_size,
3336
3356
  curr->scale, &curr->ivalue, 0, &curr->ivalue);
metadata CHANGED
@@ -1,106 +1,113 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.9.4
3
- specification_version: 1
4
2
  name: ibm_db
5
3
  version: !ruby/object:Gem::Version
6
- version: 0.9.2
7
- date: 2007-11-30 00:00:00 -05:00
8
- summary: "Rails Driver and Adapter for IBM Data Servers: {LUW, zOS, i5, IDS}"
9
- require_paths:
10
- - lib
11
- email: rubyibm-developers@rubyforge.org
12
- homepage: http://rubyforge.org/projects/rubyibm/
13
- rubyforge_project: rubyibm
14
- description:
15
- autorequire:
16
- default_executable:
17
- bindir: bin
18
- has_rdoc: true
19
- required_ruby_version: !ruby/object:Gem::Version::Requirement
20
- requirements:
21
- - - ">="
22
- - !ruby/object:Gem::Version
23
- version: 1.8.5
24
- version:
4
+ version: 0.9.3
25
5
  platform: ruby
26
- signing_key:
27
- cert_chain:
28
- post_install_message:
29
6
  authors:
30
7
  - IBM
31
- files:
32
- - init.rb
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2008-03-20 00:00:00 -07:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: activerecord
17
+ version_requirement:
18
+ version_requirements: !ruby/object:Gem::Requirement
19
+ requirements:
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 1.15.1
23
+ version:
24
+ description:
25
+ email: rubyibm-developers@rubyforge.org
26
+ executables: []
27
+
28
+ extensions:
29
+ - ext/extconf.rb
30
+ extra_rdoc_files:
33
31
  - CHANGES
34
32
  - README
33
+ - MANIFEST
34
+ files:
35
35
  - test
36
36
  - test/associations_test.rb
37
37
  - test/adapter_test.rb
38
- - test/base_test.rb
38
+ - test/locking_test.rb
39
+ - test/ibm_db_test.rb
39
40
  - test/fixtures
40
41
  - test/fixtures/db_definitions
41
- - test/fixtures/db_definitions/luw
42
- - test/fixtures/db_definitions/luw/ibm_db2.drop.sql
43
- - test/fixtures/db_definitions/luw/ibm_db.sql
44
- - test/fixtures/db_definitions/luw/ibm_db.drop.sql
45
- - test/fixtures/db_definitions/luw/ibm_db2.sql
42
+ - test/fixtures/db_definitions/ids
43
+ - test/fixtures/db_definitions/ids/ibm_db.drop.sql
44
+ - test/fixtures/db_definitions/ids/ibm_db2.drop.sql
45
+ - test/fixtures/db_definitions/ids/ibm_db2.sql
46
+ - test/fixtures/db_definitions/ids/ibm_db.sql
46
47
  - test/fixtures/db_definitions/i5
47
- - test/fixtures/db_definitions/i5/ibm_db2.drop.sql
48
- - test/fixtures/db_definitions/i5/ibm_db.sql
49
48
  - test/fixtures/db_definitions/i5/ibm_db.drop.sql
49
+ - test/fixtures/db_definitions/i5/ibm_db2.drop.sql
50
50
  - test/fixtures/db_definitions/i5/ibm_db2.sql
51
+ - test/fixtures/db_definitions/i5/ibm_db.sql
51
52
  - test/fixtures/db_definitions/zOS
52
- - test/fixtures/db_definitions/zOS/ibm_db2.drop.sql
53
- - test/fixtures/db_definitions/zOS/ibm_db.sql
54
53
  - test/fixtures/db_definitions/zOS/ibm_db.drop.sql
54
+ - test/fixtures/db_definitions/zOS/ibm_db2.drop.sql
55
55
  - test/fixtures/db_definitions/zOS/ibm_db2.sql
56
- - test/fixtures/db_definitions/ids
57
- - test/fixtures/db_definitions/ids/ibm_db2.drop.sql
58
- - test/fixtures/db_definitions/ids/ibm_db.sql
59
- - test/fixtures/db_definitions/ids/ibm_db.drop.sql
60
- - test/fixtures/db_definitions/ids/ibm_db2.sql
56
+ - test/fixtures/db_definitions/zOS/ibm_db.sql
57
+ - test/fixtures/db_definitions/luw
58
+ - test/fixtures/db_definitions/luw/ibm_db.drop.sql
59
+ - test/fixtures/db_definitions/luw/ibm_db2.drop.sql
60
+ - test/fixtures/db_definitions/luw/ibm_db2.sql
61
+ - test/fixtures/db_definitions/luw/ibm_db.sql
62
+ - test/associations
63
+ - test/associations/eager_test.rb
64
+ - test/base_test.rb
61
65
  - test/migration_test.rb
62
66
  - test/connections
63
67
  - test/connections/native_ibm_db
64
68
  - test/connections/native_ibm_db/connection.rb
65
- - test/ibm_db_test.rb
66
- - test/locking_test.rb
67
- - test/associations
68
- - test/associations/eager_test.rb
69
- - MANIFEST
70
- - ext
71
- - ext/Makefile.nt32
72
- - ext/ruby_ibm_db.h
73
- - ext/ibm_db.c
74
- - ext/extconf.rb
75
- - LICENSE
69
+ - README
70
+ - CHANGES
76
71
  - lib
77
72
  - lib/IBM_DB.rb
78
73
  - lib/active_record
79
- - lib/active_record/vendor
80
- - lib/active_record/vendor/db2-i5-zOS.yaml
81
74
  - lib/active_record/connection_adapters
82
75
  - lib/active_record/connection_adapters/ibm_db_adapter.rb
83
- test_files:
84
- - test/ibm_db_test.rb
85
- rdoc_options: []
86
-
87
- extra_rdoc_files:
88
- - CHANGES
89
- - README
76
+ - lib/active_record/vendor
77
+ - lib/active_record/vendor/db2-i5-zOS.yaml
78
+ - init.rb
90
79
  - MANIFEST
91
- executables: []
92
-
93
- extensions:
80
+ - LICENSE
81
+ - ext
82
+ - ext/ruby_ibm_db.h
83
+ - ext/Makefile.nt32
94
84
  - ext/extconf.rb
85
+ - ext/ibm_db.c
86
+ has_rdoc: true
87
+ homepage: http://rubyforge.org/projects/rubyibm/
88
+ post_install_message:
89
+ rdoc_options: []
90
+
91
+ require_paths:
92
+ - lib
93
+ required_ruby_version: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - ">="
96
+ - !ruby/object:Gem::Version
97
+ version: 1.8.5
98
+ version:
99
+ required_rubygems_version: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: "0"
104
+ version:
95
105
  requirements:
96
106
  - ActiveRecord, at least 1.15.1
97
- dependencies:
98
- - !ruby/object:Gem::Dependency
99
- name: activerecord
100
- version_requirement:
101
- version_requirements: !ruby/object:Gem::Version::Requirement
102
- requirements:
103
- - - ">="
104
- - !ruby/object:Gem::Version
105
- version: 1.15.1
106
- version:
107
+ rubyforge_project: rubyibm
108
+ rubygems_version: 1.0.0
109
+ signing_key:
110
+ specification_version: 2
111
+ summary: "Rails Driver and Adapter for IBM Data Servers: {LUW, zOS, i5, IDS}"
112
+ test_files:
113
+ - test/ibm_db_test.rb