summaryrefslogtreecommitdiff
path: root/storage/connect/json.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch '10.0' into 10.1Sergei Golubchik2016-07-131-2/+2
|\
| * json_udf slowdownSergei Golubchik2016-07-121-2/+2
| | | | | | | | don't call strlen() in the loop
| * - Fix MDEV-9322.Olivier Bertrand2015-12-271-2/+2
| | | | | | | | modified: storage/connect/json.cpp
| * - Serialize: Protect again eventual longjmp's.Olivier Bertrand2015-12-081-8/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Always return NULL on error. Adding also the file length. modified: storage/connect/json.cpp modified: storage/connect/jsonudf.cpp - JSONCOL::WriteColumn Add types SHORT and BIGINT as accepted modified: storage/connect/tabjson.cpp - TDBJSN: Make this type use a separate storage for Json parsing and retrieve this memory between each rows. This is necessary to be able to handle big tables. See MDEV-9228. modified: storage/connect/tabjson.cpp modified: storage/connect/tabjson.h
| * Commit updating CONNECT from the 10.1 versionOlivier Bertrand2015-12-041-93/+282
| |
| * Change all preprocessor compiler directives to use __WIN__ as the mean ofOlivier Bertrand2015-05-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | - Fix MDEV-9322.Olivier Bertrand2015-12-271-1/+1
| | | | | | | | modified: storage/connect/json.cpp
* | - Serialize: Protect again eventual longjmp's.Olivier Bertrand2015-12-091-8/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Always return NULL on error. Adding also the file length. modified: storage/connect/json.cpp modified: storage/connect/jsonudf.cpp - JSONCOL::WriteColumn Add types SHORT and BIGINT as accepted modified: storage/connect/tabjson.cpp - TDBJSN: Make this type use a separate storage for Json parsing and retrieve this memory between each rows. This is necessary to be able to handle big tables. See MDEV-9228. modified: storage/connect/tabjson.cpp modified: storage/connect/tabjson.h
* | Remove warning on LinuxOlivier Bertrand2015-12-041-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | modified: storage/connect/filamzip.cpp Avoid calling the wrong AddValue (Windows compiler error ???) modified: storage/connect/json.h Fix looping bug in JARRAY::AddValue for arrays having one value. Fix potential crash in JVALUE::SetValue modified: storage/connect/json.cpp Many changes to fix bugs, enhance memory handling and modify Jpath. In JSNX some functions have been re-written or added to handle new Jpath. BMX was re-defined to avoid a different size between Windows an Linux. Jbin memory was fixed to use the proper memory when adding values. Default pretty value is now 0 instead of 2. Filename is stored in BSON when IsJson == 2. BSON size is added to memlen in CalcLen when applicable. The order or parameter was switch in Json_Object_Grp. File name argument must be a constant (temporary?) Json_Set_Item now returns file name when applicable. modified: storage/connect/jsonudf.cpp modified: storage/connect/jsonudf.h Include "mycat.h" modified: storage/connect/mycat.cc Udf_json test revisited and fixed for Linux modified: storage/connect/mysql-test/connect/r/json_udf.result modified: storage/connect/mysql-test/connect/t/json_udf.inc modified: storage/connect/mysql-test/connect/t/json_udf.test modified: storage/connect/mysql-test/connect/t/json_udf2.inc
* | Make changes required by version 10.1.9 (see Sergei's mmail):Olivier Bertrand2015-11-221-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use PlgDBSuballoc in JbinAlloc to avoid unsupported longjmp's. modified: storage/connect/ha_connect.cc modified: storage/connect/jsonudf.cpp modified: storage/connect/jsonudf.h modified: storage/connect/mysql-test/connect/r/json_udf.result modified: storage/connect/mysql-test/connect/t/json_udf.inc modified: storage/connect/tabjson.cpp modified: storage/connect/value.cpp Add new UDF functions jsoncontains, jsoncontains_path, json_set_item, json_insert_item, json_update_item, jbin_set_item, jbin_insert_item, jbin_update_item modified: storage/connect/json.cpp modified: storage/connect/json.h modified: storage/connect/jsonudf.cpp modified: storage/connect/jsonudf.h
* | Update JSON UDFs to version 1.04.0004Olivier Bertrand2015-10-171-65/+104
| | | | | | | | | | | | | | | | | | | | | | modified: storage/connect/json.cpp modified: storage/connect/json.h modified: storage/connect/jsonudf.cpp modified: storage/connect/mysql-test/connect/r/json_udf.result modified: storage/connect/mysql-test/connect/std_data/biblio.json modified: storage/connect/mysql-test/connect/t/json_udf.inc modified: storage/connect/mysql-test/connect/t/json_udf.test modified: storage/connect/tabjson.cpp
* | Fix assert error for where clause with UDF'sOlivier Bertrand2015-09-151-1/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | was fixed in HA_CONNECT::CondFilter moving res= pval->val_str(&tmp) but this was wrong. Now res is only used for strings. Change version number modified: storage/connect/ha_connect.cc Add some new UDF's modified: storage/connect/json.cpp modified: storage/connect/json.h modified: storage/connect/jsonudf.cpp modified: storage/connect/jsonudf.h Fix change in tests json_udf modified: storage/connect/mysql-test/connect/r/json_udf.result modified: storage/connect/mysql-test/connect/t/json_udf.inc modified: storage/connect/mysql-test/connect/t/json_udf.test
* | Add experimental Bson_Array function (not documented)Olivier Bertrand2015-09-061-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | Change names of functions not returning Json. modified: storage/connect/json.cpp modified: storage/connect/json.h modified: storage/connect/jsonudf.cpp modified: storage/connect/jsonudf.h modified: storage/connect/mysql-test/connect/r/json_udf.result modified: storage/connect/plugutil.c modified: storage/connect/value.cpp modified: storage/connect/value.h
* | Add new json UDF Json_Object_List.Olivier Bertrand2015-08-181-0/+25
| | | | | | | | | | | | | | modified: storage/connect/json.cpp modified: storage/connect/json.h modified: storage/connect/jsonudf.cpp modified: storage/connect/jsonudf.h
* | Add new json UDFs and make possible to use a json file name as json item.Olivier Bertrand2015-08-141-50/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | modified: storage/connect/json.cpp modified: storage/connect/json.h modified: storage/connect/jsonudf.cpp modified: storage/connect/mysql-test/connect/r/json_udf.result modified: storage/connect/mysql-test/connect/t/json.test modified: storage/connect/tabjson.cpp Fix wrong calculation of Estimated Length when the table has virtual or special columns modified: storage/connect/reldef.h modified: storage/connect/tabdos.cpp Fix wrong handling of null values in ODBCCOL::ReadColumn modified: storage/connect/tabodbc.cpp Fix crash when SetValue_char is called with a negative length value. This can happen in odbconn.cpp when SQLFetch returns SQL_NO_TOTAL (-4) as length. modified: storage/connect/odbconn.cpp modified: storage/connect/value.cpp
* | Commit od last modifications made for version 10.0Olivier Bertrand2015-06-061-7/+0
| |
* | Commit win and CONNECT resolved filesOlivier Bertrand2015-06-051-0/+7
|\ \
| * \ Commit merge resolveOlivier Bertrand2015-06-051-1162/+1161
| |\ \ | | |/
| | * This commit includes changes done in a previous (deleted) branch plus new ones.Olivier Bertrand2015-03-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From the previous branch: commit eda4928ff122a0845baf5ade83b4aa29244a3a89 Author: Olivier Bertrand <bertrandop@gmail.com> Date: Mon Mar 9 22:34:56 2015 +0100 - Add discovery to JSON tables When columns are not defined, CONNECT analyses the json file to find column definitions. This wors only on table that are an array of objects. Pair keys are used to generate the column names and pair values are used for its definition. When the LEVEL option is defined as a not null integer, the eventual JPATH is scanned up to the LEVEL value. From the current one: - Fix MDEV-7521 when column names are utf8 encoded (not a general multi-charset fix) - Adds more to JSON discovery processing and UDF's - Use PlugDup everywhere it replaces PlugSubAlloc + strcpy.
| | * - Fix crash when Json_Value was called without arguments.Olivier Bertrand2015-03-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Correct memory calculation in Serialize. Correct some UDF's messages. Add and modify the json tests removed: storage/connect/mysql-test/connect/std_data/biblio.jsn storage/connect/mysql-test/connect/std_data/expense.jsn storage/connect/mysql-test/connect/std_data/mulexp3.jsn storage/connect/mysql-test/connect/std_data/mulexp4.jsn storage/connect/mysql-test/connect/std_data/mulexp5.jsn added: storage/connect/mysql-test/connect/r/json_udf.result storage/connect/mysql-test/connect/std_data/biblio.json storage/connect/mysql-test/connect/std_data/expense.json storage/connect/mysql-test/connect/std_data/mulexp3.json storage/connect/mysql-test/connect/std_data/mulexp4.json storage/connect/mysql-test/connect/std_data/mulexp5.json storage/connect/mysql-test/connect/t/json_udf.test modified: storage/connect/json.cpp storage/connect/jsonudf.cpp storage/connect/mysql-test/connect/r/json.result storage/connect/mysql-test/connect/t/json.test
| | * - Fix MDEV-7616 by adding SQLCOM_SET_OPTION to the accepted command list.Olivier Bertrand2015-02-241-16/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | modified: storage/connect/ha_connect.cc - Add new JSON UDF functions and JSON functionalities. modified: storage/connect/json.cpp storage/connect/json.h storage/connect/jsonudf.cpp storage/connect/tabjson.cpp
| | * - Add new Json UDF's Json_Array_Add, Json_Array_Grp and Json_Object_Grp.Olivier Bertrand2015-02-221-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Handle longjmp's raised during json processing. modified: storage/connect/global.h storage/connect/ha_connect.cc storage/connect/json.cpp storage/connect/jsonudf.cpp - Fix wrong references to the suppressed g->Trace variables. modified: storage/connect/global.h storage/connect/plugutil.c storage/connect/tabjson.cpp storage/connect/tabodbc.cpp
| | * - Work on JSON and JSON UDF'sOlivier Bertrand2015-02-191-1085/+1106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | modified: storage/connect/json.cpp storage/connect/jsonudf.cpp storage/connect/tabjson.cpp - CntReadNext: Enable EvalColumns for longjmp modified: storage/connect/connect.cc
| | * - Adding json udf's. Making the second version of json tables.Olivier Bertrand2015-02-111-1/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | added: storage/connect/jsonudf.cpp modified: storage/connect/CMakeLists.txt storage/connect/json.cpp storage/connect/json.h storage/connect/tabjson.cpp storage/connect/tabjson.h - Fix utf8 issues with PROXY tables modified: storage/connect/ha_connect.cc storage/connect/tabutil.cpp storage/connect/tabutil.h
| | * - Enhance JSON tables handling.Olivier Bertrand2015-01-301-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | modified: storage/connect/json.cpp storage/connect/json.h storage/connect/mysql-test/connect/r/json.result storage/connect/mysql-test/connect/t/json.test storage/connect/tabjson.cpp storage/connect/tabjson.h - Avoid crash when a partition table name pattern is ill formed (such as using place holder %i instead of %s) modified: storage/connect/ha_connect.cc
| | * - Change some line endings from CRLF to LFOlivier Bertrand2015-01-231-6/+7
| | | | | | | | | | | | | | | | | | | | | modified: storage/connect/json.cpp storage/connect/xobject.cpp
| | * - Fix MDEV-7489 (in add_field)Olivier Bertrand2015-01-231-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | modified: storage/connect/ha_connect.cc - Fix MDEV-7494 (adding Insert_quoted in the STRING class) modified: storage/connect/tabmysql.cpp storage/connect/xobject.cpp storage/connect/xobject.h - Fix MDEV-7498 in value.cpp (AllocateValue) modified: storage/connect/value.cpp - Handle backslash in Json serialize + uchar + typo. modified: storage/connect/json.cpp storage/connect/tabjson.cpp
* | | Commit changes pulled from ob-10.0Olivier Bertrand2015-06-021-1/+1
| | |
* | | All the last changes made in the ob-10.0 branch including also changes of ↵Olivier Bertrand2015-05-201-1162/+1162
|/ / | | | | | | line endings of some test files
* | Same changes than in version 10.0.17Olivier Bertrand2015-03-191-40/+147
|/
* - Fix compile errors and warnings of LINUX G++Olivier Bertrand2015-01-201-48/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | added: storage/connect/json.cpp storage/connect/json.h storage/connect/mysql-test/connect/r/json.result storage/connect/mysql-test/connect/std_data/biblio.jsn storage/connect/mysql-test/connect/std_data/expense.jsn storage/connect/mysql-test/connect/std_data/mulexp3.jsn storage/connect/mysql-test/connect/std_data/mulexp4.jsn storage/connect/mysql-test/connect/std_data/mulexp5.jsn storage/connect/mysql-test/connect/t/json.test storage/connect/tabjson.cpp storage/connect/tabjson.h modified: storage/connect/CMakeLists.txt storage/connect/engmsg.h storage/connect/filamtxt.h storage/connect/ha_connect.cc storage/connect/msgid.h storage/connect/mycat.cc storage/connect/plgdbsem.h storage/connect/tabdos.cpp storage/connect/value.cpp storage/connect/value.h
* - Adding the JSON table typeOlivier Bertrand2015-01-191-0/+1055
added: storage/connect/json.cpp storage/connect/json.h storage/connect/mysql-test/connect/r/json.result storage/connect/mysql-test/connect/std_data/biblio.jsn storage/connect/mysql-test/connect/std_data/expense.jsn storage/connect/mysql-test/connect/std_data/mulexp3.jsn storage/connect/mysql-test/connect/std_data/mulexp4.jsn storage/connect/mysql-test/connect/std_data/mulexp5.jsn storage/connect/mysql-test/connect/t/json.test storage/connect/tabjson.cpp storage/connect/tabjson.h modified: storage/connect/CMakeLists.txt storage/connect/engmsg.h storage/connect/filamtxt.h storage/connect/ha_connect.cc storage/connect/msgid.h storage/connect/mycat.cc storage/connect/plgdbsem.h storage/connect/tabdos.cpp storage/connect/value.cpp storage/connect/value.h