X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F71mysql.t;h=d75474e8361454f63e1425722343ca7ce87b7f25;hb=4e0a89e400d865458081bc5af9e0eedf349f60de;hp=0526dd8c6653f40cbd82d810f7cebc3df3f9d668;hpb=d5dedbd62928f65a9071b4d9b6d56c6b663a073b;p=dbsrgits%2FDBIx-Class.git diff --git a/t/71mysql.t b/t/71mysql.t index 0526dd8..d75474e 100644 --- a/t/71mysql.t +++ b/t/71mysql.t @@ -1,5 +1,5 @@ use strict; -use warnings; +use warnings; use Test::More; use Test::Exception; @@ -75,6 +75,26 @@ $it->next; $it->next; is( $it->next, undef, "next past end of resultset ok" ); +# Limit with select-lock +lives_ok { + $schema->txn_do (sub { + isa_ok ( + $schema->resultset('Artist')->find({artistid => 1}, {for => 'update', rows => 1}), + 'DBICTest::Schema::Artist', + ); + }); +} 'Limited FOR UPDATE select works'; + +# shared-lock +lives_ok { + $schema->txn_do (sub { + isa_ok ( + $schema->resultset('Artist')->find({artistid => 1}, {for => 'shared'}), + 'DBICTest::Schema::Artist', + ); + }); +} 'LOCK IN SHARE MODE select works'; + my $test_type_info = { 'artistid' => { 'data_type' => 'INT', @@ -253,7 +273,6 @@ NULLINSEARCH: { my $ansi_schema = DBICTest::Schema->connect ($dsn, $user, $pass, { on_connect_call => 'set_strict_mode', quote_char => '`', - name_sep => '.' }); my $rs = $ansi_schema->resultset('CD');