.. _version_2.2.1:

=============
Version 2.2.1
=============

Released on 2017/10/23.

.. 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.1.

   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
=========

Changes
-------

- Added cluster checks that warn if some tables need to be recreated so that
  they are compatible with future versions of CrateDB >= 3.0.0.

Fixes
-----

 - Various Admin UI improvements.

 - Fixed an issue that resulted in aliases overriding column names when a
   subselect is used and a column appears in the outer SELECT multiple times,
   without an alias and with alias or with multiple aliases. E.g.::

     SELECT a, a AS newcol FROM (SELECT a FROM t WHERE a > 1)
     SELECT a AS newcol1, a AS newcol2 FROM (SELECT a FROM t WHERE a > 1)

 - Fixed an issue that caused ``INSERT`` statements using a subquery on the
   `sys.shards` system table to fail.

 - Fixed race condition in COPY FROM that could display incorrect row count
   when inserting into table partition that does not exist upfront.

 - Fixed a bug that caused incorrect results to be returned for JOIN queries
   when the table stats indicated that the left table of a join is smaller
   than the right.

 - Fixed passing arguments that contain spaces in the crate shell script.

 - Fixed an issue that caused a table that is not part of the `doc` schema to
   be unavailable/hidden if it gets closed using ``ALTER TABLE``.

 - Fixed an issue where the query circuit breaker would be tripped after
   running several queries due to incorrect memory tracking. Subsequent
   operations would've failed due to the lack of circuit breaker cleanup.
