The rowID and therefore HWM for an insert was being calculated based on
the first column. If there are smaller columns in the table these will
insert in the middle of blocks instead of creating new blocks. This means
that we would no longer be crash safe and PrimProc gets very confused until
a cache flush.
We now use the smallest column to calculate the rowID and HWM increment
(as cpimport does).
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.
* 64KB TEXT column had off-by-one length pointer counting
* TEXT I_S/LDI was looping where it shouldn't causing pointer issues
* TEXT data type wasn't fully understood by cpimport
* 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
* DML writes for multi-block dictionary (blob) now works
* PrimProc fixed so that the first block in multi-block is read
correctly
* Performance optimisation (removed string copy into stack) for new
dictionary entries
The end of a cpimport adds a delay which is 1 second multiplied by the
number of PMs. This in-turn is multipled up with the number of
connections/threads causing a long delay when you have several PMs.
The delay is not required as we already have a 20ms delay and we will
re-enter the recv() if there is no data and we are still connected.
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
This patch allows the following syntax to change the current
autoincrement value for the table:
ALTER TABLE table_name COMMENT='autoincrement=value';
Where "value" is the new integer to be used.
I_S.COLUMNSTORE_FILES returned bad filenames and NULL file sizes when
there are multiple nodes in a ColumnStore cluster
It adds an extra message call to the WriteEngine to get the file size
for that file. The I_S function will figure out which WriteEngine to
communicate with and get the file size details from it.
This patch does the following:
* Fix a year storage issue in the datestamp for the columnstore tables
metadata table (note that any previous tables will still have the
incorrect year stored).
* Expose the table creation date in CalpontSystemCatalog::getTables()
* Add an INFORMATION_SCHEMA table listing the tables in ColumnStore
(similar to systable)
* Add an INFORMATION_SCHEMA table listing the columns in ColumnStore
(similar to syscolumn)
* Add an INFORMATION_SCHEMA table listing the extents in ColumnStore
(similar to the editem tool but with additional file information)
* Modifies the build system and scripts to support the new tables
This changes the warning for truncation to the correct MariaDB error
code (1264).
In addition it passes the strict mode up into the DML class to roll back
correctly.
It also sets the abort_on_warning flag for updates as this isn't set on
the rnd_init phase but is needed for strict mode to work.
NULL is now pushed through the MariaDB storage engine plugin down to the
insert processing. A '0000-00-00' date is now a separate value to NULL.
This is more in-line with MariaDB's handling.
Date limit of year 1400 was used due to Boost's limits.
This patch strips out the use of Boost for date handling and sets the
lower limit to year 1000.