summaryrefslogtreecommitdiff
path: root/storage/connect/myutil.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch '10.3' into 10.4Oleksandr Byelkin2021-07-311-3/+3
|\
| * - Fix MDEV-25863 : Replace __WIN__ by _WIN32Olivier Bertrand2021-06-081-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | modified: storage/connect/array.cpp modified: storage/connect/blkfil.cpp modified: storage/connect/block.h modified: storage/connect/bson.cpp modified: storage/connect/cmgoconn.cpp modified: storage/connect/colblk.cpp modified: storage/connect/domdoc.cpp modified: storage/connect/filamap.cpp modified: storage/connect/filamdbf.cpp modified: storage/connect/filamfix.cpp modified: storage/connect/filamgz.cpp modified: storage/connect/filamtxt.cpp modified: storage/connect/filamvct.cpp modified: storage/connect/filamzip.cpp modified: storage/connect/filter.cpp modified: storage/connect/filter.h modified: storage/connect/fmdlex.c modified: storage/connect/global.h modified: storage/connect/ha_connect.cc modified: storage/connect/javaconn.cpp modified: storage/connect/javaconn.h modified: storage/connect/jdbconn.cpp modified: storage/connect/jmgfam.cpp modified: storage/connect/json.cpp modified: storage/connect/macutil.cpp modified: storage/connect/macutil.h modified: storage/connect/maputil.cpp modified: storage/connect/mycat.cc modified: storage/connect/myconn.cpp modified: storage/connect/myconn.h modified: storage/connect/myutil.cpp modified: storage/connect/odbconn.cpp modified: storage/connect/odbconn.h modified: storage/connect/os.h modified: storage/connect/osutil.c modified: storage/connect/plgdbsem.h modified: storage/connect/plgdbutl.cpp modified: storage/connect/plugutil.cpp modified: storage/connect/rcmsg.c modified: storage/connect/reldef.cpp modified: storage/connect/reldef.h modified: storage/connect/tabdos.cpp modified: storage/connect/tabext.cpp modified: storage/connect/tabfix.cpp modified: storage/connect/tabfmt.cpp modified: storage/connect/tabjdbc.cpp modified: storage/connect/tabmac.cpp modified: storage/connect/tabmac.h modified: storage/connect/tabmul.cpp modified: storage/connect/tabmul.h modified: storage/connect/tabmysql.cpp modified: storage/connect/taboccur.cpp modified: storage/connect/tabodbc.cpp modified: storage/connect/tabpivot.cpp modified: storage/connect/tabrest.cpp modified: storage/connect/tabrest.h modified: storage/connect/tabsys.cpp modified: storage/connect/tabtbl.cpp modified: storage/connect/tabutil.cpp modified: storage/connect/tabvct.cpp modified: storage/connect/tabwmi.cpp modified: storage/connect/tabxcl.cpp modified: storage/connect/tabxml.cpp modified: storage/connect/valblk.cpp modified: storage/connect/value.cpp modified: storage/connect/xindex.cpp modified: storage/connect/xindex.h - Fix Date errors and SSL warnings modified: storage/connect/mysql-test/connect/r/jdbc.result modified: storage/connect/mysql-test/connect/r/jdbc_new.result modified: storage/connect/mysql-test/connect/t/jdbc.test modified: storage/connect/mysql-test/connect/t/jdbc_new.test - Update java source files modified: storage/connect/Mongo2Interface.java modified: storage/connect/Mongo3Interface.java added: storage/connect/Client2.java added: storage/connect/Client3.java added: storage/connect/TestInsert2.java added: storage/connect/TestInsert3.java
* | Merge branch 'bb-10.3-release' into bb-10.4-releaseSergei Golubchik2021-02-121-2/+1
|\ \ | |/ | | | | | | Note, the fix for "MDEV-23328 Server hang due to Galera lock conflict resolution" was null-merged. 10.4 version of the fix is coming up separately
| * Fix some test failureOlivier Bertrand2020-11-211-2/+1
| |
* | Fixed compiler warnings from gcc 7.4.1Monty2020-01-291-1/+3
|/ | | | - Fixed possible error in rocksdb/rdb_datadic.cc
* - Fix MDEV-13621 JDBC UPDATE containing single or double quote chars ↵Olivier Bertrand2017-08-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | produces wrong result in ha_connect::GetStringOption modified: storage/connect/ha_connect.cc - Begin implement data type BINARY modified: storage/connect/ha_connect.cc modified: storage/connect/myutil.cpp modified: storage/connect/valblk.cpp modified: storage/connect/valblk.h modified: storage/connect/value.cpp - Fix MDEV-12422 CONNECT Engine to support CHECK TABLE Adding a fake check function returning HA_ADMIN_OK. modified: storage/connect/ha_connect.h - Treat TBL (thread) as local when connected to the current server and return by timeout when a TBL remote table connection fail (Thread only) modified: storage/connect/myconn.cpp modified: storage/connect/tabmysql.h modified: storage/connect/tabtbl.cpp modified: storage/connect/tabtbl.h - Update some tests and result files modified: storage/connect/mysql-test/connect/r/tbl_thread.result modified: storage/connect/mysql-test/connect/t/tbl_thread.test modified: storage/connect/mysql-test/connect/r/updelx.result - Add the GetCsName function modified: storage/connect/reldef.h
* Fix gcc compiler warnings reported by SergeiOlivier Bertrand2017-05-231-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | modified: storage/connect/array.cpp modified: storage/connect/array.h modified: storage/connect/blkfil.cpp modified: storage/connect/blkfil.h modified: storage/connect/block.h modified: storage/connect/colblk.cpp modified: storage/connect/colblk.h modified: storage/connect/csort.h modified: storage/connect/filamvct.cpp modified: storage/connect/filter.cpp modified: storage/connect/filter.h modified: storage/connect/global.h modified: storage/connect/json.h modified: storage/connect/plgdbsem.h modified: storage/connect/plgdbutl.cpp modified: storage/connect/tabcol.cpp modified: storage/connect/tabcol.h modified: storage/connect/tabdos.cpp modified: storage/connect/tabdos.h modified: storage/connect/tabjson.cpp modified: storage/connect/table.cpp modified: storage/connect/tabodbc.cpp modified: storage/connect/tabodbc.h modified: storage/connect/tabsys.h modified: storage/connect/tabxml.h modified: storage/connect/value.cpp modified: storage/connect/value.h modified: storage/connect/xindex.cpp modified: storage/connect/xindex.h modified: storage/connect/xobject.cpp modified: storage/connect/xobject.h modified: storage/connect/xtable.h Set values as nullable when retrieving catalog info modified: storage/connect/jdbconn.cpp modified: storage/connect/mysql-test/connect/r/odbc_oracle.result modified: storage/connect/odbconn.cpp Change format of Jpath modified: storage/connect/json.cpp modified: storage/connect/jsonudf.cpp modified: storage/connect/mysql-test/connect/r/json.result modified: storage/connect/mysql-test/connect/r/json_udf.result modified: storage/connect/mysql-test/connect/r/json_udf_bin.result modified: storage/connect/mysql-test/connect/r/zip.result modified: storage/connect/mysql-test/connect/t/json.test modified: storage/connect/mysql-test/connect/t/json_udf.test modified: storage/connect/mysql-test/connect/t/json_udf_bin.test modified: storage/connect/mysql-test/connect/t/zip.test modified: storage/connect/tabjson.cpp modified: storage/connect/tabjson.h modified: storage/connect/tabmgo.cpp Change null representation from ??? to <null> modified: storage/connect/json.cpp Change the name of UDF that are equal to a native JSON function name modified: storage/connect/jsonudf.cpp modified: storage/connect/jsonudf.h modified: storage/connect/mysql-test/connect/t/json_udf.inc modified: storage/connect/mysql-test/connect/t/json_udf2.inc Fix bug in making JSON project info modified: storage/connect/mongofam.cpp Fix COMPUTE when one argument is null modified: storage/connect/value.cpp Value is null only when nullable modified: storage/connect/value.h
* Change all preprocessor compiler directives to use __WIN__ as the mean ofOlivier Bertrand2015-05-271-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | specifying Windows or not Windows compile. This is what MariaDB does. modified: storage/connect/array.cpp modified: storage/connect/blkfil.cpp modified: storage/connect/block.h modified: storage/connect/colblk.cpp modified: storage/connect/domdoc.cpp modified: storage/connect/filamap.cpp modified: storage/connect/filamdbf.cpp modified: storage/connect/filamfix.cpp modified: storage/connect/filamtxt.cpp modified: storage/connect/filamvct.cpp modified: storage/connect/filamzip.cpp modified: storage/connect/filter.cpp modified: storage/connect/filter.h modified: storage/connect/fmdlex.c modified: storage/connect/global.h modified: storage/connect/ha_connect.cc modified: storage/connect/json.cpp modified: storage/connect/macutil.cpp modified: storage/connect/macutil.h modified: storage/connect/maputil.cpp modified: storage/connect/mycat.cc modified: storage/connect/myconn.cpp modified: storage/connect/myconn.h modified: storage/connect/myutil.cpp modified: storage/connect/odbconn.cpp modified: storage/connect/odbconn.h modified: storage/connect/os.h modified: storage/connect/osutil.c modified: storage/connect/plgdbsem.h modified: storage/connect/plgdbutl.cpp modified: storage/connect/plugutil.c modified: storage/connect/rcmsg.c modified: storage/connect/reldef.cpp modified: storage/connect/reldef.h modified: storage/connect/tabdos.cpp modified: storage/connect/tabfix.cpp modified: storage/connect/tabfmt.cpp modified: storage/connect/tabjson.cpp modified: storage/connect/tabmac.cpp modified: storage/connect/tabmac.h modified: storage/connect/tabmul.cpp modified: storage/connect/tabmul.h modified: storage/connect/tabmysql.cpp modified: storage/connect/taboccur.cpp modified: storage/connect/tabodbc.cpp modified: storage/connect/tabpivot.cpp modified: storage/connect/tabsys.cpp modified: storage/connect/tabtbl.cpp modified: storage/connect/tabutil.cpp modified: storage/connect/tabvct.cpp modified: storage/connect/tabwmi.cpp modified: storage/connect/tabxcl.cpp modified: storage/connect/tabxml.cpp modified: storage/connect/valblk.cpp modified: storage/connect/value.cpp modified: storage/connect/xindex.cpp modified: storage/connect/xindex.h
* - Modify the connect_type_conv and connect_conv_size variables.Olivier Bertrand2015-02-071-10/+12
| | | | | | | | | | | | | | | | | | | | They were global (read-only) now they are session (not read-only) modified: storage/connect/checklvl.h storage/connect/ha_connect.cc storage/connect/myconn.cpp storage/connect/myutil.cpp storage/connect/tabutil.cpp - Suppress the compver variable on Linux compile. Was not debian reproductible because using __DATE__ and __TIME__ macros. modified: storage/connect/ha_connect.cc - ODBC LONGVARVAR type conversion now uses connect_conv_size. modified: storage/connect/odbconn.cpp
* - Add system variables type_conv and conv_size. This addresses the eventualOlivier Bertrand2014-03-301-20/+52
| | | | | | | | | | | | | | | | | | | | | | | | conversion from TEXT to VARCHAR in PROXY and MYSQL tables. modified: storage/connect/ha_connect.cc storage/connect/myconn.cpp storage/connect/myconn.h storage/connect/myutil.cpp storage/connect/tabmysql.cpp storage/connect/tabutil.cpp - Add the xmap system variable addressing whether file mapping should be used to handle indexing. modified: storage/connect/CMakeLists.txt storage/connect/ha_connect.cc storage/connect/xindex.cpp storage/connect/xindex.h - Do take care of ~ in Linux version of _fullpath (not tested yet) modified: storage/connect/osutil.c
* - FIX PIVOT bug MDEV-5869 caused by using fop (field option ptr) when NULL.Olivier Bertrand2014-03-181-7/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | modified: storage/connect/ha_connect.cc - Suppress the use of connect.in by adding the connect_xtrace system variable. modified: storage/connect/ha_connect.cc - Make column length, varchar, and temporal column types recognized in discovery when using SRCDEF,or PIVOT. modified: storage/connect/ha_connect.cc storage/connect/myconn.cpp storage/connect/myutil.cpp storage/connect/plgdbsem.h - Avoid (rare) crash when using DECIMAL type. (buf was too small) modified: storage/connect/tabfmt.cpp storage/connect/tabmysql.cpp storage/connect/tabodbc.cpp storage/connect/tabpivot.cpp storage/connect/valblk.cpp storage/connect/value.cpp - General cleaning of unused code, standardize tracing, and update version number modified: storage/connect/block.h storage/connect/colblk.cpp storage/connect/connect.cc storage/connect/csort.h storage/connect/filamap.cpp storage/connect/filamdbf.cpp storage/connect/filamfix.cpp storage/connect/filamzip.cpp storage/connect/ha_connect.cc storage/connect/mycat.cc storage/connect/myconn.cpp storage/connect/mysql-test/connect/r/alter.result storage/connect/mysql-test/connect/r/xml.result storage/connect/myutil.cpp storage/connect/osutil.c storage/connect/plgdbsem.h storage/connect/plgdbutl.cpp storage/connect/plugutil.c storage/connect/reldef.cpp storage/connect/tabcol.cpp storage/connect/tabfmt.cpp storage/connect/tabmysql.cpp storage/connect/tabodbc.cpp storage/connect/tabpivot.cpp storage/connect/tabvct.cpp storage/connect/user_connect.cc storage/connect/valblk.cpp storage/connect/value.cpp storage/connect/xindex.cpp
* - Add the DECIMAL data type (TYPE_DECIM)Olivier Bertrand2013-12-281-6/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the variable name of the DOUBLE type from TYPE_FLOAT to TYPE_DOUBLE Change some names to reflect ODBC version 3. This affects some variable names, function names and catalog table column names. Qualifier -> Catalog Owner (Creator) -> Schema Length -> Precision Prec -> Scale modified: storage/connect/catalog.h storage/connect/colblk.cpp storage/connect/colblk.h storage/connect/filamdbf.cpp storage/connect/global.h storage/connect/ha_connect.cc storage/connect/myconn.cpp storage/connect/mysql-test/connect/r/mysql_new.result storage/connect/mysql-test/connect/r/odbc_oracle.result storage/connect/myutil.cpp storage/connect/odbconn.cpp storage/connect/plgdbutl.cpp storage/connect/rcmsg.c storage/connect/reldef.cpp storage/connect/reldef.h storage/connect/tabcol.cpp storage/connect/tabcol.h storage/connect/tabdos.cpp storage/connect/tabfmt.cpp storage/connect/tabmysql.cpp storage/connect/tabodbc.cpp storage/connect/tabodbc.h storage/connect/tabsys.cpp storage/connect/tabutil.cpp storage/connect/tabwmi.cpp storage/connect/tabxml.cpp storage/connect/valblk.cpp storage/connect/value.cpp storage/connect/value.h storage/connect/xindex.cpp storage/connect/xobject.cpp storage/connect/xobject.h - Fix crash when GetTDB returned NULL in Open_Table modified: storage/connect/ha_connect.cc - Fix assert error setting double values from PSZ modified: storage/connect/valblk.cpp
* - Add longjmp initialization in PlgAllocResultOlivier Bertrand2013-12-111-4/+8
| | | | | | | | | | | | | | modified: storage/connect/plgdbutl.cpp - Update type translation to take care of type_modifiers modified: storage/connect/ha_connect.cc storage/connect/myutil.cpp storage/connect/myutil.h storage/connect/odbconn.cpp
* - Add support for unsigned numeric typesOlivier Bertrand2013-12-031-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | added: storage/connect/mysql-test/connect/r/unsigned.result storage/connect/mysql-test/connect/t/unsigned.test modified: storage/connect/colblk.cpp storage/connect/colblk.h storage/connect/connect.cc storage/connect/ha_connect.cc storage/connect/myconn.cpp storage/connect/mysql-test/connect/r/mysql_discovery.result storage/connect/mysql-test/connect/r/xml.result storage/connect/myutil.cpp storage/connect/myutil.h storage/connect/plgdbsem.h storage/connect/tabdos.cpp storage/connect/tabfix.cpp storage/connect/tabmysql.cpp storage/connect/tabutil.cpp storage/connect/valblk.cpp storage/connect/valblk.h storage/connect/value.cpp storage/connect/value.h storage/connect/xobject.cpp storage/connect/xobject.h
* - Fix good recognition of MYSQL table column types.Olivier Bertrand2013-11-221-6/+28
| | | | | | | | | | | | | | | | | | | | | | | | modified: storage/connect/ha_connect.cc storage/connect/myconn.cpp storage/connect/myutil.cpp storage/connect/odbccat.h storage/connect/odbconn.cpp storage/connect/tabmysql.cpp - Add tests on new MYSQL features added: storage/connect/mysql-test/connect/my.cnf storage/connect/mysql-test/connect/r/mysql_discovery.result storage/connect/mysql-test/connect/r/mysql_exec.result storage/connect/mysql-test/connect/r/mysql_new.result storage/connect/mysql-test/connect/t/myconn.inc storage/connect/mysql-test/connect/t/myconn_cleanup.inc storage/connect/mysql-test/connect/t/mysql_discovery.test storage/connect/mysql-test/connect/t/mysql_exec.test storage/connect/mysql-test/connect/t/mysql_new.test
* - Move all enum AMT definitions in one place (plgdbsem.h)Olivier Bertrand2013-11-061-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fixing warnings:Alexander Barkov2013-07-081-0/+1
| | | | | | | | | | | | | - no previous declaration for ‘const char* PLGtoMYSQLtype - no previous declaration for ‘int MYSQLtoPLG(int)’ - no previous declaration for ‘char* MyDateFmt(int)’ - no previous declaration for ‘char* MyDateFmt(char*)’ - no previous declaration for ‘int MYSQLtoPLG(char*)’ - no previous declaration for ‘enum_field_types PLGtoMYSQL modified: storage/connect/myutil.cpp
* CONNECT engine fixes after 10.0 merge.Sergei Golubchik2013-04-191-0/+19
| | | | Adaptation to new API, small simplifications and bug fixes
* - Add tiny integer as a supported type by CONNECTOlivier Bertrand2013-03-111-3/+10
| | | | | | | | | | | | | | | | modified: storage/connect/global.h storage/connect/ha_connect.cc storage/connect/myutil.cpp storage/connect/plgdbutl.cpp storage/connect/tabdos.cpp storage/connect/tabwmi.cpp storage/connect/valblk.cpp storage/connect/valblk.h storage/connect/value.cpp storage/connect/value.h storage/connect/xobject.cpp
* - Fix bad conversion from "bigint" to TYPE_FLOAT.Olivier Bertrand2013-02-211-4/+4
| | | | | | modified: storage/connect/myutil.cpp
* Put almost all function prototypes in header files that areOlivier Bertrand2013-02-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | included by the program using them. Continuing implementing the "catalog" tables (ex "info"). Already existing were the ODBC data source table and the WMI column info table. A common way to handle them will permit to develop many other such tables. Implemented: The ODBC column catalog table. The ODBC tables catalog table. The ODBC drivers catalog table. The INFO table option is replaced by the CATFUNC string option whode first letter specifies the information to retrieve: C: Columns (of a table) T: Tables (of a database) S: Data sources D: Drivers Modified: ha_connect.cc odbconn.cpp odbconn.h tabodbc.h tabodbc.cpp rcmsg.c tabfmt.h tabmysql.cpp tabwmi.cpp tabwmi.h resource.h myconn.h filamdbf.h connect.cc connect.h Added: myutil.h
* - Fixing TAB to 2 spacesAlexander Barkov2013-02-071-193/+193
| | | | | - Fixing line endings from "\r\n" to "\n"
* Fix problems with ODBC raised by Adding the type TYPE_BIGINT (longlong).Olivier Bertrand2013-01-241-0/+5
|
* Added to CONNECT the missing type TYPE_BIGINT (longlong).Olivier Bertrand2013-01-231-0/+3
|
* Adding the CONNECT storage engine sources.Alexander Barkov2013-01-181-0/+185