# try the same sql with forced multicolumn in
$schema->is_executed_sql_bind( sub {
- local $schema->storage->{_use_multicolumn_in} = 1;
+
+ my $orig_umi = $schema->storage->_use_multicolumn_in;
+ my $sg = Scope::Guard->new(sub {
+ $schema->storage->_use_multicolumn_in($orig_umi);
+ });
+
+ $schema->storage->_use_multicolumn_in(1);
# this can't actually execute on sqlite
eval { $fks_multi->update ({ read_count => \ 'read_count + 1' }) };
$tkfks->search ({}, { rows => 1 })->delete;
is ($tkfks->count, $tkfk_cnt -= 1, 'Only one row deleted');
+throws_ok {
+ $tkfks->search ({}, { rows => 0 })->delete
+} qr/rows attribute must be a positive integer/;
+is ($tkfks->count, $tkfk_cnt, 'Nothing deleted');
# check with sql-equality, as sqlite will accept most bad sql just fine
{