mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
MDEV-16760 CREATE OR REPLACE TABLE never updates statistical tables
If the command CREATE OR REPLACE TABLE really replaces a table then it should remove all data on this table from all statistical tables.
This commit is contained in:
@ -4770,6 +4770,10 @@ int create_table_impl(THD *thd,
|
||||
{
|
||||
if (options.or_replace())
|
||||
{
|
||||
LEX_STRING db_name= {(char *) db, strlen(db)};
|
||||
LEX_STRING tab_name= {(char *) table_name, strlen(table_name)};
|
||||
(void) delete_statistics_for_table(thd, &db_name, &tab_name);
|
||||
|
||||
TABLE_LIST table_list;
|
||||
table_list.init_one_table(db, strlen(db), table_name,
|
||||
strlen(table_name), table_name,
|
||||
|
Reference in New Issue
Block a user