If a VARCHAR was defined as less than 255 characters and a data via LDI
or INSERT...SELECT was > 127 characters the length field would contain a
negative number.
In 1.0.11 and 1.1.0 this was not a problem because we cast the negative
back again. With MCOL-877 we stoped doing the double-cast. This patch
casts properly the first time.
BLOBs that are longer than half the maximum length of the column would
be turned into a negative length due to signed int casting. This would
cause them to turn into NULL inserts. Unsigned now used.
* 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
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
When a table has 8 columns that could be NULL and a NOT NULL column
after the NULLable columns the check to see if we have gone over the
NULL bitmap byte limit is run prematurely trigging an error.
This patch moves the check to only run when we are looking at NULLable
columns.
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.
When infinidb_use_import_for_batchinsert is enabled the NULL handling
for the batch insert was incorrect. This is due to an off-by-one on the
NULL bitmap. This also affects INSERT...SELECT.
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.