[Commits] Rev 4066: MDEV-5901: EITS: killing the server leaves statistical tables in "marked as crashed" state in file:///home/psergey/dev2/10.0/

Sergey Petrunya psergey at askmonty.org
Wed Mar 19 18:05:56 EET 2014


At file:///home/psergey/dev2/10.0/

------------------------------------------------------------
revno: 4066
revision-id: psergey at askmonty.org-20140319160554-ha2f9mweq1o87j55
parent: jplindst at mariadb.org-20140319152338-cip8h0git7oymoqs
committer: Sergey Petrunya <psergey at askmonty.org>
branch nick: 10.0
timestamp: Wed 2014-03-19 20:05:54 +0400
message:
  MDEV-5901: EITS: killing the server leaves statistical tables in "marked as crashed" state
  - Part#2: call HA_EXTRA_FLUSH for the correct handler object, and call it after every change
    (ha_write_row, ha_update_row, ha_delete_row).
=== modified file 'sql/sql_statistics.cc'
--- a/sql/sql_statistics.cc	2014-03-19 12:32:57 +0000
+++ b/sql/sql_statistics.cc	2014-03-19 16:05:54 +0000
@@ -346,6 +346,8 @@ class Stat_table
     if ((err= stat_file->ha_update_row(record[1], record[0])) &&
          err != HA_ERR_RECORD_IS_THE_SAME)
       return TRUE;
+    /* Make change permanent and avoid 'table is marked as crashed' errors */
+    stat_file->extra(HA_EXTRA_FLUSH);
     return FALSE;
   }
 
@@ -530,7 +532,7 @@ class Stat_table
       if ((err= stat_file->ha_write_row(record[0])))
 	return TRUE;
       /* Make change permanent and avoid 'table is marked as crashed' errors */
-      table->file->extra(HA_EXTRA_FLUSH);
+      stat_file->extra(HA_EXTRA_FLUSH);
     } 
     return FALSE;
   }
@@ -585,6 +587,8 @@ class Stat_table
     int err;
     if ((err= stat_file->ha_delete_row(record[0])))
       return TRUE;
+    /* Make change permanent and avoid 'table is marked as crashed' errors */
+    stat_file->extra(HA_EXTRA_FLUSH);
     return FALSE;
   } 
 };



More information about the commits mailing list