mirror of
https://github.com/MariaDB/server.git
synced 2025-08-29 00:08:14 +03:00
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
This commit is contained in:
@@ -2269,8 +2269,9 @@ build_template(
|
|||||||
get_field_offset(table, field);
|
get_field_offset(table, field);
|
||||||
|
|
||||||
templ->mysql_col_len = (ulint) field->pack_length();
|
templ->mysql_col_len = (ulint) field->pack_length();
|
||||||
templ->type = get_innobase_type_from_mysql_type(
|
templ->type = index->table->cols[i].type.mtype;
|
||||||
&templ->is_unsigned, field);
|
templ->is_unsigned = index->table->cols[i].type.prtype
|
||||||
|
& DATA_UNSIGNED;
|
||||||
templ->charset = dtype_get_charset_coll_noninline(
|
templ->charset = dtype_get_charset_coll_noninline(
|
||||||
index->table->cols[i].type.prtype);
|
index->table->cols[i].type.prtype);
|
||||||
|
|
||||||
@@ -2698,8 +2699,9 @@ calc_row_difference(
|
|||||||
o_len = field->pack_length();
|
o_len = field->pack_length();
|
||||||
n_len = field->pack_length();
|
n_len = field->pack_length();
|
||||||
|
|
||||||
col_type = get_innobase_type_from_mysql_type(&is_unsigned,
|
col_type = prebuilt->table->cols[i].type.mtype;
|
||||||
field);
|
is_unsigned = prebuilt->table->cols[i].type.prtype &
|
||||||
|
DATA_UNSIGNED;
|
||||||
switch (col_type) {
|
switch (col_type) {
|
||||||
|
|
||||||
case DATA_BLOB:
|
case DATA_BLOB:
|
||||||
@@ -2741,8 +2743,7 @@ calc_row_difference(
|
|||||||
(mysql_byte*)n_ptr, n_len, col_type,
|
(mysql_byte*)n_ptr, n_len, col_type,
|
||||||
is_unsigned);
|
is_unsigned);
|
||||||
ufield->exp = NULL;
|
ufield->exp = NULL;
|
||||||
ufield->field_no =
|
ufield->field_no = prebuilt->table->cols[i].clust_pos;
|
||||||
(prebuilt->table->cols + i)->clust_pos;
|
|
||||||
n_changed++;
|
n_changed++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user