Uploaded image for project: 'Perl Driver'
  1. Perl Driver
  2. PERL-228

'safe => 1' does not work for 'Perl5.8.8-i686-linux-thread-multi' on 'update' commands

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Gone away
    • Affects Version/s: 0.700.0
    • Fix Version/s: None
    • Component/s: Perl driver
    • Labels:
      None

      Description

      Running the Perl driver with Perl 5.8.8/multi-threaded on 32bits/Linux does not work.
      The same test on single-threaded Linux or Solaris is working fine.

      Script is:
      ===========

      my $version = $MongoDB::VERSION;
      print("MongoDB driver version: $version\n");
      print(join("\n", @INC));
      my $conn = MongoDB::MongoClient->new(host => 'localhost');
      my $coll = $conn->get_database('test')->get_collection('perl');
      # 'insert' works
      my $id = $coll->insert({"version" => $version}, {safe => 1});
      # 'update' fails
      $coll->update({"_id" => $id}, {"cmd" => "update"}, {safe => 1});

      =======
      Output and debug info
      =======

      sjc-scmtest-v01:212> ./mongodb_driver_issue.pl
      MongoDB driver version: 0.700.0
      /usr/cisco/packages/cupl/0.0.16/lib/perl5lib/5.8.8/i686-linux-thread-multi
      /usr/cisco/packages/cupl/0.0.16/lib/perl5lib/5.8.8
      /usr/cisco/packages/cupl/0.0.16/lib/perl5lib
      /usr/cisco/packages/perl/perl-5.8.8/lib/5.8.8/i686-linux-thread-multi
      /usr/cisco/packages/perl/perl-5.8.8/lib/5.8.8
      /usr/cisco/packages/perl/perl-5.8.8/lib/site_perl/5.8.8/i686-linux-thread-multi
      /usr/cisco/packages/perl/perl-5.8.8/lib/site_perl/5.8.8
      /usr/cisco/packages/perl/perl-5.8.8/lib/site_perl
      /usr/cisco/packages/cisco-perllib
      exception: unrecognized getLastError mode: 1 at ./mongodb_driver_issue.pl line 22
       
        DB<1> b MongoDB::Collection::_make_safe
       
        DB<3> x $last_error
      0  Tie::IxHash=ARRAY(0xa4f3a04)
         0  HASH(0xa4f3c68)
            'getlasterror' => 0
            'j' => 3
            'w' => 1
            'wtimeout' => 2
         1  ARRAY(0xa502e98)
            0  'getlasterror'
            1  'w'
            2  'wtimeout'
            3  'j'
         2  ARRAY(0xa4f3c80)
            0  1
            1  1
            2  1000
            3  0
         3  0
        
        DB<3>
      MongoDB::Collection::_make_safe(/usr/cisco/packages/cupl/0.0.16/lib/perl5lib/5.8.8/i686-linux-thread-multi/MongoDB/Collection.pm:373):
      373:            Carp::croak $ok->{errmsg};
         DB<3> x $ok
      0  HASH(0xad2a9fc)
         'code' => 14830
         'connectionId' => 17649
         'errmsg' => 'exception: unrecognized getLastError mode: 1'
         'lastOp' => MongoDB::Timestamp=HASH(0xad2ab7c)
            'inc' => 1
            'sec' => 1367531724
         'n' => 0
         'ok' => 0

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: