Skip to content
Permalink
Browse files
MDEV-17161 TRUNCATE TABLE fails after upgrade from 10.1
  • Loading branch information
dr-m committed Sep 10, 2018
2 parents b02c722 + fc34e4c commit 6b61f1b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
@@ -12220,9 +12220,7 @@ create_table_info_t::gcols_in_fulltext_or_spatial()
/** Prepare to create a new table to an InnoDB database.
@param[in] name Table name
@return error number */
int
create_table_info_t::prepare_create_table(
const char* name)
int create_table_info_t::prepare_create_table(const char* name, bool strict)
{
DBUG_ENTER("prepare_create_table");

@@ -12245,7 +12243,7 @@ create_table_info_t::prepare_create_table(
because InnoDB might actually support the option, but not under
the current conditions. The messages revealing the specific
problems are reported inside this function. */
if (create_options_are_invalid()) {
if (strict && create_options_are_invalid()) {
DBUG_RETURN(HA_WRONG_CREATE_OPTION);
}

@@ -12572,7 +12570,7 @@ ha_innobase::create(
file_per_table, trx);

if ((error = info.initialize())
|| (error = info.prepare_create_table(name))) {
|| (error = info.prepare_create_table(name, !trx))) {
if (trx) {
trx_rollback_for_mysql(trx);
row_mysql_unlock_data_dictionary(trx);
@@ -706,7 +706,7 @@ class create_table_info_t
bool create_option_tablespace_is_valid();

/** Prepare to create a table. */
int prepare_create_table(const char* name);
int prepare_create_table(const char* name, bool strict = true);

void allocate_trx();

0 comments on commit 6b61f1b

Please sign in to comment.