Skip to content

Commit

Permalink
SQL: removed CLI option --versioning-asof-timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
midenok committed Nov 13, 2017
1 parent 0d3b8ed commit b76787b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 30 deletions.
23 changes: 0 additions & 23 deletions sql/mysqld.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9450,29 +9450,6 @@ mysqld_get_one_option(int optid, const struct my_option *opt, char *argument)
WSREP_SYNC_WAIT_BEFORE_READ);
break;
#endif /* WITH_WSREP */
case OPT_VERS_ASOF_TIMESTAMP:
int type= find_type(argument, opt->typelib, FIND_TYPE_BASIC);
st_vers_asof_timestamp &out= global_system_variables.vers_asof_timestamp;
if (type)
{
out.type= type - 1;
DBUG_ASSERT(out.type < FOR_SYSTEM_TIME_AS_OF);
}
else
{
out.type= FOR_SYSTEM_TIME_AS_OF;
MYSQL_TIME_STATUS status;
bool err= str_to_datetime(argument, strlen(argument), &out.ltime, 0, &status);
if (err || (status.warnings & ~MYSQL_TIME_NOTE_TRUNCATED))
{
sql_print_error("Can't start server: "
"cannot process --%s=%.*s",
opt->name,
FN_REFLEN, argument);
return 1;
}
}
break;
}
return 0;
}
Expand Down
7 changes: 1 addition & 6 deletions sql/mysqld.h
Original file line number Diff line number Diff line change
Expand Up @@ -193,15 +193,11 @@ enum vers_range_type_t

struct st_vers_asof_timestamp
{
const char *getopt_value;
ulong type;
MYSQL_TIME ltime;
st_vers_asof_timestamp() :
getopt_value(NULL),
type(FOR_SYSTEM_TIME_UNSPECIFIED)
{
DBUG_ASSERT((void *)this == &this->getopt_value);
}
{}
};

enum vers_hide_enum
Expand Down Expand Up @@ -701,7 +697,6 @@ enum options_mysqld
OPT_SSL_KEY,
OPT_THREAD_CONCURRENCY,
OPT_WANT_CORE,
OPT_VERS_ASOF_TIMESTAMP,
#ifdef WITH_WSREP
OPT_WSREP_CAUSAL_READS,
OPT_WSREP_SYNC_WAIT,
Expand Down
2 changes: 1 addition & 1 deletion sql/sys_vars.cc
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ static Sys_var_charptr Sys_my_bind_addr(
const char *Sys_var_vers_asof::asof_keywords[]= {"CURRENT", "ALL", NULL};
static Sys_var_vers_asof Sys_vers_asof_timestamp(
"versioning_asof_timestamp", "Default AS OF value for versioned queries",
SESSION_VAR(vers_asof_timestamp.getopt_value), CMD_LINE(REQUIRED_ARG, OPT_VERS_ASOF_TIMESTAMP),
SESSION_VAR(vers_asof_timestamp.type), NO_CMD_LINE,
Sys_var_vers_asof::asof_keywords, DEFAULT(FOR_SYSTEM_TIME_UNSPECIFIED));

static Sys_var_mybool Sys_vers_force(
Expand Down

0 comments on commit b76787b

Please sign in to comment.