• Alexander Barkov's avatar
    MDEV-23562 Assertion `time_type == MYSQL_TIMESTAMP_DATETIME' failed upon... · 329301d2
    Alexander Barkov authored
    MDEV-23562 Assertion `time_type == MYSQL_TIMESTAMP_DATETIME' failed upon SELECT from versioned table
    
    The code in vers_select_conds_t::init_from_sysvar() assumed that
    the value of the system_versioning_asof is DATETIME.
    But it also could be DATE after a query like this:
      SET system_versioning_asof = DATE(NOW());
    
    Fixing Sys_var_vers_asof::update() to convert the value
    of the assignment source to DATETIME if it returned DATE.
    
    Now vers_select_conds_t::init_from_sysvar() always gets a DATETIME value.
    329301d2
sysvars.test 4.83 KB