From 2a187a515397d5d3800767a749a398d3ac774550 Mon Sep 17 00:00:00 2001 From: Sergey Vojtovich <svoj@sun.com> Date: Thu, 1 Apr 2010 15:03:27 +0400 Subject: [PATCH] Applying InnoDB snapshot Detailed revision comments: r6285 | marko | 2009-12-09 09:24:50 +0200 (Wed, 09 Dec 2009) | 13 lines branches/zip: row_sel_fetch_columns(): Remove redundant code that was accidentally added in r1591, which introduced dfield_t::ext in order to make the merge sort of fast index creation support externally stored columns, Initially, I tried to allocate the bit for dfield_t::ext from dfield_t::len by making the length 31 bits and mapping UNIV_SQL_NULL to something that would fit in it. Then I decided that it would be too risky. The redundant check was part of the mapping. The condition may have been dfield_is_null() initially. This redundant code was noticed by Sergey Petrunya on the MySQL internals list. r6288 | marko | 2009-12-09 09:51:00 +0200 (Wed, 09 Dec 2009) | 15 lines branches/zip: row_upd_copy_columns(): Remove redundant code that was accidentally added in r1591, which introduced dfield_t::ext in order to make the merge sort of fast index creation support externally stored columns. Initially, I tried to allocate the bit for dfield_t::ext from dfield_t::len by making the length 31 bits and mapping UNIV_SQL_NULL to something that would fit in it. Then I decided that it would be too risky. The redundant check was part of the mapping. The condition may have been dfield_is_null() initially. This is similar to the redundant code in row_sel_fetch_columns() that was noticed by Sergey Petrunya on the MySQL internals list and removed in r6285. As far as I can tell, there are no redundant UNIV_SQL_NULL assignments remaining after this change. --- storage/innodb_plugin/row/row0sel.c | 4 ---- storage/innodb_plugin/row/row0upd.c | 3 --- 2 files changed, 7 deletions(-) diff --git a/storage/innodb_plugin/row/row0sel.c b/storage/innodb_plugin/row/row0sel.c index 3ef9726588e..5f66b9be159 100644 --- a/storage/innodb_plugin/row/row0sel.c +++ b/storage/innodb_plugin/row/row0sel.c @@ -431,10 +431,6 @@ row_sel_fetch_columns( data = rec_get_nth_field(rec, offsets, field_no, &len); - if (len == UNIV_SQL_NULL) { - len = UNIV_SQL_NULL; - } - needs_copy = column->copy_val; } diff --git a/storage/innodb_plugin/row/row0upd.c b/storage/innodb_plugin/row/row0upd.c index 58dfd43ead9..95d1d00aeef 100644 --- a/storage/innodb_plugin/row/row0upd.c +++ b/storage/innodb_plugin/row/row0upd.c @@ -1344,9 +1344,6 @@ row_upd_copy_columns( data = rec_get_nth_field(rec, offsets, column->field_nos[SYM_CLUST_FIELD_NO], &len); - if (len == UNIV_SQL_NULL) { - len = UNIV_SQL_NULL; - } eval_node_copy_and_alloc_val(column, data, len); column = UT_LIST_GET_NEXT(col_var_list, column); -- 2.30.9