Fix ::Sybase::ASE incorrect attempt to retrieve an autoinc on blob inserts
[dbsrgits/DBIx-Class.git] / t / 746sybase.t
index af1f7a3..b339517 100644 (file)
@@ -276,18 +276,23 @@ SQL
 
 # test invalid _insert_bulk (missing required column)
 #
-# There should be a rollback, reconnect and the next valid _insert_bulk should
-# succeed.
   throws_ok {
     $schema->resultset('Artist')->populate([
       {
         charfield => 'foo',
       }
     ]);
-  } qr/no value or default|does not allow null|placeholders/i,
+  }
 # The second pattern is the error from fallback to regular array insert on
 # incompatible charset.
 # The third is for ::NoBindVars with no syb_has_blk.
+  qr/
+    \Qno value or default\E
+      |
+    \Qdoes not allow null\E
+      |
+    \QUnable to invoke fast-path insert without storage placeholder support\E
+  /xi,
   '_insert_bulk with missing required column throws error';
 
 # now test _insert_bulk with IDENTITY_INSERT
@@ -498,6 +503,13 @@ SQL
       $rs->update({ blob => undef });
       is((grep !defined($_->blob), $rs->all), 2);
     } 'blob update to NULL';
+
+    lives_ok {
+      $schema->txn_do(sub {
+        my $created = $rs->create( { clob => "some text" } );
+      });
+    } 'insert blob field in transaction';
+    $ping_count-- if $@; # failure retry triggers a ping
   }
 
 # test MONEY column support (and some other misc. stuff)