Skip to content
Permalink
Browse files
Use the accessor HA_CREATE_INFO::tmp_table()
  • Loading branch information
dr-m committed Dec 31, 2018
1 parent 3bdd93c commit 17b73fb
Showing 1 changed file with 7 additions and 11 deletions.
@@ -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,
@@ -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);

@@ -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] == '\\')) {
@@ -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),
@@ -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. */

0 comments on commit 17b73fb

Please sign in to comment.