This patch is the result of running
run-clang-tidy -fix -header-filter=.* -checks='-*,modernize-use-equals-default' .
Code style changes have been done on top. The result of this change
leads to the following improvements:
1. Binary size reduction.
* For a -DBUILD_CONFIG=mysql_release build, the binary size is reduced by
~400kb.
* A raw -DCMAKE_BUILD_TYPE=Release reduces the binary size by ~1.4kb.
2. Compiler can better understand the intent of the code, thus it leads
to more optimization possibilities. Additionally it enabled detecting
unused variables that had an empty default constructor but not marked
so explicitly.
Particular change required following this patch in sql/opt_range.cc
result_keys, an unused template class Bitmap now correctly issues
unused variable warnings.
Setting Bitmap template class constructor to default allows the compiler
to identify that there are no side-effects when instantiating the class.
Previously the compiler could not issue the warning as it assumed Bitmap
class (being a template) would not be performing a NO-OP for its default
constructor. This prevented the "unused variable warning".
This new CONNECT version 1.07 fully implements NOSQL support.
It allows working on JSON or XML data retrieved as REST query results
from all binary distributions of MariaDB when cpprestsdk is installed
and the GetRest library is available.
=====================================================================
- Make Rest available for MariaDB binary distributed versions.
Change RestGet function so it can be called from a library.
modified: storage/connect/CMakeLists.txt
modified: storage/connect/restget.cpp
modified: storage/connect/tabrest.cpp
- Make column FLAG option available to discovery functions.
modified: storage/connect/ha_connect.cc
modified: storage/connect/plgdbsem.h
- Update CONNECT version number and date.
modified: storage/connect/ha_connect.cc
- Move OEMColumns function from mycat.cc to reldef.cpp.
modified: storage/connect/mycat.cc
modified: storage/connect/reldef.cpp
- Allocate tables as TABREF (was RELDEF)
modified: storage/connect/mycat.cc
modified: storage/connect/mycat.h
- Fix MDEV-20845 by commenting out TIMEOUT setting.
modified: storage/connect/myconn.cpp
- Call DefineAM before calling GetColCatInfo. Column offset
is now based on record format instead of table type.
The RECFM_VCT format was added.
This enables tables to specify the record format and is
useful in particular for OEM tables.
modified: storage/connect/plgdbsem.h
modified: storage/connect/reldef.cpp
modified: storage/connect/reldef.h
modified: storage/connect/tabdos.cpp
modified: storage/connect/tabdos.h
modified: storage/connect/tabfix.cpp
modified: storage/connect/tabfmt.cpp
modified: storage/connect/tabmysql.cpp
modified: storage/connect/tabutil.cpp
modified: storage/connect/tabutil.h
modified: storage/connect/tabvct.cpp
modified: storage/connect/xindex.cpp
Was because of buffer overrun in XCLCOL::ReadColumn.
The Cbuf buffer was unconditionally filled Now it is limited to its size.
This happened because this buffer was allocated according to the XCOL
column size. It is now allocated according to the source column size.
modified:
storage/connect/plgdbsem.h
storage/connect/tabutil.h
storage/connect/tabxcl.cpp
storage/connect/tabxcl.h
have been created by the last addition of new CONNECT features.
The version previous to this one is a preliminary test version and
should not be distributed.
- Handle indexed UPDATE/DELETE. Previously this was just tested and
an error message send when it could not be done. Now CONNECT can
do it in all the cases. It is done by a MRR like tchnique by making
a list of all update or delete to do, sort them, then execute them.
modified:
storage/connect/array.cpp
storage/connect/array.h
storage/connect/filamap.cpp
storage/connect/filamap.h
storage/connect/filamdbf.cpp
storage/connect/filamfix.cpp
storage/connect/filamfix.h
storage/connect/filamtxt.cpp
storage/connect/filamtxt.h
storage/connect/filamvct.cpp
storage/connect/filamvct.h
storage/connect/filamzip.cpp
storage/connect/filamzip.h
storage/connect/global.h
storage/connect/ha_connect.cc
storage/connect/ha_connect.h
- Differenciate Cardinality that returns a true or estimated table size
and GetMaxSize that return a value equal or greater than the table
row number. This fixes the errors of non matching opt files.
modified:
storage/connect/connect.cc
storage/connect/tabdos.cpp
storage/connect/tabdos.h
storage/connect/tabfix.cpp
storage/connect/table.cpp
storage/connect/tabmac.h
storage/connect/tabmysql.cpp
storage/connect/tabmysql.h
storage/connect/tabodbc.cpp
storage/connect/tabodbc.h
storage/connect/tabpivot.h
storage/connect/tabtbl.cpp
storage/connect/tabtbl.h
storage/connect/tabutil.cpp
storage/connect/tabutil.h
storage/connect/tabwmi.h
storage/connect/xtable.h
- Fix some errors and issues when making index and opt files.
Erase opt and index files for void tables.
Fix wrong calculation of Block and Last in MakeBlockValues.
Invalidate indexes before making opt file.
Fully handle blocked variable tables. Make opt file for blocked
variable tables even when they have no optimised colums.
modified:
storage/connect/tabdos.cpp
storage/connect/xindex.h
- Fix some errors making index
Return an error when the allocation is too small (should not
really occur now that GetMaxSize is sure)
Don't use XXROW index for DBF tables because of soft deleted lines.
modified:
storage/connect/xindex.cpp
- Typo
modified:
storage/connect/macutil.cpp
storage/connect/tabdos.h
storage/connect/tabsys.cpp
storage/connect/tabsys.h
modified:
storage/connect/ha_connect.cc
storage/connect/ha_connect.h
storage/connect/reldef.cpp
- Add INSERT/UPDATE support to PROXY tables
modified:
storage/connect/tabutil.cpp
storage/connect/tabutil.h
- Take care of SPECIAL columns
modified:
storage/connect/filamdbf.cpp
storage/connect/reldef.h
storage/connect/tabfmt.cpp
-Typo and misc
modified:
storage/connect/odbconn.cpp
storage/connect/tabfix.cpp
storage/connect/xindex.cpp
in this version. Sure enough, it never caused any improvement in
the execution speed and rather caused a small increase of execution
time. This is probably because values are sorted by rowid in each
range of CONNECT indexes. This could be reconsidered if a customer
have a need for processing very big files.
- Fix a bug in ha_connect::CheckCond. The negated form of BETWEEN and
IS NULL operators was not recognized.
modified:
storage/connect/ha_connect.cc
- Add long jump initialization in CntReadNext. This was causing a server
crash when an error occured in a ReadColumn.
modified:
storage/connect/connect.cc
- General cleanup of CONNECT source code eliminating all code not used by
CONNECT, including the MRR test code (saved separately).
modified:
storage/connect/catalog.h
storage/connect/colblk.cpp
storage/connect/colblk.h
storage/connect/connect.cc
storage/connect/connect.h
storage/connect/domdoc.h
storage/connect/filamap.cpp
storage/connect/filamap.h
storage/connect/filamdbf.h
storage/connect/filamfix.cpp
storage/connect/filamfix.h
storage/connect/filamtxt.cpp
storage/connect/filamtxt.h
storage/connect/filamvct.cpp
storage/connect/filamvct.h
storage/connect/filamzip.cpp
storage/connect/filamzip.h
storage/connect/global.h
storage/connect/ha_connect.cc
storage/connect/ha_connect.h
storage/connect/myconn.h
storage/connect/plgcnx.h
storage/connect/plgdbsem.h
storage/connect/plugutil.c
storage/connect/preparse.h
storage/connect/reldef.cpp
storage/connect/reldef.h
storage/connect/tabcol.h
storage/connect/tabdos.cpp
storage/connect/tabdos.h
storage/connect/tabfix.cpp
storage/connect/tabfmt.cpp
storage/connect/tabfmt.h
storage/connect/table.cpp
storage/connect/tabmac.h
storage/connect/tabmul.h
storage/connect/tabmysql.cpp
storage/connect/tabmysql.h
storage/connect/taboccur.h
storage/connect/tabodbc.cpp
storage/connect/tabodbc.h
storage/connect/tabsys.cpp
storage/connect/tabsys.h
storage/connect/tabtbl.cpp
storage/connect/tabtbl.h
storage/connect/tabutil.h
storage/connect/tabvct.cpp
storage/connect/tabvct.h
storage/connect/tabwmi.cpp
storage/connect/tabwmi.h
storage/connect/tabxml.cpp
storage/connect/tabxml.h
storage/connect/user_connect.cc
storage/connect/user_connect.h
storage/connect/valblk.cpp
storage/connect/valblk.h
storage/connect/value.cpp
storage/connect/value.h
storage/connect/xindex.cpp
storage/connect/xindex.h
storage/connect/xobject.cpp
storage/connect/xobject.h
storage/connect/xtable.h
modified:
storage/connect/filamtxt.h
storage/connect/filamzip.h
storage/connect/myconn.h
storage/connect/plgdbsem.h
storage/connect/taboccur.h
storage/connect/tabutil.h
storage/connect/tabxcl.h
- Add the possibility to execute several commands in one query of
an EXECSRC tables (using ...where command in (cmd list);)
modified:
storage/connect/ha_connect.cc
storage/connect/odbconn.cpp
storage/connect/odbconn.h
storage/connect/tabmysql.cpp
storage/connect/tabmysql.h
storage/connect/tabodbc.cpp
storage/connect/tabodbc.h
storage/connect/tabtbl.cpp
storage/connect/tabwmi.cpp
storage/connect/xtable.h
- Enhance retrieving column definitions in discovery:
From SRCDEF adding LIMIT 0 to the executed query
Testing if type, length, and precision are compatible
Making the distinction between CHAR and VARCHAR
modified:
storage/connect/ha_connect.cc
storage/connect/myconn.cpp
storage/connect/mysql-test/connect/r/mysql.result
storage/connect/mysql-test/connect/r/odbc_sqlite3.result
storage/connect/mysql-test/connect/r/odbc_sqlite3_grant.result
storage/connect/myutil.h
storage/connect/myutil.h
storage/connect/odbconn.cpp
storage/connect/value.h
a PROXY or PROXY based table.
modified:
storage/connect/colblk.cpp
storage/connect/tabutil.cpp
storage/connect/tabutil.h
storage/connect/tabxcl.cpp
storage/connect/tabxcl.h
special columns are processed. This will be documented.
Also some code cleanup and some changes to prepare the indexing of
nullable columns (not achieve yet)
modified:
storage/connect/colblk.cpp
storage/connect/colblk.h
storage/connect/connect.cc
storage/connect/connect.h
storage/connect/ha_connect.cc
storage/connect/ha_connect.h
storage/connect/macutil.cpp
storage/connect/mycat.cc
storage/connect/plgdbsem.h
storage/connect/reldef.cpp
storage/connect/reldef.h
storage/connect/table.cpp
storage/connect/tabmysql.cpp
storage/connect/tabmysql.h
storage/connect/tabodbc.h
storage/connect/tabtbl.cpp
storage/connect/tabutil.h
storage/connect/value.h
storage/connect/xindex.cpp
storage/connect/xindex.h
storage/connect/xtable.h
was not done correctly.
- Fix a bug causing add_field to generate a syntax error on DOUBLE columns
with a 0 decimal value.
- Column can be undefined when Srcdef is specified.
modified:
storage/connect/ha_connect.cc
storage/connect/mycat.cc
storage/connect/tabmysql.cpp
storage/connect/tabutil.cpp
storage/connect/tabutil.h
NOTE: Checking for looping references cannot be done when using views
as parameters. This should not be allowed on production servers and
should be dependant on a system variable and/or on speciel grant.
modified:
storage/connect/CMakeLists.txt
storage/connect/connect.cc
storage/connect/ha_connect.cc
storage/connect/myconn.cpp
storage/connect/myconn.h
storage/connect/mysql-test/connect/r/fmt.result
storage/connect/mysql-test/connect/r/pivot.result
storage/connect/mysql-test/connect/t/fmt.test
storage/connect/mysql-test/connect/t/pivot.test
storage/connect/plgdbsem.h
storage/connect/plugutil.c
storage/connect/tabcol.cpp
storage/connect/tabcol.h
storage/connect/tabfmt.cpp
storage/connect/tabmysql.cpp
storage/connect/tabmysql.h
storage/connect/taboccur.cpp
storage/connect/taboccur.h
storage/connect/tabpivot.cpp
storage/connect/tabpivot.h
storage/connect/tabtbl.cpp
storage/connect/tabutil.cpp
storage/connect/tabutil.h
storage/connect/xtable.h
modified:
storage/connect/connect.cc
storage/connect/tabutil.h
- Fix closing invalid tdbp in External_lock.
modified:
storage/connect/ha_connect.cc
- Fix closing null Tdbp
modified:
storage/connect/tabpivot.cpp*
- Fix regression error in table type TBL no more accepting missing
columns in sub-tables even when Accept was set to TRUE.
modified:
storage/connect/tabtbl.cpp
- Fix bug causing PROXY on non CONNECT tables to sometimes use the wrong DB.
- Making some more tests in create that were in pre_create not called anymore
when columns are defined.
- Updating some test results to reflect new warnings.
modified:
storage/connect/ha_connect.cc
storage/connect/mysql-test/connect/r/tbl.result
storage/connect/mysql-test/connect/r/upd.result
storage/connect/tabcol.h
storage/connect/tabmysql.cpp
storage/connect/taboccur.cpp
storage/connect/taboccur.h
storage/connect/tabtbl.cpp
storage/connect/tabtbl.h
storage/connect/tabutil.cpp
storage/connect/tabutil.h
storage/connect/tabxcl.cpp
storage/connect/tabxcl.h
PROXY table base on another table. Used by several other types.
XCOL proxy on a table having a colummn containing a list of values
OCCUR proxy on a table having several columns containing the same type
of values that can be put in a unique column and several rows.
TBL Not new but now internally using the PROXY table class.
- Fix 2 bugs in add_field:
Change '=' to ' ' after the COMMENT keyword.
Quote column names between '`' in the SQL string.
- Update xml test result to the CONNECT version
added:
storage/connect/taboccur.cpp
storage/connect/taboccur.h
storage/connect/tabutil.cpp
storage/connect/tabutil.h
storage/connect/tabxcl.cpp
storage/connect/tabxcl.h
modified:
storage/connect/CMakeLists.txt
storage/connect/ha_connect.cc
storage/connect/ha_connect.h
storage/connect/mycat.cc
storage/connect/myconn.cpp
storage/connect/mysql-test/connect/r/xml.result
storage/connect/plgdbsem.h
storage/connect/tabmysql.cpp
storage/connect/tabtbl.cpp
storage/connect/tabtbl.h
storage/connect/valblk.cpp
storage/connect/valblk.h