summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorunknown <monty@narttu.mysql.fi>2003-09-23 13:36:01 +0300
committerunknown <monty@narttu.mysql.fi>2003-09-23 13:36:01 +0300
commita86e11ef153433cf52886692c493e90784e10ee2 (patch)
tree367cc7ddc8eef505b0dd3d8bd8d196d7aa8a105f /scripts
parentcfdd9890988ae75598874995a9960aa7641f9837 (diff)
downloadmariadb-git-a86e11ef153433cf52886692c493e90784e10ee2.tar.gz
Block SIGPIPE also for not threaded client programs.
Added --include and --libs_r options to mysql_config. Added mysql_get_client_version() to client library Fixed some minor benchmark issues acinclude.m4: Fixed that 'no' is printed if openssl not used configure.in: Fixed error message extra/comp_err.c: Skip lines before first { include/mysql.h: Indentation cleanup libmysql/libmysql.c: Block SIGPIPE also for not threaded programs. This is now done once in mysql_server_init() and not for every call to mysql_init(). Added mysql_get_client_version() libmysql/libmysql.def: added mysql_get_client_version scripts/Makefile.am: Add openssl libraries to mysql_config scripts/mysql_config.sh: Added options --include and --libs_r Added C compiler options to 'cflags' scripts/mysql_install_db.sh: Fixed tests with IN_RPM to not give warnings sql-bench/bench-init.pl.sh: Updated version number sql-bench/server-cfg.sh: Remove duplicate line sql-bench/test-alter-table.sh: Increase loops for more relevant test sql-bench/test-select.sh: Fix wrong test for count_distinct_2 tests/mail_to_db.pl: Default db and table for easier usage
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile.am1
-rw-r--r--scripts/mysql_config.sh22
-rw-r--r--scripts/mysql_install_db.sh8
3 files changed, 23 insertions, 8 deletions
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 72fc73ef28b..c83b0d0b043 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -113,6 +113,7 @@ SUFFIXES = .sh
-e 's!@''CLIENT_LIBS''@!@CLIENT_LIBS@!' \
-e 's!@''LIBS''@!@LIBS@!' \
-e 's!@''innodb_system_libs''@!@innodb_system_libs@!' \
+ -e 's!@''openssl_libs''@!@openssl_libs@!' \
-e 's!@''VERSION''@!@VERSION@!' \
-e 's!@''MYSQL_SERVER_SUFFIX''@!@MYSQL_SERVER_SUFFIX@!' \
-e 's!@''COMPILATION_COMMENT''@!@COMPILATION_COMMENT@!' \
diff --git a/scripts/mysql_config.sh b/scripts/mysql_config.sh
index 3cc5b3a5016..52284104636 100644
--- a/scripts/mysql_config.sh
+++ b/scripts/mysql_config.sh
@@ -84,17 +84,29 @@ port='@MYSQL_TCP_PORT@'
ldflags='@LDFLAGS@'
client_libs='@CLIENT_LIBS@'
-libs="$ldflags -L'$pkglibdir' -lmysqlclient $client_libs"
-libs=`echo $libs | sed -e 's; +;;'`
-cflags="-I'$pkgincludedir'"
-embedded_libs="$ldflags -L'$pkglibdir' -lmysqld @LIBS@ @innodb_system_libs@"
+# Create options, without end space
+
+libs="$ldflags -L$pkglibdir -lmysqlclient $client_libs"
+libs=`echo "$libs" | sed -e 's; \+; ;g' | sed -e 's;^ *;;' | sed -e 's; *\$;;'`
+libs_r="$ldflags -L$pkglibdir -lmysqlclient_r @LIBS@ @openssl_libs@"
+libs_r=`echo "$libs_r" | sed -e 's; \+; ;g' | sed -e 's;^ *;;' | sed -e 's; *\$;;'`
+cflags="-I$pkgincludedir @CFLAGS@"
+include="-I$pkgincludedir"
+embedded_libs="$ldflags -L$pkglibdir -lmysqld @LIBS@ @innodb_system_libs@"
+embedded_libs=`echo "$embedded_libs" | sed -e 's; \+; ;g' | sed -e 's;^ *;;' | sed -e 's; *\$;;'`
+
+# Remove some options that a client doesn't have to care about
+
+cflags=`echo "$cflags " | sed -e 's;\(-DDBUG_OFF\|-DSAFEMALLOC\|-USAFEMALLOC\|-DSAFE_MUTEX\|-DPEDANTIC_SAFEMALLOC\|-DUNIV_MUST_NOT_INLINE\|-DFORCE_INIT_OF_VARS\|-DEXTRA_DEBUG\|-DHAVE_purify\|-O[0-9]\|-W[-A-Za-z]*\) *;;g' | sed -e 's; *\$;;'`
usage () {
cat <<EOF
Usage: $0 [OPTIONS]
Options:
--cflags [$cflags]
+ --include [$include]
--libs [$libs]
+ --libs_r [$libs_r]
--socket [$socket]
--port [$port]
--version [$version]
@@ -108,7 +120,9 @@ if test $# -le 0; then usage; fi
while test $# -gt 0; do
case $1 in
--cflags) echo "$cflags" ;;
+ --include) echo "$include" ;;
--libs) echo "$libs" ;;
+ --libs_r) echo "$libs_r" ;;
--socket) echo "$socket" ;;
--port) echo "$port" ;;
--version) echo "$version" ;;
diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh
index 0e685ba38e4..5b8fa4d4113 100644
--- a/scripts/mysql_install_db.sh
+++ b/scripts/mysql_install_db.sh
@@ -97,7 +97,7 @@ mdata=$ldata/mysql
if test ! -x $execdir/mysqld
then
- if test "$IN_RPM" -eq 1
+ if test "$IN_RPM" = "1"
then
echo "FATAL ERROR $execdir/mysqld not found!"
exit 1
@@ -112,7 +112,7 @@ fi
hostname=`@HOSTNAME@`
# Check if hostname is valid
-if test "$IN_RPM" -eq 0 -a $force -eq 0
+if test "$IN_RPM" = "0" -a $force = "0"
then
resolved=`$bindir/resolveip $hostname 2>&1`
if [ $? -ne 0 ]
@@ -333,7 +333,7 @@ $c_c
END_OF_DATA
then
echo ""
- if test "$IN_RPM" -eq 0
+ if test "$IN_RPM" = "0"
then
echo "To start mysqld at boot time you have to copy support-files/mysql.server"
echo "to the right place for your system"
@@ -354,7 +354,7 @@ then
echo "able to use the new GRANT command!"
fi
echo
- if test "$IN_RPM" -eq 0
+ if test "$IN_RPM" = "0"
then
echo "You can start the MySQL daemon with:"
echo "cd @prefix@ ; $bindir/mysqld_safe &"