summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <heikki@hundin.mysql.fi>2003-06-16 00:39:46 +0300
committerunknown <heikki@hundin.mysql.fi>2003-06-16 00:39:46 +0300
commit7ee4c918d58ad8a478f9ba4327479d9378b82fb1 (patch)
tree27d56cd87eb5acb3ee57772ad608aeaa81e7eb42
parentdb4848998adef30ddb3a114655f45955c36ecd5d (diff)
downloadmariadb-git-7ee4c918d58ad8a478f9ba4327479d9378b82fb1.tar.gz
row0mysql.c, dict0dict.ic:
Cleanup ha_innodb.cc, data0type.h: Make sure non-latin1 users can downgrade from 4.0.14 to an earlier version if they have not created DATA_BLOB column prefix indexes innobase/include/data0type.h: Make sure non-latin1 users can downgrade from 4.0.14 to an earlier version if they have not created DATA_BLOB column prefix indexes sql/ha_innodb.cc: Make sure non-latin1 users can downgrade from 4.0.14 to an earlier version if they have not created DATA_BLOB column prefix indexes innobase/include/dict0dict.ic: Cleanup innobase/row/row0mysql.c: Cleanup
-rw-r--r--innobase/include/data0type.h6
-rw-r--r--innobase/include/dict0dict.ic1
-rw-r--r--innobase/row/row0mysql.c9
-rw-r--r--sql/ha_innodb.cc3
4 files changed, 14 insertions, 5 deletions
diff --git a/innobase/include/data0type.h b/innobase/include/data0type.h
index 5e28f657f0c..4da686bf2e1 100644
--- a/innobase/include/data0type.h
+++ b/innobase/include/data0type.h
@@ -79,9 +79,9 @@ be less than 256 */
string, this is ORed to the precise type:
this only holds for tables created with
>= MySQL-4.0.14 */
-#define DATA_NONLATIN1 2048 /* if the data type is a character string
- of a non-latin1 type, this is ORed to the
- precise type: this only holds for tables
+#define DATA_NONLATIN1 2048 /* if the data type is a DATA_BLOB (actually
+ TEXT) of a non-latin1 type, this is ORed to
+ the precise type: this only holds for tables
created with >= MySQL-4.0.14 */
/*-------------------------------------------*/
diff --git a/innobase/include/dict0dict.ic b/innobase/include/dict0dict.ic
index 71ea67117a7..c5982c162a7 100644
--- a/innobase/include/dict0dict.ic
+++ b/innobase/include/dict0dict.ic
@@ -203,7 +203,6 @@ dict_index_get_n_fields(
{
ut_ad(index);
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
- ut_ad(index->cached);
return(index->n_fields);
}
diff --git a/innobase/row/row0mysql.c b/innobase/row/row0mysql.c
index 61ba9111b91..dc2a50c4f0c 100644
--- a/innobase/row/row0mysql.c
+++ b/innobase/row/row0mysql.c
@@ -507,6 +507,7 @@ row_get_prebuilt_insert_row(
ins_node_t* node;
dtuple_t* row;
dict_table_t* table = prebuilt->table;
+ ulint i;
ut_ad(prebuilt && table && prebuilt->trx);
@@ -530,6 +531,14 @@ row_get_prebuilt_insert_row(
dict_table_copy_types(row, table);
+ /* We init the value of every field to the SQL NULL to avoid
+ a debug assertion from failing */
+
+ for (i = 0; i < dtuple_get_n_fields(row); i++) {
+
+ dtuple_get_nth_field(row, i)->len = UNIV_SQL_NULL;
+ }
+
ins_node_set_new_row(node, row);
prebuilt->ins_graph =
diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc
index 081b9a85c5c..795cffc0776 100644
--- a/sql/ha_innodb.cc
+++ b/sql/ha_innodb.cc
@@ -3188,7 +3188,8 @@ create_table_def(
unsigned_type = 0;
}
- if (strcmp(default_charset_info->name, "latin1") != 0) {
+ if (col_type == DATA_BLOB
+ && strcmp(default_charset_info->name, "latin1") != 0) {
nonlatin1_type = DATA_NONLATIN1;
} else {
nonlatin1_type = 0;