Commit a64487fc authored by unknown's avatar unknown

ha_innodb.cc:

  Correct the fix of Bug #9526 : InnoDB must use its own internal type info for old tables, so that old ENUMs and SETs still are (incorrectly) seen as char strings; we do not dare to allow InnoDB sometimes to see the type as an integer type for those old tables


sql/ha_innodb.cc:
  Correct the fix of Bug #9526 : InnoDB must use its own internal type info for old tables, so that old ENUMs and SETs still are (incorrectly) seen as char strings; we do not dare to allow InnoDB sometimes to see the type as an integer type for those old tables
parent 9ce74a80
......@@ -2269,8 +2269,9 @@ build_template(
get_field_offset(table, field);
templ->mysql_col_len = (ulint) field->pack_length();
templ->type = get_innobase_type_from_mysql_type(
&templ->is_unsigned, field);
templ->type = index->table->cols[i].type.mtype;
templ->is_unsigned = index->table->cols[i].type.prtype
& DATA_UNSIGNED;
templ->charset = dtype_get_charset_coll_noninline(
index->table->cols[i].type.prtype);
......@@ -2698,8 +2699,9 @@ calc_row_difference(
o_len = field->pack_length();
n_len = field->pack_length();
col_type = get_innobase_type_from_mysql_type(&is_unsigned,
field);
col_type = prebuilt->table->cols[i].type.mtype;
is_unsigned = prebuilt->table->cols[i].type.prtype &
DATA_UNSIGNED;
switch (col_type) {
case DATA_BLOB:
......@@ -2741,8 +2743,7 @@ calc_row_difference(
(mysql_byte*)n_ptr, n_len, col_type,
is_unsigned);
ufield->exp = NULL;
ufield->field_no =
(prebuilt->table->cols + i)->clust_pos;
ufield->field_no = prebuilt->table->cols[i].clust_pos;
n_changed++;
}
}
......
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