summaryrefslogtreecommitdiff
path: root/innobase/dict
diff options
context:
space:
mode:
authorunknown <heikki@hundin.mysql.fi>2004-02-19 20:07:02 +0200
committerunknown <heikki@hundin.mysql.fi>2004-02-19 20:07:02 +0200
commitbe8979436aead2e488ba9f50f4c0de03384ebf37 (patch)
tree75425c7281891c9cd564869a24f909c5cf1f8a18 /innobase/dict
parentc6ea718bba2f8dc4c4a94ae258ba29365b4be448 (diff)
downloadmariadb-git-be8979436aead2e488ba9f50f4c0de03384ebf37.tar.gz
Many files:
Multiple charset support for InnoDB; note that if you create tables and the default charset-collation is not latin1_swedish_ci, then you cannot use those tables if you downgrade to 4.0 again sql/ha_innodb.cc: Multiple charset support for InnoDB; note that if you create tables and the default charset-collation is not latin1_swedish_ci, then you cannot use those tables if you downgrade to 4.0 again innobase/data/data0type.c: Multiple charset support for InnoDB; note that if you create tables and the default charset-collation is not latin1_swedish_ci, then you cannot use those tables if you downgrade to 4.0 again innobase/dict/dict0crea.c: Multiple charset support for InnoDB; note that if you create tables and the default charset-collation is not latin1_swedish_ci, then you cannot use those tables if you downgrade to 4.0 again innobase/dict/dict0load.c: Multiple charset support for InnoDB; note that if you create tables and the default charset-collation is not latin1_swedish_ci, then you cannot use those tables if you downgrade to 4.0 again innobase/include/data0type.h: Multiple charset support for InnoDB; note that if you create tables and the default charset-collation is not latin1_swedish_ci, then you cannot use those tables if you downgrade to 4.0 again innobase/include/data0type.ic: Multiple charset support for InnoDB; note that if you create tables and the default charset-collation is not latin1_swedish_ci, then you cannot use those tables if you downgrade to 4.0 again innobase/rem/rem0cmp.c: Multiple charset support for InnoDB; note that if you create tables and the default charset-collation is not latin1_swedish_ci, then you cannot use those tables if you downgrade to 4.0 again
Diffstat (limited to 'innobase/dict')
-rw-r--r--innobase/dict/dict0crea.c2
-rw-r--r--innobase/dict/dict0load.c9
2 files changed, 10 insertions, 1 deletions
diff --git a/innobase/dict/dict0crea.c b/innobase/dict/dict0crea.c
index d6b1b7261ad..5fc2f26fc31 100644
--- a/innobase/dict/dict0crea.c
+++ b/innobase/dict/dict0crea.c
@@ -1315,7 +1315,7 @@ loop:
if (error == DB_DUPLICATE_KEY) {
mutex_enter(&dict_foreign_err_mutex);
- ut_sprintf_timestamp(dict_foreign_err_buf);
+ ut_sprintf_timestamp(ebuf);
sprintf(ebuf + strlen(ebuf),
" Error in foreign key constraint creation for table %.500s.\n"
"A foreign key constraint of name %.500s\n"
diff --git a/innobase/dict/dict0load.c b/innobase/dict/dict0load.c
index e9076db08f3..07c4ef3c683 100644
--- a/innobase/dict/dict0load.c
+++ b/innobase/dict/dict0load.c
@@ -360,6 +360,15 @@ dict_load_columns(
field = rec_get_nth_field(rec, 6, &len);
prtype = mach_read_from_4(field);
+ if (dtype_is_non_binary_string_type(mtype, prtype)
+ && dtype_get_charset_coll(prtype) == 0) {
+ /* This is a non-binary string type, and the table
+ was created with < 4.1.2. Use the default charset. */
+
+ prtype = dtype_form_prtype(prtype,
+ data_mysql_default_charset_coll);
+ }
+
field = rec_get_nth_field(rec, 7, &len);
col_len = mach_read_from_4(field);