summaryrefslogtreecommitdiff
path: root/sql/share
diff options
context:
space:
mode:
authorunknown <gopal.shankar@oracle.com>2012-04-11 15:53:17 +0530
committerunknown <gopal.shankar@oracle.com>2012-04-11 15:53:17 +0530
commit99b18a036cfb6d990e2f26bb43774735e2a9c7ab (patch)
tree5351d27e52955b31c1d107afd9480b37224c2b8d /sql/share
parent26713f5a154e1f43ac4154b643ce5090a29b35b1 (diff)
downloadmariadb-git-99b18a036cfb6d990e2f26bb43774735e2a9c7ab.tar.gz
Bug#11815557 60269: MYSQL SHOULD REJECT ATTEMPTS TO CREATE SYSTEM
TABLES IN INCORRECT ENGINE PROBLEM: CREATE/ALTER TABLE currently can move system tables like mysql.db, user, host etc, to engines other than MyISAM. This is not completely supported as of now, by mysqld. When some of system tables like plugin, servers, event, func, *_priv, time_zone* are moved to innodb, mysqld restart crashes. Currently system tables can be moved to BLACKHOLE also!!!. ANALYSIS: The problem is that there is no check before creating or moving a system table to some particular engine. System tables are suppose to be residing in MyISAM. We can think of restricting system tables to exist only in MyISAM. But, there could be future needs of these system tables to be part of other engines by design. For eg, NDB cluster expects some tables to be on innodb or ndb engine. This calls for a solution, by which system tables can be supported by any desired engine, with minimal effort. FIX: The solution provides a handlerton interface using which, mysqld server can query particular storage engine handlerton for system tables that it supports. This way each storage engine layer can define their own system database and system tables. The check_engine() function uses the new handlerton function ha_check_if_supported_system_table() to check if db.tablename provided in the DDL is supported by the SE. Note: This fix has modified a test in help.test, which was moving mysql.help_* to innodb. The primary intention of the test was not to move them between engines.
Diffstat (limited to 'sql/share')
-rw-r--r--sql/share/errmsg-utf8.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/share/errmsg-utf8.txt b/sql/share/errmsg-utf8.txt
index 587a70d50bd..4434ecafc29 100644
--- a/sql/share/errmsg-utf8.txt
+++ b/sql/share/errmsg-utf8.txt
@@ -6497,6 +6497,9 @@ ER_BINLOG_UNSAFE_CREATE_SELECT_AUTOINC
ER_BINLOG_UNSAFE_INSERT_TWO_KEYS
eng "INSERT... ON DUPLICATE KEY UPDATE on a table with more than one UNIQUE KEY is unsafe"
+ER_UNSUPPORTED_ENGINE
+ eng "Storage engine '%s' does not support system tables. [%s.%s]"
+
#
# End of 5.5 error messages.
#