From 34910a5a08c9c9a330584a2e207cb59fbce67fa4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcela=20Ma=C5=A1l=C3=A1=C5=88ov=C3=A1?= Date: Fri, 13 May 2011 16:04:14 +0200 Subject: [PATCH] apply tested patch from F-15 (is_prefix replaced by strncmp) #703185 - remove deffattr --- DBD-mysql-is_prefix.patch | 12 ++++++++++++ perl-DBD-MySQL.spec | 10 +++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 DBD-mysql-is_prefix.patch diff --git a/DBD-mysql-is_prefix.patch b/DBD-mysql-is_prefix.patch new file mode 100644 index 0000000..1b04ab1 --- /dev/null +++ b/DBD-mysql-is_prefix.patch @@ -0,0 +1,12 @@ +diff -up DBD-mysql-4.018/mysql.xs.isprefix DBD-mysql-4.018/mysql.xs +--- DBD-mysql-4.018/mysql.xs.isprefix 2010-07-09 19:47:47.000000000 +0200 ++++ DBD-mysql-4.018/mysql.xs 2011-05-10 18:08:07.812894258 +0200 +@@ -721,7 +721,7 @@ dbd_mysql_get_info(dbh, sql_info_type) + case SQL_IDENTIFIER_QUOTE_CHAR: + /*XXX What about a DB started in ANSI mode? */ + /* Swiped from MyODBC's get_info.c */ +- using_322=is_prefix(mysql_get_server_info(imp_dbh->pmysql),"3.22"); ++ using_322 = ((strncmp(mysql_get_server_info(imp_dbh->pmysql),"3.22",4) == 0) ? 1 : 0 ); + retsv = newSVpv(!using_322 ? "`" : " ", 1); + break; + case SQL_MAXIMUM_STATEMENT_LENGTH: diff --git a/perl-DBD-MySQL.spec b/perl-DBD-MySQL.spec index f212499..3172316 100644 --- a/perl-DBD-MySQL.spec +++ b/perl-DBD-MySQL.spec @@ -1,13 +1,13 @@ Name: perl-DBD-MySQL Version: 4.019 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A MySQL interface for perl Group: Development/Libraries License: GPL+ or Artistic URL: http://search.cpan.org/dist/DBD-mysql/ Source0: http://www.cpan.org/authors/id/C/CA/CAPTTOFU/DBD-mysql-%{version}.tar.gz - +Patch0: DBD-mysql-is_prefix.patch # Prevent bug #443495 BuildRequires: perl(DBI) >= 1.607 @@ -25,6 +25,7 @@ An implementation of DBI for MySQL for Perl. %prep %setup -q -n DBD-mysql-%{version} +%patch0 -p1 # Correct file permissions find . -type f | xargs chmod -x @@ -54,7 +55,6 @@ find $RPM_BUILD_ROOT -type d -depth -exec rmdir {} 2>/dev/null ';' %files -%defattr(-,root,root,-) %doc ChangeLog INSTALL.html README TODO %{perl_vendorarch}/Bundle/ %{perl_vendorarch}/DBD/ @@ -63,6 +63,10 @@ find $RPM_BUILD_ROOT -type d -depth -exec rmdir {} 2>/dev/null ';' %changelog +* Fri May 13 2011 Marcela Mašláňová - 4.019-2 +- apply tested patch from F-15 (is_prefix replaced by strncmp) #703185 +- remove deffattr + * Mon May 9 2011 Petr Sabata - 4.019-1 - 4.019 bump - Removing the clean section