summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorAnirudh Mangipudi <anirudh.mangipudi@oracle.com>2013-01-16 18:26:27 +0530
committerAnirudh Mangipudi <anirudh.mangipudi@oracle.com>2013-01-16 18:26:27 +0530
commitcd3b2ac9b70b3fab2df294646c55dadf3b975477 (patch)
tree54a23353ec26cd6af7b20314644e080e66fdbe45 /client
parent0e787b245b05a42c06e1c07d5e4eedd301912709 (diff)
downloadmariadb-git-cd3b2ac9b70b3fab2df294646c55dadf3b975477.tar.gz
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.
Diffstat (limited to 'client')
-rw-r--r--client/mysqldump.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/client/mysqldump.c b/client/mysqldump.c
index 316c0fd174c..68d445f9a5b 100644
--- a/client/mysqldump.c
+++ b/client/mysqldump.c
@@ -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));
}
/*