If an InnoDB table has spaces in the column names the cross engine step
would fail. This patch wraps quotes around the table and column names to
support this use case.
If a CrossEngine step has multiple filters the filters were overwriting
each other. This fix stores the filters as a vector and processes them
in a loop.
With 1.1 we have removed libdrizzle and used MariaDB's client library
instead for both CrossEngine and QueryStats. Unfortunately MariaDB 10.2
has two client libraries which have different structs with the same
name. When QueryStats was running inside the ColumnStore plugin this
symbol conflict was causing a crash.
The server's built-in client API has several different and several
missing functions so some additions to sm.cpp were made to fill the
gaps.
This patch does the following:
* Make sure that libmariadb is only linked to executables, not the
ColumnStore Plugin (to avoid symbol conflicts). Note that all
executables that link to CrossEngine and/or QueryStats need to link to
libmariadb to avoid missing symbol issues.
* Use the server's built-in client API for QueryStats when run in the
plugin
* Replace missing server built-in client API calls in sm.cpp (this is
for QueryStats and CrossEngine to keep the dynamic linker happy)
* Fixes issue where using 'localhost' as the MariaDB Server hostname
would fail in QueryStats.
When subqueries and group by are used in CrossEngine the first row group
is either corrupted or ignored. This is related to MCOL-430 which fixed
the case for FE1 mode.
We would get strange values for scale/precision in the results column of
a cross engine join causing bad results. This patch uses the values from
the MariaDB client connector instead.
* TEXT and BLOB now have separate identifiers internally
* TEXT columns are identified as such in system catalog
* cpimport only requires hex input for BLOB, not TEXT
This patch adds enough support so that cross engines joins with blob
columns in the foreign engines will work. The modifications are as
follows:
* Add CrossEngine support for non-NULL-terminated (binary) data
* Add row data support for blobs (similar to varbinary)
* Add engine support for writing out blob data correctly to the storage
engine API
* Re-enable blob support in the engine plugin
This does the following:
* Switch resource manager to a singleton which reduces the amount of
times the XML data is scanned and objects allocated.
* Make the I_S tables use the FE implementation of the system catalog
* Make the I_S.columnstore_columns table use the RID list cache
* Make the extentmap pre-allocate a vector instead of many small allocs
Cross engine was using fRowGroupDelivered for pulling the rows out of
libdrizzle and passing them on to the next step in the job list
simultaneously on different threads. Sometimes this is OK, but with
larger data sets it leads to data corruption and race conditions.
For pulling the rows out of libdrizzle this patch uses a new RowGroup
object instead to avoid the collision.
In addition this patch makes the DrizzleMySQL class a dynamically
allocated object. A first step into potentially using unbuffered row
results for performance and lower RAM usage at a later date.