diff options
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/binary_test.rb | 8 | ||||
-rw-r--r-- | activerecord/test/fixtures/db_definitions/db2.sql | 4 |
2 files changed, 9 insertions, 3 deletions
diff --git a/activerecord/test/binary_test.rb b/activerecord/test/binary_test.rb index b63fbbaede..1e74b023bf 100644 --- a/activerecord/test/binary_test.rb +++ b/activerecord/test/binary_test.rb @@ -7,6 +7,12 @@ class BinaryTest < Test::Unit::TestCase end def test_load_save + # Without using prepared statements, it makes no sense to test + # BLOB data with DB2, because the length of a statement is + # limited to 32KB. + if ActiveRecord::ConnectionAdapters.const_defined? :DB2Adapter + return true if ActiveRecord::Base.connection.instance_of?(ActiveRecord::ConnectionAdapters::DB2Adapter) + end bin = Binary.new bin.data = @data @@ -34,4 +40,4 @@ class BinaryTest < Test::Unit::TestCase File.new(File.dirname(__FILE__)+"/fixtures/associations.png","rb").read end -end
\ No newline at end of file +end diff --git a/activerecord/test/fixtures/db_definitions/db2.sql b/activerecord/test/fixtures/db_definitions/db2.sql index 9361cd5607..7b98f2fa5a 100644 --- a/activerecord/test/fixtures/db_definitions/db2.sql +++ b/activerecord/test/fixtures/db_definitions/db2.sql @@ -119,6 +119,6 @@ CREATE TABLE people ( CREATE TABLE binaries ( id int generated by default as identity (start with +10000), - data mediumblob, + data blob(50000), PRIMARY KEY (id) -);
\ No newline at end of file +); |