diff options
author | monty@hundin.mysql.fi <> | 2002-04-25 01:16:42 +0300 |
---|---|---|
committer | monty@hundin.mysql.fi <> | 2002-04-25 01:16:42 +0300 |
commit | 727122aadd80f9e1a127bcc1562c8dc95d786e4a (patch) | |
tree | 539e3f41736108728458d901c552313e5f058e8f /sql | |
parent | 1f5f3612f30d67029fe9cc2ff5d5e44daa5698f2 (diff) | |
parent | ecf2c4e15a677a9f33ba8e7d6b2eb6a9da6538e4 (diff) | |
download | mariadb-git-727122aadd80f9e1a127bcc1562c8dc95d786e4a.tar.gz |
merge
Diffstat (limited to 'sql')
27 files changed, 92 insertions, 66 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index bb773af1ddf..c560e1de974 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -490,8 +490,12 @@ Item_func_if::fix_length_and_dec() decimals=max(args[1]->decimals,args[2]->decimals); enum Item_result arg1_type=args[1]->result_type(); enum Item_result arg2_type=args[2]->result_type(); + binary=1; if (arg1_type == STRING_RESULT || arg2_type == STRING_RESULT) + { cached_result_type = STRING_RESULT; + binary=args[1]->binary | args[2]->binary; + } else if (arg1_type == REAL_RESULT || arg2_type == REAL_RESULT) cached_result_type = REAL_RESULT; else diff --git a/sql/item_func.cc b/sql/item_func.cc index 90e7a5a6477..09631b52cf6 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -59,7 +59,7 @@ bool Item_func::fix_fields(THD *thd,TABLE_LIST *tables) { Item **arg,**arg_end; - char buff[sizeof(double)]; // Max argument in function + char buff[STACK_BUFF_ALLOC]; // Max argument in function binary=0; used_tables_cache=0; const_item_cache=1; @@ -1087,7 +1087,7 @@ bool udf_handler::fix_fields(THD *thd,TABLE_LIST *tables,Item_result_field *func, uint arg_count, Item **arguments) { - char buff[sizeof(double)]; // Max argument in function + char buff[STACK_BUFF_ALLOC]; // Max argument in function DBUG_ENTER("Item_udf_func::fix_fields"); if (thd) @@ -1607,7 +1607,7 @@ longlong Item_func_get_lock::val_int() set_timespec(abstime,timeout); while (!thd->killed && (error=pthread_cond_timedwait(&ull->cond,&LOCK_user_locks,&abstime)) - != ETIME && error != ETIMEDOUT && ull->locked) ; + != ETIME && error != ETIMEDOUT && error != EINVAL && ull->locked) ; if (thd->killed) error=EINTR; // Return NULL if (ull->locked) @@ -2248,9 +2248,12 @@ double Item_func_match::val() Item *get_system_var(LEX_STRING name) { - if (!strcmp(name.str,"IDENTITY")) + if (!my_strcasecmp(name.str,"IDENTITY")) return new Item_int((char*) "@@IDENTITY", current_thd->insert_id(),21); - my_error(ER_UNKNOWN_SYSTEM_VARIABLE,MYF(0),name); + if (!my_strcasecmp(name.str,"VERSION")) + return new Item_string("@@VERSION",server_version, + (uint) strlen(server_version)); + net_printf(¤t_thd->net, ER_UNKNOWN_SYSTEM_VARIABLE, name.str); return 0; } diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index 12249d2292c..d1d538dd3c9 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -75,22 +75,30 @@ char* query_table_status(THD *thd,const char *db,const char *table_name); #define MAX_FIELDS_BEFORE_HASH 32 #define USER_VARS_HASH_SIZE 16 #define STACK_MIN_SIZE 8192 // Abort if less stack during eval. +#define STACK_BUFF_ALLOC 32 // For stack overrun checks #ifndef MYSQLD_NET_RETRY_COUNT #define MYSQLD_NET_RETRY_COUNT 10 // Abort read after this many int. #endif #define TEMP_POOL_SIZE 128 -/* The following parameters is to decide when to use an extra cache to - optimise seeks when reading a big table in sorted order */ +/* + The following parameters is to decide when to use an extra cache to + optimise seeks when reading a big table in sorted order +*/ #define MIN_FILE_LENGTH_TO_USE_ROW_CACHE (16L*1024*1024) #define MIN_ROWS_TO_USE_TABLE_CACHE 100 -// The following is used to decide if MySQL should use table scanning -// instead of reading with keys. The number says how many evaluation of the -// WHERE clause is comparable to reading one extra row from a table. +/* + The following is used to decide if MySQL should use table scanning + instead of reading with keys. The number says how many evaluation of the + WHERE clause is comparable to reading one extra row from a table. +*/ #define TIME_FOR_COMPARE 5 // 5 compares == one read -// Number of rows in a reference table when refereed through a not unique key. -// This value is only used when we don't know anything about the key -// distribution. + +/* + Number of rows in a reference table when refereed through a not unique key. + This value is only used when we don't know anything about the key + distribution. +*/ #define MATCHING_ROWS_IN_OTHER_TABLE 10 /* Don't pack string keys shorter than this (if PACK_KEYS=1 isn't used) */ diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 3f57d12559d..b660781162f 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -101,6 +101,16 @@ extern "C" { // Because of SCO 3.2V4.2 #endif /* NEED_SYS_SYSLOG_H */ int allow_severity = LOG_INFO; int deny_severity = LOG_WARNING; + +#ifdef __linux__ +#define my_fromhost(A) fromhost() +#define my_hosts_access(A) hosts_access() +#define my_eval_client(A) eval_client() +#else +#define my_fromhost(A) fromhost(A) +#define my_hosts_access(A) hosts_access(A) +#define my_eval_client(A) eval_client(A) +#endif #endif /* HAVE_LIBWRAP */ #ifdef HAVE_SYS_MMAN_H @@ -984,24 +994,22 @@ static void server_init(void) IPaddr.sin_addr.s_addr = my_bind_addr; IPaddr.sin_port = (unsigned short) htons((unsigned short) mysql_port); (void) setsockopt(ip_sock,SOL_SOCKET,SO_REUSEADDR,(char*)&arg,sizeof(arg)); - for(;;) + if (bind(ip_sock, my_reinterpret_cast(struct sockaddr *) (&IPaddr), + sizeof(IPaddr)) < 0) { - if (bind(ip_sock, my_reinterpret_cast(struct sockaddr *) (&IPaddr), - sizeof(IPaddr)) >= 0) - break; DBUG_PRINT("error",("Got error: %d from bind",socket_errno)); - sql_perror("Can't start server: Bind on TCP/IP port");/* Had a loop here */ + sql_perror("Can't start server: Bind on TCP/IP port"); sql_print_error("Do you already have another mysqld server running on port: %d ?",mysql_port); unireg_abort(1); } if (listen(ip_sock,(int) back_log) < 0) { + sql_perror("Can't start server: listen() on TCP/IP port"); sql_print_error("Error: listen() on TCP/IP failed with error %d", socket_errno); unireg_abort(1); } } - if (mysqld_chroot) set_root(mysqld_chroot); set_user(mysqld_user); // Works also with mysqld_user==NULL @@ -2332,7 +2340,6 @@ static void create_new_thread(THD *thd) if (cached_thread_count > wake_thread) { start_cached_thread(thd); - (void) pthread_mutex_unlock(&LOCK_thread_count); } else { @@ -2359,9 +2366,9 @@ static void create_new_thread(THD *thd) (void) pthread_mutex_unlock(&LOCK_thread_count); DBUG_VOID_RETURN; } - - (void) pthread_mutex_unlock(&LOCK_thread_count); } + (void) pthread_mutex_unlock(&LOCK_thread_count); + } DBUG_PRINT("info",("Thread created")); DBUG_VOID_RETURN; @@ -2505,24 +2512,16 @@ pthread_handler_decl(handle_connections_sockets,arg __attribute__((unused))) struct request_info req; signal(SIGCHLD, SIG_DFL); request_init(&req, RQ_DAEMON, libwrapName, RQ_FILE, new_sock, NULL); -#ifndef __linux__ - fromhost(&req); - if (!hosts_access(&req)) + my_fromhost(&req); + if (!my_hosts_access(&req)) { /* This may be stupid but refuse() includes an exit(0) which we surely don't want... clean_exit() - same stupid thing ... */ - syslog(deny_severity, "refused connect from %s", eval_client(&req)); -#else - fromhost(); - if (!hosts_access()) - { - syslog(deny_severity, "refused connect from %s", eval_client()); -#endif - if (req.sink) - ((void (*)(int))req.sink)(req.fd); + syslog(deny_severity, "refused connect from %s", + my_eval_client(&req)); /* C++ sucks (the gibberish in front just translates the supplied @@ -2530,7 +2529,10 @@ pthread_handler_decl(handle_connections_sockets,arg __attribute__((unused))) to a void(*sink)(int) if you omit the cast, the C++ compiler will cry... */ - (void) shutdown(new_sock,2); // This looks fine to me... + if (req.sink) + ((void (*)(int))req.sink)(req.fd); + + (void) shutdown(new_sock,2); (void) closesocket(new_sock); continue; } diff --git a/sql/share/czech/errmsg.txt b/sql/share/czech/errmsg.txt index 950ca4f6623..11a3063151d 100644 --- a/sql/share/czech/errmsg.txt +++ b/sql/share/czech/errmsg.txt @@ -203,7 +203,7 @@ "S-Bí»ová chyba pøi zápisu na master", "-B®ádný sloupec nemá vytvoøen fulltextový index", "Nemohu prov-Bést zadaný pøíkaz, proto¾e existují aktivní zamèené tabulky nebo aktivní transakce", -"Nezn-Bámá systémová promìnná '%-.64'", +"Nezn-Bámá systémová promìnná '%-.64s'", "Tabulka '%-.64s' je ozna-Bèena jako poru¹ená a mìla by být opravena", "Tabulka '%-.64s' je ozna-Bèena jako poru¹ená a poslední (automatická?) oprava se nezdaøila", "Warning: Some non-transactional changed tables couldn't be rolled back", diff --git a/sql/share/danish/errmsg.txt b/sql/share/danish/errmsg.txt index d87ed4ee629..e87f093e7cb 100644 --- a/sql/share/danish/errmsg.txt +++ b/sql/share/danish/errmsg.txt @@ -197,7 +197,7 @@ "Netværksfejl ved skrivning til master", "Kan ikke finde en FULLTEXT nøgle som svarer til kolonne listen", "Kan ikke udføre den givne kommando fordi der findes aktive, låste tabeller eller fordi der udføres en transaktion", -"Ukendt systemvariabel '%-.64'", +"Ukendt systemvariabel '%-.64s'", "Tabellen '%-.64s' er markeret med fejl og bør repareres", "Tabellen '%-.64s' er markeret med fejl og sidste (automatiske?) REPAIR fejlede", "Advarsel: Visse data i tabeller der ikke understøtter transaktioner kunne ikke tilbagestilles", diff --git a/sql/share/dutch/errmsg.txt b/sql/share/dutch/errmsg.txt index c8b47cb3c19..1ae3c78d66b 100644 --- a/sql/share/dutch/errmsg.txt +++ b/sql/share/dutch/errmsg.txt @@ -202,7 +202,7 @@ "Net fout tijdens schrijven naar master", "Kan geen FULLTEXT index vinden passend bij de kolom lijst", "Kan het gegeven commando niet uitvoeren, want u heeft actieve gelockte tabellen of een actieve transactie", -"Onbekende systeem variabele '%-.64'", +"Onbekende systeem variabele '%-.64s'", "Tabel '%-.64s' staat als gecrashed gemarkeerd en dient te worden gerepareerd", "Tabel '%-.64s' staat als gecrashed gemarkeerd en de laatste (automatische?) reparatie poging mislukte", "Waarschuwing: Roll back mislukt voor sommige buiten transacties gewijzigde tabellen", diff --git a/sql/share/english/errmsg.txt b/sql/share/english/errmsg.txt index 5033449c266..39f84e4d02f 100644 --- a/sql/share/english/errmsg.txt +++ b/sql/share/english/errmsg.txt @@ -194,7 +194,7 @@ "Net error writing to master", "Can't find FULLTEXT index matching the column list", "Can't execute the given command because you have active locked tables or an active transaction", -"Unknown system variable '%-.64'", +"Unknown system variable '%-.64s'", "Table '%-.64s' is marked as crashed and should be repaired", "Table '%-.64s' is marked as crashed and last (automatic?) repair failed", "Warning: Some non-transactional changed tables couldn't be rolled back", diff --git a/sql/share/estonian/errmsg.txt b/sql/share/estonian/errmsg.txt index 6a83468eae5..e4b27eb5336 100644 --- a/sql/share/estonian/errmsg.txt +++ b/sql/share/estonian/errmsg.txt @@ -199,7 +199,7 @@ "Net error writing to master", "Ei suutnud leida FULLTEXT indeksit, mis kattuks kasutatud tulpadega", "Ei suuda täita antud käsku kuna on aktiivseid lukke või käimasolev transaktsioon", -"Tundmatu süsteemne muutuja '%-.64'", +"Tundmatu süsteemne muutuja '%-.64s'", "Tabel '%-.64s' on märgitud vigaseks ja tuleb parandada", "Tabel '%-.64s' on märgitud vigaseks ja viimane (automaatne?) parandus ebaõnnestus", "Hoiatus: mõnesid transaktsioone mittetoetavaid tabeleid ei suudetud tagasi kerida", diff --git a/sql/share/french/errmsg.txt b/sql/share/french/errmsg.txt index cf3e3e845e4..5e0288657d5 100644 --- a/sql/share/french/errmsg.txt +++ b/sql/share/french/errmsg.txt @@ -194,7 +194,7 @@ "Net error writing to master", "Can't find FULLTEXT index matching the column list", "Can't execute the given command because you have active locked tables or an active transaction", -"Unknown system variable '%-.64'", +"Unknown system variable '%-.64s'", "Table '%-.64s' is marked as crashed and should be repaired", "Table '%-.64s' is marked as crashed and last (automatic?) repair failed", "Warning: Some non-transactional changed tables couldn't be rolled back", diff --git a/sql/share/german/errmsg.txt b/sql/share/german/errmsg.txt index 19d46fabab8..58c21ccbdfc 100644 --- a/sql/share/german/errmsg.txt +++ b/sql/share/german/errmsg.txt @@ -197,7 +197,7 @@ "Netzfehler beim Schreiben zum Master", "Kann keinen FULLTEXT-Index finden der der Spaltenliste entspricht", "Kann das aktuelle Kommando wegen aktiver Tabellensperre oder aktiver Transaktion nicht ausführen", -"Unbekannte System-Variabel '%-.64'", +"Unbekannte System-Variabel '%-.64s'", "Tabelle '%-.64s' ist als defekt makiert und sollte repariert werden", "Tabelle '%-.64s' ist als defekt makiert und der letzte (automatische) Reparaturversuch schlug fehl.", "Warnung: Das Rollback konnte bei einigen Tabellen, die nicht mittels Transaktionen geändert wurden, nicht ausgeführt werden.", diff --git a/sql/share/greek/errmsg.txt b/sql/share/greek/errmsg.txt index f9b4f137f82..c0387742de0 100644 --- a/sql/share/greek/errmsg.txt +++ b/sql/share/greek/errmsg.txt @@ -194,7 +194,7 @@ "Net error writing to master", "Can't find FULLTEXT index matching the column list", "Can't execute the given command because you have active locked tables or an active transaction", -"Unknown system variable '%-.64'", +"Unknown system variable '%-.64s'", "Table '%-.64s' is marked as crashed and should be repaired", "Table '%-.64s' is marked as crashed and last (automatic?) repair failed", "Warning: Some non-transactional changed tables couldn't be rolled back", diff --git a/sql/share/hungarian/errmsg.txt b/sql/share/hungarian/errmsg.txt index 38877371243..85563d00f03 100644 --- a/sql/share/hungarian/errmsg.txt +++ b/sql/share/hungarian/errmsg.txt @@ -196,7 +196,7 @@ "Net error writing to master", "Can't find FULLTEXT index matching the column list", "Can't execute the given command because you have active locked tables or an active transaction", -"Unknown system variable '%-.64'", +"Unknown system variable '%-.64s'", "Table '%-.64s' is marked as crashed and should be repaired", "Table '%-.64s' is marked as crashed and last (automatic?) repair failed", "Warning: Some non-transactional changed tables couldn't be rolled back", diff --git a/sql/share/italian/errmsg.txt b/sql/share/italian/errmsg.txt index e8cfd5a63a9..228de271ad6 100644 --- a/sql/share/italian/errmsg.txt +++ b/sql/share/italian/errmsg.txt @@ -194,7 +194,7 @@ "Errore di rete durante l'invio al master", "Impossibile trovare un indice FULLTEXT che corrisponda all'elenco delle colonne", "Impossibile eseguire il comando richiesto: tabelle sotto lock o transazione in atto", -"Variabile di sistema '%-.64' sconosciuta", +"Variabile di sistema '%-.64s' sconosciuta", "La tabella '%-.64s' e` segnalata come corrotta e deve essere riparata", "La tabella '%-.64s' e` segnalata come corrotta e l'ultima ricostruzione (automatica?) e` fallita", "Attenzione: Alcune delle modifiche alle tabelle non transazionali non possono essere ripristinate (roll back impossibile)", diff --git a/sql/share/japanese/errmsg.txt b/sql/share/japanese/errmsg.txt index 98bc099954f..6ffe5a25bf4 100644 --- a/sql/share/japanese/errmsg.txt +++ b/sql/share/japanese/errmsg.txt @@ -196,7 +196,7 @@ "Net error writing to master", "Can't find FULLTEXT index matching the column list", "Can't execute the given command because you have active locked tables or an active transaction", -"Unknown system variable '%-.64'", +"Unknown system variable '%-.64s'", "Table '%-.64s' is marked as crashed and should be repaired", "Table '%-.64s' is marked as crashed and last (automatic?) repair failed", "Warning: Some non-transactional changed tables couldn't be rolled back", diff --git a/sql/share/korean/errmsg.txt b/sql/share/korean/errmsg.txt index f6cc890cb39..fa2a6dc8624 100644 --- a/sql/share/korean/errmsg.txt +++ b/sql/share/korean/errmsg.txt @@ -194,7 +194,7 @@ "Net error writing to master", "Can't find FULLTEXT index matching the column list", "Can't execute the given command because you have active locked tables or an active transaction", -"Unknown system variable '%-.64'", +"Unknown system variable '%-.64s'", "Table '%-.64s' is marked as crashed and should be repaired", "Table '%-.64s' is marked as crashed and last (automatic?) repair failed", "Warning: Some non-transactional changed tables couldn't be rolled back", diff --git a/sql/share/norwegian-ny/errmsg.txt b/sql/share/norwegian-ny/errmsg.txt index adffc27949f..c3dbee47967 100644 --- a/sql/share/norwegian-ny/errmsg.txt +++ b/sql/share/norwegian-ny/errmsg.txt @@ -196,7 +196,7 @@ "Net error writing to master", "Can't find FULLTEXT index matching the column list", "Can't execute the given command because you have active locked tables or an active transaction", -"Unknown system variable '%-.64'", +"Unknown system variable '%-.64s'", "Table '%-.64s' is marked as crashed and should be repaired", "Table '%-.64s' is marked as crashed and last (automatic?) repair failed", "Warning: Some non-transactional changed tables couldn't be rolled back", diff --git a/sql/share/norwegian/errmsg.txt b/sql/share/norwegian/errmsg.txt index 09a1ea4684c..436b968e3df 100644 --- a/sql/share/norwegian/errmsg.txt +++ b/sql/share/norwegian/errmsg.txt @@ -196,7 +196,7 @@ "Net error writing to master", "Can't find FULLTEXT index matching the column list", "Can't execute the given command because you have active locked tables or an active transaction", -"Unknown system variable '%-.64'", +"Unknown system variable '%-.64s'", "Table '%-.64s' is marked as crashed and should be repaired", "Table '%-.64s' is marked as crashed and last (automatic?) repair failed", "Warning: Some non-transactional changed tables couldn't be rolled back", diff --git a/sql/share/polish/errmsg.txt b/sql/share/polish/errmsg.txt index 12a9bd358b5..3883d98f7dd 100644 --- a/sql/share/polish/errmsg.txt +++ b/sql/share/polish/errmsg.txt @@ -198,7 +198,7 @@ "Net error writing to master", "Can't find FULLTEXT index matching the column list", "Can't execute the given command because you have active locked tables or an active transaction", -"Unknown system variable '%-.64'", +"Unknown system variable '%-.64s'", "Table '%-.64s' is marked as crashed and should be repaired", "Table '%-.64s' is marked as crashed and last (automatic?) repair failed", "Warning: Some non-transactional changed tables couldn't be rolled back", diff --git a/sql/share/portuguese/errmsg.txt b/sql/share/portuguese/errmsg.txt index b7feb0a7b0d..335d5b96105 100644 --- a/sql/share/portuguese/errmsg.txt +++ b/sql/share/portuguese/errmsg.txt @@ -194,7 +194,7 @@ "Erro de rede na gravação do 'master'", "Não pode encontrar índice FULLTEXT que combine com a lista de colunas", "Não pode executar o comando dado porque você tem tabelas ativas travadas ou uma 'transaction' ativa", -"Variável de sistema '%-.64' desconhecida", +"Variável de sistema '%-.64s' desconhecida", "Tabela '%-.64s' está marcada como danificada e deve ser reparada", "Tabela '%-.64s' está marcada como danificada e a última reparação (automática?) falhou", "Aviso: Algumas tabelas não-transacionais alteradas não puderam ser reconstituídas ('rolled back')", diff --git a/sql/share/romanian/errmsg.txt b/sql/share/romanian/errmsg.txt index 8e48cabfc39..a5df91da19a 100644 --- a/sql/share/romanian/errmsg.txt +++ b/sql/share/romanian/errmsg.txt @@ -198,7 +198,7 @@ "Net error writing to master", "Can't find FULLTEXT index matching the column list", "Can't execute the given command because you have active locked tables or an active transaction", -"Unknown system variable '%-.64'", +"Unknown system variable '%-.64s'", "Table '%-.64s' is marked as crashed and should be repaired", "Table '%-.64s' is marked as crashed and last (automatic?) repair failed", "Warning: Some non-transactional changed tables couldn't be rolled back", diff --git a/sql/share/russian/errmsg.txt b/sql/share/russian/errmsg.txt index 8ed33ec21a0..36b165bfca2 100644 --- a/sql/share/russian/errmsg.txt +++ b/sql/share/russian/errmsg.txt @@ -197,7 +197,7 @@ "óÅÔÅ×ÁÑ ÏÛÉÂËÁ ÐÒÉ ÐÉÓÁÎÉÉ ÍÁÓÔÅÒÕ", "FULLTEXT ÉÎÄÅËÓ, ÓÏÏÔ×ÅÔÓÔ×ÕÀÝÉÊ ÚÁÄÁÎÎÏÍÕ ÓÐÉÓËÕ ÓÔÏÌÂÃÏ×, ÎÅ ÎÁÊÄÅÎ", "îÅ ÍÏÇÕ ×ÙÐÏÌÎÉÔØ ËÏÍÍÁÎÄÕ ÉÚ-ÚÁ ÁËÔÉ×ÎÙÈ locked ÔÁÂÌÉà ÉÌÉ ÁËÔÉ×ÎÏÊ ÔÒÁÎÚÁËÃÉÉ", -"îÅÉÚ×ÅÓÔÎÁÑ ÓÉÓÔÅÍÎÁÑ ÐÅÒÅÍÅÎÎÁÑ '%-.64'", +"îÅÉÚ×ÅÓÔÎÁÑ ÓÉÓÔÅÍÎÁÑ ÐÅÒÅÍÅÎÎÁÑ '%-.64s'", "ôÁÂÌÉÃÁ '%-.64s' ÐÏÍÅÞÅÎÁ ËÁË ÉÓÐÏÒÞÅÎÎÁÑ É ÄÏÌÖÎÁ ÂÙÔØ ÉÓÐÒÁ×ÌÅÎÁ", "ôÁÂÌÉÃÁ '%-.64s' ÐÏÍÅÞÅÎÁ ËÁË ÉÓÐÏÒÞÅÎÎÁÑ É ÐÏÓÌÅÄÎÑÑ ÐÏÐÙÔËÁ ÉÓÐÒÁ×ÌÅÎÉÑ (Á×ÔÏÍÁÔÉÞÅÓËÁÑ?) ÎÅ ÕÄÁÌÁÓØ", "ðÒÅÄÕÐÒÅÖÄÅÎÉÅ: ÎÅËÏÔÏÒÙÅ ÎÅÔÒÁÎÚÁËÃÉÏÎÎÙÅ ÔÁÂÌÉÃÙ ÎÅ ÐÏÄÞÉÎÑÀÔÓÑ ROLLBACK", diff --git a/sql/share/slovak/errmsg.txt b/sql/share/slovak/errmsg.txt index 06503cdf69e..2b8878fb411 100644 --- a/sql/share/slovak/errmsg.txt +++ b/sql/share/slovak/errmsg.txt @@ -202,7 +202,7 @@ "Net error writing to master", "Can't find FULLTEXT index matching the column list", "Can't execute the given command because you have active locked tables or an active transaction", -"Unknown system variable '%-.64'", +"Unknown system variable '%-.64s'", "Table '%-.64s' is marked as crashed and should be repaired", "Table '%-.64s' is marked as crashed and last (automatic?) repair failed", "Warning: Some non-transactional changed tables couldn't be rolled back", diff --git a/sql/share/spanish/errmsg.txt b/sql/share/spanish/errmsg.txt index 4240581c5b8..c69f021db73 100644 --- a/sql/share/spanish/errmsg.txt +++ b/sql/share/spanish/errmsg.txt @@ -195,7 +195,7 @@ "Error de red escribiendo para el master", "No puedo encontrar índice FULLTEXT correspondiendo a la lista de columnas", "No puedo ejecutar el comando dado porque tienes tablas bloqueadas o una transición activa", -"Desconocida variable de sistema '%-.64'", +"Desconocida variable de sistema '%-.64s'", "Tabla '%-.64s' está marcada como crashed y debe ser reparada", "Tabla '%-.64s' está marcada como crashed y la última reparación (automactica?) falló", "Aviso: Algunas tablas no transancionales no pueden tener rolled back", diff --git a/sql/share/swedish/errmsg.txt b/sql/share/swedish/errmsg.txt index e774f4a2c5c..4bb810e1909 100644 --- a/sql/share/swedish/errmsg.txt +++ b/sql/share/swedish/errmsg.txt @@ -194,7 +194,7 @@ "Fick nätverksfel vid skrivning till master", "Hittar inte ett FULLTEXT index i kolumnlistan", "Kan inte exekvera kommandot emedan du har en låst tabell eller an aktiv transaktion", -"Okänd system variabel '%-.64'", +"Okänd system variabel '%-.64s'", "Tabell '%-.64s' är crashad och bör repareras med REPAIR TABLE", "Tabell '%-.64s' är crashad och senast (automatiska?) reparation misslyckades", "Warning: Några icke transaktionella tabeller kunde inte återställas vid ROLLBACK", diff --git a/sql/share/ukrainian/errmsg.txt b/sql/share/ukrainian/errmsg.txt index c4c89433331..6777f1230e7 100644 --- a/sql/share/ukrainian/errmsg.txt +++ b/sql/share/ukrainian/errmsg.txt @@ -199,7 +199,7 @@ "íÅÒÅÖÅ×Á ÐÏÍÉÌËÁ ÚÁÐÉÓÕ ÄÏ ÇÏÌÏ×ÎÏÇÏ", "îÅ ÍÏÖÕ ÚÎÁÊÔÉ FULLTEXT ¦ÎÄÅËÓ, ÝÏ ×¦ÄÐÏצÄÁ¤ ÐÅÒÅ̦ËÕ ÓÔÏ×Âæ×", "îÅ ÍÏÖÕ ×ÉËÏÎÁÔÉ ÐÏÄÁÎÕ ËÏÍÁÎÄÕ ÔÏÍÕ, ÝÏ ÔÁÂÌÉÃÑ ÚÁÂÌÏËÏ×ÁÎÁ ÁÂÏ ×ÉËÏÎÕ¤ÔØÓÑ ÔÒÁÎÚÁËæÑ", -"îÅצÄÏÍÁ ÓÉÓÔÅÍÎÁ ÚͦÎÎÁ '%-.64'", +"îÅצÄÏÍÁ ÓÉÓÔÅÍÎÁ ÚͦÎÎÁ '%-.64s'", "ôÁÂÌÉÃÀ '%-.64s' ÍÁÒËÏ×ÁÎÏ ÑË Ú¦ÐÓÏ×ÁÎÕ ÔÁ §§ ÐÏÔÒ¦ÂÎÏ ×¦ÄÎÏ×ÉÔÉ", "ôÁÂÌÉÃÀ '%-.64s' ÍÁÒËÏ×ÁÎÏ ÑË Ú¦ÐÓÏ×ÁÎÕ ÔÁ ÏÓÔÁÎΤ (Á×ÔÏÍÁÔÉÞÎÅ?) צÄÎÏ×ÌÅÎÎÑ ÎÅ ×ÄÁÌÏÓÑ", "úÁÓÔÅÒÅÖÅÎÎÑ: äÅÑ˦ ÎÅÔÒÁÎÚÁËæÊΦ ÚͦÎÉ ÔÁÂÌÉÃØ ÎÅ ÍÏÖÎÁ ÂÕÄÅ ÐÏ×ÅÒÎÕÔÉ", diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 8d7df7eb8e9..9fb1e88aeea 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -570,21 +570,30 @@ mysqld_show_create(THD *thd, TABLE_LIST *table_list) { packet->length(0); net_store_data(packet,convert, table->table_name); - // a hack - we need to reserve some space for the length before - // we know what it is - let's assume that the length of create table - // statement will fit into 3 bytes ( 16 MB max :-) ) + /* + A hack - we need to reserve some space for the length before + we know what it is - let's assume that the length of create table + statement will fit into 3 bytes ( 16 MB max :-) ) + */ ulong store_len_offset = packet->length(); packet->length(store_len_offset + 4); if (store_create_info(thd, table, packet)) DBUG_RETURN(-1); ulong create_len = packet->length() - store_len_offset - 4; if (create_len > 0x00ffffff) // better readable in HEX ... - DBUG_RETURN(1); // just in case somebody manages to create a table - // with *that* much stuff in the definition + { + /* + Just in case somebody manages to create a table + with *that* much stuff in the definition + */ + DBUG_RETURN(1); + } - // now we have to store the length in three bytes, even if it would fit - // into fewer, so we cannot use net_store_data() anymore, - // and do it ourselves + /* + Now we have to store the length in three bytes, even if it would fit + into fewer bytes, so we cannot use net_store_data() anymore, + and do it ourselves + */ char* p = (char*)packet->ptr() + store_len_offset; *p++ = (char) 253; // The client the length is stored using 3-bytes int3store(p, create_len); @@ -1148,7 +1157,7 @@ int mysqld_show(THD *thd, const char *wild, show_var_st *variables) pthread_mutex_lock(&LOCK_status); for (i=0; variables[i].name; i++) { - if (!(wild && wild[0] && wild_compare(variables[i].name,wild))) + if (!(wild && wild[0] && wild_case_compare(variables[i].name,wild))) { packet2.length(0); net_store_data(&packet2,convert,variables[i].name); |