Undefined behavior for client metadata requests during prepared insert statements

Details

Detail name Value
Changelog Number 8334
Type Bug
Status Resolved
Affected Versions Exasol 6.1.0, Exasol 6.2.0
Fix Versions Exasol 6.2.1, Exasol 6.1.6
Resolution Date 2019-07-30

Background

To speed up certain operations, Exasol 6.1 introduced limited asynchronous execution of batch INSERT statements. Using this feature, client and server spend less time waiting for each other.

Problem Description

Unfortunately, some clients may perform other actions besides preparing and sending data. If the client sends metadata requests (getTypeInfo(), getColumns(), ...) while the server is still processing the latest data package, undefined behavior occurs.

Possible results

  • The metadata call fails with an unexpected exception
  • Execution of the INSERT statement fails with unexpectedly with
  • a data exception (invalid values)
  • an internal server error regarding snapshot transactions
  • Wrong data might get inserted into the target table

Workaround

Force the driver to send metadata commands as SQL statements instead an internal protocol.
To do so, add the following parameter to the connection string:

JDBC
ODBC
ADO.NET no workaround
Websockets not affected
metadataSQL=1
LEGACYCATALOG=Y

​While this will reduce the speed of metadata commands, it will cause the server to properly wait for the background operations.

Fix

Releases 6.1.6 and 6.2.1 fix the metadata commands to also wait for background processing.