Hello community,

here is the log from the commit of package perl-Apache-Session for 
openSUSE:Factory checked in at 2014-02-24 14:12:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Apache-Session (Old)
 and      /work/SRC/openSUSE:Factory/.perl-Apache-Session.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-Apache-Session"

Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Apache-Session/perl-Apache-Session.changes  
2013-06-06 12:18:50.000000000 +0200
+++ 
/work/SRC/openSUSE:Factory/.perl-Apache-Session.new/perl-Apache-Session.changes 
    2014-02-24 14:12:20.000000000 +0100
@@ -1,0 +2,7 @@
+Mon Feb 24 06:08:02 UTC 2014 - [email protected]
+
+- updated to 1.91
+  - Add a test for RT#50896
+  - 99mysql.t will work more correctly in some corner cases
+
+-------------------------------------------------------------------

Old:
----
  Apache-Session-1.90.tar.gz

New:
----
  Apache-Session-1.91.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-Apache-Session.spec ++++++
--- /var/tmp/diff_new_pack.dVWLFn/_old  2014-02-24 14:12:21.000000000 +0100
+++ /var/tmp/diff_new_pack.dVWLFn/_new  2014-02-24 14:12:21.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package perl-Apache-Session
 #
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -24,7 +24,10 @@
 BuildRequires:  pcre-devel
 BuildRequires:  perl-DBI
 BuildRequires:  perl-macros
-Version:        1.90
+BuildRequires:  perl(Module::Build)
+BuildRequires:  perl(Test::Deep) >= 0.082
+BuildRequires:  perl(Test::Exception) >= 0.15
+Version:        1.91
 Release:        0
 Provides:       Apache-Session
 Requires:       apache2
@@ -35,7 +38,7 @@
 Url:            http://cpan.org/modules/by-module/Apache/
 Source:         Apache-Session-%{version}.tar.gz
 Summary:        persistent storage for arbitrary data
-License:        Artistic-1.0
+License:        Artistic-1.0 or GPL-1.0+
 Group:          Development/Libraries/Perl
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 #BuildRequires: perl(Test::Database)

++++++ Apache-Session-1.90.tar.gz -> Apache-Session-1.91.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Apache-Session-1.90/Build.PL 
new/Apache-Session-1.91/Build.PL
--- old/Apache-Session-1.90/Build.PL    2012-12-24 22:50:55.000000000 +0100
+++ new/Apache-Session-1.91/Build.PL    2014-01-06 23:34:54.000000000 +0100
@@ -8,6 +8,8 @@
 Please use Test::Reporter to report test results - it's the only way to measure
 popularity of distribution.
 
+Or you can add it to stack (means that you use it) on Ohloh: 
https://www.ohloh.net/p/Apache-Session
+
 EOT
 
 if ($]<5.006) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Apache-Session-1.90/CHANGES 
new/Apache-Session-1.91/CHANGES
--- old/Apache-Session-1.90/CHANGES     2013-01-27 14:26:32.000000000 +0100
+++ new/Apache-Session-1.91/CHANGES     2014-01-06 23:38:53.000000000 +0100
@@ -3,6 +3,10 @@
 and tell me what version do you use, why and will you need newer versions
 of Apache::Session.
 
+1.91  2014-01-07 by Alexandr Ciornii, Perl 26th birthday version
+  - Add a test for RT#50896
+  - 99mysql.t will work more correctly in some corner cases
+
 1.90   2013-01-27 by Alexandr Ciornii, Perl 25th birthday version
   - Allow specifying table for Oracle
   - Use Test::Database for tests
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Apache-Session-1.90/META.json 
new/Apache-Session-1.91/META.json
--- old/Apache-Session-1.90/META.json   2013-01-27 14:34:41.000000000 +0100
+++ new/Apache-Session-1.91/META.json   2014-01-06 23:42:56.000000000 +0100
@@ -4,7 +4,7 @@
       "Casey West <casey[at]geeknest.com>"
    ],
    "dynamic_config" : 1,
-   "generated_by" : "Module::Build version 0.4003, CPAN::Meta::Converter 
version 2.112150",
+   "generated_by" : "Module::Build version 0.4007, CPAN::Meta::Converter 
version 2.131490",
    "keywords" : [
       "CGI",
       "session",
@@ -28,11 +28,11 @@
       },
       "runtime" : {
          "requires" : {
-            "Digest::MD5" : 0,
-            "File::Temp" : 0,
-            "IO::File" : 0,
+            "Digest::MD5" : "0",
+            "File::Temp" : "0",
+            "IO::File" : "0",
             "Storable" : "0.6",
-            "constant" : 0,
+            "constant" : "0",
             "perl" : "5.005"
          }
       }
@@ -40,7 +40,7 @@
    "provides" : {
       "Apache::Session" : {
          "file" : "lib/Apache/Session.pm",
-         "version" : "1.90"
+         "version" : "1.91"
       },
       "Apache::Session::DB_File" : {
          "file" : "lib/Apache/Session/DB_File.pm",
@@ -168,5 +168,5 @@
          "url" : "http://github.com/chorny/Apache-Session";
       }
    },
-   "version" : "1.90"
+   "version" : "1.91"
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Apache-Session-1.90/META.yml 
new/Apache-Session-1.91/META.yml
--- old/Apache-Session-1.90/META.yml    2013-01-27 14:34:41.000000000 +0100
+++ new/Apache-Session-1.91/META.yml    2014-01-06 23:42:56.000000000 +0100
@@ -7,7 +7,7 @@
   Test::Exception: 0.15
   Test::More: 0.47
 dynamic_config: 1
-generated_by: 'Module::Build version 0.4003, CPAN::Meta::Converter version 
2.112150'
+generated_by: 'Module::Build version 0.4007, CPAN::Meta::Converter version 
2.131490'
 keywords:
   - CGI
   - session
@@ -20,7 +20,7 @@
 provides:
   Apache::Session:
     file: lib/Apache/Session.pm
-    version: 1.90
+    version: 1.91
   Apache::Session::DB_File:
     file: lib/Apache/Session/DB_File.pm
     version: 1.01
@@ -118,4 +118,4 @@
 resources:
   license: http://dev.perl.org/licenses/
   repository: http://github.com/chorny/Apache-Session
-version: 1.90
+version: 1.91
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Apache-Session-1.90/README 
new/Apache-Session-1.91/README
--- old/Apache-Session-1.90/README      2009-09-15 22:08:50.000000000 +0200
+++ new/Apache-Session-1.91/README      2014-01-06 23:37:50.000000000 +0100
@@ -7,7 +7,7 @@
 DESCRIPTION
 -----------
 
-This is Apache::Session 1.86
+This is Apache::Session 1.91
 
 These modules provide persistent storage for arbitrary data, in arbitrary
 backing stores.  The details of interacting with the backing store are
@@ -23,6 +23,9 @@
 Apache::Session is Copyright (c) 2004-2006 Casey West, <[email protected]>.
 Disribute under the same terms as Perl itself.
 
+Apache::Session is Copyright (c) 2007-2014 Alexandr Ciornii.
+Disribute under the same terms as Perl itself.
+
 PREREQUISITES
 -------------
 
@@ -43,8 +46,8 @@
 Manual:
 
 
-tar -xvzf Apache-Session-1.86.tar.gz
-cd Apache-Session-1.86
+tar -xvzf Apache-Session-1.91.tar.gz
+cd Apache-Session-1.91
 perl Makefile.PL
 make
 make test
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Apache-Session-1.90/lib/Apache/Session/Store/MySQL.pm 
new/Apache-Session-1.91/lib/Apache/Session/Store/MySQL.pm
--- old/Apache-Session-1.90/lib/Apache/Session/Store/MySQL.pm   2009-09-15 
22:08:50.000000000 +0200
+++ new/Apache-Session-1.91/lib/Apache/Session/Store/MySQL.pm   2014-01-06 
13:09:16.000000000 +0100
@@ -1,151 +1,151 @@
-#############################################################################
-#
-# Apache::Session::Store::MySQL
-# Implements session object storage via MySQL
-# Copyright(c) 1998, 1999, 2000, 2004 Jeffrey William Baker ([email protected])
-# Distribute under the Perl License
-#
-############################################################################
-
-package Apache::Session::Store::MySQL;
-
-use strict;
-
-use DBI;
-use Apache::Session::Store::DBI;
-
-use vars qw(@ISA $VERSION);
-
-@ISA = qw(Apache::Session::Store::DBI);
-$VERSION = '1.04';
-
-$Apache::Session::Store::MySQL::DataSource = undef;
-$Apache::Session::Store::MySQL::UserName   = undef;
-$Apache::Session::Store::MySQL::Password   = undef;
-
-sub connection {
-    my $self    = shift;
-    my $session = shift;
-    
-    return if (defined $self->{dbh});
-
-       $self->{'table_name'} = $session->{args}->{TableName} || 
$Apache::Session::Store::DBI::TableName;
-
-    if (exists $session->{args}->{Handle}) {
-        $self->{dbh} = $session->{args}->{Handle};
-        return;
-    }
-
-    my $datasource = $session->{args}->{DataSource} || 
-        $Apache::Session::Store::MySQL::DataSource;
-    my $username = $session->{args}->{UserName} ||
-        $Apache::Session::Store::MySQL::UserName;
-    my $password = $session->{args}->{Password} ||
-        $Apache::Session::Store::MySQL::Password;
-        
-    $self->{dbh} = DBI->connect(
-        $datasource,
-        $username,
-        $password,
-        { RaiseError => 1, AutoCommit => 1 }
-    ) || die $DBI::errstr;
-
-    
-    #If we open the connection, we close the connection
-    $self->{disconnect} = 1;    
-}
-
-sub DESTROY {
-    my $self = shift;
-    
-    if ($self->{disconnect}) {
-        $self->{dbh}->disconnect;
-    }
-}
-
-
-1;
-
-=pod
-
-=head1 NAME
-
-Apache::Session::Store::MySQL - Store persistent data in a MySQL database
-
-=head1 SYNOPSIS
-
- use Apache::Session::Store::MySQL;
-
- my $store = new Apache::Session::Store::MySQL;
-
- $store->insert($ref);
- $store->update($ref);
- $store->materialize($ref);
- $store->remove($ref);
-
-=head1 DESCRIPTION
-
-Apache::Session::Store::MySQL fulfills the storage interface of 
Apache::Session.
-Session data is stored in a MySQL database.
-
-=head1 SCHEMA
-
-To use this module, you will need at least these columns in a table 
-called 'sessions', or another table name if you provide the TableName
-argument:
-
- id char(32)     # or however long your session IDs are.
- a_session text
-
-To create this schema, you can execute this command using the mysql program:
-
- CREATE TABLE sessions (
-    id char(32) not null primary key,
-    a_session text
- );
-
-If you use some other command, ensure that there is a unique index on the
-table's id column.
-
-=head1 CONFIGURATION
-
-The module must know what datasource, username, and password to use when
-connecting to the database.  These values can be set using the options hash
-(see Apache::Session documentation).  The options are:
-
-=over 4
-
-=item DataSource
-
-=item UserName
-
-=item Password
-
-=item TableName
-
-=item Handle
-
-=back
-
-Example:
-
- tie %hash, 'Apache::Session::MySQL', $id, {
-     DataSource => 'dbi:mysql:database',
-     UserName   => 'database_user',
-     Password   => 'K00l',
-     TableName  => 'sessions'
- };
-
-Instead, you may pass in an already-opened DBI handle to your database.
-
- tie %hash, 'Apache::Session::MySQL', $id, {
-     Handle => $dbh
- };
-
-=head1 AUTHOR
-
-This modules was written by Jeffrey William Baker <[email protected]>
-
-=head1 SEE ALSO
-
-L<Apache::Session>
+#############################################################################
+#
+# Apache::Session::Store::MySQL
+# Implements session object storage via MySQL
+# Copyright(c) 1998, 1999, 2000, 2004 Jeffrey William Baker ([email protected])
+# Distribute under the Perl License
+#
+############################################################################
+
+package Apache::Session::Store::MySQL;
+
+use strict;
+
+use DBI;
+use Apache::Session::Store::DBI;
+
+use vars qw(@ISA $VERSION);
+
+@ISA = qw(Apache::Session::Store::DBI);
+$VERSION = '1.04';
+
+$Apache::Session::Store::MySQL::DataSource = undef;
+$Apache::Session::Store::MySQL::UserName   = undef;
+$Apache::Session::Store::MySQL::Password   = undef;
+
+sub connection {
+    my $self    = shift;
+    my $session = shift;
+    
+    return if (defined $self->{dbh});
+
+       $self->{'table_name'} = $session->{args}->{TableName} || 
$Apache::Session::Store::DBI::TableName;
+
+    if (exists $session->{args}->{Handle}) {
+        $self->{dbh} = $session->{args}->{Handle};
+        return;
+    }
+
+    my $datasource = $session->{args}->{DataSource} || 
+        $Apache::Session::Store::MySQL::DataSource;
+    my $username = $session->{args}->{UserName} ||
+        $Apache::Session::Store::MySQL::UserName;
+    my $password = $session->{args}->{Password} ||
+        $Apache::Session::Store::MySQL::Password;
+        
+    $self->{dbh} = DBI->connect(
+        $datasource,
+        $username,
+        $password,
+        { RaiseError => 1, AutoCommit => 1 }
+    ) || die $DBI::errstr;
+
+    
+    #If we open the connection, we close the connection
+    $self->{disconnect} = 1;    
+}
+
+sub DESTROY {
+    my $self = shift;
+    
+    if ($self->{disconnect}) {
+        $self->{dbh}->disconnect;
+    }
+}
+
+
+1;
+
+=pod
+
+=head1 NAME
+
+Apache::Session::Store::MySQL - Store persistent data in a MySQL database
+
+=head1 SYNOPSIS
+
+ use Apache::Session::Store::MySQL;
+
+ my $store = new Apache::Session::Store::MySQL;
+
+ $store->insert($ref);
+ $store->update($ref);
+ $store->materialize($ref);
+ $store->remove($ref);
+
+=head1 DESCRIPTION
+
+Apache::Session::Store::MySQL fulfills the storage interface of 
Apache::Session.
+Session data is stored in a MySQL database.
+
+=head1 SCHEMA
+
+To use this module, you will need at least these columns in a table 
+called 'sessions', or another table name if you provide the TableName
+argument:
+
+ id char(32)     # or however long your session IDs are.
+ a_session blob  # or varbinary if you plan to use a big session (>64k after 
serialization)
+
+To create this schema, you can execute this command using the mysql program:
+
+ CREATE TABLE sessions (
+    id char(32) not null primary key,
+    a_session blob
+ );
+
+If you use some other command, ensure that there is a unique index on the
+table's id column.
+
+=head1 CONFIGURATION
+
+The module must know what datasource, username, and password to use when
+connecting to the database.  These values can be set using the options hash
+(see Apache::Session documentation).  The options are:
+
+=over 4
+
+=item DataSource
+
+=item UserName
+
+=item Password
+
+=item TableName
+
+=item Handle
+
+=back
+
+Example:
+
+ tie %hash, 'Apache::Session::MySQL', $id, {
+     DataSource => 'dbi:mysql:database',
+     UserName   => 'database_user',
+     Password   => 'K00l',
+     TableName  => 'sessions'
+ };
+
+Instead, you may pass in an already-opened DBI handle to your database.
+
+ tie %hash, 'Apache::Session::MySQL', $id, {
+     Handle => $dbh
+ };
+
+=head1 AUTHOR
+
+This modules was written by Jeffrey William Baker <[email protected]>
+
+=head1 SEE ALSO
+
+L<Apache::Session>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Apache-Session-1.90/lib/Apache/Session.pm 
new/Apache-Session-1.91/lib/Apache/Session.pm
--- old/Apache-Session-1.90/lib/Apache/Session.pm       2013-01-27 
14:27:10.000000000 +0100
+++ new/Apache-Session-1.91/lib/Apache/Session.pm       2014-01-06 
23:36:13.000000000 +0100
@@ -325,7 +325,7 @@
 use strict;
 use vars qw($VERSION);
 
-$VERSION = '1.90';
+$VERSION = '1.91';
 $VERSION = eval $VERSION;
 
 #State constants
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Apache-Session-1.90/t/99mysql.t 
new/Apache-Session-1.91/t/99mysql.t
--- old/Apache-Session-1.90/t/99mysql.t 2013-01-27 10:52:08.000000000 +0100
+++ new/Apache-Session-1.91/t/99mysql.t 2014-01-06 15:04:27.000000000 +0100
@@ -23,7 +23,7 @@
 plan skip_all => "No mysql handle reported by Test::Database"
   unless @db_handles;
 
-plan tests => 13;
+plan tests => 23;
 
 my $package = 'Apache::Session::MySQL';
 use_ok $package;
@@ -37,8 +37,13 @@
 my @tables_used = qw/sessions s/;
 sub drop_tables {
     my $dbh = shift;
-    foreach my $table (@_) {
-        $dbh->do("DROP TABLE IF EXISTS $table");
+    my $dblist = join(', ', @_);
+    my $res = $dbh->do("DROP TABLE IF EXISTS $dblist");
+    if (!defined $res and $dbh->errstr =~ /Cannot delete or update a parent 
row: a foreign key constraint/) {
+      my $ary_ref = $dbh->selectcol_arrayref('SHOW TABLES');
+      $dblist = join(', ', @$ary_ref);
+      diag "Found foreign key constraint, trying to drop all tables from DB";
+      $dbh->do("DROP TABLE IF EXISTS $dblist");
     }
 }
 
@@ -49,7 +54,7 @@
         $dbh1->do(<<"EOT");
   CREATE TABLE $table (
     id char(32) not null primary key,
-    a_session text
+    a_session blob
   );
 EOT
     }
@@ -74,6 +79,7 @@
 
 my $foo = $session->{foo} = 'bar';
 my $baz = $session->{baz} = ['tom', 'dick', 'harry'];
+my $test_value = $session->{'test'} = 12; #test for RT#50896
 
 untie %{$session};
 undef $session;
@@ -94,11 +100,14 @@
 
 cmp_deeply $session->{foo}, $foo, "Foo matches";
 cmp_deeply $session->{baz}, $baz, "Baz matches";
+cmp_deeply $session->{test}, $test_value, "test matches";
 
 untie %{$session};
 undef $session;
 $session = {};
 
+{
+
 tie %{$session}, $package, undef, {
     TableName      => 's',
     DataSource     => $dsn,
@@ -112,6 +121,54 @@
 ok tied(%{$session}), 'session tied';
 
 ok exists($session->{_session_id}), 'session id exists';
+my $id1 = $session->{_session_id};
+
+$session{'test'} = 13;
+
+untie %{$session};
+undef $session;
+$session = {};
+
+tie %{$session}, $package, $id1, {
+    TableName      => 's',
+    DataSource     => $dsn,
+    UserName       => $uname,
+    Password       => $upass,
+    LockDataSource => $dsn,
+    LockUserName   => $uname,
+    LockPassword   => $upass,
+};
+
+ok tied(%{$session}), 'session tied';
+
+ok exists($session->{_session_id}), 'session id exists';
+
+is($session->{_session_id}, $id1, 'session id is correct');
+is($session{'test'}, 13, 'correct value retrieved');
+
+untie %{$session};
+undef $session;
+$session = {};
+
+tie %{$session}, $package, $id1, { #test for RT#50896
+    TableName      => 's',
+    DataSource     => $dsn,
+    UserName       => $uname,
+    Password       => $upass,
+    LockDataSource => $dsn,
+    LockUserName   => $uname,
+    LockPassword   => $upass,
+};
+
+ok tied(%{$session}), 'session tied';
+
+ok exists($session->{_session_id}), 'session id exists';
+
+is($session->{_session_id}, $id1, 'session id is correct');
+is($session{'test'}, 13, 'correct value retrieved');
+
+}
+
 
 untie %{$session};
 undef $session;
@@ -130,6 +187,7 @@
 
 cmp_deeply $session->{foo}, $foo, "Foo matches";
 cmp_deeply $session->{baz}, $baz, "Baz matches";
+cmp_deeply $session->{'test'}, $test_value, "test matches";
 
 tied(%{$session})->delete;
 untie %{$session};

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to