Index: tests/db.php
===================================================================
--- tests/db.php	(revision 945)
+++ tests/db.php	(working copy)
@@ -78,4 +78,14 @@
 		// Restore locale
 		setlocale( LC_ALL, $current_locale );
 	}
+	
+	/**
+	 * Test that an escaped %%f is not altered
+	 * @ticket 19861
+	 */
+	public function test_double_escaped_placeholders() {
+		global $wpdb;
+		$sql = $wpdb->prepare( "UPDATE test_table SET string_column = '%%f is a float and %%d is an int and %%s is a string'" );
+		$this->assertEquals( "UPDATE test_table SET string_column = '%f is a float and %d is an int and %s is a string'", $sql );
+	}
 }
