summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/handler.cc16
-rw-r--r--sql/handler.h3
-rw-r--r--sql/sql_show.cc5
-rw-r--r--sql/table.cc2
-rw-r--r--sql/table.h12
5 files changed, 14 insertions, 24 deletions
diff --git a/sql/handler.cc b/sql/handler.cc
index 5f9e07164b8..9ca1f3a20f8 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -3616,22 +3616,6 @@ void handler::get_dynamic_partition_info(PARTITION_STATS *stat_info,
}
-char* handler::get_tablespace_name(THD *thd, char *buff, uint buff_len)
-{
- char *ts= table->s->tablespace;
- if (!ts)
- return NULL;
-
- if (!buff)
- {
- buff= my_strdup(ts, MYF(0));
- return buff;
- }
-
- strnmov(buff, ts, buff_len);
- return buff;
-}
-
/****************************************************************************
** Some general functions that isn't in the handler class
****************************************************************************/
diff --git a/sql/handler.h b/sql/handler.h
index 8ff6a9f8f03..3cd4acee80d 100644
--- a/sql/handler.h
+++ b/sql/handler.h
@@ -1646,7 +1646,8 @@ public:
{ return FALSE; }
virtual char* get_foreign_key_create_info()
{ return(NULL);} /* gets foreign key create string from InnoDB */
- virtual char* get_tablespace_name(THD *thd, char *name, uint name_len);
+ virtual char* get_tablespace_name(THD *thd, char *name, uint name_len)
+ { return(NULL);} /* gets tablespace name from handler */
/** used in ALTER TABLE; 1 if changing storage engine is allowed */
virtual bool can_switch_engines() { return 1; }
/**
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index c3dda3072f2..a93f06d9409 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -5503,12 +5503,9 @@ static void store_schema_partitions_record(THD *thd, TABLE *schema_table,
strlen(part_elem->tablespace_name), cs);
else
{
- char *ts= showing_table->file->get_tablespace_name(thd,0,0);
+ char *ts= showing_table->s->tablespace;
if(ts)
- {
table->field[24]->store(ts, strlen(ts), cs);
- my_free(ts);
- }
else
table->field[24]->set_null();
}
diff --git a/sql/table.cc b/sql/table.cc
index 7bdfa65d94b..598942d2257 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -1489,7 +1489,7 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head,
const uchar field_flags= format_section_fields[i];
const uchar field_storage= (field_flags & STORAGE_TYPE_MASK);
const uchar field_column_format=
- ((field_flags >> COLUMN_FORMAT_SHIFT)& STORAGE_TYPE_MASK);
+ ((field_flags >> COLUMN_FORMAT_SHIFT)& COLUMN_FORMAT_MASK);
DBUG_PRINT("debug", ("field flags: %u, storage: %u, column_format: %u",
field_flags, field_storage, field_column_format));
(void)field_storage; /* Reserved by and used in MySQL Cluster */
diff --git a/sql/table.h b/sql/table.h
index bd8c66173f4..afdf4f7baa9 100644
--- a/sql/table.h
+++ b/sql/table.h
@@ -609,8 +609,6 @@ struct TABLE_SHARE
}
enum row_type row_type; /* How rows are stored */
enum tmp_table_type tmp_table;
- enum ha_storage_media default_storage_media;
- char *tablespace;
uint ref_count; /* How many TABLE objects uses this */
uint blob_ptr_size; /* 4 or 8 */
@@ -653,6 +651,16 @@ struct TABLE_SHARE
*/
int cached_row_logging_check;
+ /*
+ Storage media to use for this table (unless another storage
+ media has been specified on an individual column - in versions
+ where that is supported)
+ */
+ enum ha_storage_media default_storage_media;
+
+ /* Name of the tablespace used for this table */
+ char *tablespace;
+
#ifdef WITH_PARTITION_STORAGE_ENGINE
/* filled in when reading from frm */
bool auto_partitioned;