diff options
author | Ramil Kalimullin <ramil@mysql.com> | 2009-01-14 18:50:51 +0400 |
---|---|---|
committer | Ramil Kalimullin <ramil@mysql.com> | 2009-01-14 18:50:51 +0400 |
commit | 347762946e84c24dba28a4f8302159c2e35d59ec (patch) | |
tree | 8d77b6ffe39e395be2fd0fc2fdb7c96964c79480 /sql/mysql_priv.h | |
parent | 2c1cf1a0ed1aac75fe338ddda34d4ca7fc9a59f1 (diff) | |
download | mariadb-git-347762946e84c24dba28a4f8302159c2e35d59ec.tar.gz |
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.
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.
Diffstat (limited to 'sql/mysql_priv.h')
-rw-r--r-- | sql/mysql_priv.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index fb09ef810d9..c32ebc6d39d 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -2230,6 +2230,7 @@ uint strconvert(CHARSET_INFO *from_cs, const char *from, CHARSET_INFO *to_cs, char *to, uint to_length, uint *errors); uint filename_to_tablename(const char *from, char *to, uint to_length); uint tablename_to_filename(const char *from, char *to, uint to_length); +uint check_n_cut_mysql50_prefix(const char *from, char *to, uint to_length); #endif /* MYSQL_SERVER || INNODB_COMPATIBILITY_HOOKS */ #ifdef MYSQL_SERVER uint build_table_filename(char *buff, size_t bufflen, const char *db, |