diff options
-rw-r--r-- | databases/mysql-client/Makefile | 6 | ||||
-rw-r--r-- | databases/mysql-client/buildlink2.mk | 4 | ||||
-rw-r--r-- | databases/mysql-client/distinfo | 3 | ||||
-rw-r--r-- | databases/mysql-client/patches/patch-al | 65 | ||||
-rw-r--r-- | databases/mysql-server/Makefile | 8 | ||||
-rw-r--r-- | databases/mysql-server/distinfo | 3 | ||||
-rw-r--r-- | databases/mysql-server/patches/patch-ak | 24 |
7 files changed, 102 insertions, 11 deletions
diff --git a/databases/mysql-client/Makefile b/databases/mysql-client/Makefile index c4bbc8ca3fc..72146707b8c 100644 --- a/databases/mysql-client/Makefile +++ b/databases/mysql-client/Makefile @@ -1,14 +1,14 @@ -# $NetBSD: Makefile,v 1.20 2002/09/20 10:39:06 jlam Exp $ -# +# $NetBSD: Makefile,v 1.21 2002/12/13 14:19:54 tron Exp $ PKGNAME= ${DISTNAME:S/-/-client-/} -PKGREVISION= 1 +PKGREVISION= 2 SVR4_PKGNAME= mysqc COMMENT= MySQL, a free SQL database (client) .include "Makefile.common" CONFIGURE_ARGS+= --without-server +USE_BUILDLINK2= YES INFO_FILES= mysql.info diff --git a/databases/mysql-client/buildlink2.mk b/databases/mysql-client/buildlink2.mk index 2a09de05701..10cc78b1060 100644 --- a/databases/mysql-client/buildlink2.mk +++ b/databases/mysql-client/buildlink2.mk @@ -1,10 +1,10 @@ -# $NetBSD: buildlink2.mk,v 1.3 2002/10/08 23:00:51 jlam Exp $ +# $NetBSD: buildlink2.mk,v 1.4 2002/12/13 14:19:54 tron Exp $ .if !defined(MYSQL_CLIENT_BUILDLINK2_MK) MYSQL_CLIENT_BUILDLINK2_MK= # defined BUILDLINK_PACKAGES+= mysql-client -BUILDLINK_DEPENDS.mysql-client?= mysql-client>=3.22 +BUILDLINK_DEPENDS.mysql-client?= mysql-client>=3.23.49nb2 BUILDLINK_PKGSRCDIR.mysql-client?= ../../databases/mysql-client EVAL_PREFIX+= BUILDLINK_PREFIX.mysql-client=mysql-client diff --git a/databases/mysql-client/distinfo b/databases/mysql-client/distinfo index 3487c8440fc..98185772304 100644 --- a/databases/mysql-client/distinfo +++ b/databases/mysql-client/distinfo @@ -1,5 +1,6 @@ -$NetBSD: distinfo,v 1.8 2002/03/18 14:17:39 martti Exp $ +$NetBSD: distinfo,v 1.9 2002/12/13 14:19:54 tron Exp $ SHA1 (mysql-3.23.49.tar.gz) = 0256331c7aa9388955148f80cdca382f467ad1be Size (mysql-3.23.49.tar.gz) = 11844905 bytes SHA1 (patch-af) = 5c627852dd12807580825199cdbd9a1ebc320f33 +SHA1 (patch-al) = 8d8738a168233dcf968b02c7c48c0711342ea200 diff --git a/databases/mysql-client/patches/patch-al b/databases/mysql-client/patches/patch-al new file mode 100644 index 00000000000..b4b0e4817e8 --- /dev/null +++ b/databases/mysql-client/patches/patch-al @@ -0,0 +1,65 @@ +$NetBSD: patch-al,v 1.1 2002/12/13 14:19:54 tron Exp $ + +--- libmysql/libmysql.c.orig Thu Feb 14 18:30:17 2002 ++++ libmysql/libmysql.c Fri Dec 13 15:11:45 2002 +@@ -886,7 +886,7 @@ + uint field,pkt_len; + ulong len; + uchar *cp; +- char *to; ++ char *to, *end_to; + MYSQL_DATA *result; + MYSQL_ROWS **prev_ptr,*cur; + NET *net = &mysql->net; +@@ -924,6 +924,7 @@ + *prev_ptr=cur; + prev_ptr= &cur->next; + to= (char*) (cur->data+fields+1); ++ end_to=to+pkt_len-1; + for (field=0 ; field < fields ; field++) + { + if ((len=(ulong) net_field_length(&cp)) == NULL_LENGTH) +@@ -933,6 +934,13 @@ + else + { + cur->data[field] = to; ++ if (len > end_to - to) ++ { ++ free_rows(result); ++ net->last_errno=CR_UNKNOWN_ERROR; ++ strmov(net->last_error,ER(net->last_errno)); ++ DBUG_RETURN(0); ++ } + memcpy(to,(char*) cp,len); to[len]=0; + to+=len+1; + cp+=len; +@@ -967,7 +975,7 @@ + { + uint field; + ulong pkt_len,len; +- uchar *pos,*prev_pos; ++ uchar *pos,*prev_pos, *end_pos; + + if ((pkt_len=(uint) net_safe_read(mysql)) == packet_error) + return -1; +@@ -975,6 +983,7 @@ + return 1; /* End of data */ + prev_pos= 0; /* allowed to write at packet[-1] */ + pos=mysql->net.read_pos; ++ end_pos=pos+pkt_len; + for (field=0 ; field < fields ; field++) + { + if ((len=(ulong) net_field_length(&pos)) == NULL_LENGTH) +@@ -984,6 +993,12 @@ + } + else + { ++ if (len > end_pos - pos) ++ { ++ mysql->net.last_errno=CR_UNKNOWN_ERROR; ++ strmov(mysql->net.last_error,ER(mysql->net.last_errno)); ++ return -1; ++ } + row[field] = (char*) pos; + pos+=len; + *lengths++=len; diff --git a/databases/mysql-server/Makefile b/databases/mysql-server/Makefile index e1c75268739..c71845c02a3 100644 --- a/databases/mysql-server/Makefile +++ b/databases/mysql-server/Makefile @@ -1,14 +1,12 @@ -# $NetBSD: Makefile,v 1.29 2002/09/20 10:39:07 jlam Exp $ -# +# $NetBSD: Makefile,v 1.30 2002/12/13 14:19:54 tron Exp $ PKGNAME= ${DISTNAME:S/-/-server-/} +PKGREVISION= 1 SVR4_PKGNAME= mysqs COMMENT= MySQL, a free SQL database (server) .include "../mysql-client/Makefile.common" -DEPENDS+= ${DISTNAME:S/-/-client>=/}:../../databases/mysql-client - # hardwire use of included mit-pthreads on NetBSD .if (${OPSYS} == "NetBSD") CONFIGURE_ARGS+= --with-mit-threads @@ -16,6 +14,7 @@ CONFIGURE_ARGS+= --with-mit-threads CONFIGURE_ARGS+= --with-libwrap CONFIGURE_ARGS+= --without-berkeley-db +USE_BUILDLINK2= YES # platforms on which included mit-pthreads is usable ONLY_FOR_PLATFORM= NetBSD-*-alpha NetBSD-*-arm32 NetBSD-*-i386 \ @@ -43,5 +42,6 @@ post-install: ${INSTALL_MAN} ${WRKSRC}/man/safe_mysqld.1 ${PREFIX}/man/man1 PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} POST-INSTALL +.include "../../databases/mysql-client/buildlink2.mk" .include "../../security/tcp_wrappers/buildlink2.mk" .include "../../mk/bsd.pkg.mk" diff --git a/databases/mysql-server/distinfo b/databases/mysql-server/distinfo index 4394bf153f8..98c6a97efca 100644 --- a/databases/mysql-server/distinfo +++ b/databases/mysql-server/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.16 2002/06/03 14:08:27 tron Exp $ +$NetBSD: distinfo,v 1.17 2002/12/13 14:19:54 tron Exp $ SHA1 (mysql-3.23.49.tar.gz) = 0256331c7aa9388955148f80cdca382f467ad1be Size (mysql-3.23.49.tar.gz) = 11844905 bytes @@ -12,3 +12,4 @@ SHA1 (patch-ag) = 75634ff5c9ee61ff3ef61b1d9a4be4afc65e8754 SHA1 (patch-ah) = 7cd4278c9bdc5220de04f7e6b62bb8d11c892ffb SHA1 (patch-ai) = 071e34cc9236b08cdc438afbb46801e66efc7e92 SHA1 (patch-aj) = 2e619c6f16a1256174fd3e6e4bca3214679a9347 +SHA1 (patch-ak) = f484f0bd5b77e0475c7b693b51f5f5146795afa0 diff --git a/databases/mysql-server/patches/patch-ak b/databases/mysql-server/patches/patch-ak new file mode 100644 index 00000000000..05d0975af63 --- /dev/null +++ b/databases/mysql-server/patches/patch-ak @@ -0,0 +1,24 @@ +$NetBSD: patch-ak,v 1.5 2002/12/13 14:19:55 tron Exp $ + +--- sql/sql_parse.cc.orig Thu Feb 14 18:30:14 2002 ++++ sql/sql_parse.cc Fri Dec 13 14:46:28 2002 +@@ -105,6 +105,8 @@ + NET *net= &thd->net; + thd->db=0; + ++ if (passwd[0] && strlen(passwd) != SCRAMBLE_LENGTH) ++ return 1; + if (!(thd->user = my_strdup(user, MYF(0)))) + { + send_error(net,ER_OUT_OF_RESOURCES); +@@ -764,8 +766,8 @@ + thread_safe_increment(com_other,&LOCK_thread_count); + slow_command = TRUE; + char* data = packet + 1; +- uint db_len = *data; +- uint tbl_len = *(data + db_len + 1); ++ uint db_len = *(uchar *)*data; ++ uint tbl_len = *(uchar *)(data + db_len + 1); + char* db = sql_alloc(db_len + tbl_len + 2); + memcpy(db, data + 1, db_len); + char* tbl_name = db + db_len; |