Commit e587f1cb authored by unknown's avatar unknown

Merge work:/home/bk/mysql-4.0

into mysql.sashanet.com:/home/sasha/src/bk/mysql-4.0


BitKeeper/etc/logging_ok:
  auto-union
sql/slave.cc:
  Auto merged
parents dc1104c1 9f0b7b7c
...@@ -3,5 +3,6 @@ jani@janikt.pp.saunalahti.fi ...@@ -3,5 +3,6 @@ jani@janikt.pp.saunalahti.fi
monty@hundin.mysql.fi monty@hundin.mysql.fi
monty@work.mysql.com monty@work.mysql.com
mwagner@evoq.mwagner.org mwagner@evoq.mwagner.org
paul@central.snake.net
sasha@mysql.sashanet.com sasha@mysql.sashanet.com
tonu@hundin.mysql.fi tonu@hundin.mysql.fi
...@@ -688,6 +688,7 @@ System/Compile Time and Startup Parameter Tuning ...@@ -688,6 +688,7 @@ System/Compile Time and Startup Parameter Tuning
* Compile and link options:: How compiling and linking affects the speed of MySQL * Compile and link options:: How compiling and linking affects the speed of MySQL
* Disk issues:: Disk issues * Disk issues:: Disk issues
* Symbolic links::
* Server parameters:: Tuning server parameters * Server parameters:: Tuning server parameters
* Table cache:: How MySQL opens and closes tables * Table cache:: How MySQL opens and closes tables
* Creating many tables:: Drawbacks of creating large numbers of tables in the same database * Creating many tables:: Drawbacks of creating large numbers of tables in the same database
...@@ -697,9 +698,10 @@ System/Compile Time and Startup Parameter Tuning ...@@ -697,9 +698,10 @@ System/Compile Time and Startup Parameter Tuning
* Table locking:: Table locking issues * Table locking:: Table locking issues
* DNS:: * DNS::
Disk Issues Using Symbolic Links
* Symbolic links:: Using symbolic links for databases and tables * Symbolic links to database::
* Symbolic links to tables::
Speed of Queries that Access or Update Data Speed of Queries that Access or Update Data
...@@ -9603,7 +9605,7 @@ shell> cd mysql_installation_directory ...@@ -9603,7 +9605,7 @@ shell> cd mysql_installation_directory
shell> ./bin/safe_mysqld --user=mysql & shell> ./bin/safe_mysqld --user=mysql &
@end example @end example
For a binary distribution, do this: For a binary distribution (not RPM or pkg packages), do this:
@example @example
shell> cd mysql_installation_directory shell> cd mysql_installation_directory
...@@ -10407,9 +10409,8 @@ recommended for systems where only local requests are allowed. @xref{DNS}. ...@@ -10407,9 +10409,8 @@ recommended for systems where only local requests are allowed. @xref{DNS}.
Don't use new, possible wrong routines. Implies @code{--skip-delay-key-write}. Don't use new, possible wrong routines. Implies @code{--skip-delay-key-write}.
This will also set default table type to @code{ISAM}. @xref{ISAM}. This will also set default table type to @code{ISAM}. @xref{ISAM}.
@item --skip-stack-trace @item --skip-symlinks
Don't write stack traces. This option is useful when you are running Don't delete or rename files that symlinks in the data directory points to.
@code{mysqld} under a debugger. @xref{Debugging server}.
@item --skip-safemalloc @item --skip-safemalloc
If @strong{MySQL} is configured with @code{--with-debug=full}, all programs If @strong{MySQL} is configured with @code{--with-debug=full}, all programs
...@@ -10421,6 +10422,10 @@ need memory checking, by using this option. ...@@ -10421,6 +10422,10 @@ need memory checking, by using this option.
Don't allow 'SHOW DATABASE' commands, unless the user has @strong{process} Don't allow 'SHOW DATABASE' commands, unless the user has @strong{process}
privilege. privilege.
@item --skip-stack-trace
Don't write stack traces. This option is useful when you are running
@code{mysqld} under a debugger. @xref{Debugging server}.
@item --skip-thread-priority @item --skip-thread-priority
Disable using thread priorities for faster response time. Disable using thread priorities for faster response time.
...@@ -12154,6 +12159,13 @@ user names have nothing to do with Unix user names. You can edit the ...@@ -12154,6 +12159,13 @@ user names have nothing to do with Unix user names. You can edit the
Normally this is done with the @code{su} command. For more details, see Normally this is done with the @code{su} command. For more details, see
@ref{Changing MySQL user, , Changing @strong{MySQL} user}. @ref{Changing MySQL user, , Changing @strong{MySQL} user}.
@item
Don't support symlinks to tables (This can be disabled with the
@code{--skip-symlinks} option. This is especially important if you run
@code{mysqld} as root as anyone that has write access to the mysqld data
directories could then delete any file in the system!
@xref{Symbolic links to tables}.
@item @item
If you put a password for the Unix @code{root} user in the @code{mysql.server} If you put a password for the Unix @code{root} user in the @code{mysql.server}
script, make sure this script is readable only by @code{root}. script, make sure this script is readable only by @code{root}.
...@@ -18810,6 +18822,8 @@ or DELAY_KEY_WRITE = @{0 | 1@} ...@@ -18810,6 +18822,8 @@ or DELAY_KEY_WRITE = @{0 | 1@}
or ROW_FORMAT= @{ default | dynamic | fixed | compressed @} or ROW_FORMAT= @{ default | dynamic | fixed | compressed @}
or RAID_TYPE= @{1 | STRIPED | RAID0 @} RAID_CHUNKS=# RAID_CHUNKSIZE=# or RAID_TYPE= @{1 | STRIPED | RAID0 @} RAID_CHUNKS=# RAID_CHUNKSIZE=#
or UNION = (table_name,[table_name...]) or UNION = (table_name,[table_name...])
or DATA DIRECTORY="directory"
or INDEX DIRECTORY="directory"
select_statement: select_statement:
[IGNORE | REPLACE] SELECT ... (Some legal select statement) [IGNORE | REPLACE] SELECT ... (Some legal select statement)
...@@ -19141,6 +19155,14 @@ In the created table the @code{PRIMARY} key will be placed first, followed ...@@ -19141,6 +19155,14 @@ In the created table the @code{PRIMARY} key will be placed first, followed
by all @code{UNIQUE} keys and then the normal keys. This helps the by all @code{UNIQUE} keys and then the normal keys. This helps the
@strong{MySQL} optimizer to prioritize which key to use and also more quickly @strong{MySQL} optimizer to prioritize which key to use and also more quickly
detect duplicated @code{UNIQUE} keys. detect duplicated @code{UNIQUE} keys.
@item
By using @code{DATA DIRECTORY="directory"} or @code{INDEX
DIRECTORY="directory"} you can specify where the table handler should
put it's table and index files. This only works for @code{MyISAM} tables
in @code{MySQL} 4.0, when you are not using the @code{--skip-symlinks}
option. @xref{Symbolic links to tables}.
@end itemize @end itemize
@cindex silent column changes @cindex silent column changes
...@@ -23691,6 +23713,10 @@ with updates and inserts. This is done by automatically combining adjacent ...@@ -23691,6 +23713,10 @@ with updates and inserts. This is done by automatically combining adjacent
deleted blocks and by extending blocks if the next block is deleted. deleted blocks and by extending blocks if the next block is deleted.
@item @item
@code{myisampack} can pack @code{BLOB} and @code{VARCHAR} columns. @code{myisampack} can pack @code{BLOB} and @code{VARCHAR} columns.
@item
You can use put the datafile and index file on different directories
to get more speed (with the @code{DATA/INDEX DIRECTORY="path"} option to
@code{CREATE TABLE}). @xref{CREATE TABLE}.
@end itemize @end itemize
@code{MyISAM} also supports the following things, which @strong{MySQL} @code{MyISAM} also supports the following things, which @strong{MySQL}
...@@ -29737,6 +29763,11 @@ Replication will be done correctly with @code{AUTO_INCREMENT}, ...@@ -29737,6 +29763,11 @@ Replication will be done correctly with @code{AUTO_INCREMENT},
@code{RAND()}. You can, for example, use @code{UNIX_TIMESTAMP()} for the @code{RAND()}. You can, for example, use @code{UNIX_TIMESTAMP()} for the
argument to @code{RAND()}. argument to @code{RAND()}.
@item @item
You have to use the same character set (@code{--default-character-set})
on the master and the slave. If not, you may get duplicate key errors on
the slave, because a key that is regarded as unique on the master may
not be that in the other character set.
@item
@code{LOAD DATA INFILE} will be handled properly as long as the file @code{LOAD DATA INFILE} will be handled properly as long as the file
still resides on the master server at the time of update still resides on the master server at the time of update
propagation. @code{LOAD LOCAL DATA INFILE} will be skipped. propagation. @code{LOAD LOCAL DATA INFILE} will be skipped.
...@@ -30839,6 +30870,7 @@ are using @code{--skip-locking} ...@@ -30839,6 +30870,7 @@ are using @code{--skip-locking}
@menu @menu
* Compile and link options:: How compiling and linking affects the speed of MySQL * Compile and link options:: How compiling and linking affects the speed of MySQL
* Disk issues:: Disk issues * Disk issues:: Disk issues
* Symbolic links:: Using Symbolic Links
* Server parameters:: Tuning server parameters * Server parameters:: Tuning server parameters
* Table cache:: How MySQL opens and closes tables * Table cache:: How MySQL opens and closes tables
* Creating many tables:: Drawbacks of creating large numbers of tables in the same database * Creating many tables:: Drawbacks of creating large numbers of tables in the same database
...@@ -30951,7 +30983,7 @@ Linux binary is linked statically to get it faster and more portable. ...@@ -30951,7 +30983,7 @@ Linux binary is linked statically to get it faster and more portable.
@cindex disk issues @cindex disk issues
@cindex performance, disk issues @cindex performance, disk issues
@node Disk issues, Server parameters, Compile and link options, System @node Disk issues, Symbolic links, Compile and link options, System
@subsection Disk Issues @subsection Disk Issues
@itemize @bullet @itemize @bullet
...@@ -31029,31 +31061,40 @@ really useful on a database server), you can mount your file systems ...@@ -31029,31 +31061,40 @@ really useful on a database server), you can mount your file systems
with the noatime flag. with the noatime flag.
@end itemize @end itemize
@menu
* Symbolic links:: Using symbolic links for databases and tables
@end menu
@cindex symbolic links @cindex symbolic links
@cindex links, symbolic @cindex links, symbolic
@cindex databases, symbolic links @node Symbolic links, Server parameters, Disk issues, System
@cindex tables, symbolic links @subsection Using Symbolic Links
@node Symbolic links, , Disk issues, Disk issues
@subsubsection Using Symbolic Links for Databases and Tables
You can move tables and databases from the database directory to other You can move tables and databases from the database directory to other
locations and replace them with symbolic links to the new locations. locations and replace them with symbolic links to the new locations.
You might want to do this, for example, to move a database to a file You might want to do this, for example, to move a database to a file
system with more free space. system with more free space or increase the speed of your system by
spreading your tables to different disk.
The recommended may to do this, is to just symlink databases to different
disk and only symlink tables as a last resort.
.
If @strong{MySQL} notices that a table is symbolically linked, it will @cindex databases, symbolic links
resolve the symlink and use the table it points to instead. This works @menu
on all systems that support the @code{realpath()} call (at least Linux * Symbolic links to database::
and Solaris support @code{realpath()})! On systems that don't support * Symbolic links to tables::
@code{realpath()}, you should not access the table through the real path @end menu
and through the symlink at the same time! If you do, the table will be
inconsistent after any update.
@strong{MySQL} doesn't that you link one directory to multiple @node Symbolic links to database, Symbolic links to tables, Symbolic links, Symbolic links
@subsubsection Using Symbolic Links for Databases
The way to symlink a database is to first create a directory on some
disk where you have free space and then create a symlink to it from
the @strong{MySQL} database directory.
@example
shell> mkdir /dr1/databases/test
shell> ln -s /dr1/databases/test mysqld-datadir
@end example
@strong{MySQL} doesn't support that you link one directory to multiple
databases. Replacing a database directory with a symbolic link will databases. Replacing a database directory with a symbolic link will
work fine as long as you don't make a symbolic link between databases. work fine as long as you don't make a symbolic link between databases.
Suppose you have a database @code{db1} under the @strong{MySQL} data Suppose you have a database @code{db1} under the @strong{MySQL} data
...@@ -31085,11 +31126,82 @@ On Windows you can use internal symbolic links to directories by compiling ...@@ -31085,11 +31126,82 @@ On Windows you can use internal symbolic links to directories by compiling
@strong{MySQL} with @code{-DUSE_SYMDIR}. This allows you to put different @strong{MySQL} with @code{-DUSE_SYMDIR}. This allows you to put different
databases on different disks. @xref{Windows symbolic links}. databases on different disks. @xref{Windows symbolic links}.
@cindex databases, symbolic links
@node Symbolic links to tables, , Symbolic links to database, Symbolic links
@subsubsection Using Symbolic Links for Tables
Before @strong{MySQL} 4.0 you should not symlink tables, if you are not
very carefully with them. The problem is that if you run @code{ALTER
TABLE}, @code{REPAIR TABLE} or @code{OPTIMIZE TABLE} on a symlinked
table, the symlinks will be removed and replaced by the original
files. This happens because the above command works by creating a
temporary file in the database directory and when the command is
complete, replace the original file with the temporary file.
You should not symlink tables on system that doesn't have a fully
working @code{realpath()} call. (At least Linux and Solaris support
@code{realpath()})
In @strong{MySQL} 4.0 symlinks is only fully supported for @code{MyISAM}
tables. For other table types you will probably get strange problems
when doing any of the above mentioned commands.
The handling of symbolic links in @strong{MySQL} 4.0 works the following
way (this is mostly relevant only for @code{MyISAM} tables).
@itemize @bullet
@item
In the data directory you will always have the table definition file
and the data/index files.
@item
You can symlink the index file and the data file to different directories
independent of the other.
@item
The symlinking can be done from the operating system (if @code{mysqld} is
not running) or with the @code{INDEX/DATA DIRECTORY="path-to-dir"} command
in @code{CREATE TABLE}. @xref{CREATE TABLE}.
@item
@code{myisamchk} will not replace a symlink with the index/file but
work directly on the files the symlinks points to. Any temporary files
will be created in the same directory where the data/index file is.
@item
When you drop a table that is using symlinks, both the symlink and the
file the symlink points to is dropped. This is a good reason to why you
should NOT run @code{mysqld} as root and not allow persons to have write
access to the @strong{MySQL} database directories.
@item
If you rename a table with @code{ALTER TABLE RENAME} and you don't change
database, the symlink in the database directory will be renamed to the new
name and the data/index file will be renamed accordingly.
@item
If you use @code{ALTER TABLE RENAME} to move a table to another database,
then the table will be moved to the other database directory and the old
symlinks and the files they pointed to will be deleted.
@item
If you are not using symlinks you should use the @code{--skip-symlinks}
option to @code{mysqld} to ensure that no one can drop or rename a file
outside of the @code{mysqld} data directory.
@end itemize
Things that are not yet fully supported:
@cindex TODO, symlinks
@itemize @bullet
@item
@code{ALTER TABLE} ignores all @code{INDEX/DATA DIRECTORY="path"} options.
@item
@code{CREATE TABLE} doesn't report if the table has symbolic links.
@item
@code{mysqldump} doesn't include the symbolic links information in the output.
@item
@code{BACKUP TABLE} and @code{RESTORE TABLE} doesn't use symbolic links.
@end itemize
@cindex parameters, server @cindex parameters, server
@cindex @code{mysqld} server, buffer sizes @cindex @code{mysqld} server, buffer sizes
@cindex buffer sizes, @code{mysqld} server @cindex buffer sizes, @code{mysqld} server
@cindex startup parameters @cindex startup parameters
@node Server parameters, Table cache, Disk issues, System @node Server parameters, Table cache, Symbolic links, System
@subsection Tuning Server Parameters @subsection Tuning Server Parameters
You can get the default buffer sizes used by the @code{mysqld} server You can get the default buffer sizes used by the @code{mysqld} server
...@@ -38862,6 +38974,12 @@ Post the test file using @code{mysqlbug} to @email{mysql@@lists.mysql.com}. ...@@ -38862,6 +38974,12 @@ Post the test file using @code{mysqlbug} to @email{mysql@@lists.mysql.com}.
@node ALTER TABLE problems, Change column order, No matching rows, Problems @node ALTER TABLE problems, Change column order, No matching rows, Problems
@section Problems with @code{ALTER TABLE}. @section Problems with @code{ALTER TABLE}.
@code{ALTER TABLE} changes a table to the current character set.
If you during @code{ALTER TABLE} get a duplicate key error, then the cause
is either that the new character sets maps to keys to the same value
or that the table is corrupted, in which case you should run
@code{REPAIR TABLE} on the table.
If @code{ALTER TABLE} dies with an error like this: If @code{ALTER TABLE} dies with an error like this:
@example @example
...@@ -45422,6 +45540,8 @@ Slovak error messages. ...@@ -45422,6 +45540,8 @@ Slovak error messages.
Romanian error messages. Romanian error messages.
@item Peter Feher @item Peter Feher
Hungarian error messages. Hungarian error messages.
@item Roberto M. Serqueira
Portugise error messages.
@item David Sacerdote @email{davids@@secnet.com} @item David Sacerdote @email{davids@@secnet.com}
Ideas for secure checking of DNS hostnames. Ideas for secure checking of DNS hostnames.
@item Wei-Jou Chen @email{jou@@nematic.ieo.nctu.edu.tw} @item Wei-Jou Chen @email{jou@@nematic.ieo.nctu.edu.tw}
...@@ -45436,7 +45556,7 @@ Active mailing list member. ...@@ -45436,7 +45556,7 @@ Active mailing list member.
Ported (and extended) the benchmark suite to @code{DBI}/@code{DBD}. Have Ported (and extended) the benchmark suite to @code{DBI}/@code{DBD}. Have
been of great help with @code{crash-me} and running benchmarks. Some new been of great help with @code{crash-me} and running benchmarks. Some new
date functions. The mysql_setpermissions script. date functions. The mysql_setpermissions script.
@item Jay Flaherty @email{fty@@utk.edu} @item Jay Flaherty @email{fty@@mediapulse.com}
Big parts of the Perl @code{DBI}/@code{DBD} section in the manual. Big parts of the Perl @code{DBI}/@code{DBD} section in the manual.
@item Paul Southworth @email{pauls@@etext.org}, Ray Loyzaga @email{yar@@cs.su.oz.au} @item Paul Southworth @email{pauls@@etext.org}, Ray Loyzaga @email{yar@@cs.su.oz.au}
Proof-reading of the Reference Manual. Proof-reading of the Reference Manual.
...@@ -45584,9 +45704,11 @@ Added @code{ALTER TABLE table_name DISABLE KEYS} and ...@@ -45584,9 +45704,11 @@ Added @code{ALTER TABLE table_name DISABLE KEYS} and
@item @item
Added @code{HANDLER} command. Added @code{HANDLER} command.
@item @item
Added @code{SQL_CALC_FOUND_ROWS} and @code{FOUND_ROWS()}. This make it Added support for symbolic links to @code{MyISAM} tables.
possible to know how many rows a query would have returned if one hadn't @item
used @code{LIMIT}. Added @code{SQL_CALC_FOUND_ROWS} and @code{FOUND_ROWS()}. This makes it
possible to know how many rows a query would have returned
without a @code{LIMIT} clause.
@item @item
Changed output format of @code{SHOW OPEN TABLES}. Changed output format of @code{SHOW OPEN TABLES}.
@item @item
...@@ -45598,8 +45720,6 @@ Added @code{ORDER BY} syntax to @code{UPDATE} and @code{DELETE}. ...@@ -45598,8 +45720,6 @@ Added @code{ORDER BY} syntax to @code{UPDATE} and @code{DELETE}.
@item @item
Optimized queries of type: Optimized queries of type:
@code{SELECT DISTINCT * from table_name ORDER by key_part1 LIMIT #} @code{SELECT DISTINCT * from table_name ORDER by key_part1 LIMIT #}
@item
Added support for sym-linking of MyISAM tables.
@end itemize @end itemize
@node News-3.23.x, News-3.22.x, News-4.0.x, News @node News-3.23.x, News-3.22.x, News-4.0.x, News
...@@ -45693,6 +45813,13 @@ not yet 100% confident in this code. ...@@ -45693,6 +45813,13 @@ not yet 100% confident in this code.
@appendixsubsec Changes in release 3.23.39 @appendixsubsec Changes in release 3.23.39
@itemize @bullet @itemize @bullet
@item @item
Fixed problem that client 'hang' when @code{LOAD TABLE FROM MASTER} failed.
@item
Running @code{myisamchk --fast --force} will not anymore repair tables
that only had the open count wrong.
@item
Added functions to handle symbolic links to make life easier in 4.0.
@item
We are now using the @code{-lcma} thread library on HPUX 10.20 to We are now using the @code{-lcma} thread library on HPUX 10.20 to
get @strong{MySQL} more stabile on HPUX. get @strong{MySQL} more stabile on HPUX.
@item @item
...@@ -209,7 +209,7 @@ extern long lCurMemory,lMaxMemory; /* from safemalloc */ ...@@ -209,7 +209,7 @@ extern long lCurMemory,lMaxMemory; /* from safemalloc */
extern ulong my_default_record_cache_size; extern ulong my_default_record_cache_size;
extern my_bool NEAR my_disable_locking,NEAR my_disable_async_io, extern my_bool NEAR my_disable_locking,NEAR my_disable_async_io,
NEAR my_disable_flush_key_blocks; NEAR my_disable_flush_key_blocks, NEAR my_disable_symlinks;
extern char wild_many,wild_one,wild_prefix; extern char wild_many,wild_one,wild_prefix;
extern const char *charsets_dir; extern const char *charsets_dir;
extern char *defaults_extra_file; extern char *defaults_extra_file;
......
...@@ -49,6 +49,35 @@ const char *client_errors[]= ...@@ -49,6 +49,35 @@ const char *client_errors[]=
"Embedded server", "Embedded server",
}; };
/* Start of code added by Roberto M. Serqueira - martinsc@uol.com.br - 05.24.2001 */
#elif defined PORTUGUESE
const char *client_errors[]=
{
"Erro desconhecido do MySQL",
"No pode criar 'UNIX socket' (%d)",
"No pode se conectar ao servidor MySQL local atravs do 'socket' '%-.64s' (%d)",
"No pode se conectar ao servidor MySQL em '%-.64s' (%d)",
"No pode criar 'socket TCP/IP' (%d)",
"'Host' servidor MySQL '%-.64s' (%d) desconhecido",
"Servidor MySQL desapareceu",
"Incompatibilidade de protocolos. Verso do Servidor: %d - Verso do Cliente: %d",
"Cliente do MySQL com falta de memria",
"Informao invlida de 'host'",
"Localhost via 'UNIX socket'",
"%-.64s via 'TCP/IP'",
"Erro na negociao de acesso ao servidor",
"Conexo perdida com servidor MySQL durante 'query'",
"Comandos fora de sincronismo. Voc no pode executar este comando agora",
"%-.64s via 'named pipe'",
"No pode esperar pelo 'named pipe' para o 'host' %-.64s - 'pipe' %-.32s (%lu)",
"No pode abrir 'named pipe' para o 'host' %-.64s - 'pipe' %-.32s (%lu)",
"No pode estabelecer o estado do 'named pipe' para o 'host' %-.64s - 'pipe' %-.32s (%lu)",
"No pode inicializar conjunto de caracteres %-.64s (caminho %-.64s)",
"Obteve pacote maior do que 'max_allowed_packet'",
"Embedded server"
};
#else /* ENGLISH */ #else /* ENGLISH */
const char *client_errors[]= const char *client_errors[]=
{ {
...@@ -73,7 +102,7 @@ const char *client_errors[]= ...@@ -73,7 +102,7 @@ const char *client_errors[]=
"Can't set state of named pipe to host: %-.64s pipe: %-.32s (%lu)", "Can't set state of named pipe to host: %-.64s pipe: %-.32s (%lu)",
"Can't initialize character set %-.64s (path: %-.64s)", "Can't initialize character set %-.64s (path: %-.64s)",
"Got packet bigger than 'max_allowed_packet'", "Got packet bigger than 'max_allowed_packet'",
"Embedded server", "Embedded server"
}; };
#endif #endif
......
...@@ -117,7 +117,9 @@ int chk_status(MI_CHECK *param, register MI_INFO *info) ...@@ -117,7 +117,9 @@ int chk_status(MI_CHECK *param, register MI_INFO *info)
mi_check_print_warning(param, mi_check_print_warning(param,
"%d clients is using or hasn't closed the table properly", "%d clients is using or hasn't closed the table properly",
share->state.open_count); share->state.open_count);
param->warning_printed=save; /* If this will be fixed by the check, forget the warning */
if (param->testflag & T_UPDATE_STATE)
param->warning_printed=save;
} }
return 0; return 0;
} }
......
...@@ -54,7 +54,7 @@ int my_copy(const char *from, const char *to, myf MyFlags) ...@@ -54,7 +54,7 @@ int my_copy(const char *from, const char *to, myf MyFlags)
if (MyFlags & MY_HOLD_ORIGINAL_MODES) /* Copy stat if possible */ if (MyFlags & MY_HOLD_ORIGINAL_MODES) /* Copy stat if possible */
new_file_stat=stat((char*) to, &new_stat_buff); new_file_stat=stat((char*) to, &new_stat_buff);
if ((from_file=my_open(from,O_RDONLY,MyFlags)) >= 0) if ((from_file=my_open(from,O_RDONLY | O_SHARE,MyFlags)) >= 0)
{ {
if (stat(from,&stat_buff)) if (stat(from,&stat_buff))
{ {
...@@ -64,7 +64,7 @@ int my_copy(const char *from, const char *to, myf MyFlags) ...@@ -64,7 +64,7 @@ int my_copy(const char *from, const char *to, myf MyFlags)
if (MyFlags & MY_HOLD_ORIGINAL_MODES && !new_file_stat) if (MyFlags & MY_HOLD_ORIGINAL_MODES && !new_file_stat)
stat_buff=new_stat_buff; stat_buff=new_stat_buff;
if ((to_file= my_create(to,(int) stat_buff.st_mode, if ((to_file= my_create(to,(int) stat_buff.st_mode,
O_WRONLY | O_TRUNC | O_BINARY, O_WRONLY | O_TRUNC | O_BINARY | O_SHARE,
MyFlags)) < 0) MyFlags)) < 0)
goto err; goto err;
......
...@@ -97,4 +97,5 @@ int (*fatal_error_handler_hook)(uint error,const char *str,myf MyFlags)= ...@@ -97,4 +97,5 @@ int (*fatal_error_handler_hook)(uint error,const char *str,myf MyFlags)=
my_bool NEAR my_disable_locking=0; my_bool NEAR my_disable_locking=0;
my_bool NEAR my_disable_async_io=0; my_bool NEAR my_disable_async_io=0;
my_bool NEAR my_disable_flush_key_blocks=0; my_bool NEAR my_disable_flush_key_blocks=0;
my_bool NEAR my_disable_symlinks=0;
my_bool NEAR mysys_uses_curses=0; my_bool NEAR mysys_uses_curses=0;
...@@ -62,7 +62,8 @@ File my_create_with_symlink(const char *linkname, const char *filename, ...@@ -62,7 +62,8 @@ File my_create_with_symlink(const char *linkname, const char *filename,
int my_delete_with_symlink(const char *name, myf MyFlags) int my_delete_with_symlink(const char *name, myf MyFlags)
{ {
char link_name[FN_REFLEN]; char link_name[FN_REFLEN];
int was_symlink= !my_readlink(link_name, name, MYF(0)); int was_symlink= (!my_disable_symlinks &&
!my_readlink(link_name, name, MYF(0)));
int result; int result;
DBUG_ENTER("my_delete_with_symlink"); DBUG_ENTER("my_delete_with_symlink");
...@@ -90,7 +91,8 @@ int my_rename_with_symlink(const char *from, const char *to, myf MyFlags) ...@@ -90,7 +91,8 @@ int my_rename_with_symlink(const char *from, const char *to, myf MyFlags)
return my_rename(from, to, MyFlags); return my_rename(from, to, MyFlags);
#else #else
char link_name[FN_REFLEN], tmp_name[FN_REFLEN]; char link_name[FN_REFLEN], tmp_name[FN_REFLEN];
int was_symlink= !my_readlink(link_name, name, MYF(0)); int was_symlink= (!my_disable_symlinks &&
!my_readlink(link_name, name, MYF(0)));
int result; int result;
DBUG_ENTER("my_rename_with_symlink"); DBUG_ENTER("my_rename_with_symlink");
......
...@@ -2484,7 +2484,7 @@ enum options { ...@@ -2484,7 +2484,7 @@ enum options {
OPT_TEMP_POOL, OPT_DO_PSTACK, OPT_TX_ISOLATION, OPT_TEMP_POOL, OPT_DO_PSTACK, OPT_TX_ISOLATION,
OPT_GEMINI_FLUSH_LOG, OPT_GEMINI_RECOVER, OPT_GEMINI_FLUSH_LOG, OPT_GEMINI_RECOVER,
OPT_GEMINI_UNBUFFERED_IO, OPT_SKIP_SAFEMALLOC, OPT_GEMINI_UNBUFFERED_IO, OPT_SKIP_SAFEMALLOC,
OPT_SKIP_STACK_TRACE, OPT_REPORT_HOST, OPT_SKIP_STACK_TRACE, OPT_SKIP_SYMLINKS, OPT_REPORT_HOST,
OPT_REPORT_USER, OPT_REPORT_PASSWORD, OPT_REPORT_PORT OPT_REPORT_USER, OPT_REPORT_PASSWORD, OPT_REPORT_PORT
}; };
...@@ -2619,6 +2619,7 @@ static struct option long_options[] = { ...@@ -2619,6 +2619,7 @@ static struct option long_options[] = {
{"skip-show-database", no_argument, 0, (int) OPT_SKIP_SHOW_DB}, {"skip-show-database", no_argument, 0, (int) OPT_SKIP_SHOW_DB},
{"skip-slave-start", no_argument, 0, (int) OPT_SKIP_SLAVE_START}, {"skip-slave-start", no_argument, 0, (int) OPT_SKIP_SLAVE_START},
{"skip-stack-trace", no_argument, 0, (int) OPT_SKIP_STACK_TRACE}, {"skip-stack-trace", no_argument, 0, (int) OPT_SKIP_STACK_TRACE},
{"skip-symlinks", no_argument, 0, (int) OPT_SKIP_SYMLINKS},
{"skip-thread-priority", no_argument, 0, (int) OPT_SKIP_PRIOR}, {"skip-thread-priority", no_argument, 0, (int) OPT_SKIP_PRIOR},
{"sql-bin-update-same", no_argument, 0, (int) OPT_SQL_BIN_UPDATE_SAME}, {"sql-bin-update-same", no_argument, 0, (int) OPT_SQL_BIN_UPDATE_SAME},
#include "sslopt-longopts.h" #include "sslopt-longopts.h"
...@@ -3445,6 +3446,7 @@ static void get_options(int argc,char **argv) ...@@ -3445,6 +3446,7 @@ static void get_options(int argc,char **argv)
myisam_delay_key_write=0; myisam_delay_key_write=0;
myisam_concurrent_insert=0; myisam_concurrent_insert=0;
myisam_recover_options= HA_RECOVER_NONE; myisam_recover_options= HA_RECOVER_NONE;
my_disable_symlinks=1;
ha_open_options&= ~HA_OPEN_ABORT_IF_CRASHED; ha_open_options&= ~HA_OPEN_ABORT_IF_CRASHED;
break; break;
case (int) OPT_SAFE: case (int) OPT_SAFE:
...@@ -3501,6 +3503,9 @@ static void get_options(int argc,char **argv) ...@@ -3501,6 +3503,9 @@ static void get_options(int argc,char **argv)
case (int) OPT_SKIP_STACK_TRACE: case (int) OPT_SKIP_STACK_TRACE:
test_flags|=TEST_NO_STACKTRACE; test_flags|=TEST_NO_STACKTRACE;
break; break;
case (int) OPT_SKIP_SYMLINKS:
my_disable_symlinks=1;
break;
case (int) OPT_BIND_ADDRESS: case (int) OPT_BIND_ADDRESS:
if (optarg && isdigit(optarg[0])) if (optarg && isdigit(optarg[0]))
{ {
......
...@@ -140,7 +140,7 @@ net_printf(NET *net, uint errcode, ...) ...@@ -140,7 +140,7 @@ net_printf(NET *net, uint errcode, ...)
void void
send_ok(NET *net,ha_rows affected_rows,ulonglong id,const char *message) send_ok(NET *net,ha_rows affected_rows,ulonglong id,const char *message)
{ {
if(net->no_send_ok) if (net->no_send_ok) // hack for re-parsing queries
return; return;
char buff[MYSQL_ERRMSG_SIZE+10],*pos; char buff[MYSQL_ERRMSG_SIZE+10],*pos;
......
/* Copyright Abandoned 1997 TCX DataKonsult AB & Monty Program KB & Detron HB /* Copyright Abandoned 1997 TCX DataKonsult AB & Monty Program KB & Detron HB
This file is public domain and comes with NO WARRANTY of any kind */ This file is public domain and comes with NO WARRANTY of any kind */
/* Updated by Roberto M. Serqueira - martinsc@uol.com.br - 05.24.2001 */
"hashchk", "hashchk",
"isamchk", "isamchk",
"NO", "não",
"YES", "sim",
"Nao consegui criar o arquivo '%-.64s' (Erro: %d)", "Não pode criar arquivo '%-.64s' (erro no. %d)",
"Nao consegui criar a tabela '%-.64s' (Erro: %d)", "Não pode criar tabela '%-.64s' (erro no. %d)",
"Nao consegui criar o banco de dados '%-.64s'. Erro %d", "Não pode criar banco de dados '%-.64s' (erro no. %d)",
"Nao consegui criar o banco de dados '%-.64s'. Este banco ja existe", "Não pode criar banco de dados '%-.64s'. Banco de dados já existe",
"Nao consegui deletar o banco de dados '%-.64s'. Este banco nao existe", "Não pode eliminar banco de dados '%-.64s'. Banco de dados não existe",
"Erro deletando o banco de dados(Nao foi possivel deletar '%-.64s', erro %d)", "Erro ao eliminar banco de dados (não pode eliminar '%-.64s' - erro no. %d)",
"Erro deletando o banco de dados(Nao foi possivel remover o diretorio '%-.64s', erro %d)", "Erro ao eliminar banco de dados (não pode remover diretório '%-.64s' - erro no. %d)",
"Erro ao deletar '%-.64s' (Erro: %d)", "Erro na deleção de '%-.64s' (erro no. %d)",
"Nao foi possivel ler o registro na tabela do sistema", "Não pode ler registro em tabela do sistema",
"Nao foi possivel obter o status de '%-.64s' (Erro: %d)", "Não pode obter status de '%-.64s' (erro no. %d)",
"Nao foi possivel obter o diretorio corrente (Erro: %d)", "Não pode obter diretório corrente (erro no. %d)",
"Nao foi possivel travar o arquivo (Erro: %d)", "Não pode travar arquivo (erro no. %d)",
"Nao foi possivel abrir arquivo: '%-.64s'. (Erro: %d)", "Não pode abrir arquivo '%-.64s' (erro no. %d)",
"Nao foi possivel encontrar arquivo: '%-.64s' (Erro: %d)", "Não pode encontrar arquivo '%-.64s' (erro no. %d)",
"Nao foi possivel ler o diretorio de '%-.64s' (Erro: %d)", "Não pode ler diretório de '%-.64s' (erro no. %d)",
"Nao foi possivel ir para o diretorio '%-.64s' (Erro: %d)", "Não pode mudar para o diretório '%-.64s' (erro no. %d)",
"Registro alterado apos a ultima leitura da tabela '%-.64s'", "Registro alterado desde a última leitura da tabela '%-.64s'",
"Disco cheio (%s). Aguardando espaco livre....", "Disco cheio (%s). Aguardando alguém liberar algum espaço....",
"Nao foi possivel gravar, chave duplicada na tabela '%-.64s'", "Não pode gravar. Chave duplicada na tabela '%-.64s'",
"Erro ao fechar '%-.64s' (Erro: %d)", "Erro ao fechar '%-.64s' (erro no. %d)",
"Erro lendo arquivo '%-.64s' (Erro: %d)", "Erro ao ler arquivo '%-.64s' (erro no. %d)",
"Erro ao renomear '%-.64s' to '%-.64s' (Erro: %d)", "Erro ao renomear '%-.64s' para '%-.64s' (erro no. %d)",
"Error gravando arquivo '%-.64s' (Erro: %d)", "Erro ao gravar arquivo '%-.64s' (erro no. %d)",
"'%-.64s' esta travado contra alteracoes", "'%-.64s' está com travamento contra alterações",
"Ordenacao cancelada", "Ordenação abortada",
"Visao '%-.64s' nao existe para '%-.64s'", "'View' '%-.64s' não existe para '%-.64s'",
"Erro %d do manipulador de tabelas", "Obteve erro %d no manipulador de tabelas",
"Manipulador da tabela '%-.64s' nao suporta esta opcao", "Manipulador de tabela para '%-.64s' não tem esta opção",
"Nao foi possivel encontrar o registro em '%-.64s'", "Não pode encontrar registro em '%-.64s'",
"Informacao invalida no arquivo: '%-.64s'", "Informação incorreta no arquivo '%-.64s'",
"Arquivo de indice invalido na tabela: '%-.64s'. Tente conserta-lo!", "Arquivo chave incorreto para tabela '%-.64s'. Tente reparar",
"Arquivo de indice destaualizado na tabela '%-.64s'; Conserte-o!", "Arquivo chave desatualizado para tabela '%-.64s'. Repare-o!",
"'%-.64s' esta disponivel somente para leitura", "Tabela '%-.64s' é somente para leitura",
"Sem memoria. Renicie o programa e tente novamente (Necessita de %d bytes)", "Sem memória. Reinicie o programa e tente novamente (necessita de %d bytes)",
"Sem memoria para ordenacao. Aumente o espaco de memoria para ordenacao.", "Sem memória para ordenação. Aumente tamanho do 'buffer' de ordenação",
"Fim de arquivo inesperado enquanto lendo o arquivo '%-.64s' (Erro: %d)", "Encontrado fim de arquivo inesperado ao ler arquivo '%-.64s' (erro no. %d)",
"Excesso de conexoes", "Excesso de conexões",
"Thread sem memoria disponivel", "Sem memória. Verifique se o mysqld ou algum outro processo está usando toda memória disponível. Se não, você pode ter que usar 'ulimit' para permitir ao mysqld usar mais memória ou se você pode adicionar mais área de 'swap'",
"Nao foi possivel obter o nome da maquina para este endereco IP", "Não pode obter nome do 'host' para seu endereço",
"Comunicacao invalida", "Negociação de acesso falhou",
"Acesso negado ao usuario : '%-.32s@%-.64s' ao banco de dados '%-.64s'", "Acesso negado para o usuário '%-.32s@%-.64s' ao banco de dados '%-.64s'",
"Acesso negado ao usuario: '%-.32s@%-.64s' (usando a senha: %s)", "Acesso negado para o usuário '%-.32s@%-.64s' (uso de senha: %s)",
"Nenhum banco de dados selecionado", "Nenhum banco de dados foi selecionado",
"Comando desconhecido", "Comando desconhecido",
"Coluna '%-.64s' nao pode ser vazia", "Coluna '%-.64s' não pode ter NULL",
"Banco de dados '%-.64s' desconhecido", "Banco de dados '%-.64s' desconhecido",
"Tabela '%-.64s' ja existe", "Tabela '%-.64s' já existe",
"Tabela '%-.64s' desconhecida", "Tabela '%-.64s' desconhecida",
"Coluna: '%-.64s' em %s e ambigua", "Coluna '%-.64s' em '%-.64s' é ambígua",
"Finalizacao do servidor em andamento", "'Shutdown' do servidor em andamento",
"Coluna '%-.64s' desconhecida em %s", "Coluna '%-.64s' desconhecida em '%-.64s'",
"'%-.64s' utilizado nao esta em 'group by'", "'%-.64s' não está em 'GROUP BY'",
"Nao foi possivel agrupar em '%-.64s'", "Não pode agrupar em '%-.64s'",
"Clausula contem funcoes de soma e colunas juntos", "Cláusula contém funções de soma e colunas juntos",
"Contagem de colunas nao confere com a contagem de valores", "Contagem de colunas não confere com a contagem de valores",
"Nome do identificador '%-.64s' muito grande", "Nome identificador '%-.100s' é longo demais",
"Nome da coluna '%-.64s' duplicado", "Nome da coluna '%-.64s' duplicado",
"Nome da chave '%-.64s' duplicado", "Nome da chave '%-.64s' duplicado",
"Inclusao de '%-.64s' duplicada para a chave %d", "Entrada '%-.64s' duplicada para a chave %d",
"Especificador de coluna invalido para a coluna '%-.64s'", "Especificador de coluna incorreto para a coluna '%-.64s'",
"%s proximo de '%-.64s' a linha %d", "%s próximo a '%-.80s' na linha %d",
"Selecao vazia", "'Query' estava vazia",
"Tabela/alias nao e unica: '%-.64s'", "Tabela/alias '%-.64s' não única",
"Valor padrao invalido para '%-.64s'", "Valor 'default' inválido para '%-.64s'",
"Mais de uma chave primaria definida", "Definida mais de uma chave primária",
"Muitas chaves definidas. O maximo permitido sao %d chaves", "Especificadas chaves demais. O máximo permitido são %d chaves",
"Muitas partes de chave definidas. O maximo permitido sao %d partes", "Especificadas partes de chave demais. O máximo permitido são %d partes",
"Chave especificada e muito longa. O comprimento maximo permitido e %d", "Chave especificada longa demais. O comprimento máximo permitido é %d",
"Coluna chave '%-.64s' nao existe na tabela", "Coluna chave '%-.64s' não existe na tabela",
"Coluna binaria '%-.64s' nao pode ser utilizada na definicao de chaves", "Coluna BLOB '%-.64s' não pode ser utilizada na especificação de chave para o tipo de tabela usado",
"Comprimento da coluna '%-.64s' muito grande(max = %d). Utilize o campo binario", "Comprimento da coluna '%-.64s' grande demais (max = %d). Use BLOB em seu lugar",
"Somente e permitido um campo auto incrementado, e ele deve ser chave da tabela", "Definição incorreta de tabela. Somente é permitido um campo auto-incrementado e ele tem que ser definido como chave",
"%s: pronto para conexoes\n", "%s: Pronto para conexões\n",
"%s: Finalizacao concluida normalmente\n", "%s: 'Shutdown' normal\n",
"%s: Recebeu o sinal %d. Cancelando!\n", "%s: Obteve sinal %d. Abortando!\n",
"%s: Finalizacao concluida\n", "%s: 'Shutdown' completo\n",
"%s: Forcando a finalizacao da tarefa %ld usuario: '%-.64s'\n", "%s: Forçando finalização da 'thread' %ld - usuário '%-.32s'\n",
"Nao foi possivel criar o socket IP", "Não pode criar 'socket' IP",
"Tabela '%-.64s' nao possui um indice criado por CREATE INDEX. Recrie a tabela", "Tabela '%-.64s' não possui um índice como o usado em CREATE INDEX. Recrie a tabela",
"O separador de campos nao esta conforme esperado. Confira no manual", "Argumento separador de campos não é o esperado. Confira no manual",
"Nao e possivel utilizar comprimento de linha fixo com campos binarios. Favor usar 'fields terminated by'.", "Você não pode usar comprimento de linha fixo com BLOBs. Favor usar 'fields terminated by'",
"O arquivo '%-.64s' precisa estar no diretorio do banco de dados, e sua leitura permitida a todos", "Arquivo '%-.64s' tem que estar no diretório do banco de dados ou ter leitura permitida para todos",
"Arquivo '%-.64s' ja existe", "Arquivo '%-.80s' já existe",
"Registros: %ld Apagados: %ld Ignorados: %ld Avisos: %ld", "Registros: %ld - Deletados: %ld - Ignorados: %ld - Avisos: %ld",
"Registros: %ld Duplicados: %ld", "Registros: %ld - Duplicados: %ld",
"Parte da chave errada. A parte utilizada nao e um texto ou tem comprimento maior que o definido", "Parte de chave incorreta. A parte de chave usada não é um 'string' ou o comprimento usado é maior do que a parte de chave",
"Nao e possivel retirar todas as colunas da tabela com ALTER TABLE. Use DROP TABLE", "Você não pode deletar todas as colunas com ALTER TABLE. Use DROP TABLE em seu lugar",
"Nao foi possivel DROP '%-.64s'. Confira se este campo/chave existe", "Não pode fazer DROP '%-.64s'. Confira se este campo/chave existe",
"Registros: %ld Duplicados: %ld Avisos: %ld", "Registros: %ld - Duplicados: %ld - Avisos: %ld",
"INSERT TABLE '%-.64s' nao e permitido em FROM lista de tabelas", "INSERT TABLE '%-.64s' não é permitido em lista de tabelas FROM",
"Tarefa desconhecida id: %lu", "'Id' de 'thread' %lu desconhecido",
"Voce nao e o responsavel pela tarefa %lu", "Você não é proprietário da 'thread' %lu",
"Nenhuma tabela em uso", "Nenhuma tabela usada",
"Muitos textos para a coluna %s e SET", "'Strings' demais para coluna '%-.64s' e SET",
"Nao foi possivel um unico nome para o arquivo %s.(1-999)\n", "Não pode gerar um nome de arquivo de 'log' único '%-.64s'.(1-999)\n",
"Tabela '%-.64s' esta travada para leitura, e nao pode ser atualizada", "Tabela '%-.64s' foi travada com trava de READ e não pode ser atualizada",
"Tabela '%-.64s' nao foi travada com LOCK TABLES", "Tabela '%-.64s' não foi travada com LOCK TABLES",
"Campo binario '%-.64s' nao pode ter um valor inicial", "Coluna BLOB '%-.64s' não pode ter um valor 'default'",
"Nome de banco de dados invalido: '%-.64s'", "Nome de banco de dados '%-.100s' incorreto",
"Nome de tabela invalido: '%-.64s'", "Nome de tabela '%-.100s' incorreto",
"O SELECT muitos registros, e possivelmente vai demorar. Confira sua clausula WHERE e utilize SET OPTION SQL_BIG_SELECTS=1 se o SELECT esta correto", "O SELECT examinaria registros demais e provavelmente tomaria um tempo muito longo. Confira sua cláusula WHERE e use SET OPTION SQL_BIG_SELECTS=1, se o SELECT estiver correto",
"Erro desconhecido", "Erro desconhecido",
"Procedimento %s desconhecido", "'Procedure' '%-.64s' desconhecida",
"Numero de parametros para o procedimento %s esta incorreto", "Número de parâmetros incorreto para a 'procedure' '%-.64s'",
"Parametro incorreto para o procedimento %s", "Parâmetros incorretos para a 'procedure' '%-.64s'",
"Tabela '%-.64s' descohecida em %s", "Tabela '%-.64s' desconhecida em '%-.32s'",
"Campo '%-.64s' definido em duplicidade", "Coluna '%-.64s' especificada duas vezes",
"Invalid use of group function", "Uso inválido da função GROUP",
"Table '%-.64s' uses a extension that doesn't exist in this MySQL version", "Tabela '%-.64s' usa uma extensão que não existe nesta versão do MySQL",
"A table must have at least 1 column", "Uma tabela tem que ter pelo menos uma (1) coluna",
"The table '%-.64s' is full", "Tabela '%-.64s' está cheia",
"Unknown character set: '%-.64s'", "Conjunto de caracteres '%-.64s' desconhecido",
"Too many tables. MySQL can only use %d tables in a join", "Tabelas demais. O MySQL pode usar somente %d tabelas em um JOIN",
"Too many fields", "Colunas demais",
"Too big row size. The maximum row size, not counting blobs, is %d. You have to change some fields to blobs", "Tamanho de linha grande demais. O máximo tamanho de linha, não contando BLOBs, é de %d. Você tem que mudar alguns campos para BLOBs",
"Thread stack overrun: Used: %ld of a %ld stack. Use 'mysqld -O thread_stack=#' to specify a bigger stack if needed", "Estouro da pilha do 'thread'. Usados %ld de uma pilha de %ld . Use 'mysqld -O thread_stack=#' para especificar uma pilha maior, se necessário",
"Cross dependency found in OUTER JOIN. Examine your ON conditions", "Dependência cruzada encontrada em OUTER JOIN. Examine suas condições ON",
"Column '%-.32s' is used with UNIQUE or INDEX but is not defined as NOT NULL", "Coluna '%-.64s' é usada com UNIQUE ou INDEX, mas não está definida como NOT NULL",
"Can't load function '%-.64s'", "Não pode carregar a função '%-.64s'",
"Can't initialize function '%-.64s'; %-.80s", "Não pode inicializar a função '%-.64s' - '%-.80s'",
"No paths allowed for shared library", "Não é permitido caminho para biblioteca compartilhada",
"Function '%-.64s' already exist", "Função '%-.64s' já existe",
"Can't open shared library '%-.64s' (errno: %d %s)", "Não pode abrir biblioteca compartilhada '%-.64s' (erro no. '%d' - '%-.64s')",
"Can't find function '%-.64s' in library'", "Não pode encontrar a função '%-.64s' na biblioteca",
"Function '%-.64s' is not defined", "Função '%-.64s' não está definida",
"Host '%-.64s' is blocked because of many connection errors. Unblock with 'mysqladmin flush-hosts'", "'Host' '%-.64s' está bloqueado devido a muitos erros de conexão. Desbloqueie com 'mysqladmin flush-hosts'",
"Host '%-.64s' is not allowed to connect to this MySQL server", "'Host' '%-.64s' não tem permissão para se conectar com este servidor MySQL",
"You are using MySQL as an anonymous users and anonymous users are not allowed to change passwords", "Você está usando o MySQL como usuário anônimo e usuários anônimos não têm permissão para mudar senhas",
"You must have privileges to update tables in the mysql database to be able to change passwords for others", "Você tem que ter o privilégio para atualizar tabelas no banco de dados mysql para ser capaz de mudar a senha de outros",
"Can't find any matching row in the user table", "Não pode encontrar nenhuma linha que combine na tabela user",
"Rows matched: %ld Changed: %ld Warnings: %ld", "Linhas que combinaram: %ld - Alteradas: %ld - Avisos: %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", "Não pode criar uma nova 'thread' (erro no. %d). Se você não estiver sem memória disponível, você pode consultar o manual sobre uma possível falha dependente do sistema operacional",
"Column count doesn't match value count at row %ld", "Contagem de colunas não confere com a contagem de valores na linha %ld",
"Can't reopen table: '%-.64s', "Não pode reabrir a tabela '%-.64s',
"Invalid use of NULL value", "Uso inválido do valor NULL",
"Got error '%-.64s' from regexp", "Obteve erro '%-.64s' em regexp",
"Mixing of GROUP columns (MIN(),MAX(),COUNT()...) with no GROUP columns is illegal if there is no GROUP BY clause", "Mistura de colunas GROUP (MIN(),MAX(),COUNT()...) com colunas não GROUP é ilegal, se não existir cláusula GROUP BY",
"There is no such grant defined for user '%-.32s' on host '%-.64s'", "Não existe tal 'grant' definido para o usuário '%-.32s' no 'host' '%-.64s'",
"%-.16s command denied to user: '%-.32s@%-.64s' for table '%-.64s'", "Comando '%-.16s' negado para o usuário '%-.32s@%-.64s' na tabela '%-.64s'",
"%-.16s command denied to user: '%-.32s@%-.64s' for column '%-.64s' in table '%-.64s'", "Comando '%-.16s' negado para o usuário '%-.32s@%-.64s' na coluna '%-.64s', na tabela '%-.64s'",
"Illegal GRANT/REVOKE command. Please consult the manual which privleges can be used.", "Comando GRANT/REVOKE ilegal. Por favor consulte no manual quais privilégios podem ser usados.",
"The host or user argument to GRANT is too long", "Argumento de 'host' ou de usuário para o GRANT é longo demais",
"Table '%-64s.%s' doesn't exist", "Tabela '%-.64s.%-.64s' não existe",
"There is no such grant defined for user '%-.32s' on host '%-.64s' on table '%-.64s'", "Não existe tal 'grant' definido para o usuário '%-.32s' no 'host' '%-.64s', na tabela '%-.64s'",
"The used command is not allowed with this MySQL version", "Comando usado não é permitido para esta versão do MySQL",
"Something is wrong in your syntax", "Você tem um erro de sintaxe no seu SQL",
"Delayed insert thread couldn't get requested lock for table %-.64s", "'Thread' de inserção retardada ('delayed') não conseguiu obter trava solicitada na tabela '%-.64s'",
"Too many delayed threads in use", "Excesso de 'threads' retardadas ('delayed') em uso",
"Aborted connection %ld to db: '%-.64s' user: '%-.64s' (%s)", "Conexão %ld abortou para o banco de dados '%-.64s' - usuário '%-.32s' (%-.64s)",
"Got a packet bigger than 'max_allowed_packet'", "Obteve um pacote maior do que 'max_allowed_packet'",
"Got a read error from the connection pipe", "Obteve um erro de leitura no 'pipe' de conexão",
"Got an error from fcntl()", "Obteve um erro em fcntl()",
"Got packets out of order", "Obteve pacotes fora de ordem",
"Couldn't uncompress communication packet", "Não conseguiu descomprimir pacote de comunicação",
"Got an error reading communication packets" "Obteve um erro na leitura de pacotes de comunicação",
"Got timeout reading communication packets", "Obteve expiração de tempo ('timeout') na leitura de pacotes de comunicação",
"Got an error writing communication packets", "Obteve um erro na gravação de pacotes de comunicação",
"Got timeout writing communication packets", "Obteve expiração de tempo ('timeout') na escrita de pacotes de comunicação",
"Result string is longer than max_allowed_packet", "'String' resultante é mais longa do que 'max_allowed_packet'",
"The used table type doesn't support BLOB/TEXT columns", "Tipo de tabela usado não permite colunas BLOB/TEXT",
"The used table type doesn't support AUTO_INCREMENT columns", "Tipo de tabela usado não permite colunas AUTO_INCREMENT",
"INSERT DELAYED can't be used with table '%-.64s', because it is locked with LOCK TABLES", "INSERT DELAYED não pode ser usado com a tabela '%-.64s', porque está travada com LOCK TABLES",
"Incorrect column name '%-.100s'", "Nome de coluna '%-.100s' incorreto",
"The used table handler can't index column '%-.64s'", "O manipulador de tabela usado não pode indexar a coluna '%-.64s'",
"All tables in the MERGE table are not defined identically", "Tabelas no MERGE não estão todas definidas identicamente",
"Can't write, because of unique constraint, to table '%-.64s'", "Não pode gravar, devido à restrição UNIQUE, na tabela '%-.64s'",
"BLOB column '%-.64s' used in key specification without a key length", "Coluna BLOB '%-.64s' usada na especificação de chave sem o comprimento da chave",
"All parts of a PRIMARY KEY must be NOT NULL; If you need NULL in a key, use UNIQUE instead", "Todas as partes de uma PRIMARY KEY têm que ser NOT NULL. Se você precisar de NULL em uma chave, use UNIQUE em seu lugar",
"Result consisted of more than one row", "O resultado consistiu em mais do que uma linha",
"This table type requires a primary key", "Este tipo de tabela requer uma chave primária",
"This version of MySQL is not compiled with RAID support", "Esta versão do MySQL não foi compilada com suporte a RAID",
"You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column", "Você está usando modo de atualização seguro e tentou atualizar uma tabela sem um WHERE que use uma coluna tipo KEY",
"Key '%-.64s' doesn't exist in table '%-.64s'", "Chave '%-.64s' não existe na tabela '%-.64s'",
"Can't open table", "Não pode abrir a tabela",
"The handler for the table doesn't support check/repair", "O manipulador de tabela não suporta check/repair",
"You are not allowed to execute this command in a transaction", "Não lhe é permitido executar este comando em uma 'transaction'",
"Got error %d during COMMIT", "Obteve erro %d durante COMMIT",
"Got error %d during ROLLBACK", "Obteve erro %d durante ROLLBACK",
"Got error %d during FLUSH_LOGS", "Obteve erro %d durante FLUSH_LOGS",
"Got error %d during CHECKPOINT", "Obteve erro %d durante CHECKPOINT",
"Aborted connection %ld to db: '%-.64s' user: '%-.32s' host: `%-.64s' (%-.64s)", "Conexão %ld abortada ao banco de dados '%-.64s' - usuário '%-.32s' - 'host' `%-.64s' ('%-.64s')",
"The handler for the table does not support binary table dump", "O manipulador de tabela não suporta DUMP binário de tabela",
"Binlog closed while trying to FLUSH MASTER", "Binlog fechado. Não pode fazer RESET MASTER",
"Failed rebuilding the index of dumped table '%-.64s'", "Falhou na reconstrução do índice da tabela 'dumped' '%-.64s'",
"Error from master: '%-.64s'", "Erro no 'master' '%-.64s'",
"Net error reading from master", "Erro de rede na leitura do 'master'",
"Net error writing to master", "Erro de rede na gravação do 'master'",
"Can't find FULLTEXT index matching the column list", "Não pode encontrar índice FULLTEXT que combine com a lista de colunas",
"Can't execute the given command because you have active locked tables or an active transaction", "Não pode executar o comando dado porque você tem tabelas ativas travadas ou uma 'transaction' ativa",
"Unknown system variable '%-.64'", "Variável de sistema '%-.64' desconhecida",
"Table '%-.64s' is marked as crashed and should be repaired", "Tabela '%-.64s' está marcada como danificada e deve ser reparada",
"Table '%-.64s' is marked as crashed and last (automatic?) repair failed", "Tabela '%-.64s' está marcada como danificada e a última reparação (automática?) falhou",
"Warning: Some non-transactional changed tables couldn't be rolled back", "Aviso: Algumas tabelas não-transacionais alteradas não puderam ser reconstituídas ('rolled back')",
"Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage. Increase this mysqld variable and try again', "'Multi-statement transaction' requereu mais do que 'max_binlog_cache_size' bytes de armazenagem. Aumente o valor desta variável do mysqld e tente novamente',
"This operation cannot be performed with a running slave, run SLAVE STOP first", "Esta operação não pode ser realizada com um 'slave' em execução. Execute SLAVE STOP primeiro",
"This operation requires a running slave, configure slave and do SLAVE START", "Esta operação requer um 'slave' em execução. Configure o 'slave' e execute SLAVE START",
"The server is not configured as slave, fix in config file or with CHANGE MASTER TO", "O servidor não está configurado como 'slave'. Acerte o arquivo de configuração ou use CHANGE MASTER TO",
"Could not initialize master info structure, check permisions on master.info", "Não pode inicializar a estrutura de informação do 'master'. Verifique as permissões em 'master.info'",
"Could not create slave thread, check system resources", "Não conseguiu criar 'thread' de 'slave'. Verifique os recursos do sistema",
"User %-.64s has already more than 'max_user_connections' active connections", "Usuário '%-.64s' já possui 'max_user_connections' conexões ativas",
"You may only use constant expressions with SET", "Você pode usar apenas expressões de constante com SET",
"Lock wait timeout exceeded", "Lock wait timeout exceeded",
"The total number of locks exceeds the lock table size", "The total number of locks exceeds the lock table size",
"Update locks cannot be acquired during a READ UNCOMMITTED transaction", "Update locks cannot be acquired during a READ UNCOMMITTED transaction",
......
...@@ -315,28 +315,31 @@ static int create_table_from_dump(THD* thd, NET* net, const char* db, ...@@ -315,28 +315,31 @@ static int create_table_from_dump(THD* thd, NET* net, const char* db,
const char* table_name) const char* table_name)
{ {
uint packet_len = my_net_read(net); // read create table statement uint packet_len = my_net_read(net); // read create table statement
Vio* save_vio;
HA_CHECK_OPT check_opt;
TABLE_LIST tables; TABLE_LIST tables;
int error = 0; int error= 1;
handler *file;
if(packet_len == packet_error) if (packet_len == packet_error)
{ {
send_error(&thd->net, ER_MASTER_NET_READ); send_error(&thd->net, ER_MASTER_NET_READ);
return 1; return 1;
} }
if(net->read_pos[0] == 255) // error from master if (net->read_pos[0] == 255) // error from master
{ {
net->read_pos[packet_len] = 0; net->read_pos[packet_len] = 0;
net_printf(&thd->net, ER_MASTER, net->read_pos + 3); net_printf(&thd->net, ER_MASTER, net->read_pos + 3);
return 1; return 1;
} }
thd->command = COM_TABLE_DUMP; thd->command = COM_TABLE_DUMP;
thd->query = sql_alloc(packet_len + 1); thd->query = sql_alloc(packet_len + 1);
if(!thd->query) if (!thd->query)
{ {
sql_print_error("create_table_from_dump: out of memory"); sql_print_error("create_table_from_dump: out of memory");
net_printf(&thd->net, ER_GET_ERRNO, "Out of memory"); net_printf(&thd->net, ER_GET_ERRNO, "Out of memory");
return 1; return 1;
} }
memcpy(thd->query, net->read_pos, packet_len); memcpy(thd->query, net->read_pos, packet_len);
thd->query[packet_len] = 0; thd->query[packet_len] = 0;
thd->current_tablenr = 0; thd->current_tablenr = 0;
...@@ -347,13 +350,10 @@ static int create_table_from_dump(THD* thd, NET* net, const char* db, ...@@ -347,13 +350,10 @@ static int create_table_from_dump(THD* thd, NET* net, const char* db,
char* save_db = thd->db; char* save_db = thd->db;
thd->db = (char*)db; thd->db = (char*)db;
mysql_parse(thd, thd->query, packet_len); // run create table mysql_parse(thd, thd->query, packet_len); // run create table
thd->db = save_db; // leave things the way the were before thd->db = save_db; // leave things the way the were before
if(thd->query_error) if (thd->query_error)
{ goto err; // mysql_parse took care of the error send
close_thread_tables(thd); // mysql_parse takes care of the error send
return 1;
}
bzero((char*) &tables,sizeof(tables)); bzero((char*) &tables,sizeof(tables));
tables.db = (char*)db; tables.db = (char*)db;
...@@ -362,41 +362,37 @@ static int create_table_from_dump(THD* thd, NET* net, const char* db, ...@@ -362,41 +362,37 @@ static int create_table_from_dump(THD* thd, NET* net, const char* db,
thd->proc_info = "Opening master dump table"; thd->proc_info = "Opening master dump table";
if (!open_ltable(thd, &tables, TL_WRITE)) if (!open_ltable(thd, &tables, TL_WRITE))
{ {
// open tables will send the error send_error(&thd->net,0,0); // Send error from open_ltable
sql_print_error("create_table_from_dump: could not open created table"); sql_print_error("create_table_from_dump: could not open created table");
close_thread_tables(thd); goto err;
return 1;
} }
handler *file = tables.table->file; file = tables.table->file;
thd->proc_info = "Reading master dump table data"; thd->proc_info = "Reading master dump table data";
if (file->net_read_dump(net)) if (file->net_read_dump(net))
{ {
net_printf(&thd->net, ER_MASTER_NET_READ); net_printf(&thd->net, ER_MASTER_NET_READ);
sql_print_error("create_table_from_dump::failed in\ sql_print_error("create_table_from_dump::failed in\
handler::net_read_dump()"); handler::net_read_dump()");
close_thread_tables(thd); goto err;
return 1;
} }
HA_CHECK_OPT check_opt;
check_opt.init(); check_opt.init();
check_opt.flags|= T_VERY_SILENT; check_opt.flags|= T_VERY_SILENT;
check_opt.quick = 1; check_opt.quick = 1;
thd->proc_info = "Rebuilding the index on master dump table"; thd->proc_info = "Rebuilding the index on master dump table";
Vio* save_vio = thd->net.vio;
// we do not want repair() to spam us with messages // we do not want repair() to spam us with messages
// just send them to the error log, and report the failure in case of // just send them to the error log, and report the failure in case of
// problems // problems
save_vio = thd->net.vio;
thd->net.vio = 0; thd->net.vio = 0;
if (file->repair(thd,&check_opt )) error=file->repair(thd,&check_opt) != 0;
{
net_printf(&thd->net, ER_INDEX_REBUILD,tables.table->real_name );
error = 1;
}
thd->net.vio = save_vio; thd->net.vio = save_vio;
if (error)
net_printf(&thd->net, ER_INDEX_REBUILD,tables.table->real_name);
err:
close_thread_tables(thd); close_thread_tables(thd);
thd->net.no_send_ok = 0; thd->net.no_send_ok = 0;
return error; return error;
} }
...@@ -407,16 +403,16 @@ int fetch_nx_table(THD* thd, const char* db_name, const char* table_name, ...@@ -407,16 +403,16 @@ int fetch_nx_table(THD* thd, const char* db_name, const char* table_name,
int error = 1; int error = 1;
int nx_errno = 0; int nx_errno = 0;
bool called_connected = (mysql != NULL); bool called_connected = (mysql != NULL);
if(!called_connected && !(mysql = mc_mysql_init(NULL))) if (!called_connected && !(mysql = mc_mysql_init(NULL)))
{ {
sql_print_error("fetch_nx_table: Error in mysql_init()"); sql_print_error("fetch_nx_table: Error in mysql_init()");
nx_errno = ER_GET_ERRNO; nx_errno = ER_GET_ERRNO;
goto err; goto err;
} }
if(!called_connected) if (!called_connected)
{ {
if(connect_to_master(thd, mysql, mi)) if (connect_to_master(thd, mysql, mi))
{ {
sql_print_error("Could not connect to master while fetching table\ sql_print_error("Could not connect to master while fetching table\
'%-64s.%-64s'", db_name, table_name); '%-64s.%-64s'", db_name, table_name);
...@@ -424,21 +420,24 @@ int fetch_nx_table(THD* thd, const char* db_name, const char* table_name, ...@@ -424,21 +420,24 @@ int fetch_nx_table(THD* thd, const char* db_name, const char* table_name,
goto err; goto err;
} }
} }
safe_connect(thd, mysql, mi);
if(request_table_dump(mysql, db_name, table_name)) if (slave_killed(thd))
{ goto err;
nx_errno = ER_GET_ERRNO;
sql_print_error("fetch_nx_table: failed on table dump request "); if (request_table_dump(mysql, thd->last_nx_db, thd->last_nx_table))
goto err; {
} nx_errno = ER_GET_ERRNO;
sql_print_error("fetch_nx_table: failed on table dump request ");
goto err;
}
if(create_table_from_dump(thd, &mysql->net, db_name, if (create_table_from_dump(thd, &mysql->net, db_name,
table_name)) table_name))
{ {
// create_table_from_dump will have sent the error alread // create_table_from_dump will have sent the error alread
sql_print_error("fetch_nx_table: failed on create table "); sql_print_error("fetch_nx_table: failed on create table ");
goto err; goto err;
} }
error = 0; error = 0;
...@@ -447,6 +446,7 @@ int fetch_nx_table(THD* thd, const char* db_name, const char* table_name, ...@@ -447,6 +446,7 @@ int fetch_nx_table(THD* thd, const char* db_name, const char* table_name,
mc_mysql_close(mysql); mc_mysql_close(mysql);
if (nx_errno && thd->net.vio) if (nx_errno && thd->net.vio)
send_error(&thd->net, nx_errno, "Error in fetch_nx_table"); send_error(&thd->net, nx_errno, "Error in fetch_nx_table");
thd->net.no_send_ok = 0; // Clear up garbage after create_table_from_dump
return error; return error;
} }
......
...@@ -1243,21 +1243,11 @@ mysql_execute_command(void) ...@@ -1243,21 +1243,11 @@ mysql_execute_command(void)
if (strlen(tables->name) > NAME_LEN) if (strlen(tables->name) > NAME_LEN)
{ {
net_printf(&thd->net,ER_WRONG_TABLE_NAME,tables->name); net_printf(&thd->net,ER_WRONG_TABLE_NAME,tables->name);
res=0;
break; break;
} }
if(fetch_nx_table(thd, tables->db, tables->real_name, &glob_mi, 0)) if (fetch_nx_table(thd, tables->db, tables->real_name, &glob_mi, 0))
// fetch_nx_table is responsible for sending break; // fetch_nx_table did send the error to the client
// the error
{
res = 0;
thd->net.no_send_ok = 0; // easier to do it here
// this way we make sure that when we are done, we are clean
break;
}
res = 0;
send_ok(&thd->net); send_ok(&thd->net);
break; break;
......
...@@ -832,13 +832,13 @@ static int prepare_for_restore(THD* thd, TABLE_LIST* table) ...@@ -832,13 +832,13 @@ static int prepare_for_restore(THD* thd, TABLE_LIST* table)
int lock_retcode; int lock_retcode;
pthread_mutex_lock(&LOCK_open); pthread_mutex_lock(&LOCK_open);
if((lock_retcode = lock_table_name(thd, table)) < 0) if ((lock_retcode = lock_table_name(thd, table)) < 0)
{ {
pthread_mutex_unlock(&LOCK_open); pthread_mutex_unlock(&LOCK_open);
DBUG_RETURN(-1); DBUG_RETURN(-1);
} }
if(lock_retcode && wait_for_locked_table_names(thd, table)) if (lock_retcode && wait_for_locked_table_names(thd, table))
{ {
unlock_table_name(thd, table); unlock_table_name(thd, table);
pthread_mutex_unlock(&LOCK_open); pthread_mutex_unlock(&LOCK_open);
...@@ -846,7 +846,7 @@ static int prepare_for_restore(THD* thd, TABLE_LIST* table) ...@@ -846,7 +846,7 @@ static int prepare_for_restore(THD* thd, TABLE_LIST* table)
} }
pthread_mutex_unlock(&LOCK_open); pthread_mutex_unlock(&LOCK_open);
if(my_copy(src_path, if (my_copy(src_path,
fn_format(dst_path, dst_path,"", fn_format(dst_path, dst_path,"",
reg_ext, 4), reg_ext, 4),
MYF(MY_WME))) MYF(MY_WME)))
...@@ -860,7 +860,7 @@ static int prepare_for_restore(THD* thd, TABLE_LIST* table) ...@@ -860,7 +860,7 @@ static int prepare_for_restore(THD* thd, TABLE_LIST* table)
// generate table will try to send OK which messes up the output // generate table will try to send OK which messes up the output
// for the client // for the client
if(generate_table(thd, table, 0)) if (generate_table(thd, table, 0))
{ {
unlock_table_name(thd, table); unlock_table_name(thd, table);
thd->net.no_send_ok = save_no_send_ok; thd->net.no_send_ok = save_no_send_ok;
...@@ -921,7 +921,7 @@ static int mysql_admin_table(THD* thd, TABLE_LIST* tables, ...@@ -921,7 +921,7 @@ static int mysql_admin_table(THD* thd, TABLE_LIST* tables,
// now we should be able to open the partially restored table // now we should be able to open the partially restored table
// to finish the restore in the handler later on // to finish the restore in the handler later on
if(!(table->table = reopen_name_locked_table(thd, table))) if (!(table->table = reopen_name_locked_table(thd, table)))
unlock_table_name(thd, table); unlock_table_name(thd, table);
} }
...@@ -1748,7 +1748,7 @@ copy_data_between_tables(TABLE *from,TABLE *to, ...@@ -1748,7 +1748,7 @@ copy_data_between_tables(TABLE *from,TABLE *to,
alter table is to delete the new table so there alter table is to delete the new table so there
is no need to log the changes to it. */ is no need to log the changes to it. */
error = ha_recovery_logging(thd,false); error = ha_recovery_logging(thd,false);
if(error) if (error)
{ {
error = 1; error = 1;
goto err; goto err;
......
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