.. _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: http://crate.io/docs/crate/guide/best_practices/rolling_upgrade.html
.. _full restart upgrade: http://crate.io/docs/crate/guide/best_practices/full_restart_upgrade.html
.. _back up your data: https://crate.io/a/backing-up-and-restoring-crate/

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 evaluation of JavaScript 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
  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.
