diff options
author | heikki@hundin.mysql.fi <> | 2005-03-16 14:28:54 +0200 |
---|---|---|
committer | heikki@hundin.mysql.fi <> | 2005-03-16 14:28:54 +0200 |
commit | cb88409e07fb951515ddbe9b61f7ae9142271160 (patch) | |
tree | b63b8324e33c17a2ebdeadff74cc03b5045e204e /sql/ha_innodb.cc | |
parent | 5fe0884f5e202991fad546440fbb776a89ee4a52 (diff) | |
download | mariadb-git-cb88409e07fb951515ddbe9b61f7ae9142271160.tar.gz |
data0type.h, row0sel.c:
Fix a crash in a simple search with a key: the dtype->len of a true VARCHAR is the payload maximum len in bytes: it does not include the 2 bytes MySQL uses to store the string length
ha_innodb.cc:
Fix a crash in true VARCHARs in test-innodb: we passed a wrong pointer to the column conversion in an UPDATE
rowid_order_innodb.result, ps_3innodb.result, innodb.result, endspace.result:
Edit InnoDB test results to reflect the arrival of true VARCHARs
Diffstat (limited to 'sql/ha_innodb.cc')
-rw-r--r-- | sql/ha_innodb.cc | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc index 537908f3472..f33931c6645 100644 --- a/sql/ha_innodb.cc +++ b/sql/ha_innodb.cc @@ -2920,6 +2920,7 @@ calc_row_difference( ulint o_len; ulint n_len; ulint col_pack_len; + byte* new_mysql_row_col; byte* o_ptr; byte* n_ptr; byte* buf; @@ -2948,10 +2949,17 @@ calc_row_difference( o_ptr = (byte*) old_row + get_field_offset(table, field); n_ptr = (byte*) new_row + get_field_offset(table, field); + /* Use new_mysql_row_col and col_pack_len save the values */ + + new_mysql_row_col = n_ptr; col_pack_len = field->pack_length(); + o_len = col_pack_len; n_len = col_pack_len; + /* We use o_ptr and n_ptr to dig up the actual data for + comparison. */ + field_mysql_type = field->type(); col_type = get_innobase_type_from_mysql_type(field); @@ -3017,15 +3025,11 @@ calc_row_difference( &dfield, (byte*)buf, TRUE, - n_ptr, + new_mysql_row_col, col_pack_len, prebuilt->table->comp); - ufield->new_val.data = - dfield_get_data_noninline( - &dfield); - ufield->new_val.len = - dfield_get_len_noninline( - &dfield); + ufield->new_val.data = dfield.data; + ufield->new_val.len = dfield.len; } else { ufield->new_val.data = NULL; ufield->new_val.len = UNIV_SQL_NULL; |