Skip to content

Commit c0fe0cc

Browse files
committed
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)
1 parent 7bdc024 commit c0fe0cc

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

sql/field.cc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2569,9 +2569,7 @@ Field *Field::make_new_field(MEM_ROOT *root, TABLE *new_table,
25692569
*/
25702570
tmp->unireg_check= Field::NONE;
25712571
tmp->flags&= (NOT_NULL_FLAG | BLOB_FLAG | UNSIGNED_FLAG |
2572-
ZEROFILL_FLAG | BINARY_FLAG | ENUM_FLAG | SET_FLAG |
2573-
VERS_ROW_START | VERS_ROW_END |
2574-
VERS_UPDATE_UNVERSIONED_FLAG);
2572+
ZEROFILL_FLAG | BINARY_FLAG | ENUM_FLAG | SET_FLAG);
25752573
tmp->reset_fields();
25762574
tmp->invisible= VISIBLE;
25772575
return tmp;

sql/sql_class.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5577,6 +5577,7 @@ class THD: public THD_count, /* this must be first */
55775577

55785578
bool vers_insert_history_fast(const TABLE *table)
55795579
{
5580+
DBUG_ASSERT(table->versioned());
55805581
return table->versioned(VERS_TIMESTAMP) &&
55815582
(variables.option_bits & OPTION_INSERT_HISTORY) &&
55825583
lex->duplicates == DUP_ERROR;

0 commit comments

Comments
 (0)