Commit graph

637 commits

Author SHA1 Message Date
Olivier Bertrand
7962add6c4 Fix MDEV-8561 removing a wrong patch
modified:   storage/connect/tabodbc.cpp
2015-07-30 13:15:54 +02:00
Olivier Bertrand
4efcc35a31 Fix (?) retrieving integer arguments in JSON UDF's
modified:   storage/connect/jsonudf.cpp
2015-07-22 13:21:55 +02:00
Olivier Bertrand
fdd9af56f6 Correct typo in endian.test 2015-07-07 19:41:56 +02:00
Olivier Bertrand
0efaedf430 Add some new tests:
storage/connect/mysql-test/connect/r/endian.result
  storage/connect/mysql-test/connect/r/mysql_index.result
  storage/connect/mysql-test/connect/t/endian.test
  storage/connect/mysql-test/connect/t/mysql_index.test
2015-07-07 18:16:42 +02:00
Olivier Bertrand
6114101344 Fix regression bug on "select max(length(nom)) from emp1" when:
The emp1 table type is MYSQL
  nom is an indexed column
2015-07-07 15:55:32 +02:00
Olivier Bertrand
f07359349f Fix loosing result lines when all of this is true:
The table type is MYSQL
  The query where clause includes an indexed column
  The where clause contains < or <= operator on this column
Change version date
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/tabmysql.cpp

Add visual studio 2013 files to ignore
  modified:   .gitignore
2015-07-06 12:33:11 +02:00
Olivier Bertrand
8e524d2f84 Set maturity to GAMMA modified ha_connect.cc 2015-06-25 00:06:55 +02:00
Olivier Bertrand
88998cfaac Commit merge resolved files 2015-06-05 16:10:50 +02:00
Olivier Bertrand
a8b7b6c85b Commit merge resolved files 2015-06-05 10:59:15 +02:00
Olivier Bertrand
0599d80fcc Fix swapping key numeric values on Big Endian machines.
Fix typo error in CntIndexRange (kp instead of p)
Change version date
  modified:   storage/connect/connect.cc
  modified:   storage/connect/ha_connect.cc
2015-06-03 17:37:51 +02:00
Olivier Bertrand
4821cd949e Fix swapping key numeric values on Big Endian machines.
Fix typo error in CntIndexRange for big endian swapping
  modified:   storage/connect/connect.cc
2015-06-03 11:38:34 +02:00
Olivier Bertrand
37a803c805 Fix swapping key numeric values on Big Endian machines.
Swap the key length when WORDS_BIGENDIAN is defined
Make the IOFF structure depending on WORDS_BIGENDIAN
  modified:   storage/connect/connect.cc
  modified:   storage/connect/xindex.h
2015-06-03 11:31:18 +02:00
Olivier Bertrand
65ed254468 Fix swapping key numeric values on Big Endian machines.
Change the preprocessor variable used from BIG_ENDIAN_ORDER
(only used by taoscript) to WORDS_BIGENDIAN.
  modified:   storage/connect/connect.cc
2015-06-03 10:07:33 +02:00
Olivier Bertrand
70d80305a8 Fix swapping key numeric values on Big Endian machines.
modified:   storage/connect/connect.cc
2015-06-03 02:02:21 +02:00
Olivier Bertrand
af26c366e0 Fix handling of NULL values when reading from tables.
modified:   storage/connect/tabodbc.cpp
  modified:   storage/connect/value.h
2015-06-02 12:28:42 +02:00
Olivier Bertrand
514a7d8462 Add unicode ODBC types to the types recognized by CONNECT.
Was added in function TranslateSQLType.
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/odbconn.cpp
  modified:   storage/connect/value.h

Add some trace in particular in indexing routines.
  modified:   storage/connect/block.h
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/plugutil.c
  modified:   storage/connect/xindex.cpp
  modified:   storage/connect/xindex.h
2015-05-30 10:59:34 +02:00
Olivier Bertrand
b6a56370d6 Change all preprocessor compiler directives to use __WIN__ as the mean of
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
2015-05-27 16:23:38 +02:00
Olivier Bertrand
fb98632930 JSONColumns and XMLColumns revisited. They can retrieve their parameters directly
from the PTOS argument. For this to work, finding the table options is now split
in HA_CONNECT functions and exported functions available from out of ha_connect.
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/libdoc.cpp
  modified:   storage/connect/mycat.h
  modified:   storage/connect/plgdbsem.h
  modified:   storage/connect/tabjson.cpp
  modified:   storage/connect/tabjson.h
  modified:   storage/connect/tabxml.cpp
  modified:   storage/connect/tabxml.h

The BIN table formats have been changed to handle the case of floating point values
when used with Big Endian or Little Endian machines.
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/mysql-test/connect/r/bin.result
  modified:   storage/connect/mysql-test/connect/t/bin.test
  modified:   storage/connect/reldef.cpp
  modified:   storage/connect/tabdos.cpp
  modified:   storage/connect/tabdos.h
  modified:   storage/connect/tabfix.cpp
  modified:   storage/connect/tabfix.
h
2015-05-26 01:02:33 +02:00
Olivier Bertrand
37840d5313 Security: EOM modules must now be loaded from the plugin directory.
modified:   storage/connect/mycat.cc
  modified:   storage/connect/reldef.cpp

Json array index (position) always defaults to 0
  modified:   storage/connect/tabjson.cpp
2015-05-20 11:19:44 +02:00
Olivier Bertrand
db33294fdc Json array index (position) was badly set for default array setting
modified:   storage/connect/tabjson.cpp
2015-05-17 19:55:48 +02:00
Olivier Bertrand
a82171c9aa In BIN table date_format now imply by default field_format='C'.
modified:   storage/connect/tabfix.cpp
  modified:   storage/connect/reldef.cpp

Json array index (position) is now 0 based by default. This corresponds
to what all json applications and functions do. Also fix ROWNUM calculation.
  modified:   storage/connect/jsonudf.cpp
  modified:   storage/connect/mysql-test/connect/r/json.result
  modified:   storage/connect/mysql-test/connect/t/json.test
  modified:   storage/connect/tabjson.cpp
  modified:   storage/connect/tabjson.h
2015-05-17 15:22:42 +02:00
Olivier Bertrand
b9c910909c Fix a bug in BIN buffer initialisation (in FIXFAM::AllocateBuffer)
modified:   storage/connect/filamfix.cpp

Second version of BIN table new field format (1st one was buggy)
  modified:   storage/connect/tabfix.cpp
  modified:   storage/connect/tabfix.h

Make bin.test not to fail in big-endian machines
  modified:   storage/connect/mysql-test/connect/r/bin.result
  modified:   storage/connect/mysql-test/connect/t/bin.test

Fix a bug causing wrong default offset to be generated when virtual
or special columns were placed beetween standard columns. Also
calculate the good offset for BIN columns with new field format.
  modified:   storage/connect/reldef.cpp
2015-05-15 11:56:29 +02:00
Olivier Bertrand
e6b60ee5af Make BIN table files more flexible with new column format.
In particular enable to set length and endian setting.
This should solve all problems on IBM390s machines.
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/tabfix.cpp
  modified:   storage/connect/tabfix.h

Make DBF tables to be usable in big-endian machines (test version)
  modified:   storage/connect/filamdbf.cpp

Ignore git files on storage/connect
  modified:   .gitignore
2015-05-13 19:58:21 +02:00
Olivier Bertrand
c63bd866fd Get rid of more GCC warnings about unused parameters
modified:   storage/connect/array.cpp
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/mycat.cc
  modified:   storage/connect/tabxml.cpp
  modified:   storage/connect/user_connect.cc
  modified:   storage/connect/user_connect.h
2015-05-10 12:14:21 +02:00
Olivier Bertrand
f5d0c77062 Get rid of GCC warnings about unused parameters
modified:   storage/connect/array.cpp
  modified:   storage/connect/blkfil.cpp
  modified:   storage/connect/block.h
  modified:   storage/connect/catalog.h
  modified:   storage/connect/colblk.cpp
  modified:   storage/connect/colblk.h
  modified:   storage/connect/connect.cc
  modified:   storage/connect/filamap.cpp
  modified:   storage/connect/filamdbf.cpp
  modified:   storage/connect/filamfix.cpp
  modified:   storage/connect/filamtxt.cpp
  modified:   storage/connect/filamtxt.h
  modified:   storage/connect/filamvct.cpp
  modified:   storage/connect/filamzip.cpp
  modified:   storage/connect/filter.h
  modified:   storage/connect/ha_connect.c
  modified:   storage/connect/jsonudf.cpp
  modified:   storage/connect/mycat.h
  modified:   storage/connect/myconn.cpp
  modified:   storage/connect/plgdbutl.cpp
  modified:   storage/connect/reldef.cpp
  modified:   storage/connect/reldef.h
  modified:   storage/connect/tabcol.cpp
  modified:   storage/connect/tabdos.cpp
  modified:   storage/connect/tabdos.h
  modified:   storage/connect/tabfix.cpp
  modified:   storage/connect/tabfmt.cpp
  modified:   storage/connect/tabfmt.h
  modified:   storage/connect/tabjson.cpp
  modified:   storage/connect/tabjson.h
  modified:   storage/connect/table.cpp
  modified:   storage/connect/tabmul.cpp
  modified:   storage/connect/tabmysql.cpp
  modified:   storage/connect/tabmysql.h
  modified:   storage/connect/taboccur.cpp
  modified:   storage/connect/tabpivot.cpp
  modified:   storage/connect/tabsys.cpp
  modified:   storage/connect/tabtbl.cpp
  modified:   storage/connect/tabtbl.h
  modified:   storage/connect/tabutil.cpp
  modified:   storage/connect/tabutil.h
  modified:   storage/connect/tabvct.cpp
  modified:   storage/connect/tabvir.cpp
  modified:   storage/connect/tabvir.h
  modified:   storage/connect/tabxcl.cpp
  modified:   storage/connect/tabxcl.h
  modified:   storage/connect/tabxml.cpp
  modified:   storage/connect/tabxml.h
  modified:   storage/connect/valblk.cpp
  modified:   storage/connect/valblk.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.h
  modified:   storage/connect/xtable.h
2015-05-09 17:30:20 +02:00
Olivier Bertrand
6b56e8998b Typo to check buildbot 2015-05-08 13:21:42 +02:00
Sergei Golubchik
b5c5f3176a convert files from CRLF to LF line endings 2015-05-08 11:48:16 +02:00
Olivier Bertrand
3a889b1f90 Fix a bug in init_table_share that caused syntax error with Boolean options:
oom|= sql->append(vull ? "ON" : "OFF");
  replaced by:
  oom|= sql->append(vull ? "YES" : "NO");
modified:
  ha_connect.cc

Make DBF tables to be usable in big-endian machines (test version)
modified:
  filamdbf.cpp
2015-05-07 16:59:25 +02:00
Alexander Barkov
a1ad712152 Fixing connect.dbf test failures on big endian machines. 2015-05-07 07:39:45 +04:00
Sergei Golubchik
b9c89ad038 Merge branch 'Buggynours:10.0' into 10.0 2015-05-05 22:37:00 +02:00
Olivier Bertrand
a82f475bdd - Fix a regression bug on (XML) HTML tables.
modified:
  tabxml.cpp
added:
  xml_html.test
  xml_html.result
  beers.xml
  coffee.htm

- Fix MDEV-7935 by suppressing error resetting code in delete_or_rename_table.
  However, the issue is that this code was added because without it an assertion
  was raised in some cases. Unfortunately I can't remember what were these cases.
  Therefore fixing it in this case will perhaps make a new crash happening on another cases.
modified:
  ha_connect.cc

- Add the UDF Json_Array_Delete.
modified:
  jsonudf.cpp
2015-05-05 22:05:09 +02:00
Sergei Golubchik
c09c265ac4 Fix MDEV-8090 in tabmysql.cpp 2015-05-05 22:05:05 +02:00
Olivier Bertrand
12bebceb8e - Fix a regression bug on (XML) HTML tables.
modified:
  tabxml.cpp
added:
  xml_html.test
  xml_html.result
  beers.xml
  coffee.htm

- Fix MDEV-7935 by suppressing error resetting code in delete_or_rename_table.
  However, the issue is that this code was added because without it an assertion
  was raised in some cases. Unfortunately I can't remember what were these cases.
  Therefore fixing it in this case will perhaps make a new crash happening on another cases.
modified:
  ha_connect.cc

- Add the UDF Json_Array_Delete.
modified:
  jsonudf.cpp
2015-05-05 11:37:21 +02:00
Sergei Golubchik
5dcb111c38 Merge branch 'Buggynours:10.0' into 10.0 2015-05-05 07:50:31 +02:00
Olivier Bertrand
1b07ba57a4 Fix MDEV-8090 in tabmysql.cpp 2015-05-02 15:36:33 +02:00
Olivier Bertrand
f5b05a11c1 - Fix bug on updating JSON expanded values
modified:
  json.result
  tabjson.cpp
  tabjson.h

- Fix bug on multiple tables (directories must be eliminated from file list)
modified:
  tabmul.cpp

- Update version
modified:
  ha_connect.cc

- Typo
modified:
  global.h
  ha_connect.cc
  tabtbl.cpp
  tabutil.cpp
  value.cpp
2015-05-01 15:59:12 +02:00
Olivier Bertrand
eae8318b19 - Fix Catalog JSON table crash when no Jpath
- Added JSON OBJECT specification for pretty != 2.
- Fix NULL values not recognized for nullable JSON columns
- Issue an error message when a JSON table is created without specifying LRECL if PRETTY != 2.
- Make JSONColumns use a TDBJSON class.
- Make JSON table using MAPFAM
modified:
  filamap.h
  filamtxt.h
  ha_connect.cc
  json.result
  tabjson.cpp
  tabjson.h
  table.cpp

- Implementing Discovery for the XML table type.
modified:
  domdoc.cpp
  domdoc.h
  ha_connect.cc
  libdoc.cpp
  plgxml.cpp
  plgxml.h
  reldef.cpp
  reldef.h
  tabxml.cpp
  tabxml.h

- Providing an error message when creating an ODBC table via discovery returns
  columns of more than one table.
modified:
  ha_connect.cc

- TableOptionStruct declaration moved from ha_connect.h to mycat.h
  To make it easier to use by other classes.
modified:
  ha_connect.cc
  ha_connect.h
  mycat.cc
  mycat.h
  reldef.cpp
  tabmysql.cpp
  taboccur.cpp
  tabpivot.cpp
  tabtbl.cpp
  tabutil.cpp
  tabxcl.cpp
2015-04-17 20:05:41 +02:00
Olivier Bertrand
05b30fbcc3 Fix MDEV-7890 2015-04-04 19:29:34 +02:00
Olivier Bertrand
836740cd8f Correct a typo that made multiple 1 tables to return 0 lines on Linux 2015-04-02 11:36:53 +02:00
Olivier Bertrand
8721d20fb1 - Fix MDEV-7879 by adding a test in all SetValue_pval function to return when valp == this.
- Fix MDEV-7840 by making proper datetime constant in ha_connect::CheckCond on a second place.
2015-03-30 19:03:57 +02:00
Olivier Bertrand
daa8b6b5ba D:\Ber\Develop\git3.msg 2015-03-28 20:18:46 +01:00
Olivier Bertrand
9cace9932f - Fix a bug that caused a crash when doing delete on a json table with wrong syntax file
- Suppress MYSQL_SUPPORT preprocessor variable
2015-03-22 11:34:29 +01:00
Olivier Bertrand
2bb42803df This commit includes changes done in a previous (deleted) branch plus new ones.
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.
2015-03-18 13:30:14 +01:00
Sergei Golubchik
d61573d3e5 fix connect.json_udf test for static builds 2015-03-06 20:49:48 +01:00
Sergei Golubchik
c06c465a96 10.0-connect merge 2015-03-02 16:45:44 +01:00
Olivier Bertrand
b9a9b82f9e - Make json_udf test work on Windows
modified:
  storage/connect/mysql-test/connect/t/json_udf.inc
2015-03-02 00:35:56 +01:00
Olivier Bertrand
5f4909b31d - Making json_udf test working on linux
added:
  storage/connect/mysql-test/connect/t/json_udf.inc
modified:
  storage/connect/mysql-test/connect/r/json_udf.result
  storage/connect/mysql-test/connect/t/json_udf.test
2015-03-01 23:55:09 +01:00
Olivier Bertrand
34c89597ef - Remove a signed/unsigned warning.
modified:
  storage/connect/jsonudf.cpp
2015-03-01 19:29:56 +01:00
Olivier Bertrand
5c8862ee19 - Fix crash when Json_Value was called without arguments.
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
2015-03-01 19:20:40 +01:00
Olivier Bertrand
d862d7c049 - Implement random access to ODBC tables
modified:
  storage/connect/odbconn.cpp
  storage/connect/odbconn.h

- Fix get proper length of ODBC DECIMAL column in discovery
modified:
  storage/connect/ha_connect.cc
  storage/connect/mysql-test/connect/r/odbc_oracle.result

- Implement random access to JSON tables
modified:
  storage/connect/tabjson.cpp
  storage/connect/tabjson.h

- Fix MDEV-7636
modified:
  storage/connect/tabutil.cpp
2015-02-28 23:01:55 +01:00