Skip to content

Commit 17b73fb

Browse files
committed
Use the accessor HA_CREATE_INFO::tmp_table()
1 parent 3bdd93c commit 17b73fb

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

storage/innobase/handler/ha_innodb.cc

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11313,7 +11313,7 @@ create_table_info_t::create_option_data_directory_is_valid()
1131311313
}
1131411314

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

1134311343
const char* ret = NULL;
1134411344
enum row_type row_format = m_create_info->row_type;
11345-
const bool is_temp
11346-
= m_create_info->options & HA_LEX_CREATE_TMP_TABLE;
11345+
const bool is_temp = m_create_info->tmp_table();
1134711346

1134811347
ut_ad(m_thd != NULL);
1134911348

@@ -11709,7 +11708,7 @@ create_table_info_t::parse_table_name(
1170911708

1171011709
if (m_innodb_file_per_table
1171111710
&& !mysqld_embedded
11712-
&& !(m_create_info->options & HA_LEX_CREATE_TMP_TABLE)) {
11711+
&& !m_create_info->tmp_table()) {
1171311712

1171411713
if ((name[1] == ':')
1171511714
|| (name[0] == '\\' && name[1] == '\\')) {
@@ -11764,10 +11763,8 @@ bool create_table_info_t::innobase_table_flags()
1176411763
enum row_type row_type;
1176511764
rec_format_t innodb_row_format =
1176611765
get_row_format(m_default_row_format);
11767-
const bool is_temp
11768-
= m_create_info->options & HA_LEX_CREATE_TMP_TABLE;
11769-
bool zip_allowed
11770-
= !is_temp;
11766+
const bool is_temp = m_create_info->tmp_table();
11767+
bool zip_allowed = !is_temp;
1177111768

1177211769
const ulint zip_ssize_max =
1177311770
ut_min(static_cast<ulint>(UNIV_PAGE_SSIZE_MAX),
@@ -12167,9 +12164,8 @@ create_table_info_t::set_tablespace_type(
1216712164

1216812165
/* Ignore the current innodb-file-per-table setting if we are
1216912166
creating a temporary table. */
12170-
m_use_file_per_table =
12171-
m_allow_file_per_table
12172-
&& !(m_create_info->options & HA_LEX_CREATE_TMP_TABLE);
12167+
m_use_file_per_table = m_allow_file_per_table
12168+
&& !m_create_info->tmp_table();
1217312169

1217412170
/* DATA DIRECTORY must have m_use_file_per_table but cannot be
1217512171
used with TEMPORARY tables. */

0 commit comments

Comments
 (0)