summaryrefslogtreecommitdiff
path: root/base/stats/mysql.cc
diff options
context:
space:
mode:
Diffstat (limited to 'base/stats/mysql.cc')
-rw-r--r--base/stats/mysql.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/base/stats/mysql.cc b/base/stats/mysql.cc
index 05808c211..77366beb0 100644
--- a/base/stats/mysql.cc
+++ b/base/stats/mysql.cc
@@ -134,6 +134,16 @@ MySqlRun::cleanup()
"FROM bins "
"LEFT JOIN data ON bn_id=dt_bin "
"WHERE dt_bin IS NULL");
+
+ mysql.query("DELETE events"
+ "FROM events"
+ "LEFT JOIN runs ON ev_run=rn_id"
+ "WHERE rn_id IS NULL");
+
+ mysql.query("DELETE event_names"
+ "FROM event_names"
+ "LEFT JOIN events ON en_id=ev_event"
+ "WHERE ev_event IS NULL");
}
void