ibm_db 2.5.26-x86-mingw32 → 2.5.27-x86-mingw32

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.
@@ -2,9 +2,9 @@
2
2
  +----------------------------------------------------------------------+
3
3
  | Licensed Materials - Property of IBM |
4
4
  | |
5
- | (C) Copyright IBM Corporation 2009, 2010, 2012 |
5
+ | (C) Copyright IBM Corporation 2009 - 2015 |
6
6
  +----------------------------------------------------------------------+
7
- | Authors: Praveen Devarao |
7
+ | Authors: Praveen Devarao, Arvind Gupta |
8
8
  +----------------------------------------------------------------------+
9
9
  */
10
10
 
@@ -21,6 +21,8 @@
21
21
  With this the executing thread will become unblocking allowing concurrent threads perform operations simultaneously.
22
22
  */
23
23
 
24
+ #include "ruby.h"
25
+
24
26
  #include "ruby_ibm_db_cli.h"
25
27
 
26
28
  /*
@@ -60,7 +62,7 @@ int _ruby_ibm_db_SQLDisconnect_helper(SQLHANDLE *hdbc) {
60
62
  Connection level Unblock function. This function is called when a thread interruput is issued while executing a
61
63
  connection level SQL call
62
64
  */
63
- void _ruby_ibm_db_Connection_level_UBF(void *data) {
65
+ void _ruby_ibm_db_Connection_level_UBF(void *data) {
64
66
  return;
65
67
  }
66
68
 
@@ -68,7 +70,10 @@ void _ruby_ibm_db_Connection_level_UBF(void *data) {
68
70
  This function will commit and end the inprogress transaction by issuing a SQLCommit
69
71
  */
70
72
  int _ruby_ibm_db_SQLEndTran(end_tran_args *endtran_args) {
71
- return SQLEndTran( endtran_args->handleType, *(endtran_args->hdbc), endtran_args->completionType );
73
+ int rc = 0;
74
+ rc = SQLEndTran( endtran_args->handleType, *(endtran_args->hdbc), endtran_args->completionType );
75
+ endtran_args->rc = rc;
76
+ return rc;
72
77
  }
73
78
 
74
79
  /*
@@ -82,7 +87,7 @@ int _ruby_ibm_db_SQLDescribeParam_helper(describeparam_args *data) {
82
87
  &(data->sql_precision), &(data->sql_scale), &(data->sql_nullable) );
83
88
 
84
89
  data->stmt_res->is_executing = 0;
85
-
90
+ data->rc = rc;
86
91
  return rc;
87
92
  }
88
93
 
@@ -117,7 +122,6 @@ int _ruby_ibm_db_SQLDescribeCol_helper(describecol_args *data) {
117
122
  */
118
123
  int _ruby_ibm_db_SQLBindCol_helper(bind_col_args *data) {
119
124
  int rc = 0;
120
-
121
125
  data->stmt_res->is_executing = 1;
122
126
 
123
127
  rc = SQLBindCol( (SQLHSTMT) data->stmt_res->hstmt, (SQLUSMALLINT)(data->col_num),
@@ -125,7 +129,6 @@ int _ruby_ibm_db_SQLBindCol_helper(bind_col_args *data) {
125
129
  data->out_length );
126
130
 
127
131
  data->stmt_res->is_executing = 0;
128
-
129
132
  return rc;
130
133
  }
131
134
 
@@ -148,7 +151,7 @@ int _ruby_ibm_db_SQLColumnPrivileges_helper(metadata_args *data) {
148
151
  #endif
149
152
 
150
153
  data->stmt_res->is_executing = 0;
151
-
154
+ data->rc=rc;
152
155
  return rc;
153
156
 
154
157
  }
@@ -172,7 +175,7 @@ int _ruby_ibm_db_SQLColumns_helper(metadata_args *data) {
172
175
  #endif
173
176
 
174
177
  data->stmt_res->is_executing = 0;
175
-
178
+ data->rc = rc;
176
179
  return rc;
177
180
  }
178
181
 
@@ -193,7 +196,7 @@ int _ruby_ibm_db_SQLPrimaryKeys_helper(metadata_args *data) {
193
196
  #endif
194
197
 
195
198
  data->stmt_res->is_executing = 0;
196
-
199
+ data->rc = rc;
197
200
  return rc;
198
201
  }
199
202
 
@@ -216,7 +219,7 @@ int _ruby_ibm_db_SQLForeignKeys_helper(metadata_args *data) {
216
219
  #endif
217
220
 
218
221
  data->stmt_res->is_executing = 0;
219
-
222
+ data->rc = rc;
220
223
  return rc;
221
224
  }
222
225
 
@@ -238,7 +241,7 @@ int _ruby_ibm_db_SQLProcedureColumns_helper(metadata_args *data) {
238
241
  #endif
239
242
 
240
243
  data->stmt_res->is_executing = 0;
241
-
244
+ data->rc = rc;
242
245
  return rc;
243
246
  }
244
247
 
@@ -260,7 +263,7 @@ int _ruby_ibm_db_SQLProcedures_helper(metadata_args *data) {
260
263
  #endif
261
264
 
262
265
  data->stmt_res->is_executing = 0;
263
-
266
+ data->rc = rc;
264
267
  return rc;
265
268
  }
266
269
 
@@ -284,7 +287,7 @@ int _ruby_ibm_db_SQLSpecialColumns_helper(metadata_args *data) {
284
287
  #endif
285
288
 
286
289
  data->stmt_res->is_executing = 0;
287
-
290
+ data->rc = rc;
288
291
  return rc;
289
292
  }
290
293
 
@@ -305,7 +308,7 @@ int _ruby_ibm_db_SQLStatistics_helper(metadata_args *data) {
305
308
  #endif
306
309
 
307
310
  data->stmt_res->is_executing = 0;
308
-
311
+ data->rc= rc;
309
312
  return rc;
310
313
  }
311
314
 
@@ -327,7 +330,7 @@ int _ruby_ibm_db_SQLTablePrivileges_helper(metadata_args *data) {
327
330
  #endif
328
331
 
329
332
  data->stmt_res->is_executing = 0;
330
-
333
+ data->rc = rc;
331
334
  return rc;
332
335
  }
333
336
 
@@ -349,7 +352,7 @@ int _ruby_ibm_db_SQLTables_helper(metadata_args *data) {
349
352
  #endif
350
353
 
351
354
  data->stmt_res->is_executing = 0;
352
-
355
+ data->rc = rc;
353
356
  return rc;
354
357
  }
355
358
 
@@ -362,13 +365,13 @@ int _ruby_ibm_db_SQLExecDirect_helper(exec_cum_prepare_args *data) {
362
365
  data->stmt_res->is_executing = 1;
363
366
 
364
367
  #ifndef UNICODE_SUPPORT_VERSION
365
- rc = SQLExecDirect( (SQLHSTMT) data->stmt_res->hstmt, data->stmt_string, (SQLINTEGER)data->stmt_string_len );
368
+ rc = SQLExecDirect( (SQLHSTMT) data->stmt_res->hstmt, data->stmt_string, (SQLINTEGER)data->stmt_string_len );
366
369
  #else
367
370
  rc = SQLExecDirectW( (SQLHSTMT) data->stmt_res->hstmt, data->stmt_string, (SQLINTEGER)data->stmt_string_len );
368
371
  #endif
369
372
 
370
373
  data->stmt_res->is_executing = 0;
371
-
374
+ data->rc=rc;
372
375
  return rc;
373
376
  }
374
377
 
@@ -422,7 +425,8 @@ int _ruby_ibm_db_SQLCreateDB_helper(create_drop_db_args *data) {
422
425
  rc = (*sqlcreatedb)( (SQLHSTMT) data->conn_res->hdbc, data->dbName, (SQLINTEGER)data->dbName_string_len,
423
426
  data->codeSet, (SQLINTEGER)data->codeSet_string_len,
424
427
  data->mode, (SQLINTEGER)data->mode_string_len );
425
- DLCLOSE( cliLib );
428
+ data->rc =rc;
429
+ DLCLOSE( cliLib );
426
430
  return rc;
427
431
  }
428
432
 
@@ -506,10 +510,10 @@ int _ruby_ibm_db_SQLFreeStmt_helper(free_stmt_args *data) {
506
510
 
507
511
  data->stmt_res->is_executing = 1;
508
512
 
509
- SQLFreeStmt((SQLHSTMT)data->stmt_res->hstmt, data->option );
513
+ rc = SQLFreeStmt((SQLHSTMT)data->stmt_res->hstmt, data->option );
510
514
 
511
515
  data->stmt_res->is_executing = 0;
512
-
516
+ data->rc = rc;
513
517
  return rc;
514
518
  }
515
519
 
@@ -555,7 +559,7 @@ int _ruby_ibm_db_SQLColAttributes_helper(col_attr_args *data) {
555
559
  data->FieldIdentifier, NULL, 0, NULL, &(data->num_attr) );
556
560
 
557
561
  data->stmt_res->is_executing = 0;
558
-
562
+ data->rc = rc;
559
563
  return rc;
560
564
  }
561
565
 
@@ -639,7 +643,7 @@ int _ruby_ibm_db_SQLNextResult_helper(next_result_args *data) {
639
643
  rc = SQLNextResult( (SQLHSTMT) data->stmt_res->hstmt, (SQLHSTMT) *(data->new_hstmt) );
640
644
 
641
645
  data->stmt_res->is_executing = 0;
642
-
646
+ data->rc = rc;
643
647
  return rc;
644
648
  }
645
649
 
@@ -685,7 +689,7 @@ int _ruby_ibm_db_SQLNumResultCols_helper(row_col_count_args *data) {
685
689
  rc = SQLNumResultCols( (SQLHSTMT) data->stmt_res->hstmt, (SQLSMALLINT*) &(data->count) );
686
690
 
687
691
  data->stmt_res->is_executing = 0;
688
-
692
+ data->rc = rc;
689
693
  return rc;
690
694
  }
691
695
 
@@ -735,8 +739,10 @@ int _ruby_ibm_db_SQLGetInfo_helper(get_info_args *data) {
735
739
  */
736
740
  int _ruby_ibm_db_SQLGetDiagRec_helper(get_diagRec_args *data) {
737
741
  #ifdef UNICODE_SUPPORT_VERSION
738
- return SQLGetDiagRecW( data->hType, data->handle, data->recNum, data->SQLState, data->NativeErrorPtr,
742
+ int rc= SQLGetDiagRecW( data->hType, data->handle, data->recNum, data->SQLState, data->NativeErrorPtr,
739
743
  data->msgText, data->buff_length, data->text_length_ptr );
744
+ data->return_code=rc;
745
+ return rc;
740
746
  #else
741
747
  return SQLGetDiagRec(data->hType, data->handle, data->recNum, data->SQLState, data->NativeErrorPtr,
742
748
  data->msgText, data->buff_length, data->text_length_ptr );
@@ -2,9 +2,9 @@
2
2
  +----------------------------------------------------------------------+
3
3
  | Licensed Materials - Property of IBM |
4
4
  | |
5
- | (C) Copyright IBM Corporation 2009, 2010, 2012 |
5
+ | (C) Copyright IBM Corporation 2009 - 2015 |
6
6
  +----------------------------------------------------------------------+
7
- | Authors: Praveen Devarao |
7
+ | Authors: Praveen Devarao, Arvind Gupta |
8
8
  +----------------------------------------------------------------------+
9
9
  */
10
10
 
@@ -89,7 +89,6 @@ typedef struct _conn_handle_struct {
89
89
  SQLSMALLINT ruby_error_msg_len;
90
90
 
91
91
  SQLINTEGER sqlcode;
92
-
93
92
  } conn_handle;
94
93
 
95
94
  typedef union {
@@ -151,6 +150,7 @@ typedef struct _stmt_handle_struct {
151
150
  SQLPOINTER ruby_stmt_err_state;
152
151
  SQLSMALLINT ruby_stmt_err_msg_len;
153
152
  SQLINTEGER sqlcode;
153
+ int rc;
154
154
  } stmt_handle;
155
155
 
156
156
  /*
@@ -180,6 +180,7 @@ typedef struct _ibm_db_end_tran_args_struct {
180
180
  SQLHANDLE *hdbc;
181
181
  SQLSMALLINT handleType;
182
182
  SQLSMALLINT completionType;
183
+ int rc;
183
184
  } end_tran_args;
184
185
 
185
186
  /*
@@ -192,6 +193,7 @@ typedef struct _ibm_db_describeparam_args_struct {
192
193
  SQLUINTEGER sql_precision;
193
194
  SQLSMALLINT sql_scale;
194
195
  SQLSMALLINT sql_nullable;
196
+ int rc;
195
197
  } describeparam_args;
196
198
 
197
199
  /*
@@ -232,6 +234,7 @@ typedef struct _ibm_db_metadata_args_struct {
232
234
  SQLSMALLINT table_type_len;
233
235
  int scope; /*Used in SQLSpecialColumns To determine the scope of the unique row identifier*/
234
236
  int unique; /*Used in SQLStatistics to determine if only unique indexes are to be fetched or all*/
237
+ int rc;
235
238
 
236
239
  } metadata_args;
237
240
 
@@ -246,6 +249,7 @@ typedef struct _ibm_db_exec_direct_args_struct {
246
249
  SQLCHAR *stmt_string;
247
250
  #endif
248
251
  long stmt_string_len;
252
+ int rc;
249
253
  } exec_cum_prepare_args;
250
254
 
251
255
  /*
@@ -265,6 +269,7 @@ typedef struct _ibm_db_create_drop_db_args_struct {
265
269
  long dbName_string_len;
266
270
  long codeSet_string_len;
267
271
  long mode_string_len;
272
+ int rc;
268
273
  } create_drop_db_args;
269
274
 
270
275
  /*
@@ -281,7 +286,7 @@ typedef struct _ibm_db_param_and_put_data_struct {
281
286
  typedef struct _ibm_db_next_result_args_struct {
282
287
  SQLHSTMT *new_hstmt;
283
288
  stmt_handle *stmt_res;
284
-
289
+ int rc;
285
290
  } next_result_args;
286
291
 
287
292
  /*
@@ -290,6 +295,7 @@ typedef struct _ibm_db_next_result_args_struct {
290
295
  typedef struct _ibm_db_row_col_count_struct {
291
296
  stmt_handle *stmt_res;
292
297
  SQLSMALLINT count;
298
+ int rc;
293
299
  } row_col_count_args;
294
300
 
295
301
  /*
@@ -298,6 +304,7 @@ typedef struct _ibm_db_row_col_count_struct {
298
304
  typedef struct _ibm_db_row_count_struct {
299
305
  stmt_handle *stmt_res;
300
306
  SQLINTEGER count;
307
+ int rc;
301
308
  } sql_row_count_args;
302
309
 
303
310
  /*
@@ -308,6 +315,7 @@ typedef struct _ibm_db_col_attr_struct {
308
315
  SQLSMALLINT col_num;
309
316
  SQLSMALLINT FieldIdentifier;
310
317
  SQLINTEGER num_attr;
318
+ int rc;
311
319
  } col_attr_args;
312
320
 
313
321
  /*
@@ -416,6 +424,7 @@ typedef struct _ibm_db_get_info_struct {
416
424
  SQLPOINTER infoValue;
417
425
  SQLSMALLINT buff_length;
418
426
  SQLSMALLINT *out_length;
427
+ VALUE return_value;
419
428
  } get_info_args;
420
429
 
421
430
  /*
@@ -430,6 +439,7 @@ typedef struct _ibm_db_get_diagRec_struct {
430
439
  SQLINTEGER *NativeErrorPtr;
431
440
  SQLSMALLINT buff_length;
432
441
  SQLSMALLINT *text_length_ptr;
442
+ int return_code;
433
443
  } get_diagRec_args;
434
444
 
435
445
  /*
@@ -438,6 +448,7 @@ typedef struct _ibm_db_get_diagRec_struct {
438
448
  typedef struct _ibm_db_free_stmt_struct {
439
449
  stmt_handle *stmt_res;
440
450
  SQLUSMALLINT option;
451
+ int rc;
441
452
  } free_stmt_args;
442
453
 
443
454
  int _ruby_ibm_db_SQLConnect_helper(connect_args *data);
@@ -422,6 +422,7 @@ module ActiveRecord
422
422
  @temporary = temporary
423
423
  @options = options
424
424
  @name = name
425
+ @foreign_keys = {}
425
426
  end
426
427
 
427
428
  def native
@@ -14,7 +14,7 @@ elsif (RUBY_VERSION =~ /2.1./)
14
14
  machine_bits = ['ibm'].pack('p').size * 8
15
15
  if machine_bits == 64
16
16
  #require 'mswin32/rb21x/x64/ibm_db.so'
17
- raise NotImplementedError, "ibm_db with Ruby 2.0 64-bit on Windows platform is not supported. Refer to README for more details"
17
+ raise NotImplementedError, "ibm_db with Ruby 2.1 64-bit on Windows platform is not supported. Refer to README for more details"
18
18
  else
19
19
  require 'mswin32/rb21x/i386/ibm_db.so'
20
20
  end
@@ -23,7 +23,7 @@ elsif (RUBY_VERSION =~ /2.2./ )
23
23
  machine_bits = ['ibm'].pack('p').size * 8
24
24
  if machine_bits == 64
25
25
  #require 'mswin32/rb22x/x64/ibm_db.so'
26
- raise NotImplementedError, "ibm_db with Ruby 2.0 64-bit on Windows platform is not supported. Refer to README for more details"
26
+ raise NotImplementedError, "ibm_db with Ruby 2.2 64-bit on Windows platform is not supported. Refer to README for more details"
27
27
  else
28
28
  require 'mswin32/rb22x/i386/ibm_db.so'
29
29
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ibm_db
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.26
4
+ version: 2.5.27
5
5
  platform: x86-mingw32
6
6
  authors:
7
7
  - IBM
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-08 00:00:00.000000000 Z
11
+ date: 2015-06-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord