mysql-test/r/acl_roles_show_grants.result:
one can do SHOW GRANTS for himself
mysql-test/t/acl_roles_set_role-table-column-priv.test:
correct error message
mysql-test/t/acl_roles_show_grants.test:
one can SHOW GRANTS for himself
sql/sql_acl.cc:
bugfixing:
* don't assign with && - it can shortcut and the second assignment won't be executed
* correct the test in check_grant_all_columns() - want_access should not be modified
*
sql/sql_cmd.h.OTHER:
add new commands at the end
sql/sql_db.cc:
don't call acl_get() if all privileges are already satisfied
(crashes when run with --skip-grants, because acl data stuctures aren't initialized)
sql/sql_parse.cc:
* test for current_user in get_current_user()
* map explicitly specified user@host to current_user
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.
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.
OPTION SKIP-WRITE-BINLOG
System tables were not getting upgraded when
mysql_upgrade was run with --skip-write-binlog
option. (Same for --write-binlog.) Also, with
this option, mysql_upgrade_info file was not
getting created after the upgrade.
mysql_upgrade makes use of mysql client tool in
order to run upgrade scripts, while doing so it
passes some of the command line options (used to
start mysql_upgrade) directly to mysql client.
The reason behind this bug being, some options
like skip-write-binlog and upgrade-system-tables
were being passed to mysql tool along with other
options, and hence mysql execution failed due
presence of these invalid options.
Fixed this issue by filtering out the above mentioned
options from the list of options that will be passed to
mysql and mysqlcheck tools. However, since --write-binlog
is supported by mysqlcheck, this option would be used
explicitly while running mysqlcheck. (not part of patch,
already there)
Checking the contents of general log after the upgrade
is not doable via an mtr test. So performed manual test.
Added a test to verify the creation of mysql_upgrade_info.
client/mysql_upgrade.c:
Bug#11827359 60223: MYSQL_UPGRADE PROBLEM WITH
OPTION SKIP-WRITE-BINLOG
With this patch, --upgrade-system-tables and
--write-binlog options will not be added to the
list of options, used to start mysql and mysqlcheck
tools.
mysql-test/r/mysql_upgrade.result:
Added a testcase for Bug#11827359.
mysql-test/t/mysql_upgrade.test:
Added a testcase for Bug#11827359.
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
REPAIR of merge table
Bug #56422 CHECK TABLE run when the table is locked reports
corruption along with timeout
The crash happened if a table maintenance statement (ANALYZE TABLE,
REPAIR TABLE, etc.) was executed on a MERGE table and opening and
locking a child table failed. This could for example happen if a child
table did not exist or if a lock timeout happened while waiting for
a conflicting metadata lock to disappear.
Since opening and locking the MERGE table and its children failed,
the tables would be closed and the metadata locks released.
However, TABLE_LIST::table for the MERGE table would still be set,
with its value invalid since the tables had been closed.
This caused the table maintenance statement to try to continue
and upgrade the metadata lock on the MERGE table. But since the lock
already had been released, this caused a segfault.
This patch fixes the problem by setting TABLE_LIST::table to NULL
if open_and_lock_tables() fails. This prevents maintenance
statements from continuing and trying to upgrade the metadata lock.
The patch includes a 5.5 version of the fix for
Bug #46339 crash on REPAIR TABLE merge table USE_FRM.
This bug caused REPAIR TABLE ... USE_FRM to give an assert
when used on merge tables.
The patch also enables the CHECK TABLE statement for log tables.
Before, CHECK TABLE for log tables gave ER_CANT_LOCK_LOG_TABLE,
yet still counted the statement as successfully executed.
With the changes to table maintenance statement error handling
in this patch, CHECK TABLE would no longer be considered as
successful in this case. This would have caused upgrade scripts
to mistakenly think that the general and slow logs are corrupted
and have to be repaired. Enabling CHECK TABLES for log tables
prevents this from happening.
Finally, the patch changes the error message from "Corrupt" to
"Operation failed" for a number of issues not related to table
corruption. For example "Lock wait timeout exceeded" and
"Deadlock found trying to get lock".
Test cases added to merge.test and check.test.
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
Fixed an incomplete historical ALTER TABLE MODIFY trimming the trigger
privilege bit from mysql.tables_priv.Table_priv column.
Removed the duplicate ALTER TABLE MODIFY.
Test suite added.
Post-merge fix: Redirect stderr to a file as to avoid buffering
problems due to redirecting stderr to stdout.
mysql-test/r/mysql_upgrade.result:
Update test case result.
mysql-test/t/mysql_upgrade.test:
Redirect stderr to a file, cat and remove.
"mysql_upgrade (ver 5.1) add 3 fields to mysql.proc table but does
not set values".
mysql_upgrade (ver 5.1) adds 3 fields (character_set_client,
collation_connection and db_collation) to the mysql.proc table, but
does not set any values. When we run stored procedures, which were
created with mysql 5.0, a warning is logged into the error log.
The solution to this is for mysql_upgrade to set default best guess
values for these fields. A warning is also written during upgrade, to
make the user aware that default values are set.
client/mysql_upgrade.c:
Result lines which start with "WARNING" are passed through to the output.
This way we have a way of triggering WARNING-messages during upgrade
directly from the .sql-script.
mysql-test/r/mysql_upgrade.result:
Expected result of the test.
mysql-test/t/mysql_upgrade.test:
Added a test-case for the bug.
scripts/mysql_system_tables_fix.sql:
The new fields are populated, and warnings are written.
(backport)
mysql_upgrade script accepts --upgrade-system-tables option,
fixing only system tables in this case.
per-file comments:
client/mysql_upgrade.c
WL#4991 mysql_upgrade --fix-privilege-tables
--upgrade-system-tables option added.
if it is set, the tool won't look for the mysqlcheck then
run_mysqlcheck_fixnames() and run_mysqlcheck_upgrade won't be called.
mysql-test/r/mysql_upgrade.result
WL#4991 mysql_upgrade --fix-privilege-tables
test result added
mysql-test/t/mysql_upgrade.test
WL#4991 mysql_upgrade --fix-privilege-tables
test case added
- 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
mysql-test/extra/rpl_tests/rpl_log.test:
Using RESET MASTER in the middle of a sequence of statements cause
a race condition between the dump thread sending the preceeding
statements to the slave and the RESET MASTER.
mysql-test/suite/federated/federated.test:
Fixing include paths.
mysql-test/suite/federated/federated_bug_25714.test:
Removing extreneous lines added by merge.
mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.test:
Correcting typo (the spaces following the connection name was included as part of the name).
mysql-test/t/distinct.test:
Correcting paths.
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''
- Update result file to include these "misleading errors", better to
run mysql_upgrade with them than not at all.
mysql-test/r/mysql_upgrade.result:
Update result file for mysql_upgrade after removing it's disabling
into pilot.blaudden:/home/msvensson/mysql/bug28401/my51-bug28401
mysql-test/r/mysql_upgrade.result:
Auto merged
mysql-test/t/mysql_upgrade.test:
Auto merged
scripts/mysql_system_tables_fix.sql:
Auto merged
- The SQL commands used by mysql_upgrade are written to be run
with sql_mode set to '' - thus the scripts should change sql_mode
for the session to make sure the SQL is legal.
mysql-test/r/mysql_upgrade.result:
Update test result
mysql-test/t/mysql_upgrade.test:
The SQL commands used by mysql_upgrade are written to be run
with sql_mode set to '' - thus the scripts should change sql_mode
for the session to make sure the SQL is legal.
scripts/mysql_system_tables_fix.sql:
Set sql_mode to '' before running the SQL commands
to fix system tables - backport from 5.1
into pilot.blaudden:/home/msvensson/mysql/mysql-5.1-maint
client/mysql_upgrade.c:
Auto merged
mysql-test/r/mysql_upgrade.result:
Auto merged
mysql-test/t/mysql_upgrade.test:
Auto merged
client/mysql_upgrade.c:
Add defines for WEXITSTATUS
Pass arguments on command line instead of --defaults-file=<temp file>
mysql-test/r/mysql_upgrade.result:
When testing that mysql_upgrade detect if mysqlcheck fails, use an option that
is used on all platforms.
mysql-test/t/mysql_upgrade.test:
When testing that mysql_upgrade detect if mysqlcheck fails, use an option that
is used on all platforms.
scripts/comp_sql.c:
Some compilers have a max string length, insert a newline at
every 512th char in long strings
Add "two liner" to mysqld --bootstrap that allows
wo write scripts that can be run both by mysql and mysqld --bootstrap
Remove duplicate create of MySQL system tables
mysql-test/r/mysql_upgrade.result:
Update mysql_upgrade.result for new tables in 5.1
scripts/mysql_system_tables.sql:
Use "delimiter ;;" to make it possible to run the script
both with "mysql" and "mysqld --bootstrap"
scripts/mysql_system_tables_fix.sql:
Remove duplicate stored procedure for creating slow_log
and general_log.
Remove duplicate CREATE of ndb_binlog_index.
Those are already defined in mysql_system_tables.sql
sql/sql_parse.cc:
Make "mysqld --bootstrap skip lines startig with "delimiter"
thus making it possible to write sql scripts containing
stored procedures that can be executed both with "mysql" and
"mysqld --bootstrap"
- Improve mysql_upgrade and add comments describing it's logic
- Don't look for mysql and mysqlcheck randomly, use dir where mysql_upgrade
was started from
- Don't look for mysql_fix_privilege_tables.sql randomly, compile
in the mysql_fix_privilege_tables.sql file and use that to upgrade
the system tables of MySQL
- Check for any unexpected error returned from runnning the mysql_fix_privilege_tables SQL
- Fix bug#26639, bug#24248 and bug#25405
BitKeeper/etc/ignore:
Added scripts/comp_sql scripts/mysql_fix_privilege_tables_sql.c to the ignore list
CMakeLists.txt:
Build files also in scripts/
Makefile.am:
Build scripts/ a little earlier to make
the scripts/mysql_fix_privilege_tables_sql.c file available
when client/ is built
client/mysql_upgrade.c:
Updated version of mysql_upgrade with comments and logical functions
include/my_global.h:
Move IF_WIN macro to my_global.h fr from sql/mysql_priv.h
mysql-test/r/mysql_upgrade.result:
Update result
mysql-test/t/mysql_upgrade.test:
Add more tests for different bugs related to mysql_upgrade
scripts/Makefile.am:
Build comp_sql and mysql_fix_privilege_tables_sql.c
sql/mysql_priv.h:
Move IF_WIN macro to my_global.h fr from sql/mysql_priv.h
scripts/CMakeLists.txt:
New BitKeeper file ``scripts/CMakeLists.txt''
scripts/comp_sql.c:
New BitKeeper file ``scripts/comp_sql.c''
- Use mysql_system_tables.sql to create MySQL system tables in
all places where we create them(mysql_install_db, mysql-test-run-pl
and mysql_fix_privilege_tables.sql)
BitKeeper/deleted/.del-init_db.sql:
Rename: mysql-test/init_db.sql -> BitKeeper/deleted/.del-init_db.sql
BitKeeper/deleted/.del-init_db.sql~a77d572c39d5a1f8:
Rename: mysql-test/lib/init_db.sql -> BitKeeper/deleted/.del-init_db.sql~a77d572c39d5a1f8
BitKeeper/deleted/.del-mysql_create_system_tables.sh:
Rename: scripts/mysql_create_system_tables.sh -> BitKeeper/deleted/.del-mysql_create_system_tables.sh
BitKeeper/etc/ignore:
Added scripts/mysql_fix_privilege_tables.sql to the ignore list
mysql-test/Makefile.am:
lib/init_db.sql has been removed
mysql-test/mysql-test-run.pl:
- Build var/tmp/bootstrap.sql from mysql_system_tables.sql,
mysql_test_data_timezone.sql and fill_help_tables.sql and use
it when bootsraping the system tables to use during test.
mysql-test/r/create.result:
Update result file
mysql-test/r/derived.result:
Update result file
mysql-test/r/join.result:
Update result file
mysql-test/r/mysql_upgrade.result:
Update result file
mysql-test/r/sp-security.result:
Update result file
mysql-test/t/create.test:
Add user mysqltest_1 before trying to connect as that user - no
anon users by default anymore
mysql-test/t/derived.test:
Add user mysqltest_1 before trying to connect as that user - no
anon users by default anymore
mysql-test/t/grant2.test:
Add anonymous users for part of thes that need it.
mysql-test/t/grant_cache.test:
Add anonymous users for part of thes that need it.
mysql-test/t/init_connect.test:
Add anonymous users for part of thes that need it.
mysql-test/t/lock_multi.test:
Add anonymous users for part of thes that need it.
mysql-test/t/ndb_basic.test:
Connect as "root", blank user will take currently logged in
username
mysql-test/t/ndb_index_ordered.test:
Connect as "root", blank user will take currently logged in
username
mysql-test/t/ndb_multi.test:
Connect as "root", blank user will take currently logged in
username
mysql-test/t/overflow.test:
Connect as root - no anonymous users by default anymore
mysql-test/t/rpl_temporary.test:
Add anonymous users for the test
mysql-test/t/xa.test:
Connect as "root", blank user wil pick currently logged in user
scripts/Makefile.am:
Remove mysql_create_system_tables.sh
Add mysql_system_tables.sql and mysql_test_data_timezone.sql
Build mysql_fix_privilege_tables.sql from mysql_system_tables.sql
and mysql_fix_privilege_tables.sql.in
scripts/mysql_fix_privilege_tables.sh:
Update message describing what the script does
scripts/mysql_fix_privilege_tables.sql.in:
Remove the part that creates system tables as that will be added to
mysql_fix_privileg_tables.sql from mysql_system_tables.sql
Change all comments to use #
scripts/mysql_install_db.sh:
Use mysql_system_tables.sql to create the MySQL system tables
Update comments and indentation
Add more descriptive comments about --windows switch
Reduce number of hardcoded names for the SQL files the script
looks for
mysql-test/include/add_anonymous_users.inc:
New BitKeeper file ``mysql-test/include/add_anonymous_users.inc''
mysql-test/include/delete_anonymous_users.inc:
New BitKeeper file ``mysql-test/include/delete_anonymous_users.inc''
scripts/mysql_system_tables.sql:
New BitKeeper file ``scripts/mysql_system_tables.sql''
scripts/mysql_test_data_timezone.sql:
New BitKeeper file ``scripts/mysql_test_data_timezone.sql''
Add new test file mysql_upgrade.test
BitKeeper/deleted/.del-abi_check.ic:
Rename: include/abi_check.ic -> BitKeeper/deleted/.del-abi_check.ic
client/mysql_upgrade.c:
Make mysql_upgrade search also in "client" dir so it can be run from a source dist.
mysql-test/mysql-test-run.pl:
Make it possible for .test scripts to run "mysql_upgrade"
mysql-test/r/mysql_upgrade.result:
New BitKeeper file ``mysql-test/r/mysql_upgrade.result''
mysql-test/t/mysql_upgrade.test:
New BitKeeper file ``mysql-test/t/mysql_upgrade.test''