Oracle: fix LOB conversions for non-LOBs (RT#69548)
[dbsrgits/DBIx-Class.git] / t / 73oracle.t
index aafd1f0..6e1026e 100644 (file)
@@ -393,7 +393,6 @@ sub _run_tests {
 
     # disable BLOB mega-output
     my $orig_debug = $schema->storage->debug;
-    $schema->storage->debug (0);
 
     local $TODO = 'Something is confusing column bindtype assignment when quotes are active'
                 . ': https://rt.cpan.org/Ticket/Display.html?id=64206'
@@ -403,6 +402,13 @@ sub _run_tests {
     foreach my $size (qw( small large )) {
       $id++;
 
+      if ($size eq 'small') {
+        $schema->storage->debug($orig_debug);
+      }
+      elsif ($size eq 'large') {
+        $schema->storage->debug(0);
+      }
+
       my $str = $binstr{$size};
       lives_ok {
         $rs->create( { 'id' => $id, blob => "blob:$str", clob => "clob:$str" } )
@@ -441,7 +447,7 @@ sub _run_tests {
       is (@objs, 1, 'One row found matching on both LOBs as a subquery');
 
       lives_ok {
-        $rs->search({ blob => "blob:$str", clob => "clob:$str" })
+        $rs->search({ id => $id, blob => "blob:$str", clob => "clob:$str" })
           ->update({ blob => 'updated blob', clob => 'updated clob' });
       } 'blob UPDATE with WHERE clause survived';