Commit c0fe0cce authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-29830 Assertion `table->versioned()' in THD::vers_insert_history_fast

don't set VERS_ROW_START or VERS_ROW_END flags on fields of a temporary
table (as not versioned tables should not have ROW START/ROW END fields)
parent 7bdc024f
......@@ -2569,9 +2569,7 @@ Field *Field::make_new_field(MEM_ROOT *root, TABLE *new_table,
*/
tmp->unireg_check= Field::NONE;
tmp->flags&= (NOT_NULL_FLAG | BLOB_FLAG | UNSIGNED_FLAG |
ZEROFILL_FLAG | BINARY_FLAG | ENUM_FLAG | SET_FLAG |
VERS_ROW_START | VERS_ROW_END |
VERS_UPDATE_UNVERSIONED_FLAG);
ZEROFILL_FLAG | BINARY_FLAG | ENUM_FLAG | SET_FLAG);
tmp->reset_fields();
tmp->invisible= VISIBLE;
return tmp;
......
......@@ -5577,6 +5577,7 @@ class THD: public THD_count, /* this must be first */
bool vers_insert_history_fast(const TABLE *table)
{
DBUG_ASSERT(table->versioned());
return table->versioned(VERS_TIMESTAMP) &&
(variables.option_bits & OPTION_INSERT_HISTORY) &&
lex->duplicates == DUP_ERROR;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment