Skip to content

Commit

Permalink
Use the accessor HA_CREATE_INFO::tmp_table()
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-m committed Dec 31, 2018
1 parent 3bdd93c commit 17b73fb
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions storage/innobase/handler/ha_innodb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11313,7 +11313,7 @@ create_table_info_t::create_option_data_directory_is_valid()
}

/* Do not use DATA DIRECTORY with TEMPORARY TABLE. */
if (m_create_info->options & HA_LEX_CREATE_TMP_TABLE) {
if (m_create_info->tmp_table()) {
push_warning(
m_thd, Sql_condition::WARN_LEVEL_WARN,
ER_ILLEGAL_HA_CREATE_OPTION,
Expand Down Expand Up @@ -11342,8 +11342,7 @@ create_table_info_t::create_options_are_invalid()

const char* ret = NULL;
enum row_type row_format = m_create_info->row_type;
const bool is_temp
= m_create_info->options & HA_LEX_CREATE_TMP_TABLE;
const bool is_temp = m_create_info->tmp_table();

ut_ad(m_thd != NULL);

Expand Down Expand Up @@ -11709,7 +11708,7 @@ create_table_info_t::parse_table_name(

if (m_innodb_file_per_table
&& !mysqld_embedded
&& !(m_create_info->options & HA_LEX_CREATE_TMP_TABLE)) {
&& !m_create_info->tmp_table()) {

if ((name[1] == ':')
|| (name[0] == '\\' && name[1] == '\\')) {
Expand Down Expand Up @@ -11764,10 +11763,8 @@ bool create_table_info_t::innobase_table_flags()
enum row_type row_type;
rec_format_t innodb_row_format =
get_row_format(m_default_row_format);
const bool is_temp
= m_create_info->options & HA_LEX_CREATE_TMP_TABLE;
bool zip_allowed
= !is_temp;
const bool is_temp = m_create_info->tmp_table();
bool zip_allowed = !is_temp;

const ulint zip_ssize_max =
ut_min(static_cast<ulint>(UNIV_PAGE_SSIZE_MAX),
Expand Down Expand Up @@ -12167,9 +12164,8 @@ create_table_info_t::set_tablespace_type(

/* Ignore the current innodb-file-per-table setting if we are
creating a temporary table. */
m_use_file_per_table =
m_allow_file_per_table
&& !(m_create_info->options & HA_LEX_CREATE_TMP_TABLE);
m_use_file_per_table = m_allow_file_per_table
&& !m_create_info->tmp_table();

/* DATA DIRECTORY must have m_use_file_per_table but cannot be
used with TEMPORARY tables. */
Expand Down

0 comments on commit 17b73fb

Please sign in to comment.