summaryrefslogtreecommitdiff
path: root/storage/xtradb/row/row0sel.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2017-01-03 19:32:47 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2017-01-03 19:32:47 +0200
commit80d5d1452a4a6b7bd1627116f2a5a950003fc3cb (patch)
tree15a86eab06593ce0195a18172aac9d093c5a6651 /storage/xtradb/row/row0sel.cc
parent3871477c40efc826805f4c4e35b006c2c233dd26 (diff)
downloadmariadb-git-80d5d1452a4a6b7bd1627116f2a5a950003fc3cb.tar.gz
MDEV-11694 InnoDB tries to create unused table SYS_ZIP_DICTbb-10.0-mdev-11694
MariaDB Server 10.0.28 and 10.1.19 merged code from Percona XtraDB that introduced support for compressed columns. Much but not all of this code was disabled by placing #ifdef HAVE_PERCONA_COMPRESSED_COLUMNS around it. Among the unused but not disabled code is code to access some new system tables related to compressed columns. The creation of these system tables SYS_ZIP_DICT and SYS_ZIP_DICT_COLS would cause a crash in --innodb-read-only mode when upgrading from an earlier version to 10.0.28 or 10.1.19. Let us remove all the dead code related to compressed columns. Users who already upgraded to 10.0.28 and 10.1.19 will have the two above mentioned empty tables in their InnoDB system tablespace. Subsequent versions of MariaDB Server will completely ignore those tables.
Diffstat (limited to 'storage/xtradb/row/row0sel.cc')
-rw-r--r--storage/xtradb/row/row0sel.cc39
1 files changed, 10 insertions, 29 deletions
diff --git a/storage/xtradb/row/row0sel.cc b/storage/xtradb/row/row0sel.cc
index ad1e9e2bf9d..fd23d83e0e5 100644
--- a/storage/xtradb/row/row0sel.cc
+++ b/storage/xtradb/row/row0sel.cc
@@ -2,6 +2,7 @@
Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2008, Google Inc.
+Copyright (c) 2017, MariaDB Corporation.
Portions of this file contain modifications contributed and copyrighted by
Google, Inc. Those modifications are gratefully acknowledged and are described
@@ -2459,8 +2460,7 @@ row_sel_convert_mysql_key_to_innobase(
/* MySQL key value format col */
FALSE,
key_ptr + data_offset, data_len,
- dict_table_is_comp(index->table),
- false, 0, 0 ,0);
+ dict_table_is_comp(index->table));
ut_a(buf <= original_buf + buf_len);
}
@@ -2554,15 +2554,15 @@ row_sel_store_row_id_to_prebuilt(
#ifdef UNIV_DEBUG
/** Convert a non-SQL-NULL field from Innobase format to MySQL format. */
# define row_sel_field_store_in_mysql_format( \
- dest,templ,idx,field,src,len,prebuilt) \
+ dest,templ,idx,field,src,len) \
row_sel_field_store_in_mysql_format_func \
- (dest,templ,idx,field,src,len, prebuilt)
+ (dest,templ,idx,field,src,len)
#else /* UNIV_DEBUG */
/** Convert a non-SQL-NULL field from Innobase format to MySQL format. */
# define row_sel_field_store_in_mysql_format( \
- dest,templ,idx,field,src,len,prebuilt) \
+ dest,templ,idx,field,src,len) \
row_sel_field_store_in_mysql_format_func \
- (dest,templ,src,len, prebuilt)
+ (dest,templ,src,len)
#endif /* UNIV_DEBUG */
/**************************************************************//**
@@ -2592,10 +2592,7 @@ row_sel_field_store_in_mysql_format_func(
templ->icp_rec_field_no */
#endif /* UNIV_DEBUG */
const byte* data, /*!< in: data to store */
- ulint len, /*!< in: length of the data */
- row_prebuilt_t* prebuilt)
- /*!< in: use prebuilt->compress_heap
- only here */
+ ulint len) /*!< in: length of the data */
{
byte* ptr;
#ifdef UNIV_DEBUG
@@ -2639,15 +2636,6 @@ row_sel_field_store_in_mysql_format_func(
field_end = dest + templ->mysql_col_len;
if (templ->mysql_type == DATA_MYSQL_TRUE_VARCHAR) {
- /* If this is a compressed column,
- decompress it first */
- if (templ->compressed)
- data = row_decompress_column(data, &len,
- reinterpret_cast<const byte*>(
- templ->zip_dict_data.str),
- templ->zip_dict_data.length,
- prebuilt);
-
/* This is a >= 5.0.3 type true VARCHAR. Store the
length of the data to the first byte or the first
two bytes of dest. */
@@ -2698,11 +2686,7 @@ row_sel_field_store_in_mysql_format_func(
already copied to the buffer in row_sel_store_mysql_rec */
row_mysql_store_blob_ref(dest, templ->mysql_col_len, data,
- len, templ->compressed,
- reinterpret_cast<const byte*>(
- templ->zip_dict_data.str),
- templ->zip_dict_data.length,
- prebuilt);
+ len);
break;
case DATA_MYSQL:
@@ -2855,7 +2839,7 @@ row_sel_store_mysql_field_func(
row_sel_field_store_in_mysql_format(
mysql_rec + templ->mysql_col_offset,
- templ, index, field_no, data, len, prebuilt);
+ templ, index, field_no, data, len);
if (heap != prebuilt->blob_heap) {
mem_heap_free(heap);
@@ -2905,7 +2889,7 @@ row_sel_store_mysql_field_func(
row_sel_field_store_in_mysql_format(
mysql_rec + templ->mysql_col_offset,
- templ, index, field_no, data, len, prebuilt);
+ templ, index, field_no, data, len);
}
ut_ad(len != UNIV_SQL_NULL);
@@ -2953,9 +2937,6 @@ row_sel_store_mysql_rec(
prebuilt->blob_heap = NULL;
}
- if (UNIV_LIKELY_NULL(prebuilt->compress_heap))
- mem_heap_empty(prebuilt->compress_heap);
-
for (i = 0; i < prebuilt->n_template; i++) {
const mysql_row_templ_t*templ = &prebuilt->mysql_template[i];
const ulint field_no