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
parent 95ffe2d0
......@@ -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 */
/*-------------------------------------------*/
......
......@@ -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);
}
......
......@@ -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 =
......
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment