summaryrefslogtreecommitdiff
path: root/storage/xtradb/row/row0sel.cc
diff options
context:
space:
mode:
authorVicențiu Ciorbaru <vicentiu@mariadb.org>2017-09-19 11:37:50 +0300
committerVicențiu Ciorbaru <vicentiu@mariadb.org>2017-09-19 11:46:38 +0300
commitdab6f56098f4bd24dcf1c8a9d9c65a81712f4381 (patch)
tree1079511f5c722b987fc1c2b321ba2e24b44b052c /storage/xtradb/row/row0sel.cc
parentcbd62feee572343d09ae7828537c1ac1d6cdd11d (diff)
downloadmariadb-git-dab6f56098f4bd24dcf1c8a9d9c65a81712f4381.tar.gz
Revert Bug #25175249 ASSERTION: (TEMPL->IS_VIRTUAL && !FIELD) || (FIELD && FIELD->PREFIX_LEN ? FIELD
We don't want this in innodb/xtradb
Diffstat (limited to 'storage/xtradb/row/row0sel.cc')
-rw-r--r--storage/xtradb/row/row0sel.cc23
1 files changed, 3 insertions, 20 deletions
diff --git a/storage/xtradb/row/row0sel.cc b/storage/xtradb/row/row0sel.cc
index 4dbcc315f68..5aeb8f61b46 100644
--- a/storage/xtradb/row/row0sel.cc
+++ b/storage/xtradb/row/row0sel.cc
@@ -2601,7 +2601,6 @@ row_sel_field_store_in_mysql_format_func(
#ifdef UNIV_DEBUG
const dict_field_t* field
= dict_index_get_nth_field(index, field_no);
- bool clust_templ_for_sec = (sec_field != ULINT_UNDEFINED);
#endif /* UNIV_DEBUG */
ut_ad(len != UNIV_SQL_NULL);
@@ -2715,8 +2714,7 @@ row_sel_field_store_in_mysql_format_func(
containing UTF-8 ENUM columns due to Bug #9526. */
ut_ad(!templ->mbmaxlen
|| !(templ->mysql_col_len % templ->mbmaxlen));
- ut_ad(clust_templ_for_sec
- || len * templ->mbmaxlen >= templ->mysql_col_len
+ ut_ad(len * templ->mbmaxlen >= templ->mysql_col_len
|| (field_no == templ->icp_rec_field_no
&& field->prefix_len > 0)
|| templ->rec_field_is_prefix);
@@ -2745,14 +2743,9 @@ row_sel_field_store_in_mysql_format_func(
case DATA_DECIMAL:
/* Above are the valid column types for MySQL data. */
#endif /* UNIV_DEBUG */
- /* If sec_field value is present then mapping of
- secondary index records to clustered index template
- happens for end range comparison. So length can
- vary according to secondary index record length. */
ut_ad(field->prefix_len
? field->prefix_len == len
- : (clust_templ_for_sec ?
- 1 : (templ->mysql_col_len == len)));
+ : (templ->mysql_col_len == len));
memcpy(dest, data, len);
}
}
@@ -2776,8 +2769,6 @@ row_sel_field_store_in_mysql_format_func(
@param[in] field_no templ->rec_field_no or
templ->clust_rec_field_no
or templ->icp_rec_field_no
- or sec field no if clust_templ_for_sec
- is TRUE
@param[in] templ row template
*/
static MY_ATTRIBUTE((warn_unused_result))
@@ -2796,7 +2787,6 @@ row_sel_store_mysql_field_func(
const byte* data;
ulint len;
ulint clust_field_no;
- bool clust_templ_for_sec = (sec_field_no != ULINT_UNDEFINED);
ut_ad(prebuilt->default_rec);
ut_ad(templ);
@@ -2905,11 +2895,6 @@ row_sel_store_mysql_field_func(
mem_heap_dup(prebuilt->blob_heap, data, len));
}
- /* Reassign the clustered index field no. */
- if (clust_templ_for_sec) {
- field_no = clust_field_no;
- }
-
row_sel_field_store_in_mysql_format(
mysql_rec + templ->mysql_col_offset,
templ, index, field_no, data, len);
@@ -2966,7 +2951,6 @@ row_sel_store_mysql_rec(
= rec_clust
? templ->clust_rec_field_no
: templ->rec_field_no;
- ulint sec_field_no = ULINT_UNDEFINED;
/* We should never deliver column prefixes to MySQL,
except for evaluating innobase_index_cond() and if the prefix
@@ -2988,8 +2972,7 @@ row_sel_store_mysql_rec(
NOTE, the record must be cluster index record. Secondary index
might not have the Doc ID */
if (dict_table_has_fts_index(prebuilt->table)
- && dict_index_is_clust(index)
- && !clust_templ_for_sec) {
+ && dict_index_is_clust(index)) {
prebuilt->fts_doc_id = fts_get_doc_id_from_rec(
prebuilt->table, rec, NULL);