From ae0f1985f31cf17baac3217b7cea4b5ba6ded4b6 Mon Sep 17 00:00:00 2001 From: Bernardo Damele Date: Wed, 21 Jan 2009 20:54:14 +0000 Subject: [PATCH] Updated also the patch file --- .../mysqludfsys/lib_mysqludf_sys_0.0.3.patch | 61 ++++++++++++------- 1 file changed, 40 insertions(+), 21 deletions(-) diff --git a/extra/mysqludfsys/lib_mysqludf_sys_0.0.3.patch b/extra/mysqludfsys/lib_mysqludf_sys_0.0.3.patch index 8d2a4a41f..1eb0ec338 100644 --- a/extra/mysqludfsys/lib_mysqludf_sys_0.0.3.patch +++ b/extra/mysqludfsys/lib_mysqludf_sys_0.0.3.patch @@ -1,8 +1,27 @@ -diff -uN lib_mysqludf_sys/install.sh lib_mysqludf_sys_0.0.3/install.sh ---- lib_mysqludf_sys/install.sh 1970-01-01 01:00:00.000000000 +0100 -+++ lib_mysqludf_sys_0.0.3/install.sh 2009-01-15 16:04:50.000000000 +0000 -@@ -0,0 +1,25 @@ +diff -uN lib_mysqludf_sys_0.0.2/install.sh lib_mysqludf_sys/install.sh +--- lib_mysqludf_sys_0.0.2/install.sh 1970-01-01 01:00:00.000000000 +0100 ++++ lib_mysqludf_sys/install.sh 2009-01-21 00:51:52.000000000 +0000 +@@ -0,0 +1,43 @@ +#!/bin/bash ++# lib_mysqludf_sys - a library with miscellaneous (operating) system level functions ++# Copyright (C) 2007 Roland Bouman ++# Copyright (C) 2008-2009 Roland Bouman and Bernardo Damele A. G. ++# web: http://www.mysqludf.org/ ++# email: mysqludfs@gmail.com, bernardo.damele@gmail.com ++# ++# This library is free software; you can redistribute it and/or ++# modify it under the terms of the GNU Lesser General Public ++# License as published by the Free Software Foundation; either ++# version 2.1 of the License, or (at your option) any later version. ++# ++# This library is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++# Lesser General Public License for more details. ++# ++# You should have received a copy of the GNU Lesser General Public ++# License along with this library; if not, write to the Free Software ++# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +echo "Compiling the MySQL UDF" +make @@ -16,10 +35,9 @@ diff -uN lib_mysqludf_sys/install.sh lib_mysqludf_sys_0.0.3/install.sh + echo "MySQL UDF compiled successfully" +fi + -+echo -e "\nPlease provide your MySQL root password and press RETURN: \c" -+read PASSWORD ++echo -e "\nPlease provide your MySQL root password" + -+mysql -u root --password=$PASSWORD mysql < lib_mysqludf_sys.sql ++mysql -u root -p mysql < lib_mysqludf_sys.sql + +if test $? -ne 0; then + echo "ERROR: unable to install the UDF" @@ -27,10 +45,10 @@ diff -uN lib_mysqludf_sys/install.sh lib_mysqludf_sys_0.0.3/install.sh +else + echo "MySQL UDF installed successfully" +fi -Binary files lib_mysqludf_sys/lib_mysqludf_sys_0.0.2.tar.gz and lib_mysqludf_sys_0.0.3/lib_mysqludf_sys_0.0.2.tar.gz differ -diff -uN lib_mysqludf_sys/lib_mysqludf_sys.c lib_mysqludf_sys_0.0.3/lib_mysqludf_sys.c ---- lib_mysqludf_sys/lib_mysqludf_sys.c 2007-08-05 13:46:43.000000000 +0100 -+++ lib_mysqludf_sys_0.0.3/lib_mysqludf_sys.c 2009-01-15 15:55:33.000000000 +0000 +Binary files lib_mysqludf_sys_0.0.2/lib_mysqludf_sys_0.0.2.tar.gz and lib_mysqludf_sys/lib_mysqludf_sys_0.0.2.tar.gz differ +diff -uN lib_mysqludf_sys_0.0.2/lib_mysqludf_sys.c lib_mysqludf_sys/lib_mysqludf_sys.c +--- lib_mysqludf_sys_0.0.2/lib_mysqludf_sys.c 2009-01-21 20:52:54.000000000 +0000 ++++ lib_mysqludf_sys/lib_mysqludf_sys.c 2009-01-21 00:06:13.000000000 +0000 @@ -1,8 +1,9 @@ /* lib_mysqludf_sys - a library with miscellaneous (operating) system level functions @@ -150,19 +168,19 @@ diff -uN lib_mysqludf_sys/lib_mysqludf_sys.c lib_mysqludf_sys_0.0.3/lib_mysqludf + if (!(*result) || result == NULL) { + *is_null = 1; + } else { -+ result[outlen] = 0x00; -+ *length = strlen(result); ++ result[outlen] = 0x00; ++ *length = strlen(result); + } + -+ return result; ++ return result; +} + #endif /* HAVE_DLOPEN */ -Binary files lib_mysqludf_sys/lib_mysqludf_sys.so and lib_mysqludf_sys_0.0.3/lib_mysqludf_sys.so differ -diff -uN lib_mysqludf_sys/lib_mysqludf_sys.sql lib_mysqludf_sys_0.0.3/lib_mysqludf_sys.sql ---- lib_mysqludf_sys/lib_mysqludf_sys.sql 2007-06-02 20:42:53.000000000 +0100 -+++ lib_mysqludf_sys_0.0.3/lib_mysqludf_sys.sql 2009-01-15 15:57:34.000000000 +0000 +Binary files lib_mysqludf_sys_0.0.2/lib_mysqludf_sys.so and lib_mysqludf_sys/lib_mysqludf_sys.so differ +diff -uN lib_mysqludf_sys_0.0.2/lib_mysqludf_sys.sql lib_mysqludf_sys/lib_mysqludf_sys.sql +--- lib_mysqludf_sys_0.0.2/lib_mysqludf_sys.sql 2009-01-21 20:52:54.000000000 +0000 ++++ lib_mysqludf_sys/lib_mysqludf_sys.sql 2009-01-21 00:51:00.000000000 +0000 @@ -1,8 +1,9 @@ /* lib_mysqludf_sys - a library with miscellaneous (operating) system level functions @@ -198,9 +216,9 @@ diff -uN lib_mysqludf_sys/lib_mysqludf_sys.sql lib_mysqludf_sys_0.0.3/lib_mysqlu +CREATE FUNCTION sys_set RETURNS int SONAME 'lib_mysqludf_sys.so'; +CREATE FUNCTION sys_exec RETURNS int SONAME 'lib_mysqludf_sys.so'; +CREATE FUNCTION sys_eval RETURNS string SONAME 'lib_mysqludf_sys.so'; -diff -uN lib_mysqludf_sys/Makefile lib_mysqludf_sys_0.0.3/Makefile ---- lib_mysqludf_sys/Makefile 2007-08-05 12:54:53.000000000 +0100 -+++ lib_mysqludf_sys_0.0.3/Makefile 2009-01-15 15:52:48.000000000 +0000 +diff -uN lib_mysqludf_sys_0.0.2/Makefile lib_mysqludf_sys/Makefile +--- lib_mysqludf_sys_0.0.2/Makefile 2009-01-21 20:52:54.000000000 +0000 ++++ lib_mysqludf_sys/Makefile 2009-01-19 09:11:00.000000000 +0000 @@ -1,6 +1,4 @@ -linux: \ - lib_mysqludf_sys.so @@ -211,3 +229,4 @@ diff -uN lib_mysqludf_sys/Makefile lib_mysqludf_sys_0.0.3/Makefile - gcc -Wall -I/opt/mysql/mysql/include -I. -shared lib_mysqludf_sys.c -o lib_mysqludf_sys.so +install: + gcc -Wall -I/usr/include/mysql -I. -shared lib_mysqludf_sys.c -o $(LIBDIR)/lib_mysqludf_sys.so +Common subdirectories: lib_mysqludf_sys_0.0.2/.svn and lib_mysqludf_sys/.svn