Hello community, here is the log from the commit of package perl-DBD-mysql for openSUSE:Factory checked in at 2016-09-05 21:21:33 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-DBD-mysql (Old) and /work/SRC/openSUSE:Factory/.perl-DBD-mysql.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-DBD-mysql" Changes: -------- --- /work/SRC/openSUSE:Factory/perl-DBD-mysql/perl-DBD-mysql.changes 2016-08-05 18:16:43.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.perl-DBD-mysql.new/perl-DBD-mysql.changes 2016-09-05 21:22:15.000000000 +0200 @@ -1,0 +2,54 @@ +Wed Aug 24 05:12:23 UTC 2016 - [email protected] + +- updated to 4.036 + see /usr/share/doc/packages/perl-DBD-mysql/Changes + + 2016-08-23 Patrick Galbraith, Michiel Beijen, DBI/DBD community (4.036) + Stable version, to include all changes since 4.035. + + 2016-08-19 Patrick Galbraith, Michiel Beijen, DBI/DBD community (4.035_03) + * By mistake, when DBD::mysql was compiled against libmariadb, it + did not compile in SSL support. + Reported by Jitka Plesnikova @ Red Hat + (https://rt.cpan.org/Public/Bug/Display.html?id=116959) + (https://bugzilla.redhat.com/show_bug.cgi?id=1366773) + * If the database test server was not on localhost and the test database was + not yet created, we would not correctly create the test database. + Reported by Vladimir Marek. + (https://rt.cpan.org/Ticket/Display.html?id=112072) + + 2016-08-11 Patrick Galbraith, Michiel Beijen, DBI/DBD community (4.035_02) + * Test 56connattr.t failed when run when performance schema is enabled, but + tests were run as a user with limited permissions. + Reported by Jérôme Étévé. + (https://rt.cpan.org/Public/Bug/Display.html?id=115980) + * In 4.033_03 we added a patch from Petr Písař @ Red Hat for a problem on + 64-bit big-endian systems. The patch was applied but the unit test was not, + also, there was no entry in the change log. + Unit test provided by Vladimir Marek. + t/40server_prepare.t test failed on s390x platform. Server-prepared + values of types int, smallint, and tinyint are passed to application + as 32-bit integer. The same buffer was interpreted as long integer + by DBD::MySQL. This caused misaligned read/write and bogus + interpretation of the values. + (https://rt.cpan.org/Public/Bug/Display.html?id=57266) + * Remove dropdb, createdb, reload and shutdown admin functions from perldoc. + These are deprecated by the C API. + Use 'CREATE DATABASE..', 'DROP DATABASE...' and other SQL commands instead. + * Test rt75353-innodb-lock-timeout.t fails on MySQL Server 5.1 and earlier + because innodb_lock_wait_timeout is not modifyable per session. + * Test rt25389-bin-case.t does not work on MySQL Server < 5.1, reported by + GAAS. + + 2016-08-01 Patrick Galbraith, Michiel Beijen, DBI/DBD community (4.035_01) + * Apparently, on t/31insertid.t, there is one test that fails when compiled + against libmysqlclient 5.7 or up; issuing a SELECT statement on the same + database handle that previously executed an INSERT clears + $dbh->{mysql_insertid}, while previously this was retained. + (https://rt.cpan.org/Ticket/Display.html?id=108000) + * Removed appveyor.yml and mysql.mtest from CPAN releases. + * Converted README.pod to README.md because of installation failures on + FreeBSD, reported by Don Randolph. + (https://rt.cpan.org/Public/Bug/Display.html?id=114177) + +------------------------------------------------------------------- Old: ---- DBD-mysql-4.035.tar.gz New: ---- DBD-mysql-4.036.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-DBD-mysql.spec ++++++ --- /var/tmp/diff_new_pack.lNspT5/_old 2016-09-05 21:22:23.000000000 +0200 +++ /var/tmp/diff_new_pack.lNspT5/_new 2016-09-05 21:22:23.000000000 +0200 @@ -17,7 +17,7 @@ Name: perl-DBD-mysql -Version: 4.035 +Version: 4.036 Release: 0 %define cpan_name DBD-mysql Summary: MySQL driver for the Perl5 Database Interface (DBI) @@ -64,6 +64,6 @@ %files -f %{name}.files %defattr(-,root,root,755) -%doc appveyor.yml Changes LICENSE Makefile.PL.embedded myld +%doc Changes LICENSE Makefile.PL.embedded myld README.md %changelog ++++++ DBD-mysql-4.035.tar.gz -> DBD-mysql-4.036.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-mysql-4.035/Changes new/DBD-mysql-4.036/Changes --- old/DBD-mysql-4.035/Changes 2016-07-09 07:46:14.000000000 +0200 +++ new/DBD-mysql-4.036/Changes 2016-08-23 07:58:39.000000000 +0200 @@ -1,3 +1,51 @@ +2016-08-23 Patrick Galbraith, Michiel Beijen, DBI/DBD community (4.036) +Stable version, to include all changes since 4.035. + +2016-08-19 Patrick Galbraith, Michiel Beijen, DBI/DBD community (4.035_03) +* By mistake, when DBD::mysql was compiled against libmariadb, it + did not compile in SSL support. + Reported by Jitka Plesnikova @ Red Hat + (https://rt.cpan.org/Public/Bug/Display.html?id=116959) + (https://bugzilla.redhat.com/show_bug.cgi?id=1366773) +* If the database test server was not on localhost and the test database was + not yet created, we would not correctly create the test database. + Reported by Vladimir Marek. + (https://rt.cpan.org/Ticket/Display.html?id=112072) + +2016-08-11 Patrick Galbraith, Michiel Beijen, DBI/DBD community (4.035_02) +* Test 56connattr.t failed when run when performance schema is enabled, but + tests were run as a user with limited permissions. + Reported by Jérôme Étévé. + (https://rt.cpan.org/Public/Bug/Display.html?id=115980) +* In 4.033_03 we added a patch from Petr Písař @ Red Hat for a problem on + 64-bit big-endian systems. The patch was applied but the unit test was not, + also, there was no entry in the change log. + Unit test provided by Vladimir Marek. + t/40server_prepare.t test failed on s390x platform. Server-prepared + values of types int, smallint, and tinyint are passed to application + as 32-bit integer. The same buffer was interpreted as long integer + by DBD::MySQL. This caused misaligned read/write and bogus + interpretation of the values. + (https://rt.cpan.org/Public/Bug/Display.html?id=57266) +* Remove dropdb, createdb, reload and shutdown admin functions from perldoc. + These are deprecated by the C API. + Use 'CREATE DATABASE..', 'DROP DATABASE...' and other SQL commands instead. +* Test rt75353-innodb-lock-timeout.t fails on MySQL Server 5.1 and earlier + because innodb_lock_wait_timeout is not modifyable per session. +* Test rt25389-bin-case.t does not work on MySQL Server < 5.1, reported by + GAAS. + +2016-08-01 Patrick Galbraith, Michiel Beijen, DBI/DBD community (4.035_01) +* Apparently, on t/31insertid.t, there is one test that fails when compiled + against libmysqlclient 5.7 or up; issuing a SELECT statement on the same + database handle that previously executed an INSERT clears + $dbh->{mysql_insertid}, while previously this was retained. + (https://rt.cpan.org/Ticket/Display.html?id=108000) +* Removed appveyor.yml and mysql.mtest from CPAN releases. +* Converted README.pod to README.md because of installation failures on + FreeBSD, reported by Don Randolph. + (https://rt.cpan.org/Public/Bug/Display.html?id=114177) + 2016-07-09 Patrick Galbraith, Michiel Beijen, DBI/DBD community (4.035) * Add DBI back to configure_requires, fix by miyagawa. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-mysql-4.035/MANIFEST new/DBD-mysql-4.036/MANIFEST --- old/DBD-mysql-4.035/MANIFEST 2016-07-09 07:49:56.000000000 +0200 +++ new/DBD-mysql-4.036/MANIFEST 2016-08-23 07:58:58.000000000 +0200 @@ -1,4 +1,3 @@ -appveyor.yml Changes constants.h dbdimp.c @@ -14,7 +13,7 @@ MANIFEST.SKIP myld mysql.xs -README.pod +README.md t/00base.t t/05dbcreate.t t/10connect.t @@ -43,6 +42,7 @@ t/40types.t t/41bindparam.t t/41blobs_prepare.t +t/41int_min_max.t t/42bindparam.t t/43count_params.t t/50chopblanks.t @@ -73,7 +73,6 @@ t/lib.pl t/manifest.t t/mysql.dbtest -t/mysql.mtest t/pod.t t/rt25389-bin-case.t t/rt50304-column_info_parentheses.t diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-mysql-4.035/MANIFEST.SKIP new/DBD-mysql-4.036/MANIFEST.SKIP --- old/DBD-mysql-4.035/MANIFEST.SKIP 2015-12-21 17:53:50.000000000 +0100 +++ new/DBD-mysql-4.036/MANIFEST.SKIP 2016-08-01 08:26:44.000000000 +0200 @@ -8,9 +8,11 @@ \.bak$ \.tmp$ \.o$ +t/mysql.mtest ^MYMETA mysql.c mysql.xsi mysql.bs +appveyor.yml .mailmap .travis.yml diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-mysql-4.035/META.json new/DBD-mysql-4.036/META.json --- old/DBD-mysql-4.035/META.json 2016-07-09 07:49:56.000000000 +0200 +++ new/DBD-mysql-4.036/META.json 2016-08-23 07:58:58.000000000 +0200 @@ -4,7 +4,7 @@ "Patrick Galbraith <[email protected]>" ], "dynamic_config" : 1, - "generated_by" : "ExtUtils::MakeMaker version 6.66, CPAN::Meta::Converter version 2.120921", + "generated_by" : "ExtUtils::MakeMaker version 7.18, CPAN::Meta::Converter version 2.150005", "license" : [ "perl_5" ], @@ -22,10 +22,7 @@ "prereqs" : { "build" : { "requires" : { - "ExtUtils::MakeMaker" : "0", - "Test::Deep" : "0", - "Test::Simple" : "0.90", - "Time::HiRes" : "0" + "ExtUtils::MakeMaker" : "0" } }, "configure" : { @@ -39,6 +36,13 @@ "DBI" : "1.609", "perl" : "5.008001" } + }, + "test" : { + "requires" : { + "Test::Deep" : "0", + "Test::Simple" : "0.90", + "Time::HiRes" : "0" + } } }, "release_status" : "stable", @@ -53,7 +57,7 @@ "x_IRC" : "irc://irc.perl.org/#dbi", "x_MailingList" : "mailto:[email protected]" }, - "version" : "4.035", + "version" : "4.036", "x_contributors" : [ "Alexandr Ciornii <[email protected]>", "Alexey Molchanov <[email protected]>", @@ -104,5 +108,6 @@ "tokuhirom <[email protected]>", "zefram <[email protected]>", "zentooo <[email protected]>" - ] + ], + "x_serialization_backend" : "JSON::PP version 2.27300" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-mysql-4.035/META.yml new/DBD-mysql-4.036/META.yml --- old/DBD-mysql-4.035/META.yml 2016-07-09 07:49:55.000000000 +0200 +++ new/DBD-mysql-4.036/META.yml 2016-08-23 07:58:58.000000000 +0200 @@ -3,34 +3,34 @@ author: - 'Patrick Galbraith <[email protected]>' build_requires: - ExtUtils::MakeMaker: 0 - Test::Deep: 0 - Test::Simple: 0.90 - Time::HiRes: 0 + ExtUtils::MakeMaker: '0' + Test::Deep: '0' + Test::Simple: '0.90' + Time::HiRes: '0' configure_requires: - DBI: 1.609 - Data::Dumper: 0 + DBI: '1.609' + Data::Dumper: '0' dynamic_config: 1 -generated_by: 'ExtUtils::MakeMaker version 6.66, CPAN::Meta::Converter version 2.120921' +generated_by: 'ExtUtils::MakeMaker version 7.18, CPAN::Meta::Converter version 2.150005' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html - version: 1.4 + version: '1.4' name: DBD-mysql no_index: directory: - t - inc requires: - DBI: 1.609 - perl: 5.008001 + DBI: '1.609' + perl: '5.008001' resources: + IRC: irc://irc.perl.org/#dbi + MailingList: mailto:[email protected] homepage: http://dbi.perl.org/ license: http://dev.perl.org/licenses/ repository: https://github.com/perl5-dbi/DBD-mysql - x_IRC: irc://irc.perl.org/#dbi - x_MailingList: mailto:[email protected] -version: 4.035 +version: '4.036' x_contributors: - 'Alexandr Ciornii <[email protected]>' - 'Alexey Molchanov <[email protected]>' @@ -81,3 +81,4 @@ - 'tokuhirom <[email protected]>' - 'zefram <[email protected]>' - 'zentooo <[email protected]>' +x_serialization_backend: 'CPAN::Meta::YAML version 0.018' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-mysql-4.035/Makefile.PL new/DBD-mysql-4.036/Makefile.PL --- old/DBD-mysql-4.035/Makefile.PL 2016-07-09 07:47:08.000000000 +0200 +++ new/DBD-mysql-4.036/Makefile.PL 2016-08-18 09:49:47.000000000 +0200 @@ -680,8 +680,8 @@ MSG } elsif ($param eq "nossl") { - $opt->{$param} = ($opt->{"libs"} =~ /ssl/) ? 1 : 0; - $source->{$param} = $opt->{$param} ? "choice" : "default"; + $source->{$param} = $opt->{$param} ? "User's choice" : "default"; + $opt->{$param} = $opt->{$param} || 0; } elsif ($param eq "ssl") { # default, for legacy reasons diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-mysql-4.035/README.md new/DBD-mysql-4.036/README.md --- old/DBD-mysql-4.035/README.md 1970-01-01 01:00:00.000000000 +0100 +++ new/DBD-mysql-4.036/README.md 2016-08-01 08:26:44.000000000 +0200 @@ -0,0 +1,22 @@ +# DBD::mysql - database driver for Perl + +This is the Perl [DBI](https://metacpan.org/pod/DBI) driver for access to MySQL databases. + +## Usage + +Usage is described in [DBD::mysql](https://metacpan.org/pod/DBD::mysql). + +## Installation + +Installation is described in [DBD::mysql::INSTALL](https://metacpan.org/pod/DBD::mysql::INSTALL). + +## Support + +This module is maintained and supported on a mailing list, dbi-users. +To subscribe to this list, send an email to + + [email protected] + +Mailing list archives are at + +[http://groups.google.com/group/perl.dbi.users](http://groups.google.com/group/perl.dbi.users) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-mysql-4.035/README.pod new/DBD-mysql-4.036/README.pod --- old/DBD-mysql-4.035/README.pod 2015-12-21 17:53:50.000000000 +0100 +++ new/DBD-mysql-4.036/README.pod 1970-01-01 01:00:00.000000000 +0100 @@ -1,32 +0,0 @@ -=for HTML <a href="https://travis-ci.org/perl5-dbi/DBD-mysql"><img src="https://travis-ci.org/perl5-dbi/DBD-mysql.svg?branch=master"></a> - -=head1 DBD::mysql - database driver for Perl - -This is the Perl L<DBI> driver for access to MySQL databases. - - -=head2 Usage - -Usage is described in L<DBD::mysql>. - - -=head2 Installation - -Installation is described in L<DBD::mysql::INSTALL>. - - -=head2 Support - -The driver is maintained by a mailing list: - -This module is maintained and supported on a mailing list, dbi-users. -To subscribe to this list, send an email to - [email protected] - -Mailing list archives are at - -L<http://groups.google.com/group/perl.dbi.users> - -You can also get help from the maintainer, Patrick Galbraith [email protected] - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-mysql-4.035/appveyor.yml new/DBD-mysql-4.036/appveyor.yml --- old/DBD-mysql-4.035/appveyor.yml 2015-12-21 17:53:50.000000000 +0100 +++ new/DBD-mysql-4.036/appveyor.yml 1970-01-01 01:00:00.000000000 +0100 @@ -1,19 +0,0 @@ -version: 1.0.{build} - -services: - - mysql - -install: - - cinst StrawberryPerl - - path C:\strawberry\perl\bin;C:\strawberry\perl\site\bin;C:\strawberry\c\bin;%PATH% - - mkdir %APPVEYOR_BUILD_FOLDER%\tmp - - set TMPDIR=%APPVEYOR_BUILD_FOLDER%\tmp - - perl -V - - cpan App::cpanminus - - cpanm -q --showdeps --with-develop --with-suggests . | findstr /v "^perl\>" | cpanm -n - -build_script: - - perl Makefile.PL --mysql_config=c:\strawberry\c\bin\mysql_config.bat --testuser=root --testpassword=Password12! - -test_script: - - dmake test diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-mysql-4.035/lib/Bundle/DBD/mysql.pm new/DBD-mysql-4.036/lib/Bundle/DBD/mysql.pm --- old/DBD-mysql-4.035/lib/Bundle/DBD/mysql.pm 2016-07-09 07:45:18.000000000 +0200 +++ new/DBD-mysql-4.036/lib/Bundle/DBD/mysql.pm 2016-08-23 07:58:39.000000000 +0200 @@ -3,7 +3,7 @@ use strict; use warnings; -our $VERSION = '4.035'; +our $VERSION = '4.036'; 1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-mysql-4.035/lib/DBD/mysql.pm new/DBD-mysql-4.036/lib/DBD/mysql.pm --- old/DBD-mysql-4.035/lib/DBD/mysql.pm 2016-07-09 07:44:53.000000000 +0200 +++ new/DBD-mysql-4.036/lib/DBD/mysql.pm 2016-08-23 07:58:39.000000000 +0200 @@ -15,7 +15,7 @@ # SQL_DRIVER_VER is formatted as dd.dd.dddd # for version 5.x please switch to 5.00(_00) version numbering # keep $VERSION in Bundle/DBD/mysql.pm in sync -our $VERSION = '4.035'; +our $VERSION = '4.036'; bootstrap DBD::mysql $VERSION; @@ -898,37 +898,19 @@ use DBI; - $dsn = "DBI:mysql:database=$database;host=$hostname;port=$port"; - - $dbh = DBI->connect($dsn, $user, $password); + my $dsn = "DBI:mysql:database=$database;host=$hostname;port=$port"; + my $dbh = DBI->connect($dsn, $user, $password); - - $drh = DBI->install_driver("mysql"); - @databases = DBI->data_sources("mysql"); - or - @databases = DBI->data_sources("mysql", - {"host" => $host, "port" => $port, "user" => $user, password => $pass}); - - $sth = $dbh->prepare("SELECT * FROM foo WHERE bla"); - or - $sth = $dbh->prepare("LISTFIELDS $table"); - or - $sth = $dbh->prepare("LISTINDEX $table $index"); - $sth->execute; - $numRows = $sth->rows; - $numFields = $sth->{'NUM_OF_FIELDS'}; + my $sth = $dbh->prepare( + 'SELECT id, first_name, last_name FROM authors WHERE last_name = ?') + or die "prepare statement failed: $dbh->errstr()"; + $sth->execute('Eggers') or die "execution failed: $dbh->errstr()"; + print $sth->rows . " rows found.\n"; + while (my $ref = $sth->fetchrow_hashref()) { + print "Found a row: id = $ref->{'id'}, fn = $ref->{'first_name'}\n"; + } $sth->finish; - $rc = $drh->func('createdb', $database, $host, $user, $password, 'admin'); - $rc = $drh->func('dropdb', $database, $host, $user, $password, 'admin'); - $rc = $drh->func('shutdown', $host, $user, $password, 'admin'); - $rc = $drh->func('reload', $host, $user, $password, 'admin'); - - $rc = $dbh->func('createdb', $database, 'admin'); - $rc = $dbh->func('dropdb', $database, 'admin'); - $rc = $dbh->func('shutdown', 'admin'); - $rc = $dbh->func('reload', 'admin'); - =head1 EXAMPLE @@ -1373,70 +1355,6 @@ =back -=head2 Server Administration - -=over - -=item admin - - $rc = $drh->func("createdb", $dbname, [host, user, password,], 'admin'); - $rc = $drh->func("dropdb", $dbname, [host, user, password,], 'admin'); - $rc = $drh->func("shutdown", [host, user, password,], 'admin'); - $rc = $drh->func("reload", [host, user, password,], 'admin'); - - or - - $rc = $dbh->func("createdb", $dbname, 'admin'); - $rc = $dbh->func("dropdb", $dbname, 'admin'); - $rc = $dbh->func("shutdown", 'admin'); - $rc = $dbh->func("reload", 'admin'); - -For server administration you need a server connection. For obtaining -this connection you have two options: Either use a driver handle (drh) -and supply the appropriate arguments (host, defaults localhost, user, -defaults to '' and password, defaults to ''). A driver handle can be -obtained with - - $drh = DBI->install_driver('mysql'); - -Otherwise reuse the existing connection of a database handle (dbh). - -There's only one function available for administrative purposes, comparable -to the mysqladmin programs. The command being execute depends on the -first argument: - -=over - -=item createdb - -Creates the database $dbname. Equivalent to "mysqladmin create $dbname". - -=item dropdb - -Drops the database $dbname. Equivalent to "mysqladmin drop $dbname". - -It should be noted that database deletion is -I<not prompted for> in any way. Nor is it undo-able from DBI. - - Once you issue the dropDB() method, the database will be gone! - -These method should be used at your own risk. - -=item shutdown - -Silently shuts down the database engine. (Without prompting!) -Equivalent to "mysqladmin shutdown". - -=item reload - -Reloads the servers configuration files and/or tables. This can be particularly -important if you modify access privileges or create new users. - -=back - -=back - - =head1 DATABASE HANDLES The DBD::mysql driver supports the following attributes of database @@ -1664,8 +1582,15 @@ $dbh->{mysql_no_autocommit_cmd} = 1; +=item ping + +This can be used to send a ping to the server. + + $rc = $dbh->ping(); + =back + =head1 STATEMENT HANDLES The statement handles of DBD::mysql support a number @@ -1727,10 +1652,14 @@ =item mysql_insertid -MySQL has the ability to choose unique key values automatically. If this -happened, the new ID will be stored in this attribute. An alternative -way for accessing this attribute is via $dbh->{'mysql_insertid'}. -(Note we are using the $dbh in this case!) +If the statement you executed performs an INSERT, and there is an AUTO_INCREMENT +column in the table you inserted in, this attribute holds the value stored into +the AUTO_INCREMENT column, if that value is automatically generated, by +storing NULL or 0 or was specified as an explicit value. + +Typically, you'd access the value via $sth->{mysql_insertid}. The value can +also be accessed via $dbh->{mysql_insertid} but this can easily +produce incorrect results in case one database handle is shared. =item mysql_is_blob diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-mysql-4.035/t/05dbcreate.t new/DBD-mysql-4.036/t/05dbcreate.t --- old/DBD-mysql-4.035/t/05dbcreate.t 2015-12-21 17:53:50.000000000 +0100 +++ new/DBD-mysql-4.036/t/05dbcreate.t 2016-08-19 17:50:17.000000000 +0200 @@ -9,8 +9,11 @@ use lib 't', '.'; require 'lib.pl'; +# remove database from DSN +$test_dsn =~ s/^DBI:mysql:([^:]+):/DBI:mysql::/; + my $dbh; -eval {$dbh= DBI->connect('DBI:mysql:', $test_user, $test_password, +eval {$dbh= DBI->connect($test_dsn, $test_user, $test_password, { RaiseError => 1, PrintError => 1, AutoCommit => 0 });}; if ($@) { diag $@; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-mysql-4.035/t/31insertid.t new/DBD-mysql-4.036/t/31insertid.t --- old/DBD-mysql-4.035/t/31insertid.t 2015-12-21 17:53:50.000000000 +0100 +++ new/DBD-mysql-4.036/t/31insertid.t 2016-08-01 08:26:44.000000000 +0200 @@ -16,7 +16,7 @@ plan skip_all => "no database connection"; } -plan tests => 18; +plan tests => 19; ok $dbh->do('SET @@auto_increment_offset = 1'); ok $dbh->do('SET @@auto_increment_increment = 1'); @@ -38,7 +38,8 @@ ok $sth->execute("Jochen"); -is $dbh->{'mysql_insertid'}, 1, "insert id == $dbh->{mysql_insertid}"; +is $sth->{mysql_insertid}, 1, "insert id == $sth->{mysql_insertid}"; +is $dbh->{mysql_insertid}, 1, "insert id == $dbh->{mysql_insertid}"; ok $sth->execute("Patrick"); @@ -53,12 +54,15 @@ ok defined $max_id; -cmp_ok $sth->{'mysql_insertid'}, '==', $max_id->[0], "sth insert id $sth->{'mysql_insertid'} == max(id) $max_id->[0] in dbd_mysql_t31"; - -cmp_ok $dbh->{'mysql_insertid'}, '==', $max_id->[0], "dbh insert id $dbh->{'mysql_insertid'} == max(id) $max_id->[0] in dbd_mysql_t31"; +SKIP: { + skip 'using libmysqlclient 5.7 or up we now have an empty dbh insertid', + 1, if $dbh->{mysql_clientversion} >= 50700; + cmp_ok $dbh->{mysql_insertid}, '==', $max_id->[0], + "dbh insert id $dbh->{'mysql_insertid'} == max(id) $max_id->[0] in dbd_mysql_t31"; +} +cmp_ok $sth->{mysql_insertid}, '==', $max_id->[0], + "sth insert id $sth->{'mysql_insertid'} == max(id) $max_id->[0] in dbd_mysql_t31"; ok $sth->finish(); - ok $sth2->finish(); - ok $dbh->disconnect(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-mysql-4.035/t/41int_min_max.t new/DBD-mysql-4.036/t/41int_min_max.t --- old/DBD-mysql-4.035/t/41int_min_max.t 1970-01-01 01:00:00.000000000 +0100 +++ new/DBD-mysql-4.036/t/41int_min_max.t 2016-08-19 17:50:17.000000000 +0200 @@ -0,0 +1,148 @@ +use strict; +use warnings; +use bigint; + +use DBI; +use Test::More; +use lib 't', '.'; +use Data::Dumper; +require 'lib.pl'; +use vars qw($test_dsn $test_user $test_password); + +my $dbh; +eval {$dbh= DBI->connect($test_dsn, $test_user, $test_password, + { RaiseError => 1, PrintError => 1, AutoCommit => 1 });}; +if ($@) { + plan skip_all => "no database connection"; +} + +if (!MinimumVersion($dbh, '4.1')) { + plan skip_all => "ERROR: $DBI::errstr. Can't continue test"; + plan skip_all => + "SKIP TEST: You must have MySQL version 4.1 and greater for this test to run"; +} +# nostrict tests + strict tests + init/tear down commands +plan tests => 19*8 + 17*8 + 4; + +my $table = 'dbd_mysql_t41minmax'; # name of the table we will be using +my $mode; # 'strict' or 'nostrict' corresponds to strict SQL mode + +sub test_int_type ($$$$) { + my ($perl_type, $mysql_type, $min, $max) = @_; + + # Disable the warning text clobbering our output + local $SIG{__WARN__} = sub { 1; }; + + # Create the table + ok($dbh->do(qq{DROP TABLE IF EXISTS $table}), "removing $table"); + ok($dbh->do(qq{ + CREATE TABLE `$table` ( + `id` int not null auto_increment, + `val` $mysql_type, + primary key (id) + ) + }), "creating minmax table for type $mysql_type"); + + my ($store, $retrieve); # statements + my $read_value; # retrieved value + ok($store = $dbh->prepare("INSERT INTO $table (val) VALUES (?)")); + ok($retrieve = $dbh->prepare("SELECT val from $table where id=(SELECT MAX(id) FROM $table)")); + + ######################################## + # Insert allowed min value + ######################################## + ok($store->bind_param( 1, $min->bstr(), $perl_type ), "binding minimal $mysql_type, mode=$mode"); + ok($store->execute(), "inserting min data for type $mysql_type, mode=$mode"); + + ######################################## + # Read it back and compare + ######################################## + ok{$retrieve->execute()}; + ($read_value) = $retrieve->fetchrow_array(); + cmp_ok($read_value, 'eq', $min, "retrieved minimal value for $mysql_type, mode=$mode"); + + ######################################## + # Insert allowed max value + ######################################## + ok($store->bind_param( 1, $max->bstr(), $perl_type ), "binding maximal $mysql_type, mode=$mode"); + ok($store->execute(), "inserting max data for type $mysql_type, mode=$mode"); + + ######################################## + # Read it back and compare + ######################################## + ok{$retrieve->execute()}; + ($read_value) = $retrieve->fetchrow_array(); + cmp_ok($read_value, 'eq', $max, "retrieved maximal value for $mysql_type, mode=$mode"); + + ######################################## + # Try to insert under the limit value + ######################################## + ok($store->bind_param( 1, ($min-1)->bstr(), $perl_type ), "binding less than minimal $mysql_type, mode=$mode"); + if ($mode eq 'strict') { + $@ = ''; + eval{$store->execute()}; + like($@, qr/Out of range value (?:adjusted )?for column 'val'/, "Error, you stored ".($min-1)." into $mysql_type, mode=$mode\n". + Data::Dumper->Dump([$dbh->selectall_arrayref("SELECT * FROM $table")]). + Data::Dumper->Dump([$dbh->selectall_arrayref("describe $table")]) + ); + } else { + ok{$store->execute()}; + ######################################## + # Check that it was rounded correctly + ######################################## + ok{$retrieve->execute()}; + ($read_value) = $retrieve->fetchrow_array(); + cmp_ok($read_value, 'eq', $min, "retrieved minimal value for type $mysql_type, mode=$mode"); + }; + + ######################################## + # Try to insert over the limit value + ######################################## + ok($store->bind_param( 1, ($max+1)->bstr(), $perl_type ), "binding more than maximal $mysql_type, mode=$mode"); + if ($mode eq 'strict') { + $@ = ''; + eval{$store->execute()}; + like($@, qr/Out of range value (?:adjusted )?for column 'val'/, "Error, you stored ".($max+1)." into $mysql_type, mode=$mode\n". + Data::Dumper->Dump([$dbh->selectall_arrayref("SELECT * FROM $table")]). + Data::Dumper->Dump([$dbh->selectall_arrayref("describe $table")]) + ); + } else { + ok{$store->execute()}; + ######################################## + # Check that it was rounded correctly + ######################################## + ok{$retrieve->execute()}; + ($read_value) = $retrieve->fetchrow_array(); + cmp_ok($read_value, 'eq', $max, "retrieved maximal value for type $mysql_type, mode=$mode"); + }; +} + +# Set strict SQL mode +ok($dbh->do("SET SQL_MODE='STRICT_ALL_TABLES'"),"Enter strict SQL mode."); +$mode = 'strict'; + +test_int_type(DBI::SQL_TINYINT, 'tinyint signed', -2**7, 2**7-1); +test_int_type(DBI::SQL_TINYINT, 'tinyint unsigned', 0, 2**8-1); +test_int_type(DBI::SQL_SMALLINT, 'smallint signed', -2**15, 2**15-1); +test_int_type(DBI::SQL_SMALLINT, 'smallint unsigned', 0, 2**16-1); +test_int_type(DBI::SQL_INTEGER, 'int signed', -2**31, 2**31-1); +test_int_type(DBI::SQL_INTEGER, 'int unsigned', 0, 2**32-1); +test_int_type(DBI::SQL_BIGINT, 'bigint signed', -2**63, 2**63-1); +test_int_type(DBI::SQL_BIGINT, 'bigint unsigned', 0, 2**64-1); + +# Do not use strict SQL mode +ok($dbh->do("SET SQL_MODE=''"),"Leave strict SQL mode."); +$mode = 'nostrict'; + +test_int_type(DBI::SQL_TINYINT, 'tinyint signed', -2**7, 2**7-1); +test_int_type(DBI::SQL_TINYINT, 'tinyint unsigned', 0, 2**8-1); +test_int_type(DBI::SQL_SMALLINT, 'smallint signed', -2**15, 2**15-1); +test_int_type(DBI::SQL_SMALLINT, 'smallint unsigned', 0, 2**16-1); +test_int_type(DBI::SQL_INTEGER, 'int signed', -2**31, 2**31-1); +test_int_type(DBI::SQL_INTEGER, 'int unsigned', 0, 2**32-1); +test_int_type(DBI::SQL_BIGINT, 'bigint signed', -2**63, 2**63-1); +test_int_type(DBI::SQL_BIGINT, 'bigint unsigned', 0, 2**64-1); + +ok ($dbh->do("DROP TABLE $table")); + +ok $dbh->disconnect; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-mysql-4.035/t/56connattr.t new/DBD-mysql-4.036/t/56connattr.t --- old/DBD-mysql-4.035/t/56connattr.t 2015-12-21 17:53:50.000000000 +0100 +++ new/DBD-mysql-4.036/t/56connattr.t 2016-08-11 10:00:20.000000000 +0200 @@ -14,7 +14,7 @@ my $dbh; eval { $dbh= DBI->connect($test_dsn, $test_user, $test_password, { RaiseError => 1, - PrintError => 1, + PrintError => 0, AutoCommit => 0, mysql_conn_attrs => { foo => 'bar' }, } @@ -36,9 +36,13 @@ plan skip_all => 'client version should be 5.6.6 or later'; } -plan tests => 9; +eval {$dbh->do("select * from performance_schema.session_connect_attrs where processlist_id=connection_id()");}; +if ($@) { + $dbh->disconnect(); + plan skip_all => "no permission on performance_schema tables"; +} -ok $dbh->do("select * from performance_schema.session_connect_attrs where processlist_id=connection_id()"), 'get connattrs for current session'; +plan tests => 8; my $rows = $dbh->selectall_hashref("select * from performance_schema.session_connect_attrs where processlist_id=connection_id()", "ATTR_NAME"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-mysql-4.035/t/mysql.mtest new/DBD-mysql-4.036/t/mysql.mtest --- old/DBD-mysql-4.035/t/mysql.mtest 2016-07-09 07:49:47.000000000 +0200 +++ new/DBD-mysql-4.036/t/mysql.mtest 1970-01-01 01:00:00.000000000 +0100 @@ -1,27 +0,0 @@ -{ local $opt = { - 'nossl' => 0, - 'nofoundrows' => 0, - 'testport' => '', - 'testhost' => '', - 'testsocket' => '', - 'testpassword' => '', - 'testuser' => 'vagrant', - 'libs' => '-L/usr/lib/x86_64-linux-gnu -lmariadbclient', - 'testdb' => 'test', - 'embedded' => '', - 'cflags' => '-I/usr/include/mysql', - 'nocatchstderr' => 0, - 'ldflags' => '', - 'mysql_config' => 'mysql_config' - }; -$::test_host = $opt->{'testhost'}; -$::test_port = $opt->{'testport'}; -$::test_user = $opt->{'testuser'}; -$::test_socket = $opt->{'testsocket'}; -$::test_password = $opt->{'testpassword'}; -$::test_db = $opt->{'testdb'}; -$::test_dsn = "DBI:mysql:$::test_db"; -$::test_dsn .= ";mysql_socket=$::test_socket" if $::test_socket; -$::test_dsn .= ":$::test_host" if $::test_host; -$::test_dsn .= ":$::test_port" if $::test_port; -} 1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-mysql-4.035/t/rt25389-bin-case.t new/DBD-mysql-4.036/t/rt25389-bin-case.t --- old/DBD-mysql-4.035/t/rt25389-bin-case.t 2015-12-21 17:53:50.000000000 +0100 +++ new/DBD-mysql-4.036/t/rt25389-bin-case.t 2016-08-11 10:00:20.000000000 +0200 @@ -15,6 +15,11 @@ plan skip_all => "no database connection"; } +if (!MinimumVersion($dbh, '5.1')) { + plan skip_all => + "You must have MySQL version 5.1 or greater for this test" +} + plan tests => 8; my ( $sth, $i ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-mysql-4.035/t/rt75353-innodb-lock-timeout.t new/DBD-mysql-4.036/t/rt75353-innodb-lock-timeout.t --- old/DBD-mysql-4.035/t/rt75353-innodb-lock-timeout.t 2016-07-06 08:18:52.000000000 +0200 +++ new/DBD-mysql-4.036/t/rt75353-innodb-lock-timeout.t 2016-08-11 10:00:20.000000000 +0200 @@ -41,11 +41,16 @@ plan skip_all => "Server doesn't support InnoDB, needed for testing innodb_lock_wait_timeout"; } +eval {$dbh2->do("SET innodb_lock_wait_timeout=1");}; +if ($@) { + $dbh1->disconnect(); + $dbh2->disconnect(); + plan skip_all => "innodb_lock_wait_timeout is not modifyable on this version of MySQL"; +} + ok $dbh1->do("DROP TABLE IF EXISTS dbd_mysql_rt75353_innodb_lock_timeout"), "drop table if exists dbd_mysql_rt75353_innodb_lock_timeout"; ok $dbh1->do("CREATE TABLE dbd_mysql_rt75353_innodb_lock_timeout(id INT PRIMARY KEY) ENGINE=INNODB"), "create table dbd_mysql_rt75353_innodb_lock_timeout"; -ok $dbh2->do("SET innodb_lock_wait_timeout=1"), "dbh2: set innodb_lock_wait_timeout to one second"; - ok $dbh1->do("INSERT INTO dbd_mysql_rt75353_innodb_lock_timeout VALUES(1)"), "dbh1: acquire a row lock on table dbd_mysql_rt75353_innodb_lock_timeout"; my $error_handler_called = 0;
