summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <tim@white.box>2001-06-29 15:28:50 -0400
committerunknown <tim@white.box>2001-06-29 15:28:50 -0400
commit02d0232e73ae66c0a9447af245f3097fff9de16f (patch)
treeafc310dac41d802c0722f5ca856ea6033da04fa9
parenta94cf8960921ac008d75a48b7e9b63d71b143c8a (diff)
parentc0e6d9df4ac60173035de8833a2c7a8d1be515c5 (diff)
downloadmariadb-git-02d0232e73ae66c0a9447af245f3097fff9de16f.tar.gz
Merge work.mysql.com:/home/bk/mysql into white.box:/home/tim/my/3
BitKeeper/etc/logging_ok: auto-union
-rw-r--r--BitKeeper/etc/logging_ok1
-rwxr-xr-xBitKeeper/triggers/post-commit9
-rwxr-xr-xBitKeeper/triggers/post-incoming3
-rwxr-xr-xBitKeeper/triggers/post-outgoing3
-rw-r--r--Docs/manual.ja.texi4
-rw-r--r--Docs/manual.texi5
-rw-r--r--mysql-test/r/rpl_sporadic_master.result7
-rw-r--r--mysql-test/r/type_float.result2
-rw-r--r--mysql-test/t/rpl_sporadic_master-master.opt1
-rw-r--r--mysql-test/t/rpl_sporadic_master.test24
-rw-r--r--sql/mysqld.cc19
-rw-r--r--sql/share/spanish/errmsg.txt240
-rw-r--r--sql/slave.cc16
-rw-r--r--sql/sql_repl.cc33
-rw-r--r--sql/sql_repl.h5
15 files changed, 238 insertions, 134 deletions
diff --git a/BitKeeper/etc/logging_ok b/BitKeeper/etc/logging_ok
index e4abb54c59e..be995584e7b 100644
--- a/BitKeeper/etc/logging_ok
+++ b/BitKeeper/etc/logging_ok
@@ -1,5 +1,6 @@
heikki@donna.mysql.fi
jani@janikt.pp.saunalahti.fi
+miguel@light.local
monty@hundin.mysql.fi
monty@tik.mysql.fi
monty@work.mysql.com
diff --git a/BitKeeper/triggers/post-commit b/BitKeeper/triggers/post-commit
index 619b6f88cea..dc5f2f2b824 100755
--- a/BitKeeper/triggers/post-commit
+++ b/BitKeeper/triggers/post-commit
@@ -37,9 +37,12 @@ From: $FROM
To: $INTERNALS
Subject: bk commit into 3.23 tree
-Below is the list of changes that have just been pushed into main
-3.23. repository. For information on how to access the repository
-see http://www.mysql.com/doc/I/n/Installing_source_tree.html
+Below is the list of changes that have just been commited into a local
+3.23. repository of $USER. When $USER does a push, they will be
+propogaged to the main repository and within 24 hours after the push into
+the public repository. For information on how to access
+the public repository see
+http://www.mysql.com/doc/I/n/Installing_source_tree.html
EOF
bk changes -v -r+
diff --git a/BitKeeper/triggers/post-incoming b/BitKeeper/triggers/post-incoming
new file mode 100755
index 00000000000..f1ea2255de9
--- /dev/null
+++ b/BitKeeper/triggers/post-incoming
@@ -0,0 +1,3 @@
+#! /bin/sh
+
+echo "Test: post-incoming works"
diff --git a/BitKeeper/triggers/post-outgoing b/BitKeeper/triggers/post-outgoing
new file mode 100755
index 00000000000..3fc2cdbad67
--- /dev/null
+++ b/BitKeeper/triggers/post-outgoing
@@ -0,0 +1,3 @@
+#! /bin/sh
+
+echo "Test: post-outgoing works"
diff --git a/Docs/manual.ja.texi b/Docs/manual.ja.texi
index 341676eab4a..d3ee43acd29 100644
--- a/Docs/manual.ja.texi
+++ b/Docs/manual.ja.texi
@@ -33032,7 +33032,7 @@ Performance handicapping system for yachts. Uses PHP. By
@item @uref{http://www.mysql.com/Contrib/hylalog-1.0.tar.gz, hylalog-1.0.tar.gz}
Store @code{hylafax} outgoing faxes in a @strong{MySQL} database. By Sinisa
-Milivojevic, @email{sinisa@@coresinc.com}.
+Milivojevic, @email{sinisa@@mysql.com}.
@item @uref{http://www.mysql.com/Contrib/mrtg-mysql-1.0.tar.gz, mrtg-mysql-1.0.tar.gz}
@strong{MySQL} status plotting with MRTG, by Luuk de Boer, @email{luuk@@wxs.nl}.
@@ -33268,7 +33268,7 @@ The @file{libmysql.dll} library.
Mysqlmanager, a Win32 GUI tool for administrating @strong{MySQL}.
@item Curt Sampson @email{cjs@@portal.ca}
Porting of MIT-pthreads to NetBSD/Alpha and NetBSD 1.3/i386.
-@item Sinisa Milivojevic @email{sinisa@@coresinc.com}
+@item Sinisa Milivojevic @email{sinisa@@mysql.com}
Compression (with @code{zlib}) to the client/server protocol.
Perfect hashing for the lexical analyzer phase.
@item Antony T. Curtis @email{antony.curtis@@olcs.net}
diff --git a/Docs/manual.texi b/Docs/manual.texi
index 998a2e73c0f..f09cbd5c1be 100644
--- a/Docs/manual.texi
+++ b/Docs/manual.texi
@@ -3084,6 +3084,11 @@ If so, it may have a local mailing list, so that messages sent from
cases, please contact your system administrator to be added to or dropped
from the local @strong{MySQL} list.
+If you wish to have traffic for a mailing list go to a separate mailbox in
+your mail program, set up a filter based on the message headers. You can
+use either the @code{List-ID:} or @code{Delivered-To:} headers to identify
+list messages.
+
The following @strong{MySQL} mailing lists exist:
@table @code
diff --git a/mysql-test/r/rpl_sporadic_master.result b/mysql-test/r/rpl_sporadic_master.result
new file mode 100644
index 00000000000..414468f0998
--- /dev/null
+++ b/mysql-test/r/rpl_sporadic_master.result
@@ -0,0 +1,7 @@
+n
+1
+2
+3
+4
+5
+6
diff --git a/mysql-test/r/type_float.result b/mysql-test/r/type_float.result
index 93a38e9967f..30a2f884557 100644
--- a/mysql-test/r/type_float.result
+++ b/mysql-test/r/type_float.result
@@ -2,6 +2,8 @@
10 10.0 10 10 10
6e-05 -6e-05 --6e-05 -6e-05+1.000000
6e-05 -6e-05 6e-05 0.99994
+1e1 1.e1 1.0e1 1e+1 1.e+1 1.0e+1 1e-1 1.e-1 1.0e-1
+10 10 10 10 10 10 0.1 0.1 0.1
Field Type Null Key Default Extra Privileges
f1 float YES NULL select,insert,update,references
f2 double YES NULL select,insert,update,references
diff --git a/mysql-test/t/rpl_sporadic_master-master.opt b/mysql-test/t/rpl_sporadic_master-master.opt
new file mode 100644
index 00000000000..6d5b66bed61
--- /dev/null
+++ b/mysql-test/t/rpl_sporadic_master-master.opt
@@ -0,0 +1 @@
+--sporadic-binlog-dump-fail --max-binlog-dump-events=2
diff --git a/mysql-test/t/rpl_sporadic_master.test b/mysql-test/t/rpl_sporadic_master.test
new file mode 100644
index 00000000000..ce6568f659e
--- /dev/null
+++ b/mysql-test/t/rpl_sporadic_master.test
@@ -0,0 +1,24 @@
+#test to see if replication can continue when master sporadically fails on
+# COM_BINLOG_DUMP and additionally limits the number of events per dump
+source include/master-slave.inc;
+connection master;
+drop table if exists t1;
+create table t1(n int not null auto_increment primary key);
+insert into t1 values (NULL),(NULL);
+delete from t1;
+insert into t1 values (NULL),(NULL);
+insert into t1 values (NULL),(NULL);
+flush logs;
+delete from t1;
+insert into t1 values (NULL),(NULL);
+insert into t1 values (NULL),(NULL);
+insert into t1 values (NULL),(NULL);
+save_master_pos;
+connection slave;
+sync_with_master;
+select * from t1;
+connection master;
+drop table t1;
+save_master_pos;
+connection slave;
+sync_with_master;
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 991b0e73c51..361479b4365 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -20,6 +20,7 @@
#include <my_dir.h>
#include "sql_acl.h"
#include "slave.h"
+#include "sql_repl.h"
#include "stacktrace.h"
#ifdef HAVE_BERKELEY_DB
#include "ha_berkeley.h"
@@ -2461,7 +2462,8 @@ enum options {
OPT_TEMP_POOL, OPT_TX_ISOLATION,
OPT_GEMINI_FLUSH_LOG, OPT_GEMINI_RECOVER,
OPT_GEMINI_UNBUFFERED_IO, OPT_SKIP_SAFEMALLOC,
- OPT_SKIP_STACK_TRACE, OPT_SKIP_SYMLINKS
+ OPT_SKIP_STACK_TRACE, OPT_SKIP_SYMLINKS,
+ OPT_MAX_BINLOG_DUMP_EVENTS, OPT_SPORADIC_BINLOG_DUMP_FAIL
};
static struct option long_options[] = {
@@ -2545,6 +2547,10 @@ static struct option long_options[] = {
(int) OPT_DISCONNECT_SLAVE_EVENT_COUNT},
{"abort-slave-event-count", required_argument, 0,
(int) OPT_ABORT_SLAVE_EVENT_COUNT},
+ {"max-binlog-dump-events", required_argument, 0,
+ (int) OPT_MAX_BINLOG_DUMP_EVENTS},
+ {"sporadic-binlog-dump-fail", no_argument, 0,
+ (int) OPT_SPORADIC_BINLOG_DUMP_FAIL},
{"safemalloc-mem-limit", required_argument, 0, (int)
OPT_SAFEMALLOC_MEM_LIMIT},
{"new", no_argument, 0, 'n'},
@@ -3301,6 +3307,17 @@ static void get_options(int argc,char **argv)
abort_slave_event_count = atoi(optarg);
#endif
break;
+ case (int)OPT_SPORADIC_BINLOG_DUMP_FAIL:
+#ifndef DBUG_OFF
+ opt_sporadic_binlog_dump_fail = 1;
+#endif
+ break;
+ case (int)OPT_MAX_BINLOG_DUMP_EVENTS:
+#ifndef DBUG_OFF
+ max_binlog_dump_events = atoi(optarg);
+#endif
+ break;
+
case (int) OPT_LOG_SLAVE_UPDATES:
opt_log_slave_updates = 1;
break;
diff --git a/sql/share/spanish/errmsg.txt b/sql/share/spanish/errmsg.txt
index ea97a282c83..a56bebbcf47 100644
--- a/sql/share/spanish/errmsg.txt
+++ b/sql/share/spanish/errmsg.txt
@@ -1,7 +1,7 @@
/* Copyright Abandoned 1997 TCX DataKonsult AB & Monty Program KB & Detron HB
- This file is public domain and comes with NO WARRANTY of any kind
- Traduccion por Miguel Angel Fernandez Roiz -- LoboCom Sistemas, s.l. */
-
+ This file is public domain and comes with NO WARRANTY of any kind
+ Traduccion por Miguel Angel Fernandez Roiz -- LoboCom Sistemas, s.l.
+ From June 28, 2001 translated by Miguel Solorzano miguel@mysql.com */
"hashchk",
"isamchk",
"NO",
@@ -46,8 +46,8 @@
"Memoria/espacio de tranpaso insuficiente",
"No puedo obtener el nombre de maquina de tu direccion",
"Protocolo erroneo",
-"Access denied for user: '%-.32s@%-.64s' to database '%-.64s'",
-"Access denied for user: '%-.32s@%-.64s' (Using password: %s)",
+"Acceso negado para usuario: '%-.32s@%-.64s' para la base de datos '%-.64s'",
+"Acceso negado para usuario: '%-.32s@%-.64s' (Usando clave: %s)",
"Base de datos no seleccionada",
"Comando desconocido",
"La columna '%-.64s' no puede ser nula",
@@ -84,14 +84,14 @@
"%s: Apagado completado\n",
"%s: Forzando a cerrar el thread %ld usuario: '%-.64s'\n",
"No puedo crear IP socket",
-"La tabla '%-.64s' no tiene indice como el usado en CREATE INDEX. Crea de nuevo la table",
+"La tabla '%-.64s' no tiene indice como el usado en CREATE INDEX. Crea de nuevo la tabla",
"Los separadores de argumentos del campo no son los especificados. Comprueba el manual",
"No puedes usar longitudes de filas fijos con BLOBs. Por favor usa 'campos terminados por '.",
"El archivo '%-.64s' debe estar en el directorio de la base de datos o ser de lectura por todos",
"El archivo '%-.64s' ya existe",
"Registros: %ld Borrados: %ld Saltados: %ld Peligros: %ld",
"Registros: %ld Duplicados: %ld",
-"Parte de la calve es erronea. Una parte de la calve no es una cadena o la longitud usada es tan grandecomo la parte de la clave",
+"Parte de la clave es erronea. Una parte de la clave no es una cadena o la longitud usada es tan grande como la parte de la clave",
"No puede borrar todos los campos con ALTER TABLE. Usa DROP TABLE para hacerlo",
"No puedo ELIMINAR '%-.64s'. compuebe que el campo/clave existe",
"Registros: %ld Duplicados: %ld Peligros: %ld",
@@ -99,116 +99,116 @@
"Identificador del thread: %lu desconocido",
"Tu no eres el propietario del thread%lu",
"No ha tablas usadas",
-"Too many strings for column %s and SET",
-"Can't generate a unique logfilename %s.(1-999)\n",
-"Table '%-.64s' was locked with a READ lock and can't be updated",
-"Table '%-.64s' was not locked with LOCK TABLES",
-"Blob field '%-.64s' can't have a default value",
-"Illegal database name '%-.64s'",
-"Illegal table name '%-.64s'",
-"The SELECT would examine too many records and probably take very long time. Check your WHERE and use SET OPTION SQL_BIG_SELECTS=1 if the SELECT is ok",
-"Unknown error",
-"Unkown procedure %s",
-"Wrong parameter count to procedure %s",
-"Wrong parameters to procedure %s",
-"Unknown table '%-.64s' in %s",
-"Field '%-.64s' specified twice",
-"Invalid use of group function",
-"Table '%-.64s' uses a extension that doesn't exist in this MySQL version",
-"A table must have at least 1 column",
-"The table '%-.64s' is full",
-"Unknown character set: '%-.64s'",
-"Too many tables. MySQL can only use %d tables in a join",
-"Too many fields",
-"Too big row size. The maximum row size, not counting blobs, is %d. You have to change some fields to blobs",
-"Thread stack overrun: Used: %ld of a %ld stack. Use 'mysqld -O thread_stack=#' to specify a bigger stack if needed",
-"Cross dependency found in OUTER JOIN. Examine your ON conditions",
-"Column '%-.32s' is used with UNIQUE or INDEX but is not defined as NOT NULL",
-"Can't load function '%-.64s'",
-"Can't initialize function '%-.64s'; %-.80s",
-"No paths allowed for shared library",
-"Function '%-.64s' already exist",
-"Can't open shared library '%-.64s' (errno: %d %s)",
-"Can't find function '%-.64s' in library'",
-"Function '%-.64s' is not defined",
-"Host '%-.64s' is blocked because of many connection errors. Unblock with 'mysqladmin flush-hosts'",
-"Host '%-.64s' is not allowed to connect to this MySQL server",
-"You are using MySQL as an anonymous users and anonymous users are not allowed to change passwords",
-"You must have privileges to update tables in the mysql database to be able to change passwords for others",
-"Can't find any matching row in the user table",
-"Rows matched: %ld Changed: %ld Warnings: %ld",
-"Can't create a new thread (errno %d). If you are not out of available memory you can consult the manual for any possible OS dependent bug",
-"Column count doesn't match value count at row %ld",
-"Can't reopen table: '%-.64s',
-"Invalid use of NULL value",
-"Got error '%-.64s' from regexp",
-"Mixing of GROUP columns (MIN(),MAX(),COUNT()...) with no GROUP columns is illegal if there is no GROUP BY clause",
-"There is no such grant defined for user '%-.32s' on host '%-.64s'",
-"%-.16s command denied to user: '%-.32s@%-.64s' for table '%-.64s'",
-"%-.16s command denied to user: '%-.32s@%-.64s' for column '%-.64s' in table '%-.64s'",
-"Illegal GRANT/REVOKE command. Please consult the manual which privleges can be used.",
-"The host or user argument to GRANT is too long",
-"Table '%-64s.%s' doesn't exist",
-"There is no such grant defined for user '%-.32s' on host '%-.64s' on table '%-.64s'",
-"The used command is not allowed with this MySQL version",
-"Something is wrong in your syntax",
-"Delayed insert thread couldn't get requested lock for table %-.64s",
-"Too many delayed threads in use",
-"Aborted connection %ld to db: '%-.64s' user: '%-.64s' (%s)",
-"Got a packet bigger than 'max_allowed_packet'",
-"Got a read error from the connection pipe",
-"Got an error from fcntl()",
-"Got packets out of order",
-"Couldn't uncompress communication packet",
-"Got an error reading communication packets"
-"Got timeout reading communication packets",
-"Got an error writing communication packets",
-"Got timeout writing communication packets",
-"Result string is longer than max_allowed_packet",
-"The used table type doesn't support BLOB/TEXT columns",
-"The used table type doesn't support AUTO_INCREMENT columns",
-"INSERT DELAYED can't be used with table '%-.64s', because it is locked with LOCK TABLES",
-"Incorrect column name '%-.100s'",
-"The used table handler can't index column '%-.64s'",
-"All tables in the MERGE table are not defined identically",
-"Can't write, because of unique constraint, to table '%-.64s'",
-"BLOB column '%-.64s' used in key specification without a key length",
-"All parts of a PRIMARY KEY must be NOT NULL; If you need NULL in a key, use UNIQUE instead",
-"Result consisted of more than one row",
-"This table type requires a primary key",
-"This version of MySQL is not compiled with RAID support",
-"You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column",
-"Key '%-.64s' doesn't exist in table '%-.64s'",
-"Can't open table",
-"The handler for the table doesn't support check/repair",
-"You are not allowed to execute this command in a transaction",
-"Got error %d during COMMIT",
-"Got error %d during ROLLBACK",
-"Got error %d during FLUSH_LOGS",
-"Got error %d during CHECKPOINT",
-"Aborted connection %ld to db: '%-.64s' user: '%-.32s' host: `%-.64s' (%-.64s)",
-"The handler for the table does not support binary table dump",
-"Binlog closed while trying to FLUSH MASTER",
-"Failed rebuilding the index of dumped table '%-.64s'",
-"Error from master: '%-.64s'",
-"Net error reading from master",
-"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'",
-"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",
-"Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage. Increase this mysqld variable and try again',
-"This operation cannot be performed with a running slave, run SLAVE STOP first",
-"This operation requires a running slave, configure slave and do SLAVE START",
-"The server is not configured as slave, fix in config file or with CHANGE MASTER TO",
-"Could not initialize master info structure, check permisions on master.info",
-"Could not create slave thread, check system resources",
-"User %-.64s has already more than 'max_user_connections' active connections",
-"You may only use constant expressions with SET",
-"Lock wait timeout exceeded",
-"The total number of locks exceeds the lock table size",
-"Update locks cannot be acquired during a READ UNCOMMITTED transaction",
-"DROP DATABASE not allowed while thread is holding global read lock",
-"CREATE DATABASE not allowed while thread is holding global read lock",
+"Muchas strings para columna %s y SET",
+"No puede crear un unico archivo log %s.(1-999)\n",
+"Tabla '%-.64s' fue trabada con un READ lock y no puede ser actualizada",
+"Tabla '%-.64s' no fue trabada con LOCK TABLES",
+"Campo Blob '%-.64s' no puede tener valores patron",
+"Nombre de base de datos ilegal '%-.64s'",
+"Nombre de tabla ilegal '%-.64s'",
+"El SELECT puede examinar muchos registros y probablemente con mucho tiempo. Verifique tu WHERE y usa SET OPTION SQL_BIG_SELECTS=1 si el SELECT esta correcto",
+"Error desconocido",
+"Procedimiento desconocido %s",
+"Equivocado parametro count para procedimiento %s",
+"Equivocados parametros para procedimiento %s",
+"Tabla desconocida '%-.64s' in %s",
+"Campo '%-.64s' especificado dos veces",
+"Invalido uso de funci�n en grupo",
+"Tabla '%-.64s' usa una extensi�n que no existe en esta MySQL versi�n",
+"Una tabla debe tener al menos 1 columna",
+"La tabla '%-.64s' est� llena",
+"Juego de caracteres desconocido: '%-.64s'",
+"Muchas tablas. MySQL solamente puede usar %d tablas en un join",
+"Muchos campos",
+"Tama�o de l�nea muy grande. M�ximo tama�o de l�nea, no contando blob, es %d. Tu tienes que cambiar algunos campos para blob",
+"Sobrecarga de la pila de thread: Usada: %ld de una %ld pila. Use 'mysqld -O thread_stack=#' para especificar una mayor pila si necesario",
+"Dependencia cruzada encontrada en OUTER JOIN. Examine su condici�n ON",
+"Columna '%-.32s' es usada con UNIQUE o INDEX pero no est� definida como NOT NULL",
+"No puedo cargar funci�n '%-.64s'",
+"No puedo inicializar funci�n '%-.64s'; %-.80s",
+"No pasos permitidos para librarias conjugadas",
+"Funci�n '%-.64s' ya existe",
+"No puedo abrir libraria conjugada '%-.64s' (errno: %d %s)",
+"No puedo encontrar funci�n '%-.64s' en libraria'",
+"Funci�n '%-.64s' no est� definida",
+"Servidor '%-.64s' est� bloqueado por muchos errores de conexi�n. Desbloquear con 'mysqladmin flush-hosts'",
+"Servidor '%-.64s' no est� permitido para conectar con este servidor MySQL",
+"Tu est�s usando MySQL como un usuario anonimo y usuarios anonimos no tienen permiso para cambiar las claves",
+"Tu debes de tener permiso para actualizar tablas en la base de datos mysql para cambiar las claves para otros",
+"No puedo encontrar una l�nea correponsdiente en la tabla user",
+"L�neas correspondientes: %ld Cambiadas: %ld Avisos: %ld",
+"No puedo crear un nuevo thread (errno %d). Si tu est� con falta de memoria disponible, tu puedes consultar el Manual para posibles problemas con SO",
+"El n�mero de columnas no corresponde al n�mero en la l�nea %ld",
+"No puedo reabrir tabla: '%-.64s',
+"Invalido uso de valor NULL",
+"Obtenido error '%-.64s' de regexp",
+"Mezcla de columnas GROUP (MIN(),MAX(),COUNT()...) con no GROUP columnas es ilegal si no hat la clausula GROUP BY",
+"No existe permiso definido para usuario '%-.32s' en el servidor '%-.64s'",
+"%-.16s comando negado para usuario: '%-.32s@%-.64s' para tabla '%-.64s'",
+"%-.16s comando negado para usuario: '%-.32s@%-.64s' para columna '%-.64s' en la tabla '%-.64s'",
+"Ilegal comando GRANT/REVOKE. Por favor consulte el manual para cuales permisos pueden ser usados.",
+"El argumento para servidor o usuario para GRANT es demasiado grande",
+"Tabla '%-64s.%s' no existe",
+"No existe tal permiso definido para usuario '%-.32s' en el servidor '%-.64s' en la tabla '%-.64s'",
+"El comando usado no es permitido con esta versi�n de MySQL",
+"Algo est� equivocado en su sintax",
+"Thread de inserci�n retarda no pudiendo bloquear para la tabla %-.64s",
+"Muchos threads retardados en uso",
+"Conexi�n abortada %ld para db: '%-.64s' usuario: '%-.64s' (%s)",
+"Obtenido un paquete mayor que 'max_allowed_packet'",
+"Obtenido un error de lectura de la conexi�n pipe",
+"Obtenido un error de fcntl()",
+"Obtenido paquetes desordenados",
+"No puedo descomprimir paquetes de comunicaci�n",
+"Obtenido un error leyendo paquetes de comunicaci�n"
+"Obtenido timeout leyendo paquetes de comunicaci�n",
+"Obtenido un error de escribiendo paquetes de comunicaci�n",
+"Obtenido timeout escribiendo paquetes de comunicaci�n",
+"La string resultante es mayor que max_allowed_packet",
+"El tipo de tabla usada no permite soporte para columnas BLOB/TEXT",
+"El tipo de tabla usada no permite soporte para columnas AUTO_INCREMENT",
+"INSERT DELAYED no puede ser usado con tablas '%-.64s', porque esta bloqueada con LOCK TABLES",
+"Incorrecto nombre de columna '%-.100s'",
+"El manipulador de tabla usado no puede indexar columna '%-.64s'",
+"Todas las tablas en la MERGE tabla no estan definidas identicamente",
+"No puedo escribir, debido al �nico constraint, para tabla '%-.64s'",
+"Columna BLOB column '%-.64s' usada en especificaci�n de clave sin tama�o de la clave",
+"Todas las partes de un PRIMARY KEY deben ser NOT NULL; Si necesitas NULL en una clave, use UNIQUE",
+"Resultado compuesto de mas que una l�nea",
+"Este tipo de tabla necesita de una primary key",
+"Esta versi�n de MySQL no es compilada con soporte RAID",
+"Tu est�s usando modo de actualizaci�n segura y tentado actualizar una tabla sin un WHERE que usa una KEY columna",
+"Clave '%-.64s' no existe en la tabla '%-.64s'",
+"No puedo abrir tabla",
+"El manipulador de la tabla no permite soporte para check/repair",
+"No tienes el permiso para ejecutar este comando en una transici�n",
+"Obtenido error %d durante COMMIT",
+"Obtenido error %d durante ROLLBACK",
+"Obtenido error %d durante FLUSH_LOGS",
+"Obtenido error %d durante CHECKPOINT",
+"Abortada conexi�n %ld para db: '%-.64s' usuario: '%-.32s' servidor: `%-.64s' (%-.64s)",
+"El manipulador de tabla no soporta dump para tabla binaria",
+"Binlog cerrado mientras tentaba el FLUSH MASTER",
+"Falla reconstruyendo el indice de la tabla dumped '%-.64s'",
+"Error del master: '%-.64s'",
+"Error de red leyendo del master",
+"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'",
+"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",
+"Multipla transici�n necesita mas que 'max_binlog_cache_size' bytes de almacenamiento. Aumente esta variable mysqld y tente de nuevo',
+"Esta operaci�n no puede ser hecha con el esclavo funcionando, primero use SLAVE STOP",
+"Esta operaci�n necesita el esclavo funcionando, configure esclavo y haga el SLAVE START",
+"El servidor no est� configurado como esclavo, edite el archivo config file o con CHANGE MASTER TO",
+"No puedo inicializar la estructura info del master, verifique permisiones en el master.info",
+"No puedo crear el thread esclavo, verifique recursos del sistema",
+"Usario %-.64s ya tiene mas que 'max_user_connections' conexiones activas",
+"Tu solo debes usar expresiones constantes con SET",
+"Tiempo de bloqueo de espera excedido",
+"El n�mero total de bloqueos excede el tama�o de bloqueo de la tabla",
+"Bloqueos de actualizaci�n no pueden ser adqueridos durante una transici�n READ UNCOMMITTED",
+"DROP DATABASE no permitido mientras un thread est� ejerciendo un bloqueo de lectura global",
+"CREATE DATABASE no permitido mientras un thread est� ejerciendo un bloqueo de lectura global",
diff --git a/sql/slave.cc b/sql/slave.cc
index a768e8494a0..9b9a4041616 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -1236,6 +1236,8 @@ pthread_handler_decl(handle_slave,arg __attribute__((unused)))
goto err;
}
+connected:
+
while (!slave_killed(thd))
{
thd->proc_info = "Requesting binlog dump";
@@ -1278,10 +1280,9 @@ try again, log '%s' at postion %s", RPL_LOG_NAME,
goto err;
}
- continue;
+ goto connected;
}
-
while(!slave_killed(thd))
{
thd->proc_info = "Reading master update";
@@ -1291,7 +1292,6 @@ try again, log '%s' at postion %s", RPL_LOG_NAME,
sql_print_error("Slave thread killed while reading event");
goto err;
}
-
if (event_len == packet_error)
{
@@ -1329,8 +1329,9 @@ reconnecting to retry, log '%s' position %s", RPL_LOG_NAME,
reconnect done to recover from failed read");
goto err;
}
- break;
- }
+
+ goto connected;
+ } // if(event_len == packet_error)
thd->proc_info = "Processing master log event";
if(exec_event(thd, &mysql->net, &glob_mi, event_len))
@@ -1373,9 +1374,8 @@ the slave thread with \"mysqladmin start-slave\". We stopped at log \
events_till_disconnect++;
}
#endif
-
- }
- }
+ } // while(!slave_killed(thd)) - read/exec loop
+ } // while(!slave_killed(thd)) - slave loop
// error = 0;
err:
diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc
index 7ddf04f1b9a..b0c7e64a5e0 100644
--- a/sql/sql_repl.cc
+++ b/sql/sql_repl.cc
@@ -27,6 +27,11 @@
extern const char* any_db;
extern pthread_handler_decl(handle_slave,arg);
+#ifndef DBUG_OFF
+int max_binlog_dump_events = 0; // unlimited
+bool opt_sporadic_binlog_dump_fail = 0;
+static int binlog_dump_count = 0;
+#endif
static int fake_rotate_event(NET* net, String* packet, char* log_file_name,
const char**errmsg)
@@ -265,8 +270,19 @@ void mysql_binlog_send(THD* thd, char* log_ident, ulong pos, ushort flags)
int error;
const char *errmsg = "Unknown error";
NET* net = &thd->net;
+#ifndef DBUG_OFF
+ int left_events = max_binlog_dump_events;
+#endif
DBUG_ENTER("mysql_binlog_send");
+#ifndef DBUG_OFF
+ if (opt_sporadic_binlog_dump_fail && (binlog_dump_count++ % 2))
+ {
+ errmsg = "Master failed COM_BINLOG_DUMP to test if slave can recover";
+ goto err;
+ }
+#endif
+
bzero((char*) &log,sizeof(log));
if(!mysql_bin_log.is_open())
@@ -325,6 +341,14 @@ void mysql_binlog_send(THD* thd, char* log_ident, ulong pos, ushort flags)
while (!(error = Log_event::read_log_event(&log, packet, log_lock)))
{
+#ifndef DBUG_OFF
+ if(max_binlog_dump_events && !left_events--)
+ {
+ net_flush(net);
+ errmsg = "Debugging binlog dump abort";
+ goto err;
+ }
+#endif
if (my_net_write(net, (char*)packet->ptr(), packet->length()) )
{
errmsg = "Failed on my_net_write()";
@@ -399,6 +423,15 @@ void mysql_binlog_send(THD* thd, char* log_ident, ulong pos, ushort flags)
bool read_packet = 0, fatal_error = 0;
+#ifndef DBUG_OFF
+ if(max_binlog_dump_events && !left_events--)
+ {
+ net_flush(net);
+ errmsg = "Debugging binlog dump abort";
+ goto err;
+ }
+#endif
+
// no one will update the log while we are reading
// now, but we'll be quick and just read one record
pthread_mutex_lock(log_lock);
diff --git a/sql/sql_repl.h b/sql/sql_repl.h
index 68f2b4ba6c4..c6a79ec4650 100644
--- a/sql/sql_repl.h
+++ b/sql/sql_repl.h
@@ -9,6 +9,11 @@ extern uint32 server_id;
extern bool server_id_supplied;
extern I_List<i_string> binlog_do_db, binlog_ignore_db;
+#ifndef DBUG_OFF
+extern int max_binlog_dump_events;
+extern bool opt_sporadic_binlog_dump_fail;
+#endif
+
File open_binlog(IO_CACHE *log, const char *log_file_name,
const char **errmsg);