.. _version_5.8.3:

=============
Version 5.8.3
=============

Released on 2024-09-17.

.. NOTE::
    If you are upgrading a cluster, you must be running CrateDB 4.0.2 or higher
    before you upgrade to 5.8.3.

    We recommend that you upgrade to the latest 5.7 release before moving to
    5.8.3.

    A rolling upgrade from 5.7.x to 5.8.3 is supported.

    Before upgrading, you should `back up your data`_.

.. WARNING::

    Tables that were created before CrateDB 4.x will not function with 5.x
    and must be recreated before moving to 5.x.x.

    You can recreate tables using ``COPY TO`` and ``COPY FROM`` or by
    `inserting the data into a new table`_.

.. _back up your data: https://crate.io/docs/crate/reference/en/latest/admin/snapshots.html

.. _inserting the data into a new table: https://crate.io/docs/crate/reference/en/latest/admin/system-information.html#tables-need-to-be-recreated

.. rubric:: Table of contents

.. contents::
   :local:

See the :ref:`version_5.8.0` release notes for a full list of changes in the
5.8 series.

Fixes
=====

- Fixed an issue that caused ``WHERE`` clause to wrongly filter out whole
  partitions when :ref:`IS NULL<sql_dql_is_null>` is involved. e.g.::

    CREATE TABLE tbl(a STRING, b STRING) PARTITIONED BY (a);
    SELECT * FROM tbl WHERE ((a='foo') OR (b!='bar')) IS NULL;

- Fixed a race condition that could allow ``INSERT INTO`` statements to write
  values with conflicting types into a table within an ``OBJECT (DYNAMIC)``
  column if the insert needed to create a new sub-column dynamically.

- Fixed an issue that caused ``WHERE`` clause to filter out all rows when the
  clause contained a :ref:`LIKE or ILIKE<sql_dql_like>` operator on a column
  declared with :ref:`INDEX OFF<sql_ddl_index_off>` and the pattern was an empty
  string (``''``).

- Fixed an issue that caused ``WHERE`` clause to fail to filter rows when
  the clause contained casts on null object columns under ``NOT`` operator.
  e.g.::

    CREATE  TABLE  t1(c0 OBJECT NULL);
    INSERT INTO t1(c0) VALUES (NULL);
    SELECT * FROM t1 WHERE NOT (CAST(t1.c0 AS STRING) ='');

- Fixed an issue that could cause errors like ``ClassCastException`` if using
  column aliases in a Subquery that lead to ambiguous column names.

- Fixed an issue which caused
  :ref:`User Defined Functions<user-defined-functions>` with mixed case function
  names (e.g. ``mYfUncTIOn``) to throw errors when used in
  :ref:`generated columns<ddl-generated-columns>`.

- Fixed an issue that caused failure of ``ALTER ROLE`` statements updating or
  resetting password of a user with specified :ref:`JWT <create-user-jwt>`
  properties.

- Fixed an issue that caused filtering by ``LIKE ALL`` on arrays to behave like
  ``LIKE ANY``.
