diff options
author | Rich Prohaska <prohaska@tokutek.com> | 2014-10-25 16:16:23 -0400 |
---|---|---|
committer | Rich Prohaska <prohaska@tokutek.com> | 2014-10-25 16:16:23 -0400 |
commit | 4c57196e02249f8c723d35c0894725de2a92f640 (patch) | |
tree | 882fc7883ea8c742e8866e53f3c2844d91c2360c /storage | |
parent | 57f2f606f0f5d022cdc7ab39a81db5cbce7b0ef5 (diff) | |
download | mariadb-git-4c57196e02249f8c723d35c0894725de2a92f640.tar.gz |
DB-747 merge mariadb 10 frm hack and dont compile row format compression code
Diffstat (limited to 'storage')
-rw-r--r-- | storage/tokudb/ha_tokudb.cc | 14 | ||||
-rw-r--r-- | storage/tokudb/ha_tokudb.h | 4 |
2 files changed, 14 insertions, 4 deletions
diff --git a/storage/tokudb/ha_tokudb.cc b/storage/tokudb/ha_tokudb.cc index e848410afba..f993fe84135 100644 --- a/storage/tokudb/ha_tokudb.cc +++ b/storage/tokudb/ha_tokudb.cc @@ -6368,10 +6368,12 @@ static toku_compression_method get_compression_method(DB *file) { return method; } +#if TOKU_INCLUDE_ROW_TYPE_COMPRESSION enum row_type ha_tokudb::get_row_type(void) const { toku_compression_method compression_method = get_compression_method(share->file); return toku_compression_method_to_row_type(compression_method); } +#endif static int create_sub_table( const char *table_name, @@ -6447,16 +6449,16 @@ void ha_tokudb::update_create_info(HA_CREATE_INFO* create_info) { create_info->auto_increment_value = stats.auto_increment_value; } } +#if TOKU_INCLUDE_ROW_TYPE_COMPRESSION if (!(create_info->used_fields & HA_CREATE_USED_ROW_FORMAT)) { // show create table asks us to update this create_info, this makes it // so we'll always show what compression type we're using create_info->row_type = get_row_type(); -#if TOKU_INCLUDE_ROW_TYPE_COMPRESSION if (create_info->row_type == ROW_TYPE_TOKU_ZLIB && THDVAR(ha_thd(), hide_default_row_format) != 0) { create_info->row_type = ROW_TYPE_DEFAULT; } -#endif } +#endif } // @@ -6781,6 +6783,14 @@ int ha_tokudb::create(const char *name, TABLE * form, HA_CREATE_INFO * create_in memset(&kc_info, 0, sizeof(kc_info)); +#if 100000 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 100999 + // TokuDB does not support discover_table_names() and writes no files + // in the database directory, so automatic filename-based + // discover_table_names() doesn't work either. So, it must force .frm + // file to disk. + form->s->write_frm_image(); +#endif + #if TOKU_INCLUDE_OPTION_STRUCTS const srv_row_format_t row_format = (srv_row_format_t) form->s->option_struct->row_format; #else diff --git a/storage/tokudb/ha_tokudb.h b/storage/tokudb/ha_tokudb.h index cdbadce6b67..ba9c5e0d8ba 100644 --- a/storage/tokudb/ha_tokudb.h +++ b/storage/tokudb/ha_tokudb.h @@ -756,9 +756,9 @@ public: uchar* buf, DBT* key_to_compare ); - +#if TOKU_INCLUDE_ROW_TYPE_COMPRESSION enum row_type get_row_type() const; - +#endif private: int read_full_row(uchar * buf); int __close(); |