1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

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

into  bk-internal.mysql.com:/data0/bk/mysql-5.0-kt
This commit is contained in:
rburnett@bk-internal.mysql.com
2006-07-24 16:25:20 +02:00
7 changed files with 69 additions and 46 deletions

View File

@ -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);

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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;
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;
while (options.get_pid() != 0) /* while server isn't stopped */
if (is_running())
{
int status;
if (options.shutdown_delay_val)
waitchild= options.shutdown_delay_val;
status= pthread_cond_timedwait(&COND_instance_stopped,
&LOCK_instance,
&timeout);
if (status == ETIMEDOUT || status == ETIME)
break;
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))
return ER_STOP_INSTANCE;
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;
}
pthread_mutex_unlock(&LOCK_instance);
kill_instance(SIGKILL);
return 0;
}
pthread_mutex_unlock(&LOCK_instance);
kill_instance(SIGKILL);
return 0;
return ER_INSTANCE_IS_NOT_STARTED;
err:
return ER_STOP_INSTANCE;
}
#ifdef __WIN__

View File

@ -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:

View File

@ -54,7 +54,7 @@ ER_CANT_CREATE_FILE
cze "Nemohu vytvo-B<>it soubor '%-.64s' (chybov<6F> k<>d: %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 cr<63>er le fichier '%-.64s' (Errcode: %d)"
ger "Kann Datei '%-.64s' nicht erzeugen (Fehler: %d)"
@ -278,7 +278,7 @@ ER_CANT_GET_STAT
cze "Nemohu z-B<>skat stav '%-.64s' (chybov<6F> k<>d: %d)"
dan "Kan ikke l<>se 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' <20>̃X<CC83>e<EFBFBD>C<EFBFBD>^<5E>X<EFBFBD><58><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><DC82><EFBFBD>. (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-B<><42>t soubor '%-.64s' (chybov<6F> k<>d: %d)"
dan "Kan ikke <20>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' <20>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD><EFBFBD><EFBFBD>J<EFBFBD><4A><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ł<EFBFBD><C582>܂<EFBFBD><DC82><EFBFBD> (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-B<>t soubor '%-.64s' (chybov<6F> k<>d: %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' <20>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>t<EFBFBD><74><EFBFBD><EFBFBD><E98E96><EFBFBD>ł<EFBFBD><C582>܂<EFBFBD><DC82><EFBFBD>.(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-B<>i <20>ten<65> souboru '%-.64s' (chybov<6F> k<>d: %d)"
dan "Fejl ved l<>sning 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' <20>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD>̓ǂݍ<C782><DD8D>݃G<DD83><47><EFBFBD>[ (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-B<>i z<>pisu do souboru '%-.64s' (chybov<6F> k<>d: %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' <20>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ł<EFBFBD><C582>܂<EFBFBD><DC82><EFBFBD> (errno: %d)",
est "Viga faili '%-.64s' kirjutamisel (veakood: %d)"
fre "Erreur d'<27>criture du fichier '%-.64s' (Errcode: %d)"
@ -772,7 +772,7 @@ ER_NOT_FORM_FILE
cze "Nespr-B<>vn<76> 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 "<22>t<EFBFBD>@<40>C<EFBFBD><43> '%-.64s' <20><> info <20><><EFBFBD>Ԉ<EFBFBD><D488><EFBFBD><EFBFBD>Ă<EFBFBD><C482><EFBFBD><EFBFBD><EFBFBD>ł<EFBFBD>",
est "Vigane informatsioon failis '%-.64s'"
fre "Information erronn<6E>e dans le fichier: '%-.64s'"
@ -797,7 +797,7 @@ ER_NOT_KEYFILE
cze "Nespr-B<>vn<76> kl<6B><6C> pro tabulku '%-.64s'; pokuste se ho opravit"
dan "Fejl i indeksfilen til tabellen '%-.64s'; pr<70>v 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' <20>e<EFBFBD>[<5B>u<EFBFBD><75><EFBFBD><EFBFBD> key file <20><><EFBFBD>Ԉ<EFBFBD><D488><EFBFBD><EFBFBD>Ă<EFBFBD><C482><EFBFBD><EFBFBD><EFBFBD>ł<EFBFBD>. <20>C<EFBFBD><43><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ă<EFBFBD><C482><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
est "Tabeli '%-.64s' v<>tmefail on vigane; proovi seda parandada"
fre "Index corrompu dans la table: '%-.64s'; essayez de le r<>parer"
@ -2044,7 +2044,7 @@ ER_TEXTFILE_NOT_READABLE
cze "Soubor '%-.64s' mus-B<> b<>t v adres<65><73>i datab<61>ze nebo <20>iteln<6C> pro v<>echny"
dan "Filen '%-.64s' skal v<>re i database-folderen og kunne l<>ses 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 "<22>t<EFBFBD>@<40>C<EFBFBD><43> '%-.64s' <20><> databse <20><> directory <20>ɂ<EFBFBD><C982><EFBFBD>S<EFBFBD>Ẵ<C482><CC83>[<5B>U<EFBFBD>[<5B><><EFBFBD>ǂ߂<C782><DF82><EFBFBD>ɋ<EFBFBD><C98B>‚<EFBFBD><C282><EFBFBD><EFBFBD>Ă<EFBFBD><C482>Ȃ<EFBFBD><C882><EFBFBD><EFBFBD>΂Ȃ<CE82><C882>܂<EFBFBD><DC82><EFBFBD>.",
est "Fail '%-.64s' peab asuma andmebaasi kataloogis v<>i olema k<>igile loetav"
fre "Le fichier '%-.64s' doit <20>tre dans le r<>pertoire 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' <20>͊<EFBFBD><CD8A>ɑ<EFBFBD><C991>݂<EFBFBD><DD82>܂<EFBFBD>",
est "Fail '%-.80s' juba eksisteerib"
fre "Le fichier '%-.64s' existe d<>j<EFBFBD>"
@ -2345,7 +2345,7 @@ ER_NO_UNIQUE_LOGFILE
cze "Nemohu vytvo-B<>it jednozna<6E>n<EFBFBD> jm<6A>no logovac<61>ho 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 g<>n<EFBFBD>rer un unique nom de journal %s.(1-999)\n"
ger "Kann keinen eindeutigen Dateinamen f<>r die Logdatei %-.64s(1-999) erzeugen\n"
@ -5218,7 +5218,7 @@ ER_FPARSER_BAD_HEADER
rus "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> '%-.64s'"
ukr "<22><>צ<EFBFBD><D7A6><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20> <20><><EFBFBD>̦ '%-.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 "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> '%-.64s'"
ukr "<22><><EFBFBD><EFBFBD><EFBFBD>Ħ<EFBFBD><C4A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ˦<><CBA6><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҧ '%-.64s'"
@ -5387,7 +5387,7 @@ ER_LOGGING_PROHIBIT_CHANGING_OF
eng "Binary logging and replication forbid changing the global server %s"
ger "Bin<69>rlogs 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"