diff --git a/sql/item_sum.cc b/sql/item_sum.cc
index 087c1235b76f1868a51a7fd1284192ab06674b82..2dadf8b88357627f18bc0bd317275c32be8da04c 100644
--- a/sql/item_sum.cc
+++ b/sql/item_sum.cc
@@ -3311,18 +3311,6 @@ void Item_func_group_concat::cleanup()
     DBUG_ASSERT(tree == 0);
   }
 
-  /*
-    For prepared statements we have to restore pointers for ORDER BY as
-    they may point to areas that are freed at cleanup().
-  */
-  if (!current_thd->stmt_arena->is_conventional() && arg_count_order)
-  {
-    memcpy(args + arg_count_field, orig_args + arg_count_field,
-           sizeof(Item*) * arg_count_order);
-
-    for (uint i= 0 ; i < arg_count_order ; i++)
-      order[i]->item = args + arg_count_field + i;
-  }
   DBUG_VOID_RETURN;
 }