Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1c5925e

Browse files
committed
Minor adjustments
1 parent 7adbf58 commit 1c5925e

2 files changed

Lines changed: 24 additions & 6 deletions

File tree

extra/mysqludfsys/lib_mysqludf_sys/install.sh

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,23 @@
11
#!/bin/bash
2+
# lib_mysqludf_sys - a library with miscellaneous (operating) system level functions
3+
# Copyright (C) 2007 Roland Bouman
4+
# Copyright (C) 2008-2009 Roland Bouman and Bernardo Damele A. G.
5+
# web: http://www.mysqludf.org/
6+
7+
#
8+
# This library is free software; you can redistribute it and/or
9+
# modify it under the terms of the GNU Lesser General Public
10+
# License as published by the Free Software Foundation; either
11+
# version 2.1 of the License, or (at your option) any later version.
12+
#
13+
# This library is distributed in the hope that it will be useful,
14+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
15+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16+
# Lesser General Public License for more details.
17+
#
18+
# You should have received a copy of the GNU Lesser General Public
19+
# License along with this library; if not, write to the Free Software
20+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
221

322
echo "Compiling the MySQL UDF"
423
make
@@ -12,10 +31,9 @@ else
1231
echo "MySQL UDF compiled successfully"
1332
fi
1433

15-
echo -e "\nPlease provide your MySQL root password and press RETURN: \c"
16-
read PASSWORD
34+
echo -e "\nPlease provide your MySQL root password"
1735

18-
mysql -u root --password=$PASSWORD mysql < lib_mysqludf_sys.sql
36+
mysql -u root -p mysql < lib_mysqludf_sys.sql
1937

2038
if test $? -ne 0; then
2139
echo "ERROR: unable to install the UDF"

extra/mysqludfsys/lib_mysqludf_sys/lib_mysqludf_sys.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -415,11 +415,11 @@ char* sys_eval(
415415
if (!(*result) || result == NULL) {
416416
*is_null = 1;
417417
} else {
418-
result[outlen] = 0x00;
419-
*length = strlen(result);
418+
result[outlen] = 0x00;
419+
*length = strlen(result);
420420
}
421421

422-
return result;
422+
return result;
423423
}
424424

425425

0 commit comments

Comments
 (0)