Change of user interface to be more logical and more in line with expectations
to work similar to old-style replication.
User can now explicitly choose in CHANGE MASTER whether binlog position is
taken into account (master_gtid_pos=current_pos) or not (master_gtid_pos=
slave_pos) when slave connects to master.
@@gtid_pos is replaced by three separate variables @@gtid_slave_pos (can
be set by user, replicated GTIDs only), @@gtid_binlog_pos (read only), and
@@gtid_current_pos (a combination of the two, most recent GTID within each
domain). mysql.rpl_slave_state is renamed to mysql.gtid_slave_pos to match.
This fixes MDEV-4474.
Merge of 10.0-mdev26 feature tree into 10.0-base.
Global transaction ID is prepended to each event group in the binlog.
Slave connect can request to start from GTID position instead of specifying
file name/offset of master binlog. This facilitates easy switch to a new
master.
Slave GTID state is stored in a table mysql.rpl_slave_state, which can be
InnoDB to get crash-safe slave state.
GTID includes a replication domain ID, allowing to keep track of distinct
positions for each of multiple masters.
* print "table doesn't exist in engine" when a table doesn't exist in the engine,
instead of "file not found" (if no file was involved)
* print a complete filename that cannot be found ('t1.MYI', not 't1')
* it's not an error for a DROP if a table doesn't exist in the engine (or some table
files cannot be found) - if the DROP succeeded regardless
after all engines have discovered their tables
side effect: correct alphabetical sorting as in ORDER BY ... COLLATE utf8_bin,
information_schema is no longer the first after find_files(),
tables like #mysql50#zzz are sorted first (as per table name),
not last (as per file name zzz).
Adjust full test suite to work with GTID.
Huge patch, mainly due to having to update .result file for all SHOW BINLOG
EVENTS and mysqlbinlog outputs, where the new GTID events pop up.
Everything was painstakingly checked to be still correct and valid .result
file updates.
table_stat -> table_stats
column_stat -> column_stats
index_stat -> index_stats
to be in line with the names of innodb statistical tables
from mysql-5.6: innodb_table_stats and innodb_index_stats.
Fixed README with link to source
Merged InnoDB change to XtraDB
README:
Added information of where to find MariaDB code
storage/archive/ha_archive.cc:
Removed memset() of rows, a MariaDB checksum's doesn't touch not used data.
sql/sql_insert.cc:
CREATE ... IF NOT EXISTS may do nothing, but
it is still not a failure. don't forget to my_ok it.
******
CREATE ... IF NOT EXISTS may do nothing, but
it is still not a failure. don't forget to my_ok it.
sql/sql_table.cc:
small cleanup
******
small cleanup
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
1. Fixed the name of the table to proxies_priv
2. Fixed the column names to be of the form Capitalized_lowecarse instead of
Capitalized_Capitalized
3. Added Timestamp and Grantor columns
4. Added tests to plugin_auth to check the table structure
5. Updated the existing tests
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.
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
- rewrite "check warnings" to be faster by not creating a full join
between error_log and suspicious_patterns while running REGEXP.
Instead add a column to error_log that will be set to 1 to indicate
a warning and run the 6 REGEXP's we have for suspicious lines as
6 separate full table scans.
- Remove the "suspicious_patterns" table from mtr db
- Use 'xykls37' as separator when loading the error log, that line should
hopefully never exist in a line that should be a warning
conflicts:
Text conflict in client/mysqltest.cc
Text conflict in mysql-test/include/wait_until_connected_again.inc
Text conflict in mysql-test/lib/mtr_report.pm
Text conflict in mysql-test/mysql-test-run.pl
Text conflict in mysql-test/r/events_bugs.result
Text conflict in mysql-test/r/log_state.result
Text conflict in mysql-test/r/myisam_data_pointer_size_func.result
Text conflict in mysql-test/r/mysqlcheck.result
Text conflict in mysql-test/r/query_cache.result
Text conflict in mysql-test/r/status.result
Text conflict in mysql-test/suite/binlog/r/binlog_index.result
Text conflict in mysql-test/suite/binlog/r/binlog_innodb.result
Text conflict in mysql-test/suite/rpl/r/rpl_packet.result
Text conflict in mysql-test/suite/rpl/t/rpl_packet.test
Text conflict in mysql-test/t/disabled.def
Text conflict in mysql-test/t/events_bugs.test
Text conflict in mysql-test/t/log_state.test
Text conflict in mysql-test/t/myisam_data_pointer_size_func.test
Text conflict in mysql-test/t/mysqlcheck.test
Text conflict in mysql-test/t/query_cache.test
Text conflict in mysql-test/t/rpl_init_slave_func.test
Text conflict in mysql-test/t/status.test
Post-fix test failure: fixed mysqlcheck.test on Windows platforms.
mysql-test/r/mysqlcheck.result:
fixed mysqlcheck.test on Windows platforms.
mysql-test/t/mysqlcheck.test:
fixed mysqlcheck.test on Windows platforms.
bug#33094: Error in upgrading from 5.0 to 5.1 when table contains
triggers
and
#41385: Crash when attempting to repair a #mysql50# upgraded table
with triggers.
Problem:
1. trigger code didn't assume a table name may have
a "#mysql50#" prefix, that may lead to a failing ASSERT().
2. "ALTER DATABASE ... UPGRADE DATA DIRECTORY NAME" failed
for databases with "#mysql50#" prefix if any trigger.
3. mysqlcheck --fix-table-name didn't use UTF8 as a default
character set that resulted in (parsing) errors for tables with
non-latin symbols in their names and definitions of triggers.
Fix:
1. properly handle table/database names with "#mysql50#" prefix.
2. handle --default-character-set mysqlcheck option;
if mysqlcheck is launched with --fix-table-name or --fix-db-name
set default character set to UTF8 if no --default-character-set
option given.
Note: if given --fix-table-name or --fix-db-name option,
without --default-character-set mysqlcheck option
default character set is UTF8.
client/mysqlcheck.c:
Fix for
bug#33094: Error in upgrading from 5.0 to 5.1 when table contains
triggers
and
#41385: Crash when attempting to repair a #mysql50# upgraded table
with triggers.
- check and set default charset if --default-character-set option
given.
- set default charset to "utf8" if there's
--fix-table-name or --fix-db-name and no --default-character-set.
mysql-test/r/mysqlcheck.result:
Fix for
bug#33094: Error in upgrading from 5.0 to 5.1 when table contains
triggers
and
#41385: Crash when attempting to repair a #mysql50# upgraded table
with triggers.
- test result.
mysql-test/t/mysqlcheck.test:
Fix for
bug#33094: Error in upgrading from 5.0 to 5.1 when table contains
triggers
and
#41385: Crash when attempting to repair a #mysql50# upgraded table
with triggers.
- test case.
sql/mysql_priv.h:
Fix for
bug#33094: Error in upgrading from 5.0 to 5.1 when table contains
triggers
and
#41385: Crash when attempting to repair a #mysql50# upgraded table
with triggers.
- check_n_cut_mysql50_prefix() introduced.
sql/sql_table.cc:
Fix for
bug#33094: Error in upgrading from 5.0 to 5.1 when table contains
triggers
and
#41385: Crash when attempting to repair a #mysql50# upgraded table
with triggers.
- tablename_to_filename() code split into 2 parts
- check_n_cut_mysql50_prefix() introduced to cut #mysql50# prefixes,
used in the trigger code as well.
sql/sql_trigger.cc:
Fix for
bug#33094: Error in upgrading from 5.0 to 5.1 when table contains
triggers
and
#41385: Crash when attempting to repair a #mysql50# upgraded table
with triggers.
- Table_triggers_list::check_n_load() - checking triggers assume
a table/database name given may have "#mysql50#" prefix in some cases.
- Table_triggers_list::change_table_name_in_triggers() -
create .TRG file in new database directory and delete it in old one,
as they may differ in case of
"ALTER DATABASE ... UPGRADE DATA DIRECTORY NAME"
- Table_triggers_list::change_table_name_in_trignames() - remove stale .TRN
files in #mysql50#dbname directory in case of database upgrade
- Table_triggers_list::change_table_name() - allow changing trigger's
database in case of its upgrading
sql/sql_trigger.h:
Fix for
bug#33094: Error in upgrading from 5.0 to 5.1 when table contains
triggers
and
#41385: Crash when attempting to repair a #mysql50# upgraded table
with triggers.
- new old_db_name parameter added in
Table_triggers_list::change_table_name_in_trignames() and
Table_triggers_list::change_table_name_in_triggers()
when InnoDB frm file corruption
Problem: mysqlcheck runs 'SHOW FULL TABLE' queries to get table lists.
The query may fail for some reasons (e.g. null .frm file) then
mysqlcheck doesn't process the database tables.
Fix: try to run 'SHOW TABLES' if 'SHOW FULL TABLES' failed.
client/mysqlcheck.c:
Fix for bug#37527: mysqlcheck fails to report entire database
when InnoDB frm file corruption
- run "SHOW TABLES" query if "SHOW /*!50002 FULL*/ TABLES" failed;
- print error info if both failed.
mysql-test/r/mysqlcheck.result:
Fix for bug#37527: mysqlcheck fails to report entire database
when InnoDB frm file corruption
- test result.
mysql-test/t/mysqlcheck.test:
Fix for bug#37527: mysqlcheck fails to report entire database
when InnoDB frm file corruption
- test case.
issue 'The storage engine for the table doesn't support check' note for I_S tables
mysql-test/r/mysqlcheck.result:
test result
mysql-test/t/mysqlcheck.test:
test case
sql/sql_table.cc:
issue 'The storage engine for the table doesn't support check' note for I_S tables
Problem: during a refactoring of mtr, a pattern for suppressing a warning from lowercase_table3 was lost.
Fix: re-introduce the suppression.
Problem 2: suppression was misspelt as supression. Fixed by adding a p.
mysql-test/include/mtr_warnings.sql:
fixed spelling error
mysql-test/suite/rpl/t/rpl_bug33931.test:
fixed spelling error
mysql-test/suite/rpl/t/rpl_idempotency.test:
fixed spelling error
mysql-test/suite/rpl/t/rpl_temporary.test:
fixed spelling error
mysql-test/suite/rpl/t/rpl_temporary_errors.test:
fixed spelling error
mysql-test/t/lowercase_table3.test:
fixed spelling error
BitKeeper/deleted/.del-rpl_bug33931-slave.opt:
Delete: mysql-test/suite/rpl/t/rpl_bug33931-slave.opt
mysql-test/include/default_mysqld.cnf:
Set a default name for "log-bin"
mysql-test/mysql-test-run.pl:
Check for warnings in mysqld error log files after each testcase,
using SQL
mysql-test/lib/mtr_cases.pm:
Make mtr_match into a perl module
mysql-test/lib/mtr_match.pm:
Make mtr_match into a perl module
mysql-test/lib/mtr_report.pm:
Make mtr_match into a perl module
Print warnings if testcase failed from warnings
mysql-test/r/information_schema.result:
Be more selective which databases and tables are select in the queries
mysql-test/r/mysql_upgrade.result:
Update result, mysql_upgrade will check _all_ databases
mysql-test/r/mysqlcheck.result:
Update result, mysql_upgrade should check _all_ databases
mysql-test/r/sp-destruct.result:
Be more selective which databases and tables are select in the queries
mysql-test/r/sp-error.result:
Backup and restore mysql.proc table
mysql-test/r/sp-security.result:
Be more selective which databases and tables are select in the queries
mysql-test/r/sp.result:
Be more selective which databases and tables are select in the queries
mysql-test/suite/rpl/r/rpl_bug33931.result:
Move the setting of debug flag into the test file instead of in -slave.opt
Add supression
mysql-test/suite/rpl/r/rpl_idempotency.result:
Add supression
Add master-slave-end.inc
mysql-test/suite/rpl/t/rpl_bug33931.test:
Move the setting of debug flag into the test file instead of in -slave.opt
Add supression
mysql-test/suite/rpl/t/rpl_idempotency.test:
Add supression
Add master-slave-end.inc
mysql-test/t/information_schema.test:
Be more selective which databases and tables are select in the queries
mysql-test/t/sp-destruct.test:
Be more selective which databases and tables are select in the queries
mysql-test/t/sp-error.test:
Backup and restore mysql.proc table
mysql-test/t/sp-security.test:
Be more selective which databases and tables are select in the queries
mysql-test/t/sp.test:
Be more selective which databases and tables are select in the queries
mysql-test/include/check-warnings.test:
New BitKeeper file ``mysql-test/include/check-warnings.test''
mysql-test/include/mtr_warnings.sql:
New BitKeeper file ``mysql-test/include/mtr_warnings.sql''
and so that it works correctly on Windows.
mysql-test/r/mysqlcheck.result:
Flush tables before monkeying around with underlying MyISAM data files
mysql-test/t/mysqlcheck.test:
Fix the test case for bug #25347 so that it actually does test the behavior.
Also, this makes it work on Windows by ensuring that mysqld doesn't hold the
underlying MyISAM files open while we try to corrupt them on disk.
Flush tables before monkeying around with underlying MyISAM data files;
--use-frm, so that mysqlcheck will succeed.
Bug#25347: mysqlcheck -A -r doesn't repair table marked as crashed
mysqlcheck tests nullness of the engine type to know whether the
"table" is a view or not. That also falsely catches tables that
are severly damaged.
Instead, use SHOW FULL TABLES to test whether a "table" is a view
or not.
(Don't add new function. Instead, get original data a smarter way.)
Make it safe for use against databases before when views appeared.
client/mysqlcheck.c:
Use SHOW FULL TABLES to test better whether a name in the table
list is one of a view. Checking that the engine is NULL is
insufficient.
Implemented suggestion from jimw that involved removing most of
original patch and getting data a better way
mysql-test/r/mysqlcheck.result:
Verify that tables that have NULL/unreadable engine types are
processed and not interpreted as views.
mysql-test/t/mysqlcheck.test:
Verify that tables that have NULL/unreadable engine types are
processed and not interpreted as views.
Follow SergG's lead with mysqlcheck result.
mysql-test/r/mysqlcheck.result:
Error changed lately. This may not be a bug, despite Bug#29458.
See SergG [22 Nov 11:45] comment for Bug#25347.
mysql-test/suite/rpl/r/rpl_invoked_features.result:
Order so it is deterministic.
mysql-test/suite/rpl/t/rpl_invoked_features.test:
Order so it is deterministic.
into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint
CMakeLists.txt:
Auto merged
configure.in:
Auto merged
libmysql/CMakeLists.txt:
Auto merged
libmysqld/lib_sql.cc:
Auto merged
mysql-test/r/information_schema_db.result:
Auto merged
mysql-test/t/information_schema.test:
Auto merged
sql/CMakeLists.txt:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/lock.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/repl_failsafe.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/set_var.h:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_cache.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_repl.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/structs.h:
Auto merged
sql/table.h:
Auto merged
storage/archive/ha_archive.cc:
Auto merged
storage/myisam/ha_myisam.cc:
Auto merged
storage/myisam/mi_open.c:
Auto merged
storage/myisammrg/ha_myisammrg.cc:
Auto merged
support-files/mysql.spec.sh:
Auto merged
client/mysqlcheck.c:
Manual merge.
mysql-test/r/information_schema.result:
Manual merge.
mysql-test/r/mysqlcheck.result:
Manual merge.
mysql-test/t/mysqlcheck.test:
Manual merge.
sql/slave.cc:
Manual merge.
sql/sql_base.cc:
Manual merge.
sql/sql_delete.cc:
Manual merge.
sql/sql_parse.cc:
Manual merge.
sql/sql_update.cc:
Manual merge.
into mysql.com:/home/ram/work/b30679/b30679.5.1
client/mysqlcheck.c:
Auto merged
mysql-test/r/mysqlcheck.result:
Auto merged
mysql-test/t/mysqlcheck.test:
Auto merged
into mysql.com:/home/ram/work/b30654/b30654.5.1
client/mysqlcheck.c:
Auto merged
mysql-test/r/mysqlcheck.result:
Auto merged
mysql-test/t/mysqlcheck.test:
manual merge.
names include backticks or blank
Problem: mysqlcheck doesn't escape backtick characters in the table names.
Fix: escape them.
client/mysqlcheck.c:
Fix for bug #30654: mysqlcheck fails during upgrade of tables whose
names include backticks or blank
- escape backtick characters in the table names.
mysql-test/r/mysqlcheck.result:
Fix for bug #30654: mysqlcheck fails during upgrade of tables whose
names include backticks or blank
- test result.
mysql-test/t/mysqlcheck.test:
Fix for bug #30654: mysqlcheck fails during upgrade of tables whose
names include backticks or blank
- test case.
Problem: we skip views perfoming --fix-table-names.
Fix: rename views as well.
client/mysqlcheck.c:
Fix for bug #30679: 5.1 name encoding not performed for views during upgrade
- rename views performing --fix-table-names as well.
mysql-test/r/mysqlcheck.result:
Fix for bug #30679: 5.1 name encoding not performed for views during upgrade
- test result.
mysql-test/t/mysqlcheck.test:
Fix for bug #30679: 5.1 name encoding not performed for views during upgrade
- test case.