diff options
author | markd <markd@pkgsrc.org> | 2019-01-06 09:09:16 +0000 |
---|---|---|
committer | markd <markd@pkgsrc.org> | 2019-01-06 09:09:16 +0000 |
commit | 7f973213ad049abd3c402d9d9c8998ab0d5a8b57 (patch) | |
tree | 6a71e8f49c114be1ca0ecac02a56c4d810095961 /databases | |
parent | 8705f1d24754f03ff5a3a1f05cad39af55bd02f6 (diff) | |
download | pkgsrc-7f973213ad049abd3c402d9d9c8998ab0d5a8b57.tar.gz |
p5-DBD-mysql: Fix SQL syntax for statements that have "...limit = ?"
from upstream commit 7805e828fad02d37f913228019cf352636fcfe36
Diffstat (limited to 'databases')
-rw-r--r-- | databases/p5-DBD-mysql/Makefile | 3 | ||||
-rw-r--r-- | databases/p5-DBD-mysql/distinfo | 3 | ||||
-rw-r--r-- | databases/p5-DBD-mysql/patches/patch-dbdimp.c | 28 |
3 files changed, 32 insertions, 2 deletions
diff --git a/databases/p5-DBD-mysql/Makefile b/databases/p5-DBD-mysql/Makefile index 6489f37b48a..45c840e16fc 100644 --- a/databases/p5-DBD-mysql/Makefile +++ b/databases/p5-DBD-mysql/Makefile @@ -1,7 +1,8 @@ -# $NetBSD: Makefile,v 1.75 2018/11/24 04:14:05 wen Exp $ +# $NetBSD: Makefile,v 1.76 2019/01/06 09:09:16 markd Exp $ DISTNAME= DBD-mysql-4.049 PKGNAME= p5-${DISTNAME} +PKGREVISION= 1 CATEGORIES= databases perl5 MASTER_SITES= ${MASTER_SITE_PERL_CPAN:=DBD/} diff --git a/databases/p5-DBD-mysql/distinfo b/databases/p5-DBD-mysql/distinfo index f25af966c20..71c8dd303a9 100644 --- a/databases/p5-DBD-mysql/distinfo +++ b/databases/p5-DBD-mysql/distinfo @@ -1,6 +1,7 @@ -$NetBSD: distinfo,v 1.33 2018/11/24 04:14:05 wen Exp $ +$NetBSD: distinfo,v 1.34 2019/01/06 09:09:16 markd Exp $ SHA1 (DBD-mysql-4.049.tar.gz) = 97566ab690f09a50c3b995eaed1068aa8bacac46 RMD160 (DBD-mysql-4.049.tar.gz) = 1948629385701f60fe2e1ed33af734c2da4b2b12 SHA512 (DBD-mysql-4.049.tar.gz) = e0e1376927be3afd366e3fff4e221e8ecc57339644c8e420e34b9e45a802e2a2a2c294fdd7ca0c59a84d6236f7d0e8fd2000b5da8f6839444d3318e3b7d9b422 Size (DBD-mysql-4.049.tar.gz) = 160889 bytes +SHA1 (patch-dbdimp.c) = ee2bb85eab5b25f088b655e0ff47f1af6a7d16d0 diff --git a/databases/p5-DBD-mysql/patches/patch-dbdimp.c b/databases/p5-DBD-mysql/patches/patch-dbdimp.c new file mode 100644 index 00000000000..1ccc130c314 --- /dev/null +++ b/databases/p5-DBD-mysql/patches/patch-dbdimp.c @@ -0,0 +1,28 @@ +$NetBSD: patch-dbdimp.c,v 1.1 2019/01/06 09:09:16 markd Exp $ + +Fix SQL syntax for statements that have "...limit = ?" +commit 7805e828fad02d37f913228019cf352636fcfe36 + +--- dbdimp.c.orig 2018-11-17 18:49:08.000000000 +0000 ++++ dbdimp.c +@@ -604,9 +604,9 @@ static char *parse_params( + /* + it would be good to be able to handle any number of cases and orders + */ +- if ((*statement_ptr == 'l' || *statement_ptr == 'L') && +- (!strncmp(statement_ptr+1, "imit ", 5) || +- !strncmp(statement_ptr+1, "IMIT ", 5))) ++ if (((*statement_ptr == ' ') || (*statement_ptr == '\n') || (*statement_ptr == '\t')) && ++ (!strncmp(statement_ptr+1, "limit ", 5) || ++ !strncmp(statement_ptr+1, "LIMIT ", 5))) + { + limit_flag = 1; + } +@@ -780,6 +780,7 @@ static char *parse_params( + + /* in case this is a nested LIMIT */ + case ')': ++ case '=': + limit_flag = 0; + *ptr++ = *statement_ptr++; + break; |