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

MDEV-18297 How to reset a forgotten root password

After FLUSH PRIVILEGES remember if the connection started under
--skip-grant-tables and keep it all-powerful, not a lowly anonymous.

One could use this connection to reset passwords as needed.

Also fix a crash in SHOW CREATE USER
This commit is contained in:
Sergei Golubchik
2019-02-19 12:58:11 +01:00
parent a94b20a8e0
commit 4386d93500
5 changed files with 62 additions and 40 deletions

View File

@ -2098,16 +2098,13 @@ bool mysql_rm_table(THD *thd,TABLE_LIST *tables, bool if_exists,
}
}
/* We remove statistics for table last, after we have the DDL lock */
if (!thd->bootstrap)
for (table= tables; table; table= table->next_local)
{
for (table= tables; table; table= table->next_local)
{
LEX_CSTRING db_name= table->db;
LEX_CSTRING table_name= table->table_name;
if (table->open_type == OT_BASE_ONLY ||
!thd->find_temporary_table(table))
(void) delete_statistics_for_table(thd, &db_name, &table_name);
}
LEX_CSTRING db_name= table->db;
LEX_CSTRING table_name= table->table_name;
if (table->open_type == OT_BASE_ONLY ||
!thd->find_temporary_table(table))
(void) delete_statistics_for_table(thd, &db_name, &table_name);
}
}