Index: wp-admin/includes/upgrade.php
===================================================================
--- wp-admin/includes/upgrade.php	(revision 47507)
+++ wp-admin/includes/upgrade.php	(working copy)
@@ -2361,6 +2361,39 @@
 }
 
 /**
+ * Drops a table in the database if it does exist.
+ *
+ * This method checks for an existing table and drops it if it exist.
+ * It doesn't rely on MySQL's "IF NOT EXISTS" statement, but chooses
+ * to query all tables first and then run the SQL statement deleting the table.
+ *
+ * @since 5.5.0
+ *
+ * @global wpdb $wpdb WordPress database abstraction object.
+ *
+ * @param string $table_name Database table name to drop.
+ * @return bool If table already doesn't exist or was droped by function.
+ */
+function maybe_drop_table( $table_name ) {
+	global $wpdb;
+
+	$query = $wpdb->prepare( 'SHOW TABLES LIKE %s', $wpdb->esc_like( $table_name ) );
+
+	if !( $wpdb->get_var( $query ) == $table_name ) {
+		return true;
+	}
+
+	// Did find it, so try to drop it.
+	$wpdb->query( 'DROP TABLE ' . $table_name );
+
+	// We cannot directly tell that whether this succeeded!
+	if !( $wpdb->get_var( $query ) == $table_name ) {
+		return true;
+	}
+	return false;
+}
+
+/**
  * Drops a specified index from a table.
  *
  * @since 1.0.1
