mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
BUG#14117025: UNABLE TO RESTORE DUMP
Problem: When a view, with a specific character set and collation, is created on another view with a different character set and collation the dump restoration results in an illegal mix of collations error. SOLUTION: To avoid this confusion of collations, the create table datatype being used is hardcoded as "tinyint NOT NULL". This will not matter as the table created will be dropped at runtime and specifically tinyint is used to avoid hitting the row size conflicts.
This commit is contained in:
@ -2635,14 +2635,19 @@ static uint get_table_structure(char *table, char *db, char *table_type,
|
||||
|
||||
row= mysql_fetch_row(result);
|
||||
|
||||
fprintf(sql_file, " %s %s", quote_name(row[0], name_buff, 0),
|
||||
row[1]);
|
||||
/*
|
||||
The actual column type doesn't matter anyway, since the table will
|
||||
be dropped at run time.
|
||||
We do tinyint to avoid hitting the row size limit.
|
||||
*/
|
||||
fprintf(sql_file, " %s tinyint NOT NULL",
|
||||
quote_name(row[0], name_buff, 0));
|
||||
|
||||
while((row= mysql_fetch_row(result)))
|
||||
{
|
||||
/* col name, col type */
|
||||
fprintf(sql_file, ",\n %s %s",
|
||||
quote_name(row[0], name_buff, 0), row[1]);
|
||||
fprintf(sql_file, ",\n %s tinyint NOT NULL",
|
||||
quote_name(row[0], name_buff, 0));
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user