From: Peter Rabbitson Date: Wed, 11 Feb 2015 12:54:36 +0000 (+0100) Subject: Roll back massive unrelated test changeset introduced in 74b5397c X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=28916ecdc2d6c5d420bfb1bd5987df4953f31e28;p=dbsrgits%2FDBIx-Class-Historic.git Roll back massive unrelated test changeset introduced in 74b5397c The actual fix/test are ok (and pushed to main as b00d3209), they just touched too many other unrelated pieces --- diff --git a/t/72pg_bytea.t b/t/72pg_bytea.t index 9a6e4de..ac5b9c4 100644 --- a/t/72pg_bytea.t +++ b/t/72pg_bytea.t @@ -41,9 +41,7 @@ my $dbh = $schema->storage->dbh; id serial NOT NULL PRIMARY KEY, bytea bytea NULL, blob bytea NULL, - blob2 bytea NULL, clob text NULL, - clob2 text NULL, a_memo text NULL ); ],{ RaiseError => 1, PrintError => 1 }); diff --git a/t/73oracle_blob.t b/t/73oracle_blob.t index 55b1daf..22a98c4 100644 --- a/t/73oracle_blob.t +++ b/t/73oracle_blob.t @@ -8,6 +8,21 @@ use Try::Tiny; use DBIx::Class::Optional::Dependencies (); use lib qw(t/lib); + +use DBICTest::Schema::BindType; +BEGIN { + DBICTest::Schema::BindType->add_columns( + 'blb2' => { + data_type => 'blob', + is_nullable => 1, + }, + 'clb2' => { + data_type => 'clob', + is_nullable => 1, + } + ); +} + use DBICTest; my ($dsn, $user, $pass) = @ENV{map { "DBICTEST_ORA_${_}" } qw/DSN USER PASS/}; @@ -59,7 +74,7 @@ SKIP: { my %binstr = ( 'small' => join('', map { chr($_) } ( 1 .. 127 )) ); $binstr{'large'} = $binstr{'small'} x 1024; - my $maxloblen = (length $binstr{'large'}) + 6; + my $maxloblen = (length $binstr{'large'}) + 5; note "Localizing LongReadLen to $maxloblen to avoid truncation of test data"; local $dbh->{'LongReadLen'} = $maxloblen; @@ -86,7 +101,7 @@ SKIP: { my $str = $binstr{$size}; lives_ok { - $rs->create( { 'id' => $id, blob => "blob:$str", clob => "clob:$str", blob2 => "blob2:$str", clob2 => "clob2:$str" } ) + $rs->create( { 'id' => $id, blob => "blob:$str", clob => "clob:$str", blb2 => "blb2:$str", clb2 => "clb2:$str" } ) } "inserted $size without dying"; my %kids = %{$schema->storage->_dbh->{CachedKids}}; @@ -99,8 +114,8 @@ SKIP: { is @objs, 1, 'One row found matching on both LOBs'; ok (try { $objs[0]->blob }||'' eq "blob:$str", 'blob inserted/retrieved correctly'); ok (try { $objs[0]->clob }||'' eq "clob:$str", 'clob inserted/retrieved correctly'); - ok (try { $objs[0]->clob2 }||'' eq "clob2:$str", "clob2 inserted correctly"); - ok (try { $objs[0]->blob2 }||'' eq "blob2:$str", "blob2 inserted correctly"); + ok (try { $objs[0]->clb2 }||'' eq "clb2:$str", "clb2 inserted correctly"); + ok (try { $objs[0]->blb2 }||'' eq "blb2:$str", "blb2 inserted correctly"); { local $TODO = '-like comparison on blobs not tested before ora 10 (fails on 8i)' @@ -125,15 +140,15 @@ SKIP: { lives_ok { $rs->search({ id => $id, blob => "blob:$str", clob => "clob:$str" }) - ->update({ blob => 'updated blob', clob => 'updated clob', clob2 => 'updated clob2', blob2 => 'updated blob2' }); + ->update({ blob => 'updated blob', clob => 'updated clob', clb2 => 'updated clb2', blb2 => 'updated blb2' }); } 'blob UPDATE with blobs in WHERE clause survived'; @objs = $rs->search({ blob => "updated blob", clob => 'updated clob' })->all; is @objs, 1, 'found updated row'; ok (try { $objs[0]->blob }||'' eq "updated blob", 'blob updated/retrieved correctly'); ok (try { $objs[0]->clob }||'' eq "updated clob", 'clob updated/retrieved correctly'); - ok (try { $objs[0]->clob2 }||'' eq "updated clob2", "clob2 updated correctly"); - ok (try { $objs[0]->blob2 }||'' eq "updated blob2", "blob2 updated correctly"); + ok (try { $objs[0]->clb2 }||'' eq "updated clb2", "clb2 updated correctly"); + ok (try { $objs[0]->blb2 }||'' eq "updated blb2", "blb2 updated correctly"); lives_ok { $rs->search({ id => $id }) @@ -164,7 +179,7 @@ sub do_creates { do_clean($dbh); - $dbh->do("CREATE TABLE ${q}bindtype_test${q} (${q}id${q} integer NOT NULL PRIMARY KEY, ${q}bytea${q} integer NULL, ${q}blob${q} blob NULL, ${q}blob2${q} blob NULL, ${q}clob${q} clob NULL, ${q}clob2${q} clob NULL, ${q}a_memo${q} integer NULL)"); + $dbh->do("CREATE TABLE ${q}bindtype_test${q} (${q}id${q} integer NOT NULL PRIMARY KEY, ${q}bytea${q} integer NULL, ${q}blob${q} blob NULL, ${q}blb2${q} blob NULL, ${q}clob${q} clob NULL, ${q}clb2${q} clob NULL, ${q}a_memo${q} integer NULL)"); } # clean up our mess diff --git a/t/746sybase.t b/t/746sybase.t index bc6fd16..af1f7a3 100644 --- a/t/746sybase.t +++ b/t/746sybase.t @@ -349,9 +349,7 @@ SQL id INT IDENTITY PRIMARY KEY, bytea IMAGE NULL, blob IMAGE NULL, - blob2 IMAGE NULL, clob TEXT NULL, - clob2 TEXT NULL, a_memo IMAGE NULL ) ],{ RaiseError => 1, PrintError => 0 }); diff --git a/t/747mssql_ado.t b/t/747mssql_ado.t index 2ca5806..3fd7af6 100644 --- a/t/747mssql_ado.t +++ b/t/747mssql_ado.t @@ -251,9 +251,7 @@ CREATE TABLE bindtype_test id INT IDENTITY NOT NULL PRIMARY KEY, bytea INT NULL, blob IMAGE NULL, - blob2 IMAGE NULL, clob TEXT NULL, - clob2 TEXT NULL, a_memo NTEXT NULL ) ],{ RaiseError => 1, PrintError => 1 }); diff --git a/t/749sqlanywhere.t b/t/749sqlanywhere.t index a1b9d32..396e103 100644 --- a/t/749sqlanywhere.t +++ b/t/749sqlanywhere.t @@ -150,9 +150,7 @@ EOF id INT NOT NULL PRIMARY KEY, bytea INT NULL, blob LONG BINARY NULL, - blob2 LONG BINARY NULL, clob LONG VARCHAR NULL, - clob2 LONG VARCHAR NULL, a_memo INT NULL ) ],{ RaiseError => 1, PrintError => 1 }); diff --git a/t/750firebird.t b/t/750firebird.t index cefb040..d092379 100644 --- a/t/750firebird.t +++ b/t/750firebird.t @@ -271,9 +271,7 @@ EOF "id" INT PRIMARY KEY, "bytea" INT, "blob" BLOB, - "blob2" BLOB, "clob" BLOB SUB_TYPE TEXT, - "clob2" BLOB SUB_TYPE TEXT, "a_memo" INT ) ]); diff --git a/t/751msaccess.t b/t/751msaccess.t index b738783..bf4cdac 100644 --- a/t/751msaccess.t +++ b/t/751msaccess.t @@ -287,9 +287,7 @@ EOF id INT NOT NULL PRIMARY KEY, bytea INT NULL, blob IMAGE NULL, - blob2 IMAGE NULL, clob TEXT NULL, - clob2 TEXT NULL, a_memo MEMO NULL ) ],{ RaiseError => 1, PrintError => 1 }); diff --git a/t/lib/DBICTest/Schema/BindType.pm b/t/lib/DBICTest/Schema/BindType.pm index f8d7e67..97edc8b 100644 --- a/t/lib/DBICTest/Schema/BindType.pm +++ b/t/lib/DBICTest/Schema/BindType.pm @@ -21,18 +21,10 @@ __PACKAGE__->add_columns( data_type => 'blob', is_nullable => 1, }, - 'blob2' => { - data_type => 'blob', - is_nullable => 1, - }, 'clob' => { data_type => 'clob', is_nullable => 1, }, - 'clob2' => { - data_type => 'clob', - is_nullable => 1, - }, 'a_memo' => { data_type => 'memo', is_nullable => 1, diff --git a/t/lib/sqlite.sql b/t/lib/sqlite.sql index 5db7aa1..67c2028 100644 --- a/t/lib/sqlite.sql +++ b/t/lib/sqlite.sql @@ -15,9 +15,7 @@ CREATE TABLE "bindtype_test" ( "id" INTEGER PRIMARY KEY NOT NULL, "bytea" blob, "blob" blob, - "blob2" blob, "clob" clob, - "clob2" clob, "a_memo" memo );