Ibm DB Gem Changelog

(click to open)

Quick Page Table of Contents

Scanning…

Ruby ibm_db gem changelog …

Goto Main Page
Goto Documents
Goto Ruby Page

ChangeLog ibm_db
Date Zip Desc
2014–06–10 GA03 (2.5.14) YIPS: 1.9.3, 2.0.0 and 2.1.0 NOT updated
New: Merged all Don’s changes into base driver and adapter
IBM i
> cd test/IBMi
> rake test

LUW-2-IBM i
> cd test/IBMi
> e config.yml               (change *LOCAL to DB2 Connect IBM i)
> export IBM_DB_ON_ERROR=on  (ignore DB2 unsupported attribute)
> rake test
2014–02–26 GA02 (2.5.14) YIPS: 1.9.3, 2.0.0 and 2.1.0 updated
New: Additional trace information GET/SET ATTR
export IBM_DB_TRACE=on

-------------
SQLSetConnectAttr (utf-8 non-wide)  
         20376890 : 21099eb4 00002713  21099eb8 fffffffd  >!.....'.!.......<
     SQLSetConnectAttr = 0
     attr = 10003 (2713)
     value = 1 (1)

New: remove_column auto-answer ignore qsysopr message MSGID(CPA32B2)
  
      def remove_column(table_name,column_name)
        qcmdexc2 "QSYS/CHGJOB INQMSGRPY(*SYSRPYL)"
        qcmdexc2 "ADDRPYLE SEQNBR(9876) MSGID(CPA32B2) RPY(''I'')"
        super(table_name,column_name)
        qcmdexc2 "QSYS/CHGJOB INQMSGRPY(*DFT)"
        qcmdexc2 "RMVRPYLE SEQNBR(9876)"
      end

2014–02–25 GA01 (2.5.14) YIPS: 1.9.3, 2.0.0 and 2.1.0 updated
New: merged all IBM i changes from 2.5.11 into 2.5.14
All YIPS releases updated ...
bash-4.2$ gem list
*** LOCAL GEMS ***
ibm_db (2.5.14, 2.5.11)

To uninstall 2.5.11 ....
bash-4.2$ gem uninstall ibm_db --version 2.5.11 
Successfully uninstalled ibm_db-2.5.11

To fix a rails application ...
bash-4.2$ rake test test/models/history_test.rb test_the_truth
Could not find ibm_db-2.5.11 in any of the sources
Run `bundle install` to install missing gems.
e Gemfile
gem 'ibm_db', '2.5.14'
bash-4.2$ bundle install --local 
2014–02–25 GA28 YIPS: 1.9.3, 2.0.0 and 2.1.0 updated
FIX: Add version.txt to gemspec installation
  gem.files =  Dir.glob("ext/**/*.{h,c,rb}") + 
               Dir['lib/**/*', 'README*', 'LICENSE*', 'README*', 'CHANGES*', 'MANIFEST*', 'version*']

bash-4.2$ cat /PowerRuby/prV1R9M3/lib/ruby/gems/1.9.1/gems/ibm_db-2.5.11/version.txt 
GA28
bash-4.2$ cat /PowerRuby/prV2R0M0/lib/ruby/gems/2.0.0/gems/ibm_db-2.5.11/version.txt 
GA28
bash-4.2$ cat /PowerRuby/prV2R1M0/lib/ruby/gems/2.1.0/gems/ibm_db-2.5.11/version.txt 
GA28
2014–02–24 GA27 YIPS: 1.9.3, 2.0.0 and 2.1.0 updated
FIX: IBM_DB.get_option for connect attributes non-string (get/set conn isolation mode)
FIX: Number of changes related to rake testing (Don list)
=========
ibm_i_dump_savf
  - false          - no CRTSAVF/SAVLIB
  - true (default) - yes CRTSAVF/SAVLIB QGPL/RB36244803
                     where RBnnn one year second scoped timestamp
                     wraps to second (01-01-YYYY-HH:MM:SS)
=========
bash-4.2$ cat config/database.yml 
# profile
db2profile: &db2profile
  adapter: ibm_db
  database: "*LOCAL"
  username: DB2
  password: NICE2DB2
  schema: WART
#  ibm_i_dump_savf: false

development:
  <<: *db2profile

test:
  <<: *db2profile

production:
  <<: *db2profile

===============
rake test 
==============
bash-4.2$ cat test/models/history_test.rb
require 'test_helper'
class HistoryTest < ActiveSupport::TestCase
  test "the truth" do
    assert true
  end
end

bash-4.2$ rake test test/models/history_test.rb test_the_truth
Run options: -n test_the_truth --seed 44398
# Running tests:
.
Finished tests in 0.637105s, 1.5696 tests/s, 1.5696 assertions/s.
1 tests, 1 assertions, 0 failures, 0 errors, 0 skips


================
test log run both false and true
================

bash-4.2$ cat log/test.log 

--> ibm_i_dump_savf: false (false no CRTSAVF/SAVLIB)

   (8.8ms)  SET SCHEMA WART
   (7.4ms)  SET SCHEMA WART
   (7347.9ms) DROP SCHEMA WART
   (12932.7ms) CREATE SCHEMA WART
   (7.3ms)  SET SCHEMA WART
   (8.1ms)  SET SCHEMA WART
   (1192.2ms)  CREATE TABLE histories (id INTEGER GENERATED BY DEFAULT AS IDENTITY (START WITH 1) PRIMARY KEY, command clob(1048576) NOT NULL, created_at timestamp, updated_at timestamp) 
   (624.1ms)  CREATE TABLE schema_migrations (version varchar(255) NOT NULL) 
   (798.0ms)  CREATE UNIQUE INDEX unique_schema_migrations ON schema_migrations (version)
   (19.4ms)  SELECT version FROM schema_migrations
   (118.6ms)  INSERT INTO schema_migrations (version) VALUES ('20140131193446')
   (8.3ms)  SET SCHEMA WART
   (7.8ms)  SET SCHEMA WART
  ActiveRecord::SchemaMigration Load (5.9ms)  SELECT schema_migrations.* FROM schema_migrations 
  ActiveRecord::SchemaMigration Load (1.9ms)  SELECT schema_migrations.* FROM schema_migrations 
  Fixture Delete (116.2ms)  DELETE FROM histories
  fixture insert (126.5ms)  INSERT INTO histories ( command, created_at, updated_at, id) VALUES (?,?,?,?)
  fixture insert (15.9ms)  INSERT INTO histories ( command, created_at, updated_at, id) VALUES (?,?,?,?)
---------------------------
HistoryTest: test_the_truth
---------------------------

--> ibm_i_dump_savf: true  (default true CRTSAVF/SAVLIB occur)

   (7.7ms)  SET SCHEMA WART
   (7.4ms)  SET SCHEMA WART
   (187.8ms) CRTSAVF FILE(QGPL/RB36244803) TEXT(''WART 2014-02-24 12:00:03 -0600'')
   (1140.9ms) SAVLIB LIB(WART) DEV(*SAVF) SAVF(QGPL/RB36244803) CLEAR(*ALL)
   (8523.4ms) DROP SCHEMA WART
   (13181.9ms) CREATE SCHEMA WART
   (8.3ms)  SET SCHEMA WART
   (7.3ms)  SET SCHEMA WART
   (1099.2ms)  CREATE TABLE histories (id INTEGER GENERATED BY DEFAULT AS IDENTITY (START WITH 1) PRIMARY KEY, command clob(1048576) NOT NULL, created_at timestamp, updated_at timestamp) 
   (597.2ms)  CREATE TABLE schema_migrations (version varchar(255) NOT NULL) 
   (739.9ms)  CREATE UNIQUE INDEX unique_schema_migrations ON schema_migrations (version)
   (40.4ms)  SELECT version FROM schema_migrations
   (139.0ms)  INSERT INTO schema_migrations (version) VALUES ('20140131193446')
   (7.2ms)  SET SCHEMA WART
   (7.7ms)  SET SCHEMA WART
  ActiveRecord::SchemaMigration Load (6.1ms)  SELECT schema_migrations.* FROM schema_migrations 
  ActiveRecord::SchemaMigration Load (2.3ms)  SELECT schema_migrations.* FROM schema_migrations 
  Fixture Delete (87.2ms)  DELETE FROM histories
  fixture insert (114.7ms)  INSERT INTO histories ( command, created_at, updated_at, id) VALUES (?,?,?,?)
  fixture insert (21.6ms)  INSERT INTO histories ( command, created_at, updated_at, id) VALUES (?,?,?,?)
---------------------------
HistoryTest: test_the_truth
---------------------------

2014–02–18 GA26 YIPS: 1.9.3, 2.0.0 and 2.1.0 updated
FIX: Enable Rails 2+ rake test restored fully functional create/drop (purge) to profile limit
2014–02–14 GA25 YIPS: 1.9.3, 2.0.0 and 2.1.0 updated
NEW: Enable Rails 2+ rake test
rake test test/models/history_test.rb test_the_truth

============================
test/models/history_test.rb:
============================              
require 'test_helper'

class HistoryTest < ActiveSupport::TestCase
  test "the truth" do
    assert true
  end
end

================
cat log/test.log
================ 
start
   (10.1ms)  SET SCHEMA WART
   (14.1ms)  SET SCHEMA WART
   (7.4ms)  SET SCHEMA WART
   (7.7ms)  SET SCHEMA WART
   (1009.5ms)  DROP TABLE histories  <--- default action rake test (no control)
   (1054.9ms)  CREATE TABLE histories (id INTEGER GENERATED BY DEFAULT AS IDENTITY (START WITH 1) PRIMARY KEY, command clob(1048576) NOT NULL, created_at timestamp, updated_at timestamp) 
   (6.2ms)  SELECT version FROM schema_migrations
   (7.1ms)  SET SCHEMA WART
   (7.8ms)  SET SCHEMA WART
  ActiveRecord::SchemaMigration Load (3.3ms)  SELECT schema_migrations.* FROM schema_migrations 
  ActiveRecord::SchemaMigration Load (2.2ms)  SELECT schema_migrations.* FROM schema_migrations 
  Fixture Delete (80.6ms)  DELETE FROM histories <--- default action rake test (no control)
  fixture insert (100.7ms)  INSERT INTO histories ( command, created_at, updated_at, id) VALUES (?,?,?,?)
  fixture insert (10.5ms)  INSERT INTO histories ( command, created_at, updated_at, id) VALUES (?,?,?,?)
---------------------------
HistoryTest: test_the_truth
---------------------------


==============================
connections/ibm_db_adpater.rb:
==============================
if $rails_merge != 'R3'
  #############################
  # Unit testing (SQLLiteDatabaseTasks, MySQLDatabaseTasks, PostgreSQLDatabaseTasks)
  #############################
  module Tasks # :nodoc:
    class IbmDbDatabaseTasks

Notes:
  IbmDbDatabaseTasks: 
  -- purge and drop are no-op on IBM i
     but topic is still under debate and may change
2014–01–24 GA23 YIPS: 1.9.3, 2.0.0 and 2.1.0 updated
FIX: attempt 3 … trim extra blanks/nulls statistics index column name
2014–01–23 GA22 YIPS: 1.9.3, 2.0.0 and 2.1.0 updated
FIX: attempt 2 … trim extra blanks/nulls statistics index column name
2014–01–23 GA21 YIPS: 1.9.3, 2.0.0 and 2.1.0 updated
FIX: trim extra blanks/nulls statistics index column name
2013–12–19 GA20 YIPS: 1.9.3 and 2.0.0 updated
NEW: added trace display GIL/GVL status
bash-4.2$ export IBM_DB_TRACE=on
bash-4.2$ export IBM_DB_GIL="00111111111111110111111111111101111111101010"
bash-4.2$ export IBM_DB_TRACE=on
bash-4.2$ ruby test_01010_DriverIndexAdd.rb
 _ruby_ibm_db_SQLConnect_GIL_release = 0
 _ruby_ibm_db_SQLDisconnect_GIL_release = 0
 _ruby_ibm_db_SQLEndTran_GIL_release = 1
 _ruby_ibm_db_SQLDescribeParam_GIL_release = 1
 _ruby_ibm_db_SQLDescribeCol_GIL_release = 1
 _ruby_ibm_db_SQLBindCol_GIL_release = 1
 _ruby_ibm_db_SQLColumnPrivileges_GIL_release = 1
 _ruby_ibm_db_SQLColumns_GIL_release = 1
 _ruby_ibm_db_SQLPrimaryKeys_GIL_release = 1
:
2013–12–19 GA19 YIPS: 1.9.3 and 2.0.0 updated
FIX: re-enable GIL/GVL release (Thur Meeting)
ALL CLI operations are enabled GIL/GVL release by default

Env var for GIL/GVL map:
                   00000000001111111111222222222233333333334444
                   01234567890123456789012345678901234567890123
                   ||||||||||||||||||||||||||||||||||||||||||||
export IBM_DB_GIL="10111111111111110111111111111101111111101011"
                   ||||||||||||||||||||||||||||||||||||||||||||
                   |||||||||||||||||||||||||||||||||||||||||||SQLBindParameter
                   ||||||||||||||||||||||||||||||||||||||||||SQLBindFileToParam
                   ||||||||||||||||||||||||||||||||||||||||||SQLRowCount
                   |||||||||||||||||||||||||||||||||||||||||SQLNumParams
                   ||||||||||||||||||||||||||||||||||||||||SQLNumResultCols
                   |||||||||||||||||||||||||||||||||||||||SQLFetch
                   ||||||||||||||||||||||||||||||||||||||SQLFetchScroll
                   |||||||||||||||||||||||||||||||||||||SQLNextResult
                   ||||||||||||||||||||||||||||||||||||SQLGetSubString
                   |||||||||||||||||||||||||||||||||||SQLGetLength
                   ||||||||||||||||||||||||||||||||||SQLGetData
                   |||||||||||||||||||||||||||||||||SQLPutData
                   ||||||||||||||||||||||||||||||||SQLColAttributes
                   |||||||||||||||||||||||||||||||SQLParamData
                   ||||||||||||||||||||||||||||||SQLExecute
                   |||||||||||||||||||||||||||||SQLFreeStmt
                   ||||||||||||||||||||||||||||SQLGetEnvAttr
                   |||||||||||||||||||||||||||SQLGetConnectAttr
                   |||||||||||||||||||||||||SQLGetStmtAttr
                   ||||||||||||||||||||||||SQLSetEnvAttr
                   |||||||||||||||||||||||SQLSetConnectAttr
                   ||||||||||||||||||||||SQLSetStmtAttr
                   |||||||||||||||||||||SQLGetDiagRec
                   ||||||||||||||||||||SQLGetInfo
                   |||||||||||||||||||SQLPrepare
                   ||||||||||||||||||SQLDropDB
                   |||||||||||||||||SQLCreateDB
                   ||||||||||||||||SQLExecDirect
                   |||||||||||||||SQLTables
                   ||||||||||||||SQLTablePrivileges
                   |||||||||||||SQLStatistics
                   ||||||||||||SQLSpecialColumns
                   |||||||||||SQLProcedures
                   ||||||||||SQLProcedureColumns
                   |||||||||SQLForeignKeys
                   ||||||||SQLPrimaryKeys
                   |||||||SQLColumns
                   ||||||SQLColumnPrivilege
                   |||||SQLBindCol
                   ||||SQLDescribeCol
                   |||SQLDescribeParam
                   ||SQLEndTran
                   |SQLDisconnect
                   SQLConnect

2013–12–17 GA18 YIPS: 1.9.3 and 2.0.0 not updated
FIX: fixed a few out dated tests in test/IBMI/tests
FIX: fixed rake test loop ruby 2.0.0 (test_4600 missing Rakefile)
2013–12–17 GA17 YIPS: 1.9.3 and 2.0.0 updated
FIX: re-enable GIL/GVL release (Aaron)
According to Aaron research Rails is connect thread safe …
* A connection pool synchronizes thread access to a limited number of database connections. The basic idea is that each thread checks out a database connection from the pool, uses that connection, and checks the connection back in. ConnectionPool is completely thread-safe, and will ensure that a connection cannot be used by two threads at the same time, as long as ConnectionPool’s contract is correctly followed. It will also handle cases in which there are more threads than connections: if all connections have been checked out, and a thread tries to checkout a connection anyway, then ConnectionPool will wait until some other thread has checked in a connection.
2013–12–12 GA16 YIPS: 1.9.3 and 2.0.0 updated
FIX: additional trim for SQLGetData CHAR/VARCHAR (Tony)
Ruby wants 'Pook', not 'Pook            ' ...

-------------
SQLGetData (utf-8 non-wide)  
         208f7910 : 208f5330 00030001  208f7890 00000010  >..S0......x.....<
         208f7920 : 2ff21070                              >/..p<
     SQLGetData = 1
     nbr = 3 (3)
     type = SQL_CHAR 1 (1)
     buf len = 16 (10)
     out len = 17 (11)
     buff  
         208f7890 : 506f6f6b 20202020  20202020 20202020  >Pook............<
         208f78a0 : 00                                    >.<
=> {"ID"=>0, "BREED"=>"cat", "NAME"=>"Pook", "WEIGHT"=>#<BigDecimal:20878884,'0.32E1',18(18)>}
2013–12–12 GA15 YIPS: 1.9.3 and 2.0.0 updated
FIX: turn off GIL release (Andrea)
(see ibm_db.c PASE compile only)
#ifdef PASE 
#define rb_thread_blocking_region pase_forget_blocking_region
int pase_forget_blocking_region( void * helper, void *args, void *UBF, void * stmt_res ) {
  int(*go)(void *) = helper;
  /* printf ("Lucy i'm home ...\n");*/
  return go(args);
} 
#endif
2013–12–10 GA14 YIPS: 1.9.3 and 2.0.0 updated
FIX: graphic (Aaron)
-- both GRAPHIC/VARGRAPHIC test fine on my V7 machine
-- yips machine has missing character on GRAPHIC test, ok VARGRAPHIC 
   (maybe PTF DB2 differences) 
FIX: index (Aaron)
    stmt = IBM_DB::exec(@@conn,'CREATE TABLE ADD_INDEX_TEST (COL1 VARCHAR(25)DEFAULT NULL)')

    stmt = IBM_DB::prepare(@@conn,'INSERT INTO ADD_INDEX_TEST (COL1) VALUES (?)')
    col1 = "something"
    ret = IBM_DB::execute(stmt,[col1])

    stmt = IBM_DB::prepare(@@conn,'CREATE INDEX INDX1 ON ADD_INDEX_TEST (COL1)')
    ret = IBM_DB::execute(stmt)
2013–12–04 GA12 FIX: PASE VARGRAPHIC and GRAPHIC error(Aaron)
    stmt = IBM_DB::exec(@@conn,'CREATE TABLE VAR_GRAPHIC_TEST (COL1 VARGRAPHIC(25) CCSID 1200 DEFAULT NULL,'\
                                                              'COL2 GRAPHIC(25) CCSID 1200 DEFAULT NULL)')
    stmt = IBM_DB::prepare(@@conn,'INSERT INTO VAR_GRAPHIC_TEST (COL1,COL2) VALUES (?,?)')
    ret = IBM_DB::execute(stmt,["something","something"])

    stmt = IBM_DB::exec(@@conn,'select * from VAR_GRAPHIC_TEST')
    all = Array.new
    while row = IBM_DB::fetch_array(stmt)
      all << row
    end
2013–11–22 GA11 FIX: LUW compile with new ibm_db headers (Tony)
Missing various #defines shared IBM i and LUW
new structure
ruby_ibm_db_cli.h  <-- same, except defines SQL_ moved to luw.h and pase.h
ruby_ibm_db.h      <-- same, except defines SQL_ moved to luw.h and pase.h
ruby_sql_com.h     <-- common, selects correct luw.h OR pase.h (extconf.rb)
ruby_sql_luw.h     <-- LUW define ordinals SQL_ (PASE<>LUW)
ruby_sql_pase.h    <-- PASE define ordinals SQL_ (PASE<>LUW)
New:
Both luw.h and pase.h allow full DB Connect 10.5 IBM i attributes all platforms 
SQL_ATTR_DBC_SYS_NAMING
SQL_IBMi_FMT_ISO ... SQL_IBMi_FMT_JOB
SQL_SEP_SLASH .. SQL_SEP_JOB
and so on (see the headers)
2013–11–22 GA10 FIX: ops check rails 3/4 wrong (Aaron)
if $rails_ver < '4.0.0'
  $rails_merge = 'R3'
else
  $rails_merge = 'R4'
end
2013–11–22 GA9 FIX: check rails 3/4 wrong (Aaron)
if $rails_ver <= '4.0.0'
  $rails_merge = 'R3'
else
  $rails_merge = 'R4'
end

FIX: trace verbose on (all time)

export IBM_DB_TRACE=on        ... output to STDOUT
export IBM_DB_TRACE=./log.txt ... output to file
unset IBM_DB_TRACE            ... was suppose to turn off, but bug 
2013–11–20 GA8 ibm_db.columns fix (Aaron)
Prior to fix ...
irb(main):001:0> class Post42s < ActiveRecord::Base; end
=> nil
irb(main):002:0> Post42s.column_names
=> ["id"]
After fix ...
irb(main):001:0> class Post42s < ActiveRecord::Base; end
=> nil
irb(main):002:0> Post42s.column_names
=> ["id", "title", "text"]
2013–11–13 GA7 initial download