This commit is contained in:
Yatsishin Ilya 2020-12-24 18:41:37 +03:00
parent 407ca50be2
commit f07df76c59

View File

@ -56,9 +56,9 @@ std::string randomDate()
int32_t year = rng() % 136 + 1970;
int32_t month = rng() % 12 + 1;
int32_t day = rng() % 12 + 1;
char ans[13];
sprintf(ans, "'%04u-%02u-%02u'", year, month, day);
return std::string(ans);
char answer[13];
sprintf(answer, "'%04u-%02u-%02u'", year, month, day);
return std::string(answer);
}
std::string randomDatetime()
@ -69,9 +69,9 @@ std::string randomDatetime()
int32_t hours = rng() % 24;
int32_t minutes = rng() % 60;
int32_t seconds = rng() % 60;
char ans[22];
char answer[22];
sprintf(
ans,
answer,
"'%04u-%02u-%02u %02u:%02u:%02u'",
year,
month,
@ -79,7 +79,7 @@ std::string randomDatetime()
hours,
minutes,
seconds);
return std::string(ans);
return std::string(answer);
}
TableAndColumn get_table_a_column(const std::string & c)
{