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

Give asserts if update_stats() fails.

This is done to help find where the error is if stat_tables_par.test fails
This commit is contained in:
Monty
2017-09-05 16:27:51 +03:00
parent 0eef1735b6
commit 4cb1a4fe7d

View File

@ -666,16 +666,22 @@ public:
{ {
if (find_stat()) if (find_stat())
{ {
bool res;
store_record_for_update(); store_record_for_update();
store_stat_fields(); store_stat_fields();
return update_record(); res= update_record();
DBUG_ASSERT(res == 0);
return res;
} }
else else
{ {
int err; int err;
store_stat_fields(); store_stat_fields();
if ((err= stat_file->ha_write_row(record[0]))) if ((err= stat_file->ha_write_row(record[0])))
{
DBUG_ASSERT(0);
return TRUE; return TRUE;
}
/* Make change permanent and avoid 'table is marked as crashed' errors */ /* Make change permanent and avoid 'table is marked as crashed' errors */
stat_file->extra(HA_EXTRA_FLUSH); stat_file->extra(HA_EXTRA_FLUSH);
} }