← Back to team overview

maria-developers team mailing list archive

bzr commit into MariaDB 5.1, with Maria 1.5:maria branch (knielsen:2791)

 

#At lp:maria

 2791 knielsen@xxxxxxxxxxxxxxx	2009-10-23 [merge]
      Merge Peter Lieverdink's fixes:
       - configtest target in rc script.
       - type fix usefull -> useful.
      modified:
        Docs/myisam.txt
        configure.in
        mysql-test/mysql-stress-test.pl
        mysys/safemalloc.c
        sql/mysqld.cc
        sql/sql_select.cc
        sql/udf_example.c
        support-files/mysql.server.sh

=== modified file 'Docs/myisam.txt'
--- a/Docs/myisam.txt	2000-07-31 19:29:14 +0000
+++ b/Docs/myisam.txt	2009-09-30 23:40:51 +0000
@@ -868,7 +868,7 @@ Space compression makes the index file s
 Prefix compression helps if there are many strings with an identical prefix.
 
 In memory table characteristics 
-HEAP tables only exists in memory so they are lost if `mysqld' is taken down or crashes. But since they are *very* fast they are usefull as anyway. 
+HEAP tables only exists in memory so they are lost if `mysqld' is taken down or crashes. But since they are *very* fast they are useful as anyway. 
 
 The *MySQL* internal HEAP tables uses 100% dynamic hashing without overflow areas and don't have problems with delete. 
 

=== modified file 'configure.in'
--- a/configure.in	2009-10-08 09:43:31 +0000
+++ b/configure.in	2009-10-16 06:18:37 +0000
@@ -2847,7 +2847,7 @@ do
 done
 AC_SUBST(sql_union_dirs)
 
-# Some usefull subst
+# Some useful subst
 AC_SUBST(CC)
 AC_SUBST(GXX)
 

=== modified file 'mysql-test/mysql-stress-test.pl'
--- a/mysql-test/mysql-stress-test.pl	2006-03-03 18:15:01 +0000
+++ b/mysql-test/mysql-stress-test.pl	2009-09-30 23:40:51 +0000
@@ -1100,7 +1100,7 @@ mysql-stress-test.pl --stress-basedir=<d
       they specified in the list file. 
       
 --sleep-time=<time in seconds>
-  Delay between test execution. Could be usefull in continued testsing 
+  Delay between test execution. Could be useful in continued testsing 
   when one of instance of stress script perform periodical cleanup or
   recreating of some database objects
 
@@ -1109,7 +1109,7 @@ mysql-stress-test.pl --stress-basedir=<d
 
 --check-tests-file
   Check file with list of tests. If file was modified it will force to
-  reread list of tests. Could be usefull in continued testing for
+  reread list of tests. Could be useful in continued testing for
   adding/removing tests without script interruption 
 
 --mysqltest=/path/to/mysqltest binary

=== modified file 'mysys/safemalloc.c'
--- a/mysys/safemalloc.c	2009-09-07 20:50:10 +0000
+++ b/mysys/safemalloc.c	2009-09-30 23:40:51 +0000
@@ -436,7 +436,7 @@ void TERMINATE(FILE *file, uint flag)
 /*
   Report where a piece of memory was allocated
 
-  This is usefull to call from withing a debugger
+  This is useful to call from withing a debugger
 */
 
 void sf_malloc_report_allocated(void *memory)

=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc	2009-10-16 15:44:58 +0000
+++ b/sql/mysqld.cc	2009-10-23 11:43:17 +0000
@@ -6630,7 +6630,7 @@ log and this option does nothing anymore
    0, 0, 0, 0, 0},
 
   {"test-ignore-wrong-options", OPT_TEST_IGNORE_WRONG_OPTIONS,
-   "Ignore wrong enums values in command line arguments. Usefull only for test scripts",
+   "Ignore wrong enums values in command line arguments. Useful only for test scripts",
    (uchar**) &opt_ignore_wrong_options, (uchar**) &opt_ignore_wrong_options,
    0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
   {"timed_mutexes", OPT_TIMED_MUTEXES,

=== modified file 'sql/sql_select.cc'
--- a/sql/sql_select.cc	2009-09-15 10:46:35 +0000
+++ b/sql/sql_select.cc	2009-09-30 23:40:51 +0000
@@ -11812,7 +11812,7 @@ join_read_const_table(JOIN_TAB *tab, POS
   {
 #if !defined(DBUG_OFF) && defined(NOT_USING_ITEM_EQUAL)
     /*
-      This test could be very usefull to find bugs in the optimizer
+      This test could be very useful to find bugs in the optimizer
       where we would call this function with an expression that can't be
       evaluated yet. We can't have this enabled by default as long as
       have items like Item_equal, that doesn't report they are const but

=== modified file 'sql/udf_example.c'
--- a/sql/udf_example.c	2009-04-25 10:05:32 +0000
+++ b/sql/udf_example.c	2009-09-30 23:40:51 +0000
@@ -205,7 +205,7 @@ char *is_const(UDF_INIT *initid, UDF_ARG
 **		try to keep the error message less than 80 bytes long!
 **
 ** This function should return 1 if something goes wrong. In this case
-** message should contain something usefull!
+** message should contain something useful!
 **************************************************************************/
 
 #define MAXMETAPH 8

=== modified file 'support-files/mysql.server.sh'
--- a/support-files/mysql.server.sh	2009-07-02 13:18:12 +0000
+++ b/support-files/mysql.server.sh	2009-10-16 06:15:30 +0000
@@ -434,9 +434,36 @@ case "$mode" in
       fi
     fi
     ;;
-    *)
+  'configtest')
+    # Safeguard (relative paths, core dumps..)
+    cd $basedir
+    echo $echo_n "Testing MySQL configuration syntax"
+    daemon=$bindir/mysqld
+    if test -x $libexecdir/mysqld
+    then
+      daemon=$libexecdir/mysqld
+    elif test -x $sbindir/mysqld
+    then
+      daemon=$sbindir/mysqld
+    elif test -x `which mysqld`
+    then
+      daemon=`which mysqld`
+    else
+      log_failure_msg "Unable to locate the mysqld binary!"
+      exit 1
+    fi
+    help_out=`$daemon --help 2>&1`; r=$?
+    if test "$r" != 0 ; then
+      log_failure_msg "$help_out"
+      log_failure_msg "There are syntax errors in the server configuration. Please fix them!"
+    else
+      log_success_msg "Syntax OK"
+    fi
+    exit $r
+    ;;
+  *)
       # usage
-      echo "Usage: $0  {start|stop|restart|reload|force-reload|status}  [ MySQL server options ]"
+      echo "Usage: $0  {start|stop|restart|reload|force-reload|status|configtest}  [ MySQL server options ]"
       exit 1
     ;;
 esac