Commit graph

26 commits

Author SHA1 Message Date
Sergei Golubchik
49c853fb94 Merge branch '5.5' into 10.0 2015-05-04 22:00:24 +02:00
Sergei Golubchik
6f17e233bf post-merge fixes 2015-04-29 12:40:52 +02:00
Sergei Golubchik
df7b27f1fe MDEV-6984 Can't migrate from MySQL 5.6.21 to MariaDB 10
in mysql_upgrade: do FLUSH PRIVILEGES at the end, not together with
mysql_fix_privilege_tables

mysql-test/t/mysql_upgrade-6984.opt:
  use a dummy second option to force server restart after the test
2014-11-19 00:19:17 +01:00
Michael Widenius
bd2117d154 Automatic merge from 5.5
Fixed 2 failing tests by replacing result files
2014-08-19 21:35:14 +03:00
Sergei Golubchik
15a9103c48 MDEV-6535 Ordering of mysql_upgrade tasks is not optimal
first update system tables, then the rest
2014-08-06 13:27:44 +02:00
Sergei Golubchik
0fdb3bcfdb 10.0-base merge (roles) 2013-10-29 15:08:44 +01:00
Sergei Golubchik
72d8b533cc Fixes for mysql-test failures
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
2013-10-18 08:10:51 -07:00
Sergei Golubchik
b7b5f6f1ab 10.0-monty merge
includes:
* remove some remnants of "Bug#14521864: MYSQL 5.1 TO 5.5 BUGS PARTITIONING"
* introduce LOCK_share, now LOCK_ha_data is strictly for engines
* rea_create_table() always creates .par file (even in "frm-only" mode)
* fix a 5.6 bug, temp file leak on dummy ALTER TABLE
2013-07-21 16:39:19 +02:00
Sergey Petrunya
4a8c61f372 Fix a number of tests:
- MariaDB does not have mysql.slave_master_info, mysql.slave_relay_log_info ,mysql.slave_worker_info
  or mysql.ndb_binlog_index tables.
- Some tests expected to have these tables (this was an incorrect merge from 5.6, which merged 
  necessary tables like mysql.innodb*stats, but also got these tables)
2013-07-05 10:21:15 +04:00
unknown
a0fd7382bc Merge 10.0-base -> 10.0 2013-05-28 15:39:56 +02:00
unknown
1cd6eb5f94 MDEV-26: Global transaction ID.
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.
2013-05-22 17:36:48 +02:00
unknown
0e7410a154 Merge 10.0-base -> 10.0 (GTID). 2013-04-17 15:17:01 +02:00
unknown
d9f975d08b MDEV-26: Global transaction ID
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.
2013-03-26 10:35:34 +01:00
Igor Babaev
1ef07d0845 Merge 10.0-base -> 10.0.
Also fixed a bug in sql_update.cc: the code of mysql_update() lacked
a call of set_statistics_for_table().
2013-01-10 22:33:23 -08:00
Igor Babaev
b110132516 Changed the names of the system tables for statistical data:
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.
2012-12-05 00:31:05 -08:00
Michael Widenius
f277f27ae2 Fixing test cases
Added missing system tables used in 5.6
2012-08-23 00:32:25 +03:00
Igor Babaev
ff3d16fba8 Merge maria-5.3-mwl248 -> 5.5 = maria-5.5-mwl248. 2012-03-19 01:35:32 -07:00
Igor Babaev
e8497370b9 The main patch for the MWL#248 back-ported from
lp:~igorb-seattle/mysql-server/mysql-azalea-wl4777.
2012-01-04 17:51:53 -08:00
Sergei Golubchik
9809f05199 5.5-merge 2011-07-02 22:08:51 +02:00
Sergei Golubchik
0accbd0364 lots of post-merge changes 2011-04-25 17:22:25 +02:00
Georgi Kodinov
00f1e71d9a Bug #57916: Fix the naming of the proxy_priv table
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
2010-11-02 17:45:26 +02:00
Georgi Kodinov
8789c79723 merge 2010-10-04 15:42:16 +03:00
Jon Olav Hauglid
e14934d26d Bug #56494 Segfault in upgrade_shared_lock_to_exclusive() for
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.
2010-09-22 10:15:41 +02:00
Michael Widenius
4c7af343e0 Fixed build failures
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
2010-09-06 02:15:34 +03:00
Georgi Kodinov
9705711596 WL#1054: Pluggable authentication support
Merged the implementation to a new base tree.
2010-08-09 11:32:50 +03:00
Davi Arnaut
b0a1ae09ae Bug#49823: mysql_upgrade fatal error due to general_log / slow_low CSV NULL
The problem was that the CSV storage engine does not support NULL
fields, yet in some early 5.1 version the log tables (general_log
and slow_log) were created with null fields. On top of this, when
altering a CSV table column, all fields of the table must be NOT
NULL otherwise the alteration fails.

The solution is to ensure that during upgrade all columns of the
log tables are NOT NULL.

mysql-test/r/log_tables_upgrade.result:
  Add test case result for Bug#49823.
mysql-test/std_data/bug49823.CSV:
  Sample data for test.
mysql-test/std_data/bug49823.frm:
  Add a CSV table which mimics the general_log table, except that
  it contains a nullable column.
mysql-test/t/log_tables_upgrade.test:
  Add test case for Bug#49823.
scripts/mysql_system_tables_fix.sql:
  Ensure that all columns of the log tables are NOT NULL.
2010-02-26 09:22:48 -03:00