What's New in v19.2.0-alpha.20190701

July 1, 2019

Warning:

A denial-of-service (DoS) vulnerability is present in CockroachDB v19.2.0 - v19.2.11 due to a bug in protobuf. This is resolved in CockroachDB v19.2.12 and later releases. When upgrading is not an option, users should audit their network configuration to verify that the CockroachDB HTTP port is not available to untrusted clients. We recommend blocking the HTTP port behind a firewall.

For more information, including other affected versions, see Technical Advisory 58932.

This release contains enhancements and bug fixes to the 19.2.0 series, including:

  • Experimental support for using IMPORT INTO to ingest CSV data into an existing table. Usage: IMPORT INTO t(a, b) CSV DATA ('gs://acme-co/employees.csv').
  • Adding non-null constraints to existing columns with ALTER TABLE ... SET NOT NULL.
  • Various updates to improve Postgres compatibility.

For more information, see below.

Get future release notes emailed to you:

Downloads

Docker image

icon/buttons/copy
$ docker pull cockroachdb/cockroach-unstable:v19.2.0-alpha.20190701

Backward-incompatible changes

  • Integer and float columns of less than the max width will now be returned as their own type via the binary protocol. For example, an int4 column will be returned in 32 bits over the pgwire binary protocol instead of 64 bits. #37295

General changes

  • Removed kv.range_merge.manual_split_ttl cluster setting. #38004
  • Go 1.12.5 is now required to build CockroachDB from source.

SQL language changes

  • Added experimental support for using IMPORT INTO to ingest CSV data into an existing table. Usage: IMPORT INTO t(a, b) CSV DATA ('gs://acme-co/employees.csv'). #37451
  • Implemented SQL support for timestamp objects to have an optional precision value. #37920
  • The logging format for statement execution (as enabled by sql.trace.log_statement_execute) and audit logs (as enabled by ALTER TABLE .. EXPERIMENTAL AUDIT SET ...) is extended with one column that reports internal execution retries performed automatically by the server. The value zero is logged for the first retry attempt and thus corresponds to statements directly received from a client. #38028
  • Added WITH EXPIRATION option for SPLIT AT. #38004
  • The DISTINCT keyword is now rejected when used in a window function. It was previously accepted, but ignored. #37912
  • Added UNSPLIT ALL statement. #38023
  • The relam column of the pg_catalog tables pg_class and pg_index is now filled in correctly. #38164
  • CockroachDB now supports the special case set timezone = 'utc' as a special alias for set timezone = 'UTC'. The other time zone names are still case-sensitive as previously, pending resolution of issue #36864. #38195
  • Added support for ALTER TABLE ... ALTER COLUMN ... SET NOT NULL, which adds a non-null constraint to an existing column. #37554
  • pg_get_constraintdef now outputs CHECK constraints exactly the same way that Postgres does. #38318
  • The format_type Postgres builtin now properly respects its second argument. #38318
  • SHOW CREATE TABLE now prints foreign keys more like Postgres does. #38318
  • The pg_type_is_visible builtin from Postgres is now implemented. #38318
  • Casting an int2vector to a string now produces a Postgres-compatible result. #38318

Command-line changes

  • CockroachDB will now print out an error message and an informative hint if the time zone database is unusable. #38197

Admin UI changes

Bug fixes

  • Fixed help text that erroneously labeled Encryption at Rest as experimental. #38228
  • The max_retries column in the statement statistics now properly displays the maximum number of times a statement was retried. #38028
  • Previously, due to a bug when estimating result set sizes in the optimizer, queries involving int ranges that were very large could result in poor plans being generated. #38036
  • Fixed a bug where MVCC value at future timestamp is returned after a transaction restart. #38085
  • The YCSB workload will no longer ignore the --db option. #38236
  • Localities in the crdb_internal tables were displayed JSON objects instead of strings. This format stripped them of their order, which is important in localities. This string format now exactly matches what is used in the command line for setting localities. #37944
  • Fixed an incorrect type mismatch error when empty array values are used as default values (and potentially in other contexts). #38294
  • Fixed a panic that could occur when decoding decimals as query parameters. #38304
  • Nulls are now correctly handled by MIN, SUM, and AVG aggregate functions when used as window functions. #38110
  • Prevented a possible panic during JSONB binary query parameter parsing. #38346
  • Prevented a possible panic during INET binary query parameter parsing. #38346
  • Prevented a possible panic during VARBIT binary query parameter parsing. #38346
  • Prevented a possible panic during array binary query parameter parsing. #38346
  • Fixed possible deadlock when storage engine write fails. #38170
  • Fixed potential reappearance of deleted timeseries data, which could trip consistency checker. #38170
  • Removed dependency on sync_file_range on Linux platforms on which it returns ENOSYS, such as WSL (Windows Subsystem for Linux). #38170

Build changes

  • A recent libedit is now bundled with CockroachDB, which fixes some line editing bugs in the CockroachDB console. On platforms that include libedit as part of the base system, like macOS and FreeBSD, CockroachDB no longer links against the system libedit. #32623

Security

  • Only check CN on first certificate in file. #38163

Contributors

This release includes 125 merged PRs by 30 authors. We would like to thank the following contributors from the CockroachDB community:

  • Utkarsh Gupta (first-time contributor)

Yes No

Yes No