Browse Source

MDEV-21263: Fix -Wclass-memaccess

Since commit f52bf92014 the type
Sql_sort is non-trivial, because it includes a data member
Bounds_checked_array<SORT_FIELD> local_sortorder.
There still is no vtable, so memset() is safe to invoke, but
we must add a cast to silence a warning in GCC 8 or later.
pull/1439/head
Marko Mäkelä 6 years ago
parent
commit
6f2ca4eac1
  1. 2
      sql/sql_sort.h

2
sql/sql_sort.h

@ -300,7 +300,7 @@ public:
Sort_param()
{
memset(this, 0, sizeof(*this));
memset(reinterpret_cast<void*>(this), 0, sizeof(*this));
}
void init_for_filesort(uint sortlen, TABLE *table,
ha_rows maxrows, bool sort_positions);

Loading…
Cancel
Save