mirror of
https://github.com/MariaDB/server.git
synced 2026-05-04 06:05:32 +02:00
Fixed bug mdev-4019.
The bug could cause a crash when several connections needed persistent statistics for the same table. Also added a missing call of set_statistics_for_table() in the code of the function mysql_update.
This commit is contained in:
parent
7d9df8075e
commit
7d5c56cb41
7 changed files with 85 additions and 2 deletions
|
|
@ -32,6 +32,7 @@
|
|||
#include "sql_view.h" // check_key_in_view
|
||||
#include "sp_head.h"
|
||||
#include "sql_trigger.h"
|
||||
#include "sql_statistics.h"
|
||||
#include "probes_mysql.h"
|
||||
#include "debug_sync.h"
|
||||
#include "key.h" // is_key_used
|
||||
|
|
@ -404,6 +405,7 @@ int mysql_update(THD *thd,
|
|||
#endif
|
||||
/* Update the table->file->stats.records number */
|
||||
table->file->info(HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK);
|
||||
set_statistics_for_table(thd, table);
|
||||
|
||||
select= make_select(table, 0, 0, conds, 0, &error);
|
||||
if (error || !limit || thd->is_error() ||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue