MCPcopy Create free account
hub / github.com/MariaDB/server / init_from_sysvar

Method init_from_sysvar

sql/sql_select.cc:977–997  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

975}
976
977bool vers_select_conds_t::init_from_sysvar(THD *thd)
978{
979 vers_asof_timestamp_t &in= thd->variables.vers_asof_timestamp;
980 type= (vers_system_time_t) in.type;
981 delete_history= false;
982 start.unit= VERS_TIMESTAMP;
983 if (type != SYSTEM_TIME_UNSPECIFIED && type != SYSTEM_TIME_ALL)
984 {
985 DBUG_ASSERT(type == SYSTEM_TIME_AS_OF);
986 Datetime dt(in.unix_time, in.second_part, thd->variables.time_zone);
987
988 start.item= new (thd->mem_root)
989 Item_datetime_literal(thd, &dt, TIME_SECOND_PART_DIGITS);
990 if (!start.item)
991 return true;
992 }
993 else
994 start.item= NULL;
995 end.empty();
996 return false;
997}
998
999void vers_select_conds_t::print(String *str, enum_query_type query_type) const
1000{

Callers 1

vers_setup_condsMethod · 0.80

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected