diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 64fc72ae96f82e3fca624011666f919c92bf7cc7..29d4315577895e991840a729f8a384ea8fc952d0 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -7489,6 +7489,16 @@ bool mysql_checksum_table(THD *thd, TABLE_LIST *tables,
 	{
 	  for (;;)
 	  {
+            if (thd->killed)
+            {
+              /* 
+                 we've been killed; let handler clean up, and remove the 
+                 partial current row from the recordset (embedded lib) 
+              */
+              t->file->ha_rnd_end();
+              thd->protocol->remove_last_row();
+              goto err;
+            }
 	    ha_checksum row_crc= 0;
             int error= t->file->rnd_next(t->record[0]);
             if (unlikely(error))