Commit 6baeccc6 authored by unknown's avatar unknown
Browse files

Merge bk-internal.mysql.com:/data0/bk/mysql-5.0

into  bk-internal.mysql.com:/data0/bk/mysql-5.0-kt


client/mysql.cc:
  Auto merged
sql/share/errmsg.txt:
  Auto merged
parents af3f6282 312080b1
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -3642,12 +3642,14 @@ static const char* construct_prompt()
      case 'U':
	if (!full_username)
	  init_username();
	processed_prompt.append(full_username);
        processed_prompt.append(full_username ? full_username :
                                (current_user ?  current_user : "(unknown)"));
	break;
      case 'u':
	if (!full_username)
	  init_username();
	processed_prompt.append(part_username);
        processed_prompt.append(part_username ? part_username :
                                (current_user ?  current_user : "(unknown)"));
	break;
      case PROMPT_CHAR:
	processed_prompt.append(PROMPT_CHAR);
+11 −2
Original line number Diff line number Diff line
@@ -17,6 +17,14 @@
#include "client_priv.h"
#include <my_dir.h>

#ifdef __WIN__
const char *mysqlcheck_name= "mysqlcheck.exe";
const char *mysql_name= "mysql.exe";
#else
const char *mysqlcheck_name= "mysqlcheck";
const char *mysql_name= "mysql";
#endif /*__WIN__*/

static my_bool opt_force= 0, opt_verbose= 0, tty_password= 0;
static char *user= (char*) "root", *basedir= 0, *datadir= 0, *opt_password= 0;
static my_bool upgrade_defaults_created= 0;
@@ -272,7 +280,7 @@ int main(int argc, char **argv)
  strmake(bindir_end, "/bin", sizeof(bindir) - (int) (bindir_end - bindir)-1);

  if (!test_file_exists_res
      (bindir, "mysqlcheck", mysqlcheck_line, &mysqlcheck_end))
      (bindir, mysqlcheck_name, mysqlcheck_line, &mysqlcheck_end))
  {
    printf("Can't find program '%s'\n", mysqlcheck_line);
    puts("Please restart with --basedir=mysql-install-directory");
@@ -342,7 +350,8 @@ int main(int argc, char **argv)
    goto err_exit;

fix_priv_tables:
  if (!test_file_exists_res(bindir, "mysql", fix_priv_tables_cmd, &fix_cmd_end))
  if (!test_file_exists_res(bindir, mysql_name,
                            fix_priv_tables_cmd, &fix_cmd_end))
  {
    puts("Could not find MySQL command-line client (mysql).");
    puts
+3 −0
Original line number Diff line number Diff line
@@ -74,3 +74,6 @@ START INSTANCE mysqld1,mysqld2,mysqld3;
ERROR 42000: You have an error in your command syntax. Check the manual that corresponds to your MySQL Instance Manager version for the right syntax to use
STOP INSTANCE mysqld1,mysqld2,mysqld3;
ERROR 42000: You have an error in your command syntax. Check the manual that corresponds to your MySQL Instance Manager version for the right syntax to use
STOP INSTANCE mysqld2;
ERROR HY000: Cannot stop instance. Perhaps the instance is not started, or was started manually, so IM cannot find the pidfile.
End of 5.0 tests
+8 −0
Original line number Diff line number Diff line
@@ -218,3 +218,11 @@ START INSTANCE mysqld1,mysqld2,mysqld3;

--error ER_SYNTAX_ERROR
STOP INSTANCE mysqld1,mysqld2,mysqld3;

#
# Bug #12673: Instance Manager: allows to stop the instance many times
#
--error 3001
STOP INSTANCE mysqld2;

--echo End of 5.0 tests
+23 −22
Original line number Diff line number Diff line
@@ -469,6 +469,8 @@ int Instance::stop()
  struct timespec timeout;
  uint waitchild= (uint)  DEFAULT_SHUTDOWN_DELAY;

  if (is_running())
  {
    if (options.shutdown_delay_val)
      waitchild= options.shutdown_delay_val;

@@ -478,7 +480,7 @@ int Instance::stop()
    timeout.tv_sec= time(NULL) + waitchild;
    timeout.tv_nsec= 0;
    if (pthread_mutex_lock(&LOCK_instance))
    goto err;
      return ER_STOP_INSTANCE;

    while (options.get_pid() != 0)              /* while server isn't stopped */
    {
@@ -496,10 +498,9 @@ int Instance::stop()
    kill_instance(SIGKILL);

    return 0;
  }

  return ER_INSTANCE_IS_NOT_STARTED;
err:
  return ER_STOP_INSTANCE;
}

#ifdef __WIN__
Loading