Commit fe7c2520 authored by rburnett@bk-internal.mysql.com's avatar rburnett@bk-internal.mysql.com

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

into  bk-internal.mysql.com:/data0/bk/mysql-5.0-kt
parents 5ac44f14 40fd4c58
......@@ -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);
......
......@@ -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
......
......@@ -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
......@@ -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
......@@ -469,37 +469,38 @@ int Instance::stop()
struct timespec timeout;
uint waitchild= (uint) DEFAULT_SHUTDOWN_DELAY;
if (options.shutdown_delay_val)
waitchild= options.shutdown_delay_val;
if (is_running())
{
if (options.shutdown_delay_val)
waitchild= options.shutdown_delay_val;
kill_instance(SIGTERM);
/* sleep on condition to wait for SIGCHLD */
kill_instance(SIGTERM);
/* sleep on condition to wait for SIGCHLD */
timeout.tv_sec= time(NULL) + waitchild;
timeout.tv_nsec= 0;
if (pthread_mutex_lock(&LOCK_instance))
goto err;
timeout.tv_sec= time(NULL) + waitchild;
timeout.tv_nsec= 0;
if (pthread_mutex_lock(&LOCK_instance))
return ER_STOP_INSTANCE;
while (options.get_pid() != 0) /* while server isn't stopped */
{
int status;
while (options.get_pid() != 0) /* while server isn't stopped */
{
int status;
status= pthread_cond_timedwait(&COND_instance_stopped,
&LOCK_instance,
&timeout);
if (status == ETIMEDOUT || status == ETIME)
break;
}
status= pthread_cond_timedwait(&COND_instance_stopped,
&LOCK_instance,
&timeout);
if (status == ETIMEDOUT || status == ETIME)
break;
}
pthread_mutex_unlock(&LOCK_instance);
pthread_mutex_unlock(&LOCK_instance);
kill_instance(SIGKILL);
kill_instance(SIGKILL);
return 0;
return 0;
}
return ER_INSTANCE_IS_NOT_STARTED;
err:
return ER_STOP_INSTANCE;
}
#ifdef __WIN__
......
......@@ -48,8 +48,8 @@ static const char *mysqld_error_message(unsigned sql_errno)
case ER_BAD_INSTANCE_NAME:
return "Bad instance name. Check that the instance with such a name exists";
case ER_INSTANCE_IS_NOT_STARTED:
return "Cannot stop instance. Perhaps the instance is not started, or was started"
"manually, so IM cannot find the pidfile.";
return "Cannot stop instance. Perhaps the instance is not started, or was"
" started manually, so IM cannot find the pidfile.";
case ER_INSTANCE_ALREADY_STARTED:
return "The instance is already started";
case ER_CANNOT_START_INSTANCE:
......@@ -67,7 +67,7 @@ static const char *mysqld_error_message(unsigned sql_errno)
return "Cannot open log file";
case ER_GUESS_LOGFILE:
return "Cannot guess the log filename. Try specifying full log name"
"in the instance options";
" in the instance options";
case ER_ACCESS_OPTION_FILE:
return "Cannot open the option file to edit. Check permissions";
default:
......
......@@ -54,7 +54,7 @@ ER_CANT_CREATE_FILE
cze "Nemohu vytvo-Bit soubor '%-.64s' (chybov kd: %d)"
dan "Kan ikke oprette filen '%-.64s' (Fejlkode: %d)"
nla "Kan file '%-.64s' niet aanmaken (Errcode: %d)"
eng "Can't create file '%-.64s' (errno: %d)"
eng "Can't create file '%-.200s' (errno: %d)"
est "Ei suuda luua faili '%-.64s' (veakood: %d)"
fre "Ne peut crer le fichier '%-.64s' (Errcode: %d)"
ger "Kann Datei '%-.64s' nicht erzeugen (Fehler: %d)"
......@@ -278,7 +278,7 @@ ER_CANT_GET_STAT
cze "Nemohu z-Bskat stav '%-.64s' (chybov kd: %d)"
dan "Kan ikke lse status af '%-.64s' (Fejlkode: %d)"
nla "Kan de status niet krijgen van '%-.64s' (Errcode: %d)"
eng "Can't get status of '%-.64s' (errno: %d)"
eng "Can't get status of '%-.200s' (errno: %d)"
jps "'%-.64s' ̃XeC^X܂. (errno: %d)",
est "Ei suuda lugeda '%-.64s' olekut (veakood: %d)"
fre "Ne peut obtenir le status de '%-.64s' (Errcode: %d)"
......@@ -353,7 +353,7 @@ ER_CANT_OPEN_FILE
cze "Nemohu otev-Bt soubor '%-.64s' (chybov kd: %d)"
dan "Kan ikke bne fil: '%-.64s' (Fejlkode: %d)"
nla "Kan de file '%-.64s' niet openen (Errcode: %d)"
eng "Can't open file: '%-.64s' (errno: %d)"
eng "Can't open file: '%-.200s' (errno: %d)"
jps "'%-.64s' t@CJł܂ (errno: %d)",
est "Ei suuda avada faili '%-.64s' (veakood: %d)"
fre "Ne peut ouvrir le fichier: '%-.64s' (Errcode: %d)"
......@@ -378,7 +378,7 @@ ER_FILE_NOT_FOUND
cze "Nemohu naj-Bt soubor '%-.64s' (chybov kd: %d)"
dan "Kan ikke finde fila: '%-.64s' (Fejlkode: %d)"
nla "Kan de file: '%-.64s' niet vinden (Errcode: %d)"
eng "Can't find file: '%-.64s' (errno: %d)"
eng "Can't find file: '%-.200s' (errno: %d)"
jps "'%-.64s' t@Ct鎖ł܂.(errno: %d)",
est "Ei suuda leida faili '%-.64s' (veakood: %d)"
fre "Ne peut trouver le fichier: '%-.64s' (Errcode: %d)"
......@@ -549,7 +549,7 @@ ER_ERROR_ON_READ
cze "Chyba p-Bi ten souboru '%-.64s' (chybov kd: %d)"
dan "Fejl ved lsning af '%-.64s' (Fejlkode: %d)"
nla "Fout bij het lezen van file '%-.64s' (Errcode: %d)"
eng "Error reading file '%-.64s' (errno: %d)"
eng "Error reading file '%-.200s' (errno: %d)"
jps "'%-.64s' t@C̓ǂݍ݃G[ (errno: %d)",
est "Viga faili '%-.64s' lugemisel (veakood: %d)"
fre "Erreur en lecture du fichier '%-.64s' (Errcode: %d)"
......@@ -599,7 +599,7 @@ ER_ERROR_ON_WRITE
cze "Chyba p-Bi zpisu do souboru '%-.64s' (chybov kd: %d)"
dan "Fejl ved skriving av filen '%-.64s' (Fejlkode: %d)"
nla "Fout bij het wegschrijven van file '%-.64s' (Errcode: %d)"
eng "Error writing file '%-.64s' (errno: %d)"
eng "Error writing file '%-.200s' (errno: %d)"
jps "'%-.64s' t@Cł܂ (errno: %d)",
est "Viga faili '%-.64s' kirjutamisel (veakood: %d)"
fre "Erreur d'criture du fichier '%-.64s' (Errcode: %d)"
......@@ -772,7 +772,7 @@ ER_NOT_FORM_FILE
cze "Nespr-Bvn informace v souboru '%-.64s'"
dan "Forkert indhold i: '%-.64s'"
nla "Verkeerde info in file: '%-.64s'"
eng "Incorrect information in file: '%-.64s'"
eng "Incorrect information in file: '%-.200s'"
jps "t@C '%-.64s' info ԈĂ悤ł",
est "Vigane informatsioon failis '%-.64s'"
fre "Information erronne dans le fichier: '%-.64s'"
......@@ -797,7 +797,7 @@ ER_NOT_KEYFILE
cze "Nespr-Bvn kl pro tabulku '%-.64s'; pokuste se ho opravit"
dan "Fejl i indeksfilen til tabellen '%-.64s'; prv at reparere den"
nla "Verkeerde zoeksleutel file voor tabel: '%-.64s'; probeer het te repareren"
eng "Incorrect key file for table '%-.64s'; try to repair it"
eng "Incorrect key file for table '%-.200s'; try to repair it"
jps "'%-.64s' e[u key file ԈĂ悤ł. CĂ",
est "Tabeli '%-.64s' vtmefail on vigane; proovi seda parandada"
fre "Index corrompu dans la table: '%-.64s'; essayez de le rparer"
......@@ -2044,7 +2044,7 @@ ER_TEXTFILE_NOT_READABLE
cze "Soubor '%-.64s' mus-B bt v adresi databze nebo iteln pro vechny"
dan "Filen '%-.64s' skal vre i database-folderen og kunne lses af alle"
nla "Het bestand '%-.64s' dient in de database directory voor the komen of leesbaar voor iedereen te zijn."
eng "The file '%-.64s' must be in the database directory or be readable by all"
eng "The file '%-.128s' must be in the database directory or be readable by all"
jps "t@C '%-.64s' databse directory ɂ邩SẴ[U[ǂ߂悤ɋ‚ĂȂ΂Ȃ܂.",
est "Fail '%-.64s' peab asuma andmebaasi kataloogis vi olema kigile loetav"
fre "Le fichier '%-.64s' doit tre dans le rpertoire de la base et lisible par tous"
......@@ -2069,7 +2069,7 @@ ER_FILE_EXISTS_ERROR
cze "Soubor '%-.64s' ji-B existuje"
dan "Filen '%-.64s' eksisterer allerede"
nla "Het bestand '%-.64s' bestaat reeds"
eng "File '%-.80s' already exists"
eng "File '%-.200s' already exists"
jps "File '%-.64s' ͊ɑ݂܂",
est "Fail '%-.80s' juba eksisteerib"
fre "Le fichier '%-.64s' existe dj"
......@@ -2345,7 +2345,7 @@ ER_NO_UNIQUE_LOGFILE
cze "Nemohu vytvo-Bit jednoznan jmno logovacho souboru %s.(1-999)\n"
dan "Kan ikke lave unikt log-filnavn %s.(1-999)\n"
nla "Het is niet mogelijk een unieke naam te maken voor de logfile %s.(1-999)\n"
eng "Can't generate a unique log-filename %-.64s.(1-999)\n"
eng "Can't generate a unique log-filename %-.200s.(1-999)\n"
est "Ei suuda luua unikaalset logifaili nime %-.64s.(1-999)\n"
fre "Ne peut gnrer un unique nom de journal %s.(1-999)\n"
ger "Kann keinen eindeutigen Dateinamen fr die Logdatei %-.64s(1-999) erzeugen\n"
......@@ -5218,7 +5218,7 @@ ER_FPARSER_BAD_HEADER
rus " '%-.64s'"
ukr "צ ̦ '%-.64s'"
ER_FPARSER_EOF_IN_COMMENT
eng "Unexpected end of file while parsing comment '%-.64s'"
eng "Unexpected end of file while parsing comment '%-.200s'"
ger "Unerwartetes Dateiende beim Parsen des Kommentars '%-.64s'"
rus " '%-.64s'"
ukr "Ħ ˦ Ҧ '%-.64s'"
......@@ -5387,7 +5387,7 @@ ER_LOGGING_PROHIBIT_CHANGING_OF
eng "Binary logging and replication forbid changing the global server %s"
ger "Binrlogs und Replikation verhindern Wechsel des globalen Servers %s"
ER_NO_FILE_MAPPING
eng "Can't map file: %-.64s, errno: %d"
eng "Can't map file: %-.200s, errno: %d"
ger "Kann Datei nicht abbilden: %-.64s, Fehler: %d"
ER_WRONG_MAGIC
eng "Wrong magic in %-.64s"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment