Backported the fix to 5.1.
Problem: the auxiliary test files rpl_start_server.inc and rpl_stop_server.inc
write a file that is later read by mtr. The bug was that the file was written
with platform-dependent newline terminators, i.e., \r\n on windows, whereas mtr
only understands \n.
Fix: write the file so that it uses \n on all platforms.
mysql-test/include/rpl_start_server.inc:
Force test to use \n instead of platform-dependent newline terminator.
mysql-test/include/rpl_stop_server.inc:
Force test to use \n instead of platform-dependent newline terminator.
other crashes
Some string manipulating SQL functions use a shared string object intended to
contain an immutable empty string. This object was used by the SQL function
SUBSTRING_INDEX() to return an empty string when one argument was of the wrong
datatype. If the string object was then modified by the sql function INSERT(),
undefined behavior ensued.
Fixed by instead modifying the string object representing the function's
result value whenever string manipulating SQL functions return an empty
string.
Relevant code has also been documented.
The test case fails with out of memory while updating a table
with several multi-megabytes sized rows. This can probably be too
exhausting for PB2 env.
The quick fix here is to reduce the size of the biggest
row (256MB) so that it becomes a little smaller (64MB).
INVOKER-security view access check wrong".
When privilege checks were done for tables used from an
INVOKER-security view which in its turn was used from
a DEFINER-security view connection's active security
context was incorrectly used instead of security context
with privileges of the second view's creator.
This meant that users which had enough rights to access
the DEFINER-security view and as result were supposed to
be able successfully access it were unable to do so in
cases when they didn't have privileges on underlying tables
of the INVOKER-security view.
This problem was caused by the fact that for INVOKER-security
views TABLE_LIST::security_ctx member for underlying tables
were set to 0 even in cases when particular view was used from
another DEFINER-security view. This meant that when checks of
privileges on these underlying tables was done in
setup_tables_and_check_access() active connection security
context was used instead of context corresponding to the
creator of caller view.
This fix addresses the problem by ensuring that underlying
tables of an INVOKER-security view inherit security context
from the view and thus correct security context is used for
privilege checks on underlying tables in cases when such view
is used from another view with DEFINER-security.
mysql-test/r/view_grant.result:
Added coverage for various combinations of DEFINER and
INVOKER-security views, including test for bug #58499
"DEFINER-security view selecting from INVOKER-security
view access check wrong".
mysql-test/t/view_grant.test:
Added coverage for various combinations of DEFINER and
INVOKER-security views, including test for bug #58499
"DEFINER-security view selecting from INVOKER-security
view access check wrong".
sql/sql_view.cc:
When opening a non-suid view ensure that its underlying
tables will get the same security context as use for
checking privileges on the view, i.e. security context
of view invoker. This context can be different from the
security context which is currently active for connection
in cases when this non-suid view is used from a view with
suid security. Inheriting security context in such situation
allows correctly apply privileges of creator of suid view
in checks for tables of non-suid view (since in this
situation creator/definer of suid view serves as invoker
for non-suid view).
Item_func_spatial_collection::fix_length_and_dec didn't call parent's method, so
the maybe_null was set to '0' after it. But in this case the result was
just NULL, that caused wrong behaviour.
per-file comments:
mysql-test/r/gis.result
Bug #57321 crashes and valgrind errors from spatial types
test result updated.
mysql-test/t/gis.test
Bug #57321 crashes and valgrind errors from spatial types
test case added.
sql/item_geofunc.h
Bug #57321 crashes and valgrind errors from spatial types
Item_func_geometry::fix_length_and_dec() called in
Item_func_spatial_collection::fix_length_and_dec().
get_year_value() contains code to convert 2-digits year to
4-digits. The fix for Bug#49910 added a check on the size of
the underlying field so that this conversion is not done for
YEAR(4) values. (Since otherwise one would convert invalid
YEAR(4) values to valid ones.)
The existing check does not work when Item_cache is used, since
it is not detected when the cache is based on a Field. The
reported change in behavior is due to Bug#58030 which added
extra cached items in min/max computations.
The elegant solution would be to implement
Item_cache::real_item() to return the underlying Item.
However, some side effects are observed (change in explain
output) that indicates that such a change is not straight-
forward, and definitely not appropriate for an MRU.
Instead, a Item_cache::field() method has been added in order
to get access to the underlying field. (This field() method
eliminates the need for Item_cache::eq_def() used in
test_if_ref(), but in order to limit the scope of this fix,
that code has been left as is.)
mysql-test/r/type_year.result:
Added test case for Bug#59211.
mysql-test/t/type_year.test:
Added test case for Bug#59211.
sql/item.h:
Added function Item_cache::field() to get access to the
underlying Field of a cached field Value.
sql/item_cmpfunc.cc:
Also check underlying fields of Item_cache, not just Item_Field,
when checking whether the value is of type YEAR(4) or not.
tmptable needed
The function DEFAULT() works by modifying the the data buffer pointers (often
referred to as 'record' or 'table record') of its argument. This modification
is done during name resolution (fix_fields().) Unfortunately, the same
modification is done when creating a temporary table, because default values
need to propagate to the new table.
Fixed by skipping the pointer modification for fields that are arguments to
the DEFAULT function.
multiple columns in the partition key
ndb crash if duplicate columns in the partitioning key.
Backport from mysql-5.1-telco-7.0, see bug#53354.
Changed from case sensitive field name comparision
to non case sensitive too.
mysql-test/r/partition_error.result:
updated result
mysql-test/t/partition_error.test:
Added test for the error in non-ndb partitioned table.
sql/sql_partition.cc:
Added check for duplicated field names in the
partitioning key.
This assert could be triggered if -1 was inserted into
an auto increment column by a statement writing more than
one row.
Unless explicitly given, an interval of auto increment values
is generated when a statement first needs an auto increment
value. The triggered assert checks that the auto increment
counter is equal to or higher than the lower bound of this
interval.
Generally, the auto increment counter starts at 1 and is
incremented by 1 each time it is used. However, inserting an
explicit value into the auto increment column, sets the auto
increment counter to this value + 1 if this value is higher
than the current value of the auto increment counter.
This bug was triggered if the explicit value was -1. Since the
value was converted to unsigned before any comparisons were made,
it was found to be higher than the current vale of the auto
increment counter and the counter was set to -1 + 1. This value
was below the reserved interval and caused the assert to be
triggered the next time the statement tried to write a row.
With the patch for Bug#39828, this bug is no longer repeatable.
Now, -1 + 1 is detected as an "overflow" which causes the auto
increment counter to be set to ULONGLONG_MAX. This avoids hitting
the assert for the next insert and causes a new interval of
auto increment values to be generated. This resolves the issue.
This patch therefore only contains a regression test and no code
changes. Test case added to auto_increment.test.
mysqlbinlog only prints "use $database" statements to its output stream
when the active default database changes between events. This will cause
"No Database Selected" error when dropping and recreating that database.
To fix the problem, we clear print_event_info->db when printing an event
of CREATE/DROP/ALTER database statements, so that the Query_log_event
after such statements will be printed with the use 'db' anyway except
transaction keywords.
mysql-test/r/mysqlbinlog.result:
Test result for Bug#50914.
mysql-test/t/mysqlbinlog.test:
Added test to verify if the approach of the mysqlbinlog prints
"use $database" statements to its output stream will cause
"No Database Selected" error when dropping and recreating
that database.
sql/log_event.cc:
Updated code to clear print_event_info->db when printing an event
of CREATE/DROP/ALTER database statements, so that the Query_log_event
after such statements will be printed with the use 'db' anyway except
transaction keywords.
- Removed files specific to compiling on OS/2
- Removed files specific to SCO Unix packaging
- Removed "libmysqld/copyright", text is included in documentation
- Removed LaTeX headers for NDB Doxygen documentation
- Removed obsolete NDB files
- Removed "mkisofs" binaries
- Removed the "cvs2cl.pl" script
- Changed a few GPL texts to use "program" instead of "library"
ASSERT happens due to improper calculation of the max_length
in Item_func_div object, if dividend has max_length == 0 then
Item_func_div::max_length is set to 0 under some circumstances.
The fix:
If decimals == NOT_FIXED_DEC then set
Item_func_div::max_length to max possible
DOUBLE length value.
mysql-test/r/func_math.result:
test case
mysql-test/t/func_math.test:
test case
sql/item_func.cc:
The fix:
If decimals == NOT_FIXED_DEC then set
Item_func_div::max_length to max possible
DOUBLE length value.
Bug#57071: EXTRACT(WEEK from date_col) cannot be allowed as partitioning function
There were functions allowed as partitioning functions
that implicit allowed cast. That could result in unacceptable
behaviour.
Solution was to check that the arguments of date and time functions
have allowed types (field and date/datetime/time depending on function).
mysql-test/r/partition.result:
Updated result
mysql-test/r/partition_error.result:
Updated result
mysql-test/suite/parts/inc/part_supported_sql_funcs_main.inc:
disabled test with not allowed arguments.
mysql-test/suite/parts/r/part_supported_sql_func_innodb.result:
Updated result
mysql-test/suite/parts/r/part_supported_sql_func_myisam.result:
Updated result
mysql-test/t/partition.test:
Fixed typo in bug number and removed non allowed function (bad argument)
mysql-test/t/partition_error.test:
Added tests to verify correct type of argument.
sql/item.h:
Renamed processor since it is no longer only for timezone
sql/item_func.h:
Added help functions for checking date/time/datetime arguments.
sql/item_timefunc.h:
Added processors for argument correctness
sql/sql_partition.cc:
renamed the processor for checking arguments.
Problem: master executed a statement that would fail on slave
(namely, DROP USER 'create_rout_db'@'localhost').
Then the test did:
--let $rpl_only_running_threads= 1
--source include/rpl_reset.inc
rpl_reset.inc calls rpl_sync.inc, which first checks which of
the threads are running and then syncs those threads that are
running. If the SQL thread fails after the check, the sync will
fail. So there was a race in the test and it failed on some
slow hosts.
Fix: Don't replicate the failing statement.
Item_sum_max/Item_sum_min incorrectly set null_value flag and
attempt to get result in parent functions leads to crash.
This happens due to double evaluation of the function argumet.
First evaluation happens in the comparator and second one
happens in Item_cache::cache_value().
The fix is to introduce new Item_cache object which
holds result of the argument and use this cached value
as an argument of the comparator.
mysql-test/r/func_group.result:
test case
mysql-test/t/func_group.test:
test case
sql/item.cc:
added assertion that ether we have some result or result is NULL.
sql/item_sum.cc:
introduce new Item_cache object which
holds result of the argument and use this cached value
as an argument of the comparator.
sql/item_sum.h:
introduce new Item_cache object which
holds result of the argument and use this cached value
as an argument of the comparator.
row_upd_changes_ord_field_binary(): Do not return TRUE if the update
vector changes a column that is covered by a prefix index, but does
not change the column prefix. Add the row_ext_t parameter for
determining whether the prefixes of externally stored columns match.
dfield_datas_are_binary_equal(): Add the parameter len, for comparing
column prefixes when len > 0.
innodb.test: Add a test case where the patch of Bug #55284 failed
without this fix.
rb:537 approved by Jimmy Yang
Normally, auto_increment value is generated for the column by
inserting either NULL or 0 into it. NO_AUTO_VALUE_ON_ZERO
suppresses this behavior for 0 so that only NULL generates
the auto_increment value. This behavior is also followed by
a slave, specifically by the SQL Thread, when applying events
in the statement format from a master. However, when applying
events in the row format, the flag was ignored thus causing
an assertion failure:
"Assertion failed: next_insert_id == 0, file .\handler.cc"
In fact, we never need to generate a auto_increment value for
the column when applying events in row format on slave. So we
don't allow it to happen by using 'MODE_NO_AUTO_VALUE_ON_ZERO'.
Refactoring: Get rid of all the sql_mode checks to rows_log_event
when applying it for avoiding problems caused by the inconsistency
of the sql_mode on slave and master as the sql_mode is not set for
Rows_log_event.
mysql-test/extra/rpl_tests/rpl_auto_increment.test:
Added test to verify if the assertion of "next_insert_id == 0"
will fail in ha_external_lock() function.
mysql-test/suite/rpl/r/rpl_auto_increment.result:
Test result for bug#56662.
sql/log_event.cc:
Added code to not allow generation of auto_increment value when
processing rows event by adding 'MODE_NO_AUTO_VALUE_ON_ZERO' to
sql_mode.
sql/rpl_record.cc:
Added code to get rid of the 'MODE_STRICT_TRANS_TABLES' and
MODE_STRICT_ALL_TABLES check to the table when appling the
rows event and treat it as no strict.
Problem: Warnings for truncated data were generated on hosts with
long host names because @@hostname was inserted into a CHAR(40) column.
Fix: Change CHAR(40) to TEXT.
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
Post-push fixes:
- fixed platform dependent result files
- appeasing valgrind warnings:
Fault injection was also uncovering a previously existing
potential mem leaks. For BUG#46166 testing purposes, fixed
by forcing handling the leak when injecting faults.
"load data infile .." allowed for access to
unautohorized tables.
Due to a faulty if-statement it was possible to
circumvent the secure_file_priv restriction.
mysql-test/mysql-test-run.pl:
* Add SECURE_LOAD_PATH environment variable to mtr test cases.
mysql-test/suite/sys_vars/r/secure_file_priv2.result:
* add test for bug58747
mysql-test/suite/sys_vars/t/secure_file_priv2-master.opt:
* add test for bug58747
mysql-test/suite/sys_vars/t/secure_file_priv2.test:
* add test for bug58747
sql/sql_load.cc:
* Correct faulty if-statement
* fix indentation
* move my_stat() block to after is_secure_file_path() check.
file .\item_subselect.cc, line 836
IN quantified predicates are never executed directly. They are rather wrapped
inside nodes called IN Optimizers (Item_in_optimizer) which take care of the
execution. However, this is not done during query preparation. Unfortunately
the LIKE predicate pre-evaluates constant right-hand side arguments even
during name resolution. Likely this is meant as an optimization.
Fixed by not pre-evaluating LIKE arguments in view prepare mode.
Back-ported to 5.0s
The user-visible problem was that changes to column-level privileges,
happened in between of PREPARE and EXECUTE of a prepared statement, were
neglected. I.e. a prepared statement could be executed with the
column-level privileges as of PREPARE-time. The problem existed for
column-level privileges only.
A similar problem existed for stored programs: the changes between
executions didn't have an effect.
Technically the thing is that table references are cached in
Prepared_statement::prepare() call. In subsequent
Prepared_statement::execute() calls those cached values are used.
There are two functions to get a field by name: find_field_in_table() and
find_field_in_table_ref(). On prepare-phase find_field_in_table_ref() is
called, on execute-phase -- find_field_in_table() because the table is
cached. find_field_in_table() does not check column-level privileges and
expects the caller to do that. The problem was that this check was
forgotten.
The fix is to check them there as it happens in find_field_in_table_ref().
Original revid: alexey.kopytov@sun.com-20100723115254-jjwmhq97b9wl932l
> Bug #54476: crash when group_concat and 'with rollup' in
> prepared statements
>
> Using GROUP_CONCAT() together with the WITH ROLLUP modifier
> could crash the server.
>
> The reason was a combination of several facts:
>
> 1. The Item_func_group_concat class stores pointers to ORDER
> objects representing the columns in the ORDER BY clause of
> GROUP_CONCAT().
>
> 2. find_order_in_list() called from
> Item_func_group_concat::setup() modifies the ORDER objects so
> that their 'item' member points to the arguments list
> allocated in the Item_func_group_concat constructor.
>
> 3. In some cases (e.g. in JOIN::rollup_make_fields) a copy of
> the original Item_func_group_concat object could be created by
> using the Item_func_group_concat::Item_func_group_concat(THD
> *thd, Item_func_group_concat *item) copy constructor. The
> latter essentially creates a shallow copy of the source
> object. Memory for the arguments array is allocated on
> thd->mem_root, but the pointers for arguments and ORDER are
> copied verbatim.
>
> What happens in the test case is that when executing the query
> for the first time, after a copy of the original
> Item_func_group_concat object has been created by
> JOIN::rollup_make_fields(), find_order_in_list() is called for
> this new object. It then resolves ORDER BY by modifying the
> ORDER objects so that they point to elements of the arguments
> array which is local to the cloned object. When thd->mem_root
> is freed upon completing the execution, pointers in the ORDER
> objects become invalid. Those ORDER objects, however, are also
> shared with the original Item_func_group_concat object which is
> preserved between executions of a prepared statement. So the
> first call to find_order_in_list() for the original object on
> the second execution tries to dereference an invalid pointer.
>
> The solution is to create copies of the ORDER objects when
> copying Item_func_group_concat to not leave any stale pointers
> in other instances with different lifecycles.
mysql-test/r/func_gconcat.result:
Test case for bug #54476.
mysql-test/t/func_gconcat.test:
Test case for bug #54476.
sql/item_sum.cc:
Copy the ORDER objects pointed to by the elements of the
'order' array in the copy constructor of
Item_func_group_concat.
sql/table.h:
Removed the unused 'item_copy' member of the ORDER class.
Bug#57913 large negative number to string conversion functions crash
String object which is used as result container of the item
has uninitialized 'str_charset' field. This object
might be used later to preform some internal operations
and str_charset field is involved in these operations.
It leads to crash.
The fix is to intialize str_charset in my_decimal2string() func.
mysql-test/r/func_str.result:
test case
mysql-test/t/func_str.test:
test case
sql/my_decimal.cc:
intialize str_charset field for result string
in my_decimal2string() func.
--Bug#52157 various crashes and assertions with multi-table update, stored function
--Bug#54475 improper error handling causes cascading crashing failures in innodb/ndb
--Bug#57703 create view cause Assertion failed: 0, file .\item_subselect.cc, line 846
--Bug#57352 valgrind warnings when creating view
--Recently discovered problem when a nested materialized derived table is used
before being populated and it leads to incorrect result
We have several modes when we should disable subquery evaluation.
The reasons for disabling are different. It could be
uselessness of the evaluation as in case of 'CREATE VIEW'
or 'PREPARE stmt', or we should disable subquery evaluation
if tables are not locked yet as it happens in bug#54475, or
too early evaluation of subqueries can lead to wrong result
as it happened in Bug#19077.
Main problem is that if subquery items are treated as const
they are evaluated in ::fix_fields(), ::fix_length_and_dec()
of the parental items as a lot of these methods have
Item::val_...() calls inside.
We have to make subqueries non-const to prevent unnecessary
subquery evaluation. At the moment we have different methods
for this. Here is a list of these modes:
1. PREPARE stmt;
We use UNCACHEABLE_PREPARE flag.
It is set during parsing in sql_parse.cc, mysql_new_select() for
each SELECT_LEX object and cleared at the end of PREPARE in
sql_prepare.cc, init_stmt_after_parse(). If this flag is set
subquery becomes non-const and evaluation does not happen.
2. CREATE|ALTER VIEW, SHOW CREATE VIEW, I_S tables which
process FRM files
We use LEX::view_prepare_mode field. We set it before
view preparation and check this flag in
::fix_fields(), ::fix_length_and_dec().
Some bugs are fixed using this approach,
some are not(Bug#57352, Bug#57703). The problem here is
that we have a lot of ::fix_fields(), ::fix_length_and_dec()
where we use Item::val_...() calls for const items.
3. Derived tables with subquery = wrong result(Bug19077)
The reason of this bug is too early subquery evaluation.
It was fixed by adding Item::with_subselect field
The check of this field in appropriate places prevents
const item evaluation if the item have subquery.
The fix for Bug19077 fixes only the problem with
convert_constant_item() function and does not cover
other places(::fix_fields(), ::fix_length_and_dec() again)
where subqueries could be evaluated.
Example:
CREATE TABLE t1 (i INT, j BIGINT);
INSERT INTO t1 VALUES (1, 2), (2, 2), (3, 2);
SELECT * FROM (SELECT MIN(i) FROM t1
WHERE j = SUBSTRING('12', (SELECT * FROM (SELECT MIN(j) FROM t1) t2))) t3;
DROP TABLE t1;
4. Derived tables with subquery where subquery
is evaluated before table locking(Bug#54475, Bug#52157)
Suggested solution is following:
-Introduce new field LEX::context_analysis_only with the following
possible flags:
#define CONTEXT_ANALYSIS_ONLY_PREPARE 1
#define CONTEXT_ANALYSIS_ONLY_VIEW 2
#define CONTEXT_ANALYSIS_ONLY_DERIVED 4
-Set/clean these flags when we perform
context analysis operation
-Item_subselect::const_item() returns
result depending on LEX::context_analysis_only.
If context_analysis_only is set then we return
FALSE that means that subquery is non-const.
As all subquery types are wrapped by Item_subselect
it allow as to make subquery non-const when
it's necessary.
mysql-test/r/derived.result:
test case
mysql-test/r/multi_update.result:
test case
mysql-test/r/view.result:
test case
mysql-test/suite/innodb/r/innodb_multi_update.result:
test case
mysql-test/suite/innodb/t/innodb_multi_update.test:
test case
mysql-test/suite/innodb_plugin/r/innodb_multi_update.result:
test case
mysql-test/suite/innodb_plugin/t/innodb_multi_update.test:
test case
mysql-test/t/derived.test:
test case
mysql-test/t/multi_update.test:
test case
mysql-test/t/view.test:
test case
sql/item.cc:
--removed unnecessary code
sql/item_cmpfunc.cc:
--removed unnecessary checks
--THD::is_context_analysis_only() is replaced with LEX::is_ps_or_view_context_analysis()
sql/item_func.cc:
--refactored context analysis checks
sql/item_row.cc:
--removed unnecessary checks
sql/item_subselect.cc:
--removed unnecessary code
--added DBUG_ASSERT into Item_subselect::exec()
which asserts that subquery execution can not happen
if LEX::context_analysis_only is set, i.e. at context
analysis stage.
--Item_subselect::const_item()
Return FALSE if LEX::context_analysis_only is set.
It prevents subquery evaluation in ::fix_fields &
::fix_length_and_dec at context analysis stage.
sql/item_subselect.h:
--removed unnecessary code
sql/mysql_priv.h:
--Added new set of flags.
sql/sql_class.h:
--removed unnecessary code
sql/sql_derived.cc:
--added LEX::context_analysis_only analysis intialization/cleanup
sql/sql_lex.cc:
--init LEX::context_analysis_only field
sql/sql_lex.h:
--New LEX::context_analysis_only field
sql/sql_parse.cc:
--removed unnecessary code
sql/sql_prepare.cc:
--removed unnecessary code
--added LEX::context_analysis_only analysis intialization/cleanup
sql/sql_select.cc:
--refactored context analysis checks
sql/sql_show.cc:
--added LEX::context_analysis_only analysis intialization/cleanup
sql/sql_view.cc:
--added LEX::context_analysis_only analysis intialization/cleanup
Auto increment value wraps when performing a bulk insert with
auto_increment_increment and auto_increment_offset greater than
one.
The fix:
If overflow happened then return MAX_ULONGLONG value as an
indication of overflow and check this before storing the
value into the field in update_auto_increment().
mysql-test/r/auto_increment.result:
test case
mysql-test/suite/innodb/r/innodb-autoinc.result:
test case fix
mysql-test/suite/innodb/t/innodb-autoinc.test:
test case fix
mysql-test/suite/innodb_plugin/r/innodb-autoinc.result:
test case fix
mysql-test/suite/innodb_plugin/t/innodb-autoinc.test:
test case fix
mysql-test/t/auto_increment.test:
test case
sql/handler.cc:
If overflow happened then return MAX_ULONGLONG value as an
indication of overflow and check this before storing the
value into the field in update_auto_increment().
Explain fails at fix_fields stage and some items are left unfixed,
particulary Item_group_concat. Item_group_concat::orig_args field
is uninitialized in this case and Item_group_concat::print call
leads to crash.
The fix:
move the initialization of Item_group_concat::orig_args
into constructor.
mysql-test/r/func_gconcat.result:
test case
mysql-test/t/func_gconcat.test:
test case
sql/item_sum.cc:
move the initialization of Item_group_concat::orig_args
into constructor.
assignments and comparison in query
A query that compares assignments of the same
user variable caused Valgrind warnings: access
to freed memory region.
In case of a DECIMAL argument the assignment
operator (:=) may return a pointer to a stored
value instead of its copy when evaluated.
The next assignment to the same variable may:
a) overwrite the stored value with a new one
and return the same pointer or even
b) reallocate stored value.
Thus, if we evaluate an assignment and keep
the result pointer and then evaluate another
assignment to the same variable, then the
kept result pointer of the first assignment
will point to unexpectedly changed data or
it may be a dead pointer.
That may cause wrong data or crash.
The user_var_entry::val_decimal method has
been modified to copy user variable data.
mysql-test/r/user_var.result:
Test case for bug #57187.
mysql-test/t/user_var.test:
Test case for bug #57187.
sql/item_func.cc:
Bug #57187: more user variable fun with multiple
assignments and comparison in query
The user_var_entry::val_decimal method has
been modified to copy user variable data.
When a query fails with a different error on the slave,
the sql thread outputs a message (M) containing:
1. the error message format for the master error code
2. the master error code
3. the error message for the slave's error code
4. the slave error code
Given that the slave has no information on the error message
itself that the master outputs, it can only print its own
version of the message format (but stripped from the
additional data if the message format requires). This may
confuse users.
To fix this we augment the slave's message (M) to explicitly
state that the master's message is actually an error message
format, the one associated with the given master error code
and that the slave server knows about.
When installing plugins, there is a missing check
for slash (/) in the path on Windows. Note that on
Windows, both / and \ can be used to separate
directories.
This patch fixes the issue by:
- Adding a FN_DIRSEP symbol for all platforms
consisting of a string of legal directory
separators.
- Adding a charset-aware version of strcspn().
- Adding a check_valid_path() function that uses
my_strcspn() to check if any FN_DIRSEP character
is in the supplied string.
- Using the check_valid_path() function in
sql_plugin.cc and sql_udf.cc (which means
replacing the existing test there).
include/config-netware.h:
Adding FN_DIRSEP
******
Adding FN_DIRSEP
include/config-win.h:
Adding FN_DIRSEP
******
Adding FN_DIRSEP
include/m_ctype.h:
Adding my_strspn() and my_strcspn().
******
Adding my_strspn() and my_strcspn().
include/my_global.h:
Adding FN_DIRSEP
******
Adding FN_DIRSEP
mysql-test/t/plugin_not_embedded.test:
Adding test that file names containing / is
disallowed on *all* platforms.
******
Adding test that file names containing / is
disallowed on *all* platforms.
sql/sql_plugin.cc:
Introducing check_if_path() function for
checking if filename is a path to include
/ on Windows.
******
Introducing check_if_path() function for
checking if filename is a path to include
/ on Windows.
sql/sql_udf.cc:
Switching to use check_if_path() function.
******
Switching to use check_if_path() function.
strings/my_strchr.c:
Adding my_strspn() and my_strcspn().
******
Adding my_strspn() and my_strcspn().
Fixing the testcase to use the database name
as connected_db instead of 'test' database.
mysql-test/r/mysql.result:
Additional fix in the test for bug#54899.
mysql-test/t/mysql.test:
Additional fix in the test for bug#54899.
when generating new name.
If find_uniq_filename returns an error, then this error is not
being propagated upwards, and execution does not report error to
the user (although a entry in the error log is generated).
Additionally, some more errors were ignored in new_file_impl:
- when writing the rotate event
- when reopening the index and binary log file
This patch addresses this by propagating the error up in the
execution stack. Furthermore, when rotation of the binary log
fails, an incident event is written, because there may be a
chance that some changes for a given statement, were not properly
logged. For example, in SBR, LOAD DATA INFILE statement requires
more than one event to be logged, should rotation fail while
logging part of the LOAD DATA events, then the logged data would
become inconsistent with the data in the storage engine.
mysql-test/include/restart_mysqld.inc:
Refactored restart_mysqld so that it is not hardcoded for
mysqld.1, but rather for the current server.
mysql-test/suite/binlog/t/binlog_index.test:
The error on open of index and binary log on new_file_impl
is now caught. Thence the user will get an error message.
We need to accomodate this change in the test case for the
failing FLUSH LOGS.
mysql-test/suite/rpl/t/rpl_binlog_errors-master.opt:
Sets max_binlog_size to 4096.
mysql-test/suite/rpl/t/rpl_binlog_errors.test:
Added some test cases for asserting that the error is found
and reported.
sql/handler.cc:
Catching error now returned by unlog (in ha_commit_trans) and
returning it.
sql/log.cc:
Propagating errors from new_file_impl upwards. The errors that
new_file_impl catches now are:
- error on generate_new_name
- error on writing the rotate event
- error when opening the index or the binary log file.
sql/log.h:
Changing declaration of:
- rotate_and_purge
- new_file
- new_file_without_locking
- new_file_impl
- unlog
They now return int instead of void.
sql/mysql_priv.h:
Change signature of reload_acl_and_cache so that write_to_binlog
is an int instead of bool.
sql/mysqld.cc:
Redeclaring not_used var as int instead of bool.
sql/rpl_injector.cc:
Changes to catch the return from rotate_and_purge.
sql/slave.cc:
Changes to catch the return values for new_file and rotate_relay_log.
sql/slave.h:
Changes to rotate_relay_log declaration (now returns int
instead of void).
sql/sql_load.cc:
In SBR, some logging of LOAD DATA events goes through
IO_CACHE_CALLBACK invocation at mf_iocache.c:_my_b_get. The
IO_CACHE implementation is ignoring the return value for from
these callbacks (pre_read and post_read), so we need to find out
at the end of the execution if the error is set or not in THD.
sql/sql_parse.cc:
Catching the rotate_relay_log and rotate_and_purge return values.
Semantic change in reload_acl_and_cache so that we report errors
in binlog interactions through the write_to_binlog output parameter.
If there was any failure while rotating the binary log, we should
then report the error to the client when handling SQLCOMM_FLUSH.
InnoDB AUTOINC code expects the locks to be released in strict reverse order
at the end of the statement. However, nested stored proedures and partition
tables break this rule. We now allow the locks to be deleted from the
trx->autoinc_locks vector in any order but optimise for the common (old) case.
rb://441 Approved by Marko Makela
Improved error handling such that queries against Information_Schema.Tables won't
fail if a Federated table is unable to connect to remote host.
sql/sql_show.cc:
If Handler::Info() fails, save error text in TABLE COMMENTS column, clear error.
When using BINLOG statement to execute rows log events, session variables
foreign_key_checks and unique_checks are changed temporarily. As each rows
log event has their own special session environment and its own
foreign_key_checks and unique_checks can be different from current session
which executing the BINLOG statement. But these variables are not restored
correctly after BINLOG statement. This problem will cause that the following
statements fail or generate unexpected data.
In this patch, code is added to backup and restore these two variables.
So BINLOG statement will not affect current session's variables again.
mysql-test/extra/binlog_tests/binlog.test:
Add test to verify this patch.
mysql-test/suite/binlog/r/binlog_row_binlog.result:
Add test to verify this patch.
mysql-test/suite/binlog/r/binlog_stm_binlog.result:
Add test to verify this patch.
sql/sql_binlog.cc:
Add code to backup and restore thd->options.
win x86 debug_max
The windows MTR run exhibited a different test execution
ordering (due to the fact that in these platforms MTR is invoked
with --parallel > 1). This uncovered a bug in the aforementioned
test case, which is triggered by the following conditions:
1. server is not restarted between two different tests;
2. the test before binlog.binlog_row_failure_mixing_engines
issues flush logs;
3. binlog.binlog_row_failure_mixing_engines uses binlog
positions to limit the output of show_binlog_events;
4. binlog.binlog_row_failure_mixing_engines does not state which
binlog file to use, thence it uses a wrong binlog file with
the correct position.
There are two possible fixes: 1. make sure that the test start
from a clean slate - binlog wise; 2. in addition to the position,
also state the binary log file before sourcing
show_binlog_events.inc .
We go for fix#1, ie, deploy a RESET MASTER before the test is
actually started.
metadata"
Improved error handling such that queries against Information_Schema.Tables won't
fail if a federated table can't make a remote connection.
mysql-test/r/merge.result:
Updated with warnings that were previously masked.
mysql-test/r/show_check.result:
Updated with warnings that were previously masked.
mysql-test/r/view.result:
Updated with warnings that were previously masked.
sql/sql_show.cc:
If get_schema_tables_record() encounters an error, push a warning,
set the TABLE COMMENT column with the error text, and clear the
error so that the operation can continue.
Problem: MySQL cp1251 did not support 'U+20AC EURO SIGN'
which was assigned a few years ago to 0x88.
Fix: adding mapping: 0x88 <-> U+20AC
@ mysql-test/include/ctype_8bit.inc
New shared file to test 8bit character sets.
@ mysql-test/r/ctype_cp1251.result
@ mysql-test/t/ctype_cp1251.test
Adding tests
@ sql/share/charsets/cp1251.xml
Adding mapping
@ strings/ctype-extra.c
Regenerating ctype-extra.c using strings/conf_to_src
according to new cp1251.xml
After dropping and recreating the database specified along with --one-database
option at command line, mysql client keeps filtering the statements even after
the execution of a 'USE' command on the same database.
--one-database option enables the filtering of statements when the current
database is not the one specified at the command line. However, when the same
database is dropped and recreated the variable (current_db) that holds the
inital database name gets altered. This bug exploits the fact that current_db
initially gets set to null value (0) when a 'use db_name' follows the recreation
of same database db_name (speficied at the command line) and hence skip_updates
gets set to 1, which inturn triggers the further filtering of statements.
Fixed by making get_current_db() a no-op function when one_database is set,
and hence, under that condition current_db will not get altered.
Note, however the value of current_db can change when we execute 'connect'
command with a differnet database to reconnect to the server, in which case,
the behavior of --one-database will be formulated using this new database.
client/mysql.cc:
Bug #54899 : --one-database option cannot handle DROP/CREATE DATABASE commands
Added an if statement at the beginnning of get_current_db() , which makes it
a no-op function if one-database option is specified, and hence current_db
remains unchanged.
Changed the help message for one-database option to a more appropriate message
as specified in mysql documentation.
mysql-test/r/mysql.result:
Added a test case for bug#54899 and some more test cases to
check other one-database option related behaviors.
mysql-test/t/mysql.test:
Added a test case for bug#54899 and some more test cases to
check other one-database option related behaviors.
It does work in general, the problem here was that the test name
'alter_table' matches 'main.alter_table-big' which has already been found.
Fixed by matching more explicitly (with/without suite name)
43233/55794.
mysql-test/r/change_user.result:
Don't use -1 integer wrap around. It used to work, but now we do what's
actually in the documentation. In tests, we now use DEFAULT or the
numeral equivalent (as we do in the 5.6 tests).
mysql-test/r/key_cache.result:
Can't drop default key case is an error now, not a warning, for compatibility
with 5.6.
mysql-test/r/variables.result:
Can't drop default key case is an error now, not a warning, for compatibility
with 5.6.
mysql-test/t/change_user.test:
Don't use -1 integer wrap around. It used to work, but now we do what's
actually in the documentation. In tests, we now use DEFAULT or the
numeral equivalent (as we do in the 5.6 tests).
mysql-test/t/key_cache.test:
Can't drop default key case is an error now, not a warning, for compatibility
with 5.6.
mysql-test/t/variables.test:
Can't drop default key case is an error now, not a warning, for compatibility
with 5.6.
sql/mysqld.cc:
0 is a legal (albeit magic) value: "drop key cache."
sql/set_var.cc:
bound_unsigned() can go now, it was just a kludge until things are done
The Right Way, which they are now.
Can't drop default key case is an error now, not a warning, for compatibility
with 5.6.
tests/mysql_client_test.c:
Don't use -1 integer wrap around. It used to work, but now we do what's
actually in the documentation. In tests, we now use DEFAULT or the
numeral equivalent (as we do in the 5.6 tests).
> revision-id: gshchepa@mysql.com-20100801181236-uyuq6ewaq43rw780
> parent: alexey.kopytov@sun.com-20100723115254-jjwmhq97b9wl932l
> committer: Gleb Shchepa <gshchepa@mysql.com>
> branch nick: mysql-5.1-security
> timestamp: Sun 2010-08-01 22:12:36 +0400
> Bug #54461: crash with longblob and union or update with subquery
>
> Queries may crash, if
> 1) the GREATEST or the LEAST function has a mixed list of
> numeric and LONGBLOB arguments and
> 2) the result of such a function goes through an intermediate
> temporary table.
>
> An Item that references a LONGBLOB field has max_length of
> UINT_MAX32 == (2^32 - 1).
>
> The current implementation of GREATEST/LEAST returns REAL
> result for a mixed list of numeric and string arguments (that
> contradicts with the current documentation, this contradiction
> was discussed and it was decided to update the documentation).
>
> The max_length of such a function call was calculated as a
> maximum of argument max_length values (i.e. UINT_MAX32).
>
> That max_length value of UINT_MAX32 was used as a length for
> the intermediate temporary table Field_double to hold
> GREATEST/LEAST function result.
>
> The Field_double::val_str() method call on that field
> allocates a String value.
>
> Since an allocation of String reserves an additional byte
> for a zero-termination, the size of String buffer was
> set to (UINT_MAX32 + 1), that caused an integer overflow:
> actually, an empty buffer of size 0 was allocated.
>
> An initialization of the "first" byte of that zero-size
> buffer with '\0' caused a crash.
>
> The Item_func_min_max::fix_length_and_dec() has been
> modified to calculate max_length for the REAL result like
> we do it for arithmetical operators.
mysql-test/r/func_misc.result:
Test case for bug #54461.
mysql-test/t/func_misc.test:
Test case for bug #54461.
sql/item_func.cc:
Bug #54461: crash with longblob and union or update with subquery
The Item_func_min_max::fix_length_and_dec() has been
modified to calculate max_length for the REAL result like
we do it for arithmetical operators.
If mysqltest dies, mtr waits to see if mysqld dies too within 100ms
But in that case, it should not care about expected crash
Fix: jump past the code that checks the expect file
OPTIMIZE TABLE recreates the whole table. That is why the counter gets reset.
Making the next autoinc column persistent is a separate issue from resetting
the value after an OPTIMIZE TABLE. We already have a check for ALTER TABLE
and CREATE INDEX to preserve the value on table recreate. We should be able to
add an additional check for OPTIMIZE TABLE to preserve the next value.
rb://519 Approved by Jimmy Yang.
Follow-up discussed with Reporter:
Avoid hard shutdown after test failure, if caused by server log warning
AND we are running valgrind
More general pick-up of valgrind summaries, order may apparently vary
Do exit(1) if we did find valgrind summary warnings
In case of low memory sort buffer QUICK_INDEX_MERGE_SELECT creates
temporary file where is stores row ids which meet QUICK_SELECT ranges
except of clustered pk range, clustered range is processed separately.
In init_read_record we check if temporary file is used and choose
appropriate record access method. It does not take into account that
temporary file contains partial result in case of QUICK_INDEX_MERGE_SELECT
with clustered pk range.
The fix is always to use rr_quick if QUICK_INDEX_MERGE_SELECT
with clustered pk range is used.
mysql-test/suite/innodb/r/innodb_mysql.result:
test case
mysql-test/suite/innodb/t/innodb_mysql.test:
test case
mysql-test/suite/innodb_plugin/r/innodb_mysql.result:
test case
mysql-test/suite/innodb_plugin/t/innodb_mysql.test:
test case
sql/opt_range.h:
added new method
sql/records.cc:
The fix is always to use rr_quick if QUICK_INDEX_MERGE_SELECT
with clustered pk range is used.
> revision-id: alexey.kopytov@sun.com-20100824103548-ikm79qlfrvggyj9h
> parent: sunny.bains@oracle.com-20100816001222-xqc447tr6jwh8c53
> committer: Alexey Kopytov <Alexey.Kopytov@Sun.com>
> branch nick: 5.1-security
> timestamp: Tue 2010-08-24 14:35:48 +0400
> message:
> Bug #55568: user variable assignments crash server when used
> within query
>
> The server could crash after materializing a derived table
> which requires a temporary table for grouping.
>
> When destroying the temporary table used to execute a query for
> a derived table, JOIN::destroy() did not clean up Item_fields
> pointing to fields in the temporary table. This led to
> dereferencing a dangling pointer when printing out the items
> tree later in the outer SELECT.
>
> The solution is an addendum to the patch for bug37362: in
> addition to cleaning up items in tmp_all_fields3, do the same
> for items in tmp_all_fields1, since now we have an example
> where this is necessary.
sql/field.cc:
Make sure field->table_name is not set to NULL in
Field::make_field() to avoid assertion failure in
Item_field::make_field() after cleaning up items
(the assertion fired in udf.test when running
the test suite with the patch applied).
sql/sql_select.cc:
In addition to cleaning up items in tmp_all_fields3, do the
same for items in tmp_all_fields1.
Introduce a new helper function to avoid code duplication.
sql/sql_select.h:
Introduce a new helper function to avoid code duplication in
JOIN::destroy().
and related small fixes.
mysql-test/t/user_var.test:
test for bug
sql/field_conv.cc:
From the C standard, memcpy() has undefined behaviour if to->ptr==from->ptr
sql/item_func.cc:
In the case of BUG#56138, entry->value==ptr in which case memcpy()
has undefined results per the C standard.
sql/sql_select.cc:
Work around a bug in old gcc
Problem: crash in Item_float constructor on DBUG_ASSERT due
to not null-terminated string parameter.
Fix: making Item_float::Item_float non-null-termintated parameter safe:
- Using temporary buffer when generating error
modified:
@ mysql-test/r/xml.result
@ mysql-test/t/xml.test
@ sql/item.cc
ESCAPE argument might be empty string. It leads
to server crash under some circumstances.
The fix:
-added check if ESCAPE argument result is not empty string
mysql-test/r/ctype_latin1.result:
test case
mysql-test/t/ctype_latin1.test:
test case
sql/item_cmpfunc.cc:
-added check if ESCAPE argument result is not empty string
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.
Problem: When GET_FORMAT() is called two times from the upper
level function (e.g. LEAST in the bug report), on the second
call "res= args[0]->val_str(...)" and str point to the same
String object.
1. Fix: changing the order from
- get val_str into tmp_value then convert to str
to
- get val_str into str then convert to tmp_value
The new order is more correct: the purpose of "str" parameter
is exactly to call val_str() for arguments.
The purpose of String class members (like tmp_value) is to do further
actions on the result.
Doing it in the other way around give unexpected surprises.
2. Using str_value instead of str to do padding, for the same reason.
Bug#55794: ulonglong options of mysqld show wrong values.
Port the few remaining system variables to the correct mechanism --
range-check in check-stage (and throw error or warning at that point
as needed and depending on STRICTness), update in update stage.
Fix some signedness errors when retrieving sysvar values for display.
mysql-test/r/variables.result:
Show that we throw warnings or errors depending on strictness
even for "special" variables now.
mysql-test/t/variables.test:
Show that we throw warnings or errors depending on strictness
even for "special" variables now.
sql/item_func.cc:
show sys_var_ulonglong_ptr and SHOW_LONGLONG type variables as unsigned.
sql/set_var.cc:
move range-checking from update stage to check stage for the remaining
few sys-vars that broke the pattern
sql/set_var.h:
add check functions.
Bug#57820 extractvalue crashes
Problem: ExtractValue and Replace crashed in some cases
due to invalid handling of empty and NULL arguments.
Per file comments:
@mysql-test/r/ctype_ujis.result
@mysql-test/r/xml.result
@mysql-test/t/ctype_ujis.test
@mysql-test/t/xml.test
Adding tests
@sql/item_strfunc.cc
Make sure Item_func_replace::val_str safely handles empty strings.
@sql/item_xmlfunc.cc
set null_value if nodeset_func returned NULL,
which is possible when the second argument is an
unset user variable.
MySQL 5.1 server
Server used to clip overly long user-names. This was presumably lost
when code was made UTF8-clean.
Now we emulate the behaviour for backward compatibility, but UTF8-ly
correct.
mysql-test/r/connect.result:
Show that user-names that are too long get clipped now.
mysql-test/t/connect.test:
Show that user-names that are too long get clipped now.
sql/sql_connect.cc:
Clip user-name to 16 characters (not bytes).
strings/CHARSET_INFO.txt:
Clarify in docs.
The test result differs on windows, since
it writes out 'localhost:<port>' instead of
only 'localhost', since it uses tcp/ip instead
of unix sockets on windows.
Fixed by replacing that column.
Also requires --big-test from some long running tests
and added a weekly run of all test requiring --big-test.
mysql-test/collections/default.weekly:
Added a run of big-test (already exists in 5.5).
mysql-test/r/variables-big.result:
Updated results
mysql-test/suite/parts/t/part_supported_sql_func_innodb.test:
requiring --big-test since the test takes long time
mysql-test/suite/parts/t/partition_alter1_1_2_innodb.test:
requiring --big-test since the test takes long time
mysql-test/suite/parts/t/partition_alter1_2_innodb.test:
requiring --big-test since the test takes long time
mysql-test/suite/parts/t/partition_alter4_innodb.test:
requiring --big-test since the test takes long time
mysql-test/t/disabled.def:
Disabled two tests since they fail and was already
reported as bugs (but was never run since they requires
--big-test flag).
mysql-test/t/variables-big.test:
Replacing column 3 in process list since it
is not the same on windows as in unix.
with on duplicate key update
There was a missed corner case in the partitioning
handler, which caused the next_insert_id to be changed
in the second level handlers (i.e the hander of a partition),
which caused this debug assertion.
The solution was to always ensure that only the partitioning
level generates auto_increment values, since if it was done
within a partition, it may fail to match the partition
function.
mysql-test/suite/parts/inc/partition_auto_increment.inc:
Added tests
mysql-test/suite/parts/r/partition_auto_increment_blackhole.result:
updated results
mysql-test/suite/parts/r/partition_auto_increment_innodb.result:
updated results
mysql-test/suite/parts/r/partition_auto_increment_memory.result:
updated results
mysql-test/suite/parts/r/partition_auto_increment_myisam.result:
updated results
sql/ha_partition.cc:
In <engine>::write_row the auto_inc value is generated
through handler::update_auto_increment (which calls <engine>::get_auto_increment() if needed).
If:
* INSERT_ID was set to 0
* it was updated to 0 by 'INSERT ... ON DUPLICATE KEY UPDATE' and changed partitions for the row
Then it would try to generate a auto_increment value in the
<engine for a specific partition>::write_row, which will
trigger the assert.
So the solution is to prevent this by,
in ha_partition::write_row set auto_inc_field_not_null and
add MODE_NO_AUTO_VALUE_ON_ZERO
in ha_partition::update_row (when changing partition) temporary
set table->next_number_field to NULL which calling the
partitions ::write_row().
in different default schema.
In strict mode, when data truncation or conversion happens,
THD::killed is set to THD::KILL_BAD_DATA.
This is abuse of KILL mechanism to guarantee that execution
of statement is aborted.
The stored procedures execution, on the other hand,
upon detection that a connection was killed, would
terminate immediately, without trying to restore the caller's
context, in particular, restore the caller's current schema.
The fix is, when terminating a stored procedure execution,
to only bypass cleanup if the entire connection was killed,
not in case of other forms of KILL.
mysql-test/r/sp-bugs.result:
Added result for a test case for bug#54375.
mysql-test/t/sp-bugs.test:
Added test case for bug#54375.
sql/sp_head.cc:
sp_head::execute modified: restore saved current db if
connection is not killed.
ALTER TABLE RENAME, DISABLE KEYS.
The code of ALTER TABLE RENAME, DISABLE KEYS could
issue a commit while holding LOCK_open mutex.
This is a regression introduced by the fix for
Bug 54453.
This failed an assert guarding us against a potential
deadlock with connections trying to execute
FLUSH TABLES WITH READ LOCK.
The fix is to move acquisition of LOCK_open outside
the section that issues ha_autocommit_or_rollback().
LOCK_open is taken to protect against concurrent
operations with .frms and the table definition
cache, and doesn't need to cover the call to commit.
A test case added to innodb_mysql.test.
The patch is to be null-merged to 5.5, which
already has 54453 null-merged to it.
mysql-test/suite/innodb/r/innodb_mysql.result:
Added test results for test for bug#56619.
mysql-test/suite/innodb/t/innodb_mysql.test:
Added test for bug#56619.
sql/sql_table.cc:
mysql_alter_table() modified: moved acquisition of LOCK_open
after call to ha_autocommit_or_rollback.
Problem: a flaw (derefencing a NULL pointer) in the LIKE optimization
code may lead to a server crash in some rare cases.
Fix: check the pointer before its dereferencing.
mysql-test/r/func_like.result:
Fix for bug #54575: crash when joining tables with unique set column
- test result.
mysql-test/t/func_like.test:
Fix for bug #54575: crash when joining tables with unique set column
- test case.
sql/item_cmpfunc.cc:
Fix for bug #54575: crash when joining tables with unique set column
- check res2 buffer pointer before its dereferencing
as it may be NULL in some cases.
sporadically.
The cause of the sporadic time out was a leaking protection
against the global read lock, taken by the RENAME statement,
and not released in case of an error occurred during RENAME.
The leaking protection counter would lead to the value of
protect_against_global_read never dropping to 0.
Consequently FLUSH TABLES in all connections, including the
one that leaked the protection, could not proceed.
The fix is to ensure that all branchesin RENAME code properly
release GRL protection.
mysql-test/r/log_tables.result:
Added results for test for bug#47924.
mysql-test/t/log_tables.test:
Added test for bug#47924.
sql/sql_rename.cc:
mysql_rename_tables() modified: replaced return from function
to goto to clean up code block in case of error.