June 4, 2018
This release includes general usability enhancements and bug fixes as well as:
- Easier data migrations from MySQL: The
IMPORT
feature now supports a subset of MySQL export formats. We will continue to make migrations easier in the alphas leading up to 2.1.
Please give this feature and the ones below a try. If you see something that can be improved, we’d love to hear from you on GitHub or the Forum.
Get future release notes emailed to you:
Downloads
General Changes
- New clusters and existing clusters upgraded to this version of CockroachDB will include two new empty databases,
defaultdb
andpostgres
. Thedefaultdb
database is automatically used for clients that connect without a current database set (e.g., without a database component in the connection URL). Thepostgres
database is provided for compatibility with PostgreSQL client frameworks that require it to exist when the database server has been freshly installed. Both new databases behave like any other regular database and, if deemed unnecessary, can be manually deleted. #24735 - The new
compactor.threshold_bytes
andmax_record_age
cluster settings can be used to configure the compactor. #25397 - After upgrading a cluster from v2.0 to v2.1, it is no longer necessary to manually finalize the upgrade. #24987
SQL Language Changes
- Collated strings can now be used in
WHERE
clauses on indexed columns. #25169 - The new
CANCEL QUERIES
andCANCEL SESSIONS
variants of theCANCEL QUERY
andCANCEL SESSION
statements cancel multiple queries or sessions at once. Likewise, the newCANCEL/PAUSE/RESUME JOBS
variants of theCANCEL JOB
,PAUSE JOB
, andRESUME JOB
statements operate on multiple jobs at once. #25157 - The
Level
andType
columns ofEXPLAIN (VERBOSE)
results are now hidden; if they are needed, they can beSELECT
ed explicitly. #25172 - All users now automatically belong to the new
public
role. This role makes it possible to grant privileges on an object for all users at once, e.g.,GRANT SELECT ON mytable TO public;
. #25099 - The binary Postgres wire format is now supported for
INTERVAL
values. #25242 - Prevented
DROP TABLE
from using too much CPU. #24983 - Improved
SET TRACING
so that a client can more easily trace around a statement that produce errors. #25262 - Added the
generate_subscripts()
built-in function. #25295 - Improved the documentation of the
now()
,current_time()
,current_date()
,current_timestamp()
,clock_timestamp()
,statement_timestamp()
, andcluster_logical_timestamp()
built-in functions. #25327 - Running
TRUNCATE
withoutCASCADE
on a table that has interleaved table children now returns an error instead of proceeding to delete both tables. #25265 - Tuples can now be labeled using the new grammar
((1,2,3) AS a,b,c)
. #25283 - Labeled tuples can now be accessed using their labels, but doing so requires an extra level of parentheses, e.g.,
SELECT (((1,'2',true) AS a, b, c)).a
. #25810 SHOW TRACE FOR <stmt>
now runs<stmt>
through the DistSQL execution engine, if supported.SHOW KV TRACE FOR <stmt>
still runs<stmt>
through local SQL. #24709- Introduced two experimental scalar operators,
IFERROR()
andISERROR()
. They may be documented for public use in the future. #25304 - The
server.time_until_store_dead
cluster setting can no longer be set to less than1m15s
. Setting it to lower values was previously allowed but not safe, since it can cause bad rebalancing behavior. #25598 CANCEL JOB
can now be executed on long-running schema change jobs, causing them to terminate early and roll back. #25571- Added the
array_to_string()
built-in function. #25681 IMPORT
now supports MySQL's tabbedOUTFILE
format. #25615IMPORT
now supportsmysqldump
SQL as a data format. #25783- The experimental lookup join feature now supports secondary indexes. #25628
- Stored, computed columns can now be converted to regular columns by running
ALTER TABLE t ALTER COLUMN c DROP STORED
. #25819 - The experimental lookup join feature now supports left outer joins. #25644
TRUNCATE
commands are now logged in the event log. #25868- Improved
IMPORT
error messages. #26032
Command-Line Changes
- Changing or removing a replication zone config now causes events to be written to the system event log. #25250
- Messages that refer to an invoked command (e.g., "Failed running start") are no longer confused by the presence of flags before the first argument (e.g.,
cockroach --no-color start
). #25246 - Typos in replication zone constraints are now validated. When they are set, required attributes and localities must match at least one node in the cluster. #25421
Admin UI Changes
- Running unit tests for the Admin UI now depends on the installation of Google Chrome. #25140
- Added RocksDB compactions/flushes to Storage graphs. #25428
- Added a Stores report page, including encryption status. #26040
- Removed time selectors and tier labels during Node Map setup. #25280
Bug Fixes
- The
cockroach sql
command once again does not prompt for a password when a certificate is provided. #25252 - Corrected the behavior of
GREATEST
andLEAST
built-ins when they have a leadingNULL
argument. #25882 - CockroachDB now properly reports an error when using the internal-only functions
final_variance()
andfinal_stddev()
instead of causing a crash. #25158 - The
constraint_schema
column ininformation_schema.constraint_column_usage
now displays the constraint's schema instead of its catalog. #25190 BEGIN; RELEASE SAVEPOINT;
now returns and error instead of causing a crash. #25247- Fix a bug where the sessions endpoint on the Admin UI would return an error when there was an active transaction. #25249
- Corrected the CockroachDB-specific, currently undocumented conversion from
INTERVAL
to/from numeric types. #25257 - Fixed problems with
IMPORT
sometimes failing after node decommissioning. #25162 - Prevented queries that use placeholders for tuple types from causing a crash. #25269
- Fixed a rare
segfault
that occurred when reading from an invalid memory location returned from C++. #25347 - Fixed a bug with
IS DISTINCT FROM
not returningNULL
values that pass the condition in some cases. #25336 - Restarting a CockroachDB server on Windows no longer fails due to file system locks in the store directory. #25267
- Prevented the consistency checker from deadlocking. This would previously manifest itself as a steady number of replicas queued for consistency checking on one or more nodes and would resolve by restarting the affected nodes. #25456
- Fixed a crash in some cases when using a
GROUP BY
withHAVING
. #25574 - Fixed a nil pointer dereference when importing data containing date values. #25661
- Numeric literal values no longer silently lose information after a certain precision. #25597
- Prevented spurious
BudgetExceededErrors
for some queries that read a lot ofJSON
data from disk. #25679 - Fixed query errors in some cases involving a
NULL
constant that is cast to a specific type. #25735 - Fixed a crash when trying to plan certain
UNION ALL
queries. #25747 - Fixed a crash caused by inserting data into a table with computed columns that reference other columns not present in the
INSERT
statement. #25682 EXPLAIN (DISTSQL)
now properly reports that plans containing subqueries cannot be run through the DistSQL execution engine. #25618- CockroachDB no longer crashes if the control statements
CANCEL
/PAUSE
/RESUME
are given values using special PostgreSQL types (e.g.,NAME
). #25844 - Fixed a panic when using unordered aggregations. #26042
- Fixed an error caused by
INET
constants in some rare cases. #26086 - Fixed an error caused by empty arrays in some cases. #26090
- Previously, expired compactions could stay in the queue forever. Now, they are removed when they expire. #26039
- Fixed problems using tables with foreign key or interleaved references to other tables when the tables were created in the same transaction. #25786
Doc Updates
- Documented special syntax forms of built-in SQL functions and conditional and function-like operators, and updated the SQL operator order of precedence. #3192
- Added best practices on understanding and avoiding transaction contention and a related FAQ. #3156
- Improved the documentation of
AS OF SYSTEM TIME
. #3155 - Expanded the manual deployment guides to cover running a sample workload against a cluster. #3149
- Documented the
TIMETZ
data type. #3102 - Added FAQs on generating unique, slowly increasing sequential numbers and the differences between
UUID
, sequences, andunique_rowid()
. #3104
Contributors
This release includes 304 merged PRs by 38 authors. We would like to thank the following contributors from the CockroachDB community, with special thanks to first-time contributors Nishant Gupta, wabada, and yuzefovich.
- Garvit Juniwal
- Gustav Paul
- Karan Vaidya
- Nishant Gupta
- Vijay Karthik
- wabada
- Yahor Yuzefovich