Commit graph

1018 commits

Author SHA1 Message Date
Sergey Petrunya
f54cb33e4b SHOW EXPLAIN: merge to 10.0-base. 2012-10-06 11:30:52 +04:00
Sergey Petrunya
30df032e28 SHOW EXPLAIN: merge with 5.5-main 2012-10-06 11:03:37 +04:00
Michael Widenius
1864d9596d Implementation of Multi-source replication (MDEV:253)
Documentation of the feature can be found at: http://kb.askmonty.org/en/multi-source-replication/
This code is based on code from Taobao, developed by Plinux

BUILD/SETUP.sh:
  Added -Wno-invalid-offsetof to get rid of warning of offsetof() on C++ class (safe in the contex we use it)
client/mysqltest.cc:
  Added support for error names starting with 'W'
  Added connection_name support to --sync_with_master
cmake/maintainer.cmake:
  Added -Wno-invalid-offsetof to get rid of warning of offsetof() on C++ class (safe in the contex we use it)
mysql-test/r/mysqltest.result:
  Updated results
mysql-test/r/parser.result:
  Updated results
mysql-test/suite/multi_source/my.cnf:
  Setup of multi-master tests
mysql-test/suite/multi_source/simple.result:
  Simple basic test of multi-source functionality
mysql-test/suite/multi_source/simple.test:
  Simple basic test of multi-source functionality
mysql-test/suite/multi_source/syntax.result:
  Test of multi-source syntax
mysql-test/suite/multi_source/syntax.test:
  Test of multi-source syntax
mysql-test/suite/rpl/r/rpl_rotate_logs.result:
  Updated results because of new error messages
mysql-test/t/parser.test:
  Updated test as master_pos_wait() now takes more arguments than before
sql/event_scheduler.cc:
  No reason to initialize slave_thread (it's guaranteed to be zero here)
sql/item_create.cc:
  Added connection_name argument to master_pos_wait()
  Simplified code
sql/item_func.cc:
  Added connection_name argument to master_pos_wait()
sql/item_func.h:
  Added connection_name argument to master_pos_wait()
sql/log.cc:
  Added tag "Master 'connection_name'" to slave errors that has a connection name.
sql/mysqld.cc:
  Added variable mysqld_server_initialized so that other functions can test if server is fully initialized.
  Free all slave data in one place (fewer ifdef's)
  Removed not needed call to close_active_mi()
  Initialize slaves() later in startup to ensure that everthing is really initialized when slaves start.
  Made status variable slave_running multi-source safe
sql/mysqld.h:
  Added mysqld_server_initialized
sql/rpl_mi.cc:
  Store connection name and cmp_connection_name (only used for show full slave status) in Master_info
  Added code for Master_info_index, which handles storage of multi-master information
  Don't write the empty "" connection_name to multi-master.info file. This is handled by the original code.
sql/rpl_mi.h:
  Added connection_name and Master_info_index
sql/rpl_rli.cc:
  Added connection_name to relay log files.
sql/rpl_rli.h:
  Fixed type of slave_skip_counter as we now access it directly in sys_vars.cc, so it must be uint
sql/share/errmsg-utf8.txt:
  Added new error messages needed for multi-source
  Added multi-source name to error ER_MASTER_INFO and WARN_NO_MASTER_INFO
sql/slave.cc:
  Moved things a bit around to make it easier to handle error conditions.
  Create a global master_info_index and add the "" connection to it
  Ensure that new Master_info doesn't fail.
  Don't call terminate_slave_threads(active_mi..) on end_slave() as this is now done automaticly when deleting master_info_index.
  Delete not needed function close_active_mi(). One can achive same thing by calling end_slave().
  Added support for SHOW FULL SLAVE STATUS (show status for all master connections with connection_name as first column)
sql/slave.h:
  Added new prototypes
sql/sql_base.cc:
  More DBUG_PRINT
sql/sql_class.cc:
  Reset thd->connection_name and thd-->default_master_connection
sql/sql_class.h:
  Added thd->connection_name and thd-->default_master_connection
  Added slave_skip_count to variables to make changing the @@sql_slave_skip_count variable thread safe
sql/sql_const.h:
  Added MAX_CONNECTION_NAME
sql/sql_lex.cc:
  Reset 'lex->verbose' (to simplify some sql_yacc.yy code)
sql/sql_lex.h:
  Added connection_name
sql/sql_parse.cc:
  Added support for connection_name to all SLAVE commands.
  - Instead of using active_mi, we now get the current Master_info from master_info_index.
  - Create new replication threads with CHANGE MASTER
  - Added support for show_all_master_info()
sql/sql_reload.cc:
  Made reset/full slave use master_info_index->get_master_info() instead of active_mi.
  If one uses 'RESET SLAVE "connection_name" all' the connection is removed from master_info_index.
sql/sql_repl.cc:
  sql_slave_skip_counter is moved to thd->variables to make it thread safe and fix some bugs with it
  Add connection name to relay log files.
  Added connection name to errors.
  Added some logging for multi-master if log_warnings > 1
  stop_slave():
  - Don't check if thd is set. It's guaranteed to always be set.
  change_master():
  - Check for duplicate connection names in change_master()
  - Check for wrong arguments first in file (to simplify error handling)
  - Register new connections in master_info_index
sql/sql_yacc.yy:
  Added optional connection_name to a all relevant master/slave commands
sql/strfunc.cc:
  my_global.h shoud always be included first.
sql/sys_vars.cc:
  Added variable default_master_connection
  Made variable sql_slave_skip_counter multi-source safe
sql/sys_vars.h:
  Added Sys_var_session_lexstring (needed for default_master_connection)
  Added Sys_var_multi_source_uint (needed for sql_slave_skip_counter).
2012-09-28 02:06:56 +03:00
Sergei Golubchik
f72a765997 5.2 merge.
two tests still fail:
  main.innodb_icp and main.range_vs_index_merge_innodb
  call records_in_range() with both range ends being open
  (which triggers an assert)
2012-08-22 16:45:25 +02:00
Sergei Golubchik
1fd8150a5b 5.1 merge
increase xtradb verson from 13.0 to 13.01
2012-08-22 16:13:54 +02:00
Sergei Golubchik
cefc30b166 merge with MySQL 5.1.65 2012-08-22 11:40:39 +02:00
Michael Widenius
60589aeee0 Next part of merge. See TODO for details 2012-08-14 17:23:34 +03:00
Sergei Golubchik
d11829654c merge with MySQL 5.5.27
manually checked every change, reverted incorrect or stupid changes.
2012-08-09 17:22:00 +02:00
Sergei Golubchik
704898bf32 undo the fix for MySQL Bug#12998841 2012-08-08 12:32:34 +02:00
Nirbhay Choubey
ffdc4bc8cd Merge of patch for Bug#13928675 from mysql-5.1. 2012-08-07 19:07:13 +05:30
Nirbhay Choubey
fb697972b3 Merge of patch for Bug#13928675 from mysql-5.1. 2012-08-07 19:07:13 +05:30
Nirbhay Choubey
5ad8292c63 Bug#13928675 MYSQL CLIENT COPYRIGHT NOTICE MUST
SHOW 2012 INSTEAD OF 2011

* Added a new macro to hold the current year :
  COPYRIGHT_NOTICE_CURRENT_YEAR
* Modified ORACLE_WELCOME_COPYRIGHT_NOTICE macro
  to take the initial year as parameter and pick
  current year from the above mentioned macro.
2012-08-07 18:58:19 +05:30
Nirbhay Choubey
d4e4538b2d Bug#13928675 MYSQL CLIENT COPYRIGHT NOTICE MUST
SHOW 2012 INSTEAD OF 2011

* Added a new macro to hold the current year :
  COPYRIGHT_NOTICE_CURRENT_YEAR
* Modified ORACLE_WELCOME_COPYRIGHT_NOTICE macro
  to take the initial year as parameter and pick
  current year from the above mentioned macro.
2012-08-07 18:58:19 +05:30
Sergey Petrunya
2b0f6ece7b Merge 5.5-main -> 5.5-show-explain 2012-07-25 20:53:49 +04:00
Elena Stepanova
403cac0fe7 Allow multiple error codes inside a variable in --error command 2012-07-16 06:14:53 +04:00
Elena Stepanova
49da8e7e21 Export sys_errno and errno to variables 2012-07-16 06:12:11 +04:00
Michael Widenius
703ee1ad1b Fixed MDEV-385: mysqltest running with continue-on-error crashes on a non-SQL command producing an error
client/mysqltest.cc:
  Added missing DBUG_VOID_RETURN
2012-07-10 09:02:12 +03:00
Michael Widenius
f27c26e95a Fixed compiler warnings
client/mysqltest.cc:
  Added cast
plugin/feedback/utils.cc:
  Added #ifdef
sql/sql_select.cc:
  Added cast
sql/sys_vars.h:
  Changed limits to int
support-files/compiler_warnings.supp:
  Added suppression
2012-07-06 19:04:52 +03:00
Georgi Kodinov
06f6e4fe95 Bug #12998841: libmysql divulges plaintext password upon request in 5.5
1. Clear text password client plugin disabled by default.
2. Added an environment variable LIBMYSQL_ENABLE_CLEARTEXT_PLUGIN, that
when set to something starting with '1', 'Y' or 'y' will enable the clear
text
plugin for all connections.
3. Added a new mysql_options() option : MYSQL_ENABLE_CLEARTEXT_PLUGIN
that takes an my_bool argument. When the value of the argument is non-zero
the clear text plugin is enabled for this connection only.
4. Added an enable-cleartext-plugin config file option that takes a numeric

argument. If the numeric value of the numeric argument is non-zero the
clear
text plugin is enabled for the connection
5. Added a boolean command line option "--enable_cleartext_plugin" to
mysql, mysqlslap and mysqladmin. When specified it will call mysql_options
with the effect of #3
6. Added a new CLEARTEXT option to the connect command in mysqltest.
When specified it will enable the cleartext plugin for usage.
7. Added test cases and updated existing ones that need the clear text
plugin.
2012-07-05 09:55:20 +03:00
Georgi Kodinov
31a9208bd0 Bug #12998841: libmysql divulges plaintext password upon request in 5.5
1. Clear text password client plugin disabled by default.
2. Added an environment variable LIBMYSQL_ENABLE_CLEARTEXT_PLUGIN, that
when set to something starting with '1', 'Y' or 'y' will enable the clear
text
plugin for all connections.
3. Added a new mysql_options() option : MYSQL_ENABLE_CLEARTEXT_PLUGIN
that takes an my_bool argument. When the value of the argument is non-zero
the clear text plugin is enabled for this connection only.
4. Added an enable-cleartext-plugin config file option that takes a numeric

argument. If the numeric value of the numeric argument is non-zero the
clear
text plugin is enabled for the connection
5. Added a boolean command line option "--enable_cleartext_plugin" to
mysql, mysqlslap and mysqladmin. When specified it will call mysql_options
with the effect of #3
6. Added a new CLEARTEXT option to the connect command in mysqltest.
When specified it will enable the cleartext plugin for usage.
7. Added test cases and updated existing ones that need the clear text
plugin.
2012-07-05 09:55:20 +03:00
Georgi Kodinov
e65c291807 merge bug#13708485 5.1->5.5 2012-06-29 16:54:55 +03:00
Georgi Kodinov
26f0c1fd4b merge bug#13708485 5.1->5.5 2012-06-29 16:54:55 +03:00
Jon Olav Hauglid
66ef5b0d48 Bug#14238406 NEW COMPILATION WARNINGS WITH GCC 4.7 (-WERROR=NARROWING)
Manual merge from mysql-5.1 to mysql-5.5
2012-06-29 13:36:01 +02:00
Jon Olav Hauglid
050048462c Bug#14238406 NEW COMPILATION WARNINGS WITH GCC 4.7 (-WERROR=NARROWING)
Manual merge from mysql-5.1 to mysql-5.5
2012-06-29 13:36:01 +02:00
Georgi Kodinov
107c894a54 Bug #13708485: malformed resultset packet crashes client
Several fixes :

* sql-common/client.c
Added a validity check of the fields metadata packet sent 
by the server.
Now libmysql will check if the length of the data sent by
the server matches what's expected by the protocol before
using the data.

* client/mysqltest.cc
Fixed the error handling code in mysqltest to avoid sending
new commands when the reading the result set failed (and 
there are unread data in the pipe).

* sql_common.h + libmysql/libmysql.c + sql-common/client.c
unpack_fields() now generates a proper error when it fails.
Added a new argument to this function to support the error 
generation.

* sql/protocol.cc
Added a debug trigger to cause the server to send a NULL
insted of the packet expected by the client for testing 
purposes.
2012-06-28 18:38:55 +03:00
Georgi Kodinov
428ff7f8a0 Bug #13708485: malformed resultset packet crashes client
Several fixes :

* sql-common/client.c
Added a validity check of the fields metadata packet sent 
by the server.
Now libmysql will check if the length of the data sent by
the server matches what's expected by the protocol before
using the data.

* client/mysqltest.cc
Fixed the error handling code in mysqltest to avoid sending
new commands when the reading the result set failed (and 
there are unread data in the pipe).

* sql_common.h + libmysql/libmysql.c + sql-common/client.c
unpack_fields() now generates a proper error when it fails.
Added a new argument to this function to support the error 
generation.

* sql/protocol.cc
Added a debug trigger to cause the server to send a NULL
insted of the packet expected by the client for testing 
purposes.
2012-06-28 18:38:55 +03:00
Sergey Petrunya
8c762965d3 Merge 5.3 -> 5.5 2012-06-20 15:01:28 +04:00
Sergey Petrunya
90fbd8b22b Merge 5.2->5.3 2012-06-18 22:38:11 +04:00
Sergey Petrunya
fb33db5608 MWL#182: Explain running statements
- Merge with current 5.5-main
2012-06-15 00:50:17 +04:00
Sergei Golubchik
41d860ef53 5.1 merge 2012-06-01 23:45:54 +02:00
Sergei Golubchik
34f2f8ea41 MDEV-256 lp:995501 - mysqltest attempts to parse Perl code inside a block
with false condition, gets confused and throws wrong errors
2012-06-01 17:53:59 +02:00
Sergey Petrunya
dfbd777fd8 MWL#182: SHOW EXPLAIN: Merge 5.3->5.5 2012-05-16 19:20:00 +04:00
unknown
e10fecc02f Merge 5.2->5.3 2012-05-11 11:40:23 +03:00
Sergei Golubchik
1185420da0 5.3 merge 2012-05-21 20:54:41 +02:00
Sergei Golubchik
c17bace4f0 Added --continue-on-error to mysqltest and mysql-test-run
This will contune the test case even if there was an error
and makes it easier to run a test that contains many sub tests against one engine.

(originally by Monty)
2012-05-15 19:35:57 +02:00
unknown
6fc863c749 Fixed typo 2012-05-10 09:00:21 +03:00
Vladislav Vaintroub
597e98bc83 MDEV-261 : mysqtest crashes when assigning variable to result of select , like
let x = `SELECT <something>`

The fix is to detect the condition "no active connection",  to report error and die.
Note, that the check for no active connection was already in place for ordinary commands, 
and was missing only for assign-variable command.
2012-05-08 00:26:41 +02:00
Sergei Golubchik
c39877071a overlay support for mysql-test-run and mysqltest
mysql-test-run auto-disables all optional plugins.


mysql-test/include/default_client.cnf:
  no @OPT.plugindir anymore
mysql-test/include/default_mysqld.cnf:
  don't disable plugins manually - mtr can do it better
mysql-test/suite/innodb/t/innodb_bug47167.test:
  mtr now uses suite-dir as an include path
mysql-test/suite/innodb/t/innodb_file_format.test:
  mtr now uses suite-dir as an include path
mysql-test/t/partition_binlog.test:
  this test uses partitions
storage/example/mysql-test/mtr/t/source.result:
  update results. as mysqltest includes the correct overlayed include
storage/innobase/handler/ha_innodb.cc:
  the assert is wrong
2012-02-23 07:50:11 +01:00
unknown
f6b68a1070 Merge MWL#192: Non-blocking client library, into MariaDB 5.5. 2012-02-21 22:15:44 +01:00
Sergei Golubchik
38e3ae155d mysql-5.5 merge 2012-01-16 20:16:35 +01:00
Sergei Golubchik
4f435bddfd 5.3 merge 2012-01-13 15:50:02 +01:00
Michael Widenius
a148cf7fb0 Fixed that --sorted-result in mysql-test-run also works for exec
mysql-test/r/information_schema_all_engines.result:
  Update result
mysql-test/t/information_schema_all_engines.test:
  Added --sorted-results as tables in information_schema are not sorted.
2012-01-09 13:49:47 +02:00
unknown
17940b652d MWL#192: non-blocking client API, after-review fixes.
Main change is that non-blocking operation is now an option that must be
explicitly enabled with mysql_option(mysql, MYSQL_OPT_NONBLOCK, ...)
before any non-blocing operation can be used.

Also the CLIENT_REMEMBER_OPTIONS flag is now always enabled and thus
effectively ignored (it was not really useful anyway, and this simplifies
things when non-blocking mysql_real_connect() fails).
2012-01-06 12:43:18 +01:00
Sergey Petrunya
b01348879d MWL#182: Explain running statements: merge with 5.3-main (needs fixing) 2012-01-03 23:16:16 +01:00
Sergei Golubchik
6cc9d0ffa0 move safemalloc out of dbug.
remeber a real backtrace for every allocation.
make safemalloc to tract C++ new/delete too.
collateral fixes to make the test suite pass.
2011-12-12 22:58:24 +01:00
Sergei Golubchik
745c53ec06 5.2->5.3 merge 2011-12-12 13:00:33 +01:00
Michael Widenius
6d4224a31c Merge with 5.2.
no_error handling for select (used by INSERT ... SELECT) still needs to be fixed, but I will do that in a separate commit
2011-12-11 11:34:44 +02:00
Sergei Golubchik
d5fd757a42 1. add --plugin-dir and --default-auth to mysqltest.
2. dialog plugin now always returns mysql->password if non-empty and the first question is of password type
3. split get_tty_password into get_tty_password_buff and strdup.
4. dialog plugin now uses get_tty_password by default
5. dialog.test
6. moved small tests of individual plugins into a dedicated suite
2011-12-02 16:26:43 +01:00
Vladislav Vaintroub
a01c955793 Fix main.merge testcase on Windows 2011-12-01 19:15:09 +01:00
Michael Widenius
efcfb195e3 Merge with 5.1 2011-11-30 22:57:18 +02:00
Michael Widenius
692fcba403 Fixed compiler warnings and other bugs found by buildbot.
client/mysqltest.cc:
  Free mutex after usage (fixes valgrind warnings in embedded server)
mysql-test/include/gis_keys.inc:
  Fixed failure in innodb.gis_test
mysql-test/r/gis.result:
  Updated result
mysql-test/suite/innodb/r/innodb_gis.result:
  Updated results
mysql-test/suite/innodb/t/innodb_bug38231.test:
  Added handling of timeouts (happend on some servers in buildbot)
mysql-test/suite/innodb_plugin/r/innodb_gis.result:
  Updated results
mysql-test/suite/innodb_plugin/t/innodb.test:
  Use error names instead of numbers
mysql-test/suite/innodb_plugin/t/innodb_misc1.test:
  This test requires utf8
mysql-test/suite/innodb_plugin/t/innodb_mysql.test:
  This test requires Xtradb
sql/sql_base.cc:
  Don't print table names for placeholders.
sql/sql_show.cc:
  Temporary fix:
  Save and restore db and table_name in mysqld_show_create (to get rid of valgrind warning)
  A better solution that needs to be investgated is to not change these fields in mysql_derived_prepare()
sql/sql_view.cc:
  Fixed valgrind warning
storage/xtradb/handler/ha_innodb.cc:
  Don't access THD directly
2011-11-30 18:44:51 +02:00
Vladislav Vaintroub
389acf0a30 Fix testcases:
1. main.merge fails with errno 13 in copy_file().

The reason for the error is that copy_file tries to create a file with the same name as recently deleted one,
and there is still an open handle for the deleted file.
To fix, use my_delete_allow_opened() for MTR's delete_file. On Windows,  this renames file to unique name
prior to deletion, and prevents EACCES errors for files opened with FILE_SHARE_DELETE.

2. innodb_bug59641 
generates warnings, after server was killed and restarted in the test case.
The warnings are about test_suppression table (needs to be repaired, as it that was written just prior to the crash)
Fixed by using FLUSH TABLES after populating warning suppression table.
2011-11-29 08:50:54 +01:00
Michael Widenius
6920457142 Merge with MariaDB 5.1 2011-11-24 18:48:58 +02:00
Michael Widenius
7b368e3810 Merge with MySQL 5.1.60 2011-11-23 19:32:14 +02:00
Sergei Golubchik
7189f09aa6 compiler warnings/errors 2011-11-23 18:25:07 +01:00
Sergei Golubchik
d2755a2c9c 5.3->5.5 merge 2011-11-22 18:04:38 +01:00
Michael Widenius
a8d03ab235 Initail merge with MySQL 5.1 (XtraDB still needs to be merged)
Fixed up copyright messages.
2011-11-21 19:13:14 +02:00
Bjorn Munch
020600a4ed Bug #13055685 NO WAY TO REPLACE NON-DETERMINISTIC FRAGMENTS IN OUTPUT OF MTR'S ECHO
Don't do this for echo, instead:
    1) Enable replacements also for assignment from backquoted SQL
    2) Allow replace_regex to take a variable for the *entire* argument list
  
    With this, the test can be amended, but only in its version in trunk
2011-11-08 15:55:25 +01:00
Bjorn Munch
e3ca4792b7 Bug #13055685 NO WAY TO REPLACE NON-DETERMINISTIC FRAGMENTS IN OUTPUT OF MTR'S ECHO
Don't do this for echo, instead:
    1) Enable replacements also for assignment from backquoted SQL
    2) Allow replace_regex to take a variable for the *entire* argument list
  
    With this, the test can be amended, but only in its version in trunk
2011-11-08 15:55:25 +01:00
Sergei Golubchik
0e007344ea mysql-5.5.18 merge 2011-11-03 19:17:05 +01:00
Bjorn Munch
40f42cac72 Bug #13096353 62712: RPM-BASED INSTALL OF THE TEST SUITE IS USELESS FOR NON-ROOT USERS
Simplified fix avoiding changes to mysys:
  Use the MY_HOLD_ORIGINAL_MODES flag when calling my_copy(),
    this also stops it from attempting to chown() the file.
  Yes this behavior is a bit confusing....
  The only case this might change the behavior is if the destination file
    exists, but since we also use MY_DONT_OVERWRITE_FILE, it would fail
    in those cases anyway.
2011-11-03 15:57:18 +01:00
Bjorn Munch
54951efcc5 Bug #13096353 62712: RPM-BASED INSTALL OF THE TEST SUITE IS USELESS FOR NON-ROOT USERS
Simplified fix avoiding changes to mysys:
  Use the MY_HOLD_ORIGINAL_MODES flag when calling my_copy(),
    this also stops it from attempting to chown() the file.
  Yes this behavior is a bit confusing....
  The only case this might change the behavior is if the destination file
    exists, but since we also use MY_DONT_OVERWRITE_FILE, it would fail
    in those cases anyway.
2011-11-03 15:57:18 +01:00
Sergey Petrunya
286a751490 MWL#182: Explain running statements
- Merge with 5.3-main
2011-10-27 21:41:19 +04:00
unknown
28e2777991 Fix gcc 4.6 warnings about assigned but not used variables.
Fixed my_gethwaddr.c to allow compilation on Mac OS X.
2011-10-27 15:22:52 +03:00
Sergei Golubchik
42b8235788 cleanups 2011-10-19 22:50:45 +02:00
Sergei Golubchik
76f0b94bb0 merge with 5.3
sql/sql_insert.cc:
  CREATE ... IF NOT EXISTS may do nothing, but
  it is still not a failure. don't forget to my_ok it.
  ******
  CREATE ... IF NOT EXISTS may do nothing, but
  it is still not a failure. don't forget to my_ok it.
sql/sql_table.cc:
  small cleanup
  ******
  small cleanup
2011-10-19 21:45:18 +02:00
unknown
434dd8635e Bug #11754855 46528: NEED A WAY TO PASS A VARIABLE TO MTR COMMANDS
modified function do_get_error in mysqltest.cc to handle multiple variable passed
added test case to mysqltest.test to verify handling to multiple errors passed
2011-10-19 12:53:52 +05:30
sayantan.dutta@oracle.com
3068eee354 Bug #11754855 46528: NEED A WAY TO PASS A VARIABLE TO MTR COMMANDS
modified function do_get_error in mysqltest.cc to handle multiple variable passed
added test case to mysqltest.test to verify handling to multiple errors passed
2011-10-19 12:53:52 +05:30
unknown
255c04aed8 Compiler warning about assigned but not used variables fixed. 2011-10-18 13:44:12 +03:00
Bjorn Munch
37de3c2c0b 12956584 followup fix for mysqltest
run_query_stmt() might use disable_xxx vars after calling handle_no_error
  But handle_no_error() hes reverted any ONCE settings
  Fix is to take revert_properties() out of handle_no_error()
2011-09-30 15:25:19 +02:00
Bjorn Munch
0bc430286e 12956584 followup fix for mysqltest
run_query_stmt() might use disable_xxx vars after calling handle_no_error
  But handle_no_error() hes reverted any ONCE settings
  Fix is to take revert_properties() out of handle_no_error()
2011-09-30 15:25:19 +02:00
Sergey Petrunya
203bbfe569 MWL#182: Explain running statements
- Implement new approach to testing (the DBUG_EXECUTE_IF variant)
- add an 'evalp' mysqltest command that is like 'eval' except that
  it prints the original query.
- Fix select_describe() not to change join_tab[i]->type
- More tests
2011-09-24 21:56:42 +04:00
unknown
a5b881594d MWL#192: Non-blocking client API for libmysqlclient.
All client functions that can block on I/O have alternate _start() and
_cont() versions that do not block but return control back to the
application, which can then issue I/O wait in its own fashion and later
call back into the library to continue the operation.

Works behind the scenes by spawning a co-routine/fiber to run the
blocking operation and suspend it while waiting for I/O. This
co-routine/fiber use is invisible to applications.

For i368/x86_64 on GCC, uses very fast assembler co-routine support. On
Windows uses native Win32 Fibers. Falls back to POSIX ucontext on other
platforms. Assembler routines for more platforms are relatively easy to
add by extending mysys/my_context.c, eg. similar to the Lua lcoco
library.

For testing, mysqltest and mysql_client_test are extended with the
option --non-blocking-api. This causes the programs to use the
non-blocking API for database access. mysql-test-run.pl has a similar
option --non-blocking-api that uses this, as well as additional
testcases.

An example program tests/async_queries.c is included that uses the new
non-blocking API with libevent to show how, in a single-threaded
program, to issue many queries in parallel against a database.


client/async_example.c:
  Fix const warning
  ******
  Fix bug with wrong timeout value for poll().
include/Makefile.am:
  Fix missing include for `make dist`
include/mysql.h:
  Add prototypes for all non-blocking API calls.
include/mysql.h.pp:
  Add prototypes for all non-blocking API calls.
mysys/my_context.c:
  Fix type warning for makecontext() function pointer argument.
sql-common/mysql_async.c:
  Fix crashes in the non-blocking API for functions that can take MYSQL argument
  that is NULL.
tests/Makefile.am:
  Add header file to `make dist`
tests/mysql_client_test.c:
  Replace blocking calls with wrappers around the non-blocking calls, used in
  mysql_client_test to test the new non-blocking API.
tests/nonblock-wrappers.h:
  Replace blocking calls with wrappers around the non-blocking calls, used in
  mysql_client_test to test the new non-blocking API.
2011-09-20 12:49:25 +02:00
Bjorn Munch
04c402c452 upmerge 12793118,12912120 2011-09-15 13:09:24 +02:00
Bjorn Munch
e08fa4affc upmerge 12793118,12912120 2011-09-15 13:09:24 +02:00
Bjorn Munch
32e8085de9 Bug #12956584 - MYSQLTEST: --ENABLE_X OR --DISABLE_X APPLYING ONLY TO NEXT COMMAND/STMT
Followup fixes for --ps-protocol:
  1) Incorrectly set ps_protocol variable instead of ps_protocol_enabled
  2) disable_result_log was tested after calling handle_no_error()
        which would revert a temporary setting.
2011-09-15 10:53:19 +02:00
Bjorn Munch
50f05fab28 Bug #12956584 - MYSQLTEST: --ENABLE_X OR --DISABLE_X APPLYING ONLY TO NEXT COMMAND/STMT
Followup fixes for --ps-protocol:
  1) Incorrectly set ps_protocol variable instead of ps_protocol_enabled
  2) disable_result_log was tested after calling handle_no_error()
        which would revert a temporary setting.
2011-09-15 10:53:19 +02:00
Bjorn Munch
52960624d3 Bug #12793118 MYSQLTEST: --ERROR AND --DISABLE_ABORT_ON_ERROR DO NOT WORK FOR SQL IN COMMANDS
Call handle_error() instead of die() when evaluating these
  Must remember "current command" with link to errors to ignore
  Added test cases to mysqltest.test
2011-09-14 15:19:24 +02:00
Bjorn Munch
d75f2a4a6b Bug #12793118 MYSQLTEST: --ERROR AND --DISABLE_ABORT_ON_ERROR DO NOT WORK FOR SQL IN COMMANDS
Call handle_error() instead of die() when evaluating these
  Must remember "current command" with link to errors to ignore
  Added test cases to mysqltest.test
2011-09-14 15:19:24 +02:00
Bjorn Munch
a238e6ada2 Bug #12956584 MYSQLTEST: --ENABLE_X OR --DISABLE_X APPLYING ONLY TO NEXT COMMAND/STMT
Added a keyword ONCE to add to those commands
  Some internal tables to keep track of which properties are
    temporarily overriden
  Added tests in mysqltest.test
  Updates to other tests will be done later
2011-09-14 15:15:36 +02:00
Bjorn Munch
79b7d05c4c Bug #12956584 MYSQLTEST: --ENABLE_X OR --DISABLE_X APPLYING ONLY TO NEXT COMMAND/STMT
Added a keyword ONCE to add to those commands
  Some internal tables to keep track of which properties are
    temporarily overriden
  Added tests in mysqltest.test
  Updates to other tests will be done later
2011-09-14 15:15:36 +02:00
Bjorn Munch
6e60a07157 Bug #12793170 MYSQLTEST: PROVIDE ACCESS TO ERROR NAMES THROUGH NUMERIC
CODES AND VICE VERSA
  Followup: Some statement may give errors not in the list,
  map these to "<Unknown>" rather than failing.
2011-08-22 14:42:12 +02:00
Bjorn Munch
7dc28845ca Bug #12793170 MYSQLTEST: PROVIDE ACCESS TO ERROR NAMES THROUGH NUMERIC
CODES AND VICE VERSA
  Followup: Some statement may give errors not in the list,
  map these to "<Unknown>" rather than failing.
2011-08-22 14:42:12 +02:00
Bjorn Munch
4cb3072356 Bug #12793170 MYSQLTEST: PROVIDE ACCESS TO ERROR NAMES THROUGH NUMERIC CODES AND VICE VERSA
Added a second internal variable $mysql_errname
  This is set the same way as $mysql_errno
  Can be used like "if ($mysql_errname == ER_NO_SUCH_TABLE)...."
2011-08-22 13:58:49 +02:00
Bjorn Munch
4ad7b28cd7 Bug #12793170 MYSQLTEST: PROVIDE ACCESS TO ERROR NAMES THROUGH NUMERIC CODES AND VICE VERSA
Added a second internal variable $mysql_errname
  This is set the same way as $mysql_errno
  Can be used like "if ($mysql_errname == ER_NO_SUCH_TABLE)...."
2011-08-22 13:58:49 +02:00
Alexander Nozdrin
9312697530 Manual merge from mysql-5.1. 2011-07-22 11:50:44 +04:00
Alexander Nozdrin
f636987d3b Manual merge from mysql-5.1. 2011-07-22 11:50:44 +04:00
Alexander Nozdrin
3a786df2d5 Manual merge from mysql-5.0. 2011-07-22 11:46:45 +04:00
Alexander Nozdrin
c4dad60a73 Manual merge from mysql-5.0. 2011-07-22 11:46:45 +04:00
Sergei Golubchik
49501b4ccb fix memory leaks and other problems found by safemalloc
client/mysql_upgrade.c:
  missing DBUG_RETURN
client/mysqladmin.cc:
  client plugin memory wasn't freed
client/mysqlcheck.c:
  client plugin memory, defaults, a result set, a command-line option value were not freed.
  missing DBUG_RETURN.
client/mysqldump.c:
  client plugin memory wasn't freed
client/mysqlslap.c:
  client plugin memory wasn't freed
client/mysqltest.cc:
  hopeless. cannot be fixed.
mysql-test/valgrind.supp:
  Bug#56666 is now fixed.
mysys/array.c:
  really, don't allocate if the caller didn't ask to.
mysys/my_init.c:
  safemalloc checks must be done at the very end
mysys/my_thr_init.c:
  not needed anymore
sql-common/client.c:
  memory leak
sql/log.cc:
  log_file was not closed, memory leak.
sql/mysqld.cc:
  fix bug#56666 (causing many P_S related memory leaks).
  close_active_mi() not called for --bootstrap, memory leak.
sql/sql_lex.cc:
  redo Lex->mi handling
sql/sql_lex.h:
  redo Lex->mi handling
sql/sql_plugin.cc:
  plugins having PLUGIN_VAR_MEMALLOC string variables have this variables allocated in every THD.
  The memory was freed in ~THD but only if plugin was still active. If plugin was unloaded the
  variable was not found and the memory was lost. By loading and unloading plugins an arbitrary
  amount of memory can be lost.
sql/sql_repl.cc:
  redo Lex->mi handling
sql/sql_yacc.yy:
  completely wrong handling of Lex->mi - run-time memory leak, by repeating the statement
  arbitrary amount of memory can be lost.
  
  Lex->mi.repl_ignore_server_ids_opt was allocated when parsing CHANGE MASTER,
  and freed after executing the statement. if parser failed on syntax (or another)
  error the statement was never executed. Lex->mi was simply bzero-ed for the next
  CHANGE MASTER  statement.
sql/table.cc:
  didn't compile
storage/perfschema/pfs_lock.h:
  Bug#56666 is fixed
2011-07-10 20:09:17 +02:00
Sergei Golubchik
172f5e28ba add safemalloc back
... but differently

client/mysqltest.cc:
  my_safe_print_str() don't append \n anymore
dbug/dbug.c:
  restore safemalloc as a part of dbug suite
dbug/user.r:
  restore 'S' flag documentation
include/my_dbug.h:
  restore safemalloc as a part of dbug suite
include/my_sys.h:
  move valgrind defines to a dedicated header
mysys/my_malloc.c:
  use new safemalloc
mysys/stacktrace.c:
  don't append \n. let the calller do it, if needed
sql/mysqld.cc:
  my_safe_print_str() don't append \n anymore
2011-07-10 19:55:54 +02:00
Kent Boortz
027b5f1ed4 Updated/added copyright headers 2011-07-03 17:47:37 +02:00
Kent Boortz
b6e6097c95 Updated/added copyright headers 2011-07-03 17:47:37 +02:00
Sergei Golubchik
9809f05199 5.5-merge 2011-07-02 22:08:51 +02:00
Kent Boortz
68f00a5686 Updated/added copyright headers 2011-06-30 17:37:13 +02:00
Kent Boortz
1400d7a2cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
Georgi Kodinov
7ae92503c7 Fixed cast warnings in introducing the pluggable authentication client
options.
2011-06-06 13:27:05 +03:00
Michael Widenius
f197991f41 Merge with 5.1-microseconds
A lot of small fixes and new test cases.

client/mysqlbinlog.cc:
  Cast removed
client/mysqltest.cc:
  Added missing DBUG_RETURN
include/my_pthread.h:
  set_timespec_time_nsec() now only takes one argument
mysql-test/t/date_formats.test:
  Remove --disable_ps_protocl as now also ps supports microseconds
mysys/my_uuid.c:
  Changed to use my_interval_timer() instead of my_getsystime()
mysys/waiting_threads.c:
  Changed to use my_hrtime()
sql/field.h:
  Added bool special_const_compare() for fields that may convert values before compare (like year)
sql/field_conv.cc:
  Added test to get optimal copying of identical temporal values.
sql/item.cc:
  Return that item_int is equal if it's positive, even if unsigned flag is different.
  Fixed Item_cache_str::save_in_field() to have identical null check as other similar functions
  Added proper NULL check to Item_cache_int::save_in_field()
sql/item_cmpfunc.cc:
  Don't call convert_constant_item() if there is nothing that is worth converting.
  Simplified test when years should be converted
sql/item_sum.cc:
  Mark cache values in Item_sum_hybrid as not constants to ensure they are not replaced by other cache values in compare_datetime()
sql/item_timefunc.cc:
  Changed sec_to_time() to take a my_decimal argument to ensure we don't loose any sub seconds.
  Added Item_temporal_func::get_time() (This simplifies some things)
sql/mysql_priv.h:
  Added Lazy_string_decimal()
sql/mysqld.cc:
  Added my_decimal constants max_seconds_for_time_type, time_second_part_factor
sql/table.cc:
  Changed expr_arena to be of type CONVENTIONAL_EXECUTION to ensure that we don't loose any items that are created by fix_fields()
sql/tztime.cc:
  TIME_to_gmt_sec() now sets *in_dst_time_gap in case of errors
  This is needed to be able to detect if timestamp is 0
storage/maria/lockman.c:
  Changed from my_getsystime() to set_timespec_time_nsec()
storage/maria/ma_loghandler.c:
  Changed from my_getsystime() to my_hrtime()
storage/maria/ma_recovery.c:
  Changed from my_getsystime() to mmicrosecond_interval_timer()
storage/maria/unittest/trnman-t.c:
  Changed from my_getsystime() to mmicrosecond_interval_timer()
storage/xtradb/handler/ha_innodb.cc:
  Added support for new time,datetime and timestamp
unittest/mysys/thr_template.c:
  my_getsystime() -> my_interval_timer()
unittest/mysys/waiting_threads-t.c:
  my_getsystime() -> my_interval_timer()
2011-05-28 05:11:32 +03:00
Sergei Golubchik
03b33425e5 many changes to my_getsystime.c:
* my_getsystime() is only an interval timer. Its value can beused for calculating
  time intervals.
* renamed my_getsystime() to my_interval_timer(), to make the semantics
  clearer and let the compiler catch wrong usages of my_getsystime()
  (also future ones, that may come in merges).
* increased its granularity from 100ns to 1ns, old value was for UUID,
  but as UUID can no longer use it directly there is no need to downgrade
  the OS provided value
* fixed the UUID code to anchor the my_interval_timer() on the epoch, as
  required by the UUID standard. That is, this was only needed by UUID,
  and now I've moved it to UUID code from my_getsystime().
* fixed other wrong usages of my_getsystime() - e.g. in calculating
  times for pthread_cond_timedwait. It was buggy and could've caused
  long waits if OS clock would be changed.
2011-05-19 19:05:35 +02:00
unknown
9036233cd0 automatic merge 2011-05-18 23:03:46 +03:00
unknown
1177bea2f1 Rewritten patch of percona - switching query cache on and off, removing comments.
client/mysqltest.cc:
  Column names.
mysql-test/r/grant_cache_no_prot.result:
  fix of text.
mysql-test/r/grant_cache_ps_prot.result:
  Fix of test.
mysql-test/r/query_cache.result:
  Switching on and off query cache.
mysql-test/t/query_cache.test:
  Switching on and off query cache.
mysys/charset.c:
  Fix of parser.
sql/handler.cc:
  thd added to parameters.
sql/log_event.cc:
  thd added to parameters.
sql/log_event_old.cc:
  thd added to parameters.
sql/mysql_priv.h:
  Fixed functions definitions.
sql/mysqld.cc:
  Comments stripping.
sql/set_var.cc:
  Switching on and off query cache.
sql/set_var.h:
  Switching on and off query cache.
sql/share/errmsg.txt:
  New errors.
sql/sql_cache.cc:
  Switching query cache on and off, removing comments.
sql/sql_cache.h:
  thd added to parameters.
sql/sql_class.h:
  Comments stripping.
sql/sql_db.cc:
  thd added to parameters.
sql/sql_lex.cc:
  lex fixed.
sql/sql_parse.cc:
  thd added to parameters.
2011-05-18 16:27:19 +03:00
unknown
fd855154af automerge 2011-05-18 15:19:18 +02:00
unknown
4ea53bc29b automerge 2011-05-18 15:17:26 +02:00
unknown
e55fb3bbe8 Fix mysqltest printing of include stack.
The printing of include stack in the error case in mysqltest omitted the
bottom of the stack (the line number in original test case file), and instead
printed the top of the stack twice. Fix to print each element on the stack
once and only once.
2011-05-18 15:15:36 +02:00
Georgi Kodinov
8d7361f803 Fixed cast warnings in introducing the pluggable authentication client
options.
2011-06-06 13:27:05 +03:00
Michael Widenius
f09f1c7c7d Merge with dynamic column code 2011-05-12 14:30:34 +03:00
Michael Widenius
4c81cef75d Fixed bug when accessing wrong decimal value in dynamic string (Fixed lp:781233)
Store decimal 0.0 in zero bytes in dynamic strings.
mysqltest: Don't ignore error from mysql_stmt_fetch;  This could cause rows to be missing from log when running with --ps-protocol
Fixed wrong result length for CAST(... as TIME)






client/mysqltest.cc:
  Don't ignore error from mysql_stmt_fetch;  This could cause rows to be missing from log when running with --ps-protocol
libmysql/libmysql.c:
  The max length for a TIME column is 17, not 15.
mysql-test/r/dyncol.result:
  More tests
mysql-test/t/dyncol.test:
  More tests
mysys/ma_dyncol.c:
  Check content of decimal value on read and store to not get assert in decimal_bin_size().
  Store decimal 0.0 in zero bytes in dynamic strings. This also solves a problem where decimal 0 had different internal representations.
sql-common/my_time.c:
  Fixed DBUG_PRINT
sql/item_timefunc.h:
  Fixed wrong result length for CAST(... as TIME). This was the cause of failures in buildbot when doing cast(... as time);
sql/protocol.cc:
  More DBUG_PRINT
2011-05-12 02:19:28 +03:00
Michael Widenius
4cb68c0e89 mysqltest: Write command to be executed to the log BEFORE executing the command.
Fixed race condition in event that could cause hang when stopping event scheduler with SET GLOBAL event_scheduler=OFF 

client/mysqltest.cc:
  Write command to be executed to the log BEFORE executing the command.
  This makes it easier to debug crashes as the log will contain the fatal command.
mysql-test/r/mysqltest.result:
  Updated results (we now get more things logged)
sql/event_queue.cc:
  Fixed race condition in event that could cause hang when stopping event scheduler with SET GLOBAL event_scheduler=OFF.
  The reason was that a kill signal could be sent between last check of thd->killed and before thd->enter_cond() in which case the signal
  would be missed and we would be stuck in Event_scheduler::stop() forever.
2011-05-09 14:38:49 +03:00
Luis Soares
a85150c364 BUG#11762616: BUG#55229: 'POSTION'
Manual merge from mysql-5.1 into mysql-5.5.

Conflicts
=========
Text conflict in mysql-test/suite/rpl/t/rpl_row_until.test
Text conflict in sql/handler.h
Text conflict in storage/archive/ha_archive.cc
2011-05-06 00:50:31 +01:00
Luis Soares
6f3e97a6cb BUG#11762616: BUG#55229: 'POSTION'
Manual merge from mysql-5.1 into mysql-5.5.

Conflicts
=========
Text conflict in mysql-test/suite/rpl/t/rpl_row_until.test
Text conflict in sql/handler.h
Text conflict in storage/archive/ha_archive.cc
2011-05-06 00:50:31 +01:00
Luis Soares
8a08fd4341 BUG#11762616: BUG#55229: 'POSTION'
Fix for all "postion" in Oracle files (s/postion/position). 
Updated the copyright notices where needed.
2011-05-06 00:46:53 +01:00
Luis Soares
ed6aae83c3 BUG#11762616: BUG#55229: 'POSTION'
Fix for all "postion" in Oracle files (s/postion/position). 
Updated the copyright notices where needed.
2011-05-06 00:46:53 +01:00
Michael Widenius
1be5462d59 Merge with MariaDB 5.1 2011-05-03 19:10:10 +03:00
Michael Widenius
e415ba0fb2 Merge with MySQL 5.1.57/58
Moved some BSD string functions from Unireg
2011-05-02 20:58:45 +03:00
Sergei Golubchik
0accbd0364 lots of post-merge changes 2011-04-25 17:22:25 +02:00
Marko Mäkelä
0ff2a182b6 Bug #11766513 - 59641: Prepared XA transaction in system after hard crash
causes future shutdown hang

InnoDB would hang on shutdown if any XA transactions exist in the
system in the PREPARED state. This has been masked by the fact that
MySQL would roll back any PREPARED transaction on shutdown, in the
spirit of Bug #12161 Xa recovery and client disconnection.

[mysql-test-run] do_shutdown_server: Interpret --shutdown_server 0 as
a request to kill the server immediately without initiating a
shutdown procedure.

xid_cache_insert(): Initialize XID_STATE::rm_error in order to avoid a
bogus error message on XA ROLLBACK of a recovered PREPARED transaction.

innobase_commit_by_xid(), innobase_rollback_by_xid(): Free the InnoDB
transaction object after rolling back a PREPARED transaction.

trx_get_trx_by_xid(): Only consider transactions whose
trx->is_prepared flag is set. The MySQL layer seems to prevent
attempts to roll back connected transactions that are in the PREPARED
state from another connection, but it is better to play it safe. The
is_prepared flag was introduced in the InnoDB Plugin.

trx_n_prepared: A new counter, counting the number of InnoDB
transactions in the PREPARED state.

logs_empty_and_mark_files_at_shutdown(): On shutdown, allow
trx_n_prepared transactions to exist in the system.

trx_undo_free_prepared(), trx_free_prepared(): New functions, to free
the memory objects of PREPARED transactions on shutdown. This is not
needed in the built-in InnoDB, because it would collect all allocated
memory on shutdown. The InnoDB Plugin needs this because of
innodb_use_sys_malloc.

trx_sys_close(): Invoke trx_free_prepared() on all remaining
transactions.
2011-04-07 21:12:54 +03:00
Marko Mäkelä
1a0dde9206 Bug #11766513 - 59641: Prepared XA transaction in system after hard crash
causes future shutdown hang

InnoDB would hang on shutdown if any XA transactions exist in the
system in the PREPARED state. This has been masked by the fact that
MySQL would roll back any PREPARED transaction on shutdown, in the
spirit of Bug #12161 Xa recovery and client disconnection.

[mysql-test-run] do_shutdown_server: Interpret --shutdown_server 0 as
a request to kill the server immediately without initiating a
shutdown procedure.

xid_cache_insert(): Initialize XID_STATE::rm_error in order to avoid a
bogus error message on XA ROLLBACK of a recovered PREPARED transaction.

innobase_commit_by_xid(), innobase_rollback_by_xid(): Free the InnoDB
transaction object after rolling back a PREPARED transaction.

trx_get_trx_by_xid(): Only consider transactions whose
trx->is_prepared flag is set. The MySQL layer seems to prevent
attempts to roll back connected transactions that are in the PREPARED
state from another connection, but it is better to play it safe. The
is_prepared flag was introduced in the InnoDB Plugin.

trx_n_prepared: A new counter, counting the number of InnoDB
transactions in the PREPARED state.

logs_empty_and_mark_files_at_shutdown(): On shutdown, allow
trx_n_prepared transactions to exist in the system.

trx_undo_free_prepared(), trx_free_prepared(): New functions, to free
the memory objects of PREPARED transactions on shutdown. This is not
needed in the built-in InnoDB, because it would collect all allocated
memory on shutdown. The InnoDB Plugin needs this because of
innodb_use_sys_malloc.

trx_sys_close(): Invoke trx_free_prepared() on all remaining
transactions.
2011-04-07 21:12:54 +03:00
Marko Mäkelä
460a7197bb Merge mysql-5.1-innodb to mysql-5.5-innodb. 2011-04-11 17:03:32 +03:00
Marko Mäkelä
cdba023d9a Merge mysql-5.1-innodb to mysql-5.5-innodb. 2011-04-11 17:03:32 +03:00
Bjorn Munch
139844ccef merge from 5.5 main 2011-03-22 15:40:25 +01:00
Bjorn Munch
0563ff5ec5 merge from 5.5 main 2011-03-22 15:40:25 +01:00
Michael Widenius
0fae0335d4 Ensure that all clients reads the appropriate 'client', client-mariadb and 'mariadb' sections from my.cnf
The mysqld server and all clients now reads the new client-server section
Fixed that mysqldumpslow supports new slow log formats and new mysqld --slow- options


client/mysql.cc:
  Read also client-server and client-mariadb sections.
client/mysql_upgrade.c:
  Read also client-server and client-mariadb sections.
client/mysqladmin.cc:
  Read also client-server and client-mariadb sections.
client/mysqlbinlog.cc:
  Read also client-server and client-mariadb sections.
client/mysqlcheck.c:
  Read also client-server and client-mariadb sections.
client/mysqldump.c:
  Read also client-server and client-mariadb sections.
client/mysqlimport.c:
  Read also client-server and client-mariadb sections.
client/mysqlshow.c:
  Read also client-server and client-mariadb sections.
client/mysqltest.cc:
  Read also client-server and client-mariadb sections.
extra/my_print_defaults.c:
  Updated help text
scripts/mysql_fix_privilege_tables.sh:
  Read also sections client client-server client-mariadb
scripts/mysql_install_db.pl.in:
  Also allow --data=* option
  Read also groups mariadb, server and client-server.
scripts/mysql_install_db.sh:
  Also allow --data=* option
  Read also groups mariadb, server and client-server.
  Added --lose-skip-pbxt to bootstrap
scripts/mysql_secure_installation.sh:
  Read also groups client-server and client-mariadb
scripts/mysqld_multi.sh:
  Read also group mariadb
scripts/mysqld_safe.sh:
  Read also groups mariadb server and client-server
scripts/mysqldumpslow.sh:
  Fixed to support new slow log formats
  Added sorting on -ae (aggregated number of retreived rows) and e (retrieved rows)
  Read also group 'mariadb'
  If there is many instances of same option, use last one.
  Get slow log file from options log-slow-queries=filename or query-log-file=filename
  Added support for future --log-basename option
sql-common/client.c:
  Read also groups 'client-server' and 'client-mariadb'
tests/mysql_client_test.c:
  Read also groups 'client-server' and 'client-mariadb'
tests/thread_test.c:
  Read also groups 'client-server' and 'client-mariadb'
2011-03-18 17:03:43 +02:00
Bjorn Munch
45127bba92 upmerge 11885854 2011-03-18 15:42:58 +01:00
Bjorn Munch
dd8574288c upmerge 11885854 2011-03-18 15:42:58 +01:00
Bjorn Munch
c85237485a Bug #11885854 MYSQLTEST: PS-PROTOCOL IMPLIED BY CURSOR-PROTOCOL LOST AFTER ENABLE_PS_PROTOCOL
The condition cursor-protocol => ps-protocol was done at "current setting" level"
Moved it to "set by command line" level
2011-03-18 12:13:54 +01:00
Bjorn Munch
f4ac6eb117 Bug #11885854 MYSQLTEST: PS-PROTOCOL IMPLIED BY CURSOR-PROTOCOL LOST AFTER ENABLE_PS_PROTOCOL
The condition cursor-protocol => ps-protocol was done at "current setting" level"
Moved it to "set by command line" level
2011-03-18 12:13:54 +01:00
Michael Widenius
3358cdd504 Merge with 5.1 to get in changes from MySQL 5.1.55 2011-02-28 19:39:30 +02:00
Michael Widenius
e6c45f5e1f - Reduced memory requirements for mysqltest to 1/4.th This also gave a speedup for 5x for some tests.
- Reduced memory usage from safe_mutex.
- Fixed problem with failing tests that could not restart mysqld becasue the port was reserved
- More DBUG information
- Fixed bug where bitmap_set_prefix() wrote over buffer area.
- Initialize n_pages_flushed in xtradb which was used uninitialized.

client/mysqltest.cc:
  Reduced memory usage (400K -> 80 for simple test;  400M -> 70M for some other tests)
  - Smaller dynamic arrays at start
  - Made 'st_connection' significantly smaller by allocation 'mysql' on demand in mysql_init() and storing require_file in a mem_root.
  - Fixed that when one does --debug we get information from safemalloc in the trace
  (Most of changes are changing &connect->mysql to connect->mysql
libmysql/libmysql.c:
  Don't call mysql_thread_end() if my_init() was called outside of mysql_server_init()
  This is needed to get information from my_end() into the DBUG log
mysql-test/README:
  Fixed wrong comment
mysql-test/mysql-test-run.pl:
  Reserv 20 ports / mysql-test-run thread.
  (Needed as some tests uses 9 mysqld servers)
mysys/hash.c:
  More DBUG information
mysys/my_bitmap.c:
  Fixed bug where bitmap_set_prefix() wrote over buffer area.
mysys/safemalloc.c:
  More DBUG information
mysys/thr_mutex.c:
  Initialize smaller arrays be default.
sql-common/client.c:
  More DBUG_PRINT
storage/xtradb/srv/srv0srv.c:
  Initialize n_pages_flushed which was used uninitialized.
2011-02-24 02:36:32 +02:00
Sergei Golubchik
8fafe0f89b missing DBUG_RETURN 2011-02-23 18:26:02 +01:00
Michael Widenius
58bb0769bd Merge with MySQL 5.1.55
- Fixed some issues with partitions and connection_string, which also fixed lp:716890 "Pre- and post-recovery crash in Aria"
- Fixed wrong assert in Aria

Now need to merge with latest xtradb before pushing 

sql/ha_partition.cc:
  Ensure that m_ordered_rec_buffer is not freed before close.
sql/mysqld.cc:
  Changed to use opt_stack_trace instead of opt_pstack.
  Removed references to pstack
sql/partition_element.h:
  Ensure that connect_string is initialized
storage/maria/ma_key_recover.c:
  Fixed wrong assert
2011-02-20 18:51:43 +02:00
Guilhem Bichot
1756d087cd Fix for BUG#59894
"set optimizer_switch to e or d causes invalid memory writes/valgrind warnings":
due to prefix support, the argument "e" was overwritten with its full value
"engine_condition_pushdown", which caused a buffer overrun.
This was wrong usage of find_type(); other wrong usages are fixed here too.
Please start reading with the comment of typelib.c.

client/mysqldump.c:
  A bug: find_type() expects a bitmap as 3rd argument
  (each bit is a flag controlling a behaviour of the function);
  here it was instead passed the length of the string to search!
  That could give random behaviour of find_type()
  depending on the string.
  We rather need to pass a correct flag to find_type().
  The correct flag is FIND_TYPE_BASIC (0).
  Flag 8 is not needed as buff cannot have a comma (see how buff is filled).
  Flag 1 looks like a superfluous restriction.
  Flag 4 is not user-friendly (why use
  --compatible=2 rather than --compatible=mysql40 ?, and
  we probably not commit to "2" always meaning "mysql40"
  until the end of times).
include/mysql.h.pp:
  This isn't a problematic API change as we go from char* to const char*:
  existing code will run unchanged.
include/typelib.h:
  named constants. Not an enum to not significantly change
  the declaration of find_type() which would be an API change
  (typelib.h is included in mysql.h).
mysql-test/r/mysqldump.result:
  correct result (see the two requested modes in SQL_MODE)
mysql-test/suite/sys_vars/t/optimizer_switch_basic.test:
  test for BUG#59894. The second SET used to crash.
mysql-test/t/mysqldump.test:
  we had no test for multiple modes in --compatible, which is
  supported according to --help
mysys/typelib.c:
  Fix for BUG#59894. parse_name() is asked to match "e" with a row
  of the TYPELIB (the TYPELIB lists permitted flags of optimizer_switch;
  and comes from optimizer_switch_names[] of sys_vars.cc).
  find_type() is capable of supporting prefixes, but if it is not
  passed flag 2 in third argument, it will overwrite its first
  argument (the string to search for) with the complete name,
  here overwriting "e" with "engine_condition_pushdown". But
  as this "e" was a buffer allocated in an Item, it was not big
  enough to host the longer name, thus the crash.
  We don't need to know the complete flag's name; the output used
  from find_type() is just the flag's number (== function's return
  code). So we can pass flag 2 to find_type() in parse_name().
  After doing this fix and the other fixes in this patch, all usages
  of find_type() were using flag 2; in most usages the string to search for,
  is not guaranteed to be long enough to host the complete name
  (it is either directly from argv, or from alloc_root/my_malloc
  done in an earlier call).
  Thus, flag 2 is here made implicit: callers need not pass it anymore,
  it is always automatically turned on.
  This allows to eliminate an oddity: parse_name() took a const char**,
  and then removed "const" before calling find_type(), which could
  theoretically modify the pointed data, thus lying on constness.
  Last, constants for find_type() are now named.
sql-common/client.c:
  Two bugs:
  1) The enum was not in sync with the array (due to a bad porting of WL 1054;
  the extra OPT_ values are about options present in 5.1 and deleted in 5.5);
  added a compile_time_assert() to make sure this doesn't happen again
  2) find_type() was writing past the end of opt_arg; as opt_arg was allocated
  with alloc_root() with no extra space, this was an overrun; it could be seen
  when
  ** building with -DWITH_VALGRIND -DHAVE_purify -DEXTRA_DEBUG
  ** making execution go through the faulty code; this faulty
  code is executed only if the client asks to read a configuration
  file like this:
    mysql_options(mysql, MYSQL_READ_DEFAULT_FILE, "/tmp/cnf.cnf");
  so by adding such line to the start of mysql_client_test.c::client_connect(),
  we could see the valgrind warning:
  ==30548== Invalid write of size 1
  ==30548==    at 0x4C2624C: strcpy (mc_replace_strmem.c:303)
  ==30548==    by 0x48DC29: find_type (typelib.c:120)
  ==30548==    by 0x465686: mysql_read_default_options (client.c:1344)
  ==30548==    by 0x46830F: mysql_real_connect (client.c:2971)
  ==30548==    by 0x409339: client_connect (mysql_client_test.c:331)
  ==30548==    by 0x463A7F: main (mysql_client_test.c:19902)
  ==30548==  Address 0x61875ad is 0 bytes after a block of size 29 alloc'd
  ==30548==    at 0x4C25153: malloc (vg_replace_malloc.c:195)
  ==30548==    by 0x49BFF1: my_malloc (my_malloc.c:38)
  ==30548==    by 0x49C65C: alloc_root (my_alloc.c:166)
  ==30548==    by 0x48EF97: handle_default_option (default.c:381)
  ==30548==    by 0x49068C: search_default_file_with_ext (default.c:992)
  ==30548==    by 0x48F929: search_default_file (default.c:670)
  ==30548==    by 0x48EDC4: my_search_option_files (default.c:312)
  ==30548==    by 0x48F4B1: my_load_defaults (default.c:576)
  ==30548==    by 0x46517A: mysql_read_default_options (client.c:1207)
  ==30548==    by 0x46830F: mysql_real_connect (client.c:2971)
  ==30548==    by 0x409339: client_connect (mysql_client_test.c:331)
  ==30548==    by 0x463A7F: main (mysql_client_test.c:19902)
  This is fixed by having find_type() not overwrite anymore.
sql/sql_help.cc:
  cast not needed anymore.
sql/table.cc:
  cast not needed anymore.
2011-02-11 15:00:09 +01:00
Guilhem Bichot
77c0f33ee2 Fix for BUG#59894
"set optimizer_switch to e or d causes invalid memory writes/valgrind warnings":
due to prefix support, the argument "e" was overwritten with its full value
"engine_condition_pushdown", which caused a buffer overrun.
This was wrong usage of find_type(); other wrong usages are fixed here too.
Please start reading with the comment of typelib.c.
2011-02-11 15:00:09 +01:00
Mattias Jonsson
6ae9810f38 merge of bug 47902 and (null-merge) of bug 57924.
bug#57924 does not occur in 5.5, so I reverted the 5.1 specific
code and used the errors from 5.5 instead in the tests
2011-01-26 19:33:53 +01:00
Mattias Jonsson
04a8611112 merge of bug 47902 and (null-merge) of bug 57924.
bug#57924 does not occur in 5.5, so I reverted the 5.1 specific
code and used the errors from 5.5 instead in the tests
2011-01-26 19:33:53 +01:00
Mattias Jonsson
ad74ed74d9 merge 2011-01-26 16:34:34 +01:00
Mattias Jonsson
15f635fdf6 merge 2011-01-26 16:34:34 +01:00
Michael Widenius
c46305ab48 Better fix for mysql_test.cc::do_remove_files_wildcard
client/mysqltest.cc:
  Better fix for do_remove_files_wildcard
2011-01-26 21:15:25 +02:00
Michael Widenius
69fe020f01 Fixed bugs found by buildbot:
- Use -Wno-uninitialized if -DFORCE_INIT_OF_VARS is not used, to avoid warnings about not initialized variables.
- Fixed compiler warnings
- Added a name for each thr_lock to get better error messages (This is needed to find out why 'archive.test' sometimes fails)


BUILD/SETUP.sh:
  Use -Wno-uninitialized if -DFORCE_INIT_OF_VARS is not used, to avoid warnings about not initialized variables.
BUILD/build_mccge.sh:
  Use -Wno-uninitialized if -DFORCE_INIT_OF_VARS is not used, to avoid warnings about not initialized variables.
client/mysqltest.cc:
  Fixed bug in remove_files_wildcards (the orignal code never removed anything)
extra/libevent/devpoll.c:
  Fixed compiler warning
include/thr_lock.h:
  Added a name for each thr_lock to get better error messages.
mysql-test/suite/maria/t/maria3.test:
  Speed up test.
mysys/thr_lock.c:
  Added a name for each thr_lock to get better error messages.
  Added a second 'check_locks' to find if something goes wrong in 'wake_up_waiters'.
sql/lock.cc:
  Added a name for each thr_lock to get better error messages.
storage/xtradb/fil/fil0fil.c:
  Fixed compiler warning
2011-01-26 15:17:46 +02:00
Bjorn Munch
5a85609d6b Fixed copyright headers in mtr src files 2011-01-18 11:03:44 +01:00
Bjorn Munch
097445ebf5 Fixed copyright headers in mtr src files 2011-01-18 11:03:44 +01:00
Bjorn Munch
d651529112 Fixed copyright headers in mtr src files 2011-01-18 11:21:37 +01:00
Bjorn Munch
7b9c438099 Fixed copyright headers in mtr src files 2011-01-18 11:21:37 +01:00
Bjorn Munch
aa5110c0f1 Bug #59153 mysqltest produces a valgrind warning when the running test fails
Local variable ds_warnings in run_query not cleared.
But when we call die() we don't have access to it.
Set global var. to point to it when allocated.
2011-01-11 15:23:39 +01:00
Bjorn Munch
443b3bed2f Bug #59153 mysqltest produces a valgrind warning when the running test fails
Local variable ds_warnings in run_query not cleared.
But when we call die() we don't have access to it.
Set global var. to point to it when allocated.
2011-01-11 15:23:39 +01:00
Bjorn Munch
8937cbd5ae upmerge 58896,58900,59002 2011-01-11 15:15:25 +01:00
Bjorn Munch
3494a915fa upmerge 58896,58900,59002 2011-01-11 15:15:25 +01:00
Bjorn Munch
5376a76dea Bug #58900 query_get_value crashes when result begins with dollar sign
Generalized fix for recursive backtick
Optional arg to eval_expr telling it not to interpret
2011-01-11 10:54:42 +01:00
Bjorn Munch
0630418539 Bug #58900 query_get_value crashes when result begins with dollar sign
Generalized fix for recursive backtick
Optional arg to eval_expr telling it not to interpret
2011-01-11 10:54:42 +01:00
Bjorn Munch
8645caf79d Bug #59002 Please make mtr print correct file and line number when tests fail
This patchs adds printing of a file stack (with line numbers)
It does not fix the problem of a failure in the non-first iteration of a loop
2011-01-11 10:51:31 +01:00
Bjorn Munch
c6ad5c819e Bug #59002 Please make mtr print correct file and line number when tests fail
This patchs adds printing of a file stack (with line numbers)
It does not fix the problem of a failure in the non-first iteration of a loop
2011-01-11 10:51:31 +01:00
Mattias Jonsson
38c5e2cae8 Bug#47902: partition_recover_myisam fails with --ps-protocol
The problem was that the warnings was never written out
when running with --ps-protocol. This was because the
warnings only appeared during the prepare phase, not
the execute phase.

Solved by not clearing the warnings from the prepare phase
if there was no other warnings.

If there are warnings from the execute phase, it is very
likely to be the same as from the prepare phase. My tests
show that if not clearing the warnings from the prepare
phase when there are warnings from the execute phase, there
will be duplicated warnings in the result.

client/mysqltest.cc:
  Only reset the prepare warnings if there are warnings from
  the execute phase. Otherwise these warnings will never be
  returned.
2011-01-10 23:42:37 +01:00
Mattias Jonsson
3a0b067654 Bug#47902: partition_recover_myisam fails with --ps-protocol
The problem was that the warnings was never written out
when running with --ps-protocol. This was because the
warnings only appeared during the prepare phase, not
the execute phase.

Solved by not clearing the warnings from the prepare phase
if there was no other warnings.

If there are warnings from the execute phase, it is very
likely to be the same as from the prepare phase. My tests
show that if not clearing the warnings from the prepare
phase when there are warnings from the execute phase, there
will be duplicated warnings in the result.
2011-01-10 23:42:37 +01:00
Sven Sandberg
1bd213aec3 Merged BUG#49978 from 5.1-bugteam to 5.5-bugteam. 2010-12-19 18:15:12 +01:00
Sven Sandberg
e37c86de18 Merged BUG#49978 from 5.1-bugteam to 5.5-bugteam. 2010-12-19 18:15:12 +01:00
Sven Sandberg
8b27f9a05e BUG#49978: Replication tests don't clean up replication state at the end
Major replication test framework cleanup. This does the following:
 - Ensure that all tests clean up the replication state when they
   finish, by making check-testcase check the output of SHOW SLAVE STATUS.
   This implies:
    - Slave must not be running after test finished. This is good
      because it removes the risk for sporadic errors in subsequent
      tests when a test forgets to sync correctly.
    - Slave SQL and IO errors must be cleared when test ends. This is
      good because we will notice if a test gets an unexpected error in
      the slave threads near the end.
    - We no longer have to clean up before a test starts.
 - Ensure that all tests that wait for an error in one of the slave
   threads waits for a specific error. It is no longer possible to
   source wait_for_slave_[sql|io]_to_stop.inc when there is an error
   in one of the slave threads. This is good because:
    - If a test expects an error but there is a bug that causes
      another error to happen, or if it stops the slave thread without
      an error, then we will notice.
    - When developing tests, wait_for_*_to_[start|stop].inc will fail
      immediately if there is an error in the relevant slave thread.
      Before this patch, we had to wait for the timeout.
 - Remove duplicated and repeated code for setting up unusual replication
   topologies. Now, there is a single file that is capable of setting
   up arbitrary topologies (include/rpl_init.inc, but
   include/master-slave.inc is still available for the most common
   topology). Tests can now end with include/rpl_end.inc, which will clean
   up correctly no matter what topology is used. The topology can be
   changed with include/rpl_change_topology.inc.
 - Improved debug information when tests fail. This includes:
    - debug info is printed on all servers configured by include/rpl_init.inc
    - User can set $rpl_debug=1, which makes auxiliary replication files
      print relevant debug info.
 - Improved documentation for all auxiliary replication files. Now they
   describe purpose, usage, parameters, and side effects.
 - Many small code cleanups:
    - Made have_innodb.inc output a sensible error message.
    - Moved contents of rpl000017-slave.sh into rpl000017.test
    - Added mysqltest variables that expose the current state of
      disable_warnings/enable_warnings and friends.
    - Too many to list here: see per-file comments for details.


client/mysqltest.cc:
  Added the following variables:
   $ENABLED_WARNINGS
   $ENABLED_QUERY_LOG
   $ENABLED_RESULT_LOG
   $ENABLED_ABORT_ON_ERROR
   $ENABLED_INFO
   $ENABLED_METADATA
  Each variable is 0 or 1, depending on if the corresponding
  mysqltest feature is on or off.
mysql-test/extra/rpl_tests/rpl_EE_err.test:
  Made test clean up after itself and removed outdated comments.
mysql-test/extra/rpl_tests/rpl_auto_increment.test:
  - Use rpl_reset.inc instead of master-slave-reset.inc
  - diff_tables.inc now takes only one parameter.
  Made test clean up after itself and removed outdated comments.
mysql-test/extra/rpl_tests/rpl_auto_increment_insert_view.test:
  diff_tables.inc now takes only one parameter.
mysql-test/extra/rpl_tests/rpl_auto_increment_invoke_trigger.test:
  diff_tables.inc now takes only one parameter.
mysql-test/extra/rpl_tests/rpl_autoinc_func_invokes_trigger.test:
  diff_tables.inc now takes only one parameter.
mysql-test/extra/rpl_tests/rpl_charset.test:
  Made test clean up after itself and removed unnecessary cleanup in beginning.
mysql-test/extra/rpl_tests/rpl_commit_after_flush.test:
  cosmetic fixes
mysql-test/extra/rpl_tests/rpl_conflicts.test:
  cosmetic fixes
mysql-test/extra/rpl_tests/rpl_ddl.test:
  Don't clean up replication here since this file does not setup
  replication. The main test now has to both setup and clean up
  replication.
  cosmetic fixes
mysql-test/extra/rpl_tests/rpl_deadlock.test:
  make test clean up after itself
mysql-test/extra/rpl_tests/rpl_extra_col_master.test:
  cosmetic fixes
mysql-test/extra/rpl_tests/rpl_extra_col_slave.test:
  made test clean up after itself
  cosmetic fixes
mysql-test/extra/rpl_tests/rpl_failed_optimize.test:
  made test clean up after itself
mysql-test/extra/rpl_tests/rpl_flsh_tbls.test:
  made test clean up after itself
mysql-test/extra/rpl_tests/rpl_foreign_key.test:
  made test clean up after itself
mysql-test/extra/rpl_tests/rpl_get_master_version_and_clock.test:
   - Replace 'start slave; wait_for_slave_to_start.inc' by
     include/start_slave.inc.
   - Use new file rpl_connect.inc to reconnect on all connections, since the
     connections are used by rpl_end.inc.
   - Use wait_for_slave_param.inc instead of wait_for_slave_io_to_start.inc,
     since wait_for_slave_io_to_start.inc now fails if the IO thread has
     an error. In this particular test case, it is normal that the IO thread
     has an error.
   - Changed wait_for_slave_io_error.inc so that it waits
     for the IO thread to stop. However, in this test case,
     the IO thread only gets a non-fatal error, so it does
     not stop. So we set $slave_io_error_is_nonfatal=1 to
     prevent wait_for_slave_io_error.inc from waiting.
mysql-test/extra/rpl_tests/rpl_insert_id.test:
  made test clean up after itself
  cosmetic fixes
mysql-test/extra/rpl_tests/rpl_insert_id_pk.test:
  made test clean up after itself
  cosmetic fixes
mysql-test/extra/rpl_tests/rpl_loaddata.test:
   - Use wait_for_slave_sql_error.inc to wait for errors
     instead of wait_for_slave_sql_to_stop.inc
   - Use check_slave_no_error.inc instead of print errors
     to the log.
   - Use rpl_reset.inc instead of master-slave-reset.inc
     This means we have to clear the error from the slave
     threads by calling RESET SLAVE explicitly.
   - diff_tables.inc now takes only one parameter.
mysql-test/extra/rpl_tests/rpl_log.test:
  replace master-slave-reset.inc by rpl_reset.inc
mysql-test/extra/rpl_tests/rpl_max_relay_size.test:
  made test clean up after itself
  cosmetic fix
mysql-test/extra/rpl_tests/rpl_multi_query.test:
  made test clean up after itself
  cosmetic fixes
mysql-test/extra/rpl_tests/rpl_multi_update.test:
  made test clean up after itself
  cosmetic fixes
mysql-test/extra/rpl_tests/rpl_ndb_apply_status.test:
  replace master-slave-reset.inc by rpl_reset.inc
mysql-test/extra/rpl_tests/rpl_not_null.test:
  - replace master-slave-reset.inc by rpl_reset.inc
  - diff_tables.inc now takes only one parameter.
mysql-test/extra/rpl_tests/rpl_record_compare.test:
  - replace master-slave-reset.inc by rpl_reset.inc
  - diff_tables.inc now takes only one parameter.
mysql-test/extra/rpl_tests/rpl_reset_slave.test:
  - replace wait_for_slave_io_error.inc+stop_slave.inc by
    wait_for_slave_io_error_and_stop.inc+stop_slave_sql.inc
    since stop_slave.inc now fails when the io thread has an
    error.
  - replace stop_slave.inc by STOP SLAVE +
    wait_for_slave_sql_to_stop.inc +
    wait_for_slave_param. stop_slave.inc would fail since
    the IO thread has an error.
  - add include/rpl_end.inc to clean up replication state
mysql-test/extra/rpl_tests/rpl_row_UUID.test:
  Don't clean up replication here since this file does not setup
  replication. The main test now has to both setup and clean up
  replication.
mysql-test/extra/rpl_tests/rpl_row_basic.test:
  - replaced reset_master_and_slave.inc by rpl_reset.inc
  - replaced sequence of reset master+reset slave by rpl_reset.inc
  - diff_tables.inc now takes only one parameter.
mysql-test/extra/rpl_tests/rpl_row_delayed_ins.test:
  made test clean up after itself
  cosmetic fixes
mysql-test/extra/rpl_tests/rpl_row_sp002.test:
  made test clean up after itself
  cosmetic fixes
mysql-test/extra/rpl_tests/rpl_row_sp007.test:
  made test clean up after itself
  cosmetic fixes
mysql-test/extra/rpl_tests/rpl_set_null.test:
  - replaced master-slave-reset.inc by rpl_reset.inc
  - diff_tables.inc now takes only one parameter.
mysql-test/extra/rpl_tests/rpl_stm_EE_err2.test:
  - Made test clean up replication state.
mysql-test/extra/rpl_tests/rpl_stm_create_if_not_exists.test:
  replaced rpl_diff_tables.inc by diff_tables.inc
mysql-test/extra/rpl_tests/rpl_stop_slave.test:
  changed protocol for diff_tables.inc
mysql-test/extra/rpl_tests/rpl_sv_relay_space.test:
  made test clean up after itself
  cosmetic fixes
mysql-test/extra/rpl_tests/rpl_test_framework.inc:
  Auxiliary file used by rpl_test_framework.test.
  This checks that rpl_change_topology.inc works correctly.
mysql-test/extra/rpl_tests/rpl_truncate.test:
  made test clean up after itself
  cosmetic fixes
mysql-test/extra/rpl_tests/rpl_truncate_helper.test:
  - replace reset_master_and_slave.inc by rpl_reset.inc
  - diff_tables.inc now takes only one parameter.
mysql-test/include/analyze-sync_with_master.test:
  - improved debug output printed when sync_slave_with_master or
    sync_with_master fails
  - Added documentation
mysql-test/include/assert.inc:
  Added file to facilitate assertions.
mysql-test/include/begin_include_file.inc:
  New auxiliary file to be used by replication helper files like
  rpl_init.inc, stop_slave.inc, wait_for_slave_*.inc, etc. Such
  helper files should source rpl_begin_include_file.inc at the
  beginning and rpl_end_include_file.inc at the end. That adds the
  following features:
   - When a test sources the file, the file name is printed to the
     result file. This is good because it makes result files easier to
     follow.
   - When a helper file sources a second helper file recursively, then
     the name of the second file is not printed. This is good because
     it would make the result file harder to follow if all the internal
     calls of all helper files were printed.
   - When $rpl_debug is set, all internal calls are printed to the
     result file. This is good because it helps when debugging test
     cases. (With $rpl_debug=1, many of the helper files now print other
     relevant debug info too.)
   - When a file needs to turn off the query log or the warning log
     (disable_query_log/disable_warnings), then the file can tell
     rpl_begin_include_file.inc about it. Then rpl_begin_include_file.inc
     will turn off the log correctly, and rpl_end_include_file.inc
     will turn on the log correctly. Note that if rpl_a.inc sources
     rpl_b.inc and both files need to turn off the log, then the
     log is not turned on when rpl_b.inc ends (because rpl_a.inc
     still needs the log off). This makes it easier to program
     replication helper files.
mysql-test/include/check-testcase.test:
  Made check-testcase ensure that the slave status is reset
  after the test has finished.
mysql-test/include/check_slave_is_running.inc:
  - Use existing framework (check_slave_param.inc) instead of ad-hoc code
    to check value of slave parameters.
  - Use rpl_begin_include_file.inc to improve debug capabilities.
  - improve documentation.
mysql-test/include/check_slave_no_error.inc:
  - Use rpl_begin_include_file.inc to improve debug capabilities.
  - improve documentation.
mysql-test/include/check_slave_param.inc:
  - Use rpl_begin_include_file.inc to improve debug capabilities.
  - improve documentation.
mysql-test/include/cleanup_fake_relay_log.inc:
  - Use RESET SLAVE instead of manual file removal. This also
    resets other replication state.
  - verify that RESET SLAVE correctly removed files.
mysql-test/include/diff_tables.inc:
   - Use rpl_begin_include_file.inc to improve debug capabilities.
   - Improved documentation.
   - file now supports an arbitrary number of tables
     (not just two). The tables are now given as a comma-separated
     list instead of as two variables.
   - You no longer have to specify database name for each table.
     If no database is specified, it defaults to the current
     database.
   - File now restores the connection at the end.
mysql-test/include/end_include_file.inc:
  New file to be sourced at the end of auxiliary replication include
  files. See include/rpl_begin_include_file.inc for details.
mysql-test/include/file_does_not_exist.inc:
  Added .inc file to check that a given file is removed.
mysql-test/include/force_restart.inc:
  Added file to force server restart after test
mysql-test/include/force_restart_if_skipped.inc:
  Added file to force server restart after test, if the test is skipped
mysql-test/include/have_innodb.inc:
  Made have_innodb.inc print sensible message when innodb is
  not supported.
mysql-test/include/io_thd_fault_injection.inc:
  Use rpl_server_restart.inc instead of restart_mysqld.inc in rpl tests
mysql-test/include/kill_query_and_diff_master_slave.inc:
  Renamed diff_master_slave.inc to rpl_diff.inc
mysql-test/include/master-slave.inc:
  - Use new rpl_init.inc file
  - Now, we don't do 'drop table' in master-slave.inc any more. That's good
    because drop table has nothing to do with configuring replication servers.
  - master-slave.inc now supports the additional parameter
    $rpl_server_count. By default, master-slave.inc only
    configures two servers; if $rpl_server_count is set, it
    configures that many servers. Only the second server is
    a slave; the rest are not part of the replication topology.
mysql-test/include/mtr_check.sql:
  Removed unneeded SP (use include/force_restart.inc instead)
mysql-test/include/mysqldump.inc:
  diff_tables.inc now takes only one parameter.
mysql-test/include/ndb_master-slave.inc:
  use master-slave.inc instead of ad-hoc calls to 'connect'
mysql-test/include/ndb_master-slave_2ch.inc:
  use rpl_init.inc instead of ad-hoc setup
mysql-test/include/ndb_not_readonly.inc:
  turn off query log while executing this script.
  this was previously done by the caller. now it's done in the script.
mysql-test/include/report-features.test:
  add newline at end of file
mysql-test/include/reset_master_and_slave.inc:
  rpl_reset.inc replaces this file
mysql-test/include/restart_mysqld.inc:
  force caller to use rpl_restart_server.inc instead if replication is configured
mysql-test/include/rpl_change_topology.inc:
  New file to change replication topology on the fly. This is used
  by rpl_init.inc internally, but is also used by test cases
  that need to change topology (e.g., rpl.rpl_circular_for_4_hosts, which
  reconfigures the topology to make a failover).
mysql-test/include/rpl_connect.inc:
  New file to create a named connection. This file knows about a number
  of "standard" connections (master, slave, server_1, etc), and knows how
  each of them should normally be created. This is mostly used internally
  (e.g., by rpl_init.inc, master-slave.inc, ndb_master-slave_2ch.inc etc),
  but can also be used by tests that need to bring a connection up after
  disconnecting.
mysql-test/include/rpl_connection.inc:
  New file to change connection. This prints the name of the connection.
  However, for files that source rpl_begin_include_file.inc, it does not
  print the name of the connection unless $rpl_debug=1. This is good
  because printing something every time the .inc file changed connection
  would make the result log harder to read.
mysql-test/include/rpl_diff.inc:
   - Made file capable to compare many servers
   - Hence renamed it to rpl_diff.inc
   - If no server list is specified, use all servers from
     server_1 to server_$rpl_server_count
   - It now writes the statement to file before executing it.
     That means it will be subject to SQL string interpolation,
     but not shell string interpolation (which may be
     platform-dependent)
mysql-test/include/rpl_diff_tables.inc:
  Removed this file, since its functionality has been merged into
  diff_tables.inc.
mysql-test/include/rpl_end.inc:
  Renamed master-slave-end.inc to rpl_end.inc, and made it
  work with arbitrary replication topologies (as configured
  with rpl_init.inc and possibly rpl_change_topology.inc). Also
  made it assert that no slave thread has an error. Made it
  assert that no slave thread is stopped, unless
  $rpl_only_running_threads=1.
mysql-test/include/rpl_for_each_slave.inc:
  New test script that executes a command once for each slave.
  This is used by include/rpl_start_slaves.inc and
  include/rpl_stop_slaves.inc and could possibly be useful for other
  custom scripts too.
mysql-test/include/rpl_generate_sync_chain.inc:
  New file that computes the variable $rpl_sync_chain. This variable
  determines in what order slaves are synced by include/rpl_sync.inc.
  The variable is recomputed the first time that include/rpl_sync.inc
  is called after rpl_change_topology.inc.
mysql-test/include/rpl_init.inc:
  Made file work for arbitrary topologies instead of just 4-server
  circle. This file is used by master-slave.inc, rpl_master-slave_2ch.inc
  etc, and also by tests that need other specific replication topologies.
mysql-test/include/rpl_reconnect.inc:
  New auxiliary file that will reconnect many clients to a given
  server. All clients configured by rpl_init.inc will reconnect.
mysql-test/include/rpl_reset.inc:
  Made file work for arbitrary replication topologies,
  check for errors, and sync all threads. Also removed
  'drop table' because that has nothing to do with replication.
mysql-test/include/rpl_restart_server.inc:
  New auxiliary file that restarts a server.
mysql-test/include/rpl_start_server.inc:
  New auxiliary file that starts a server that has been shut down.
mysql-test/include/rpl_start_slaves.inc:
  New auxiliary file to start all slaves configured by rpl_init.inc
  This is used internally by rpl_init.inc but may also be used by tests
  that want to bring all slaves up.
mysql-test/include/rpl_stop_server.inc:
  New auxiliary file that shuts down a server.
mysql-test/include/rpl_stop_slaves.inc:
  New auxiliary file to stop all slaves configured rpl_init.inc. This
  is used internally by rpl_end.inc, but may also be used by tests that
  want to stop all slaves.
mysql-test/include/rpl_sync.inc:
  Made file work for arbitrary replication topologies (as configured
  by rpl_init.inc and possibly rpl_change_topology.inc) instead of
  just 4-server circle.
mysql-test/include/save_master_pos.inc:
  Auxiliary file to save the master position.
mysql-test/include/setup_fake_relay_log.inc:
  - Moved complicated logic to write to file into
    write_var_to_file.inc, so that it can be re-used by
    other tests.
  - Added call to show_rpl_debug_info and die in error case.
mysql-test/include/show_rpl_debug_info.inc:
  - Made file print NOW()
  - Made file print both SHOW MASTER STATUS, SHOW SLAVE HOSTS,
    and SHOW SLAVE STATUS.
  - Made file print debug info for all servers configured by
    rpl_init.inc
mysql-test/include/show_slave_status.inc:
  - Made file use echo instead of SELECT to print variables.
  - Improved comments.
  - Use variable names that are less likely to be used by other tests.
mysql-test/include/start_slave.inc:
  - Made test use rpl_begin_include_file.inc to improve debug
    capabilities.
  - improved documentation
mysql-test/include/stop_slave.inc:
  - Made script capable to detect which threads are running
    and stop only those.
  - Improved documentation
mysql-test/include/stop_slave_io.inc:
  Added file to stop the slave IO thread.
mysql-test/include/stop_slave_sql.inc:
  Added file to stop the slave SQL thread.
mysql-test/include/sync_io_with_master.inc:
  Added file to sync the IO thread of the current connection, up to
  a previously saved position.
mysql-test/include/sync_slave_io_with_master.inc:
  - Made file work with arbitrarily-named connections.
  - Made file use rpl_begin_include_file.inc to improve debug
    capabilities.
mysql-test/include/sync_slave_sql_with_io.inc:
  Added file to sync only the SQL thread, up to the position copied
  in the IO thread.
mysql-test/include/wait_for_query_to_fail.inc:
  Added file to wait for a query to fail.
mysql-test/include/wait_for_slave_io_error.inc:
  - Use rpl_begin_include_file.inc to improve debug capabilities.
  - Use existing atom include/show_slave_status.inc to print error
    message.
  - Improve comments.
  
  ******
   - This file now waits until the slave IO thread has completely
     stopped (to avoid races in tests).
   - Some IO thread errors are non-fatal and don't cause the slave
     IO thread to stop. To allow tests to wait for such errors, we
     add the parameters $slave_io_error_is_nonfatal. If
     $slave_io_error_is_nonfatal is set, this script does not wait
     for the IO thread to stop.
mysql-test/include/wait_for_slave_io_to_start.inc:
  - Made script fail if the IO thread has an error.
  - Use rpl_begin_include_file.inc to improve debug capabilities.
  - Improved documentation.
mysql-test/include/wait_for_slave_io_to_stop.inc:
  - Fail if server is not configured as slave. Previously, the
    script accepted servers not configured as slave because there
    was cleanup code called from master-slave.inc that would execute
    STOP SLAVE on both master and slave. Now all tests have to
    clean up after themselves, so we don't have to call stop slave
    at the beginning of tests. Hence, we disallow calling this
    script on servers not configured as slaves.
  - Use rpl_begin_include_file.inc to improve debug capabilities.
  - Improved documentation.
mysql-test/include/wait_for_slave_param.inc:
  - Added $slave_error_param. This variable can be set to
    Slave_IO_Errno or Slave_SQL_Errno, in which case the
    script fails if the corresponding column in the output from
    SHOW SLAVE STATUS is nonzero.
  - Replaced exit by die.
  - Made it print timeout seconds correctly in error message.
  - Removed $slave_error_message. This is not needed.
  - Use rpl_begin_include_file.inc for better debug capabilities.
mysql-test/include/wait_for_slave_sql_error.inc:
  - Use rpl_begin_include_file.inc for better debug capabilities.
  - Improve documentation
  - Use existing atom show_slave_status.inc to print error.
mysql-test/include/wait_for_slave_sql_error_and_skip.inc:
  - Use rpl_begin_include_file.inc and rpl_connection.inc for better
    debug capabilities.
  - Improve documentation
mysql-test/include/wait_for_slave_sql_to_start.inc:
  - Use rpl_begin_include_file.inc for better debug capabilities.
  - Improve documentation
mysql-test/include/wait_for_slave_sql_to_stop.inc:
  - Fail if Last_SQL_Errno is nonzero.
  - Fail if server is not configured as slave. Previously, the
    script accepted servers not configured as slave because there
    was cleanup code called from master-slave.inc that would execute
    STOP SLAVE on both master and slave. Now all tests have to
    clean up after themselves, so we don't have to call stop slave
    at the beginning of tests. Hence, we disallow calling this
    script on servers not configured as slaves.
  - Use rpl_begin_include_file.inc for better debug capabilities.
  - Improve documentation
mysql-test/include/wait_for_slave_to_start.inc:
  - Use rpl_begin_include_file.inc for better debug capabilities.
  - Improve documentation
mysql-test/include/wait_for_slave_to_stop.inc:
  - Use rpl_begin_include_file.inc for better debug capabilities.
  - Improve documentation
mysql-test/include/write_var_to_file.inc:
  Added file to write contents of a mysqltest variable to file.
  (This was previously in setup_fake_relay_log.inc)
mysql-test/mysql-test-run.pl:
  Allow tests to require restart in case the test is skipped.
mysql-test/r/init_file.result:
  updated result file
mysql-test/r/mysqldump_restore.result:
  update result file
mysql-test/suite/binlog/r/binlog_drop_if_exists.result:
  Moved test that does not use replication to binlog suite.
mysql-test/suite/binlog/r/binlog_old_versions.result:
  updated result file
mysql-test/suite/binlog/r/binlog_query_filter_rules.result:
  Moved test that does not use replication to binlog suite.
mysql-test/suite/binlog/r/binlog_server_id.result:
  Moved test that does not use replication to binlog suite.
mysql-test/suite/binlog/r/binlog_sf.result:
  Moved test that does not use replication to binlog suite.
mysql-test/suite/binlog/r/binlog_sql_mode.result:
  updated result file
mysql-test/suite/binlog/t/binlog_auto_increment_bug33029-master.opt:
  This test replicates, so it should be in the rpl suite.
  Then we can remove this .opt file too.
mysql-test/suite/binlog/t/binlog_drop_if_exists.test:
  Moved test that does not use replication to binlog suite.
mysql-test/suite/binlog/t/binlog_old_versions.test:
  cosmetic fixes
mysql-test/suite/binlog/t/binlog_query_filter_rules-master.opt:
  Moved test that does not use replication to binlog suite.
mysql-test/suite/binlog/t/binlog_query_filter_rules.test:
  Moved test that does not use replication to binlog suite.
mysql-test/suite/binlog/t/binlog_server_id.test:
  Moved test that does not use replication to binlog suite.
mysql-test/suite/binlog/t/binlog_sf.test:
  Moved test that does not use replication to binlog suite.
  Since test sets binlog_format internally, it's useless to
  re-run it. Hence we source have_binlog_format_statement.inc
mysql-test/suite/binlog/t/binlog_sql_mode.test:
  - Test does not use replication, so we remove master-slave.inc.
  - mysqltest magically adds --force-if-open to $MYSQL_BINLOG in test
    files that source master-slave.inc. So now we have to add
    --force-if-open explicitly.
mysql-test/suite/bugs/t/rpl_bug12691.test:
  made test clean up after itself
  cosmetic fixes
mysql-test/suite/bugs/t/rpl_bug23533.test:
  made test clean up after itself
  cosmetic fixes
mysql-test/suite/bugs/t/rpl_bug31582.test:
  made test clean up after itself
mysql-test/suite/bugs/t/rpl_bug31583.test:
  made test clean up after itself
mysql-test/suite/bugs/t/rpl_bug33029.test:
  made test clean up after itself
mysql-test/suite/bugs/t/rpl_bug36391.test:
  made test clean up after itself
  cosmetic fixes
mysql-test/suite/bugs/t/rpl_bug37426.test:
  made test clean up after itself
  cosmetic fixes
mysql-test/suite/bugs/t/rpl_bug38205.test:
  made test clean up after itself
mysql-test/suite/manual/t/rpl_replication_delay.test:
  made test clean up after itself
  cosmetic fixes
mysql-test/suite/ndb_team/t/rpl_ndb_dd_advance.test:
  made test clean up after itself
  cosmetic fixes
mysql-test/suite/ndb_team/t/rpl_ndb_extraColMaster.test:
  made test clean up after itself
mysql-test/suite/ndb_team/t/rpl_ndb_mix_innodb.test:
  made test clean up after itself
  cosmetic fixes
mysql-test/suite/parts/r/rpl_partition.result:
  updated result file
mysql-test/suite/parts/t/rpl_partition.test:
  Make test clean up replication state.
  cosmetic fixes
mysql-test/suite/rpl/include/rpl_mixed_ddl.inc:
  made test clean up after itself
  cosmetic fixes
mysql-test/suite/rpl/include/rpl_mixed_dml.inc:
  made test clean up after itself
  cosmetic fixes
mysql-test/suite/rpl/r/rpl_000010.result:
  update result file
mysql-test/suite/rpl/r/rpl_000011.result:
  update result file
mysql-test/suite/rpl/r/rpl_000013.result:
  update result file
mysql-test/suite/rpl/r/rpl_000017.result:
  update result file
mysql-test/suite/rpl/r/rpl_EE_err.result:
  update result file
mysql-test/suite/rpl/r/rpl_LD_INFILE.result:
  update result file
mysql-test/suite/rpl/r/rpl_alter.result:
  update result file
mysql-test/suite/rpl/r/rpl_alter_db.result:
  update result file
mysql-test/suite/rpl/r/rpl_auto_increment.result:
  update result file
mysql-test/suite/rpl/r/rpl_auto_increment_11932.result:
  update result file
mysql-test/suite/rpl/r/rpl_auto_increment_bug33029.result:
  update result file
mysql-test/suite/rpl/r/rpl_auto_increment_update_failure.result:
  update result file
mysql-test/suite/rpl/r/rpl_begin_commit_rollback.result:
  update result file
mysql-test/suite/rpl/r/rpl_binlog_corruption.result:
  Updated result file
mysql-test/suite/rpl/r/rpl_binlog_errors.result:
  updated result file
mysql-test/suite/rpl/r/rpl_binlog_grant.result:
  update result file
mysql-test/suite/rpl/r/rpl_binlog_max_cache_size.result:
  Updated result file
mysql-test/suite/rpl/r/rpl_bit.result:
  update result file
mysql-test/suite/rpl/r/rpl_bit_npk.result:
  update result file
mysql-test/suite/rpl/r/rpl_blackhole.result:
  update result file
mysql-test/suite/rpl/r/rpl_bug26395.result:
  update result file
mysql-test/suite/rpl/r/rpl_bug31076.result:
  update result file
mysql-test/suite/rpl/r/rpl_bug33931.result:
  updated result file
mysql-test/suite/rpl/r/rpl_bug38694.result:
  update result file
mysql-test/suite/rpl/r/rpl_change_master.result:
  update result file
mysql-test/suite/rpl/r/rpl_charset.result:
  update result file
mysql-test/suite/rpl/r/rpl_charset_sjis.result:
  update result file
mysql-test/suite/rpl/r/rpl_circular_for_4_hosts.result:
  Updated result file
mysql-test/suite/rpl/r/rpl_colSize.result:
  update result file
mysql-test/suite/rpl/r/rpl_commit_after_flush.result:
  update result file
mysql-test/suite/rpl/r/rpl_concurrency_error.result:
  update result file
mysql-test/suite/rpl/r/rpl_conditional_comments.result:
  update result file
mysql-test/suite/rpl/r/rpl_create_database.result:
  update result file
mysql-test/suite/rpl/r/rpl_create_if_not_exists.result:
  update result file
mysql-test/suite/rpl/r/rpl_create_tmp_table_if_not_exists.result:
  update result file
mysql-test/suite/rpl/r/rpl_cross_version.result:
  Updated result file
mysql-test/suite/rpl/r/rpl_current_user.result:
  update result file
mysql-test/suite/rpl/r/rpl_deadlock_innodb.result:
  update result file
mysql-test/suite/rpl/r/rpl_delete_no_where.result:
  update result file
mysql-test/suite/rpl/r/rpl_do_grant.result:
  updated result file
mysql-test/suite/rpl/r/rpl_drop.result:
  update result file
mysql-test/suite/rpl/r/rpl_drop_db.result:
  update result file
mysql-test/suite/rpl/r/rpl_drop_temp.result:
  update result file
mysql-test/suite/rpl/r/rpl_drop_view.result:
  update result file
mysql-test/suite/rpl/r/rpl_dual_pos_advance.result:
  update result file
mysql-test/suite/rpl/r/rpl_empty_master_crash.result:
  update result file
mysql-test/suite/rpl/r/rpl_err_ignoredtable.result:
  update result file
mysql-test/suite/rpl/r/rpl_events.result:
  update result file
mysql-test/suite/rpl/r/rpl_extra_col_master_innodb.result:
  update result file
mysql-test/suite/rpl/r/rpl_extra_col_master_myisam.result:
  update result file
mysql-test/suite/rpl/r/rpl_extra_col_slave_innodb.result:
  update result file
mysql-test/suite/rpl/r/rpl_extra_col_slave_myisam.result:
  update result file
mysql-test/suite/rpl/r/rpl_failed_optimize.result:
  update result file
mysql-test/suite/rpl/r/rpl_filter_tables_not_exist.result:
  update result file
mysql-test/suite/rpl/r/rpl_flushlog_loop.result:
  update result file
mysql-test/suite/rpl/r/rpl_foreign_key_innodb.result:
  update result file
mysql-test/suite/rpl/r/rpl_found_rows.result:
  update result file
mysql-test/suite/rpl/r/rpl_free_items.result:
  update result file
mysql-test/suite/rpl/r/rpl_geometry.result:
  update result file
mysql-test/suite/rpl/r/rpl_get_lock.result:
  update result file
mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result:
  update result file
mysql-test/suite/rpl/r/rpl_grant.result:
  update result file
mysql-test/suite/rpl/r/rpl_idempotency.result:
  update result file
mysql-test/suite/rpl/r/rpl_ignore_grant.result:
  update result file
mysql-test/suite/rpl/r/rpl_ignore_revoke.result:
  update result file
mysql-test/suite/rpl/r/rpl_ignore_table.result:
  update result file
mysql-test/suite/rpl/r/rpl_ignore_table_update.result:
  update result file
mysql-test/suite/rpl/r/rpl_incident.result:
  update result file
mysql-test/suite/rpl/r/rpl_init_slave.result:
  update result file
mysql-test/suite/rpl/r/rpl_init_slave_errors.result:
  update result file
mysql-test/suite/rpl/r/rpl_innodb.result:
  update result file
mysql-test/suite/rpl/r/rpl_innodb_bug28430.result:
  update result file
mysql-test/suite/rpl/r/rpl_innodb_bug30888.result:
  update result file
mysql-test/suite/rpl/r/rpl_innodb_mixed_ddl.result:
  update result file
mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result:
  update result file
mysql-test/suite/rpl/r/rpl_insert.result:
  update result file
mysql-test/suite/rpl/r/rpl_insert_id.result:
  update result file
mysql-test/suite/rpl/r/rpl_insert_id_pk.result:
  update result file
mysql-test/suite/rpl/r/rpl_insert_ignore.result:
  update result file
mysql-test/suite/rpl/r/rpl_insert_select.result:
  update result file
mysql-test/suite/rpl/r/rpl_invoked_features.result:
  update result file
mysql-test/suite/rpl/r/rpl_killed_ddl.result:
  update result file
mysql-test/suite/rpl/r/rpl_known_bugs_detection.result:
  update result file
mysql-test/suite/rpl/r/rpl_load_from_master.result:
  update result file
mysql-test/suite/rpl/r/rpl_load_table_from_master.result:
  update result file
mysql-test/suite/rpl/r/rpl_loaddata.result:
  update result file
mysql-test/suite/rpl/r/rpl_loaddata_charset.result:
  update result file
mysql-test/suite/rpl/r/rpl_loaddata_concurrent.result:
  update result file
mysql-test/suite/rpl/r/rpl_loaddata_fatal.result:
  update result file
mysql-test/suite/rpl/r/rpl_loaddata_m.result:
  update result file
mysql-test/suite/rpl/r/rpl_loaddata_map.result:
  update result file
mysql-test/suite/rpl/r/rpl_loaddata_s.result:
  update result file
mysql-test/suite/rpl/r/rpl_loaddata_simple.result:
  update result file
mysql-test/suite/rpl/r/rpl_loaddata_symlink.result:
  update result file
mysql-test/suite/rpl/r/rpl_loaddatalocal.result:
  update result file
mysql-test/suite/rpl/r/rpl_loadfile.result:
  update result file
mysql-test/suite/rpl/r/rpl_locale.result:
  update result file
mysql-test/suite/rpl/r/rpl_log_pos.result:
  update result file
mysql-test/suite/rpl/r/rpl_manual_change_index_file.result:
  update result file
mysql-test/suite/rpl/r/rpl_many_optimize.result:
  update result file
mysql-test/suite/rpl/r/rpl_master_pos_wait.result:
  update result file
mysql-test/suite/rpl/r/rpl_misc_functions.result:
  update result file
mysql-test/suite/rpl/r/rpl_mixed_bit_pk.result:
  update result file
mysql-test/suite/rpl/r/rpl_mixed_ddl_dml.result:
  update result file
mysql-test/suite/rpl/r/rpl_multi_delete.result:
  update result file
mysql-test/suite/rpl/r/rpl_multi_delete2.result:
  update result file
mysql-test/suite/rpl/r/rpl_multi_engine.result:
  update result file
mysql-test/suite/rpl/r/rpl_multi_update.result:
  update result file
mysql-test/suite/rpl/r/rpl_multi_update2.result:
  update result file
mysql-test/suite/rpl/r/rpl_multi_update3.result:
  update result file
mysql-test/suite/rpl/r/rpl_multi_update4.result:
  update result file
mysql-test/suite/rpl/r/rpl_mysql_upgrade.result:
  update result file
mysql-test/suite/rpl/r/rpl_name_const.result:
  update result file
mysql-test/suite/rpl/r/rpl_nondeterministic_functions.result:
  update result file
mysql-test/suite/rpl/r/rpl_not_null_innodb.result:
  update result file
mysql-test/suite/rpl/r/rpl_not_null_myisam.result:
  update result file
mysql-test/suite/rpl/r/rpl_optimize.result:
  update result file
mysql-test/suite/rpl/r/rpl_packet.result:
  update result file
mysql-test/suite/rpl/r/rpl_plugin_load.result:
  update result file
mysql-test/suite/rpl/r/rpl_ps.result:
  update result file
mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result:
  update result file
mysql-test/suite/rpl/r/rpl_read_only.result:
  update result file
mysql-test/suite/rpl/r/rpl_relay_space_innodb.result:
  update result file
mysql-test/suite/rpl/r/rpl_relay_space_myisam.result:
  update result file
mysql-test/suite/rpl/r/rpl_relayrotate.result:
  update result file
mysql-test/suite/rpl/r/rpl_relayspace.result:
  update result file
mysql-test/suite/rpl/r/rpl_replicate_do.result:
  update result file
mysql-test/suite/rpl/r/rpl_replicate_ignore_db.result:
  update result file
mysql-test/suite/rpl/r/rpl_report.result:
  update result file
mysql-test/suite/rpl/r/rpl_rewrt_db.result:
  update result file
mysql-test/suite/rpl/r/rpl_rotate_logs.result:
  update result file
mysql-test/suite/rpl/r/rpl_row_001.result:
  update result file
mysql-test/suite/rpl/r/rpl_row_4_bytes.result:
  update result file
mysql-test/suite/rpl/r/rpl_row_NOW.result:
  update result file
mysql-test/suite/rpl/r/rpl_row_USER.result:
  update result file
mysql-test/suite/rpl/r/rpl_row_UUID.result:
  update result file
mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result:
  update result file
mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result:
  update result file
mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result:
  update result file
mysql-test/suite/rpl/r/rpl_row_basic_8partition.result:
  update result file
mysql-test/suite/rpl/r/rpl_row_blob_innodb.result:
  update result file
mysql-test/suite/rpl/r/rpl_row_blob_myisam.result:
  update result file
mysql-test/suite/rpl/r/rpl_row_colSize.result:
  update result file
mysql-test/suite/rpl/r/rpl_row_conflicts.result:
  update result file
mysql-test/suite/rpl/r/rpl_row_delayed_ins.result:
  update result file
mysql-test/suite/rpl/r/rpl_row_drop.result:
  update result file
mysql-test/suite/rpl/r/rpl_row_find_row.result:
  update result file
mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result:
  update result file
mysql-test/suite/rpl/r/rpl_row_func001.result:
  update result file
mysql-test/suite/rpl/r/rpl_row_func002.result:
  update result file
mysql-test/suite/rpl/r/rpl_row_func003.result:
  update result file
mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result:
  updated result file
mysql-test/suite/rpl/r/rpl_row_insert_delayed.result:
  update result file
mysql-test/suite/rpl/r/rpl_row_log.result:
  update result file
mysql-test/suite/rpl/r/rpl_row_log_innodb.result:
  update result file
mysql-test/suite/rpl/r/rpl_row_max_relay_size.result:
  update result file
mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result:
  update result file
mysql-test/suite/rpl/r/rpl_row_rec_comp_innodb.result:
  update result file
mysql-test/suite/rpl/r/rpl_row_rec_comp_myisam.result:
  update result file
mysql-test/suite/rpl/r/rpl_row_reset_slave.result:
  update result file
mysql-test/suite/rpl/r/rpl_row_sp001.result:
  update result file
mysql-test/suite/rpl/r/rpl_row_sp002_innodb.result:
  update result file
mysql-test/suite/rpl/r/rpl_row_sp003.result:
  update result file
mysql-test/suite/rpl/r/rpl_row_sp005.result:
  update result file
mysql-test/suite/rpl/r/rpl_row_sp006_InnoDB.result:
  update result file
mysql-test/suite/rpl/r/rpl_row_sp007_innodb.result:
  update result file
mysql-test/suite/rpl/r/rpl_row_sp008.result:
  update result file
mysql-test/suite/rpl/r/rpl_row_sp009.result:
  update result file
mysql-test/suite/rpl/r/rpl_row_sp010.result:
  update result file
mysql-test/suite/rpl/r/rpl_row_sp011.result:
  update result file
mysql-test/suite/rpl/r/rpl_row_sp012.result:
  update result file
mysql-test/suite/rpl/r/rpl_row_stop_middle_update.result:
  update result file
mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result:
  update result file
mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result:
  update result file
mysql-test/suite/rpl/r/rpl_row_tbl_metadata.result:
  update result file
mysql-test/suite/rpl/r/rpl_row_trig001.result:
  update result file
mysql-test/suite/rpl/r/rpl_row_trig002.result:
  update result file
mysql-test/suite/rpl/r/rpl_row_trig003.result:
  update result file
mysql-test/suite/rpl/r/rpl_row_trig004.result:
  update result file
mysql-test/suite/rpl/r/rpl_row_trunc_temp.result:
  update result file
mysql-test/suite/rpl/r/rpl_row_unsafe_funcs.result:
  update result file
mysql-test/suite/rpl/r/rpl_row_until.result:
  update result file
mysql-test/suite/rpl/r/rpl_row_view01.result:
  update result file
mysql-test/suite/rpl/r/rpl_row_wide_table.result:
  update result file
mysql-test/suite/rpl/r/rpl_server_id1.result:
  update result file
mysql-test/suite/rpl/r/rpl_server_id2.result:
  update result file
mysql-test/suite/rpl/r/rpl_session_var.result:
  update result file
mysql-test/suite/rpl/r/rpl_set_charset.result:
  update result file
mysql-test/suite/rpl/r/rpl_set_null_innodb.result:
  update result file
mysql-test/suite/rpl/r/rpl_set_null_myisam.result:
  update result file
mysql-test/suite/rpl/r/rpl_show_slave_running.result:
  update result file
mysql-test/suite/rpl/r/rpl_skip_error.result:
  update result file
mysql-test/suite/rpl/r/rpl_slave_grp_exec.result:
  update result file
mysql-test/suite/rpl/r/rpl_slave_load_in.result:
  update result file
mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result:
  Updated result file
mysql-test/suite/rpl/r/rpl_slave_load_tmpdir_not_exist.result:
  updated result file
mysql-test/suite/rpl/r/rpl_slave_skip.result:
  update result file
mysql-test/suite/rpl/r/rpl_slave_status.result:
  update result file
mysql-test/suite/rpl/r/rpl_slow_query_log.result:
  update result file
mysql-test/suite/rpl/r/rpl_sp.result:
  update result file
mysql-test/suite/rpl/r/rpl_sp004.result:
  update result file
mysql-test/suite/rpl/r/rpl_sp_effects.result:
  update result file
mysql-test/suite/rpl/r/rpl_sporadic_master.result:
  update result file
mysql-test/suite/rpl/r/rpl_ssl.result:
  update result file
mysql-test/suite/rpl/r/rpl_ssl1.result:
  update result file
mysql-test/suite/rpl/r/rpl_start_stop_slave.result:
  update result file
mysql-test/suite/rpl/r/rpl_stm_000001.result:
  update result file
mysql-test/suite/rpl/r/rpl_stm_EE_err2.result:
  updated result file
mysql-test/suite/rpl/r/rpl_stm_auto_increment_bug33029.result:
  update result file
mysql-test/suite/rpl/r/rpl_stm_binlog_direct.result:
  update result file
mysql-test/suite/rpl/r/rpl_stm_conflicts.result:
  update result file
mysql-test/suite/rpl/r/rpl_stm_create_if_not_exists.result:
  update result file
mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result:
  update result file
mysql-test/suite/rpl/r/rpl_stm_insert_delayed.result:
  update result file
mysql-test/suite/rpl/r/rpl_stm_loadfile.result:
  update result file
mysql-test/suite/rpl/r/rpl_stm_log.result:
  update result file
mysql-test/suite/rpl/r/rpl_stm_max_relay_size.result:
  update result file
mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result:
  update result file
mysql-test/suite/rpl/r/rpl_stm_multi_query.result:
  update result file
mysql-test/suite/rpl/r/rpl_stm_no_op.result:
  update result file
mysql-test/suite/rpl/r/rpl_stm_reset_slave.result:
  update result file
mysql-test/suite/rpl/r/rpl_stm_sql_mode.result:
  update result file
mysql-test/suite/rpl/r/rpl_stm_until.result:
  update result file
mysql-test/suite/rpl/r/rpl_stop_slave.result:
  update result file
mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result:
  update result file
mysql-test/suite/rpl/r/rpl_temp_table.result:
  update result file
mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result:
  update result file
mysql-test/suite/rpl/r/rpl_temporary.result:
  update result file
mysql-test/suite/rpl/r/rpl_temporary_errors.result:
  update result file
mysql-test/suite/rpl/r/rpl_test_framework.result:
  updated result file
mysql-test/suite/rpl/r/rpl_timezone.result:
  Updated result file
mysql-test/suite/rpl/r/rpl_tmp_table_and_DDL.result:
  update result file
mysql-test/suite/rpl/r/rpl_trigger.result:
  update result file
mysql-test/suite/rpl/r/rpl_trunc_temp.result:
  update result file
mysql-test/suite/rpl/r/rpl_truncate_2myisam.result:
  update result file
mysql-test/suite/rpl/r/rpl_truncate_3innodb.result:
  update result file
mysql-test/suite/rpl/r/rpl_typeconv_innodb.result:
  update result file
mysql-test/suite/rpl/r/rpl_udf.result:
  update result file
mysql-test/suite/rpl/r/rpl_user.result:
  update result file
mysql-test/suite/rpl/r/rpl_user_variables.result:
  update result file
mysql-test/suite/rpl/r/rpl_variables.result:
  update result file
mysql-test/suite/rpl/r/rpl_variables_stm.result:
  update result file
mysql-test/suite/rpl/r/rpl_view.result:
  update result file
mysql-test/suite/rpl/t/rpl000017-slave.sh:
  Moved contents of -slave.sh into test.
mysql-test/suite/rpl/t/rpl_000010-slave.opt:
  make all rpl tests use prefix rpl_
mysql-test/suite/rpl/t/rpl_000010.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_000011.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_000013.test:
  Made test clean up replication state.
  Replaced save_master_pos/connection slave/sync_with_master
  by sync_slave_with_master.
mysql-test/suite/rpl/t/rpl_000017-slave.opt:
  make all rpl tests use prefix rpl_
mysql-test/suite/rpl/t/rpl_000017.test:
  Moved contents of -slave.sh into .test
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_EE_err.test:
  cosmetic fixes
mysql-test/suite/rpl/t/rpl_LD_INFILE.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_alter.test:
  made test clean up after itself
  replaced rpl_diff_tables by diff_tables
  cosmetic fixes
mysql-test/suite/rpl/t/rpl_alter_db.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_auto_increment.test:
  cosmetic fixes
mysql-test/suite/rpl/t/rpl_auto_increment_11932.test:
  Made test clean up replication state.
  don't drop database twice
mysql-test/suite/rpl/t/rpl_auto_increment_bug33029.test:
  - This test replicates, so moved it to rpl suite.
  - This test uses a fake relay log, so use
    include/setup_fake_relay_log.inc and cleanup_fake_relay_log.inc
    instead of ad-hoc code.
  - Made test clean up replication state (rpl_end.inc)
mysql-test/suite/rpl/t/rpl_auto_increment_update_failure.test:
  - Made test clean up replication state.
  - diff_tables.inc now takes only one parameter.
mysql-test/suite/rpl/t/rpl_begin_commit_rollback.test:
  renamed rpl_end.inc to master-slave-end.inc
mysql-test/suite/rpl/t/rpl_binlog_corruption-master.opt:
  Got rid of useless -master.opt file.
mysql-test/suite/rpl/t/rpl_binlog_corruption.test:
  Made test clean up replication state.
  Made test execute on slave connection instead of on master connection.
  This allows us to get rid of -master.opt file.
mysql-test/suite/rpl/t/rpl_binlog_errors.test:
  made test use rpl_restart_server.inc instead of restart_mysqld.inc
mysql-test/suite/rpl/t/rpl_binlog_grant.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_binlog_max_cache_size.test:
  - Made test clean up replication state.
  - replaced wait_for_slave_sql_to_stop.inc by
    wait_for_slave_sql_error_and_skip.inc
  - renamed diff_master_slave.inc to rpl_diff.inc and
    renamed $diff_statement to $rpl_diff_statement
mysql-test/suite/rpl/t/rpl_bit.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_bit_npk.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_blackhole.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_bug26395.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_bug31076.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_bug33931.test:
  Made test clean up replication state.
  Made test use source include/master-slave.inc instead of
  ad-hoc setup.
mysql-test/suite/rpl/t/rpl_bug38694.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_change_master.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_charset.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_charset_sjis.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.cnf:
  Use new names of mtr variables (introduced by the changes in
  include/circular_rpl_init.inc).
mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.test:
  - Use rpl_init.inc instead of circular_rpl_for_4_hosts.inc.
    Connections have been renamed (server_[1234] instead of master_[abcd]),
    we use rpl_sync.inc instead of circular_rpl_for_4_hosts_sync.inc,
    we use the new rpl_end.inc to clean up instead of doing it
    manually, and we use rpl_change_topology.inc instead of manual
    reconfiguration.
  - Added comment to make test understandable.
  - the test contained a race condition. server_4 was not sync'ed. This could
    cause sql_slave_skip_counter to have the value 1 when the test ended, so
    check-testcase would complain. Added 'sync_slave_with_master server_4'.
mysql-test/suite/rpl/t/rpl_colSize.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_commit_after_flush.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_concurrency_error.test:
  - Made test clean up replication state.
  - renamed diff_master_slave.inc to rpl_diff.inc and
    renamed $diff_statement to $rpl_diff_statement
mysql-test/suite/rpl/t/rpl_conditional_comments.test:
  made test clean up after itself
  new protocol for diff_tables.inc
mysql-test/suite/rpl/t/rpl_create_database.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_create_if_not_exists.test:
  renamed master-slave-end.inc to rpl_end.inc
mysql-test/suite/rpl/t/rpl_create_tmp_table_if_not_exists.test:
  renamed master-slave-end.inc to rpl_end.inc
mysql-test/suite/rpl/t/rpl_critical_errors.test:
  Made test clean up replication state.
  Fixed syntax error in test.
mysql-test/suite/rpl/t/rpl_cross_version.test:
  Made test clean up replication state.
  Made test execute on slave connection instead of on master connection.
  This allows us to get rid of -master.opt file.
mysql-test/suite/rpl/t/rpl_current_user.cnf:
  use environment variables recognized by rpl_init.inc
mysql-test/suite/rpl/t/rpl_current_user.test:
  - Use rpl_init.inc instead of ad-hoc three-server setup.
    Hence, rename connection slave2 to server_3
  - don't drop lots of things at the beginning of the test
  - rpl_diff_tables.inc does not sync any more, so we have to
    sync here instead
  - renamed $diff_table to $rpl_diff_table and $diff_table_list
    to $rpl_diff_table_list
  - use diff_tables.inc instead of rpl_diff_tables.inc
mysql-test/suite/rpl/t/rpl_ddl.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_deadlock_innodb.test:
  cosmetic fixes
mysql-test/suite/rpl/t/rpl_delete_no_where.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_do_grant.test:
  Made test clean up replication state.
  renamed master-slave-end.inc to rpl_end.inc
  use include/check_slave_no_error.inc instead of ad-hoc construction
mysql-test/suite/rpl/t/rpl_drop.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_drop_db.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_drop_temp.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_drop_view.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_dual_pos_advance.test:
  Made test use the new framework for circular replication,
  instead of ad-hoc setup.
mysql-test/suite/rpl/t/rpl_empty_master_crash.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_err_ignoredtable.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_events.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_extra_col_master_innodb.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_extra_col_master_myisam.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_extra_col_slave_innodb.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_extra_col_slave_myisam.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_failed_optimize.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_filter_tables_not_exist.test:
  renamed master-slave-end.inc to rpl_end.inc
mysql-test/suite/rpl/t/rpl_flushlog_loop-master.opt:
  Removed useless options from -master.opt file.
mysql-test/suite/rpl/t/rpl_flushlog_loop-master.sh:
  Removed useless -master.sh file
mysql-test/suite/rpl/t/rpl_flushlog_loop-slave.opt:
  Removed useless options from -slave.opt file
mysql-test/suite/rpl/t/rpl_flushlog_loop-slave.sh:
  Removed useless -slave.sh file
mysql-test/suite/rpl/t/rpl_flushlog_loop.test:
  Made test use new framework for circular replication,
  instead of ad-hoc setup.
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_foreign_key_innodb.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_found_rows.test:
  Made test clean up replication state.
  replaced reset_master_and_slave.inc by rpl_reset.inc
mysql-test/suite/rpl/t/rpl_free_items.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_geometry.test:
  replaced master-slave-end.inc by rpl_end.inc
mysql-test/suite/rpl/t/rpl_get_lock.test:
  Made test clean up replication state.
  Replaced save_master_pos+connection slave+sync_with_master
  by sync_slave_with_master.
mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test:
  Made test clean up replication state.
  Removed last part of test, because it was verbatim identical to
  rpl_server_id1.test
mysql-test/suite/rpl/t/rpl_grant.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_idempotency.test:
  use check_slave_no_error.inc instead of ad-hoc tests
  use wait_for_slave_sql_error.inc instead of wait_for_slave_to_stop.inc
  replace master-slave-end.inc by rpl_end.inc
mysql-test/suite/rpl/t/rpl_ignore_grant.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_ignore_revoke.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_ignore_table.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_ignore_table_update.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_incident.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_init_slave.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_init_slave_errors.test:
  Made test clean up replication state.
  Also replaced call to wait_for_slave_sql_to_stop.inc by
  call to wait_for_slave_sql_error.inc
mysql-test/suite/rpl/t/rpl_innodb.test:
  replace master-slave-end.inc by rpl_end.inc
mysql-test/suite/rpl/t/rpl_innodb_bug28430.test:
  replace master-slave-end.inc by rpl_end.inc
mysql-test/suite/rpl/t/rpl_innodb_bug30888.test:
  replace master-slave-end.inc by rpl_end.inc
mysql-test/suite/rpl/t/rpl_innodb_mixed_ddl.test:
  cosmetic fixes
mysql-test/suite/rpl/t/rpl_innodb_mixed_dml.test:
  cosmetic fixes
mysql-test/suite/rpl/t/rpl_insert.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_insert_id.test:
  cosmetic fixes
mysql-test/suite/rpl/t/rpl_insert_id_pk.test:
  cosmetic fixes
mysql-test/suite/rpl/t/rpl_insert_ignore.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_insert_select.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_invoked_features.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_killed_ddl.test:
  - Made test clean up replication state.
  - renamed diff_master_slave.inc to rpl_diff.inc and
    renamed $diff_statement to $rpl_diff_statement
mysql-test/suite/rpl/t/rpl_known_bugs_detection.test:
  - Made test clean up replication state.
  - removed wait_for_slave_sql_to_stop.inc, because it already does
    wait_for_slave_sql_error.inc
mysql-test/suite/rpl/t/rpl_load_from_master.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_load_table_from_master.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_loaddata.test:
  cosmetic fixes
mysql-test/suite/rpl/t/rpl_loaddata_charset.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_loaddata_fatal.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_loaddata_m.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_loaddata_map.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_loaddata_s.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_loaddata_simple.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_loaddata_symlink.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_loaddatalocal.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_loadfile.test:
  - Made test clean up replication state.
  - replace reset_master_and_slave.inc by rpl_reset.inc
  - diff_tables.inc now takes only one parameter.
  - diff_tables.inc also restores the connection to what it was before,
    so in this test we have to manually change connection
    after sourcing diff_tables.inc
mysql-test/suite/rpl/t/rpl_locale.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_log_pos.test:
  Made test clean up replication state.
  replace stop_slave.inc by stop_slave_sql.inc since the io thread
  is already stopped.
mysql-test/suite/rpl/t/rpl_manual_change_index_file.test:
  use wait_for_slave_io_error.inc instead of wait_for_slave_to_stop.inc
  replace master-slave-end.inc by rpl_end.inc
mysql-test/suite/rpl/t/rpl_many_optimize.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_master_pos_wait.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_misc_functions.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_mixed_bit_pk.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_mixed_ddl_dml.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_multi_delete.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_multi_delete2.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_multi_engine.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_multi_update.test:
  cosmetic fixes
mysql-test/suite/rpl/t/rpl_multi_update2.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_multi_update3.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_multi_update4.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_mysql_upgrade.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_name_const.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_nondeterministic_functions.test:
  - Made test clean up replication state.
  - diff_tables.inc now takes only one parameter.
  - diff_tables.inc also restores the connection to what it was before,
    so in this test we have to manually change connection
    after sourcing diff_tables.inc
mysql-test/suite/rpl/t/rpl_not_null_innodb.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_not_null_myisam.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_optimize.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_packet.test:
  - Made test clean up replication state.
  - replace wait_for_slave_io_to_stop.inc by wait_for_slave_io_error.inc
  - replace master-slave-reset.inc by rpl_reset.inc + drop table t1.
  - replaced save_master_pos/connection slave/sync_with_master
    by sync_slave_with_master.
  - added comment explaining why we need stop_slave_sql.inc
    (we shouldn't need it, it's a bug)
mysql-test/suite/rpl/t/rpl_plugin_load.test:
  replace master-slave-end.inc by rpl_end.inc
mysql-test/suite/rpl/t/rpl_ps.test:
  Made test clean up replication state.
  removed lots os useless junk
mysql-test/suite/rpl/t/rpl_rbr_to_sbr.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_read_only.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_relay_space_innodb.test:
  cosmetic fixes
mysql-test/suite/rpl/t/rpl_relay_space_myisam.test:
  cosmetic fixes
mysql-test/suite/rpl/t/rpl_relayrotate.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_relayspace.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_replicate_do.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_replicate_ignore_db.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_report.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_rewrt_db.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_rotate_logs-slave.opt:
  Got rid of unnecessary -slave.opt file
mysql-test/suite/rpl/t/rpl_rotate_logs-slave.sh:
  Got rid of unnecessary -slave.sh file
mysql-test/suite/rpl/t/rpl_rotate_logs.test:
  - Made test clean up replication state.
  - replaced wait_for_slave_sql_to_stop.inc by
    wait_for_slave_sql_error_and_skip.inc
  - removed useless cleanup at beginning of test
  - did not make test use the standard replication framework
    (master-slave.inc + rpl_end.inc), because it won't work. i don't
    know why.
mysql-test/suite/rpl/t/rpl_row_001.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_row_4_bytes.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_row_NOW.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_row_USER.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_row_UUID.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test:
  Made test clean up replication state.
  Removed unnecessary 'set binlog_format'.
  replaced master-slave-reset.inc by rpl_reset.inc
mysql-test/suite/rpl/t/rpl_row_basic_2myisam.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_row_basic_3innodb.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_row_basic_8partition.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_row_blob_innodb.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_row_blob_myisam.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_row_colSize.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_row_conflicts.test:
  replace master-slave-end.inc by rpl_end.inc
mysql-test/suite/rpl/t/rpl_row_create_table.test:
  replace master-slave-end.inc by rpl_end.inc
  replace master-slave-reset.inc by rpl_reset.inc
  replace long sequence of reset master+reset slave by rpl_reset.inc
mysql-test/suite/rpl/t/rpl_row_delayed_ins.test:
  cosmetic fixes
mysql-test/suite/rpl/t/rpl_row_drop.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_row_find_row.test:
  - Made test clean up replication state.
  - replace master-slave-reset.inc by rpl_reset.inc
  - diff_tables.inc now takes only one parameter.
mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test:
  cosmetic fixes
mysql-test/suite/rpl/t/rpl_row_func001.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_row_func002.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_row_func003.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_row_inexist_tbl.test:
  Made test clean up replication state.
  replace wait_for_slave_sql_to_stop.inc by wait_for_slave_sql_error.inc
mysql-test/suite/rpl/t/rpl_row_insert_delayed.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_row_log.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_row_log_innodb.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_row_rec_comp_innodb.test:
  Made test clean up replication state
mysql-test/suite/rpl/t/rpl_row_rec_comp_myisam.test:
  - replace master-slave-reset.inc by rpl_reset.inc
  - Made test clean up replication state
  - diff_tables.inc now takes only one parameter.
mysql-test/suite/rpl/t/rpl_row_sp001.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_row_sp002_innodb.test:
  cosmetic fixes
mysql-test/suite/rpl/t/rpl_row_sp003.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_row_sp005.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_row_sp006_InnoDB.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_row_sp007_innodb.test:
  cosmetic fixes
mysql-test/suite/rpl/t/rpl_row_sp008.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_row_sp009.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_row_sp010.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_row_sp011.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_row_sp012.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_row_stop_middle_update.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_row_tabledefs_2myisam.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_row_tabledefs_3innodb.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_row_tbl_metadata.test:
  - replaced master-slave-reset.inc by rpl_reset.inc
  - replaced master-slave-end.inc by rpl_end.inc
  - diff_tables.inc now takes only one parameter.
mysql-test/suite/rpl/t/rpl_row_trig001.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_row_trig002.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_row_trig003.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_row_trig004.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_row_trunc_temp.test:
  replaced master-slave-end.inc by rpl_end.inc
mysql-test/suite/rpl/t/rpl_row_unsafe_funcs.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_row_until.test:
  Made test clean up replication state.
  Removed unused mtr variable $VERSION.
mysql-test/suite/rpl/t/rpl_row_view01.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_row_wide_table.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_server_id1.test:
  - Replaced ad-hoc setup of circular replication by call to rpl_init.inc
  - Made test clean up replication state.
  - Replaced ad-hoc use of wait_for_slave_param.inc by
    wait_for_slave_io_error.inc
mysql-test/suite/rpl/t/rpl_server_id2.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_session_var.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_set_charset.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_set_null_innodb.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_set_null_myisam.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_show_slave_running.test:
  made test clean up replication state
mysql-test/suite/rpl/t/rpl_skip_error.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_slave_grp_exec.test:
  - Made test clean up replication state.
  - replaced wait_for_slave_sql_to_stop.inc by wait_for_slave_sql_error.inc
  - replaced stop_slave.inc by stop_slave_io.inc where the sql thread
    was already stopped.
mysql-test/suite/rpl/t/rpl_slave_load_in.test:
  - Made test clean up replication state.
  - diff_tables.inc now takes only one parameter.
mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_slave_load_tmpdir_not_exist.test:
  - Made test clean up replication state.
  - Replaced call to wait_for_slave_sql_to_stop.inc by call to
    wait_for_slave_sql_error.inc
  - Replaced ad-hoc repliction setup by call to master-slave.inc
mysql-test/suite/rpl/t/rpl_slave_skip.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_slave_status.test:
  Made test clean up replication state.
  replaced check that IO thread has stopped by wait_for_slave_io_error.inc
  simplified cleanup code
mysql-test/suite/rpl/t/rpl_slow_query_log.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_sp.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_sp004.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_sp_effects.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_sporadic_master.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_ssl.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_ssl1.test:
  Made test clean up replication state.
  Replaced save_master_pos+connection slave+sync_slave_with_master
  by sync_slave_with_master
mysql-test/suite/rpl/t/rpl_start_stop_slave.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_stm_000001.test:
  The include file extra/rpl_tests/rpl_stm_000001.test was only
  sourced once, in suite/rpl/t/rpl_stm_000001.test.
  Moved extra/rpl_tests/rpl_stm_000001.test to
  suite/rpl/t/rpl_stm_000001.test and removed the old
  suite/rpl/t/rpl_stm_000001.test.
  Also made test clean up replication state, and replaced
  wait_for_slave_sql_to_stop.inc by wait_for_slave_sql_error_and_skip.inc
mysql-test/suite/rpl/t/rpl_stm_000001.test:
  - The include file extra/rpl_tests/rpl_stm_000001.test was only
    sourced once, in suite/rpl/t/rpl_stm_000001.test.
    Moved extra/rpl_tests/rpl_stm_000001.test to
    suite/rpl/t/rpl_stm_000001.test and removed the old
    suite/rpl/t/rpl_stm_000001.test.
mysql-test/suite/rpl/t/rpl_stm_auto_increment_bug33029.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_stm_binlog_direct.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_stm_conflicts.test:
  replaced master-slave-end.inc by rpl_end.inc
  cosmetic fixes
mysql-test/suite/rpl/t/rpl_stm_create_if_not_exists.test:
  use rpl_end instead of master-slave-end.
mysql-test/suite/rpl/t/rpl_stm_flsh_tbls.test:
  cosmetic fixes
mysql-test/suite/rpl/t/rpl_stm_insert_delayed.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_stm_loadfile.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_stm_log.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_stm_max_relay_size.test:
  cosmetic fixes
mysql-test/suite/rpl/t/rpl_stm_mixing_engines.test:
  - replaced master-slave-end.inc by rpl_end.inc
  - replaced master-slave-reset.inc by rpl_reset.inc
  - diff_tables.inc now takes only one parameter.
mysql-test/suite/rpl/t/rpl_stm_multi_query.test:
  cosmetic fixes
mysql-test/suite/rpl/t/rpl_stm_no_op.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_stm_sql_mode.test:
  made test clean up replication state
mysql-test/suite/rpl/t/rpl_stm_until.test:
  - Made test clean up replication state.
  - replaced master-slave-reset.inc by rpl_reset.inc
  - the relay log is now called slave-relay-bin.000003 instead of .000004,
    because master-slave.inc doesn't rotate it as much as before.
mysql-test/suite/rpl/t/rpl_stop_slave.test:
  use rpl_end instead of master-slav-end
mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_temp_table.test:
  Made test clean up replication state.
  Replaced save_master_pos/connection slave/sync_with_master
  by sync_slave_with_master.
mysql-test/suite/rpl/t/rpl_temp_table_mix_row.test:
  Made test clean up replication state.
  replaced ad-hoc call to 'connect' by include/rpl_connect.inc
  replaced master-slave-reset.inc by rpl_reset.inc
mysql-test/suite/rpl/t/rpl_temporary.test:
  - Made test clean up replication state.
  - This test sources include/delete_anonymous_users.inc on master.
    This means it updates the user table in the mysql database manually
    on the master. This causes failure in the slave sql thread when
    binlog_format=row. Hence, we stop the slave first and source
    include/delete_anonymous_users.inc on both master and slave.
mysql-test/suite/rpl/t/rpl_temporary_errors.test:
  Made test clean up replication state.
  cosmetic fixes
mysql-test/suite/rpl/t/rpl_test_framework.cnf:
  new cfg file for new test
mysql-test/suite/rpl/t/rpl_test_framework.test:
  new test case that verifies that include/rpl_change_topology.inc
  works
mysql-test/suite/rpl/t/rpl_timezone.test:
  - Made test clean up replication state.
  - stop slave before last sub-test, because that test does not use
    the slave connection.
mysql-test/suite/rpl/t/rpl_tmp_table_and_DDL.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_trigger.test:
  - Made test clean up replication state.
  - replace master-slave-reset.inc by rpl_reset.inc
  - use new file rpl_reconnect.inc instead of ad-hoc code
  - diff_tables.inc now takes only one parameter.
mysql-test/suite/rpl/t/rpl_trunc_temp.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_truncate_2myisam.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_truncate_3innodb.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_typeconv_innodb.test:
  - made test clean up replication state
  - removed unnecessary call to master-slave-reset.inc
  - diff_tables.inc now takes only one parameter.
mysql-test/suite/rpl/t/rpl_udf.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_user.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_user_variables.test:
  Made test clean up replication state.
mysql-test/suite/rpl/t/rpl_variables.test:
  - Made test clean up replication state.
  - replaced reset_master_and_slave.inc by rpl_reset.inc
  - diff_tables.inc now takes only one parameter.
mysql-test/suite/rpl/t/rpl_variables_stm.test:
  - Made test clean up replication state.
  - diff_tables.inc now takes only one parameter.
mysql-test/suite/rpl/t/rpl_view.test:
  Made test clean up replication state.
mysql-test/suite/rpl_ndb/r/rpl_ndb_2other.result:
  updated result file
mysql-test/suite/rpl_ndb/r/rpl_ndb_UUID.result:
  updated result file
mysql-test/suite/rpl_ndb/r/rpl_ndb_apply_status.result:
  updated result file
mysql-test/suite/rpl_ndb/r/rpl_ndb_auto_inc.result:
  updated result file
mysql-test/suite/rpl_ndb/r/rpl_ndb_basic.result:
  updated result file
mysql-test/suite/rpl_ndb/r/rpl_ndb_blob.result:
  updated result file
mysql-test/suite/rpl_ndb/r/rpl_ndb_blob2.result:
  updated result file
mysql-test/suite/rpl_ndb/r/rpl_ndb_circular.result:
  updated result file
mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_2ch.result:
  updated result file
mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_simplex.result:
  updated result file
mysql-test/suite/rpl_ndb/r/rpl_ndb_commit_afterflush.result:
  updated result file
mysql-test/suite/rpl_ndb/r/rpl_ndb_ctype_ucs2_def.result:
  updated result file
mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_basic.result:
  updated result file
mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_partitions.result:
  updated result file
mysql-test/suite/rpl_ndb/r/rpl_ndb_ddl.result:
  updated result file
mysql-test/suite/rpl_ndb/r/rpl_ndb_delete_nowhere.result:
  updated result file
mysql-test/suite/rpl_ndb/r/rpl_ndb_do_db.result:
  updated result file
mysql-test/suite/rpl_ndb/r/rpl_ndb_do_table.result:
  updated result file
mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result:
  updated result file
mysql-test/suite/rpl_ndb/r/rpl_ndb_func003.result:
  updated result file
mysql-test/suite/rpl_ndb/r/rpl_ndb_idempotent.result:
  updated result file
mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb2ndb.result:
  updated result file
mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb_trans.result:
  updated result file
mysql-test/suite/rpl_ndb/r/rpl_ndb_insert_ignore.result:
  updated result file
mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result:
  updated result file
mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_engines_transactions.result:
  updated result file
mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_tables.result:
  updated result file
mysql-test/suite/rpl_ndb/r/rpl_ndb_multi.result:
  updated result file
mysql-test/suite/rpl_ndb/r/rpl_ndb_multi_update2.result:
  updated result file
mysql-test/suite/rpl_ndb/r/rpl_ndb_multi_update3.result:
  updated result file
mysql-test/suite/rpl_ndb/r/rpl_ndb_myisam2ndb.result:
  updated result file
mysql-test/suite/rpl_ndb/r/rpl_ndb_rep_ignore.result:
  updated result file
mysql-test/suite/rpl_ndb/r/rpl_ndb_row_001.result:
  updated result file
mysql-test/suite/rpl_ndb/r/rpl_ndb_set_null.result:
  updated result file
mysql-test/suite/rpl_ndb/r/rpl_ndb_sp003.result:
  updated result file
mysql-test/suite/rpl_ndb/r/rpl_ndb_sp006.result:
  updated result file
mysql-test/suite/rpl_ndb/r/rpl_ndb_stm_innodb.result:
  updated result file
mysql-test/suite/rpl_ndb/r/rpl_ndb_sync.result:
  updated result file
mysql-test/suite/rpl_ndb/r/rpl_ndb_trig004.result:
  updated result file
mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result:
  updated result file
mysql-test/suite/rpl_ndb/r/rpl_truncate_7ndb.result:
  updated result file
mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb.test:
  made test clean up replication state
mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam.test:
  made test clean up replication state
mysql-test/suite/rpl_ndb/t/rpl_ndb_2ndb.test:
  made test clean up replication state
mysql-test/suite/rpl_ndb/t/rpl_ndb_2other.test:
  made test clean up replication state
mysql-test/suite/rpl_ndb/t/rpl_ndb_UUID.test:
  made test clean up replication state
mysql-test/suite/rpl_ndb/t/rpl_ndb_apply_status.test:
  made test clean up replication state
mysql-test/suite/rpl_ndb/t/rpl_ndb_auto_inc.test:
  made test clean up replication state
mysql-test/suite/rpl_ndb/t/rpl_ndb_bank.test:
  made test clean up replication state
mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test:
  - replaced master-slave-end.inc by rpl_end.inc
  - removed wait_for_slave_sql_to_stop since it is followed by
    wait_for_slave_sql_error.inc
mysql-test/suite/rpl_ndb/t/rpl_ndb_blob.test:
  made test clean up replication state
mysql-test/suite/rpl_ndb/t/rpl_ndb_blob2.test:
  made test clean up replication state
mysql-test/suite/rpl_ndb/t/rpl_ndb_circular.test:
  made test use rpl_init.inc to setup circular replication, instead of ad-hoc setup
  made test clean up replication state
mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_2ch.cnf:
  removed automatic configuration of server as slave. this is not
  needed because rpl_init.inc does it.
mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_2ch.test:
  - made test clean up replication state
  - it seems that sync_slave_with_master does not work deterministically
    here, so instead we wait for 'drop table' to replicate by checking
    when the table disappears on slave.
  - diff_tables.inc now takes only one parameter.
mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_simplex.test:
  make test clean up replication state
  use rpl_change_topology.inc to reconfigure replication topology,
  instead of ad-hoc call to change master
mysql-test/suite/rpl_ndb/t/rpl_ndb_commit_afterflush.test:
  make test clean up replication state
mysql-test/suite/rpl_ndb/t/rpl_ndb_ctype_ucs2_def.test:
  make test clean up replication state
mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_basic.test:
  replace master-slave-end.inc by rpl_end.inc
mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_partitions.test:
  make test clean up replication state
mysql-test/suite/rpl_ndb/t/rpl_ndb_ddl.test:
  make test clean up replication state
mysql-test/suite/rpl_ndb/t/rpl_ndb_delete_nowhere.test:
  make test clean up replication state
mysql-test/suite/rpl_ndb/t/rpl_ndb_do_db.test:
  make test clean up replication state
mysql-test/suite/rpl_ndb/t/rpl_ndb_do_table.test:
  make test clean up replication state
mysql-test/suite/rpl_ndb/t/rpl_ndb_extraCol.test:
  make test clean up replication state
mysql-test/suite/rpl_ndb/t/rpl_ndb_func003.test:
  replace master-slave-end.inc by rpl_end.inc
mysql-test/suite/rpl_ndb/t/rpl_ndb_idempotent.test:
  replace master-slave-end.inc by rpl_end.inc
mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb.test:
  make test clean up replication state
mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb_trans.test:
  make test clean up replication state
mysql-test/suite/rpl_ndb/t/rpl_ndb_insert_ignore.test:
  make test clean up replication state
mysql-test/suite/rpl_ndb/t/rpl_ndb_load.test:
  make test clean up replication state
mysql-test/suite/rpl_ndb/t/rpl_ndb_log.test:
  make test clean up replication state
mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_engines_transactions.test:
  - replace master-slave-end.inc by rpl_end.inc
  - diff_tables.inc now takes only one parameter.
mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables.test:
  - make test clean up replication state
  - diff_tables.inc now takes only one parameter.
mysql-test/suite/rpl_ndb/t/rpl_ndb_multi.test:
  - make test clean up replication state
  - use rpl_change_topology.inc to change replication topology,
    instead of ad-hoc calls to change master
mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update2.test:
  make test clean up replication state
mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update3.test:
  make test clean up replication state
mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb.test:
  make test clean up replication state
mysql-test/suite/rpl_ndb/t/rpl_ndb_relayrotate.test:
  make test clean up replication state
mysql-test/suite/rpl_ndb/t/rpl_ndb_rep_ignore.test:
  make test clean up replication state
mysql-test/suite/rpl_ndb/t/rpl_ndb_row_001.test:
  make test clean up replication state
mysql-test/suite/rpl_ndb/t/rpl_ndb_set_null.test:
  make test clean up replication state
mysql-test/suite/rpl_ndb/t/rpl_ndb_sp003.test:
  make test clean up replication state
mysql-test/suite/rpl_ndb/t/rpl_ndb_sp006.test:
  make test clean up replication state
mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb.test:
  make test clean up replication state
mysql-test/suite/rpl_ndb/t/rpl_ndb_sync.test:
  make test clean up replication state
mysql-test/suite/rpl_ndb/t/rpl_ndb_trig004.test:
  make test clean up replication state
mysql-test/suite/rpl_ndb/t/rpl_ndbapi_multi.test:
  make test clean up replication state
mysql-test/suite/rpl_ndb/t/rpl_row_basic_7ndb.test:
  replace master-slave-end.inc by rpl_end.inc
mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb.test:
  replace master-slave-end.inc by rpl_end.inc
mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb_2.test:
  make test clean up replication state
mysql-test/suite/sys_vars/t/rpl_init_slave_func.test:
  made test clean up after itself
mysql-test/t/init_file.test:
  use new file force_restart.inc instead of SP
2010-12-19 18:07:28 +01:00
Sven Sandberg
09c80e12c5 BUG#49978: Replication tests don't clean up replication state at the end
Major replication test framework cleanup. This does the following:
 - Ensure that all tests clean up the replication state when they
   finish, by making check-testcase check the output of SHOW SLAVE STATUS.
   This implies:
    - Slave must not be running after test finished. This is good
      because it removes the risk for sporadic errors in subsequent
      tests when a test forgets to sync correctly.
    - Slave SQL and IO errors must be cleared when test ends. This is
      good because we will notice if a test gets an unexpected error in
      the slave threads near the end.
    - We no longer have to clean up before a test starts.
 - Ensure that all tests that wait for an error in one of the slave
   threads waits for a specific error. It is no longer possible to
   source wait_for_slave_[sql|io]_to_stop.inc when there is an error
   in one of the slave threads. This is good because:
    - If a test expects an error but there is a bug that causes
      another error to happen, or if it stops the slave thread without
      an error, then we will notice.
    - When developing tests, wait_for_*_to_[start|stop].inc will fail
      immediately if there is an error in the relevant slave thread.
      Before this patch, we had to wait for the timeout.
 - Remove duplicated and repeated code for setting up unusual replication
   topologies. Now, there is a single file that is capable of setting
   up arbitrary topologies (include/rpl_init.inc, but
   include/master-slave.inc is still available for the most common
   topology). Tests can now end with include/rpl_end.inc, which will clean
   up correctly no matter what topology is used. The topology can be
   changed with include/rpl_change_topology.inc.
 - Improved debug information when tests fail. This includes:
    - debug info is printed on all servers configured by include/rpl_init.inc
    - User can set $rpl_debug=1, which makes auxiliary replication files
      print relevant debug info.
 - Improved documentation for all auxiliary replication files. Now they
   describe purpose, usage, parameters, and side effects.
 - Many small code cleanups:
    - Made have_innodb.inc output a sensible error message.
    - Moved contents of rpl000017-slave.sh into rpl000017.test
    - Added mysqltest variables that expose the current state of
      disable_warnings/enable_warnings and friends.
    - Too many to list here: see per-file comments for details.
2010-12-19 18:07:28 +01:00
Georgi Kodinov
b908a74bc9 merge 2010-12-16 16:40:52 +02:00
Georgi Kodinov
7bdecb1d4a merge 2010-12-16 16:40:52 +02:00
Bjorn Munch
e7a29acfb4 merge from 5.5-mtr 2010-12-09 20:53:22 +01:00
Bjorn Munch
5a95f0aeb1 upmerge 58511,58522,58608,58092 2010-12-09 15:32:39 +01:00
Bjorn Munch
1008827107 Bug #58511 mysqltest doesn't always run statements in ps mode
mysqltest checks if the stmt is one that should be run in ps mode,
  but regexp doesn't match if preceeded by /* */ comment.
Fix: match function will jump over /*..*/ if found at start
2010-12-09 14:43:42 +01:00
Bjorn Munch
e70cb01d08 Bug #58522 mtr --debug leaks memory when test fails
Backported use of setenv() from 5.5
This will remove the leak on systems that have setenv()
I have not fixed the string.c leak, it's a local variable
   that the cleanup function cannot access.
2010-12-09 14:42:04 +01:00
Bjorn Munch
06790ea7be Bug #58695 mysqltest coredumps on "if($x == ){"
Add check that there is a RHS of the expression
Added to mysqltest.test
2010-12-09 12:15:25 +01:00
Bjorn Munch
81d29b1d82 Bug #58710 Valgrind warnings in mysqltest
Var's string value was not 0-terminated if intially null.
While at it, also removed some reported memory leaks
Added sanity check, setting val_len=0 if val==0
2010-12-09 12:14:00 +01:00
Bjorn Munch
09889ea2c3 merge from 5.5-mtr 2010-12-09 20:53:22 +01:00
Bjorn Munch
f072749e06 upmerge 58511,58522,58608,58092 2010-12-09 15:32:39 +01:00
Bjorn Munch
bff782d0f0 Bug #58511 mysqltest doesn't always run statements in ps mode
mysqltest checks if the stmt is one that should be run in ps mode,
  but regexp doesn't match if preceeded by /* */ comment.
Fix: match function will jump over /*..*/ if found at start
2010-12-09 14:43:42 +01:00
Bjorn Munch
83e7edde87 Bug #58522 mtr --debug leaks memory when test fails
Backported use of setenv() from 5.5
This will remove the leak on systems that have setenv()
I have not fixed the string.c leak, it's a local variable
   that the cleanup function cannot access.
2010-12-09 14:42:04 +01:00
Bjorn Munch
955f42588e Bug #58695 mysqltest coredumps on "if($x == ){"
Add check that there is a RHS of the expression
Added to mysqltest.test
2010-12-09 12:15:25 +01:00
Bjorn Munch
57f7b9f468 Bug #58710 Valgrind warnings in mysqltest
Var's string value was not 0-terminated if intially null.
While at it, also removed some reported memory leaks
Added sanity check, setting val_len=0 if val==0
2010-12-09 12:14:00 +01:00
Bjorn Munch
50d1f9f368 merge from 5.1-mtr 2010-12-09 20:32:47 +01:00
Bjorn Munch
7a404214e0 merge from 5.1-mtr 2010-12-09 20:32:47 +01:00
Bjorn Munch
cc21483fcf Bug #58092 Test "rpl_cross_version" has "copy_file" failing
I am not fixing the test failure
Adds printing of my_errno when commands fail, could hopefully help
2010-12-01 11:11:16 +01:00
Bjorn Munch
9dca123d02 Bug #58092 Test "rpl_cross_version" has "copy_file" failing
I am not fixing the test failure
Adds printing of my_errno when commands fail, could hopefully help
2010-12-01 11:11:16 +01:00
Michael Widenius
1e5061fe3b merge with 5.1 2010-11-30 23:11:03 +02:00
Davi Arnaut
e1e81ceb83 Merge of mysql-5.1-bugteam into mysql-5.5-bugteam. 2010-11-30 17:06:53 -02:00
Davi Arnaut
1ab37fd3c0 Merge of mysql-5.1-bugteam into mysql-5.5-bugteam. 2010-11-30 17:06:53 -02:00
Bjorn Munch
d6df320d9e merge from 5.5-mtr 2010-11-27 11:52:17 +01:00
Bjorn Munch
d2fb19855e merge from 5.5-mtr 2010-11-27 11:52:17 +01:00
Davi Arnaut
d5e928959e Bug#51817: incorrect assumption: thd->query at 0x2ab2a8360360 is an invalid pointer
The problem is that the logic which checks if a pointer is
valid relies on a poor heuristic based on the start and end
addresses of the data segment and heap.

Apart from miscalculating the heap bounds, this approach also
suffers from the fact that memory can come from places other
than the heap. See Bug#58528 for a more detailed explanation.

On Linux, the solution is to access the process's memory
through /proc/self/task/<tid>/mem, which allows for retrieving
the contents of pages within the virtual address space of
the calling process. If a address range is not mapped, a
input/output error is returned.

client/mysqltest.cc:
  Use new interface to my_safe_print_str.
include/my_stacktrace.h:
  Drop name from my_safe_print_str.
mysys/stacktrace.c:
  Access the process's memory through a file descriptor and
  dump the contents of the memory range. The file descriptor
  offset is equivalent to a offset into the address space.
  
  Do not print the name of the variable associated with the
  address. It can be better accomplished at a higher level.
sql/mysqld.cc:
  Put the variable dumping information within its own newline block.
  Use symbolic names which better convey information to the user.
2010-11-26 19:59:10 -02:00
Davi Arnaut
0008e06489 Bug#51817: incorrect assumption: thd->query at 0x2ab2a8360360 is an invalid pointer
The problem is that the logic which checks if a pointer is
valid relies on a poor heuristic based on the start and end
addresses of the data segment and heap.

Apart from miscalculating the heap bounds, this approach also
suffers from the fact that memory can come from places other
than the heap. See Bug#58528 for a more detailed explanation.

On Linux, the solution is to access the process's memory
through /proc/self/task/<tid>/mem, which allows for retrieving
the contents of pages within the virtual address space of
the calling process. If a address range is not mapped, a
input/output error is returned.
2010-11-26 19:59:10 -02:00
Bjorn Munch
ca2ea5541e Bug #58412 mysqltest: allow quoting of strings in let and in if comparison
Stripping quotes in let was a bad idea, will not fix
Added code to strip quotes from rhs in comparisons
2010-11-26 10:57:01 +01:00
Bjorn Munch
20851e4012 Bug #58412 mysqltest: allow quoting of strings in let and in if comparison
Stripping quotes in let was a bad idea, will not fix
Added code to strip quotes from rhs in comparisons
2010-11-26 10:57:01 +01:00
Sergei Golubchik
65ca700def merge.
checkpoint.
does not compile.
2010-11-25 18:17:28 +01:00
Michael Widenius
1a6373e8e2 Merge with MySQL 5.1.53
Open issues:
- A better fix for #57688; Igor is working on this
- Test failure in index_merge_innodb.test ; Igor promised to look at this
- Some Innodb tests fails (need to merge with latest xtradb) ; Kristian promised to look at this.
 - Failing tests: innodb_plugin.innodb_bug56143 innodb_plugin.innodb_bug56632 innodb_plugin.innodb_bug56680 innodb_plugin.innodb_bug57255 
- Werror is disabled;  Should be enabled after merge with xtradb.
2010-11-25 00:57:34 +02:00
Michael Widenius
b52020221e Merge with MySQL 5.1.52 2010-11-23 23:39:59 +02:00
Ramil Kalimullin
65116d3408 Manual-merge from mysql-5.1-bugteam. 2010-11-22 12:21:10 +03:00
Ramil Kalimullin
0628752fe9 Manual-merge from mysql-5.1-bugteam. 2010-11-22 12:21:10 +03:00
Bjorn Munch
6580097adc merge from 5.1-mtr 2010-11-19 10:29:08 +01:00
Bjorn Munch
b295a25109 merge from 5.1-mtr 2010-11-19 10:29:08 +01:00
Bjorn Munch
5da7193a7b upmerge 58257 2010-11-18 16:41:35 +01:00
Bjorn Munch
374c6447ca upmerge 58257 2010-11-18 16:41:35 +01:00
Bjorn Munch
32ea070845 Bug #58257 mysqltest: in if(), ! $var with space is always false
Evaluation would start with the space and thus ignore the $
Added while() to skip past white space
2010-11-17 16:05:52 +01:00
Bjorn Munch
d718af063e Bug #58257 mysqltest: in if(), ! $var with space is always false
Evaluation would start with the space and thus ignore the $
Added while() to skip past white space
2010-11-17 16:05:52 +01:00
Bjorn Munch
196b1cc79e avoid compilation warning about incomplete switch 2010-11-19 12:35:53 +01:00
Bjorn Munch
dfca5156c3 merge from 5.5-mtr 2010-11-19 11:26:43 +01:00
Bjorn Munch
f45b6605a2 avoid compilation warning about incomplete switch 2010-11-19 12:35:53 +01:00
Bjorn Munch
0b260aca41 merge from 5.5-mtr 2010-11-19 11:26:43 +01:00
Bjorn Munch
32b7c75073 upmerge 58087 2010-11-17 11:18:52 +01:00
Bjorn Munch
f6b1d5a63e upmerge 58087 2010-11-17 11:18:52 +01:00
Mattias Jonsson
21bc09c26b post-push fix, backported --replace_result patch
for --list_files in mysqltest.

client/mysqltest.cc:
  Backported --replace_result for --list_files.
mysql-test/r/mysqltest.result:
  updated test.
mysql-test/t/mysqltest.test:
  added test for replace_result on list_files.
2010-11-17 10:13:57 +01:00
Mattias Jonsson
d25e3389f4 post-push fix, backported --replace_result patch
for --list_files in mysqltest.
2010-11-17 10:13:57 +01:00
Bjorn Munch
92a1a11203 Bug #58087 mysqltest re-evaluates 'let' expressions infinitely
Results from query is sent for evaluation
Break recursion by asking for ` to be ignored
2010-11-15 14:23:02 +01:00
Bjorn Munch
9142f7462b Bug #58087 mysqltest re-evaluates 'let' expressions infinitely
Results from query is sent for evaluation
Break recursion by asking for ` to be ignored
2010-11-15 14:23:02 +01:00
Magnus Blåudd
a557a66145 Bug#58195 Make mysqltest poll for next epoch more often
- Speed up replicated NDB test by havin mysqltest poll every 100ms (instead
   of every second) in sync_master_with_slave. Default epoch
   timeout is 100ms, so that make sense.
2010-11-15 10:51:59 +01:00
Magnus Blåudd
87ab418119 Bug#58195 Make mysqltest poll for next epoch more often
- Speed up replicated NDB test by havin mysqltest poll every 100ms (instead
   of every second) in sync_master_with_slave. Default epoch
   timeout is 100ms, so that make sense.
2010-11-15 10:51:59 +01:00
Bjorn Munch
22ae28d3e1 merge from 5.5 2010-11-14 13:24:29 +01:00
Bjorn Munch
5e51571f7b merge from 5.5 2010-11-14 13:24:29 +01:00
Bjorn Munch
dbbb506f42 merge from 5.1 up to rev 3471 2010-11-14 12:23:51 +01:00
Bjorn Munch
2ab2426104 merge from 5.1 up to rev 3471 2010-11-14 12:23:51 +01:00
Bjorn Munch
3fab294616 Bug #57276 mysqltest: add support for simple compares in if/while conditions
Added more parsing in do_block()
      Limitation: left operand must be variable
      Also changed var_set_int from 57036 to var_check_int
      Added tests to mysqltest.test
      Some tests can now be simplified but will take this later
      Updated after comments, now white space around operator not needed
2010-11-10 09:42:14 +01:00
Bjorn Munch
28f60d525a Bug #57276 mysqltest: add support for simple compares in if/while conditions
Added more parsing in do_block()
      Limitation: left operand must be variable
      Also changed var_set_int from 57036 to var_check_int
      Added tests to mysqltest.test
      Some tests can now be simplified but will take this later
      Updated after comments, now white space around operator not needed
2010-11-10 09:42:14 +01:00
Sergei Golubchik
bc2e383e4a mysql-5.1 -> mysql-5.5 merge 2010-11-05 10:59:51 +01:00
Michael Widenius
7647c2744c Automatic merge with MariaDB 5.1 2010-11-04 17:08:28 +02:00
Michael Widenius
3797ca41b3 Automatic merge with 5.1 2010-11-04 16:53:10 +02:00
unknown
e55c4836a1 MBug#643463: slow XtraDB shutdown due to 10 second sleep in purge thread
Implement os_event_wait_time() for POSIX systems.

In the purge thread, use os_event_wait_time() when sleeping rather than sleep,
and signal the event when server shuts down, so we do not need to wait for
upto 10 seconds until the purge thread wakes up.

Also fix bug that warnings that were pushed after we call set_ok_status() were
not included in the waning count sent to the client in the result packet.

Also in mysqltest, in recursive die() invocation at least print the message
before aborting.

client/mysqltest.cc:
  If we detect recursive die(), at least print the message before aborting.
mysql-test/r/warnings_debug.result:
  Test case.
mysql-test/t/warnings_debug.test:
  Test case.
sql/handler.cc:
  Force generation of a warning with specific debug option, for testing.
sql/protocol.cc:
  Fix wrong DBUG_ENTER
sql/sql_class.h:
  Add method to count warnings pushed after set_ok_status() is called.
sql/sql_error.cc:
  Also count warnings pushed after set_ok_status() is called.
storage/xtradb/include/os0sync.h:
  Implement working os_sync_wait_time() for POSIX.
storage/xtradb/include/srv0srv.h:
  Make the purge thread wait for an event when sleeping, so we can signal it to
  wakeup immediately at shutdown.
storage/xtradb/log/log0log.c:
  Make the purge thread wait for an event when sleeping, so we can signal it to
  wakeup immediately at shutdown.
storage/xtradb/os/os0sync.c:
  Implement working os_sync_wait_time() for POSIX.
storage/xtradb/srv/srv0srv.c:
  Make the purge thread wait for an event when sleeping, so we can signal it to
  wakeup immediately at shutdown.
2010-11-03 22:40:53 +01:00
Michael Widenius
20acfbf30d Fix for: LP #634955: Assert in _ma_update_at_original_place()
Added locking of lock mutex when updating status in external_unlock() for Aria and MyISAM tables.
Fixed that 'source' command doesn't cause mysql command line tool to exit on error.
DEBUG_EXECUTE() and DEBUG_EVALUATE_IF() should not execute things based on wildcards. (Allows one to run --debug with mysql-test-run scripts that uses @debug)
Fixed several core dump, deadlock and crashed table bugs in handling of LOCK TABLE with MERGE tables:
- Added priority of locks to avoid crashes with MERGE tables.
- Added thr_lock_merge() to allow one to merge two results of thr_lock().
Fixed 'not found row' bug in REPLACE with Aria tables.
Mark MyISAM tables that are part of MERGE with HA_OPEN_MERGE_TABLE and set the locks to have priority THR_LOCK_MERGE_PRIV.
- By sorting MERGE tables last in thr_multi_unlock() it's safer to release and relock them many times (can happen when TRIGGERS are created)
Avoid printing (null) in debug file (to easier find out wrong NULL pointer usage with %s).



client/mysql.cc:
  Fixed that 'source' command doesn't cause mysql command line tool to exit on error.
client/mysqltest.cc:
  Don't send NULL to fn_format(). (Can cause crash on Solaris when using --debug)
dbug/dbug.c:
  DEBUG_EXECUTE() and DEBUG_EVALUATE_IF() should not execute things based on wildcards.
include/my_base.h:
  Added flag to signal if one opens a MERGE table.
  Added extra() command to signal that one is not part of a MERGE table anymore.
include/thr_lock.h:
  Added priority for locks (needed to fix bug in thr_lock when using MERGE tables)
  Added option to thr_unlock() if get_status() should be called.
  Added prototype for thr_merge_locks().
mysql-test/mysql-test-run.pl:
  Ignore crashed table warnings for tables named 'crashed'.
mysql-test/r/merge.result:
  Renamed triggers to make debugging easier.
  Added some CHECK TABLES to catch errors earlier.
  Additional tests.
mysql-test/r/merge_debug.result:
  Test of error handling when reopening MERGE tables.
mysql-test/r/udf_query_cache.result:
  Added missing flush status
mysql-test/suite/parts/r/partition_repair_myisam.result:
  Update results
mysql-test/t/merge.test:
  Renamed triggers to make debugging easier.
  Added some CHECK TABLES to catch errors earlier.
  Additional tests.
mysql-test/t/merge_debug.test:
  Test of error handling when reopening MERGE tables.
mysql-test/t/udf_query_cache.test:
  Added missing flush status
mysys/my_getopt.c:
  Removed not used variable
mysys/my_symlink2.c:
  Changed (null) to (NULL) to make it easier to find NULL arguments to DBUG_PRINT() functions.
  (On linux, NULL to sprintf is printed 'null')
mysys/thr_lock.c:
  Added priority of locks to avoid crashes with MERGE tables.
  Added thr_lock_merge() to allow one to merge two results of thr_lock().
  - This is needed for MyISAM as all locked table must share the same status. If not, you will not see newly inserted rows in other instances of the table.
  If calling thr_unlock() with THR_UNLOCK_UPDATE_STATUS, call update_status() and restore_status() for the locks. This is needed in some rare cases where we call thr_unlock() followed by thr_lock() without calling external_unlock/external_lock in between.
  Simplify loop in thr_multi_lock().
  Added 'start_trans', which is called at end of thr_multi_lock() when all locks are taken.
  - This was needed by Aria to ensure that transaction is started when we got all locks, not at get_status(). Without this, some rows could not be visible when we lock two tables at the same time, causing REPLACE using two tables to fail unexpectedly.
sql/handler.cc:
  Add an assert() in handler::print_error() for "impossible errors" (like table is crashed) when --debug-assert-if-crashed-table is used.
sql/lock.cc:
  Simplify mysql_lock_tables() code if get_lock_data() returns 0 locks.
  Added new parameter to thr_multi_unlock()
  In mysql_unlock_read_tables(), call first externa_unlock(), then thr_multi_unlock();  This is same order as we do in mysql_unlock_tables().
  Don't abort locks in mysql_lock_abort() for merged tables when a MERGE table is deleted; Would cause a spin lock.
  Added call to thr_merge_locks() in mysql_lock_merge() to ensure consistency in thr_locks().
  - New locks of same type and table is stored after the old lock to ensure that we get the status from the original lock.
sql/mysql_priv.h:
  Added debug_assert_if_crashed_table
sql/mysqld.cc:
  Added --debug-assert-if-crashed-table
sql/parse_file.cc:
  Don't print '(null)' in DBUG_PRINT of no dir given
sql/set_var.cc:
  Increase default size of buffer for @debug variable.
sql/sql_base.cc:
  In case of error from reopen_table() in reopen_tables(), call unlock_open_table() and restart loop.
  - This fixed bug when we twice deleted same table from open_cache.
  Don't take name lock for already name locked table in open_unireg_entry().
  - Fixed bug when doing repair in reopen_table().
  - In detach_merge_children(), always detach if 'clear_refs' is given. We can't trust parent->children_attached as this function can be called twice, first time with clear_refs set to 0.
sql/sql_class.cc:
  Changed printing of (null) to "" in set_thd_proc_info()
sql/sql_parse.cc:
  Added DBUG
sql/sql_trigger.cc:
  Don't call unlink_open_table() if reopen_table() fails as the table may already be freed.
storage/maria/ma_bitmap.c:
  Fixed DBUG_ASSERT() in allocate_tail()
storage/maria/ma_blockrec.c:
  Fixed wrong calculation of row length for very small rows in undo_row_update().
  - Fixes ASSERT() when doing undo.
storage/maria/ma_blockrec.h:
  Added _ma_block_start_trans() and _ma_block_start_trans_no_versioning()
storage/maria/ma_locking.c:
  Call _ma_update_status_with_lock() when releasing write locks.
  - Fixes potential problem with updating status without the proper lock.
storage/maria/ma_open.c:
  Changed to use start_trans() instead of get_status() to ensure that we see all rows in all locked tables when we got the locks.
  - Fixed 'not found row' bug in REPLACE with Aria tables.
storage/maria/ma_state.c:
  Added _ma_update_status_with_lock() and _ma_block_start_trans().
  This is to ensure that we see all rows in all locked tables when we got the locks.
storage/maria/ma_state.h:
  Added _ma_update_status_with_lock()
storage/maria/ma_write.c:
  More DBUG_PRINT
storage/myisam/mi_check.c:
  Fixed error message
storage/myisam/mi_extra.c:
  Added HA_EXTRA_DETACH_CHILD:
  - Detach MyISAM table to not be part of MERGE table (remove flag & lock priority).
storage/myisam/mi_locking.c:
  Call mi_update_status_with_lock() when releasing write locks.
  - Fixes potential problem with updating status without the proper lock.
  Change to use new HA_OPEN_MERGE_TABLE flag to test if MERGE table.
  Added mi_fix_status(), called by thr_merge().
storage/myisam/mi_open.c:
  Added marker if part of MERGE table.
  Call mi_fix_status() in thr_lock() for transactional tables.
storage/myisam/myisamdef.h:
  Change my_once_flag to uint, as it stored different values than just 0/1
  Added 'open_flag' to store state given to mi_open()
storage/myisammrg/ha_myisammrg.cc:
  Add THR_LOCK_MERGE_PRIV to THR_LOCK_DATA to get MERGE locks sorted after other types of locks.
storage/myisammrg/myrg_locking.c:
  Remove windows specific code.
storage/myisammrg/myrg_open.c:
  Use HA_OPEN_MERGE_TABLE to mi_open().
  Set HA_OPEN_MERGE_TABLE for linked MyISAM tables.
storage/xtradb/buf/buf0buf.c:
  Fixed compiler warning
storage/xtradb/buf/buf0lru.c:
  Initialize variable that could be used not initialized.
2010-11-02 17:22:57 +02:00
Sergei Golubchik
310584a849 merge w/ 5.1 2010-10-29 23:18:02 +02:00
unknown
c6b19ea001 mysqltest: Fix reversed error check, causing truncated output when testcase fails.
Also fix missing zero termination in DBUG_PRINT, causing garbage output
in --debug output.
2010-10-29 09:56:45 +02:00
Bjorn Munch
32c86a488d merge from 5.5-mtr 2010-10-26 08:30:02 +02:00
Bjorn Munch
8eb6992231 merge from 5.5-mtr 2010-10-26 08:30:02 +02:00
Bjorn Munch
676e012e47 merge from 5.1-mtr 2010-10-25 15:48:41 +02:00
Bjorn Munch
16a55614cc merge from 5.1-mtr 2010-10-25 15:48:41 +02:00
Sergei Golubchik
04a4b43346 merge with 5.1 2010-10-25 15:21:16 +02:00
Sergei Golubchik
1d8ad7e54c workaround for MySQL BUG#57491 2010-10-22 10:32:54 +02:00
Bjorn Munch
33e78dc233 merge from 5.5 2010-10-21 11:20:53 +02:00
Bjorn Munch
add465e5a1 merge from 5.5 2010-10-21 11:20:53 +02:00
Davi Arnaut
6997cff459 Merge of mysql-5.1-bugteam into mysql-5.5-bugteam. 2010-10-20 17:02:59 -02:00
Davi Arnaut
1e1985eba7 Merge of mysql-5.1-bugteam into mysql-5.5-bugteam. 2010-10-20 17:02:59 -02:00
Davi Arnaut
3e9c52250a Bug#45288: pb2 returns a lot of compilation warnings
Fix assorted warnings that are generated in optimized builds.
Most of it is silencing variables that are set but unused.

This patch also introduces the MY_ASSERT_UNREACHABLE macro
which helps the compiler to deduce that a certain piece of
code is unreachable.

include/my_compiler.h:
  Use GCC's __builtin_unreachable if available. It allows
  GCC to deduce the unreachability of certain code paths,
  thus avoiding warnings that, for example, accused that a
  variable could be used without being initialized (due to
  unreachable code paths).
2010-10-20 16:21:40 -02:00
Davi Arnaut
560ee2158d Bug#45288: pb2 returns a lot of compilation warnings
Fix assorted warnings that are generated in optimized builds.
Most of it is silencing variables that are set but unused.

This patch also introduces the MY_ASSERT_UNREACHABLE macro
which helps the compiler to deduce that a certain piece of
code is unreachable.
2010-10-20 16:21:40 -02:00
Bjorn Munch
8cdf07cf49 upmerge 52019 2010-10-20 12:17:19 +02:00
Bjorn Munch
2abe0d6e7e upmerge 52019 2010-10-20 12:17:19 +02:00
Bjorn Munch
e4f9ead140 Fixed wrong feof check in read_line, see 52019 2010-10-20 11:41:51 +02:00
Bjorn Munch
441e3b2412 Fixed wrong feof check in read_line, see 52019 2010-10-20 11:41:51 +02:00
Bjorn Munch
e533c7cc10 Fixed missing cast of arg to my_mbcharlen 2010-10-20 11:39:58 +02:00
Bjorn Munch
daa70e0ab9 Fixed missing cast of arg to my_mbcharlen 2010-10-20 11:39:58 +02:00
Bjorn Munch
f73ada3722 48863 followup: move an array declaration out from within if block 2010-10-20 11:30:50 +02:00
Bjorn Munch
af056dc560 48863 followup: move an array declaration out from within if block 2010-10-20 11:30:50 +02:00
Bjorn Munch
6960db2dfd Bug #52019 main.mysqltest fails on new tests for lowercase_result
Limited to actual bug fix, fixing a while condition
Again confirmed on Linux PPC and on AIX 5.3
2010-10-20 11:22:08 +02:00
Bjorn Munch
ce786ab04d Bug #52019 main.mysqltest fails on new tests for lowercase_result
Limited to actual bug fix, fixing a while condition
Again confirmed on Linux PPC and on AIX 5.3
2010-10-20 11:22:08 +02:00
Sergei Golubchik
745cc74c33 5.1.51 merge 2010-10-19 15:58:35 +02:00
Alexander Nozdrin
985fa88f8b Fix for Bug#57094 (Copyright notice incorrect?).
The fix is to:
  - introduce ORACLE_WELCOME_COPYRIGHT_NOTICE define to have a single place
    to specify copyright notice;
  - replace custom copyright notices with ORACLE_WELCOME_COPYRIGHT_NOTICE
    in programs.
2010-10-06 19:06:13 +04:00
Alexander Nozdrin
f79f6e0c34 Fix for Bug#57094 (Copyright notice incorrect?).
The fix is to:
  - introduce ORACLE_WELCOME_COPYRIGHT_NOTICE define to have a single place
    to specify copyright notice;
  - replace custom copyright notices with ORACLE_WELCOME_COPYRIGHT_NOTICE
    in programs.
2010-10-06 19:06:13 +04:00
Georgi Kodinov
8789c79723 merge 2010-10-04 15:42:16 +03:00
Georgi Kodinov
dd2e3db48f merge 2010-10-04 15:42:16 +03:00
Bjorn Munch
0548d66df4 Follow-up to 54861, cannot assume pthread_t is integral type 2010-10-04 12:01:16 +02:00
Bjorn Munch
299f0f201c Follow-up to 54861, cannot assume pthread_t is integral type 2010-10-04 12:01:16 +02:00
Bjorn Munch
cd18aa3126 merge from 5.5-mtr 2010-10-04 10:40:28 +02:00
Bjorn Munch
e688b6c299 merge from 5.5-mtr 2010-10-04 10:40:28 +02:00
Bjorn Munch
64e189c37c merge from 5.1-mtr 2010-10-03 19:37:58 +02:00
Bjorn Munch
687696a97a merge from 5.1-mtr 2010-10-03 19:37:58 +02:00
Bjorn Munch
ad1824eed0 upmerge 20304 2010-10-01 15:55:49 +02:00
Bjorn Munch
53462869d3 upmerge 20304 2010-10-01 15:55:49 +02:00
Mattias Jonsson
9aa7484cfe merge 2010-10-01 15:25:13 +02:00
Mattias Jonsson
1045f4526f merge 2010-10-01 15:25:13 +02:00
Bjorn Munch
abaa5c91b4 Bug #20304 mysqltest: reap with no preceding statement hangs forever
Added sanity check, similar to the one preventing send without reap
2010-10-01 11:00:18 +02:00
Bjorn Munch
ad7521df31 Bug #20304 mysqltest: reap with no preceding statement hangs forever
Added sanity check, similar to the one preventing send without reap
2010-10-01 11:00:18 +02:00
Bjorn Munch
c84973c7e0 upmerge 52828 2010-09-30 12:53:36 +02:00
Bjorn Munch
32da790381 upmerge 52828 2010-09-30 12:53:36 +02:00
Bjorn Munch
be7b3c0040 Bug #52828 Tests that use perl fail when perl is not in path
Trying to run perl fails, just like it does when perl is started but fails
Trap the case that perl was not found/could not be started, and skip test
Also force a restart of servers since test may already have done something
mtr now also appends path of current perl to PATH to aid mysqltest
2010-09-30 12:42:37 +02:00
Bjorn Munch
87234b74ca Bug #52828 Tests that use perl fail when perl is not in path
Trying to run perl fails, just like it does when perl is started but fails
Trap the case that perl was not found/could not be started, and skip test
Also force a restart of servers since test may already have done something
mtr now also appends path of current perl to PATH to aid mysqltest
2010-09-30 12:42:37 +02:00
Bjorn Munch
dae793978a merge from 5.1 2010-09-29 12:56:10 +02:00
Bjorn Munch
1a75a23ce1 merge from 5.1 2010-09-29 12:56:10 +02:00
Michael Widenius
ca672e6b61 Automatic merge 2010-10-01 18:27:32 +03:00
Alexander Nozdrin
94e726ae3d Auto-merge from mysql-5.5-merge. 2010-09-28 19:15:58 +04:00
Alexander Nozdrin
a79093cd94 Auto-merge from mysql-5.5-merge. 2010-09-28 19:15:58 +04:00
Bjorn Munch
bd71a48649 upmerge 56125,56921 2010-09-28 16:00:11 +02:00
Bjorn Munch
cf362a41b9 upmerge 56125,56921 2010-09-28 16:00:11 +02:00
Bjorn Munch
500cb49295 Bug #57036 Add checks in mysqltest that variables treated as ints are in fact ints
Adds boolean flag is_int and a separete function to check for int value
Added tests to mysqltest.test
2010-09-27 14:36:16 +02:00
Bjorn Munch
3a404d4966 Bug #57036 Add checks in mysqltest that variables treated as ints are in fact ints
Adds boolean flag is_int and a separete function to check for int value
Added tests to mysqltest.test
2010-09-27 14:36:16 +02:00
Michael Widenius
bdba1d11c4 Change some my_bool in C++ classes and a few functions to bool to detect wrong usage of bool/my_bool.
Fix some bugs where we stored values other than 0 or 1 in my_bool
Fixed some compiler warnings


client/mysql.cc:
  Changed interrupted_query from my_bool to int, as we stored 2 in it.
client/mysqladmin.cc:
  Changed return variable type to same type as function value type
client/mysqltest.cc:
  Changed 'found' to int as we store other values than 0 or 1 into it
  Changed type for parameter of set_reconnect() to match usage.
extra/libevent/evbuffer.c:
  Added __attribute__((unused))
extra/libevent/event.c:
  Added __attribute__((unused))
extra/libevent/signal.c:
  Added __attribute__((unused))
sql/event_data_objects.h:
  my_bool -> bool
sql/event_db_repository.cc:
  my_bool -> bool
sql/event_db_repository.h:
  my_bool -> bool
sql/event_parse_data.h:
  my_bool -> bool
sql/events.cc:
  my_bool -> bool
sql/events.h:
  my_bool -> bool
sql/field.cc:
  my_bool -> bool
sql/field.h:
  my_bool -> bool
sql/hash_filo.h:
  my_bool -> bool
sql/item.cc:
  my_bool -> bool
sql/item.h:
  my_bool -> bool
sql/item_cmpfunc.h:
  my_bool -> bool
  Changed result_for_null_param from my_bool to int as we stored -1 in it.
sql/item_func.cc:
  my_bool -> bool
  Modified udf wrapper functions so that the UDF functions would continue to use my_bool. (To keep compatibility with UDF:s)
sql/item_func.h:
  my_bool -> bool
sql/item_subselect.h:
  my_bool -> bool
sql/item_sum.cc:
  Modified udf wrapper functions so that the UDF functions would continue to use my_bool. (To keep compatibility with UDF:s)
sql/parse_file.h:
  my_bool -> bool
sql/rpl_mi.h:
  my_bool -> bool
sql/sp_rcontext.h:
  my_bool -> bool
sql/sql_analyse.h:
  my_bool -> bool
sql/sql_base.cc:
  Change some assignments so that we don't initialize bool variables with int's.
sql/sql_bitmap.h:
  my_bool -> bool
sql/sql_cache.cc:
  my_bool -> bool
sql/sql_cache.h:
  my_bool -> bool
sql/sql_class.h:
  my_bool -> bool
sql/sql_insert.cc:
  Change some assignments so that we don't initialize bool variables with int's.
sql/sql_prepare.cc:
  my_bool -> bool
sql/table.h:
  my_bool -> bool
storage/maria/ma_check.c:
  Removed duplicate assignment
strings/decimal.c:
  Fixed wrong variable usage.
  Don't do complex arithmetic on bool when simple works.
2010-09-24 01:00:32 +03:00
Bjorn Munch
7b216d7625 Bug #56921 It should be possible to log connection statements in mysqltest
Added --enable-connect-log, somewhet similar to --enable-query-log
If query log is disabled, disable connect log too
Also some related cleanup in mysqltest.test: removing duplicate test loop
2010-09-22 10:57:10 +02:00
Bjorn Munch
80d666bc21 Bug #56921 It should be possible to log connection statements in mysqltest
Added --enable-connect-log, somewhet similar to --enable-query-log
If query log is disabled, disable connect log too
Also some related cleanup in mysqltest.test: removing duplicate test loop
2010-09-22 10:57:10 +02:00
Georgi Kodinov
353739fdef merge of mysql-5.5 into mysql-5.5-wl1054 2010-09-20 17:17:32 +03:00
Georgi Kodinov
dc0b8f7ada merge of mysql-5.5 into mysql-5.5-wl1054 2010-09-20 17:17:32 +03:00
Bjorn Munch
c18a34bda6 Bug #55426 mysqltest crashes when trying to unlock not acquired mutex
Follow-up: don't call pthread_join() on Windows
This change only valid for 5.1
2010-09-20 11:21:27 +02:00
Bjorn Munch
c679e8dc80 Bug #55426 mysqltest crashes when trying to unlock not acquired mutex
Follow-up: don't call pthread_join() on Windows
This change only valid for 5.1
2010-09-20 11:21:27 +02:00
Bjorn Munch
acf56b6d7a upmerge 56753 2010-09-20 10:08:32 +02:00
Bjorn Munch
0eaa320c2c upmerge 56753 2010-09-20 10:08:32 +02:00
Sergei Golubchik
b170b126b0 merge with 5.1 2010-09-16 09:58:57 +02:00
Bjorn Munch
6ff48a61f2 Bug #56753 mtr silently ignores junk after backticks
When stepping backward to end of `` expression, check for illegal chars
2010-09-15 14:56:22 +02:00
Bjorn Munch
38604de3a0 Bug #56753 mtr silently ignores junk after backticks
When stepping backward to end of `` expression, check for illegal chars
2010-09-15 14:56:22 +02:00
Michael Widenius
f4820ea62e mysqltest now gives error messages with error code for my_delete, my_rename, my_copy etc.
Fixed crashing bug when doing ALTER TABLE RENAME with transactional tables.

client/mysqltest.cc:
  Added errno to error message for system calls (delete, rename etc)
  Write error message for failures of system calls
mysql-test/include/cleanup_fake_relay_log.inc:
  Disable warnings for remove_file
mysql-test/include/diff_tables.inc:
  Disable warnings for remove_file
mysql-test/include/maria_empty_logs.inc:
  Disable warnings for remove_file
mysql-test/include/maria_make_snapshot.inc:
  Disable warnings for remove_file
mysql-test/include/maria_make_snapshot_for_feeding_recovery.inc:
  Disable warnings for remove_file
mysql-test/include/mysqlhotcopy.inc:
  Disable warnings for remove_file
mysql-test/include/ndb_backup.inc:
  Disable warnings for remove_file
mysql-test/include/ndb_backup_print.inc:
  Disable warnings for remove_file
mysql-test/r/alter_table_trans.result:
  Test of crashing ALTER TABLE RENAME bug
mysql-test/t/alter_table_trans.test:
  Test of crashing ALTER TABLE RENAME bug
mysql-test/t/mysqltest.test:
  Disable warnings for remove_file and move_file
mysys/my_copy.c:
  Fixed wrong error message
sql/sql_table.cc:
  Fixed crashing bug when doing ALTER TABLE RENAME with transactional tables.
2010-09-15 15:48:15 +03:00
Mattias Jonsson
afd4b25d8a Bug#56659: Mismatch of CAPITAL vs small letters in "unified filelist" partitioning output
Bug#56657: Test still uses "--exec rm -f ..." which is non-portable
Bug#56601: Test uses Unix path for temporary file, fails, and writes misleading message

Several tests that was written in a non portable way (failed on windows)

Fixed by
1) backporting the fix for replace_result to also apply to list_files
(mysqltest from mysql-trunk)
2) replacing all #p#/#sp#/#tmp# to #P#/#SP#/#TMP#/
(innodb always converts filenames to lower case in windows).
3) replacing '--exec rm -f' with '--remove_files_wildcard'
4) replacing a perl snippet with '--write_file'

client/mysqltest.cc:
  backport from mysql-trunk to allow replace_result to apply
  also on list_files
mysql-test/suite/parts/inc/partition_check_drop.inc:
  Compensate for differences between innodb on windows vs unix.
  Using mysqltest command, instead of unix command to remove files.
mysql-test/suite/parts/inc/partition_crash.inc:
  compensate for differences between innodb on windows vs unix
mysql-test/suite/parts/inc/partition_fail.inc:
  compensate for differences between innodb on windows vs unix
mysql-test/suite/parts/inc/partition_layout.inc:
  compensate for differences between innodb on windows vs unix
mysql-test/suite/parts/inc/partition_layout_check1.inc:
  compensate for differences between innodb on windows vs unix
mysql-test/suite/parts/inc/partition_layout_check2.inc:
  compensate for differences between innodb on windows vs unix
mysql-test/suite/parts/r/partition_recover_myisam.result:
  updated result
mysql-test/suite/parts/r/partition_special_myisam.result:
  updated result
mysql-test/suite/parts/t/part_supported_sql_func_innodb.test:
  Test takes very long time, require --big flag
mysql-test/suite/parts/t/partition_alter1_1_2_innodb.test:
  Test takes very long time, require --big flag
mysql-test/suite/parts/t/partition_alter1_2_innodb.test:
  Test takes very long time, require --big flag
mysql-test/suite/parts/t/partition_alter2_1_1_innodb.test:
  Test takes very long time, require --big flag
mysql-test/suite/parts/t/partition_alter2_1_2_innodb.test:
  Test takes very long time, require --big flag
mysql-test/suite/parts/t/partition_alter2_2_2_innodb.test:
  Test takes very long time, require --big flag
mysql-test/suite/parts/t/partition_alter4_innodb.test:
  Test takes very long time, require --big flag
mysql-test/suite/parts/t/partition_debug_sync_innodb.test:
  compensate for differences between innodb on windows vs unix
mysql-test/suite/parts/t/partition_recover_myisam.test:
  more generic suppression (failed in windows)
mysql-test/suite/parts/t/partition_special_myisam.test:
  Using portable mysqltest command 'write_file' instead of perl snippet.
2010-09-15 10:22:12 +02:00
Mattias Jonsson
bde21e5810 Bug#56659: Mismatch of CAPITAL vs small letters in "unified filelist" partitioning output
Bug#56657: Test still uses "--exec rm -f ..." which is non-portable
Bug#56601: Test uses Unix path for temporary file, fails, and writes misleading message

Several tests that was written in a non portable way (failed on windows)

Fixed by
1) backporting the fix for replace_result to also apply to list_files
(mysqltest from mysql-trunk)
2) replacing all #p#/#sp#/#tmp# to #P#/#SP#/#TMP#/
(innodb always converts filenames to lower case in windows).
3) replacing '--exec rm -f' with '--remove_files_wildcard'
4) replacing a perl snippet with '--write_file'
2010-09-15 10:22:12 +02:00
Bjorn Munch
0dc8504b43 upmerge 55426(55546), 56647 2010-09-14 14:19:51 +02:00
Bjorn Munch
45ec20594f upmerge 55426(55546), 56647 2010-09-14 14:19:51 +02:00
Bjorn Munch
64ae6d4a7e Bug #55426 mysqltest crashes when trying to unlock not acquired mutex
Bug #55546 mysqltest fails to create a new thread on HPUX
Missing call to pthread_join(), in embedded mode
This independently solves both problems, see 55426 for details.
Addendum: cannot test against a pthread_t, adds boolean flag instead
2010-09-14 14:04:37 +02:00
Bjorn Munch
4e23534bf7 Bug #55426 mysqltest crashes when trying to unlock not acquired mutex
Bug #55546 mysqltest fails to create a new thread on HPUX
Missing call to pthread_join(), in embedded mode
This independently solves both problems, see 55426 for details.
Addendum: cannot test against a pthread_t, adds boolean flag instead
2010-09-14 14:04:37 +02:00
Sergei Golubchik
a3d80d952d merge with 5.1 2010-09-11 20:43:48 +02:00
Bjorn Munch
4937eec1a2 Bug #56647 Valgrind warnings for memory leak in mysqltest.cc
Moved an init_dynamic_string() from before to after potential die()
2010-09-10 13:08:06 +02:00
Bjorn Munch
c824cbbaff Bug #56647 Valgrind warnings for memory leak in mysqltest.cc
Moved an init_dynamic_string() from before to after potential die()
2010-09-10 13:08:06 +02:00
Bjorn Munch
223112ad42 merge 55178,55413,56383 2010-09-10 09:58:26 +02:00
Bjorn Munch
4b1d6118e8 merge 55178,55413,56383 2010-09-10 09:58:26 +02:00
Alexey Botchkov
3d8456252d merging. 2010-09-08 13:53:03 +05:00
Alexey Botchkov
406c5a176a merging. 2010-09-08 13:53:03 +05:00
Bjorn Munch
71c0fde097 merge from 5.5 2010-09-01 15:49:43 +02:00
Bjorn Munch
2154211192 merge from 5.5 2010-09-01 15:49:43 +02:00
Alexey Botchkov
cc81f969e9 Bug#54861 Additional connections not handled properly in mtr --embedded
When in embedded-serve mode, mysqltest tried to run '--send' commands in the separate thread.
        That upsets some engines (InnoDB particularly) as the transaction has to be executed in the same
        thread completely. So i implemented some different approach. So we create one separate thread for
        each connection and execute all the queries of this connection inside it. Looks even simpler than it was
        for me.

per-file comments:
  client/mysqltest.cc
Bug#54861      Additional connections not handled properly in mtr --embedded
        Now the connection has one running connection_thread() attached. And sends all the
        query and read-result requests to it.
2010-09-01 17:34:05 +05:00
Alexey Botchkov
26119c1337 Bug#54861 Additional connections not handled properly in mtr --embedded
When in embedded-serve mode, mysqltest tried to run '--send' commands in the separate thread.
        That upsets some engines (InnoDB particularly) as the transaction has to be executed in the same
        thread completely. So i implemented some different approach. So we create one separate thread for
        each connection and execute all the queries of this connection inside it. Looks even simpler than it was
        for me.

per-file comments:
  client/mysqltest.cc
Bug#54861      Additional connections not handled properly in mtr --embedded
        Now the connection has one running connection_thread() attached. And sends all the
        query and read-result requests to it.
2010-09-01 17:34:05 +05:00
Bjorn Munch
1f95aa82f1 upmerge 55178,55413 2010-08-30 15:19:46 +02:00
Bjorn Munch
8ee29b7e6a upmerge 55178,55413 2010-08-30 15:19:46 +02:00
Bjorn Munch
6d2ff118bc merge 55413 2010-08-30 11:26:40 +02:00
Bjorn Munch
c3f69b4191 merge 55413 2010-08-30 11:26:40 +02:00
Michael Widenius
ad6d95d3cb Merge with MySQL 5.1.50
- Changed to still use bcmp() in certain cases becasue
  - Faster for short unaligneed strings than memcmp()
  - Bettern when using valgrind
- Changed to use my_sprintf() instead of sprintf() to get higher portability for old systems
- Changed code to use MariaDB version of select->skip_record()
- Removed -%::SCCS/s.% from Makefile.am:s to remove automake warnings
2010-08-27 17:12:44 +03:00
Sergey Vojtovich
0d21bbe387 Merge 5.1-bugteam to 5.5-merge. 2010-08-27 15:33:32 +04:00
Sergey Vojtovich
ab2414577a Merge 5.1-bugteam to 5.5-merge. 2010-08-27 15:33:32 +04:00
Bjorn Munch
a4154bd0a0 Reduced #ifndef for 52301, caused compile warning 2010-08-26 15:14:50 +02:00
Bjorn Munch
fba50f8401 Reduced #ifndef for 52301, caused compile warning 2010-08-26 15:14:50 +02:00
Bjorn Munch
e5a59eee5a merge followup fix for 52301 2010-08-25 22:49:52 +02:00
Bjorn Munch
79aefacb04 merge followup fix for 52301 2010-08-25 22:49:52 +02:00
Bjorn Munch
76907f8591 Bug #52301 Add --protocol to mysqltest
Added code resulted in strange linking problem for embedded on Windows
Avoided by not doing this for embedded mode
It's irrelevant for embedded server anyway, --protocol will be ignored
2010-08-25 10:23:19 +02:00
Bjorn Munch
a22b5651fd Bug #52301 Add --protocol to mysqltest
Added code resulted in strange linking problem for embedded on Windows
Avoided by not doing this for embedded mode
It's irrelevant for embedded server anyway, --protocol will be ignored
2010-08-25 10:23:19 +02:00
Georgi Kodinov
5564e0837f merged mysql-5.5 into WL1054-5.5 2010-08-16 18:16:07 +03:00
Georgi Kodinov
5c81e2cf16 merged mysql-5.5 into WL1054-5.5 2010-08-16 18:16:07 +03:00
Bjorn Munch
788b4e404b Bug #55413 mysqltest gives parse error for lines matching "^let.*\\.*;$"
Allow escaped quotes also in statements not starting with --
But will not support single unescaped ' or `
2010-08-10 12:13:58 +02:00
Bjorn Munch
3ca814b760 Bug #55413 mysqltest gives parse error for lines matching "^let.*\\.*;$"
Allow escaped quotes also in statements not starting with --
But will not support single unescaped ' or `
2010-08-10 12:13:58 +02:00
Georgi Kodinov
9705711596 WL#1054: Pluggable authentication support
Merged the implementation to a new base tree.
2010-08-09 11:32:50 +03:00
Georgi Kodinov
881a76699e WL#1054: Pluggable authentication support
Merged the implementation to a new base tree.
2010-08-09 11:32:50 +03:00
Michael Widenius
165eb1186c Added extra argument to longlong2str() to make it have same prototype is int2str()
Changed to use longlong10_to_str() instead of longlong2str() when base is 10 or -10 as former is much faster than later
Changed my_vsnprintf() to use longlong2str instead of int2str() to get rid of warnings and to get support for long pointers even when long is 32 bit.

client/mysqltest.cc:
  longlong2str() -> longlong10_to_str()
include/m_string.h:
  Added extra argument to longlong2str() to make it have same prototype is int2str()
mysys/charset.c:
  Fixed compiler warning
mysys/mf_soundex.c:
  Fixed compiler warning
mysys/my_getopt.c:
  longlong2str() -> longlong10_to_str()
sql/create_options.cc:
  Fixed compiler warning
sql/item_strfunc.cc:
  Added extra argument to longlong2str
sql/opt_range.cc:
  longlong2str() -> longlong10_to_str()
sql/partition_info.cc:
  longlong2str() -> longlong10_to_str()
sql/slave.cc:
  longlong2str() -> longlong10_to_str()
sql/sql_bitmap.h:
  Added extra argument to longlong2str
sql/sql_partition.cc:
  Added extra argument to longlong2str
sql/sql_select.cc:
  longlong2str() -> longlong10_to_str()
sql/sql_show.cc:
  Added extra argument to longlong2str
storage/innodb_plugin/handler/ha_innodb.cc:
  Update to new parameters for longlong2str()
storage/maria/ma_dbug.c:
  longlong2str() -> longlong10_to_str()
storage/maria/maria_chk.c:
  Added extra argument to longlong2str
storage/myisam/mi_dbug.c:
  longlong2str() -> longlong10_to_str()
storage/myisam/myisamchk.c:
  Added extra argument to longlong2str
storage/xtradb/handler/ha_innodb.cc:
  Update to new parameters for longlong2str()
strings/longlong2str.c:
  Added extra argument to longlong2str() to make it have same prototype is int2str()
strings/my_vsnprintf.c:
  Changed my_vsnprintf() to use longlong2str instead of int2str() to get rid of warnings and to get support for long pointers even when long is 32 bit.
  Added cast to get rid of compiler warnings
2010-08-07 15:27:23 +03:00
Bjorn Munch
944e3814e8 merge from 5.1-bugteam of merge from 5.1-mtr 2010-08-06 13:37:05 +02:00
Bjorn Munch
6777cc0db6 merge from 5.1-bugteam of merge from 5.1-mtr 2010-08-06 13:37:05 +02:00
Bjorn Munch
3d0819e2b1 merge from 5.1-mtr 2010-08-06 11:13:52 +02:00
Bjorn Munch
8e242e8140 merge from 5.1-mtr 2010-08-06 11:13:52 +02:00
Michael Widenius
d042146e5b Merge with MariaDB 5.1.49
Removed references to HA_END_SPACE_KEY (which has been 0 for a long time)
2010-08-05 22:56:11 +03:00
Bjorn Munch
5f18951577 merge from trunk-mtr 2010-08-05 14:53:09 +02:00
Bjorn Munch
f886745dfa merge from trunk-mtr 2010-08-05 14:53:09 +02:00
Bjorn Munch
682cdb520d upmerge 55582 2010-08-05 14:41:07 +02:00
Bjorn Munch
489e6c136b upmerge 55582 2010-08-05 14:41:07 +02:00
Bjorn Munch
f3f5e04a36 merge from 5.1 2010-08-04 12:19:51 +02:00
Bjorn Munch
992f49c0c4 merge from 5.1 2010-08-04 12:19:51 +02:00
Bjorn Munch
5e92df6e0e Bug #55582 mtr root detection (and if-expression execution) broken
if() treated any non-numeric string as false
Fixed to treat those as true instead
Added some test cases
Fixed missing $ in variable name in include/mix2.inc
2010-08-03 16:11:23 +02:00
Bjorn Munch
1ba9d79b7b Bug #55582 mtr root detection (and if-expression execution) broken
if() treated any non-numeric string as false
Fixed to treat those as true instead
Added some test cases
Fixed missing $ in variable name in include/mix2.inc
2010-08-03 16:11:23 +02:00
Michael Widenius
e0a6b02c5d Merge with MySQL 5.1.49
Fixed Bug#52005 'JOIN_TAB->dependent' may be incorrectly propageted for multilevel outer joins' in a better way (patch from Sergey Petrunya)
2010-08-02 12:01:24 +03:00
Davi Arnaut
7f80eb46e9 Bug#42733: Type-punning warnings when compiling MySQL
Post-merge fix: remove remaining casts which are now
unnecessary and are actually causing warnings.
2010-07-24 09:24:44 -03:00
Davi Arnaut
c1545bec1e Bug#42733: Type-punning warnings when compiling MySQL
Post-merge fix: remove remaining casts which are now
unnecessary and are actually causing warnings.
2010-07-24 09:24:44 -03:00
Davi Arnaut
75e2212397 WL#5498: Remove dead and unused source code
Remove unused macros or macro which are always defined.

include/my_global.h:
  Remove unused macros and move macros which aren't used globally.
2010-07-23 17:16:29 -03:00
Davi Arnaut
60ab2b9283 WL#5498: Remove dead and unused source code
Remove unused macros or macro which are always defined.
2010-07-23 17:16:29 -03:00
Bjorn Munch
44568b7014 merge from trunk 2010-07-23 15:12:58 +02:00
Bjorn Munch
be55e8d59d merge from trunk 2010-07-23 15:12:58 +02:00
Davi Arnaut
711c318c07 Merge of mysql-trunk-bugfixing into mysql-trunk-merge. 2010-07-15 10:47:50 -03:00
Davi Arnaut
649390ac81 Merge of mysql-trunk-bugfixing into mysql-trunk-merge. 2010-07-15 10:47:50 -03:00
Davi Arnaut
07e7b4d6fe WL#5486: Remove code for unsupported platforms
Remove Netware specific code.
2010-07-15 08:13:30 -03:00
Davi Arnaut
f54a118249 WL#5486: Remove code for unsupported platforms
Remove Netware specific code.
2010-07-15 08:13:30 -03:00
unknown
2be1a25faa Automerge MariaDB 5.1->5.2. 2010-07-09 13:39:19 +02:00
Davi Arnaut
00e62a0311 Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled
Post-merge fix: cast argument and correct type in assignment.
2010-07-08 22:19:57 -03:00
Davi Arnaut
dbf76b0deb Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled
Post-merge fix: cast argument and correct type in assignment.
2010-07-08 22:19:57 -03:00
Davi Arnaut
f56dd32bf7 Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled
Essentially, the problem is that safemalloc is excruciatingly
slow as it checks all allocated blocks for overrun at each
memory management primitive, yielding a almost exponential
slowdown for the memory management functions (malloc, realloc,
free). The overrun check basically consists of verifying some
bytes of a block for certain magic keys, which catches some
simple forms of overrun. Another minor problem is violation
of aliasing rules and that its own internal list of blocks
is prone to corruption.

Another issue with safemalloc is rather the maintenance cost
as the tool has a significant impact on the server code.
Given the magnitude of memory debuggers available nowadays,
especially those that are provided with the platform malloc
implementation, maintenance of a in-house and largely obsolete
memory debugger becomes a burden that is not worth the effort
due to its slowness and lack of support for detecting more
common forms of heap corruption.

Since there are third-party tools that can provide the same
functionality at a lower or comparable performance cost, the
solution is to simply remove safemalloc. Third-party tools
can provide the same functionality at a lower or comparable
performance cost. 

The removal of safemalloc also allows a simplification of the
malloc wrappers, removing quite a bit of kludge: redefinition
of my_malloc, my_free and the removal of the unused second
argument of my_free. Since free() always check whether the
supplied pointer is null, redudant checks are also removed.

Also, this patch adds unit testing for my_malloc and moves
my_realloc implementation into the same file as the other
memory allocation primitives.

client/mysqldump.c:
  Pass my_free directly as its signature is compatible with the
  callback type -- which wasn't the case for free_table_ent.
2010-07-08 18:20:08 -03:00
Davi Arnaut
a10ae35328 Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled
Essentially, the problem is that safemalloc is excruciatingly
slow as it checks all allocated blocks for overrun at each
memory management primitive, yielding a almost exponential
slowdown for the memory management functions (malloc, realloc,
free). The overrun check basically consists of verifying some
bytes of a block for certain magic keys, which catches some
simple forms of overrun. Another minor problem is violation
of aliasing rules and that its own internal list of blocks
is prone to corruption.

Another issue with safemalloc is rather the maintenance cost
as the tool has a significant impact on the server code.
Given the magnitude of memory debuggers available nowadays,
especially those that are provided with the platform malloc
implementation, maintenance of a in-house and largely obsolete
memory debugger becomes a burden that is not worth the effort
due to its slowness and lack of support for detecting more
common forms of heap corruption.

Since there are third-party tools that can provide the same
functionality at a lower or comparable performance cost, the
solution is to simply remove safemalloc. Third-party tools
can provide the same functionality at a lower or comparable
performance cost. 

The removal of safemalloc also allows a simplification of the
malloc wrappers, removing quite a bit of kludge: redefinition
of my_malloc, my_free and the removal of the unused second
argument of my_free. Since free() always check whether the
supplied pointer is null, redudant checks are also removed.

Also, this patch adds unit testing for my_malloc and moves
my_realloc implementation into the same file as the other
memory allocation primitives.
2010-07-08 18:20:08 -03:00