Added a second internal variable $mysql_errname
This is set the same way as $mysql_errno
Can be used like "if ($mysql_errname == ER_NO_SUCH_TABLE)...."
This fixes a bug that when you use mysqldump --no-create-info to generate a dump that you want to merge with an existing table,
you can get an innodb table with duplicated unique keys.
Patch orignally by Eric Bergen.
client/mysqldump.c:
Only use UNIQUE_CHECKS=0 for tables that are created.
This solves the issue that you can't get duplicate unique keys when merging two dumps.
mysql-test/r/mysqldump.result:
Test for mysqldump --no-create-info
This patch corrects a problem found in PB. Some platforms have very
different locations for the mysql installation. The client was not
able to find either my_print_defaults or mysqld predictably.
The patch adds two new command options --mysqld and --my-print-defaults
which can be used to provide the location of mysqld and
my_print_defaults by providing the paths.
The patch also changes the concatenation of the soname extension to
fix a problem found on some Ubuntu systems.
The patch contains changes to the test to ensure it will run on all
platforms. A trap is set in the test to skip testing if the location
of mysqld, my_print_defaults, or the daemon_example.ini files cannot
be determined.
This patch corrects a problem found in pushbuild with the stat()
method on some platforms. The code was changed to use my_stat()
instead.
Also adds mysql_plugin to the mysql.spec.sh file for packaging.
TOOLS
Backport a fix for Bug 57094 from 5.5.
The following revision was backported:
# revision-id: alexander.nozdrin@oracle.com-20101006150613-ls60rb2tq5dpyb5c
# parent: bar@mysql.com-20101006121559-am1e05ykeicwnx48
# committer: Alexander Nozdrin <alexander.nozdrin@oracle.com>
# branch nick: mysql-5.5-bugteam-bug57094
# timestamp: Wed 2010-10-06 19:06:13 +0400
# message:
# Fix for Bug 57094 (Copyright notice incorrect?).
#
# The fix is to:
# - introduce ORACLE_WELCOME_COPYRIGHT_NOTICE define to have a single place
# to specify copyright notice;
# - replace custom copyright notices with ORACLE_WELCOME_COPYRIGHT_NOTICE
# in programs.
Patch fixes an issue with reading basedir on Windows. It fixes how
the code interprets opt_basedir on Windows by adding the correct
path separators and quotes for paths with spaces.
BUG#12664302 : mysql_plugin cannot recognize the plugin config file
Patch fixes an issue with reading a plugin config file. It adds
more information to the error messages to ensure the user is
using the options correctly. Also deals with paths with spacs on
Windows.
This patch changes the plugin configuration file format to make it
easier to add new plugins and remove complexity. It also adds more
information when plugin configuration file reads fail.
This patch adds a new client utility that enables or disables plugin
features. The utility disables or enables a plugin using values (name,
soname, and symbols) provided via a configuration file by the same name.
For example, to ENABLE the daemon_example plugin, the utility will read
the daemon_example.ini configuration file and use the values contained to
enable or disable the plugin.
The buffer was simply too small.
In 5.5 and trunk, the size is 311 + 31,
in 5.1 and below, the size is 331
client/sql_string.cc:
Increase buffer size in String::set(double, ...)
include/m_string.h:
Increase FLOATING_POINT_BUFFER
mysql-test/r/type_float.result:
New test cases.
mysql-test/t/type_float.test:
New test cases.
sql/sql_string.cc:
Increase buffer size in String::set(double, ...)
sql/unireg.h:
Move definition of FLOATING_POINT_BUFFER
CLIENT TOOLS
The fix is to backport part of revision:
- alexander.nozdrin@oracle.com-20101006150613-ls60rb2tq5dpyb5c
from mysql-5.5. In detail, we add the oracle welcome notice
header file proposed in the original patch and include/use it
in client/mysqlbinlog.cc, replacing the existing and obsolete
notice.
client/mysql_upgrade.c:
missing DBUG_RETURN
client/mysqladmin.cc:
client plugin memory wasn't freed
client/mysqlcheck.c:
client plugin memory, defaults, a result set, a command-line option value were not freed.
missing DBUG_RETURN.
client/mysqldump.c:
client plugin memory wasn't freed
client/mysqlslap.c:
client plugin memory wasn't freed
client/mysqltest.cc:
hopeless. cannot be fixed.
mysql-test/valgrind.supp:
Bug#56666 is now fixed.
mysys/array.c:
really, don't allocate if the caller didn't ask to.
mysys/my_init.c:
safemalloc checks must be done at the very end
mysys/my_thr_init.c:
not needed anymore
sql-common/client.c:
memory leak
sql/log.cc:
log_file was not closed, memory leak.
sql/mysqld.cc:
fix bug#56666 (causing many P_S related memory leaks).
close_active_mi() not called for --bootstrap, memory leak.
sql/sql_lex.cc:
redo Lex->mi handling
sql/sql_lex.h:
redo Lex->mi handling
sql/sql_plugin.cc:
plugins having PLUGIN_VAR_MEMALLOC string variables have this variables allocated in every THD.
The memory was freed in ~THD but only if plugin was still active. If plugin was unloaded the
variable was not found and the memory was lost. By loading and unloading plugins an arbitrary
amount of memory can be lost.
sql/sql_repl.cc:
redo Lex->mi handling
sql/sql_yacc.yy:
completely wrong handling of Lex->mi - run-time memory leak, by repeating the statement
arbitrary amount of memory can be lost.
Lex->mi.repl_ignore_server_ids_opt was allocated when parsing CHANGE MASTER,
and freed after executing the statement. if parser failed on syntax (or another)
error the statement was never executed. Lex->mi was simply bzero-ed for the next
CHANGE MASTER statement.
sql/table.cc:
didn't compile
storage/perfschema/pfs_lock.h:
Bug#56666 is fixed
... but differently
client/mysqltest.cc:
my_safe_print_str() don't append \n anymore
dbug/dbug.c:
restore safemalloc as a part of dbug suite
dbug/user.r:
restore 'S' flag documentation
include/my_dbug.h:
restore safemalloc as a part of dbug suite
include/my_sys.h:
move valgrind defines to a dedicated header
mysys/my_malloc.c:
use new safemalloc
mysys/stacktrace.c:
don't append \n. let the calller do it, if needed
sql/mysqld.cc:
my_safe_print_str() don't append \n anymore
- The client gets a progress report message that triggers a callback function if requested with mysql_options(MYSQL_PROGRESS_CALLBACK, function)
- Added Progress field last to 'show processlist'
- Stage, Max_stage and Progress field added to information_schema.progresslist
- The 'mysql' client by defaults enables progress reports when the output is a tty.
- Added progress_report_time time variable to configure how often progress reports is sent to client
Added read only system variable 'in_transaction' which is 1 if we have executed a BEGIN statement.
client/client_priv.h:
Added OPT_REPORT_PROGRESS
client/mysql.cc:
Added option --progress-reports (on by default if not batch mode)
Progress reports is written to stdout for long running commands
include/Makefile.am:
Added mysql/service_progress_report.h
include/myisamchk.h:
Added variables to be able to do progress reporting in Aria and later in MyISAM
include/mysql.h:
Added new mysql_options() parameter: MYSQL_PROGRESS_CALLBACK
include/mysql.h.pp:
Added new mysql_options() parameter: MYSQL_PROGRESS_CALLBACK
include/mysql/plugin.h:
Added functions for reporting progress.
include/mysql/plugin_auth.h.pp:
Added functions for reporting progress.
include/mysql_com.h:
Added CLIENT_PROGRESS mysql_real_connect() flag.
include/sql_common.h:
Added callback function for reporting progress
mysql-test/r/old-mode.result:
Ensure that SHOW PROGRESSLIST doesn't have the Progress column in old mode.
mysql-test/suite/funcs_1/datadict/datadict_priv.inc:
Added new column
mysql-test/suite/funcs_1/datadict/processlist_priv.inc:
Test all new PROCESSLIST columns
mysql-test/suite/funcs_1/r/is_columns_is.result:
Updated results
mysql-test/suite/funcs_1/r/is_columns_is_embedded.result:
Updated results
mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result:
Updated results
mysql-test/suite/funcs_1/r/is_tables_is_embedded.result:
Updated results
mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result:
Updated results
mysql-test/suite/funcs_1/r/processlist_priv_ps.result:
Updated results
mysql-test/suite/funcs_1/r/processlist_val_no_prot.result:
Updated results
mysql-test/suite/funcs_1/r/processlist_val_ps.result:
Updated results
mysql-test/suite/pbxt/r/pbxt_locking.result:
Updated results
mysql-test/suite/pbxt/r/skip_name_resolve.result:
Updated results
mysql-test/t/old-mode.test:
Ensure that SHOW PROGRESSLIST doesn't have the Progress column in old mode.
plugin/handler_socket/handlersocket/Makefile.am:
Added -lmysqlservices
scripts/mytop.sh:
Made 'State' field width dynamic.
Added 'Progress' to process list display.
sql-common/client.c:
Added handling of progress messages.
Removed check_license() function.
sql/mysql_priv.h:
Added opt_progress_report_time
sql/mysqld.cc:
Added progress_report_time time variable to configure how often progress reports is sent to client
sql/protocol.cc:
Added net_send_progress_packet()
sql/protocol.h:
New prototypes
sql/set_var.cc:
Added variables progress_report_time and in_transaction
sql/sql_acl.cc:
Safety fix: Made client_capabilities ulonglong
sql/sql_class.cc:
Added interface functions for progress reporting
sql/sql_class.h:
Added varibles in THD for progress reporting.
Added CF_REPORT_PROGRESS
sql/sql_load.cc:
Added progress reporting for LOAD DATA INFILE
sql/sql_parse.cc:
Added CF_REPORT_PROGRESS for top level commands for which it's safe to send progress reports to client
sql/sql_show.cc:
Added Progress field last to 'show processlist'
Stage, Max_stage and Progress field added to information_schema.progresslist
sql/sql_table.cc:
Added progress reporting for ALTER TABLE
Added THD as argument to copy_data_between_tables()
storage/maria/ha_maria.cc:
Added progress reporting for check table, repair table, analyze table
Fixed a bug in start_bulk_insert() that caused alter table to always run with all keys enabled.
storage/maria/ma_check.c:
Added progress reporting
Remember old state before starting repair. This removes some warnings from optimize_table if create-with-sort fails.
storage/maria/ma_check_standalone.h:
Added dummy reporting function for standalone Aria programs.
storage/maria/ma_sort.c:
Added progress reporting
storage/maria/maria_chk.c:
Updated version
storage/maria/maria_def.h:
Added new prototypes
tests/mysql_client_test.c:
Added test case for progress reporting
The patch replaces the use of the POSIX I/O interfaces in mysys on Windows with
the Win32 API calls (CreateFile, WriteFile, etc). The Windows HANDLE for the open
file is stored in the my_file_info struct, along with a flag for append mode
(because the Windows API does not support opening files in append mode in all cases)
The default max open files has been increased to 16384 and can be increased further
by setting --max-open-files=<value> during the server start.
Noteworthy benefit of this patch is that it removes limits from the table_cache size -
allowing for more simultaneus users
Noted that there was no memory leak, just a lot of used partitioned tables.
Fixed old bug: 'show status' now shows memory usage when compiled with safemalloc.
Added option --flush to mysqlcheck.c to run a 'flush tables' between each check to keep down memory usage.
Changed '--safemalloc' options to mysqld so that one can use --safemalloc and --skip-safemalloc.
Now skip-safemalloc is default (ie, we only do checking of memory overrun during free()) to speed up tests.
client/client_priv.h:
Added OPT_FLUSH_TABLES
client/mysqlcheck.c:
Added option --flush to mysqlcheck.c to run a 'flush tables' between each check to keep down memory usage.
mysql-test/mysql-test-run.pl:
Always run tests with --loose-skip-safemysqld for higher speed
sql/mysqld.cc:
Changed '--safemalloc' options so that one can use --safemalloc and --skip-safemalloc.
Now skip-safemalloc is default (ie, we only do checking of memory overrun during free()) to speed up tests
sql/sql_parse.cc:
Fixed old bug: 'show status' now shows memory usage when compiled with safemalloc.
storage/archive/archive_reader.c:
Changed all malloc() calls to use my_malloc()/my_free()
Added checks of malloc() calls.
storage/archive/ha_archive.cc:
Detect failure if init_archive_reader() and return errno. This fixed assert crash in my_seek().
Changed all malloc() calls to use my_malloc()/my_free()
Fixed crash when setting query_cache_type to 0.
client/Makefile.am:
Added zlib include (needed by checksum.c)
sql/set_var.cc:
Updated call to disable_query_cache()
sql/sql_cache.cc:
Don't give warning if we start mysqld with --query_cache_type=0 --query_cache-size=0
Fixed crash when setting query_cache_type to 0 (we shouldn't call query_cache.disable_query_cache() when there is no current_thd)
sql/sql_cache.h:
Added THD to disable_query_cache()
compilation error in mysys/my_getsystime.c fixed
some redundant code removed
sec_to_time, time_to_sec, from_unixtime, unix_timestamp, @@timestamp now
use decimal, not double for numbers with a fractional part.
purge_master_logs_before_date() fixed
many bugs in corner cases fixed
mysys/my_getsystime.c:
compilation failure fixed
sql/sql_parse.cc:
don't cut corners. it backfires.
A lot of small fixes and new test cases.
client/mysqlbinlog.cc:
Cast removed
client/mysqltest.cc:
Added missing DBUG_RETURN
include/my_pthread.h:
set_timespec_time_nsec() now only takes one argument
mysql-test/t/date_formats.test:
Remove --disable_ps_protocl as now also ps supports microseconds
mysys/my_uuid.c:
Changed to use my_interval_timer() instead of my_getsystime()
mysys/waiting_threads.c:
Changed to use my_hrtime()
sql/field.h:
Added bool special_const_compare() for fields that may convert values before compare (like year)
sql/field_conv.cc:
Added test to get optimal copying of identical temporal values.
sql/item.cc:
Return that item_int is equal if it's positive, even if unsigned flag is different.
Fixed Item_cache_str::save_in_field() to have identical null check as other similar functions
Added proper NULL check to Item_cache_int::save_in_field()
sql/item_cmpfunc.cc:
Don't call convert_constant_item() if there is nothing that is worth converting.
Simplified test when years should be converted
sql/item_sum.cc:
Mark cache values in Item_sum_hybrid as not constants to ensure they are not replaced by other cache values in compare_datetime()
sql/item_timefunc.cc:
Changed sec_to_time() to take a my_decimal argument to ensure we don't loose any sub seconds.
Added Item_temporal_func::get_time() (This simplifies some things)
sql/mysql_priv.h:
Added Lazy_string_decimal()
sql/mysqld.cc:
Added my_decimal constants max_seconds_for_time_type, time_second_part_factor
sql/table.cc:
Changed expr_arena to be of type CONVENTIONAL_EXECUTION to ensure that we don't loose any items that are created by fix_fields()
sql/tztime.cc:
TIME_to_gmt_sec() now sets *in_dst_time_gap in case of errors
This is needed to be able to detect if timestamp is 0
storage/maria/lockman.c:
Changed from my_getsystime() to set_timespec_time_nsec()
storage/maria/ma_loghandler.c:
Changed from my_getsystime() to my_hrtime()
storage/maria/ma_recovery.c:
Changed from my_getsystime() to mmicrosecond_interval_timer()
storage/maria/unittest/trnman-t.c:
Changed from my_getsystime() to mmicrosecond_interval_timer()
storage/xtradb/handler/ha_innodb.cc:
Added support for new time,datetime and timestamp
unittest/mysys/thr_template.c:
my_getsystime() -> my_interval_timer()
unittest/mysys/waiting_threads-t.c:
my_getsystime() -> my_interval_timer()
sql/event_parse_data.cc:
don't use "not_used" variable
sql/item_timefunc.cc:
Item_temporal_func::fix_length_and_dec()
and other changes
sql/item_timefunc.h:
introducing Item_timefunc::fix_length_and_dec()
sql/share/errmsg.txt:
don't say "column X" in the error message that used not only for columns
* my_getsystime() is only an interval timer. Its value can beused for calculating
time intervals.
* renamed my_getsystime() to my_interval_timer(), to make the semantics
clearer and let the compiler catch wrong usages of my_getsystime()
(also future ones, that may come in merges).
* increased its granularity from 100ns to 1ns, old value was for UUID,
but as UUID can no longer use it directly there is no need to downgrade
the OS provided value
* fixed the UUID code to anchor the my_interval_timer() on the epoch, as
required by the UUID standard. That is, this was only needed by UUID,
and now I've moved it to UUID code from my_getsystime().
* fixed other wrong usages of my_getsystime() - e.g. in calculating
times for pthread_cond_timedwait. It was buggy and could've caused
long waits if OS clock would be changed.
client/mysqltest.cc:
Column names.
mysql-test/r/grant_cache_no_prot.result:
fix of text.
mysql-test/r/grant_cache_ps_prot.result:
Fix of test.
mysql-test/r/query_cache.result:
Switching on and off query cache.
mysql-test/t/query_cache.test:
Switching on and off query cache.
mysys/charset.c:
Fix of parser.
sql/handler.cc:
thd added to parameters.
sql/log_event.cc:
thd added to parameters.
sql/log_event_old.cc:
thd added to parameters.
sql/mysql_priv.h:
Fixed functions definitions.
sql/mysqld.cc:
Comments stripping.
sql/set_var.cc:
Switching on and off query cache.
sql/set_var.h:
Switching on and off query cache.
sql/share/errmsg.txt:
New errors.
sql/sql_cache.cc:
Switching query cache on and off, removing comments.
sql/sql_cache.h:
thd added to parameters.
sql/sql_class.h:
Comments stripping.
sql/sql_db.cc:
thd added to parameters.
sql/sql_lex.cc:
lex fixed.
sql/sql_parse.cc:
thd added to parameters.
The printing of include stack in the error case in mysqltest omitted the
bottom of the stack (the line number in original test case file), and instead
printed the top of the stack twice. Fix to print each element on the stack
once and only once.
- add version info for the client library, dynamic plugins and some utilities
- do not recompile client library sources 3 times (for mysqlclient , mysqlclient_notls and libmysql)
One time is sufficient, so get rid of mysqlclient_notls, and link static client library to the shared.
- remove incremental linking flag
Store decimal 0.0 in zero bytes in dynamic strings.
mysqltest: Don't ignore error from mysql_stmt_fetch; This could cause rows to be missing from log when running with --ps-protocol
Fixed wrong result length for CAST(... as TIME)
client/mysqltest.cc:
Don't ignore error from mysql_stmt_fetch; This could cause rows to be missing from log when running with --ps-protocol
libmysql/libmysql.c:
The max length for a TIME column is 17, not 15.
mysql-test/r/dyncol.result:
More tests
mysql-test/t/dyncol.test:
More tests
mysys/ma_dyncol.c:
Check content of decimal value on read and store to not get assert in decimal_bin_size().
Store decimal 0.0 in zero bytes in dynamic strings. This also solves a problem where decimal 0 had different internal representations.
sql-common/my_time.c:
Fixed DBUG_PRINT
sql/item_timefunc.h:
Fixed wrong result length for CAST(... as TIME). This was the cause of failures in buildbot when doing cast(... as time);
sql/protocol.cc:
More DBUG_PRINT
Fixed race condition in event that could cause hang when stopping event scheduler with SET GLOBAL event_scheduler=OFF
client/mysqltest.cc:
Write command to be executed to the log BEFORE executing the command.
This makes it easier to debug crashes as the log will contain the fatal command.
mysql-test/r/mysqltest.result:
Updated results (we now get more things logged)
sql/event_queue.cc:
Fixed race condition in event that could cause hang when stopping event scheduler with SET GLOBAL event_scheduler=OFF.
The reason was that a kill signal could be sent between last check of thd->killed and before thd->enter_cond() in which case the signal
would be missed and we would be stuck in Event_scheduler::stop() forever.
Manual merge from mysql-5.1 into mysql-5.5.
Conflicts
=========
Text conflict in mysql-test/suite/rpl/t/rpl_row_until.test
Text conflict in sql/handler.h
Text conflict in storage/archive/ha_archive.cc
WORK WITH --START-POSITION
If setting --start-position to start after the FD event, mysqlbinlog
will output an error stating that it has not found an FD event.
However, its not that mysqlbinlog does not find it but rather that it
does not processes it in the regular way (i.e., it does not print it).
Given that one is using --base64-output=DECODE-ROWS then not printing
it is actually fine.
To fix this, we make mysqlbinlog not to complain when it has not
printed the FD event, is outputing in base64, but is decoding the
rows.
Fixed compiler warnings
client/readline.cc:
Fixed compiler warning
mysql-test/t/mysqldump.test:
Only run test if utf8 is used
sql/log.cc:
Fixed compiler warning
sql/mysql_priv.h:
Fixed compiler warnings
tests/mysql_client_test.c:
Don't abort test if ucs2 is not in use.
create_schema if auto-generate-sql also set.
mysqlslap uses a schema to run its tests on and later
drops it if auto-generate-sql is used. This can be a
problem, if the schema is an already existing one.
If create-schema is used with auto-generate-sql option,
mysqlslap while performing the cleanup, drops the specified
database.
Fixed by introducing an option --no-drop, which, if used,
will prevent the dropping of schema at the end of the test.
client/client_priv.h:
Bug#11765157 - 58090: mysqlslap drops schema specified in
create_schema if auto-generate-sql also set.
Added an option.
client/mysqlslap.c:
Bug#11765157 - 58090: mysqlslap drops schema specified in
create_schema if auto-generate-sql also set.
Introduced an option 'no-drop' to forbid the removal of schema
even if 'create' or 'auto-generate-sql' options are used.
mysql-test/r/mysqlslap.result:
Added a testcase for Bug#11765157.
mysql-test/t/mysqlslap.test:
Added a testcase for Bug#11765157.
causes future shutdown hang
InnoDB would hang on shutdown if any XA transactions exist in the
system in the PREPARED state. This has been masked by the fact that
MySQL would roll back any PREPARED transaction on shutdown, in the
spirit of Bug #12161 Xa recovery and client disconnection.
[mysql-test-run] do_shutdown_server: Interpret --shutdown_server 0 as
a request to kill the server immediately without initiating a
shutdown procedure.
xid_cache_insert(): Initialize XID_STATE::rm_error in order to avoid a
bogus error message on XA ROLLBACK of a recovered PREPARED transaction.
innobase_commit_by_xid(), innobase_rollback_by_xid(): Free the InnoDB
transaction object after rolling back a PREPARED transaction.
trx_get_trx_by_xid(): Only consider transactions whose
trx->is_prepared flag is set. The MySQL layer seems to prevent
attempts to roll back connected transactions that are in the PREPARED
state from another connection, but it is better to play it safe. The
is_prepared flag was introduced in the InnoDB Plugin.
trx_n_prepared: A new counter, counting the number of InnoDB
transactions in the PREPARED state.
logs_empty_and_mark_files_at_shutdown(): On shutdown, allow
trx_n_prepared transactions to exist in the system.
trx_undo_free_prepared(), trx_free_prepared(): New functions, to free
the memory objects of PREPARED transactions on shutdown. This is not
needed in the built-in InnoDB, because it would collect all allocated
memory on shutdown. The InnoDB Plugin needs this because of
innodb_use_sys_malloc.
trx_sys_close(): Invoke trx_free_prepared() on all remaining
transactions.
Problem: mysqlbinlog --server-id may filter out Format_description_log_events.
If mysqlbinlog does not process the Format_description_log_event,
then mysqlbinlog cannot read the rest of the binary log correctly.
This can have the effect that mysqlbinlog crashes, generates an error,
or generates output that causes mysqld to crash, generate an error,
or corrupt data.
Fix: Never filter out Format_description_log_events. Also, never filter
out Rotate_log_events.
client/mysqlbinlog.cc:
Process Format_description_log_events even when the
server_id does not match the number given by --server-id.
mysql-test/t/mysqlbinlog.test:
Add test case.
The mysqld server and all clients now reads the new client-server section
Fixed that mysqldumpslow supports new slow log formats and new mysqld --slow- options
client/mysql.cc:
Read also client-server and client-mariadb sections.
client/mysql_upgrade.c:
Read also client-server and client-mariadb sections.
client/mysqladmin.cc:
Read also client-server and client-mariadb sections.
client/mysqlbinlog.cc:
Read also client-server and client-mariadb sections.
client/mysqlcheck.c:
Read also client-server and client-mariadb sections.
client/mysqldump.c:
Read also client-server and client-mariadb sections.
client/mysqlimport.c:
Read also client-server and client-mariadb sections.
client/mysqlshow.c:
Read also client-server and client-mariadb sections.
client/mysqltest.cc:
Read also client-server and client-mariadb sections.
extra/my_print_defaults.c:
Updated help text
scripts/mysql_fix_privilege_tables.sh:
Read also sections client client-server client-mariadb
scripts/mysql_install_db.pl.in:
Also allow --data=* option
Read also groups mariadb, server and client-server.
scripts/mysql_install_db.sh:
Also allow --data=* option
Read also groups mariadb, server and client-server.
Added --lose-skip-pbxt to bootstrap
scripts/mysql_secure_installation.sh:
Read also groups client-server and client-mariadb
scripts/mysqld_multi.sh:
Read also group mariadb
scripts/mysqld_safe.sh:
Read also groups mariadb server and client-server
scripts/mysqldumpslow.sh:
Fixed to support new slow log formats
Added sorting on -ae (aggregated number of retreived rows) and e (retrieved rows)
Read also group 'mariadb'
If there is many instances of same option, use last one.
Get slow log file from options log-slow-queries=filename or query-log-file=filename
Added support for future --log-basename option
sql-common/client.c:
Read also groups 'client-server' and 'client-mariadb'
tests/mysql_client_test.c:
Read also groups 'client-server' and 'client-mariadb'
tests/thread_test.c:
Read also groups 'client-server' and 'client-mariadb'
MAP 'REPAIR TABLE' TO RECREATE +ANALYZE FOR ENGINES NOT
SUPPORTING NATIVE REPAIR
Executing 'mysqlcheck --check-upgrade --auto-repair ...' will first issue
'CHECK TABLE FOR UPGRADE' for all tables in the database in order to check if the
tables are compatible with the current version of MySQL. Any tables that are
found incompatible are then upgraded using 'REPAIR TABLE'.
The problem was that some engines (e.g. InnoDB) do not support 'REPAIR TABLE'.
This caused any such tables to be left incompatible. As a result such tables were
not properly fixed by the mysql_upgrade tool.
This patch fixes the problem by first changing 'CHECK TABLE FOR UPGRADE' to return
a different error message if the engine does not support REPAIR. Instead of
"Table upgrade required. Please do "REPAIR TABLE ..." it will report
"Table rebuild required. Please do "ALTER TABLE ... FORCE ..."
Second, the patch changes mysqlcheck to do 'ALTER TABLE ... FORCE' instead of
'REPAIR TABLE' in these cases.
This patch also fixes 'ALTER TABLE ... FORCE' to actually rebuild the table.
This change should be reflected in the documentation. Before this patch,
'ALTER TABLE ... FORCE' was unused (See Bug#11746162)
Test case added to mysqlcheck.test
client/mysqlcheck.c:
Changed mysqlcheck to do 'ALTER TABLE ... FORCE' if
'CHECK TABLE FOR UPGRADE' reports ER_TABLE_NEEDS_REBUILD
and not ER_TABLE_NEEDS_UPGRADE.
mysql-test/r/mysqlcheck.result:
Added regression test.
mysql-test/std_data/bug47205.frm:
InnoDB 5.0 FRM which contains a varchar primary key using
utf8_general_ci. This is an incompatible FRM for 5.5.
mysql-test/t/mysqlcheck.test:
Added regression test.
sql/handler.h:
Added new HA_CAN_REPAIR flag.
sql/share/errmsg-utf8.txt:
Added new error message ER_TABLE_NEEDS_REBUILD
sql/sql_admin.cc:
Changed 'CHECK TABLE FOR UPDATE' to give ER_TABLE_NEEDS_REBUILD
instead of ER_TABLE_NEEDS_UPGRADE if the engine does not support
REPAIR (as indicated by the new HA_CAN_REPAIR flag).
sql/sql_lex.h:
Remove unused ALTER_FORCE flag.
sql/sql_yacc.yy:
Make sure ALTER TABLE ... FORCE recreates the table
by setting the ALTER_RECREATE flag as the ALTER_FORCE
flag was unused.
storage/archive/ha_archive.h:
Added new HA_CAN_REPAIR flag to Archive
storage/csv/ha_tina.h:
Added new HA_CAN_REPAIR flag to CSV
storage/federated/ha_federated.h:
Added new HA_CAN_REPAIR flag to Federated
storage/myisam/ha_myisam.cc:
Added new HA_CAN_REPAIR flag to MyISAM
and collateral changes.
* introduce my_hrtime_t, my_timediff_t, and conversion macros
* inroduce TIME_RESULT, but it can only be returned from Item::cmp_type(),
never from Item::result_type()
* pack_time/unpack_time function for "packed" representation of
MYSQL_TIME in a longlong that can be compared
* ADDTIME()/SUBTIME()/+- INTERVAL now work with TIME values
* numbers aren't quoted in EXPLAIN EXTENDED
* new column I_S.COLUMNS.DATETIME_PRECISION
* date/time values are compares to anything as date/time, not as strings or numbers.
* old timestamp(X) is no longer supported
* MYSQL_TIME to string conversion functions take precision as an argument
* unified the warnings from Field_timestamp/datetime/time/date/newdate store methods
* Field_timestamp_hires, Field_datetime_hires, Field_time_hires
* Field_temporal
* Lazy_string class to pass a value (string, number, time) polymorphically down the stack
* make_truncated_value_warning and Field::set_datetime_warning use Lazy_string as an argument, removed char*/int/double variants
* removed Field::can_be_compared_as_longlong(). Use Field::cmp_type() == INT_RESULT instead
* introduced Item::cmp_result() instead of Item::is_datetime() and Item::result_as_longlong()
* in many cases date/time types are treated like other types, not as special cases
* greatly simplified Arg_comparator (regarding date/time/year code)
* SEC_TO_TIME is real function, not integer.
* microsecond precision in NOW, CURTIME, etc
* Item_temporal. All items derived from it only provide get_date, but no val* methods
* replication of NOW(6)
* Protocol::store(time) now takes the precision as an argument
* @@TIMESTAMP is a double
client/mysqlbinlog.cc:
remove unneded casts
include/my_sys.h:
introduce my_hrtime_t, my_timediff_t, and conversion macros
include/my_time.h:
pack_time/unpack_time, etc.
convenience functions to work with MYSQL_TIME::second_part
libmysql/libmysql.c:
str_to_time() is gone. str_to_datetime() does it now.
my_TIME_to_str() takes the precision as an argument
mysql-test/include/ps_conv.inc:
time is not equal to datetime anymore
mysql-test/r/distinct.result:
a test for an old MySQL bug
mysql-test/r/explain.result:
numbers aren't quoted in EXPLAIN EXTENDED
mysql-test/r/func_default.result:
numbers aren't quoted in EXPLAIN EXTENDED
mysql-test/r/func_sapdb.result:
when decimals=NOT_FIXED_DEC it means "not fixed" indeed
mysql-test/r/func_test.result:
numbers aren't quoted in EXPLAIN EXTENDED
mysql-test/r/func_time.result:
ADDTIME()/SUBTIME()/+- INTERVAL now work with TIME values
mysql-test/r/having.result:
numbers aren't quoted in EXPLAIN EXTENDED
mysql-test/r/information_schema.result:
new column I_S.COLUMNS.DATETIME_PRECISION
mysql-test/r/join_outer.result:
numbers aren't quoted in EXPLAIN EXTENDED
mysql-test/r/metadata.result:
TIMESTAMP no longer has zerofill flag
mysql-test/r/range.result:
invalid datetime is not compared with as a string
mysql-test/r/select.result:
NO_ZERO_IN_DATE, etc only affect storage - according to the manual
numbers aren't quoted in EXPLAIN EXTENDED
mysql-test/r/subselect.result:
numbers aren't quoted in EXPLAIN EXTENDED
mysql-test/r/sysdate_is_now.result:
when decimals=NOT_FIXED_DEC it means "not fixed" indeed
mysql-test/r/type_blob.result:
TIMESTAMP(N) is not deprecated
mysql-test/r/type_timestamp.result:
old TIMESTAMP(X) semantics is not supported anymore
mysql-test/r/union.result:
numbers aren't quoted in EXPLAIN EXTENDED
mysql-test/r/varbinary.result:
numbers aren't quoted in EXPLAIN EXTENDED
mysql-test/t/distinct.test:
test for an old MySQL bug
mysql-test/t/func_time.test:
+- INTERVAL now works with TIME values
mysql-test/t/select.test:
typo
mysql-test/t/subselect.test:
only one error per statement, please
mysql-test/t/system_mysql_db_fix40123.test:
old timestamp(X) is no longer supported
mysql-test/t/system_mysql_db_fix50030.test:
old timestamp(X) is no longer supported
mysql-test/t/system_mysql_db_fix50117.test:
old timestamp(X) is no longer supported
mysql-test/t/type_blob.test:
old timestamp(X) is no longer supported
mysql-test/t/type_timestamp.test:
old timestamp(X) is no longer supported
mysys/my_getsystime.c:
functions to get the time with microsecond precision
mysys/my_init.c:
move the my_getsystime.c initialization code to my_getsystime.c
mysys/my_static.c:
no need to make these variables extern
mysys/my_static.h:
no need to make these variables extern
scripts/mysql_system_tables.sql:
old timestamp(X) is no longer supported
scripts/mysql_system_tables_fix.sql:
old timestamp(X) is no longer supported
scripts/mysqlhotcopy.sh:
old timestamp(X) is no longer supported
sql-common/my_time.c:
* call str_to_time from str_to_datetime, as appropriate
* date/time to string conversions take precision as an argument
* number_to_time()
* TIME_to_double()
* pack_time() and unpack_time()
sql/event_data_objects.cc:
cast is not needed
my_datetime_to_str() takes precision as an argument
sql/event_db_repository.cc:
avoid dangerous downcast (because the pointer is
not always Field_timestamp, see events_1.test)
sql/event_queue.cc:
avoid silly double-work for cond_wait
(having an endpoint of wait, subtract the current time to get the timeout,
and use set_timespec() macro to fill in struct timespec, by adding the current
time to the timeout)
sql/field.cc:
* remove virtual Field::get_time(), everyone should use only Field::get_date()
* remove lots of #ifdef WORDS_BIGENDIAN
* unified the warnings from Field_timestamp/datetime/time/date/newdate store methods
* Field_timestamp_hires, Field_datetime_hires, Field_time_hires
* Field_temporal
* make_truncated_value_warning and Field::set_datetime_warning use Lazy_string as an argument, removed char*/int/double variants
sql/field.h:
* remove virtual Field::get_time(), everyone should use only Field::get_date()
* remove lots of #ifdef WORDS_BIGENDIAN
* unified the warnings from Field_timestamp/datetime/time/date/newdate store methods
* Field_timestamp_hires, Field_datetime_hires, Field_time_hires
* Field_temporal
* make_truncated_value_warning and Field::set_datetime_warning use Lazy_string as an argument, removed char*/int/double variants
* removed Field::can_be_compared_as_longlong(). Use Field::cmp_type() == INT_RESULT instead
sql/filesort.cc:
TIME_RESULT, cmp_time()
sql/item.cc:
* numbers aren't quoted in EXPLAIN EXTENDED
* Item::cmp_result() instead of Item::is_datetime() and Item::result_as_longlong()
* virtual Item::get_time() is gone
* Item_param::field_type() is set correctly
* Item_datetime, for a datetime constant
* time to anything is compared as a time
* Item_cache::print() prints the value is available
* bug fixed in Item_cache_int::val_str()
sql/item.h:
* Item::print_value(), to be used from Item_xxx::print() when needed
* Item::cmp_result() instead of Item::is_datetime() and Item::result_as_longlong()
* virtual Item::get_time() is gone
* Item_datetime, for a datetime constant
* better default for cast_to_int_type()
* Item_cache objects now *always* have the field_type() set
sql/item_cmpfunc.cc:
* get_year_value, get_time_value are gone. get_datetime_value does it all
* get_value_a_func, get_value_b_func are gone
* can_compare_as_dates() is gone too, TIME_RESULT is used instead
* cmp_type() instead or result_type() when doing a comparison
* compare_datetime and compate_e_datetime in the comparator_matrix, is_nulls_eq is gone
* Item::cmp_result() instead of Item::is_datetime() and Item::result_as_longlong()
sql/item_cmpfunc.h:
greatly simplified Arg_comparator
sql/item_create.cc:
* fix a bug in error messages in CAST
sql/item_func.cc:
Item::cmp_result() instead of Item::is_datetime() and Item::result_as_longlong()
mention all possibitiles in switch over Item_result values, or use default:
sql/item_row.h:
overwrite the default cmp_type() for Item_row,
as no MYSQL_TYPE_xxx value corresponds to ROW_RESULT
sql/item_timefunc.cc:
rewrite make_datetime to support precision argument
SEC_TO_TIME is real function, not integer.
many functions that returned temporal values had duplicate code in val_* methods,
some of them did not have get_date() which resulted in unnecessary date->str->date conversions.
Now they all are derived from Item_temporal_func and *only* provide get_date, not val* methods.
many fixes to set decimals (datetime precision) correctly.
sql/item_timefunc.h:
SEC_TO_TIME is real function, not integer.
many functions that returned temporal values had duplicate code in val_* methods,
some of them did not have get_date() which resulted in unnecessary date->str->date conversions.
Now they all are derived from Item_temporal_func and *only* provide get_date, not val* methods.
many fixes to set decimals (datetime precision) correctly.
sql/log_event.cc:
replication of NOW(6)
sql/log_event.h:
replication of NOW(6)
sql/mysql_priv.h:
Lazy_string class to pass a value (string, number, time) polymorphically down the stack.
make_truncated_value_warning() that uses it.
sql/mysqld.cc:
datetime in Arg_comparator::comparator_matrix
sql/opt_range.cc:
cleanup: don't disable warnings before calling save_in_field_no_warnings()
sql/protocol.cc:
Protocol::store(time) now takes the precision as an argument
sql/protocol.h:
Protocol::store(time) now takes the precision as an argument
sql/rpl_rli.cc:
small cleanup
sql/set_var.cc:
SET TIMESTAMP=double
sql/set_var.h:
@@TIMESTAMP is a double
sql/share/errmsg.txt:
precision and scale are unsigned
sql/slave.cc:
replication of NOW(6)
sql/sp_head.cc:
cleanup
sql/sql_class.cc:
support for NOW(6)
sql/sql_class.h:
support for NOW(6)
sql/sql_insert.cc:
support for NOW(6)
sql/sql_select.cc:
use item->cmp_type().
move a comment where it belongs
sql/sql_show.cc:
new column I_S.COLUMNS.DATETIME_PRECISION
sql/sql_yacc.yy:
TIME(X), DATETIME(X), cast, NOW(X), CURTIME(X), etc
sql/time.cc:
fix date_add_interval() to support MYSQL_TIMESTAMP_TIME argument
storage/myisam/ha_myisam.cc:
TIMESTAMP no longer carries ZEROFIELD flag, still we keep MYI file compatible.
strings/my_vsnprintf.c:
warnings
tests/mysql_client_test.c:
old timestamp(X) does not work anymore
datetime is no longer equal to time
client/readline.cc:
Initialize not used variable (to kill wrong compiler warning)
mysql-test/suite/handler/aria.result:
Updated test result
mysql-test/suite/handler/handler.inc:
Changed index to ensure rows are in a fixed order
mysql-test/suite/handler/heap.result:
Updated test result
mysql-test/suite/handler/innodb.result:
Updated test result
mysql-test/suite/handler/myisam.result:
Updated test result
plugin/handler_socket/handlersocket/Makefile.am:
Use CXX flags to compile
sql/filesort.cc:
Initialize variable that may be used
sql/log.cc:
Initialize not used variable (to kill wrong compiler warning)
sql/opt_range_mrr.cc:
Fixed cast to avoid compiler warning
storage/xtradb/fil/fil0fil.c:
Added cast to avoid compiler warning
- Reduced memory usage from safe_mutex.
- Fixed problem with failing tests that could not restart mysqld becasue the port was reserved
- More DBUG information
- Fixed bug where bitmap_set_prefix() wrote over buffer area.
- Initialize n_pages_flushed in xtradb which was used uninitialized.
client/mysqltest.cc:
Reduced memory usage (400K -> 80 for simple test; 400M -> 70M for some other tests)
- Smaller dynamic arrays at start
- Made 'st_connection' significantly smaller by allocation 'mysql' on demand in mysql_init() and storing require_file in a mem_root.
- Fixed that when one does --debug we get information from safemalloc in the trace
(Most of changes are changing &connect->mysql to connect->mysql
libmysql/libmysql.c:
Don't call mysql_thread_end() if my_init() was called outside of mysql_server_init()
This is needed to get information from my_end() into the DBUG log
mysql-test/README:
Fixed wrong comment
mysql-test/mysql-test-run.pl:
Reserv 20 ports / mysql-test-run thread.
(Needed as some tests uses 9 mysqld servers)
mysys/hash.c:
More DBUG information
mysys/my_bitmap.c:
Fixed bug where bitmap_set_prefix() wrote over buffer area.
mysys/safemalloc.c:
More DBUG information
mysys/thr_mutex.c:
Initialize smaller arrays be default.
sql-common/client.c:
More DBUG_PRINT
storage/xtradb/srv/srv0srv.c:
Initialize n_pages_flushed which was used uninitialized.
("-") IN DATABASE NAMES IN ALTER DATABASE.
mysqldump did not quote database name in 'ALTER DATABASE'
statements in its output. This can further cause a failure
while loading if database name contains a hyphen '-'.
This happened as, while printing the 'ALTER DATABASE'
statements, the database name was not quoted.
Fixed by quoting the database name.
client/mysqldump.c:
Bug#11766310 : 59398: MYSQLDUMP 5.1 CAN'T HANDLE A DASH
("-") IN DATABASE NAMES IN ALTER DATABASE.
Modified the print statement in order to print the quoted
database name for 'ALTER DATABASE' statements.
mysql-test/r/mysqldump.result:
Added a test case for bug#11766310.
mysql-test/t/mysqldump.test:
Added a test case for bug#11766310.
- Fixed some issues with partitions and connection_string, which also fixed lp:716890 "Pre- and post-recovery crash in Aria"
- Fixed wrong assert in Aria
Now need to merge with latest xtradb before pushing
sql/ha_partition.cc:
Ensure that m_ordered_rec_buffer is not freed before close.
sql/mysqld.cc:
Changed to use opt_stack_trace instead of opt_pstack.
Removed references to pstack
sql/partition_element.h:
Ensure that connect_string is initialized
storage/maria/ma_key_recover.c:
Fixed wrong assert
"set optimizer_switch to e or d causes invalid memory writes/valgrind warnings":
due to prefix support, the argument "e" was overwritten with its full value
"engine_condition_pushdown", which caused a buffer overrun.
This was wrong usage of find_type(); other wrong usages are fixed here too.
Please start reading with the comment of typelib.c.
client/mysqldump.c:
A bug: find_type() expects a bitmap as 3rd argument
(each bit is a flag controlling a behaviour of the function);
here it was instead passed the length of the string to search!
That could give random behaviour of find_type()
depending on the string.
We rather need to pass a correct flag to find_type().
The correct flag is FIND_TYPE_BASIC (0).
Flag 8 is not needed as buff cannot have a comma (see how buff is filled).
Flag 1 looks like a superfluous restriction.
Flag 4 is not user-friendly (why use
--compatible=2 rather than --compatible=mysql40 ?, and
we probably not commit to "2" always meaning "mysql40"
until the end of times).
include/mysql.h.pp:
This isn't a problematic API change as we go from char* to const char*:
existing code will run unchanged.
include/typelib.h:
named constants. Not an enum to not significantly change
the declaration of find_type() which would be an API change
(typelib.h is included in mysql.h).
mysql-test/r/mysqldump.result:
correct result (see the two requested modes in SQL_MODE)
mysql-test/suite/sys_vars/t/optimizer_switch_basic.test:
test for BUG#59894. The second SET used to crash.
mysql-test/t/mysqldump.test:
we had no test for multiple modes in --compatible, which is
supported according to --help
mysys/typelib.c:
Fix for BUG#59894. parse_name() is asked to match "e" with a row
of the TYPELIB (the TYPELIB lists permitted flags of optimizer_switch;
and comes from optimizer_switch_names[] of sys_vars.cc).
find_type() is capable of supporting prefixes, but if it is not
passed flag 2 in third argument, it will overwrite its first
argument (the string to search for) with the complete name,
here overwriting "e" with "engine_condition_pushdown". But
as this "e" was a buffer allocated in an Item, it was not big
enough to host the longer name, thus the crash.
We don't need to know the complete flag's name; the output used
from find_type() is just the flag's number (== function's return
code). So we can pass flag 2 to find_type() in parse_name().
After doing this fix and the other fixes in this patch, all usages
of find_type() were using flag 2; in most usages the string to search for,
is not guaranteed to be long enough to host the complete name
(it is either directly from argv, or from alloc_root/my_malloc
done in an earlier call).
Thus, flag 2 is here made implicit: callers need not pass it anymore,
it is always automatically turned on.
This allows to eliminate an oddity: parse_name() took a const char**,
and then removed "const" before calling find_type(), which could
theoretically modify the pointed data, thus lying on constness.
Last, constants for find_type() are now named.
sql-common/client.c:
Two bugs:
1) The enum was not in sync with the array (due to a bad porting of WL 1054;
the extra OPT_ values are about options present in 5.1 and deleted in 5.5);
added a compile_time_assert() to make sure this doesn't happen again
2) find_type() was writing past the end of opt_arg; as opt_arg was allocated
with alloc_root() with no extra space, this was an overrun; it could be seen
when
** building with -DWITH_VALGRIND -DHAVE_purify -DEXTRA_DEBUG
** making execution go through the faulty code; this faulty
code is executed only if the client asks to read a configuration
file like this:
mysql_options(mysql, MYSQL_READ_DEFAULT_FILE, "/tmp/cnf.cnf");
so by adding such line to the start of mysql_client_test.c::client_connect(),
we could see the valgrind warning:
==30548== Invalid write of size 1
==30548== at 0x4C2624C: strcpy (mc_replace_strmem.c:303)
==30548== by 0x48DC29: find_type (typelib.c:120)
==30548== by 0x465686: mysql_read_default_options (client.c:1344)
==30548== by 0x46830F: mysql_real_connect (client.c:2971)
==30548== by 0x409339: client_connect (mysql_client_test.c:331)
==30548== by 0x463A7F: main (mysql_client_test.c:19902)
==30548== Address 0x61875ad is 0 bytes after a block of size 29 alloc'd
==30548== at 0x4C25153: malloc (vg_replace_malloc.c:195)
==30548== by 0x49BFF1: my_malloc (my_malloc.c:38)
==30548== by 0x49C65C: alloc_root (my_alloc.c:166)
==30548== by 0x48EF97: handle_default_option (default.c:381)
==30548== by 0x49068C: search_default_file_with_ext (default.c:992)
==30548== by 0x48F929: search_default_file (default.c:670)
==30548== by 0x48EDC4: my_search_option_files (default.c:312)
==30548== by 0x48F4B1: my_load_defaults (default.c:576)
==30548== by 0x46517A: mysql_read_default_options (client.c:1207)
==30548== by 0x46830F: mysql_real_connect (client.c:2971)
==30548== by 0x409339: client_connect (mysql_client_test.c:331)
==30548== by 0x463A7F: main (mysql_client_test.c:19902)
This is fixed by having find_type() not overwrite anymore.
sql/sql_help.cc:
cast not needed anymore.
sql/table.cc:
cast not needed anymore.
batch_readline_init() was modified - make check for
type of file for input stream unless target platform
is WINDOWS since on this platform S_IFBLK is undefined.
batch_readline_init() was modified - return an error
if the input source is a directory or a block device.
This follow-up is necessary because on some platforms,
such as Solaris, call to read() from directory may be
successful.
if the standard input is a directory.
The problem is that mysql monitor try to read from stdin without
checking input source type.
The solution is to stop reading data from standard input if a call
to read(2) failed.
A new test case was added into mysql.test.
client/my_readline.h:
Data members error and truncated was added to LINE_BUFFER structure.
These data members used instead of out parameters in functions
batch_readline, intern_read_line.
client/mysql.cc:
read_and_execute() was modified: set status.exit_status to 1
when the error occured while reading the next command line in
non-interactive mode. Also the value of the truncated attribute
of structure LINE_BUFF is taken into account only for non-iteractive mode.
client/readline.cc:
intern_read_line() was modified: cancel reading from input if
fill_buffer() returns -1, e.g. if call to read failed.
batch_readline was modified: set the error data member of LINE_BUFFER
structure to value of my_errno when system error happened during call
to my_read/my_realloc.
mysql-test/t/mysql.test:
Test for bug#57450 was added.
- MWL#47, allowing to annotate row-based binlog events with the SQL test of
the originating query (eg. in mysqlbinlog output).
- row_based_replication_without_primary_key.patch, providing more intelligent
selection of index to use on slave when applying row-based binlog events
for tables with no primary key.
- Make mysqlbinlog omit redundant `use` around BEGIN/SAVEPOINT/COMMIT/
ROLLBACK in 5.0 binlogs.
- Use -Wno-uninitialized if -DFORCE_INIT_OF_VARS is not used, to avoid warnings about not initialized variables.
- Fixed compiler warnings
- Added a name for each thr_lock to get better error messages (This is needed to find out why 'archive.test' sometimes fails)
BUILD/SETUP.sh:
Use -Wno-uninitialized if -DFORCE_INIT_OF_VARS is not used, to avoid warnings about not initialized variables.
BUILD/build_mccge.sh:
Use -Wno-uninitialized if -DFORCE_INIT_OF_VARS is not used, to avoid warnings about not initialized variables.
client/mysqltest.cc:
Fixed bug in remove_files_wildcards (the orignal code never removed anything)
extra/libevent/devpoll.c:
Fixed compiler warning
include/thr_lock.h:
Added a name for each thr_lock to get better error messages.
mysql-test/suite/maria/t/maria3.test:
Speed up test.
mysys/thr_lock.c:
Added a name for each thr_lock to get better error messages.
Added a second 'check_locks' to find if something goes wrong in 'wake_up_waiters'.
sql/lock.cc:
Added a name for each thr_lock to get better error messages.
storage/xtradb/fil/fil0fil.c:
Fixed compiler warning
When mysqldadmin is run with sleep and count options,
it goes into an infinite loop and keeps executing the
specified command.
This happened because the statement, responsible for
decrementing the count value, was missing.
Fixed by adding a statement which will decrement the
count value for each iteration.
client/mysqladmin.cc:
Bug#58221 : mysqladmin --sleep=x --count=x keeps looping
Added a condition to check and decrement the count
value stored in nr_iterations per iteration.
mysql-test/r/mysqladmin.result:
Added a testcase for Bug#58221.
mysql-test/t/mysqladmin.test:
Added a testcase for Bug#58221.
When mysqldump tries to dump information in xml format,
the result does not contain field level comments.
In order to retrieve various informations for a field/column,
mysqldump currently uses 'show fields from <tab>' statement.
The attributes returned by the statement lacks the information
regarding field comments.
Fixed by changing the query to one that probes I_S to retrieve
required field informations, including the field comment.
client/mysqldump.c:
Bug#13618 : mysqldump --xml omits comment on table field.
Replaced the 'show fields' command by a statement that
queries I_S, in order to retrieve information on all the
attributes that 'show fields' returns along-with an additional
column_comment information.
mysql-test/r/client_xml.result:
Result modifications for bug#13618.
mysql-test/r/mysqldump.result:
Result modifications for bug#13618.
mysql-test/t/mysqldump.test:
Added a testcase for bug#13618.
This is a merge of percona patch mysqlbinlog_fix.patch.
Apparently, MySQL 5.0 does not flag BEGIN/SAVEPOINT/COMMIT/ROLLBACK statements
in its binlogs with LOG_EVENT_SUPPRESS_USE_F like 5.1+ does. This causes
unnecessary `use` statements around such statements when the binlog is dumped
by mysqlbinlog.
Fix by always suppressing the output of `use` for these statements.
null from mysql_store_result.
mysqlslap segfaults at a point when it tries to fetch rows from
the result set.
Under some circumstances, mysql_store_result can return 'NULL',
even after query execution (mysql_query) succeeds, and eventually
a segfault might occur if same unchecked return value is passed
to mysql_fetch_row.
Fixed by adding a check on mysql_store_result's return value.
client/mysqlslap.c:
Bug#59109 : mysqlslap crashes on mysql_fetch_row after ignoring
null from mysql_store_result.
Added a check on mysql_store_result's return value. A 'NULL' return
value here shows an erroneous situation as mysql_field_count has already
reported a non-zero value.
command line clients.
Postfix covering other mysql standard clients like mysql_upgrade,
mysqlbinlog, mysqlcheck, mysqlimport, mysqlshow and mysqlslap.
client/client_priv.h:
Bug#58139 : default-auth option not recognized in MySQL standard
command line clients
Added an entry for 'default-auth' option.
client/mysql.cc:
Bug#58139 : default-auth option not recognized in MySQL standard
command line clients
Updated the id entry for default_auth option.
client/mysql_upgrade.c:
Bug#58139 : default-auth option not recognized in MySQL standard
command line clients.
Introduced two new variables to hold values from default-auth and
plugin-dir options and further pushed them to client's st_mysql
instance.
client/mysqladmin.cc:
Bug#58139 : default-auth option not recognized in MySQL standard
command line clients
Updated the id entry for default_auth option.
client/mysqlbinlog.cc:
Bug#58139 : default-auth option not recognized in MySQL standard
command line clients.
Introduced two new variables to hold values from default-auth and
plugin-dir options and further pushed them to client's st_mysql
instance.
client/mysqlcheck.c:
Bug#58139 : default-auth option not recognized in MySQL standard
command line clients.
Introduced two new variables to hold values from default-auth and
plugin-dir options and further pushed them to client's st_mysql
instance.
client/mysqldump.c:
Bug#58139 : default-auth option not recognized in MySQL standard
command line clients
Updated the id entry for default_auth option.
client/mysqlimport.c:
Bug#58139 : default-auth option not recognized in MySQL standard
command line clients.
Introduced two new variables to hold values from default-auth and
plugin-dir options and further pushed them to client's st_mysql
instance.
client/mysqlshow.c:
Bug#58139 : default-auth option not recognized in MySQL standard
command line clients.
Introduced two new variables to hold values from default-auth and
plugin-dir options and further pushed them to client's st_mysql
instance.
client/mysqlslap.c:
Bug#58139 : default-auth option not recognized in MySQL standard
command line clients.
Introduced two new variables to hold values from default-auth and
plugin-dir options and further pushed them to client's st_mysql
instance.
mysql-test/r/plugin_auth.result:
Added test case for Bug#58139 for mysql_upgrade.
mysql-test/t/plugin_auth.test:
Added test case for Bug#58139 for mysql_upgrade.
and 'THREAD_SAFE_CLIENT'.
As of MySQL 5.5, we no longer support non-threaded
builds. This patch removes all references to the
obsolete THREAD and THREAD_SAFE_CLIENT preprocessor
symbols. These were used to distinguish between
threaded and non-threaded builds.
The problem was that the warnings was never written out
when running with --ps-protocol. This was because the
warnings only appeared during the prepare phase, not
the execute phase.
Solved by not clearing the warnings from the prepare phase
if there was no other warnings.
If there are warnings from the execute phase, it is very
likely to be the same as from the prepare phase. My tests
show that if not clearing the warnings from the prepare
phase when there are warnings from the execute phase, there
will be duplicated warnings in the result.
client/mysqltest.cc:
Only reset the prepare warnings if there are warnings from
the execute phase. Otherwise these warnings will never be
returned.
This patch adds options to annotate the binlog (and the mysqlbinlog
output) with the original SQL query for queries that are logged
using row-based replication.
- 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"
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
mysqltest checks if the stmt is one that should be run in ps mode,
but regexp doesn't match if preceeded by /* */ comment.
Fix: match function will jump over /*..*/ if found at start
Backported use of setenv() from 5.5
This will remove the leak on systems that have setenv()
I have not fixed the string.c leak, it's a local variable
that the cleanup function cannot access.
Var's string value was not 0-terminated if intially null.
While at it, also removed some reported memory leaks
Added sanity check, setting val_len=0 if val==0
command line clients.
Command line tools like mysqladmin and mysqldump did not recognize
default-auth and plugin-dir options.
Support for these options was found missing in these command line
tools.
Fixed by adding support for the same.
client/mysqladmin.cc:
Bug#58139 : default-auth option not recognized in MySQL standard
command line clients.
Introduced two new variables to hold values from default-auth and
plugin-dir options and further pushed them to client's st_mysql
instance.
client/mysqldump.c:
Bug#58139 : default-auth option not recognized in MySQL standard
command line clients.
Introduced two new variables to hold values from default-auth and
plugin-dir options and further pushed them to client's st_mysql
instance.
mysql-test/r/plugin_auth.result:
Added test case for Bug#58139.
mysql-test/t/plugin_auth.test:
Added test case for Bug#58139.
Reason: inconsistent compilation, federatedx is compiled without SAFEMALLOC
flag, while anything else is compiled with SAFEMALLOC.
As a consequence, my_hash_init used inside federatedx initialization does not
provide correct caller info parameters (file, line) , so they are initialized with
whatever is on stack. When info about allocated memory is output in
COM_DEBUG command, the server crashes trying to output string starting at
0xcccccccccccccccc.
The fix is to remove SAFEMALLOC preprocessor flags
from every CMakeLists.txt, except the top-level one.
Also, SAFEMALLOC is not defined by default now, instead
there is WITH_DEBUG_FULL CMake option which adds
-DSAFEMALLOC to C and C++ flags in debug compilation.
This option is off by default, because
1) Debug C runtime already has heap debugging builtin with
overwrite and leak detection
2)safemalloc considerably slows down the tests.
Note also that
- SAFEMALLOC is gone in MySQL5.5
- On Windows, heap related overflows can also be found using free pageheap utility
(that is also part of application verifier). This is even more efficient if there are no other layers
on top of Windows heap allocator, e.g it is most efficient with release version.
The problem is that the logic which checks if a pointer is
valid relies on a poor heuristic based on the start and end
addresses of the data segment and heap.
Apart from miscalculating the heap bounds, this approach also
suffers from the fact that memory can come from places other
than the heap. See Bug#58528 for a more detailed explanation.
On Linux, the solution is to access the process's memory
through /proc/self/task/<tid>/mem, which allows for retrieving
the contents of pages within the virtual address space of
the calling process. If a address range is not mapped, a
input/output error is returned.
client/mysqltest.cc:
Use new interface to my_safe_print_str.
include/my_stacktrace.h:
Drop name from my_safe_print_str.
mysys/stacktrace.c:
Access the process's memory through a file descriptor and
dump the contents of the memory range. The file descriptor
offset is equivalent to a offset into the address space.
Do not print the name of the variable associated with the
address. It can be better accomplished at a higher level.
sql/mysqld.cc:
Put the variable dumping information within its own newline block.
Use symbolic names which better convey information to the user.
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.
Open issues:
- A better fix for #57688; Igor is working on this
- Test failure in index_merge_innodb.test ; Igor promised to look at this
- Some Innodb tests fails (need to merge with latest xtradb) ; Kristian promised to look at this.
- Failing tests: innodb_plugin.innodb_bug56143 innodb_plugin.innodb_bug56632 innodb_plugin.innodb_bug56680 innodb_plugin.innodb_bug57255
- Werror is disabled; Should be enabled after merge with xtradb.
The autotools-based build system has been superseded and
is being removed in order to ease the maintenance burden on
developers tweaking and maintaining the build system.
In order to support tools that need to extract the server
version, a new file that (only) contains the server version,
called VERSION, is introduced. The file contents are human
and machine-readable. The format is:
MYSQL_VERSION_MAJOR=5
MYSQL_VERSION_MINOR=5
MYSQL_VERSION_PATCH=8
MYSQL_VERSION_EXTRA=-rc
The CMake based version extraction in cmake/mysql_version.cmake
is changed to extract the version from this file. The configure
to CMake wrapper is retained for backwards compatibility and to
support the BUILD/ scripts. Also, a new a makefile target
show-dist-name that prints the server version is introduced.
VERSION:
Add top-level version file.
cmake/mysql_version.cmake:
Get version information from the top-level VERSION file.
Do not cache the version components (MAJOR_VERSION, etc).
Add MYSQL_RPM_VERSION as a replacement for MYSQL_U_SCORE_VERSION.
Switch makefiles to use libtool to build libmysqld.so, as well as all its
dependencies.
The previous MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS() declaration is removed,
as it does not work well with a libtool build. Instead, plugins that need it
can specify an alternate object in MYSQL_PLUGIN_STATIC() that will be used for
embedded library. The plugin must then take care itself of compiling the
special object for embedded, rebuilding the source files previously listed in
MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS() with @plugin_embedded_defs@ in
CFLAGS/CXXFLAGS. The extra target @XXX_embedded_static_target@ is available
for the special object, this will be empty when --without-embedded-server.
All in-tree plugins are changed to build their static targets with libtool.
Additional plugins that want to work with libmysqld.so will need to be
similarly modified to build with libtool (or otherwise provide an -fPIC
object). Dynamically loaded plugins are not affected.
The old libraries like libmysys.a, libmyisam.a and similar libraries, which
were installed by `make install` though this is of little use, are still built
and installed to not break package scripts etc. that expect them. These
libraries are kept static to avoid introducing new .so dependencies.
The patch also fixes a handfull of duplicate symbol linker errors, where we
included some object twice during linking; these for one reason or another did
not produce errors before but caused problems on some platforms with this
patch (eg. Mac OS X linker is more strict for shared objects).
This patch only does what is necessary to build libmysqld.so. There are some
more cleanups that are possible now that we are using libtool more fully,
which could done in subsequent patches (though we may not bother as we are
switching from autotools to CMake anyway):
- In libmysql_r/, we should be able to just link libmysys.la etc, instead of
symlinking and re-compiling sources into the directory.
- In libmysql/, we can similarly avoid symlinking and recompiling sources if
we instead build a libmysys_nothread.la library with appropriate CFLAGS and
link that.
- In sql/, we can build a separate target libmysql_int.la with appropriate
CFLAGS for embedded and use that in libmysqld/ instead of symlinking
sources.
- libmysys.a, libmyisam.a and similar libraries could be installed as .so
also to save on code size; or alternatively could be not installed at all.
client/Makefile.am:
Updated for using libtool
config/ac-macros/plugins.m4:
Replace MUSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS with mechanism for plugins
to specify alternate object for embedded.
configure.in:
Fix linking duplicate objects related to THREAD_LOBJECTS.
dbug/Makefile.am:
Updated for using libtool
extra/Makefile.am:
Fix relative paths.
libmysqld/Makefile.am:
Build libmysqld.la using libtool
libmysqld/examples/Makefile.am:
Updated to use libtool
mysys/Makefile.am:
Updated to use libtool.
Fix linking duplicate objects related to THREAD_LOBJECTS.
mysys/my_uuid.c:
Fix conflicting global mutex name by making it static.
regex/Makefile.am:
Updated to use libtool
sql/Makefile.am:
Updated to use libtool
sql/item_func.cc:
Fix conflicting mutex name.
sql/mysql_priv.h:
Fix conflicting mutex name
sql/mysqld.cc:
Fix conflicting mutex name.
Add missing call of my_uuid_end().
storage/archive/Makefile.am:
Updated to use libtool
storage/archive/plug.in:
Updated to use libtool
storage/blackhole/Makefile.am:
Updated to use libtool
storage/blackhole/plug.in:
Updated to use libtool
storage/csv/Makefile.am:
Updated to use libtool
storage/csv/plug.in:
Updated to use libtool
storage/example/Makefile.am:
Updated to use libtool
storage/federated/Makefile.am:
Updated to use libtool
storage/federated/plug.in:
Updated to use libtool
storage/federatedx/Makefile.am:
Updated to use libtool
storage/federatedx/plug.in:
Updated to use libtool
storage/heap/Makefile.am:
Updated to use libtool
storage/heap/plug.in:
Updated to use libtool
storage/innobase/Makefile.am:
Updated to use libtool
storage/innobase/plug.in.disabled:
Updated to use libtool
storage/innodb_plugin/Makefile.am:
Updated to use libtool
storage/maria/CMakeLists.txt:
Fix linking duplicate object in maria_dump_log, causes failure on Mac OS X
storage/maria/Makefile.am:
Updated to use libtool
Fix linking duplicate object in maria_dump_log, causes link failure on Mac OS X
storage/maria/ma_loghandler.c:
Move maria_dump_log code to separate file to fix duplicate object link failures.
storage/maria/ma_loghandler.h:
Move maria_dump_log code to separate file to fix duplicate object link failures.
storage/maria/maria_dump_log.c:
Move maria_dump_log code to separate file to fix duplicate object link failures.
storage/maria/plug.in:
Updated to use libtool
storage/myisam/Makefile.am:
Updated to use libtool
storage/myisam/plug.in:
Updated to use libtool
storage/myisammrg/Makefile.am:
Updated to use libtool
storage/myisammrg/plug.in:
Updated to use libtool
storage/pbxt/plug.in:
Updated to use libtool
storage/pbxt/src/Makefile.am:
Updated to use libtool
storage/xtradb/Makefile.am:
Updated to use libtool
storage/xtradb/plug.in:
Updated to use libtool
strings/Makefile.am:
Updated to use libtool
unittest/unit.pl:
Don't attempt to run libtool internal files as unit tests.
vio/Makefile.am:
Updated to use libtool
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.
- Speed up replicated NDB test by havin mysqltest poll every 100ms (instead
of every second) in sync_master_with_slave. Default epoch
timeout is 100ms, so that make sense.
Added more parsing in do_block()
Limitation: left operand must be variable
Also changed var_set_int from 57036 to var_check_int
Added tests to mysqltest.test
Some tests can now be simplified but will take this later
Updated after comments, now white space around operator not needed
Make the binlog handlerton participate in START TRANSACTION WITH CONSISTENT
SNAPSHOT, recording the binlog position corresponding to the snapshot taken
in other MVCC storage engines.
Expose this consistent binlog position as the new status variables
binlog_trx_file and binlog_trx_position. This enables to get a fully
non-locking snapshot of the database (including binlog position for
slave provisioning), avoiding the need for FLUSH TABLES WITH READ LOCK.
Modify mysqldump to detect if the server supports this new feature, and
if so, avoid FLUSH TABLES WITH READ LOCK for --single-transaction
--master-data snapshot backups.
Implement os_event_wait_time() for POSIX systems.
In the purge thread, use os_event_wait_time() when sleeping rather than sleep,
and signal the event when server shuts down, so we do not need to wait for
upto 10 seconds until the purge thread wakes up.
Also fix bug that warnings that were pushed after we call set_ok_status() were
not included in the waning count sent to the client in the result packet.
Also in mysqltest, in recursive die() invocation at least print the message
before aborting.
client/mysqltest.cc:
If we detect recursive die(), at least print the message before aborting.
mysql-test/r/warnings_debug.result:
Test case.
mysql-test/t/warnings_debug.test:
Test case.
sql/handler.cc:
Force generation of a warning with specific debug option, for testing.
sql/protocol.cc:
Fix wrong DBUG_ENTER
sql/sql_class.h:
Add method to count warnings pushed after set_ok_status() is called.
sql/sql_error.cc:
Also count warnings pushed after set_ok_status() is called.
storage/xtradb/include/os0sync.h:
Implement working os_sync_wait_time() for POSIX.
storage/xtradb/include/srv0srv.h:
Make the purge thread wait for an event when sleeping, so we can signal it to
wakeup immediately at shutdown.
storage/xtradb/log/log0log.c:
Make the purge thread wait for an event when sleeping, so we can signal it to
wakeup immediately at shutdown.
storage/xtradb/os/os0sync.c:
Implement working os_sync_wait_time() for POSIX.
storage/xtradb/srv/srv0srv.c:
Make the purge thread wait for an event when sleeping, so we can signal it to
wakeup immediately at shutdown.
Added locking of lock mutex when updating status in external_unlock() for Aria and MyISAM tables.
Fixed that 'source' command doesn't cause mysql command line tool to exit on error.
DEBUG_EXECUTE() and DEBUG_EVALUATE_IF() should not execute things based on wildcards. (Allows one to run --debug with mysql-test-run scripts that uses @debug)
Fixed several core dump, deadlock and crashed table bugs in handling of LOCK TABLE with MERGE tables:
- Added priority of locks to avoid crashes with MERGE tables.
- Added thr_lock_merge() to allow one to merge two results of thr_lock().
Fixed 'not found row' bug in REPLACE with Aria tables.
Mark MyISAM tables that are part of MERGE with HA_OPEN_MERGE_TABLE and set the locks to have priority THR_LOCK_MERGE_PRIV.
- By sorting MERGE tables last in thr_multi_unlock() it's safer to release and relock them many times (can happen when TRIGGERS are created)
Avoid printing (null) in debug file (to easier find out wrong NULL pointer usage with %s).
client/mysql.cc:
Fixed that 'source' command doesn't cause mysql command line tool to exit on error.
client/mysqltest.cc:
Don't send NULL to fn_format(). (Can cause crash on Solaris when using --debug)
dbug/dbug.c:
DEBUG_EXECUTE() and DEBUG_EVALUATE_IF() should not execute things based on wildcards.
include/my_base.h:
Added flag to signal if one opens a MERGE table.
Added extra() command to signal that one is not part of a MERGE table anymore.
include/thr_lock.h:
Added priority for locks (needed to fix bug in thr_lock when using MERGE tables)
Added option to thr_unlock() if get_status() should be called.
Added prototype for thr_merge_locks().
mysql-test/mysql-test-run.pl:
Ignore crashed table warnings for tables named 'crashed'.
mysql-test/r/merge.result:
Renamed triggers to make debugging easier.
Added some CHECK TABLES to catch errors earlier.
Additional tests.
mysql-test/r/merge_debug.result:
Test of error handling when reopening MERGE tables.
mysql-test/r/udf_query_cache.result:
Added missing flush status
mysql-test/suite/parts/r/partition_repair_myisam.result:
Update results
mysql-test/t/merge.test:
Renamed triggers to make debugging easier.
Added some CHECK TABLES to catch errors earlier.
Additional tests.
mysql-test/t/merge_debug.test:
Test of error handling when reopening MERGE tables.
mysql-test/t/udf_query_cache.test:
Added missing flush status
mysys/my_getopt.c:
Removed not used variable
mysys/my_symlink2.c:
Changed (null) to (NULL) to make it easier to find NULL arguments to DBUG_PRINT() functions.
(On linux, NULL to sprintf is printed 'null')
mysys/thr_lock.c:
Added priority of locks to avoid crashes with MERGE tables.
Added thr_lock_merge() to allow one to merge two results of thr_lock().
- This is needed for MyISAM as all locked table must share the same status. If not, you will not see newly inserted rows in other instances of the table.
If calling thr_unlock() with THR_UNLOCK_UPDATE_STATUS, call update_status() and restore_status() for the locks. This is needed in some rare cases where we call thr_unlock() followed by thr_lock() without calling external_unlock/external_lock in between.
Simplify loop in thr_multi_lock().
Added 'start_trans', which is called at end of thr_multi_lock() when all locks are taken.
- This was needed by Aria to ensure that transaction is started when we got all locks, not at get_status(). Without this, some rows could not be visible when we lock two tables at the same time, causing REPLACE using two tables to fail unexpectedly.
sql/handler.cc:
Add an assert() in handler::print_error() for "impossible errors" (like table is crashed) when --debug-assert-if-crashed-table is used.
sql/lock.cc:
Simplify mysql_lock_tables() code if get_lock_data() returns 0 locks.
Added new parameter to thr_multi_unlock()
In mysql_unlock_read_tables(), call first externa_unlock(), then thr_multi_unlock(); This is same order as we do in mysql_unlock_tables().
Don't abort locks in mysql_lock_abort() for merged tables when a MERGE table is deleted; Would cause a spin lock.
Added call to thr_merge_locks() in mysql_lock_merge() to ensure consistency in thr_locks().
- New locks of same type and table is stored after the old lock to ensure that we get the status from the original lock.
sql/mysql_priv.h:
Added debug_assert_if_crashed_table
sql/mysqld.cc:
Added --debug-assert-if-crashed-table
sql/parse_file.cc:
Don't print '(null)' in DBUG_PRINT of no dir given
sql/set_var.cc:
Increase default size of buffer for @debug variable.
sql/sql_base.cc:
In case of error from reopen_table() in reopen_tables(), call unlock_open_table() and restart loop.
- This fixed bug when we twice deleted same table from open_cache.
Don't take name lock for already name locked table in open_unireg_entry().
- Fixed bug when doing repair in reopen_table().
- In detach_merge_children(), always detach if 'clear_refs' is given. We can't trust parent->children_attached as this function can be called twice, first time with clear_refs set to 0.
sql/sql_class.cc:
Changed printing of (null) to "" in set_thd_proc_info()
sql/sql_parse.cc:
Added DBUG
sql/sql_trigger.cc:
Don't call unlink_open_table() if reopen_table() fails as the table may already be freed.
storage/maria/ma_bitmap.c:
Fixed DBUG_ASSERT() in allocate_tail()
storage/maria/ma_blockrec.c:
Fixed wrong calculation of row length for very small rows in undo_row_update().
- Fixes ASSERT() when doing undo.
storage/maria/ma_blockrec.h:
Added _ma_block_start_trans() and _ma_block_start_trans_no_versioning()
storage/maria/ma_locking.c:
Call _ma_update_status_with_lock() when releasing write locks.
- Fixes potential problem with updating status without the proper lock.
storage/maria/ma_open.c:
Changed to use start_trans() instead of get_status() to ensure that we see all rows in all locked tables when we got the locks.
- Fixed 'not found row' bug in REPLACE with Aria tables.
storage/maria/ma_state.c:
Added _ma_update_status_with_lock() and _ma_block_start_trans().
This is to ensure that we see all rows in all locked tables when we got the locks.
storage/maria/ma_state.h:
Added _ma_update_status_with_lock()
storage/maria/ma_write.c:
More DBUG_PRINT
storage/myisam/mi_check.c:
Fixed error message
storage/myisam/mi_extra.c:
Added HA_EXTRA_DETACH_CHILD:
- Detach MyISAM table to not be part of MERGE table (remove flag & lock priority).
storage/myisam/mi_locking.c:
Call mi_update_status_with_lock() when releasing write locks.
- Fixes potential problem with updating status without the proper lock.
Change to use new HA_OPEN_MERGE_TABLE flag to test if MERGE table.
Added mi_fix_status(), called by thr_merge().
storage/myisam/mi_open.c:
Added marker if part of MERGE table.
Call mi_fix_status() in thr_lock() for transactional tables.
storage/myisam/myisamdef.h:
Change my_once_flag to uint, as it stored different values than just 0/1
Added 'open_flag' to store state given to mi_open()
storage/myisammrg/ha_myisammrg.cc:
Add THR_LOCK_MERGE_PRIV to THR_LOCK_DATA to get MERGE locks sorted after other types of locks.
storage/myisammrg/myrg_locking.c:
Remove windows specific code.
storage/myisammrg/myrg_open.c:
Use HA_OPEN_MERGE_TABLE to mi_open().
Set HA_OPEN_MERGE_TABLE for linked MyISAM tables.
storage/xtradb/buf/buf0buf.c:
Fixed compiler warning
storage/xtradb/buf/buf0lru.c:
Initialize variable that could be used not initialized.
Adds deprecation warning for the mysqlbinlog options
--base64-output=always and --base64-output.
A warning is printed when the flags are used,
and also when running mysqlbinlog --help.
client/mysqlbinlog.cc:
Give a warning for --base64-output=always and --base64-output,
and print warning in mysqlbinlog --help.
mysql-test/r/mysqlbinlog.result:
updated result file
mysql-test/t/mysqlbinlog.test:
Test that mysqlbinlog --base64-output=always gives a warning.
Fix assorted warnings that are generated in optimized builds.
Most of it is silencing variables that are set but unused.
This patch also introduces the MY_ASSERT_UNREACHABLE macro
which helps the compiler to deduce that a certain piece of
code is unreachable.
include/my_compiler.h:
Use GCC's __builtin_unreachable if available. It allows
GCC to deduce the unreachability of certain code paths,
thus avoiding warnings that, for example, accused that a
variable could be used without being initialized (due to
unreachable code paths).
Issue an error if user specifies multiple commands to run.
Also there was an unnoticed bug that DO_CHECK was actually 0 which lead
to wrong actions in some cases.
The mysqlcheck.test contained commands with the suspicious meaning
for the above reason. Extra commands removed from there.
per-file commands:
client/mysqlcheck.c
Bug#35269 mysqlcheck behaves different depending on order of parameters
Drop with an error if multiple commands.
mysql-test/r/mysqlcheck.result
Bug#35269 mysqlcheck behaves different depending on order of parameters
result completed.
mysql-test/t/mysqlcheck.test
Bug#35269 mysqlcheck behaves different depending on order of parameters
testcase added.
not-working commands removed from some mysqlcheck calls.
The fix is to:
- introduce ORACLE_WELCOME_COPYRIGHT_NOTICE define to have a single place
to specify copyright notice;
- replace custom copyright notices with ORACLE_WELCOME_COPYRIGHT_NOTICE
in programs.
Trying to run perl fails, just like it does when perl is started but fails
Trap the case that perl was not found/could not be started, and skip test
Also force a restart of servers since test may already have done something
mtr now also appends path of current perl to PATH to aid mysqltest
Fix some bugs where we stored values other than 0 or 1 in my_bool
Fixed some compiler warnings
client/mysql.cc:
Changed interrupted_query from my_bool to int, as we stored 2 in it.
client/mysqladmin.cc:
Changed return variable type to same type as function value type
client/mysqltest.cc:
Changed 'found' to int as we store other values than 0 or 1 into it
Changed type for parameter of set_reconnect() to match usage.
extra/libevent/evbuffer.c:
Added __attribute__((unused))
extra/libevent/event.c:
Added __attribute__((unused))
extra/libevent/signal.c:
Added __attribute__((unused))
sql/event_data_objects.h:
my_bool -> bool
sql/event_db_repository.cc:
my_bool -> bool
sql/event_db_repository.h:
my_bool -> bool
sql/event_parse_data.h:
my_bool -> bool
sql/events.cc:
my_bool -> bool
sql/events.h:
my_bool -> bool
sql/field.cc:
my_bool -> bool
sql/field.h:
my_bool -> bool
sql/hash_filo.h:
my_bool -> bool
sql/item.cc:
my_bool -> bool
sql/item.h:
my_bool -> bool
sql/item_cmpfunc.h:
my_bool -> bool
Changed result_for_null_param from my_bool to int as we stored -1 in it.
sql/item_func.cc:
my_bool -> bool
Modified udf wrapper functions so that the UDF functions would continue to use my_bool. (To keep compatibility with UDF:s)
sql/item_func.h:
my_bool -> bool
sql/item_subselect.h:
my_bool -> bool
sql/item_sum.cc:
Modified udf wrapper functions so that the UDF functions would continue to use my_bool. (To keep compatibility with UDF:s)
sql/parse_file.h:
my_bool -> bool
sql/rpl_mi.h:
my_bool -> bool
sql/sp_rcontext.h:
my_bool -> bool
sql/sql_analyse.h:
my_bool -> bool
sql/sql_base.cc:
Change some assignments so that we don't initialize bool variables with int's.
sql/sql_bitmap.h:
my_bool -> bool
sql/sql_cache.cc:
my_bool -> bool
sql/sql_cache.h:
my_bool -> bool
sql/sql_class.h:
my_bool -> bool
sql/sql_insert.cc:
Change some assignments so that we don't initialize bool variables with int's.
sql/sql_prepare.cc:
my_bool -> bool
sql/table.h:
my_bool -> bool
storage/maria/ma_check.c:
Removed duplicate assignment
strings/decimal.c:
Fixed wrong variable usage.
Don't do complex arithmetic on bool when simple works.
Added --enable-connect-log, somewhet similar to --enable-query-log
If query log is disabled, disable connect log too
Also some related cleanup in mysqltest.test: removing duplicate test loop
Fixed crashing bug when doing ALTER TABLE RENAME with transactional tables.
client/mysqltest.cc:
Added errno to error message for system calls (delete, rename etc)
Write error message for failures of system calls
mysql-test/include/cleanup_fake_relay_log.inc:
Disable warnings for remove_file
mysql-test/include/diff_tables.inc:
Disable warnings for remove_file
mysql-test/include/maria_empty_logs.inc:
Disable warnings for remove_file
mysql-test/include/maria_make_snapshot.inc:
Disable warnings for remove_file
mysql-test/include/maria_make_snapshot_for_feeding_recovery.inc:
Disable warnings for remove_file
mysql-test/include/mysqlhotcopy.inc:
Disable warnings for remove_file
mysql-test/include/ndb_backup.inc:
Disable warnings for remove_file
mysql-test/include/ndb_backup_print.inc:
Disable warnings for remove_file
mysql-test/r/alter_table_trans.result:
Test of crashing ALTER TABLE RENAME bug
mysql-test/t/alter_table_trans.test:
Test of crashing ALTER TABLE RENAME bug
mysql-test/t/mysqltest.test:
Disable warnings for remove_file and move_file
mysys/my_copy.c:
Fixed wrong error message
sql/sql_table.cc:
Fixed crashing bug when doing ALTER TABLE RENAME with transactional tables.
Bug#56657: Test still uses "--exec rm -f ..." which is non-portable
Bug#56601: Test uses Unix path for temporary file, fails, and writes misleading message
Several tests that was written in a non portable way (failed on windows)
Fixed by
1) backporting the fix for replace_result to also apply to list_files
(mysqltest from mysql-trunk)
2) replacing all #p#/#sp#/#tmp# to #P#/#SP#/#TMP#/
(innodb always converts filenames to lower case in windows).
3) replacing '--exec rm -f' with '--remove_files_wildcard'
4) replacing a perl snippet with '--write_file'
client/mysqltest.cc:
backport from mysql-trunk to allow replace_result to apply
also on list_files
mysql-test/suite/parts/inc/partition_check_drop.inc:
Compensate for differences between innodb on windows vs unix.
Using mysqltest command, instead of unix command to remove files.
mysql-test/suite/parts/inc/partition_crash.inc:
compensate for differences between innodb on windows vs unix
mysql-test/suite/parts/inc/partition_fail.inc:
compensate for differences between innodb on windows vs unix
mysql-test/suite/parts/inc/partition_layout.inc:
compensate for differences between innodb on windows vs unix
mysql-test/suite/parts/inc/partition_layout_check1.inc:
compensate for differences between innodb on windows vs unix
mysql-test/suite/parts/inc/partition_layout_check2.inc:
compensate for differences between innodb on windows vs unix
mysql-test/suite/parts/r/partition_recover_myisam.result:
updated result
mysql-test/suite/parts/r/partition_special_myisam.result:
updated result
mysql-test/suite/parts/t/part_supported_sql_func_innodb.test:
Test takes very long time, require --big flag
mysql-test/suite/parts/t/partition_alter1_1_2_innodb.test:
Test takes very long time, require --big flag
mysql-test/suite/parts/t/partition_alter1_2_innodb.test:
Test takes very long time, require --big flag
mysql-test/suite/parts/t/partition_alter2_1_1_innodb.test:
Test takes very long time, require --big flag
mysql-test/suite/parts/t/partition_alter2_1_2_innodb.test:
Test takes very long time, require --big flag
mysql-test/suite/parts/t/partition_alter2_2_2_innodb.test:
Test takes very long time, require --big flag
mysql-test/suite/parts/t/partition_alter4_innodb.test:
Test takes very long time, require --big flag
mysql-test/suite/parts/t/partition_debug_sync_innodb.test:
compensate for differences between innodb on windows vs unix
mysql-test/suite/parts/t/partition_recover_myisam.test:
more generic suppression (failed in windows)
mysql-test/suite/parts/t/partition_special_myisam.test:
Using portable mysqltest command 'write_file' instead of perl snippet.
Bug #55546 mysqltest fails to create a new thread on HPUX
Missing call to pthread_join(), in embedded mode
This independently solves both problems, see 55426 for details.
Addendum: cannot test against a pthread_t, adds boolean flag instead
The problem was not caused by a change in the client,
rather by the tests using the Windows built-in "echo"
and not the one built by MySQL.
This again happened because the binary was missing in the package,
caused by the wrong macro being used to build it in "cmake".
Cleaned up mysql_upgrade --help and mysqlcheck --help
client/mysql_upgrade.c:
Increased version number.
Marked all options that are not used 'Not used'.
Don't write 'Looking for tool' if not using --verbose
client/mysqlcheck.c:
Cleanup output for --help
Reset not initialzed variable
mysql-test/r/log_tables_upgrade.result:
Updated results
mysql-test/r/mysql_upgrade.result:
Updated results
mysql-test/r/mysqlcheck.result:
Updated results
mysql-test/t/log_tables_upgrade.test:
mysql_upgrade is now run without --skip-verbose
mysql-test/t/mysql_upgrade.test:
mysql_upgrade is now run without --skip-verbose
Added --silent option to mysql_upgrade so that one can only get errors printed
Don't write unnecessary warning about log tables during upgrade
client/mysql_upgrade.c:
Don't print connect arguments if not using --verbose --verbose
Added option --silent to only print errors. This options is passed to mysqlcheck.
Write out phase names
The 'verbose' code is a bit strange as I wanted to keep compatibility with old mysql_upgrade
client/mysqlcheck.c:
Don't upgrade log tables (to avoid confusing warning message that they can't be locked)
Fall back to use ALTER TABLE for engines that doesn't support REPAIR when doing repair for upgrade.
Nicer output from mysql_upgrade and mysql_check
Updated all arrays that used NAME_LEN to use SAFE_NAME_LEN to ensure that we don't break things accidently as names can now have a #mysql50# prefix.
client/mysql_upgrade.c:
If we are using verbose, also run mysqlcheck in verbose mode.
client/mysqlcheck.c:
Add more information if running in verbose mode
Print 'Needs upgrade' instead of complex error if table needs to be upgraded
Don't write connect information if verbose is not 2 or above
mysql-test/r/drop.result:
Updated test and results as we now support full table names
mysql-test/r/grant.result:
Now you get a correct error message if using #mysql with paths
mysql-test/r/show_check.result:
Update results as table names can temporarly be bigger than NAME_LEN (during upgrade)
mysql-test/r/upgrade.result:
Test upgrade for long table names.
mysql-test/suite/funcs_1/r/is_tables_is.result:
Updated old test result (had note been updated in a while)
mysql-test/t/drop.test:
Updated test and results as we now support full table names
mysql-test/t/grant.test:
Now you get a correct error message if using #mysql with paths
mysql-test/t/upgrade.test:
Test upgrade for long table names.
sql/ha_partition.cc:
NAME_LEN -> SAFE_NAME_LEN
sql/item.cc:
NAME_LEN -> SAFE_NAME_LEN
sql/log_event.cc:
NAME_LEN -> SAFE_NAME_LEN
sql/mysql_priv.h:
Added SAFE_NAME_LEN
sql/rpl_filter.cc:
NAME_LEN -> SAFE_NAME_LEN
sql/sp.cc:
NAME_LEN -> SAFE_NAME_LEN
sql/sp_head.cc:
NAME_LEN -> SAFE_NAME_LEN
sql/sql_acl.cc:
NAME_LEN -> SAFE_NAME_LEN
sql/sql_base.cc:
NAME_LEN -> SAFE_NAME_LEN
sql/sql_connect.cc:
NAME_LEN -> SAFE_NAME_LEN
sql/sql_parse.cc:
NAME_LEN -> SAFE_NAME_LEN
sql/sql_prepare.cc:
NAME_LEN -> SAFE_NAME_LEN
sql/sql_select.cc:
NAME_LEN -> SAFE_NAME_LEN
sql/sql_show.cc:
NAME_LEN -> SAFE_NAME_LEN
Enlarge table names for SHOW TABLES to also include optional #mysql50#
sql/sql_table.cc:
Fall back to use ALTER TABLE for engines that doesn't support REPAIR when doing repair for upgrade.
sql/sql_trigger.cc:
NAME_LEN -> SAFE_NAME_LEN
sql/sql_udf.cc:
NAME_LEN -> SAFE_NAME_LEN
sql/sql_view.cc:
NAME_LEN -> SAFE_NAME_LEN
sql/table.cc:
Fixed check_table_name() to not count #mysql50# as part of name
If #mysql50# is part of the name, don't allow path characters in name.
When in embedded-serve mode, mysqltest tried to run '--send' commands in the separate thread.
That upsets some engines (InnoDB particularly) as the transaction has to be executed in the same
thread completely. So i implemented some different approach. So we create one separate thread for
each connection and execute all the queries of this connection inside it. Looks even simpler than it was
for me.
per-file comments:
client/mysqltest.cc
Bug#54861 Additional connections not handled properly in mtr --embedded
Now the connection has one running connection_thread() attached. And sends all the
query and read-result requests to it.
- Changed to still use bcmp() in certain cases becasue
- Faster for short unaligneed strings than memcmp()
- Bettern when using valgrind
- Changed to use my_sprintf() instead of sprintf() to get higher portability for old systems
- Changed code to use MariaDB version of select->skip_record()
- Removed -%::SCCS/s.% from Makefile.am:s to remove automake warnings
file .\dtoa.c
The assertion failure was correct because the 'width' argument
of my_gcvt() has the signed integer type, whereas the unsigned
value UINT_MAX32 was being passed by the caller
(Field_double::val_str()) leading to a negative width in
my_gcvt().
The following chain of problems was found by further analysis:
1. The display width for a floating point number is calculated
in Field_double::val_str() as either field_length or the
maximum possible length of string representation of a floating
point number, whichever is greater. Since in the bug's test
case field_length is UINT_MAX32, we get the same value as the
display width. This does not make any sense because for numeric
values field_length only matters for ZEROFILL columns,
otherwise it does not make sense to allocate that much memory
just to print a number. Field_float::val_str() has a similar
problem.
2. Even if the above wasn't the case, we would still get a
crash on a slightly different test case when trying to allocate
UINT_MAX32 bytes with String::alloc() because the latter does
not handle such large input values correctly due to alignment
overflows.
3. Even when String::alloc() is fixed to return an error when
an alignment overflow occurs, there is still a problem because
almost no callers check its return value, and
Field_double::val_str() is not an exception (same for
Field_float::val_str()).
4. Even if all of the above wasn't the case, creating a
Field_double object with UINT_MAX32 as its field_length does
not make much sense either, since the .frm code limits it to
MAX_FIELD_CHARLENGTH (255) bytes. Such a beast can only be
created by create_tmp_field_from_item() from an Item with
REAL_RESULT as its result_type() and UINT_MAX32 as its
max_length.
5. For the bug's test case, the above condition (REAL_RESULT
Item with max_length = UINT_MAX32) was a result of
Item_func_if::fix_length_and_dec() "shortcutting" aggregation
of argument types when one of the arguments was a constant
NULL. In this case, the attributes of the aggregated type were
simply copied from the other, non-NULL argument, but max_length
was still calculated as per the general, non-shortcut case, by
choosing the greatest of argument's max_length, which is
obviously not correct.
The patch addresses all of the above problems, even though
fixing the assertion failure for the particular test case would
require only a subset of the above problems to be solved.
client/sql_string.cc:
Return an error in case of uint32 overflow in alignment.
Also assert there was no overflow to help find such conditions
in debug builds, since almost no callers check the return value
of String::alloc().
mysql-test/r/func_if.result:
Add a test case for bug #55077.
mysql-test/t/func_if.test:
Add a test case for bug #55077.
sql/field.cc:
- Assert we don't operate with fields wider than 255
(MAX_FIELD_CHARLENGTH) bytes in both Field_float and
Field_double.
- Don't take field_length into account when calculating the
output buffer length.
- Check the return value of String::alloc()
sql/item_cmpfunc.cc:
When shortcutting type aggregation, don't take the NULL
argument's max_length into account.
sql/sql_string.cc:
Return an error in case of uint32 overflow in alignment.
Also assert there was no overflow to help find such conditions
in debug builds, since almost no callers check the return value
of String::alloc().
Added code resulted in strange linking problem for embedded on Windows
Avoided by not doing this for embedded mode
It's irrelevant for embedded server anyway, --protocol will be ignored
- CTRL-C now aborts 'source' commands in mysql client
- Fix that thread id's are removed in convert-debug-for-diff.sh
client/mysql.cc:
CTRL-C now aborts 'source' commands
scripts/convert-debug-for-diff.sh:
Fix expression to remove thread id
storage/maria/ha_maria.cc:
Don't call DBUG_ASSERT() when we kill a query during REPAIR / ALTER TABLE
storage/maria/ma_bitmap.c:
Added DBUG_ASSERT() if we call _ma_bitmap_set_full_page_bits()
storage/maria/ma_key_recover.c:
Don't do an assert if table is marked crashed.
storage/maria/ma_recovery.c:
Added DBUG_ENTER
#ifdef THREAD removed from mysql.cc.
No reason was found for this limitation to persist.
per-file comments:
client/mysql.cc
Bug#54466 client 5.5 built from source lacks "pager" support
now we have USE_POPEN always if not __WIN__
mysql-test/r/mysql.result
Bug#54466 client 5.5 built from source lacks "pager" support
result updated.
mysql-test/t/mysql.test
Bug#54466 client 5.5 built from source lacks "pager" support
test case added.
it couldn't parse the --ssl option.
client/mysql_upgrade.c:
mysql_upgrade parses its options and passes some of them to the underlying
tools (mysqlcheck etc). To do this passdown, it reconstructs a
command-line-suitable text from the my_option object (which
contains the option's name and option's value). For options
which expect no parameter, it just had to use the option's name;
for other options, it had to concatenate the option's name,
a "=" symbol, and the option's value; it had code to handle
this latter case, but only for GET_STR options (options taking a
string as value). But since the work on WL 4738, the --ssl
option, a GET_BOOL, which used to have no parameter (NO_ARG), can
now have one (OPT_ARG), so with --ssl we came to the "default"
label, error. Fixed by constructing the command-line-suitable
representation for GET_BOOL too. For --ssl it will produce
--ssl=1 ; for --ssl=0, it will produce --ssl=0.
mysql-test/include/mysql_upgrade_preparation.inc:
handles requirements of tests which use mysql_upgrade
mysql-test/r/mysql_upgrade_ssl.result:
result; without the code fix we would get "internal error".
mysql-test/t/mysql_upgrade.test:
This test has requirements before running; moved them
to an include file in order to share with mysql_upgrade_ssl.
mysql-test/t/mysql_upgrade_ssl.test:
test for bug. Couldn't go into mysql_upgrade.test as this new test requires
SSL support. --force is needed, in case mysql_upgrade.test run before
(in which case mysql_upgrade_ssl would say that upgrade has already been
done); --force forces the upgrade in all cases.
client/mysqlcheck.c:
Added missing casts
client/mysqldump.c:
Added missing casts
client/mysqlimport.c:
Added missing casts
extra/my_print_defaults.c:
Added missing casts
mysql-test/mysql-test-run.pl:
Added suppression for non-critical warning on windows
storage/maria/maria_pack.c:
Added missing casts
storage/xtradb/buf/buf0lru.c:
Added missing casts
storage/xtradb/fil/fil0fil.c:
Added missing casts
storage/xtradb/handler/i_s.cc:
Added extra argument to call store() function for longlong.
storage/xtradb/srv/srv0srv.c:
Added cast to suppress compiler warning
support-files/compiler_warnings.supp:
Added suppression for some non critical compiler warnings on Windows
unittest/mytap/tap.h:
Fixed prototypes to be same as the actual functions
Fixed compiler warnings
Disabled some tests that doesn't work on windows (uses shell tools or strange characters)
client/mysqlshow.c:
Fixed compiler warnings
client/mysqlslap.c:
Fixed compiler warnings
mysql-test/mysql-test-run.pl:
Use an error file instead of /dev/null
(Fixes problem on Windows and the output may be usefull)
mysql-test/suite/maria/r/maria.result:
Test case for bug LP#613408 (not complete)
mysql-test/suite/maria/t/maria.test:
Test case for bug LP#613408 (not complete)
mysql-test/suite/percona/percona_log_slow_slave_statements-and-use_global_long_query_time.test:
This test doesn't work one windows (needs shell tools)
mysql-test/suite/percona/percona_log_slow_slave_statements.test:
This test doesn't work one windows (needs shell tools)
mysql-test/suite/percona/percona_slow_query_log-control_global_slow.test:
This test doesn't work one windows (needs shell tools)
mysql-test/suite/percona/percona_slow_query_log-log_slow_filter.test:
This test doesn't work one windows (needs shell tools)
mysql-test/suite/percona/percona_slow_query_log-log_slow_verbosity.test:
This test doesn't work one windows (needs shell tools)
mysql-test/suite/percona/percona_slow_query_log-long_query_time.test:
This test doesn't work one windows (needs shell tools)
mysql-test/suite/percona/percona_slow_query_log-microseconds_in_slow_query_log.test:
This test doesn't work one windows (needs shell tools)
mysql-test/suite/percona/percona_slow_query_log-min_examined_row_limit.test:
This test doesn't work one windows (needs shell tools)
mysql-test/suite/percona/percona_slow_query_log-use_global_long_query_time.test:
This test doesn't work one windows (needs shell tools)
mysql-test/t/ctype_filesystem.test:
This test doesn't work one windows (problem with character sets)
mysql-test/t/events_time_zone.test:
Use longer times to get predictable tests
mysql-test/t/show_check-master.opt:
set long query time to get more predictable tests
storage/maria/ma_check.c:
Restore info->s->lock_key_trees after repair.
Disable logging to temp tables for all repair cases (safety fix)
storage/maria/ma_state.c:
Ensurethat info->state_start doesn't point to freed memory. (Could happen after running an internal repair to fast create indexes)
storage/maria/trnman.c:
Added longer comment
Changed to use longlong10_to_str() instead of longlong2str() when base is 10 or -10 as former is much faster than later
Changed my_vsnprintf() to use longlong2str instead of int2str() to get rid of warnings and to get support for long pointers even when long is 32 bit.
client/mysqltest.cc:
longlong2str() -> longlong10_to_str()
include/m_string.h:
Added extra argument to longlong2str() to make it have same prototype is int2str()
mysys/charset.c:
Fixed compiler warning
mysys/mf_soundex.c:
Fixed compiler warning
mysys/my_getopt.c:
longlong2str() -> longlong10_to_str()
sql/create_options.cc:
Fixed compiler warning
sql/item_strfunc.cc:
Added extra argument to longlong2str
sql/opt_range.cc:
longlong2str() -> longlong10_to_str()
sql/partition_info.cc:
longlong2str() -> longlong10_to_str()
sql/slave.cc:
longlong2str() -> longlong10_to_str()
sql/sql_bitmap.h:
Added extra argument to longlong2str
sql/sql_partition.cc:
Added extra argument to longlong2str
sql/sql_select.cc:
longlong2str() -> longlong10_to_str()
sql/sql_show.cc:
Added extra argument to longlong2str
storage/innodb_plugin/handler/ha_innodb.cc:
Update to new parameters for longlong2str()
storage/maria/ma_dbug.c:
longlong2str() -> longlong10_to_str()
storage/maria/maria_chk.c:
Added extra argument to longlong2str
storage/myisam/mi_dbug.c:
longlong2str() -> longlong10_to_str()
storage/myisam/myisamchk.c:
Added extra argument to longlong2str
storage/xtradb/handler/ha_innodb.cc:
Update to new parameters for longlong2str()
strings/longlong2str.c:
Added extra argument to longlong2str() to make it have same prototype is int2str()
strings/my_vsnprintf.c:
Changed my_vsnprintf() to use longlong2str instead of int2str() to get rid of warnings and to get support for long pointers even when long is 32 bit.
Added cast to get rid of compiler warnings
Fixed compiler warnings
client/mysqlslap.c:
Fixed compiler warnings
mysql-test/suite/maria/r/maria.result:
Test case for LP#614265
mysql-test/suite/maria/t/maria.test:
Test case for LP#614265
mysql-test/suite/pbxt/t/skip_name_resolve-master.opt:
Ensure that we get restart before test (as test uses show processlist)
sql/handler.cc:
Added cloned marker if clone was called (for safety checks & debugging)
sql/handler.h:
Added cloned marker if clone was called (for safety checks & debugging)
storage/maria/ha_maria.cc:
In clone call, set file->trn if cloned file had this set. This is needed as maria_create_trn_for_mysql() and thus file->trn is never set for cloned table.
Ensure that file->trn is properly reset after calls to repair/check/zerofill.
Increment locked table count if file->trn is set (as we decrement this in the unlock call)
tests/mysql_client_test.c:
Fixed compiler warnings
if() treated any non-numeric string as false
Fixed to treat those as true instead
Added some test cases
Fixed missing $ in variable name in include/mix2.inc
Fix warnings flagged by the new warning option -Wunused-but-set-variable
that was added to GCC 4.6 and that is enabled by -Wunused and -Wall. The
option causes a warning whenever a local variable is assigned to but is
later unused. It also warns about meaningless pointer dereferences.
client/mysql.cc:
Meaningless pointer dereferences.
client/mysql_upgrade.c:
Check whether reading from the file succeeded.
extra/comp_err.c:
Unused.
extra/yassl/src/yassl_imp.cpp:
Skip instead of reading data that is discarded.
include/my_pthread.h:
Variable is only used in debug builds.
include/mysys_err.h:
Add new error messages.
mysys/errors.c:
Add new error message for permission related functions.
mysys/mf_iocache.c:
Variable is only checked under THREAD.
mysys/my_copy.c:
Raise a error if chmod or chown fails.
mysys/my_redel.c:
Raise a error if chmod or chown fails.
regex/engine.c:
Use a equivalent variable for the assert.
server-tools/instance-manager/instance_options.cc:
Unused.
sql/field.cc:
Unused.
sql/item.cc:
Unused.
sql/log.cc:
Do not ignore the return value of freopen: only set buffer if
reopening succeeds.
Adjust doxygen comment to the right function.
Pass message lenght to log function.
sql/mysqld.cc:
Do not ignore the return value of freopen: only set buffer if
reopening succeeds.
sql/partition_info.cc:
Unused.
sql/slave.cc:
No need to set pointer to the address of '\0'.
sql/spatial.cc:
Unused. Left for historical purposes.
sql/sql_acl.cc:
Unused.
sql/sql_base.cc:
Pointers are always set to the same variables.
sql/sql_parse.cc:
End statement if reading fails.
Store the buffer after it has actually been updated.
sql/sql_repl.cc:
No need to set pointer to the address of '\0'.
sql/sql_show.cc:
Put variable under the same ifdef block.
sql/udf_example.c:
Set null pointer flag appropriately.
storage/csv/ha_tina.cc:
Meaningless dereferences.
storage/example/ha_example.cc:
Return the error since it's available.
storage/myisam/mi_locking.c:
Remove unused and dead code.
Fixed bug: LP#603026 RQG: pagecache_read: Assertion `pageno < ((1ULL) << 40)' on OPTIMIZE TABLE of a Maria table
client/mysql.cc:
Removed Oracle copyright from stdout, as Oracle doesn't have copyright to all code in this file.
Ignore --comments at start of command line. This allows one to more easily run mysqltest tests trough the command line.
mysql-test/suite/maria/r/optimize.result:
Added test for LP#603026
mysql-test/suite/maria/t/optimize.test:
Added test for LP#603026
sql/net_serv.cc:
Removed DBUG_ASSERT(), as this code can happen during testing.
storage/maria/ma_check.c:
Fixed bug: LP#603026 RQG: pagecache_read: Assertion `pageno < ((1ULL) << 40)' on OPTIMIZE TABLE of a Maria table
The problem was duplicated memory usage with long packed keys.