From 17b73fb95445d043e90026924c1eb38e4654e46b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Mon, 31 Dec 2018 21:08:27 +0200 Subject: [PATCH] Use the accessor HA_CREATE_INFO::tmp_table() --- storage/innobase/handler/ha_innodb.cc | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index c4fafe142e5..b3ac1d43ade 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -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(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. */