Commit 9f90ff3f authored by unknown's avatar unknown

Fix error messages

mysqltest now also writes failed error messages to log


Docs/manual.texi:
  Applied changes missed in last merge
client/mysqltest.c:
  Write failed error messages to log.
  Remove space from start of line when doing 'eval'
mysql-test/include/master-slave.inc:
  Fixed after adding output of error messages to mysqltest
mysql-test/r/alter_table.result:
  Removed wrong space
mysql-test/r/rpl000001.result:
  Removed wrong space
mysql-test/r/rpl000003.result:
  Fixed after adding output of error messages to mysqltest
mysql-test/r/rpl000015.result:
  Removed wrong space
mysql-test/r/rpl000016.result:
  Removed wrong space
mysql-test/t/drop.test:
  Change error numbers
mysql-test/t/union.test:
  Change error numbers
sql/share/czech/errmsg.txt:
  Fix error messages
sql/share/danish/errmsg.txt:
  Fix error messages
sql/share/english/errmsg.txt:
  Fix error messages
sql/share/french/errmsg.txt:
  Fix error messages
sql/share/german/errmsg.txt:
  Fix error messages
sql/share/greek/errmsg.txt:
  Fix error messages
sql/share/hungarian/errmsg.txt:
  Fix error messages
sql/share/italian/errmsg.txt:
  Fix error messages
sql/share/japanese/errmsg.txt:
  Fix error messages
sql/share/korean/errmsg.txt:
  Fix error messages
sql/share/norwegian-ny/errmsg.txt:
  Fix error messages
sql/share/norwegian/errmsg.txt:
  Fix error messages
sql/share/polish/errmsg.txt:
  Fix error messages
sql/share/portuguese/errmsg.txt:
  Fix error messages
sql/share/romanian/errmsg.txt:
  Fix error messages
sql/share/slovak/errmsg.txt:
  Fix error messages
sql/share/spanish/errmsg.txt:
  Fix error messages
sql/share/swedish/errmsg.txt:
  Fix error messages
sql/share/ukrainian/errmsg.txt:
  Fix error messages
parent 29bae7b7
......@@ -712,53 +712,13 @@ of MySQL. All known and reported bugs are fixed in the latest
version, with the exception of the bugs listed in the bugs section, which
are things that are design-related. @xref{Bugs}.
MySQL is written in multiple layers and different independent
modules. These modules are listed below with an indication of how
MySQL is written in multiple layers and different independent modules.
Some of the new modules are listed below with an indication of how
well-tested each of them is:
@cindex modules, list of
@table @strong
@item The ISAM table handler --- Stable
This manages storage and retrieval of all data in MySQL Version 3.22
and earlier. In all MySQL releases there hasn't been a single
(reported) bug in this code. The only known way to get a corrupted table
is to kill the server in the middle of an update. Even that is unlikely
to destroy any data beyond rescue, because all data are flushed to disk
between each query. There hasn't been a single bug report about lost data
because of bugs in MySQL.
@cindex ISAM table handler
@cindex storing, data
@cindex retrieving, data
@cindex data, ISAM table handler
@item The MyISAM table handler --- Stable
This is new in MySQL Version 3.23. It's largely based on the ISAM
table code but has a lot of new and very useful features.
@item The parser and lexical analyser --- Stable
There hasn't been a single reported bug in this system for a long time.
@item The C client code --- Stable
No known problems. In early Version 3.20 releases, there were some limitations
in the send/receive buffer size. As of Version 3.21, the buffer size is now
dynamic up to a default of 16M.
@item Standard client programs --- Stable
These include @code{mysql}, @code{mysqladmin}, @code{mysqlshow},
@code{mysqldump}, and @code{mysqlimport}.
@item Basic SQL --- Stable
The basic SQL function system and string classes and dynamic memory
handling. Not a single reported bug in this system.
@item Query optimiser --- Stable
@item Range optimiser --- Stable
@item Join optimiser --- Stable
@item Locking --- Gamma
This is very system-dependent. On some systems there are big problems
using standard OS locking (@code{fcntl()}). In these cases, you should run the
......@@ -766,79 +726,33 @@ MySQL daemon with the @code{--skip-locking} flag. Problems are known
to occur on some Linux systems, and on SunOS when using NFS-mounted file
systems.
@item Linux threads --- Stable
The major problem found has been with the @code{fcntl()} call, which is
fixed by using the @w{@code{--skip-locking}} option to
@code{mysqld}. Some people have reported lockup problems with Version 0.5.
LinuxThreads will need to be recompiled if you plan to use
1000+ concurrent connections. Although it is possible to run that many
connections with the default LinuxThreads (however, you will never go
above 1021), the default stack spacing of 2 MB makes the application
unstable, and we have been able to reproduce a coredump after creating
1021 idle connections. @xref{Linux}.
@item Solaris 2.5+ pthreads --- Stable
We use this for all our production work.
@item MIT-pthreads (Other systems) --- Stable
There have been no reported bugs since Version 3.20.15 and no known bugs since
Version 3.20.16. On some systems, there is a ``misfeature'' where some
operations are quite slow (a 1/20 second sleep is done between each query).
Of course, MIT-pthreads may slow down everything a bit, but index-based
@code{SELECT} statements are usually done in one time frame so there shouldn't
be a mutex locking/thread juggling.
@item Other thread implementions --- Beta - Gamma
The ports to other systems are still very new and may have bugs, possibly
in MySQL, but most often in the thread implementation itself.
@item @code{LOAD DATA ...}, @code{INSERT ... SELECT} --- Stable
Some people thought they had found bugs here, but these usually have
turned out to be misunderstandings. Please check the manual before reporting
problems!
@item @code{ALTER TABLE} --- Stable
Small changes in Version 3.22.12.
@item DBD --- Stable
Now maintained by Jochen Wiedmann
(@email{wiedmann@@neckar-alb.de}). Thanks!
@item @code{mysqlaccess} --- Stable
Written and maintained by Yves Carlier
(@email{Yves.Carlier@@rug.ac.be}). Thanks!
@item @code{GRANT} --- Stable
Big changes made in MySQL Version 3.22.12.
@item @strong{MyODBC} (uses ODBC SDK 2.5) --- Gamma
@item @strong{MyODBC 2.50} (uses ODBC SDK 2.5) --- Gamma
It seems to work well with some programs.
@item Replication -- Beta / Gamma
@item Replication -- Gamma
We are still working on replication, so don't expect this to be rock
solid yet. On the other hand, some MySQL users are already
using this with good results.
@item InnoDB Tables -- Beta
This is a recent addition to @code{MySQL}. They appear to work well and
can be used after some initial testing.
@item BDB Tables -- Beta
@item BDB Tables -- Gamma
The Berkeley DB code is very stable, but we are still improving the interface
between MySQL and BDB tables, so it will take some time before this
is tested as well as the other table types.
@item Automatic recovery of MyISAM tables - Beta
@item InnoDB Tables -- Gamma
This is a recent addition to @code{MySQL}. They appear to work well and
can be used after some initial testing.
@item Automatic recovery of MyISAM tables - Gamma
This only affects the new code that checks if the table was closed properly
on open and executes an automatic check/repair of the table if it wasn't.
@item MERGE tables -- Beta / Gamma
The usage of keys on @code{MERGE} tables is still not well tested. The
other parts of the @code{MERGE} code are quite well tested.
@item FULLTEXT -- Beta
Text search seems to work, but is still not widely used.
@item Bulk-insert - Alpha
New feature in MyISAM in MySQL 4.0 for faster insert of many rows.
@end table
MySQL AB provides high-quality support for paying customers, but the
......@@ -9559,6 +9473,13 @@ or
shell> mysqladmin -h 'your-host-name' variables
@end example
If you get @code{Errcode 13}, which means @code{Permission denied}, when
starting @code{mysqld} this means that you didn't have the right to
read/create files in the MySQL database or log directory. In this case
you should either start @code{mysqld} as the root user or change the
permissions for the involved files and directories so that you have the
right to use them.
If @code{safe_mysqld} starts the server but you can't connect to it,
you should make sure you have an entry in @file{/etc/hosts} that looks like
this:
......@@ -9725,8 +9646,8 @@ version 4.0;
@item
The old C API functions @code{mysql_drop_db}, @code{mysql_create_db} and
@code{mysql_connect} are not supported anymore, unless one compiles
MySQL with @code{USE_OLD_FUNCTIONS}. Instead of doing this, one should
change the client to use the new 4.0 API.
MySQL with @code{CFLAGS=-DUSE_OLD_FUNCTIONS}. Instead of doing this,
one should change the client to use the new 4.0 API.
@item
In the @code{MYSQL_FIELD} structure, @code{length} and @code{max_length} has
changed from @code{unsigned int} to @code{unsigned long}. This should not
......@@ -9749,6 +9670,10 @@ Format of @code{SHOW OPEN TABLE} has changed.
@item
Multithreaded clients should use @code{mysql_thread_init()} and
@code{mysql_thread_end()}. @xref{Threaded clients}.
@item
If you want to recompile the perl DBD-MySQL module, you must get
Msql-Mysql-modules version 1.2218 or newer, because the older DBD modules
used the deprecated @code{drop_db()} call.
@end itemize
@node Upgrading-from-3.22, Upgrading-from-3.21, Upgrading-from-3.23, Upgrade
......@@ -9793,6 +9718,10 @@ option @code{--no-named-commands (-g)}. This option can be disabled with
some cases, for example in SQL scripts that use named commands without a
semicolon! Long format commands still work from the first line.
@item
Date functions that work on part of dates (like @code{MONTH()}) will now
return 0 for @code{0000-00-00} dates. (MySQL 3.22 returned @code{NULL}).
@item
If you are using the @code{german} character sort order, you must repair
all your tables with @code{isamchk -r}, as we have made some changes in
......@@ -10501,6 +10430,8 @@ You can avoid using @file{libg++.a} by running @code{configure} like this:
shell> CXX=gcc ./configure
@end example
If you are running gcc 3.0 and above, you can't use the above trick with
CXX=gcc, but you have to install libstd++.
@node Linux-SPARC, Linux-Alpha, Linux-x86, Linux
@subsubsection Linux SPARC Notes
......@@ -11095,6 +11026,10 @@ Because Windows doesn't allow you to drop files that are open, you first
must flush all @code{MERGE} tables (with @code{FLUSH TABLES}) or drop the
@code{MERGE} table before dropping the table. We will fix this at the same
time we introduce @code{VIEW}s.
@item
@code{DATA DIRECTORY} and @code{INDEX DIRECTORY} directives in
@code{CREATE TABLE} is ignored on windows, because windows doesn't support
symbolic links.
@end table
Here are some open issues for anyone who might want to help us with the Windows
......@@ -21063,8 +20998,9 @@ The maximum size of one packet. The message buffer is initialised to
bytes when needed. This value by default is small, to catch big (possibly
wrong) packets. You must increase this value if you are using big
@code{BLOB} columns. It should be as big as the biggest @code{BLOB} you want
to use. The current protocol limits @code{max_allowed_packet} to 16M.
to use. The protocol limits for @code{max_allowed_packet} is 16M in MySQL
3.23 and 4G in MySQL 4.0.
@item @code{max_binlog_cache_size}
If a multi-statement transaction requires more than this amount of memory,
one will get the error "Multi-statement transaction required more than
......@@ -23944,22 +23880,32 @@ argument).
@cindex error messages, displaying
@cindex perror
@code{perror} can be used to print error message(s). @code{perror} can
be invoked like this:
@cindex errno
@cindex Errcode
For most system errors MySQL will, in addition to a internal text message,
also print the system error code in one of the following styles:
@code{message ... (errno: #)} or @code{message ... (Errcode: #)}.
You can find out what the error code means by either examining the
documentation for your system or use the @code{perror} utility.
@code{perror} prints a description for a system error code, or an MyISAM/ISAM
table handler error code.
@code{perror} is invoked like this:
@example
shell> perror [OPTIONS] [ERRORCODE [ERRORCODE...]]
For example:
Example:
shell> perror 64 79
shell> perror 13 64
Error code 13: Permission decided
Error code 64: Machine is not on the network
Error code 79: Can not access a needed shared library
@end example
@code{perror} can be used to display a description for a system error
code, or an MyISAM/ISAM table handler error code. The error messages
are mostly system dependent.
Note that the error messages are mostly system dependent!
@node Batch Commands, , perror, Client-Side Scripts
......@@ -26254,8 +26200,8 @@ Constant condition removal (needed because of constant folding):
Constant expressions used by indexes are evaluated only once.
@item
@code{COUNT(*)} on a single table without a @code{WHERE} is retrieved
directly from the table information. This is also done for any @code{NOT NULL}
expression when used with only one table.
directly from the table information for MyISAM and HEAP tables. This is
also done for any @code{NOT NULL} expression when used with only one table.
@item
Early detection of invalid constant expressions. MySQL quickly
detects that some @code{SELECT} statements are impossible and returns no rows.
......@@ -26464,7 +26410,7 @@ key value changes. In this case @code{LIMIT #} will not calculate any
unnecessary @code{GROUP BY}'s.
@item
As soon as MySQL has sent the first @code{#} rows to the client, it
will abort the query.
will abort the query (If you are not using @code{SQL_CALC_FOUND_ROWS}).
@item
@code{LIMIT 0} will always quickly return an empty set. This is useful
to check the query and to get the column types of the result columns.
......@@ -26520,7 +26466,7 @@ If you are inserting a lot of rows from different clients, you can get
higher speed by using the @code{INSERT DELAYED} statement. @xref{INSERT,
, @code{INSERT}}.
@item
Note that with @code{MyISAM} you can insert rows at the same time
Note that with @code{MyISAM} tables you can insert rows at the same time
@code{SELECT}s are running if there are no deleted rows in the tables.
@item
When loading a table from a text file, use @code{LOAD DATA INFILE}. This
......@@ -26562,8 +26508,11 @@ Execute a @code{FLUSH TABLES} statement or the shell command @code{mysqladmin
flush-tables}.
@end enumerate
This procedure will be built into @code{LOAD DATA INFILE} in some future
version of MySQL.
Note that @code{LOAD DATA INFILE} also does the above optimization if
you insert into an empty table; The main difference with the above
procedure is that you can let myisamchk allocate much more temporary
memory for the index creation that you may want MySQL to allocate for
every index recreation.
Since @strong{MySQL 4.0} you can also use
@code{ALTER TABLE tbl_name DISABLE KEYS} instead of
......@@ -26572,7 +26521,8 @@ Since @strong{MySQL 4.0} you can also use
@code{myisamchk -r -q /path/to/db/tbl_name}. This way you can also skip
@code{FLUSH TABLES} steps.
@item
You can speed up insertions by locking your tables:
You can speed up insertions that is done over multiple statements by
locking your tables:
@example
mysql> LOCK TABLES a WRITE;
......@@ -26587,6 +26537,9 @@ be as many index buffer flushes as there are different @code{INSERT}
statements. Locking is not needed if you can insert all rows with a single
statement.
For transactional tables, you should use @code{BEGIN/COMMIT} instead of
@code{LOCK TABLES} to get a speedup.
Locking will also lower the total time of multi-connection tests, but the
maximum wait time for some threads will go up (because they wait for
locks). For example:
......@@ -26664,7 +26617,7 @@ Always check that all your queries really use the indexes you have created
in the tables. In MySQL you can do this with the @code{EXPLAIN}
command. @xref{EXPLAIN, Explain, Explain, manual}.
@item
Try to avoid complex @code{SELECT} queries on tables that are updated a
Try to avoid complex @code{SELECT} queries on MyISAM tables that are updated a
lot. This is to avoid problems with table locking.
@item
The new @code{MyISAM} tables can insert rows in a table without deleted
......@@ -35602,8 +35555,8 @@ alter_specification:
or ADD [CONSTRAINT symbol] FOREIGN KEY index_name (index_col_name,...)
[reference_definition]
or ALTER [COLUMN] col_name @{SET DEFAULT literal | DROP DEFAULT@}
or CHANGE [COLUMN] old_col_name create_definition
or MODIFY [COLUMN] create_definition
or CHANGE [COLUMN] old_col_name create_definition [FIRST | AFTER column_name]
or MODIFY [COLUMN] create_definition [FIRST | AFTER column_name]
or DROP [COLUMN] col_name
or DROP PRIMARY KEY
or DROP INDEX index_name
......@@ -35784,15 +35737,6 @@ If you use @code{ALTER TABLE} on a @code{MyISAM} table, all non-unique
indexes are created in a separate batch (like in @code{REPAIR}).
This should make @code{ALTER TABLE} much faster when you have many indexes.
@item
Since @strong{MySQL 4.0} this can be activated explicitly.
@code{ALTER TABLE ... DISABLE KEYS} makes MySQL to stop updating
non-unique indexes for @code{MyISAM} table.
@code{ALTER TABLE ... ENABLE KEYS} then should be used to recreate missing
indexes. As MySQL does it with special algorithm which is much
faster then inserting keys one by one, disabling keys could give a
considerable speedup on bulk inserts.
@item
@findex mysql_info()
With the C API function @code{mysql_info()}, you can find out how many
......@@ -39050,7 +38994,14 @@ they roll back the corresponding SQL statement.
@itemize @bullet
@item @code{SHOW TABLE STATUS} does not give accurate statistics
@item
@strong{WARNING:} Do @strong{NOT} convert MySQL system tables from
MyISAM TO InnoDB tables! This is not supported; If you do this MySQL
will not restart until you restore the old system tables from a backup
or re-generate them with the mysql_install_db script.
@item
@code{SHOW TABLE STATUS} does not give accurate statistics
on InnoDB tables, except for the physical size reserved by the table.
The row count is only a rough estimate used in SQL optimisation.
......@@ -45679,16 +45630,31 @@ When a MySQL client or the @code{mysqld} server gets a packet bigger
than @code{max_allowed_packet} bytes, it issues a @code{Packet too large}
error and closes the connection.
If you are using the @code{mysql} client, you may specify a bigger buffer by
starting the client with @code{mysql --set-variable=max_allowed_packet=8M}.
A communication packet is a single SQL statement sent to the MySQL server
or a single row that is sent to the client.
If you are using other clients that do not allow you to specify the maximum
packet size (such as @code{DBI}), you need to set the packet size when you
start the server. You can use a command-line option to @code{mysqld} to set
@code{max_allowed_packet} to a larger size. For example, if you are
expecting to store the full length of a @code{BLOB} into a table, you'll need
to start the server with the @code{--set-variable=max_allowed_packet=16M}
option.
When a MySQL client or the @code{mysqld} server gets a packet bigger
than @code{max_allowed_packet} bytes, it issues a @code{Packet too
large} error and closes the connection. With some clients, you may also
get @code{Lost connection to MySQL server during query} error if the
communication packet is too big.
Note that both the client and the server has it's own
@code{max_allowed_packet} variable. If you want to handle big packets,
you have to increase this variable both in the client and in the server.
It's safe to increase this variable as memory is only allocated when
needed; This variable is more a precaution to catch wrong packets
between the client/server and also to ensure that you don't accidently
use big packets so that you run out of memory.
If you are using the @code{mysql} client, you may specify a bigger
buffer by starting the client with @code{mysql --set-variable=max_allowed_packet=8M}. Other clients have different methods to set this variable.
You can use the option file to set @code{max_allowed_packet} to a larger
size in @code{mysqld}. For example, if you are expecting to store the
full length of a @code{MEDIUMBLOB} into a table, you'll need to start
the server with the @code{set-variable=max_allowed_packet=16M} option.
You can also get strange problems with large packets if you are using
big blobs, but you haven't given @code{mysqld} access to enough memory
......@@ -47521,7 +47487,7 @@ chapter or for the proper operation of the programs listed herein.
Perl @code{Data-Dumper} module. Useful with @code{DBI}/@code{DBD} support for
older Perl installations.
@item @uref{http://www.mysql.com/Downloads/Contrib/DBI-1.15.tar.gz, DBI-1.15.tar.gz}
@item @uref{http://www.mysql.com/Downloads/Contrib/DBI-1.18.tar.gz, DBI-1.18.tar.gz}
Perl @code{DBI} module.
@item @uref{http://www.mysql.com/Downloads/Contrib/KAMXbase1.2.tar.gz,KAMXbase1.2.tar.gz}
......@@ -47530,7 +47496,7 @@ module written by Pratap Pereira @email{pereira@@ee.eng.ohio-state.edu},
extended by Kevin A. McGrail @email{kmcgrail@@digital1.peregrinehw.com}.
This converter can handle MEMO fields.
@item @uref{http://www.mysql.com/Downloads/Contrib/Msql-Mysql-modules-1.2216.tar.gz, Msql-Mysql-modules-1.2216.tar.gz}
@item @uref{http://www.mysql.com/Downloads/Contrib/Msql-Mysql-modules-1.2218.tar.gz, Msql-Mysql-modules-1.2218.tar.gz}
Perl @code{DBD} module to access mSQL and MySQL databases.
@item @uref{http://www.mysql.com/Downloads/Contrib/Data-ShowTable-3.3.tar.gz, Data-ShowTable-3.3.tar.gz}
......@@ -47612,9 +47578,6 @@ A C++ database independent library that supports MySQL.
@cindex Delphi
@item Delphi
@itemize @bullet
@item @uref{http://www.mysql.com/Downloads/Contrib/delphi-interface.gz, delphi-interface.gz}
Delphi interface to @code{libmysql.dll}, by Blestan Tabakov,
@email{root@@tdg.bis.bg}.
@item @uref{http://www.mysql.com/Downloads/Contrib/DelphiMySQL2.zip, DelphiMySQL2.zip}
Delphi interface to @code{libmysql.dll}, by @email{bsilva@@umesd.k12.or.us}.
......@@ -48829,7 +48792,12 @@ Our TODO section contains what we plan to have in 4.0. @xref{TODO MySQL 4.0}.
@itemize @bullet
@item
Ignore @code{DATA DIRECTORY} and @code{INDEX DIRECTORY} directives on windows.
@item
Added boolean fulltext search code. It should be considered early alpha.
@item
Extended @code{MODIFY} and @code{CHANGE} in @code{ALTER TABLE} to accept
the @code{AFTER} keyword.
@end itemize
@node News-4.0.0, , News-4.0.1, News-4.0.x
......@@ -113,7 +113,7 @@ static int block_stack[BLOCK_STACK_DEPTH];
static int block_ok_stack[BLOCK_STACK_DEPTH];
static uint global_expected_errno[MAX_EXPECTED_ERRORS];
static uint global_expected_errno[MAX_EXPECTED_ERRORS], global_expected_errors;
DYNAMIC_ARRAY q_lines;
......@@ -194,6 +194,7 @@ struct st_query
int first_word_len;
my_bool abort_on_error, require_file;
uint expected_errno[MAX_EXPECTED_ERRORS];
uint expected_errors;
char record_file[FN_REFLEN];
enum enum_commands type;
};
......@@ -1011,10 +1012,11 @@ static void get_file_name(char *filename, struct st_query* q)
}
static void get_ints(uint *to,struct st_query* q)
static uint get_ints(uint *to,struct st_query* q)
{
char* p=q->first_argument;
long val;
uint count=0;
DBUG_ENTER("get_ints");
if (!*p)
......@@ -1022,12 +1024,13 @@ static void get_ints(uint *to,struct st_query* q)
for (; (p=str2int(p,10,(long) INT_MIN, (long) INT_MAX, &val)) ; p++)
{
count++;
*to++= (uint) val;
if (*p != ',')
break;
}
*to++=0; /* End of data */
DBUG_VOID_RETURN;
DBUG_RETURN(count);
}
/*
......@@ -1583,8 +1586,11 @@ int read_query(struct st_query** q_ptr)
q->first_word_len = 0;
memcpy((gptr) q->expected_errno, (gptr) global_expected_errno,
sizeof(global_expected_errno));
q->expected_errors=global_expected_errors;
q->abort_on_error = global_expected_errno[0] == 0;
bzero((gptr) global_expected_errno,sizeof(global_expected_errno));
global_expected_errors=0;
q->type = Q_UNKNOWN;
q->query_buf=q->query=0;
if (read_line(read_query_buf, sizeof(read_query_buf)))
......@@ -1613,6 +1619,7 @@ int read_query(struct st_query** q_ptr)
expected_errno = expected_errno * 10 + *p - '0';
q->expected_errno[0] = expected_errno;
q->expected_errno[1] = 0;
q->expected_errors=1;
}
}
......@@ -1962,28 +1969,33 @@ int run_query(MYSQL* mysql, struct st_query* q, int flags)
mysql_errno(mysql), mysql_error(mysql));
else
{
for (i=0 ; q->expected_errno[i] ; i++)
for (i=0 ; (uint) i < q->expected_errors ; i++)
{
if ((q->expected_errno[i] == mysql_errno(mysql)))
{
if (i == 0 && q->expected_errno[1] == 0)
if (i == 0 && q->expected_errors == 1)
{
/* Only log error if there is one possible error */
dynstr_append(ds,mysql_error(mysql));
dynstr_append_mem(ds,"\n",1);
}
else
/* Don't log error if we may not get an error */
else if (q->expected_errno[0] != 0)
dynstr_append(ds,"Got one of the listed errors\n");
goto end; /* Ok */
}
}
if (i)
{
dynstr_append(ds,mysql_error(mysql));
dynstr_append_mem(ds,"\n",1);
verbose_msg("query '%s' failed with wrong errno %d instead of %d...",
q->query, mysql_errno(mysql), q->expected_errno[0]);
error=1;
goto end;
}
dynstr_append(ds,mysql_error(mysql));
dynstr_append_mem(ds,"\n",1);
verbose_msg("query '%s' failed: %d: %s", q->query, mysql_errno(mysql),
mysql_error(mysql));
/*
......@@ -2262,7 +2274,7 @@ int main(int argc, char** argv)
case Q_EVAL_RESULT: eval_result = 1; break;
case Q_EVAL:
if (q->query == q->query_buf)
q->query += q->first_word_len;
q->query= q->first_argument;
/* fall through */
case Q_QUERY:
case Q_REAP:
......@@ -2308,7 +2320,7 @@ int main(int argc, char** argv)
require_file=0;
break;
case Q_ERROR:
get_ints(global_expected_errno,q);
global_expected_errors=get_ints(global_expected_errno,q);
break;
case Q_REQUIRE:
get_file_name(save_file,q);
......
......@@ -3,6 +3,7 @@ connect (master1,localhost,root,,test,0,master.sock);
connect (slave,localhost,root,,test,0,slave.sock);
connect (slave1,localhost,root,,test,0,slave.sock);
connection slave;
--error 0,1199
!slave stop;
@r/slave-stopped.result show status like 'Slave_running';
connection master;
......
......@@ -92,16 +92,16 @@ key (n2, n3, n4, n1),
key (n3, n4, n1, n2),
key (n4, n1, n2, n3) );
alter table t1 disable keys;
insert into t1 values(10,RAND()*1000,RAND()*1000,RAND());
insert into t1 values(9,RAND()*1000,RAND()*1000,RAND());
insert into t1 values(8,RAND()*1000,RAND()*1000,RAND());
insert into t1 values(7,RAND()*1000,RAND()*1000,RAND());
insert into t1 values(6,RAND()*1000,RAND()*1000,RAND());
insert into t1 values(5,RAND()*1000,RAND()*1000,RAND());
insert into t1 values(4,RAND()*1000,RAND()*1000,RAND());
insert into t1 values(3,RAND()*1000,RAND()*1000,RAND());
insert into t1 values(2,RAND()*1000,RAND()*1000,RAND());
insert into t1 values(1,RAND()*1000,RAND()*1000,RAND());
insert into t1 values(10,RAND()*1000,RAND()*1000,RAND());
insert into t1 values(9,RAND()*1000,RAND()*1000,RAND());
insert into t1 values(8,RAND()*1000,RAND()*1000,RAND());
insert into t1 values(7,RAND()*1000,RAND()*1000,RAND());
insert into t1 values(6,RAND()*1000,RAND()*1000,RAND());
insert into t1 values(5,RAND()*1000,RAND()*1000,RAND());
insert into t1 values(4,RAND()*1000,RAND()*1000,RAND());
insert into t1 values(3,RAND()*1000,RAND()*1000,RAND());
insert into t1 values(2,RAND()*1000,RAND()*1000,RAND());
insert into t1 values(1,RAND()*1000,RAND()*1000,RAND());
alter table t1 enable keys;
drop table t1;
create table t1 (i int unsigned not null auto_increment primary key);
......
......@@ -7,7 +7,7 @@ use test;
drop table if exists t1,t3;
create table t1 (word char(20) not null);
load data infile '../../std_data/words.dat' into table t1;
load data local infile '$MYSQL_TEST_DIR/std_data/words.dat' into table t1;
load data local infile '$MYSQL_TEST_DIR/std_data/words.dat' into table t1;
select * from t1;
word
Aarhus
......@@ -47,16 +47,16 @@ reset master;
reset slave;
drop table if exists t1,t2;
create table t1(n int);
insert into t1 values(10);
insert into t1 values(9);
insert into t1 values(8);
insert into t1 values(7);
insert into t1 values(6);
insert into t1 values(5);
insert into t1 values(4);
insert into t1 values(3);
insert into t1 values(2);
insert into t1 values(1);
insert into t1 values(10);
insert into t1 values(9);
insert into t1 values(8);
insert into t1 values(7);
insert into t1 values(6);
insert into t1 values(5);
insert into t1 values(4);
insert into t1 values(3);
insert into t1 values(2);
insert into t1 values(1);
create table t2(id int);
insert into t2 values(connection_id());
create temporary table t1_temp(n int);
......
......@@ -6,6 +6,7 @@ slave start;
drop table if exists t1;
create table t1(n int primary key);
insert into t1 values (1),(2),(2);
Duplicate entry '2' for key 1
insert into t1 values (3);
select * from t1;
n
......
......@@ -10,7 +10,7 @@ change master to master_host='127.0.0.1';
show slave status;
Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Last_log_seq
127.0.0.1 test 9998 60 4 No 0 0 0
change master to master_host='127.0.0.1',master_user='root',
change master to master_host='127.0.0.1',master_user='root',
master_password='',master_port=$MASTER_MYPORT;
show slave status;
Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Last_log_seq
......
slave start;
Could not initialize master info structure, check permisions on master.info
slave start;
change master to master_host='127.0.0.1',master_port=$MASTER_MYPORT,
Could not initialize master info structure, check permisions on master.info
change master to master_host='127.0.0.1',master_port=$MASTER_MYPORT,
master_user='root';
Could not initialize master info
reset slave;
change master to master_host='127.0.0.1',master_port=$MASTER_MYPORT,
change master to master_host='127.0.0.1',master_port=$MASTER_MYPORT,
master_user='root';
reset master;
slave start;
......@@ -57,12 +60,12 @@ master-bin.005
master-bin.006
show master status;
File Position Binlog_do_db Binlog_ignore_db
master-bin.006 720
master-bin.006 710
slave stop;
slave start;
show slave status;
Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Last_log_seq
127.0.0.1 root 9999 60 master-bin.006 720 Yes 0 0 11
127.0.0.1 root 9999 60 master-bin.006 710 Yes 0 0 11
lock tables t3 read;
select count(*) from t3 where n >= 4;
count(*)
......
......@@ -28,13 +28,13 @@ drop database foo;
# test drop/create database and FLUSH TABLES WITH READ LOCK
drop database if exists foo;
flush tables with read lock;
--error 1209,1219;
--error 1209,1223;
create database foo;
unlock tables;
create database foo;
show databases;
flush tables with read lock;
--error 1208,1219;
--error 1208,1223;
drop database foo;
unlock tables;
drop database foo;
......
......@@ -22,25 +22,25 @@ select 't1',b,count(*) from t1 group by b UNION select 't2',b,count(*) from t2 g
# Test some error conditions with UNION
explain select a,b from t1 union all select a,b from t2;
--error 1217
--error 1221
select a,b from t1 into outfile 'skr' union select a,b from t2;
--error 1217
--error 1221
select a,b from t1 order by a union select a,b from t2;
--error 1217
--error 1221
insert into t3 select a from t1 order by a union select a from t2;
--error 1218
--error 1222
create table t3 select a,b from t1 union select a from t2;
--error 1218
--error 1222
select a,b from t1 union select a from t2;
--error 1218
--error 1222
select * from t1 union select a from t2;
--error 1218
--error 1222
select a from t1 union select * from t2;
# Test CREATE, INSERT and REPLACE
......
......@@ -236,4 +236,3 @@
"Can't execute the query because you have a conflicting read lock",
"Mixing of transactional and non-transactional tables is disabled",
"Option '%s' used twice in statement",
"The used table type doesn't support FULLTEXT indexes",
......@@ -230,4 +230,3 @@
"Can't execute the query because you have a conflicting read lock",
"Mixing of transactional and non-transactional tables is disabled",
"Option '%s' used twice in statement",
"The used table type doesn't support FULLTEXT indexes",
......@@ -227,4 +227,3 @@
"Can't execute the query because you have a conflicting read lock",
"Mixing of transactional and non-transactional tables is disabled",
"Option '%s' used twice in statement",
"The used table type doesn't support FULLTEXT indexes",
......@@ -227,4 +227,3 @@
"Can't execute the query because you have a conflicting read lock",
"Mixing of transactional and non-transactional tables is disabled",
"Option '%s' used twice in statement",
"The used table type doesn't support FULLTEXT indexes",
......@@ -230,4 +230,3 @@
"Can't execute the query because you have a conflicting read lock",
"Mixing of transactional and non-transactional tables is disabled",
"Option '%s' used twice in statement",
"Der verwendete Tabellentyp unterstützt keine FULLTEXT-Indexe",
......@@ -227,4 +227,3 @@
"Can't execute the query because you have a conflicting read lock",
"Mixing of transactional and non-transactional tables is disabled",
"Option '%s' used twice in statement",
"The used table type doesn't support FULLTEXT indexes",
......@@ -229,4 +229,3 @@
"Can't execute the query because you have a conflicting read lock",
"Mixing of transactional and non-transactional tables is disabled",
"Option '%s' used twice in statement",
"The used table type doesn't support FULLTEXT indexes",
......@@ -227,4 +227,3 @@
"Can't execute the query because you have a conflicting read lock",
"Mixing of transactional and non-transactional tables is disabled",
"Option '%s' used twice in statement",
"The used table type doesn't support FULLTEXT indexes",
......@@ -229,4 +229,3 @@
"Can't execute the query because you have a conflicting read lock",
"Mixing of transactional and non-transactional tables is disabled",
"Option '%s' used twice in statement",
"The used table type doesn't support FULLTEXT indexes",
......@@ -227,4 +227,3 @@
"Can't execute the query because you have a conflicting read lock",
"Mixing of transactional and non-transactional tables is disabled",
"Option '%s' used twice in statement",
"The used table type doesn't support FULLTEXT indexes",
......@@ -229,4 +229,3 @@
"Can't execute the query because you have a conflicting read lock",
"Mixing of transactional and non-transactional tables is disabled",
"Option '%s' used twice in statement",
"The used table type doesn't support FULLTEXT indexes",
......@@ -229,4 +229,3 @@
"Can't execute the query because you have a conflicting read lock",
"Mixing of transactional and non-transactional tables is disabled",
"Option '%s' used twice in statement",
"The used table type doesn't support FULLTEXT indexes",
......@@ -231,4 +231,3 @@
"Can't execute the query because you have a conflicting read lock",
"Mixing of transactional and non-transactional tables is disabled",
"Option '%s' used twice in statement",
"The used table type doesn't support FULLTEXT indexes",
......@@ -227,4 +227,3 @@
"Can't execute the query because you have a conflicting read lock",
"Mixing of transactional and non-transactional tables is disabled",
"Option '%s' used twice in statement",
"The used table type doesn't support FULLTEXT indexes",
......@@ -231,4 +231,3 @@
"Can't execute the query because you have a conflicting read lock",
"Mixing of transactional and non-transactional tables is disabled",
"Option '%s' used twice in statement",
"The used table type doesn't support FULLTEXT indexes",
......@@ -235,4 +235,3 @@
"Can't execute the query because you have a conflicting read lock",
"Mixing of transactional and non-transactional tables is disabled",
"Option '%s' used twice in statement",
"The used table type doesn't support FULLTEXT indexes",
......@@ -228,4 +228,3 @@
"Can't execute the query because you have a conflicting read lock",
"Mixing of transactional and non-transactional tables is disabled",
"Option '%s' used twice in statement",
"The used table type doesn't support FULLTEXT indexes",
......@@ -227,4 +227,3 @@
"Kan inte utföra kommandot emedan du har ett READ lås",
"Blandning av transaktionella och icke-transaktionella tabeller är inaktiverat",
"Option '%s' användes två gånger",
"The used table type doesn't support FULLTEXT indexes",
......@@ -220,7 +220,7 @@
" %-.32s@%-.64s ަ",
"Incorrect table definition; All MERGE tables must be in the same database",
"Deadlock found when trying to get lock; Try restarting transaction",
"The used table type doesn't support FULLTEXT indexes",
" æ Цդ FULLTEXT Ӧ",
"Cannot add foreign key constraint",
"Cannot add a child row: a foreign key constraint fails",
"Cannot delete a parent row: a foreign key constraint fails",
......@@ -232,4 +232,3 @@
"Can't execute the query because you have a conflicting read lock",
"Mixing of transactional and non-transactional tables is disabled",
"Option '%s' used twice in statement",
" æ Цդ FULLTEXT Ӧ",
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