+/**
+ * Execute changes made in WordPress 4.1.4.
+ *
+ * @since 4.1.3
+ */
+function upgrade_414() {
+ global $wp_current_db_version, $wpdb;
+
+ if ( $wp_current_db_version < 30134 ) {
+ $content_length = $wpdb->get_col_length( $wpdb->comments, 'comment_content' );
+ if ( ! $content_length ) {
+ $content_length = 65535;
+ }
+
+ $comments = $wpdb->get_results(
+ "SELECT comment_ID FROM $wpdb->comments
+ WHERE comment_date_gmt > '2015-04-26'
+ AND CHAR_LENGTH( comment_content ) >= $content_length
+ AND ( comment_content LIKE '%<%' OR comment_content LIKE '%>%' )"
+ );
+
+ foreach ( $comments as $comment ) {
+ wp_delete_comment( $comment->comment_ID, true );
+ }
+ }
+}
+