Commit 9b396858 authored by monty@mashka.mysql.fi's avatar monty@mashka.mysql.fi

Small optimization of sending big blocks.

Updated Italian error messages
parent 3ca695ea
...@@ -285,6 +285,7 @@ net_write_command(NET *net,uchar command,const char *packet,ulong len) ...@@ -285,6 +285,7 @@ net_write_command(NET *net,uchar command,const char *packet,ulong len)
/* /*
Caching the data in a local buffer before sending it. Caching the data in a local buffer before sending it.
One can force the buffer to be flushed with 'net_flush'. One can force the buffer to be flushed with 'net_flush'.
*/ */
static int static int
...@@ -292,15 +293,24 @@ net_write_buff(NET *net,const char *packet,ulong len) ...@@ -292,15 +293,24 @@ net_write_buff(NET *net,const char *packet,ulong len)
{ {
ulong left_length=(ulong) (net->buff_end - net->write_pos); ulong left_length=(ulong) (net->buff_end - net->write_pos);
while (len > left_length) if (len > left_length)
{ {
memcpy((char*) net->write_pos,packet,left_length); memcpy((char*) net->write_pos,packet,left_length);
if (net_real_write(net,(char*) net->buff,net->max_packet)) if (net_real_write(net,(char*) net->buff,net->max_packet))
return 1; return 1;
net->write_pos=net->buff; net->write_pos=net->buff;
packet+=left_length; packet+=left_length;
len-=left_length; len-= left_length;
left_length=net->max_packet; left_length= net->max_packet;
/* Send out rest of the blocks as full sized blocks */
while (len > left_length)
{
if (net_real_write(net, packet, left_length))
return 1;
packet+= left_length;
len-= left_length;
}
} }
memcpy((char*) net->write_pos,packet,len); memcpy((char*) net->write_pos,packet,len);
net->write_pos+=len; net->write_pos+=len;
...@@ -633,7 +643,10 @@ my_real_read(NET *net, ulong *complen) ...@@ -633,7 +643,10 @@ my_real_read(NET *net, ulong *complen)
#ifdef HAVE_COMPRESS #ifdef HAVE_COMPRESS
if (net->compress) if (net->compress)
{ {
/* complen is > 0 if package is really compressed */ /*
If the packet is compressed then complen > 0 and contains the
number of bytes in the uncompressed packet
*/
*complen=uint3korr(&(net->buff[net->where_b + NET_HEADER_SIZE])); *complen=uint3korr(&(net->buff[net->where_b + NET_HEADER_SIZE]));
} }
#endif #endif
...@@ -704,7 +717,7 @@ my_net_read(NET *net) ...@@ -704,7 +717,7 @@ my_net_read(NET *net)
{ {
net->where_b += len; net->where_b += len;
total_length += len; total_length += len;
len = my_real_read (net,&complen); len = my_real_read(net,&complen);
} while (len == MAX_THREE_BYTES); } while (len == MAX_THREE_BYTES);
if (len != packet_error) if (len != packet_error)
len+= total_length; len+= total_length;
...@@ -732,7 +745,7 @@ my_net_read(NET *net) ...@@ -732,7 +745,7 @@ my_net_read(NET *net)
} }
else else
{ {
/* reuse buffer, as there is noting in it that we need */ /* reuse buffer, as there is nothing in it that we need */
buf_length=start_of_packet=first_packet_offset=0; buf_length=start_of_packet=first_packet_offset=0;
} }
for (;;) for (;;)
......
...@@ -219,22 +219,22 @@ ...@@ -219,22 +219,22 @@
"Impossibile aggiungere il vincolo di integrita' referenziale (foreign key constraint)", "Impossibile aggiungere il vincolo di integrita' referenziale (foreign key constraint)",
"Impossibile aggiungere la riga: un vincolo d'integrita' referenziale non e' soddisfatto", "Impossibile aggiungere la riga: un vincolo d'integrita' referenziale non e' soddisfatto",
"Impossibile cancellare la riga: un vincolo d'integrita' referenziale non e' soddisfatto", "Impossibile cancellare la riga: un vincolo d'integrita' referenziale non e' soddisfatto",
"Error connecting to master: %-.128s", "Errore durante la connessione al master: %-.128s",
"Error running query on master: %-.128s", "Errore eseguendo una query sul master: %-.128s",
"Error when executing command %s: %-.128s", "Errore durante l'esecuzione del comando %s: %-.128s",
"Wrong usage of %s and %s", "Uso errato di %s e %s",
"The used SELECT statements have a different number of columns", "La SELECT utilizzata ha un numero di colonne differente",
"Can't execute the query because you have a conflicting read lock", "Impossibile eseguire la query perche' c'e' un conflitto con in lock di lettura",
"Mixing of transactional and non-transactional tables is disabled", "E' disabilitata la possibilita' di mischiare tabelle transazionali e non-transazionali",
"Option '%s' used twice in statement", "L'opzione '%s' e' stata usata due volte nel comando",
"User '%-.64s' has exceeded the '%s' resource (current value: %ld)", "L'utente '%-.64s' ha ecceduto la risorsa '%s' (valore corrente: %ld)",
"Access denied. You need the %-.128s privilege for this operation", "Accesso non consentito. Serve il privilegio %-.128s per questa operazione",
"Variable '%-.64s' is a LOCAL variable and can't be used with SET GLOBAL", "La variabile '%-.64s' e' una variabile locale ( LOCAL ) e non puo' essere cambiata usando SET GLOBAL",
"Variable '%-.64s' is a GLOBAL variable and should be set with SET GLOBAL", "La variabile '%-.64s' e' una variabile globale ( GLOBAL ) e deve essere cambiata usando SET GLOBAL",
"Variable '%-.64s' doesn't have a default value", "La variabile '%-.64s' non ha un valore di default",
"Variable '%-.64s' can't be set to the value of '%-.64s'", "Alla variabile '%-.64s' non puo' essere assegato il valore '%-.64s'",
"Wrong argument type to variable '%-.64s'", "Tipo di valore errato per la variabile '%-.64s'",
"Variable '%-.64s' can only be set, not read", "Alla variabile '%-.64s' e' di sola scrittura quindi puo' essere solo assegnato un valore, non letto",
"Wrong usage/placement of '%s'", "Uso/posizione di '%s' sbagliato",
"This version of MySQL doesn't yet support '%s'", "Questa versione di MySQL non supporta ancora '%s'",
"Got fatal error %d: '%-.128s' from master when reading data from binary log", "Errore fatale %d: '%-.128s' dal master leggendo i dati dal log binario",
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