mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
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.
This commit is contained in:
@ -146,11 +146,13 @@ public:
|
||||
|
||||
private:
|
||||
bool prepare_record1_accessors(TABLE *table);
|
||||
LEX_STRING* change_table_name_in_trignames(const char *db_name,
|
||||
LEX_STRING* change_table_name_in_trignames(const char *old_db_name,
|
||||
const char *new_db_name,
|
||||
LEX_STRING *new_table_name,
|
||||
LEX_STRING *stopper);
|
||||
bool change_table_name_in_triggers(THD *thd,
|
||||
const char *db_name,
|
||||
const char *old_db_name,
|
||||
const char *new_db_name,
|
||||
LEX_STRING *old_table_name,
|
||||
LEX_STRING *new_table_name);
|
||||
};
|
||||
|
Reference in New Issue
Block a user