if ($exception =~ /-Y option/) {
my $w = 'Sybase bulk API operation failed due to character set incompatibility, '
- . 'reverting to regular array inserts. Try unsetting the LANG environment variable'
+ . 'reverting to regular array inserts. Try unsetting the LC_ALL environment variable'
;
$w .= "\n$exception" if $self->debug;
carp $w;
B<NOTE:> the L<add_columns|DBIx::Class::ResultSource/add_columns>
calls in your C<Result> classes B<must> list columns in database order for this
-to work. Also, you may have to unset the C<LANG> environment variable before
+to work. Also, you may have to unset the C<LC_ALL> environment variable before
loading your app, as C<BCP -Y> is not yet supported in DBD::Sybase .
When inserting IMAGE columns using this method, you'll need to use
use Test::More;
use Test::Exception;
+use DBIx::Class::_Util 'sigwarn_silencer';
+
use lib qw(t/lib);
use DBICTest;
unless $storage_type !~ /NoBindVars/i;
lives_ok {
+
+ local $SIG{__WARN__} = sigwarn_silencer(qr/Sybase bulk API operation failed due to character set incompatibility/)
+ unless $ENV{DBICTEST_SYBASE_SUBTEST_RERUN};
+
$schema->resultset('Artist')->populate([
{
name => 'bulk artist 1',
# test invalid _insert_bulk (missing required column)
#
throws_ok {
+ local $SIG{__WARN__} = sigwarn_silencer(qr/Sybase bulk API operation failed due to character set incompatibility/)
+ unless $ENV{DBICTEST_SYBASE_SUBTEST_RERUN};
+
$schema->resultset('Artist')->populate([
{
charfield => 'foo',
is $ping_count, 0, 'no pings';
-# if tests passed and did so under a non-C lang - let's rerun the test
-if (Test::Builder->new->is_passing and $ENV{LANG} and $ENV{LANG} ne 'C') {
- my $oldlang = $ENV{LANG};
- local $ENV{LANG} = 'C';
+# if tests passed and did so under a non-C LC_ALL - let's rerun the test
+if (Test::Builder->new->is_passing and $ENV{LC_ALL} and $ENV{LC_ALL} ne 'C') {
+
+ pass ("Your LC_ALL is set to $ENV{LC_ALL} - retesting with C");
- pass ("Your lang is set to $oldlang - retesting with C");
+ local $ENV{LC_ALL} = 'C';
+ local $ENV{DBICTEST_SYBASE_SUBTEST_RERUN} = 1;
local $ENV{PATH};
my @cmd = map { $_ =~ /(.+)/ } ($^X, __FILE__);