Hello community,

here is the log from the commit of package perl-SQL-Statement for 
openSUSE:Factory checked in at 2017-04-12 17:36:03
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-SQL-Statement (Old)
 and      /work/SRC/openSUSE:Factory/.perl-SQL-Statement.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-SQL-Statement"

Wed Apr 12 17:36:03 2017 rev:31 rq:486676 version:1.412

Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-SQL-Statement/perl-SQL-Statement.changes    
2016-04-22 16:24:26.000000000 +0200
+++ 
/work/SRC/openSUSE:Factory/.perl-SQL-Statement.new/perl-SQL-Statement.changes   
    2017-04-12 18:17:49.680282325 +0200
@@ -1,0 +2,21 @@
+Fri Apr  7 06:45:08 UTC 2017 - [email protected]
+
+- updated to 1.412
+   see /usr/share/doc/packages/perl-SQL-Statement/Changes
+
+  1.412        2017-04-06
+      * Release 1.411_001 without further changes as 1.412
+  
+  1.411_001 2017-03-30
+      [Bug fixes]
+      * Fix http://www.perlmonks.org/?node_id=1167381 (NumericEval: fix
+        typo on error handling) (thanks to Yanick Champoux, James R. Leu)
+      * fix repo url and t/02execute.t (Reini Urban, Mohammad S Anwar)
+      * fix test failing with blead-perl (Jens Rehsack)
+  
+      [Improvements]
+      * Refactor constraints processing (Ovidiu Gheorghies)
+      * Support parsing of complex JOIN clause (containing OR and ()'s) (James 
R. Leu)
+      * handle backtick quoting (Ben Hengst)
+
+-------------------------------------------------------------------

Old:
----
  SQL-Statement-1.410.tar.gz

New:
----
  SQL-Statement-1.412.tar.gz

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

Other differences:
------------------
++++++ perl-SQL-Statement.spec ++++++
--- /var/tmp/diff_new_pack.yfJr0T/_old  2017-04-12 18:17:50.336189574 +0200
+++ /var/tmp/diff_new_pack.yfJr0T/_new  2017-04-12 18:17:50.340189008 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package perl-SQL-Statement
 #
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,14 +17,14 @@
 
 
 Name:           perl-SQL-Statement
-Version:        1.410
+Version:        1.412
 Release:        0
 %define cpan_name SQL-Statement
 Summary:        SQL parsing and processing engine
 License:        Artistic-1.0 or GPL-1.0+
 Group:          Development/Libraries/Perl
 Url:            http://search.cpan.org/dist/SQL-Statement/
-Source0:        
http://www.cpan.org/authors/id/R/RE/REHSACK/%{cpan_name}-%{version}.tar.gz
+Source0:        
https://cpan.metacpan.org/authors/id/R/RE/REHSACK/%{cpan_name}-%{version}.tar.gz
 Source1:        cpanspec.yml
 BuildArch:      noarch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
@@ -83,6 +83,7 @@
 
 %files -f %{name}.files
 %defattr(-,root,root,755)
-%doc ARTISTIC-1.0 Changes GPL-1 GPL-2.0 LICENSE README README.md
+%doc Changes GPL-1 GPL-2.0 README README.md
+%license ARTISTIC-1.0 LICENSE
 
 %changelog

++++++ SQL-Statement-1.410.tar.gz -> SQL-Statement-1.412.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SQL-Statement-1.410/Changes 
new/SQL-Statement-1.412/Changes
--- old/SQL-Statement-1.410/Changes     2016-04-11 14:50:15.000000000 +0200
+++ new/SQL-Statement-1.412/Changes     2017-04-06 14:13:43.000000000 +0200
@@ -1,8 +1,23 @@
 Changes log for Perl extension SQL::Statement
 
+1.412  2017-04-06
+    * Release 1.411_001 without further changes as 1.412
+
+1.411_001 2017-03-30
+    [Bug fixes]
+    * Fix http://www.perlmonks.org/?node_id=1167381 (NumericEval: fix
+      typo on error handling) (thanks to Yanick Champoux, James R. Leu)
+    * fix repo url and t/02execute.t (Reini Urban, Mohammad S Anwar)
+    * fix test failing with blead-perl (Jens Rehsack)
+
+    [Improvements]
+    * Refactor constraints processing (Ovidiu Gheorghies)
+    * Support parsing of complex JOIN clause (containing OR and ()'s) (James 
R. Leu)
+    * handle backtick quoting (Ben Hengst)
+
 1.410 2016-04-11
     [Bug fixes]
-    * Fix RT#113625 - Unnecessary x-bits (Kent Fredric)
+    * Fix RT#113625 - Unnecessary x-bits (Kent Fredric, Mohammad S Anwar)
 
     [Documentation]
     * pod2markdown README.md from lib/SQL/Statement.pm
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SQL-Statement-1.410/MANIFEST 
new/SQL-Statement-1.412/MANIFEST
--- old/SQL-Statement-1.410/MANIFEST    2016-04-11 15:06:22.000000000 +0200
+++ new/SQL-Statement-1.412/MANIFEST    2017-04-06 14:47:47.000000000 +0200
@@ -40,8 +40,11 @@
 t/10limit.t
 t/12eval.t
 t/14parse.t
+t/15parse.t
+t/16parse.t
 t/17quoting.t
 t/23dialects.t
+t/99backtick.t
 t/SQLtest.pm
 t/TestLib.pm
 META.yml                                 Module YAML meta-data (added by 
MakeMaker)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SQL-Statement-1.410/META.json 
new/SQL-Statement-1.412/META.json
--- old/SQL-Statement-1.410/META.json   2016-04-11 15:06:22.000000000 +0200
+++ new/SQL-Statement-1.412/META.json   2017-04-06 14:47:47.000000000 +0200
@@ -4,7 +4,7 @@
       "Jeff Zucker <[email protected]>, Jens Rehsack <[email protected]>"
    ],
    "dynamic_config" : 1,
-   "generated_by" : "ExtUtils::MakeMaker version 7.1, CPAN::Meta::Converter 
version 2.150005",
+   "generated_by" : "ExtUtils::MakeMaker version 7.24, CPAN::Meta::Converter 
version 2.150010",
    "license" : [
       "perl_5"
    ],
@@ -91,12 +91,12 @@
       ],
       "repository" : {
          "type" : "git",
-         "url" : "https://github.com:perl5-utils/SQL-Statement.git";,
-         "web" : "https://github.com/perl5-utils/SQL-Statement";
+         "url" : "https://github.com/perl5-dbi/SQL-Statement.git";,
+         "web" : "https://github.com/perl5-dbi/SQL-Statement";
       },
       "x_IRC" : "irc://irc.perl.org/#dbi",
       "x_MailingList" : "mailto:[email protected]'"
    },
-   "version" : "1.410",
-   "x_serialization_backend" : "JSON::PP version 2.27300"
+   "version" : "1.412",
+   "x_serialization_backend" : "JSON::PP version 2.27400_02"
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SQL-Statement-1.410/META.yml 
new/SQL-Statement-1.412/META.yml
--- old/SQL-Statement-1.410/META.yml    2016-04-11 15:06:22.000000000 +0200
+++ new/SQL-Statement-1.412/META.yml    2017-04-06 14:47:47.000000000 +0200
@@ -16,7 +16,7 @@
   DBI: '1.611'
   SQL::Statement: '1.20'
 dynamic_config: 1
-generated_by: 'ExtUtils::MakeMaker version 7.1, CPAN::Meta::Converter version 
2.150005'
+generated_by: 'ExtUtils::MakeMaker version 7.24, CPAN::Meta::Converter version 
2.150010'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -45,6 +45,6 @@
   bugtracker: http://rt.cpan.org/Public/Dist/Display.html?Name=SQL-Statement
   homepage: https://metacpan.org/release/SQL-Statement
   license: http://dev.perl.org/licenses/
-  repository: https://github.com:perl5-utils/SQL-Statement.git
-version: '1.410'
+  repository: https://github.com/perl5-dbi/SQL-Statement.git
+version: '1.412'
 x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SQL-Statement-1.410/Makefile.PL 
new/SQL-Statement-1.412/Makefile.PL
--- old/SQL-Statement-1.410/Makefile.PL 2015-05-22 06:56:20.000000000 +0200
+++ new/SQL-Statement-1.412/Makefile.PL 2017-03-30 10:04:38.000000000 +0200
@@ -65,8 +65,8 @@
             x_IRC         => "irc://irc.perl.org/#dbi",
             x_MailingList => "mailto:dbi-dev\@perl.org'",
             repository    => {
-                url  => 'https://github.com:perl5-utils/SQL-Statement.git',
-                web  => 'https://github.com/perl5-utils/SQL-Statement',
+                url  => 'https://github.com/perl5-dbi/SQL-Statement.git',
+                web  => 'https://github.com/perl5-dbi/SQL-Statement',
                 type => 'git',
             },
             bugtracker => {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SQL-Statement-1.410/lib/SQL/Dialects/ANSI.pm 
new/SQL-Statement-1.412/lib/SQL/Dialects/ANSI.pm
--- old/SQL-Statement-1.410/lib/SQL/Dialects/ANSI.pm    2016-04-11 
14:33:23.000000000 +0200
+++ new/SQL-Statement-1.412/lib/SQL/Dialects/ANSI.pm    2017-04-06 
14:12:09.000000000 +0200
@@ -3,7 +3,7 @@
 #########################################################################
 #
 # This module is copyright (c), 2001,2005 by Jeff Zucker.
-# This module is copyright (c), 2007-2016 by Jens Rehsack.
+# This module is copyright (c), 2007-2017 by Jens Rehsack.
 # All rights reserved.
 #
 # It may be freely distributed under the same terms as Perl itself.
@@ -15,7 +15,7 @@
 use warnings FATAL => "all";
 
 use vars qw($VERSION);
-$VERSION = '1.410';
+$VERSION = '1.412';
 
 use SQL::Dialects::Role;
 
@@ -354,7 +354,7 @@
  This module is
 
  copyright (c) 2001,2005 by Jeff Zucker and
- copyright (c) 2007-2016 by Jens Rehsack.
+ copyright (c) 2007-2017 by Jens Rehsack.
 
  All rights reserved.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SQL-Statement-1.410/lib/SQL/Dialects/AnyData.pm 
new/SQL-Statement-1.412/lib/SQL/Dialects/AnyData.pm
--- old/SQL-Statement-1.410/lib/SQL/Dialects/AnyData.pm 2016-04-11 
14:33:23.000000000 +0200
+++ new/SQL-Statement-1.412/lib/SQL/Dialects/AnyData.pm 2017-04-06 
14:12:09.000000000 +0200
@@ -3,7 +3,7 @@
 #########################################################################
 #
 # This module is copyright (c), 2001,2005 by Jeff Zucker.
-# This module is copyright (c), 2007-2016 by Jens Rehsack.
+# This module is copyright (c), 2007-2017 by Jens Rehsack.
 # All rights reserved.
 #
 # It may be freely distributed under the same terms as Perl itself.
@@ -15,7 +15,7 @@
 use warnings FATAL => "all";
 
 use vars qw($VERSION);
-$VERSION = '1.410';
+$VERSION = '1.412';
 
 use SQL::Dialects::Role;
 
@@ -148,7 +148,7 @@
  This module is
 
  copyright (c) 2001,2005 by Jeff Zucker and
- copyright (c) 2007-2016 by Jens Rehsack.
+ copyright (c) 2007-2017 by Jens Rehsack.
 
  All rights reserved.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SQL-Statement-1.410/lib/SQL/Dialects/CSV.pm 
new/SQL-Statement-1.412/lib/SQL/Dialects/CSV.pm
--- old/SQL-Statement-1.410/lib/SQL/Dialects/CSV.pm     2016-04-11 
14:33:23.000000000 +0200
+++ new/SQL-Statement-1.412/lib/SQL/Dialects/CSV.pm     2017-04-06 
14:12:09.000000000 +0200
@@ -3,7 +3,7 @@
 #########################################################################
 #
 # This module is copyright (c), 2001,2005 by Jeff Zucker.
-# This module is copyright (c), 2007-2016 by Jens Rehsack.
+# This module is copyright (c), 2007-2017 by Jens Rehsack.
 # All rights reserved.
 #
 # It may be freely distributed under the same terms as Perl itself.
@@ -15,7 +15,7 @@
 use warnings FATAL => "all";
 
 use vars qw($VERSION);
-$VERSION = '1.410';
+$VERSION = '1.412';
 
 use SQL::Dialects::Role;
 
@@ -139,7 +139,7 @@
  This module is
 
  copyright (c) 2001,2005 by Jeff Zucker and
- copyright (c) 2007-2016 by Jens Rehsack.
+ copyright (c) 2007-2017 by Jens Rehsack.
 
  All rights reserved.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SQL-Statement-1.410/lib/SQL/Dialects/Role.pm 
new/SQL-Statement-1.412/lib/SQL/Dialects/Role.pm
--- old/SQL-Statement-1.410/lib/SQL/Dialects/Role.pm    2016-04-11 
14:33:23.000000000 +0200
+++ new/SQL-Statement-1.412/lib/SQL/Dialects/Role.pm    2017-04-06 
14:12:09.000000000 +0200
@@ -3,7 +3,7 @@
 #########################################################################
 #
 # This module is copyright (c), 2009 by Michael G. Schwern
-# This module is copyright (c), 2009-2016 by Jens Rehsack.
+# This module is copyright (c), 2009-2017 by Jens Rehsack.
 # All rights reserved.
 #
 # It may be freely distributed under the same terms as Perl itself.
@@ -16,7 +16,7 @@
 
 use base qw(Exporter);
 our @EXPORT  = qw(get_config_as_hash);
-our $VERSION = '1.410';
+our $VERSION = '1.412';
 
 sub get_config_as_hash
 {
@@ -112,7 +112,7 @@
  This module is
 
  copyright (c), 2009 by Michael G. Schwern
- copyright (c), 2009-2016 by Jens Rehsack.
+ copyright (c), 2009-2017 by Jens Rehsack.
 
  All rights reserved.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SQL-Statement-1.410/lib/SQL/Eval.pm 
new/SQL-Statement-1.412/lib/SQL/Eval.pm
--- old/SQL-Statement-1.410/lib/SQL/Eval.pm     2016-04-11 14:33:21.000000000 
+0200
+++ new/SQL-Statement-1.412/lib/SQL/Eval.pm     2017-04-06 14:12:08.000000000 
+0200
@@ -3,7 +3,7 @@
 #########################################################################
 #
 # This module is copyright (c), 2001,2005 by Jeff Zucker.
-# This module is copyright (c), 2007-2016 by Jens Rehsack.
+# This module is copyright (c), 2007-2017 by Jens Rehsack.
 # All rights reserved.
 #
 # It may be freely distributed under the same terms as Perl itself.
@@ -16,7 +16,7 @@
 use warnings FATAL => "all";
 use vars qw($VERSION);
 
-$VERSION = '1.410';
+$VERSION = '1.412';
 
 use Carp qw(croak);
 
@@ -567,7 +567,7 @@
     Email: [email protected]
     Phone: +49 7123 14887
 
-and Copyright (C) 2009, 2016 by
+and Copyright (C) 2009, 2017 by
 
      Jens Rehsack < rehsackATcpan.org>
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SQL-Statement-1.410/lib/SQL/Parser.pm 
new/SQL-Statement-1.412/lib/SQL/Parser.pm
--- old/SQL-Statement-1.410/lib/SQL/Parser.pm   2016-04-11 14:33:22.000000000 
+0200
+++ new/SQL-Statement-1.412/lib/SQL/Parser.pm   2017-04-06 14:12:09.000000000 
+0200
@@ -3,7 +3,7 @@
 ######################################################################
 #
 # This module is copyright (c), 2001,2005 by Jeff Zucker.
-# This module is copyright (c), 2007-2016 by Jens Rehsack.
+# This module is copyright (c), 2007-2017 by Jens Rehsack.
 # All rights reserved.
 #
 # It may be freely distributed under the same terms as Perl itself.
@@ -22,7 +22,7 @@
 use Scalar::Util qw(looks_like_number);
 use Text::Balanced qw(extract_bracketed);
 
-$VERSION = '1.410';
+$VERSION = '1.412';
 
 BEGIN
 {
@@ -60,6 +60,7 @@
     $self->dialect( $self->{dialect} ) unless ( $self->{dialect_set} );
     $sql =~ s/^\s+//;
     $sql =~ s/\s+$//;
+    $sql =~ s/\s*;$//;
     $self->{struct}                    = { dialect => $self->{dialect} };
     $self->{tmp}                       = {};
     $self->{original_string}           = $sql;
@@ -618,11 +619,7 @@
             $tableB = $1;
             my $keycolstr = $2;
             $remainder = $3;
-            if ( $keycolstr =~ m/ OR /i )
-            {
-                return $self->do_err( qq{Can't use OR in an ON clause!}, 1 );
-            }
-            @$keycols = split / AND /i, $keycolstr;
+            @$keycols = split(/ AND|OR /i, $keycolstr);
 
             return undef
               unless $self->TABLE_NAME_LIST( $tableA . ',' . $tableB );
@@ -632,7 +629,8 @@
             for my $keycol (@$keycols)
             {
                 my %is_done;
-                my ( $arg1, $arg2 ) = split( m/ = /, $keycol );
+               $keycol =~ s/\)|\(//g;
+                my ( $arg1, $arg2 ) = split( m/ [>=<] /, $keycol );
                 my ( $c1, $c2 ) = ( $arg1, $arg2 );
                 $c1 =~ s/^.*\.([^\.]+)$/$1/;
                 $c2 =~ s/^.*\.([^\.]+)$/$1/;
@@ -1112,11 +1110,11 @@
         # it seems, perl 5.6 isn't greedy enough .. let's help a bit
         my ($data_types_regex) = join( '|', sort { length($b) <=> length($a) } 
keys %{ $self->{opts}->{valid_data_types} } );
         $data_types_regex =~ s/ /\\ /g;    # backslash spaces to allow the /x 
modifier below
-        my ( $name, $type, $constraints ) = (
+        my ( $name, $type, $suffix ) = (
             $col =~ m/\s*(\S+)\s+                         # capture the column 
name
                         ((?:$data_types_regex|\S+)        # check for all 
allowed data types OR anything that looks like a bad data type to give a good 
error
                         (?:\s*\(\d+(?:\?COMMA\?\d+)?\))?) # allow the data 
type to have a precision specifier such as NUMERIC(4,6) on it
-                        \s*(\W.*|$)                       # capture the 
constraints if any
+                        \s*(\W.*|$)                       # capture the suffix 
of the column definition, e.g. constraints
                      /ix
         );
         return $self->do_err("Column definition is missing a data type!") 
unless ($type);
@@ -1124,37 +1122,27 @@
 
         $name = $self->replace_quoted_ids($name);
 
-        $constraints =~ s/^\s+//;
-        $constraints =~ s/\s+$//;
-        if ($constraints)
-        {
-            $constraints =~ s/PRIMARY KEY/PRIMARY_KEY/i;
-            $constraints =~ s/NOT NULL/NOT_NULL/i;
-            my @c = split m/\s+/, $constraints;
-            my %has_c;
-            for my $constr (@c)
-            {
-                if ( $constr =~ m/^\s*(UNIQUE|NOT_NULL|PRIMARY_KEY)\s*$/i )
-                {
-                    my $cur_c = uc $1;
-                    if ( $has_c{$cur_c}++ )
-                    {
-                        return $self->do_err(qq~Duplicate column constraint: 
'$constr'!~);
-                    }
-                    if ( $cur_c eq 'PRIMARY_KEY' and $primary_defined++ )
-                    {
-                        return $self->do_err(qq{Can't have two PRIMARY KEYs in 
a table!});
-                    }
-                    $constr =~ s/_/ /g;
-                    push @{ 
$self->{struct}->{table_defs}->{columns}->{$name}->{constraints} }, $constr;
+        my @possible_constraints = ('PRIMARY KEY', 'NOT NULL', 'UNIQUE');
 
-                }
-                else
-                {
-                    return $self->do_err("Unknown column constraint: 
'$constr'!");
-                }
-            }
+        for my $constraint (@possible_constraints)
+        {
+            my $count = $suffix =~ s/$constraint//gi;
+            next if $count == 0;
+
+            return $self->do_err(qq~Duplicate column constraint: 
'$constraint'!~)
+                if $count > 1;
+
+            return $self->do_err(qq{Can't have two PRIMARY KEYs in a table!})
+                if $constraint eq 'PRIMARY KEY' and $primary_defined++;
+
+            push @{ 
$self->{struct}->{table_defs}->{columns}->{$name}->{constraints} }, $constraint;
         }
+
+        $suffix =~ s/^\s+//;
+        $suffix =~ s/\s+$//;
+
+        return $self->do_err("Unknown column constraint: '$suffix'!") unless 
($suffix eq '');
+
         $type = uc $type;
         my $length;
         if ( $type =~ m/(.+)\((.+)\)/ )
@@ -1468,8 +1456,17 @@
     $limit_clause =~ s/\s+$//;
 
     return 1 if !$limit_clause;
-    my ( $offset, $limit, $junk ) = split /,/, $limit_clause;
-    return $self->do_err('Bad limit clause!')
+    my $offset;
+    my $limit;
+    my $junk;
+($offset, $limit, $junk ) = split /,|OFFSET/i, $limit_clause;
+    if ($limit_clause =~ m/(\d+)\s+OFFSET\s+(\d+)/) {
+       $limit = $1;
+       $offset = $2;
+    } else {
+       ( $offset, $limit, $junk ) = split /,/i, $limit_clause;
+    }
+    return $self->do_err('Bad limit clause!:'.$limit_clause)
       if ( defined $limit and $limit =~ /[^\d]/ )
       or ( defined $offset and $offset =~ /[^\d]/ )
       or defined $junk;
@@ -2717,11 +2714,16 @@
     {
         return 1;
     }
+    if ( $id =~ m/^[`](.+)[`]$/ )
+    {
+        $id = $1 and return 1;
+    }
     if ( $id =~ m/^(.+)\.([^\.]+)$/ )
     {
         my $schema = $1;    # ignored
         $id = $2;
     }
+    $id =~ s/\(|\)//g;
     return 1 if $id =~ m/^".+?"$/s;    # QUOTED IDENTIFIER
     my $err = "Bad table or column name: '$id' ";    # BAD CHARS
     if ( $id =~ /\W/ )
@@ -3433,7 +3435,7 @@
  This module is
 
  copyright (c) 2001,2005 by Jeff Zucker and
- copyright (c) 2007-2016 by Jens Rehsack.
+ copyright (c) 2007-2017 by Jens Rehsack.
 
  All rights reserved.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SQL-Statement-1.410/lib/SQL/Statement/Function.pm 
new/SQL-Statement-1.412/lib/SQL/Statement/Function.pm
--- old/SQL-Statement-1.410/lib/SQL/Statement/Function.pm       2016-04-11 
14:33:23.000000000 +0200
+++ new/SQL-Statement-1.412/lib/SQL/Statement/Function.pm       2017-04-06 
14:12:09.000000000 +0200
@@ -2,7 +2,7 @@
 
 ######################################################################
 #
-# This module is copyright (c), 2009-2016 by Jens Rehsack.
+# This module is copyright (c), 2009-2017 by Jens Rehsack.
 # All rights reserved.
 #
 # It may be freely distributed under the same terms as Perl itself.
@@ -17,7 +17,7 @@
 use SQL::Statement::Term ();
 @ISA = qw(SQL::Statement::Term);
 
-$VERSION = '1.410';
+$VERSION = '1.412';
 
 =pod
 
@@ -218,14 +218,14 @@
 sub value($)
 {
     my ( $self, $eval ) = @_;
-    my $expr = $self->{EXPR};
     my @vals =
       map { _INSTANCE( $_, 'SQL::Statement::Term' ) ? $_->value($eval) : $_ } 
@{ $self->{PARAMS} };
     foreach my $val (@vals)
     {
-        return $self->do_err(qq~Bad numeric expression '$val'!~)
+        return $self->{OWNER}->do_err(qq~Bad numeric expression '$val'!~)
           unless ( defined( _NUMBER($val) ) );
     }
+    my $expr = $self->{EXPR};
     $expr =~ s/\?(\d+)\?/$vals[$1]/g;
     $expr =~ s/\s//g;
     $expr =~ s/^([\)\(+\-\*\/\%0-9]+)$/$1/;    # untaint
@@ -479,7 +479,7 @@
 
 =head1 AUTHOR AND COPYRIGHT
 
-Copyright (c) 2009-2016 by Jens Rehsack: rehsackATcpan.org
+Copyright (c) 2009-2017 by Jens Rehsack: rehsackATcpan.org
 
 All rights reserved.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SQL-Statement-1.410/lib/SQL/Statement/Functions.pm 
new/SQL-Statement-1.412/lib/SQL/Statement/Functions.pm
--- old/SQL-Statement-1.410/lib/SQL/Statement/Functions.pm      2016-04-11 
14:33:23.000000000 +0200
+++ new/SQL-Statement-1.412/lib/SQL/Statement/Functions.pm      2017-04-06 
14:12:10.000000000 +0200
@@ -4,7 +4,7 @@
 #
 # This module is copyright (c), 2001,2005 by Jeff Zucker.
 # This module is copyright (c), 2011,2012 by Brendan Byrd.
-# This module is copyright (c), 2009-2016 by Jens Rehsack.
+# This module is copyright (c), 2009-2017 by Jens Rehsack.
 # All rights reserved.
 #
 # It may be freely distributed under the same terms as Perl itself.
@@ -235,7 +235,7 @@
 =cut
 
 use vars qw($VERSION);
-$VERSION = '1.410';
+$VERSION = '1.412';
 
 =pod
 
@@ -479,7 +479,7 @@
 =head3 DECODE
 
  # purpose   : compare the first argument against
- #             succeding arguments at position 1 + 2N
+ #             succeeding arguments at position 1 + 2N
  #             (N = 0 to (# of arguments - 2)/2), and if equal,
  #                             return the value of the argument at 1 + 2N + 1; 
if no
  #             arguments are equal, the last argument value is returned
@@ -1297,7 +1297,7 @@
 =head1 AUTHOR & COPYRIGHT
 
 Copyright (c) 2005 by Jeff Zucker: jzuckerATcpan.org
-Copyright (c) 2009-2016 by Jens Rehsack: rehsackATcpan.org
+Copyright (c) 2009-2017 by Jens Rehsack: rehsackATcpan.org
 
 All rights reserved.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SQL-Statement-1.410/lib/SQL/Statement/GetInfo.pm 
new/SQL-Statement-1.412/lib/SQL/Statement/GetInfo.pm
--- old/SQL-Statement-1.410/lib/SQL/Statement/GetInfo.pm        2016-04-11 
14:33:23.000000000 +0200
+++ new/SQL-Statement-1.412/lib/SQL/Statement/GetInfo.pm        2017-04-06 
14:12:10.000000000 +0200
@@ -3,7 +3,7 @@
 ######################################################################
 #
 # This module is copyright (c), 2001,2005 by Jeff Zucker.
-# This module is copyright (c), 2007-2016 by Jens Rehsack.
+# This module is copyright (c), 2007-2017 by Jens Rehsack.
 # All rights reserved.
 #
 # It may be freely distributed under the same terms as Perl itself.
@@ -15,7 +15,7 @@
 use warnings FATAL => "all";
 
 use vars qw($VERSION %info);
-$VERSION = '1.410';
+$VERSION = '1.412';
 
 use SQL::Statement();
 
@@ -580,7 +580,7 @@
  This module is
 
  copyright (c) 2001,2005 by Jeff Zucker and
- copyright (c) 2007-2016 by Jens Rehsack.
+ copyright (c) 2007-2017 by Jens Rehsack.
 
  All rights reserved.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SQL-Statement-1.410/lib/SQL/Statement/Operation.pm 
new/SQL-Statement-1.412/lib/SQL/Statement/Operation.pm
--- old/SQL-Statement-1.410/lib/SQL/Statement/Operation.pm      2016-04-11 
14:33:23.000000000 +0200
+++ new/SQL-Statement-1.412/lib/SQL/Statement/Operation.pm      2017-04-06 
14:12:10.000000000 +0200
@@ -2,7 +2,7 @@
 
 ######################################################################
 #
-# This module is copyright (c), 2009-2016 by Jens Rehsack.
+# This module is copyright (c), 2009-2017 by Jens Rehsack.
 # All rights reserved.
 #
 # It may be freely distributed under the same terms as Perl itself.
@@ -18,7 +18,7 @@
 
 use SQL::Statement::Term ();
 
-our $VERSION = '1.410';
+our $VERSION = '1.412';
 
 @ISA = qw(SQL::Statement::Term);
 
@@ -1057,7 +1057,7 @@
 
 =head1 AUTHOR AND COPYRIGHT
 
-Copyright (c) 2009,2016 by Jens Rehsack: rehsackATcpan.org
+Copyright (c) 2009,2017 by Jens Rehsack: rehsackATcpan.org
 
 All rights reserved.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SQL-Statement-1.410/lib/SQL/Statement/Placeholder.pm 
new/SQL-Statement-1.412/lib/SQL/Statement/Placeholder.pm
--- old/SQL-Statement-1.410/lib/SQL/Statement/Placeholder.pm    2016-04-11 
14:33:23.000000000 +0200
+++ new/SQL-Statement-1.412/lib/SQL/Statement/Placeholder.pm    2017-04-06 
14:12:10.000000000 +0200
@@ -2,7 +2,7 @@
 
 ######################################################################
 #
-# This module is copyright (c), 2009-2016 by Jens Rehsack.
+# This module is copyright (c), 2009-2017 by Jens Rehsack.
 # All rights reserved.
 #
 # It may be freely distributed under the same terms as Perl itself.
@@ -18,7 +18,7 @@
 
 use SQL::Statement::Term ();
 
-our $VERSION = '1.410';
+our $VERSION = '1.412';
 
 @ISA = qw(SQL::Statement::Term);
 
@@ -85,7 +85,7 @@
 
 =head1 AUTHOR AND COPYRIGHT
 
-Copyright (c) 2009-2016 by Jens Rehsack: rehsackATcpan.org
+Copyright (c) 2009-2017 by Jens Rehsack: rehsackATcpan.org
 
 All rights reserved.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SQL-Statement-1.410/lib/SQL/Statement/RAM.pm 
new/SQL-Statement-1.412/lib/SQL/Statement/RAM.pm
--- old/SQL-Statement-1.410/lib/SQL/Statement/RAM.pm    2016-04-11 
14:33:23.000000000 +0200
+++ new/SQL-Statement-1.412/lib/SQL/Statement/RAM.pm    2017-04-06 
14:12:10.000000000 +0200
@@ -5,7 +5,7 @@
 ######################################################################
 #
 # This module is copyright (c), 2001,2005 by Jeff Zucker.
-# This module is copyright (c), 2007-2016 by Jens Rehsack.
+# This module is copyright (c), 2007-2017 by Jens Rehsack.
 # All rights reserved.
 #
 # It may be freely distributed under the same terms as Perl itself.
@@ -17,7 +17,7 @@
 use warnings FATAL => "all";
 
 use vars qw($VERSION);
-$VERSION = '1.410';
+$VERSION = '1.412';
 
 ####################################
 package SQL::Statement::RAM::Table;
@@ -292,7 +292,7 @@
 =head1 AUTHOR AND COPYRIGHT
 
 Copyright (c) 2001,2005 by Jeff Zucker: jzuckerATcpan.org
-Copyright (c) 2007-2016 by Jens Rehsack: rehsackATcpan.org
+Copyright (c) 2007-2017 by Jens Rehsack: rehsackATcpan.org
 
 All rights reserved.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SQL-Statement-1.410/lib/SQL/Statement/Term.pm 
new/SQL-Statement-1.412/lib/SQL/Statement/Term.pm
--- old/SQL-Statement-1.410/lib/SQL/Statement/Term.pm   2016-04-11 
14:33:24.000000000 +0200
+++ new/SQL-Statement-1.412/lib/SQL/Statement/Term.pm   2017-04-06 
14:12:10.000000000 +0200
@@ -2,7 +2,7 @@
 
 ######################################################################
 #
-# This module is copyright (c), 2009-2016 by Jens Rehsack.
+# This module is copyright (c), 2009-2017 by Jens Rehsack.
 # All rights reserved.
 #
 # It may be freely distributed under the same terms as Perl itself.
@@ -13,7 +13,7 @@
 use strict;
 use warnings FATAL => "all";
 
-our $VERSION = '1.410';
+our $VERSION = '1.412';
 
 use Scalar::Util qw(weaken);
 use Carp ();
@@ -236,7 +236,7 @@
 
 =head1 AUTHOR AND COPYRIGHT
 
-Copyright (c) 2009-2016 by Jens Rehsack: rehsackATcpan.org
+Copyright (c) 2009-2017 by Jens Rehsack: rehsackATcpan.org
 
 All rights reserved.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SQL-Statement-1.410/lib/SQL/Statement/TermFactory.pm 
new/SQL-Statement-1.412/lib/SQL/Statement/TermFactory.pm
--- old/SQL-Statement-1.410/lib/SQL/Statement/TermFactory.pm    2016-04-11 
14:33:24.000000000 +0200
+++ new/SQL-Statement-1.412/lib/SQL/Statement/TermFactory.pm    2017-04-06 
14:12:10.000000000 +0200
@@ -2,7 +2,7 @@
 
 ######################################################################
 #
-# This module is copyright (c), 2009-2016 by Jens Rehsack.
+# This module is copyright (c), 2009-2017 by Jens Rehsack.
 # All rights reserved.
 #
 # It may be freely distributed under the same terms as Perl itself.
@@ -22,7 +22,7 @@
 use Params::Util qw(_HASH _ARRAY0 _INSTANCE);
 use Scalar::Util qw(blessed weaken);
 
-our $VERSION = '1.410';
+our $VERSION = '1.412';
 
 my %oplist = (
     '='       => 'Equal',
@@ -218,7 +218,7 @@
 =head1 AUTHOR AND COPYRIGHT
 
 Copyright (c) 2001,2005 by Jeff Zucker: jzuckerATcpan.org
-Copyright (c) 2009-2016 by Jens Rehsack: rehsackATcpan.org
+Copyright (c) 2009-2017 by Jens Rehsack: rehsackATcpan.org
 
 All rights reserved.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SQL-Statement-1.410/lib/SQL/Statement/Util.pm 
new/SQL-Statement-1.412/lib/SQL/Statement/Util.pm
--- old/SQL-Statement-1.410/lib/SQL/Statement/Util.pm   2016-04-11 
14:33:24.000000000 +0200
+++ new/SQL-Statement-1.412/lib/SQL/Statement/Util.pm   2017-04-06 
14:12:10.000000000 +0200
@@ -3,7 +3,7 @@
 ######################################################################
 #
 # This module is copyright (c), 2001,2005 by Jeff Zucker.
-# This module is copyright (c), 2007-2016 by Jens Rehsack.
+# This module is copyright (c), 2007-2017 by Jens Rehsack.
 # All rights reserved.
 #
 # It may be freely distributed under the same terms as Perl itself.
@@ -15,7 +15,7 @@
 use warnings FATAL => "all";
 
 use vars qw($VERSION);
-$VERSION = '1.410';
+$VERSION = '1.412';
 
 sub type
 {
@@ -168,7 +168,7 @@
  This module is
 
  copyright (c) 2001,2005 by Jeff Zucker and
- copyright (c) 2007-2016 by Jens Rehsack.
+ copyright (c) 2007-2017 by Jens Rehsack.
 
  All rights reserved.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SQL-Statement-1.410/lib/SQL/Statement.pm 
new/SQL-Statement-1.412/lib/SQL/Statement.pm
--- old/SQL-Statement-1.410/lib/SQL/Statement.pm        2016-04-11 
14:33:23.000000000 +0200
+++ new/SQL-Statement-1.412/lib/SQL/Statement.pm        2017-04-06 
14:12:09.000000000 +0200
@@ -3,7 +3,7 @@
 #########################################################################
 #
 # This module is copyright (c), 2001,2005 by Jeff Zucker.
-# This module is copyright (c), 2007-2016 by Jens Rehsack.
+# This module is copyright (c), 2007-2017 by Jens Rehsack.
 # All rights reserved.
 #
 # It may be freely distributed under the same terms as Perl itself.
@@ -32,7 +32,7 @@
 
 #use locale;
 
-$VERSION = '1.410';
+$VERSION = '1.412';
 
 sub new
 {
@@ -2750,7 +2750,7 @@
 Rehsack is the maintainer.
 
 Copyright (c) 2001,2005 by Jeff Zucker: jzuckerATcpan.org
-Copyright (c) 2007-2016 by Jens Rehsack: rehsackATcpan.org
+Copyright (c) 2007-2017 by Jens Rehsack: rehsackATcpan.org
 
 Portions Copyright (C) 1998 by Jochen Wiedmann: jwiedATcpan.org
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SQL-Statement-1.410/t/02execute.t 
new/SQL-Statement-1.412/t/02execute.t
--- old/SQL-Statement-1.410/t/02execute.t       2016-02-28 16:19:25.000000000 
+0100
+++ new/SQL-Statement-1.412/t/02execute.t       2017-03-30 10:04:38.000000000 
+0200
@@ -184,9 +184,11 @@
     SKIP: {
        -e 'Bar.pm' and unlink 'Bar.pm';
        my $fh;
-       open( $fh, '>Bar.pm' ) or skip(1, $!);
+       open( $fh, '>Bar.pm' ) or skip($!, 1);
        print $fh "package Bar; sub SQL_FUNCTION_BAR{77};1;";
        close $fh;
+       local @INC;
+       push @INC, "." unless grep { $_ eq "." } @INC;
        $dbh->do("LOAD Bar");
        ok( 77 == $dbh->selectrow_array("SELECT bar()"), 'LOAD FUNCTIONS' );
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SQL-Statement-1.410/t/15parse.t 
new/SQL-Statement-1.412/t/15parse.t
--- old/SQL-Statement-1.410/t/15parse.t 1970-01-01 01:00:00.000000000 +0100
+++ new/SQL-Statement-1.412/t/15parse.t 2017-03-30 10:02:25.000000000 +0200
@@ -0,0 +1,41 @@
+#!/usr/bin/perl -w
+use strict;
+use warnings;
+use lib qw(t);
+
+use Test::More;
+use Test::Deep;
+
+use SQL::Statement;
+use SQL::Parser;
+
+my($stmt,$cache)=(undef,{});
+my $p = SQL::Parser->new();
+
+ok(cmp_parse('SELECT * FROM z LIMIT 5 OFFSET 0','SELECT * FROM z LIMIT 5,0'), 
'limit x offset y');
+
+done_testing();
+
+sub cmp_parse {
+    my ($sql_given,$sql_want) = @_;
+    my($stmt_given,$stmt_want);
+
+    eval {
+        $stmt_given = SQL::Statement->new($sql_given,$p);
+        $stmt_want  = SQL::Statement->new($sql_want,$p);
+    };
+
+    return 0 if $@;
+
+    foreach (qw(
+        command
+        columns
+        column_aliases
+        tables
+    )) {
+        return 0 if !eq_deeply($stmt_given->{$_}, $stmt_want->{$_});
+    }
+
+    return 1;
+}
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SQL-Statement-1.410/t/16parse.t 
new/SQL-Statement-1.412/t/16parse.t
--- old/SQL-Statement-1.410/t/16parse.t 1970-01-01 01:00:00.000000000 +0100
+++ new/SQL-Statement-1.412/t/16parse.t 2017-03-30 10:02:25.000000000 +0200
@@ -0,0 +1,53 @@
+#!/usr/bin/perl -w
+use strict;
+use warnings;
+use lib qw(t);
+
+use Test::More;
+use Test::Deep;
+
+use SQL::Statement;
+use SQL::Parser;
+
+my($stmt,$cache)=(undef,{});
+my $p = SQL::Parser->new();
+my $sql1 = 'SELECT * FROM x JOIN y ON x.a = y.b AND x.c = y.d';
+ok(cmp_parse($sql1,$sql1), 'JOIN with AND');
+
+my $sql2 = 'SELECT * FROM x JOIN y ON x.a = y.b OR x.c = y.d';
+ok(cmp_parse($sql2,$sql2), 'JOIN with OR');
+
+my $sql3 = 'SELECT * FROM x JOIN y ON (x.a = y.b) OR (x.c = y.d)';
+ok(cmp_parse($sql3,$sql3), 'JOIN with OR and ()s');
+
+my $sql4 = 'SELECT * FROM x JOIN y ON (x.a = y.b AND x.x = y.z) OR (x.c = y.d 
OR x.e = y.f)';
+ok(cmp_parse($sql4,$sql4), 'JOIN with complex AND/OR in ()s');
+
+my $sql5 = 'SELECT * FROM x JOIN y ON (x.a = y.b AND x.a > 12 AND x.a < 20) OR 
(x.c = y.d OR x.e = y.f)';
+ok(cmp_parse($sql5,$sql5), 'JOIN with lt"<" and gt">"');
+
+done_testing();
+
+sub cmp_parse {
+    my ($sql_given,$sql_want) = @_;
+    my($stmt_given,$stmt_want);
+
+    eval {
+        $stmt_given = SQL::Statement->new($sql_given,$p);
+        $stmt_want  = SQL::Statement->new($sql_want,$p);
+    };
+
+    return 0 if $@;
+
+    foreach (qw(
+        command
+        columns
+        column_aliases
+        tables
+    )) {
+        return 0 if !eq_deeply($stmt_given->{$_}, $stmt_want->{$_});
+    }
+
+    return 1;
+}
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SQL-Statement-1.410/t/99backtick.t 
new/SQL-Statement-1.412/t/99backtick.t
--- old/SQL-Statement-1.410/t/99backtick.t      1970-01-01 01:00:00.000000000 
+0100
+++ new/SQL-Statement-1.412/t/99backtick.t      2017-03-30 10:02:02.000000000 
+0200
@@ -0,0 +1,74 @@
+#!/usr/bin/perl -w
+use strict;
+use warnings;
+no warnings 'uninitialized';
+use lib qw(t);
+
+use Test::More;
+use Params::Util qw(_INSTANCE);
+use TestLib qw(connect prove_reqs show_reqs);
+
+my ( $required, $recommended ) = prove_reqs();
+my @test_dbds = ( 'SQL::Statement', grep { /^dbd:/i } keys %{$recommended} );
+
+foreach my $test_dbd (@test_dbds)
+{
+    my $dbh;
+
+    # Test RaiseError for prepare errors
+    #
+    my %extra_args;
+    if ( $test_dbd =~ m/^DBD::/i )
+    {
+       $extra_args{sql_dialect} = "ANSI";
+    }
+    $dbh = connect(
+                    $test_dbd,
+                    {
+                       PrintError => 0,
+                       RaiseError => 0,
+                      %extra_args,
+                    }
+                  );
+
+    for my $sql(
+               split /\n/, <<""
+  /* DROP TABLE */
+DROP TABLE `foo`
+  /* DELETE */
+DELETE FROM `foo`
+  /* UPDATE */
+UPDATE `foo` SET bar = 7
+  /* INSERT */
+INSERT INTO `foo` (col1,col2,col7) VALUES ( 'baz', 7, NULL )
+  /* CREATE TABLE */
+CREATE TABLE `foo` ( id INT )
+CREATE LOCAL TEMPORARY TABLE `foo` (id INT)
+CREATE GLOBAL TEMPORARY TABLE `foo` (id INT)
+CREATE TABLE `foo` ( phrase NUMERIC(4,6) )
+  /* SELECT COLUMNS */
+SELECT id, phrase FROM `foo`
+SELECT * FROM `foo`
+  /* SET FUNCTIONS */
+SELECT MAX(`foo`) FROM bar
+  /* ORDER BY */
+SELECT * FROM `foo` ORDER BY bar
+SELECT * FROM `foo` ORDER BY bar, baz
+  /* LIMIT */
+SELECT * FROM `foo` LIMIT 5
+  /* TABLE NAME ALIASES */
+SELECT * FROM `test` as `T1`
+  /* PARENS */
+SELECT * FROM `ztable` WHERE NOT `data` IN ('one','two')
+  /* NOT */
+SELECT * FROM `foo` WHERE NOT bar = 'baz' AND bop = 7 OR NOT blat = bar
+  /* IN */
+SELECT * FROM bar WHERE `foo` IN ('aa','ab','ba','bb')
+  /* BETWEEN */
+SELECT * FROM bar WHERE `foo` BETWEEN ('aa','bb')
+
+              ) {
+       ok( eval { $dbh->prepare($sql); }, "parse '$sql' using $test_dbd" ) or 
diag( $dbh->errstr() );
+    }
+}
+done_testing();


Reply via email to