.. _version_2.2.6:

=============
Version 2.2.6
=============

Released on 2018/01/17.

.. NOTE::

    If you are upgrading a cluster, you must be running CrateDB
    :ref:`version_1.1.3` or higher before you upgrade to 2.2.6.

    If you want to perform a `rolling upgrade`_, your current CrateDB version
    number must be :ref:`version_2.2.0`.  If you want to upgrade from a version
    prior to this, the upgrade will introduce all of the breaking changes
    listed for :ref:`version_2.2.0`, and will require a `full restart
    upgrade`_.

.. WARNING::

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

.. _rolling upgrade: https://crate.io/docs/crate/howtos/en/latest/admin/rolling-upgrade.html
.. _full restart upgrade: https://crate.io/docs/crate/howtos/en/latest/admin/full-restart-upgrade.html
.. _back up your data: https://crate.io/docs/crate/reference/en/latest/admin/snapshots.html

.. rubric:: Table of contents

.. contents::
   :local:


Changelog
=========


Fixes
-----

- Fixed a race condition that caused ``DELETE`` or ``UPDATE`` statements to
  result in an error if a shard was being relocated or in a ``RECOVERY`` state.

- Improved error message when using the ``DISTINCT`` clause on unsupported data
  types. Also improved documentation to note the data type restriction.

- Fix log verbosity by only logging the HTTP SSL enabled/disabled message once
  at startup.

- Fixed an issue that could cause ``INSERT INTO`` statements into partitioned
  tables to not work correctly. This only occurred if a ``query`` instead of
  the ``VALUES`` clause was used.

- Fixed the :ref:`evaluation <gloss-evaluation>` of JavaScript
  :ref:`user-defined functions <user-defined-functions>` that caused CrateDB to
  crash because of an unhandled assertion when providing the UDF with
  EcmaScript 6 arrow function syntax (``var f = (x) => x;``).

- Fixed an issue where batch operations executed using the PosgreSQL wire
  protocol returned 0 as row count, even though the actual row count was
  different.

- Fixed a bug which could cause job entries in ``sys.jobs`` not being removed
  when a connection error occurred while sending the results of the job
  execution to the client.

- Fixed an issue that caused incorrect results for queries with joins on more
  than 2 tables with implicit join conditions using the ``ON`` clause and where
  ``LIMIT`` is applied. E.g. ::

     SELECT * from t1
     INNER JOIN t2 on t1.id = t2.id
     INNER JOIN t3 on t3.id = t2.id
     LIMIT 100

- Fixed an issue that could cause an ``ALTER TABLE`` statement to fail with an
  exception on partitioned tables created with CrateDB < 1.2.

- Enforce validation of column constraints for ``INSERT`` statements with a
  :ref:`subquery <gloss-subquery>` as source and in combination with ``ON
  DUPLICATE KEY UPDATE``.

- Fixed an issue that caused an error to be thrown when using ``GROUP BY`` or
  ``DISTINCT`` on a column of type ``IP`` in case there are rows with null
  values for that column.
