Index: ogr/ogrsf_frmts/mysql/ogrmysqlresultlayer.cpp
===================================================================
--- ogr/ogrsf_frmts/mysql/ogrmysqlresultlayer.cpp	(revision 11439)
+++ ogr/ogrsf_frmts/mysql/ogrmysqlresultlayer.cpp	(working copy)
@@ -158,9 +158,12 @@
             oField.SetWidth((int)psMSField->length);
             poDefn->AddFieldDefn( &oField );
             break;
-            
+
+          case FIELD_TYPE_TINY_BLOB:
+          case FIELD_TYPE_MEDIUM_BLOB:
+          case FIELD_TYPE_LONG_BLOB:
           case FIELD_TYPE_BLOB:
-            oField.SetType( OFTString );
+            oField.SetType( OFTBinary );
             oField.SetWidth((int)psMSField->max_length);
             poDefn->AddFieldDefn( &oField );
             break;
Index: ogr/ogrsf_frmts/mysql/ogrmysqltablelayer.cpp
===================================================================
--- ogr/ogrsf_frmts/mysql/ogrmysqltablelayer.cpp	(revision 11439)
+++ ogr/ogrsf_frmts/mysql/ogrmysqltablelayer.cpp	(working copy)
@@ -631,6 +631,7 @@
 /* -------------------------------------------------------------------- */
 /*      Execute the delete.                                             */
 /* -------------------------------------------------------------------- */
+    poDS->InterruptLongResult();
     if( mysql_query(poDS->GetConn(), osCommand.c_str() ) ){   
         poDS->ReportError(  osCommand.c_str() );
         return OGRERR_FAILURE;   
@@ -732,9 +733,6 @@
 
     for( i = 0; i < poFeatureDefn->GetFieldCount(); i++ )
     {
-        const char *pszStrValue = poFeature->GetFieldAsString(i);
-        char *pszNeedToFree = NULL;
-
         if( !poFeature->IsFieldSet( i ) )
             continue;
 
@@ -743,8 +741,11 @@
         else
             bNeedComma = TRUE;
 
+        const char *pszStrValue = poFeature->GetFieldAsString(i);
+
         if( poFeatureDefn->GetFieldDefn(i)->GetType() != OFTInteger
-                 && poFeatureDefn->GetFieldDefn(i)->GetType() != OFTReal )
+                 && poFeatureDefn->GetFieldDefn(i)->GetType() != OFTReal
+                 && poFeatureDefn->GetFieldDefn(i)->GetType() != OFTBinary )
         {
             int         iChar;
 
@@ -776,13 +777,23 @@
 
             osCommand += "'";
         }
+        else if( poFeatureDefn->GetFieldDefn(i)->GetType() == OFTBinary )
+        {
+            int binaryCount = 0;
+            GByte* binaryData = poFeature->GetFieldAsBinary(i, &binaryCount);
+            char* pszHexValue = CPLBinaryToHex( binaryCount, binaryData );
+
+            osCommand += "x'";
+            osCommand += pszHexValue;
+            osCommand += "'";
+
+            CPLFree( pszHexValue );
+        }
         else
         {
             osCommand += pszStrValue;
         }
 
-        if( pszNeedToFree )
-            CPLFree( pszNeedToFree );
     }
 
     osCommand += ")";
@@ -884,6 +895,11 @@
         sprintf( szFieldType, "TIME" );
     }
 
+    else if( oField.GetType() == OFTBinary )
+    {
+        sprintf( szFieldType, "LONGBLOB" );
+    }
+
     else if( oField.GetType() == OFTString )
     {
         if( oField.GetWidth() == 0 || !bPreservePrecision )

