Commit 722e8060 authored by unknown's avatar unknown

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
parent 52506029
No related merge requests found
...@@ -79,9 +79,9 @@ be less than 256 */ ...@@ -79,9 +79,9 @@ be less than 256 */
string, this is ORed to the precise type: string, this is ORed to the precise type:
this only holds for tables created with this only holds for tables created with
>= MySQL-4.0.14 */ >= MySQL-4.0.14 */
#define DATA_NONLATIN1 2048 /* if the data type is a character string #define DATA_NONLATIN1 2048 /* if the data type is a DATA_BLOB (actually
of a non-latin1 type, this is ORed to the TEXT) of a non-latin1 type, this is ORed to
precise type: this only holds for tables the precise type: this only holds for tables
created with >= MySQL-4.0.14 */ created with >= MySQL-4.0.14 */
/*-------------------------------------------*/ /*-------------------------------------------*/
......
...@@ -203,7 +203,6 @@ dict_index_get_n_fields( ...@@ -203,7 +203,6 @@ dict_index_get_n_fields(
{ {
ut_ad(index); ut_ad(index);
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N); ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
ut_ad(index->cached);
return(index->n_fields); return(index->n_fields);
} }
......
...@@ -507,6 +507,7 @@ row_get_prebuilt_insert_row( ...@@ -507,6 +507,7 @@ row_get_prebuilt_insert_row(
ins_node_t* node; ins_node_t* node;
dtuple_t* row; dtuple_t* row;
dict_table_t* table = prebuilt->table; dict_table_t* table = prebuilt->table;
ulint i;
ut_ad(prebuilt && table && prebuilt->trx); ut_ad(prebuilt && table && prebuilt->trx);
...@@ -530,6 +531,14 @@ row_get_prebuilt_insert_row( ...@@ -530,6 +531,14 @@ row_get_prebuilt_insert_row(
dict_table_copy_types(row, table); 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); ins_node_set_new_row(node, row);
prebuilt->ins_graph = prebuilt->ins_graph =
......
...@@ -3188,7 +3188,8 @@ create_table_def( ...@@ -3188,7 +3188,8 @@ create_table_def(
unsigned_type = 0; 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; nonlatin1_type = DATA_NONLATIN1;
} else { } else {
nonlatin1_type = 0; 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