Commit 656bcff6 authored by unknown's avatar unknown
Browse files

client_test.test:

  Run client_test as a testcase
  new file
mysql-test-run.sh:
  More clearly report failure if --force, also exit 1
client_test.c:
  Use MAXPATHLEN in test_frm_bug()
  Renable test cases disabled for running from mysql-test-run
mysqltest.c:
  Don't check errno from popen, may not be set


client/mysqltest.c:
  Don't check errno from popen, may not be set
tests/client_test.c:
  Use MAXPATHLEN in test_frm_bug()
  Renable test cases disabled for running from mysql-test-run
mysql-test/mysql-test-run.sh:
  More clearly report failure if --force, also exit 1
mysql-test/t/client_test.test:
  Run client_test as a testcase
parent 6337cd1c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -889,7 +889,7 @@ static void do_exec(struct st_query* q)
  error= pclose(res_file);

  if (error != 0)
    die("command \"%s\" failed: %s", cmd, errno);
    die("command \"%s\" failed", cmd);

  if (!disable_result_log)
  {
+9 −2
Original line number Diff line number Diff line
@@ -208,6 +208,7 @@ MYSQL_MANAGER_LOG=$MYSQL_TEST_DIR/var/log/manager.log
MYSQL_MANAGER_USER=root
NO_SLAVE=0
USER_TEST=
FAILED_CASES=

EXTRA_MASTER_OPT=""
EXTRA_MYSQL_TEST_OPT=""
@@ -1376,7 +1377,7 @@ run_testcase ()
   	 fi
	 exit 1
	fi

	FAILED_CASES="$FAILED_CASES $tname"
        if [ -z "$DO_GDB" ] && [ -z "$USE_RUNNING_SERVER" ] && [ -z "$DO_DDD" ]
	then
	  mysql_restart
@@ -1562,4 +1563,10 @@ $ECHO
[ "$DO_GCOV" ] && gcov_collect # collect coverage information
[ "$DO_GPROF" ] && gprof_collect # collect coverage information

if [ $TOT_FAIL -ne 0 ]; then
  $ECHO "mysql-test-run: *** Failing the test(s):$FAILED_CASES"
  $ECHO
  exit 1
else
  exit 0
fi
+2 −0
Original line number Diff line number Diff line
-- disable_result_log
--exec ../tests/client_test --testcase --user=root --socket=var/tmp/master.sock --port=$MYSQL_TCP_PORT
+6 −8
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@
#include <m_string.h>
#include <assert.h>
#ifdef HAVE_SYS_PARAM_H
/* Include to get MAXPATHLEN */
#include <sys/param.h>
#endif

@@ -6588,7 +6589,7 @@ static void test_frm_bug()

  bind[0].buffer_type= MYSQL_TYPE_STRING;
  bind[0].buffer= data_dir;
  bind[0].buffer_length= NAME_LEN;
  bind[0].buffer_length= MAXPATHLEN;
  bind[0].is_null= 0;
  bind[0].length= 0;
  bind[1]= bind[0];
@@ -10454,7 +10455,7 @@ static struct my_option client_test_long_options[] =
   (char **) &opt_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
  {"socket", 'S', "Socket file to use for connection", (char **) &opt_unix_socket,
   (char **) &opt_unix_socket, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
  {"testcase", 'c', "Runs as mysql-test-run testcase.",
  {"testcase", 'c', "May disable some code when runs as mysql-test-run testcase.",
   0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
  {"count", 't', "Number of times test to be executed", (char **) &opt_count,
   (char **) &opt_count, 0, GET_UINT, REQUIRED_ARG, 1, 0, 0, 0, 0, 0},
@@ -10642,7 +10643,6 @@ int main(int argc, char **argv)
    test_warnings();        /* show warnings test */
    test_errors();          /* show errors test */
    test_prepare_resultset();/* prepare meta info test */
    if (!opt_testcase)      /* FIXME: skipped because it hangs */
    test_stmt_close();      /* mysql_stmt_close() test -- hangs */
    test_prepare_field_result(); /* prepare meta info */
    test_multi_stmt();      /* multi stmt test */
@@ -10671,7 +10671,6 @@ int main(int argc, char **argv)
#ifndef EMBEDDED_LIBRARY
    test_prepare_grant();   /* Test the GRANT command, bug #89 */
#endif
    if (!opt_testcase)      /* FIXME: skipped because it fails */
    test_frm_bug();         /* test the crash when .frm is invalid, bug #93 */
    test_explain_bug();     /* test for the EXPLAIN, bug #115 */
    test_decimal_bug();     /* test for the decimal bug */
@@ -10735,7 +10734,6 @@ int main(int argc, char **argv)
                               dates in the server */
    test_bug5399();         /* check that statement id uniquely identifies
                               statement */
    if (!opt_testcase)
    test_bug5194();         /* bulk inserts in prepared mode */
    test_bug5315();         /* check that mysql_change_user closes all
                               prepared statements */