1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Merge 10.6 into 10.7

This commit is contained in:
Marko Mäkelä
2021-08-19 13:03:48 +03:00
98 changed files with 1887 additions and 578 deletions

View File

@ -4786,6 +4786,19 @@ extern "C" const char *thd_priv_host(MYSQL_THD thd, size_t *length)
}
extern "C" const char *thd_priv_user(MYSQL_THD thd, size_t *length)
{
const Security_context *sctx= thd->security_ctx;
if (!sctx)
{
*length= 0;
return NULL;
}
*length= strlen(sctx->priv_user);
return sctx->priv_user;
}
#ifdef INNODB_COMPATIBILITY_HOOKS
/** open a table and add it to thd->open_tables
@ -5445,8 +5458,8 @@ extern "C" bool thd_is_strict_mode(const MYSQL_THD thd)
*/
void thd_get_query_start_data(THD *thd, char *buf)
{
LEX_CSTRING field_name;
Field_timestampf f((uchar *)buf, NULL, 0, Field::NONE, &field_name, NULL, 6);
Field_timestampf f((uchar *)buf, nullptr, 0, Field::NONE, &empty_clex_str,
nullptr, 6);
f.store_TIME(thd->query_start(), thd->query_start_sec_part());
}