Commit graph

53 commits

Author SHA1 Message Date
Olivier Bertrand
4a1ffc3853 Add forgotten changes made on 10.1 2016-05-12 23:26:40 +02:00
Olivier Bertrand
0891ae2fbb - Fix MDEV-9239. Meanwhile, make all references to the database in XTAB Schema
(was sometimes in XTAB Catalog)
  modified:   storage/connect/mycat.cc
  modified:   storage/connect/mycat.h
  modified:   storage/connect/reldef.cpp
  modified:   storage/connect/reldef.h
  modified:   storage/connect/tabmysql.cpp
  modified:   storage/connect/tabpivot.cpp
  modified:   storage/connect/tabtbl.cpp
  modified:   storage/connect/tabutil.cpp
2016-01-09 20:52:17 +01:00
Olivier Bertrand
27f9d2f929 Commit updating CONNECT from the 10.1 version 2015-12-04 22:38:16 +01: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
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
445fc77497 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:25:08 +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
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
2d2e110bce - Adding the JSON table type
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
2015-01-19 18:55:25 +01:00
Olivier Bertrand
afd373c119 - Set connection charset before calling mysql_real_connect for MYSQL
tables. This should fix bug MDEV-7343.
modified:
  storage/connect/ha_connect.cc
  storage/connect/myconn.cpp
  storage/connect/myconn.h
  storage/connect/reldef.cpp
  storage/connect/reldef.h
  storage/connect/table.cpp
  storage/connect/tabmysql.cpp
  storage/connect/xtable.h

- Prevent double column evaluation when CONNECT does filtering
modified:
  storage/connect/connect.cc

- Export CreateFileMap and CloseMemMap (for OEM tables)
modified:
  storage/connect/maputil.h

- Add the compute function to be used on VALUE types.
  Preserve precision for DOUBLE values.
modified:
  storage/connect/value.cpp
  storage/connect/value.h

- Typo (in preparation to the future JSON table type)
modified:
  storage/connect/ha_connect.cc
  storage/connect/mycat.cc
  storage/connect/plgdbsem.h
2015-01-06 10:18:04 +01:00
Olivier Bertrand
4a17149ba3 - Add new table type VIR and virtual index
modified:
  storage/connect/connect.cc
  storage/connect/ha_connect.cc
  storage/connect/ha_connect.h
  storage/connect/mycat.cc
  storage/connect/plgdbsem.h

- Get good message when calling ColDB
modified:
  storage/connect/connect.cc

- Fix buffer preparation for BIN files
modified:
  storage/connect/filamfix.cpp

fix error while updating (force fseek)
modified:
  storage/connect/filamfix.cpp

fix error of XCOL column when filtered (typo)
modified:
  storage/connect/tabdos.cpp
  storage/connect/tabxcl.cpp

fix error when indexing on special column
modified:
  storage/connect/tabdos.cpp
2014-10-31 12:28:07 +01:00
Olivier Bertrand
56e2771321 1) Handling string memory allocation with a new STRING class. This is only
the beginning. Defining the STRING class and begining to use it (MYSQL)

2) Change the xtrace, use_tempfile and exact_info connect variables from
   GLOBAL to SESSION. Remaining GLOBAL variables have been made readonly.

3) Take care of LEX_STRING variables. The .str should not be regarded as
   allways being 0 terminated. This is handled by the Strz functions that
   make sure to return 0 terminated strings.

Bug fix:
- When inserting in MYSQL table with special column(s) a query such as:
insert into t2 values(0,4,'new04'),(0,5,'new05');
failed saying: column id (the special column) not found in t2.
It is now accepted but must be counted in values (these 0 are ignored)
- ROWID was returning row numbers based 0. Now it is from base 1.

modified:
  storage/connect/array.cpp
  storage/connect/blkfil.cpp
  storage/connect/colblk.cpp
  storage/connect/connect.cc
  storage/connect/filamap.cpp
  storage/connect/filamdbf.cpp
  storage/connect/filamfix.cpp
  storage/connect/filamtxt.cpp
  storage/connect/filamvct.cpp
  storage/connect/filamzip.cpp
  storage/connect/filamzip.h
  storage/connect/filter.cpp
  storage/connect/global.h
  storage/connect/ha_connect.cc
  storage/connect/ha_connect.h
  storage/connect/libdoc.cpp
  storage/connect/mycat.cc
  storage/connect/myconn.cpp
  storage/connect/odbconn.cpp
  storage/connect/plgdbutl.cpp
  storage/connect/plugutil.c
  storage/connect/reldef.cpp
  storage/connect/tabcol.cpp
  storage/connect/tabdos.cpp
  storage/connect/tabfix.cpp
  storage/connect/tabfmt.cpp
  storage/connect/table.cpp
  storage/connect/tabmul.cpp
  storage/connect/tabmysql.cpp
  storage/connect/tabmysql.h
  storage/connect/taboccur.cpp
  storage/connect/tabodbc.cpp
  storage/connect/tabpivot.cpp
  storage/connect/tabsys.cpp
  storage/connect/tabtbl.cpp
  storage/connect/tabutil.cpp
  storage/connect/tabvct.cpp
  storage/connect/tabwmi.cpp
  storage/connect/tabwmi.h
  storage/connect/tabxcl.cpp
  storage/connect/tabxml.cpp
  storage/connect/user_connect.cc
  storage/connect/valblk.cpp
  storage/connect/value.cpp
  storage/connect/value.h
  storage/connect/xindex.cpp
  storage/connect/xobject.cpp
  storage/connect/xobject.h
  storage/connect/xtable.h
2014-10-21 17:29:51 +02:00
Sergei Golubchik
1b75bed00f 5.5.40+ merge 2014-10-09 10:30:11 +02:00
Olivier Bertrand
74a4672622 - Move DataPath from the MYCAT catalog to the ha_connect handler. Indeed
it belongs to each tables and the catalog being share between several
  instances of CONNECT, when a query implied several tables belonging to
  different databases, some where pointing on the wrong database. This
  fix bugs occuring in queries such as:
  INSERT into db1.t1 select * from db2.t2;
  Where the t1 data file was made in db2.
modified:
  storage/connect/catalog.h
  storage/connect/connect.cc
  storage/connect/filamdbf.cpp
  storage/connect/filamdbf.h
  storage/connect/ha_connect.cc
  storage/connect/ha_connect.h
  storage/connect/mycat.cc
  storage/connect/mycat.h
  storage/connect/plgdbsem.h
  storage/connect/plgdbutl.cpp
  storage/connect/reldef.cpp
  storage/connect/reldef.h
  storage/connect/tabfix.h
  storage/connect/tabfmt.cpp
  storage/connect/tabfmt.h
  storage/connect/tabmul.cpp
2014-08-23 19:17:15 +02:00
Olivier Bertrand
1904284361 This commit brings many changes, in particular two important ones:
1) Support of partitioning by connect. A table can be partitioned
   by files, this is an enhanced MULTIPLE table. It can be also
   partitioned by sub-tables like TBL and this enables table sharding.
2) Handling a CONNECT bug that causes in some cases extraneous rows
   to remain in the table after an UPDATE or DELETE when the command
   uses indexing (for not fixed file tables). Until a real fix is
   done, CONNECT tries to ignore indexing and if it cannot do it
   abort the command with an error message.

- Add tests on partitioning
added:
  storage/connect/mysql-test/connect/r/part_file.result
  storage/connect/mysql-test/connect/r/part_table.result
  storage/connect/mysql-test/connect/t/part_file.test
  storage/connect/mysql-test/connect/t/part_table.test

- Temporary fix
modified:
  sql/sql_partition.cc

- Add partition support
modified:
  storage/connect/ha_connect.cc
  storage/connect/ha_connect.h
  storage/connect/reldef.cpp
  storage/connect/reldef.h
  storage/connect/tabdos.cpp

- Add functions ha_connect::IsUnique and ha_connect::CheckColumnList
modified:
  storage/connect/ha_connect.cc
  storage/connect/ha_connect.h

- Prevent updating a partition table column that is part of
  the partition function (outward tables only)
modified:
  storage/connect/ha_connect.cc

- Support INSERT/UPDATE/DELETE for PROXY tables
modified:
  storage/connect/tabutil.cpp

- Handle the bug on updating rows via indexing. Waiting for a real fix,
  Don't use indexing when possible else raise an error and abort.
modified:
  storage/connect/ha_connect.cc

- dbuserp->UseTemp set to TMP_AUTO
modified:
  storage/connect/connect.cc

- Add members nox, abort and only
modified:
  storage/connect/ha_connect.cc
  storage/connect/ha_connect.h

- Add arguments nox and abort to CntCloseTable
modified:
  storage/connect/connect.cc
  storage/connect/connect.h
  storage/connect/filamap.cpp
  storage/connect/filamap.h
  storage/connect/filamdbf.cpp
  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/ha_connect.cc

- Add arguments abort to CloseTableFile and RenameTempFile
modified:
  storage/connect/filamap.cpp
  storage/connect/filamap.h
  storage/connect/filamdbf.cpp
  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/tabdos.cpp
  storage/connect/tabdos.h
  storage/connect/tabvct.cpp
  storage/connect/xtable.h

- Fix info->records when file does not exists
modified:
  storage/connect/connect.cc

- Close XML table when opened for info
modified:
  storage/connect/connect.cc

- Add function VCTFAM::GetFileLength
modified:
  storage/connect/filamvct.cpp
  storage/connect/filamvct.h

- Column option DISTRIB -> ENUM
modified:
  storage/connect/ha_connect.cc

- Options connect, query_string and partname allways available
modified:
  storage/connect/ha_connect.cc

- Add function MYSQLC::GetTableSize
modified:
  storage/connect/myconn.cpp
  storage/connect/myconn.h

- Add new special columns (PARTNAME, FNAME, FPATH, FTYPE and FDISK)
modified:
  storage/connect/colblk.cpp
  storage/connect/colblk.h
  storage/connect/plgdbsem.h
  storage/connect/table.cpp

- Add function ExtractFromPath
modified:
  storage/connect/colblk.cpp
  storage/connect/plgdbsem.h
  storage/connect/plgdbutl.cpp

- Enhance Cardinality for some table types
modified:
  storage/connect/tabdos.cpp
  storage/connect/tabmysql.cpp
  storage/connect/tabmysql.h
  storage/connect/tabodbc.cpp
  storage/connect/tabodbc.h
  storage/connect/tabsys.cpp
  storage/connect/tabsys.h
  storage/connect/xindex.cpp
  storage/connect/xindex.h
  storage/connect/xtable.h

- Add test on special column
modified:
  storage/connect/tabfmt.cpp

- Add new files (added for block indexing)
modified:
  storage/connect/CMakeLists.txt
2014-07-17 18:13:51 +02:00
Olivier Bertrand
187e41697b - Implement "remote" index (similar to FEDERATED ones) for MYSQL tables.
Not yet done for ODBC tables.
modified:
  storage/connect/connect.cc
  storage/connect/ha_connect.cc
  storage/connect/ha_connect.h
  storage/connect/mycat.cc
  storage/connect/plgdbsem.h
  storage/connect/reldef.h
  storage/connect/tabdos.h
  storage/connect/tabmysql.cpp
  storage/connect/tabmysql.h
  storage/connect/tabodbc.cpp
  storage/connect/tabodbc.h
  storage/connect/xindex.cpp
  storage/connect/xtable.h

- Return error in "info" on Cardinality error.
modified:
  storage/connect/ha_connect.cc
2014-04-19 17:02:53 +02:00
Olivier Bertrand
213ecbbb4f - In info, the file length sometimes could not be caculated because the
catalog data path had not been set. This was added into ha_connect::info.
modified:
  storage/connect/ha_connect.cc

- All the functions querying table options could return information from the wrong
  table when several CONNECT tables were used in the same query (for instance joined
  together) This was because they belonged to the catalog class that is shared between
  all tables in the same query. They have been moved from the catalog class to the
  TABDEF/RELDEF class that is attached to each table. This was a major potential bug.
modified:
  storage/connect/catalog.h
  storage/connect/filamvct.cpp
  storage/connect/filamzip.cpp
  storage/connect/mycat.cc
  storage/connect/mycat.h
  storage/connect/reldef.cpp
  storage/connect/reldef.h
  storage/connect/tabdos.cpp
  storage/connect/tabfmt.cpp
  storage/connect/tabmul.cpp
  storage/connect/tabmysql.cpp
  storage/connect/taboccur.cpp
  storage/connect/tabodbc.cpp
  storage/connect/tabpivot.cpp
  storage/connect/tabsys.cpp
  storage/connect/tabtbl.cpp
  storage/connect/tabutil.cpp
  storage/connect/tabvct.cpp
  storage/connect/tabwmi.cpp
  storage/connect/tabxcl.cpp
  storage/connect/tabxml.cpp
  storage/connect/xindex.cpp

- Prepare indexing of MYSQL/ODBC tables (as does FEDERATED) (Not implemented yet)
modified:
  storage/connect/ha_connect.cc
  storage/connect/ha_connect.h
  storage/connect/mycat.cc
  storage/connect/mycat.h

- Typo
modified:
  storage/connect/plgdbutl.cpp
2014-04-14 14:26:48 +02:00
Olivier Bertrand
6b63c5b247 - FIX PIVOT bug MDEV-5869 caused by using fop (field option ptr) when NULL.
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
2014-03-18 19:25:50 +01:00
Olivier Bertrand
ad9d7e8561 # This is a minor change commitment
- Fix accidental crash when closing domdoc xml table
modified:
  storage/connect/domdoc.cpp

- Update table and index flags. Correct version number in maria_declare_plugin.
modified:
  storage/connect/ha_connect.cc
  storage/connect/ha_connect.h
  storage/connect/mycat.cc
  storage/connect/mycat.h

- Fix syntax error when getting columns of a non-select srcdef (discovery)
modified:
  storage/connect/myconn.cpp

- Update some tests and result according to new flag setting
modified:
  storage/connect/mysql-test/connect/r/alter.result
  storage/connect/mysql-test/connect/r/dbf.result
  storage/connect/mysql-test/connect/t/dbf.test

- Change some tracing tests to avoid too much test printed
modified:
  storage/connect/plgdbutl.cpp
  storage/connect/tabutil.cpp
  storage/connect/value.cpp
2014-02-16 18:05:43 +01:00
Olivier Bertrand
a25b5bd440 - Fix a few GCC errors an warnings
modified:
  storage/connect/ha_connect.cc
  storage/connect/mycat.cc
2014-02-03 23:07:49 +01:00
Olivier Bertrand
5133cb5e25 This is a major update of CONNECT that goes from version 1.1 to 1.2
===================================================================
- Implement a first support of the ALTER TABLE command. This fixes MDEV-5440
  but does much more than only that. See the details of how ALTER is supported
  in the new documentation and also in MDEV-5440 comment.
  This is done principally by implementing for CONNECT the virtual function
  check_if_supported_inplace_alter.
modified:
  storage/connect/connect.cc
  storage/connect/global.h
  storage/connect/ha_connect.cc
  storage/connect/ha_connect.h
  storage/connect/mysql-test/connect/r/bin.result
  storage/connect/mysql-test/connect/r/csv.result
  storage/connect/mysql-test/connect/r/dbf.result
  storage/connect/mysql-test/connect/r/dir.result
  storage/connect/mysql-test/connect/r/fix.result
  storage/connect/mysql-test/connect/r/index.result
  storage/connect/mysql-test/connect/r/ini.result
  storage/connect/mysql-test/connect/r/occur.result
  storage/connect/mysql-test/connect/r/pivot.result
  storage/connect/mysql-test/connect/r/vec.result
  storage/connect/mysql-test/connect/t/dbf.test
  storage/connect/plugutil.c
  storage/connect/user_connect.cc

- Fixes the tabname/table_name issue for XML tables. Implement
  multiple files XML tables.
modified:
  storage/connect/tabxml.cpp
  storage/connect/tabxml.h

- Set to varchar(256) the fields of catalog tables stored
  as STRBLK's (had length 0 --> CHAR(1))
  Add the GetCharString function to the VALBLK class
modified:
  storage/connect/ha_connect.cc
  storage/connect/valblk.cpp
  storage/connect/valblk.h
  storage/connect/value.cpp

- Translate CONNECT error messages to system_charset
  to avoid truncation on not ASCII characters.
modified:
  storage/connect/ha_connect.cc

- Update version number
modified:
  storage/connect/ha_connect.cc
  storage/connect/mysql-test/connect/r/xml.result

- Move the TDBASE::data_charset body from xtable.h to table.cpp.
  (dont' remember why)
modified:
  storage/connect/table.cpp
  storage/connect/xtable.h

- Other modifications are to enhance the support of OEM tables.
  In particular, they can now provide column definition in dicovery.
modified:
  storage/connect/colblk.h
  storage/connect/global.h
  storage/connect/ha_connect.cc
  storage/connect/mycat.cc
  storage/connect/plgcnx.h
  storage/connect/plgdbsem.h
  storage/connect/xtable.h

- Or to add or modify tracing.
modified:
  storage/connect/filamtxt.cpp
  storage/connect/ha_connect.cc
  storage/connect/plgdbutl.cpp
  storage/connect/tabfix.cpp
  storage/connect/tabmysql.cpp
2014-02-03 16:14:13 +01:00
Olivier Bertrand
a8b09c14ef - Fix bug MDEV-5261
modified:
  storage/connect/ha_connect.cc
  storage/connect/mycat.cc
  storage/connect/mycat.h
2013-12-04 23:53:30 +01:00
Olivier Bertrand
5d75457fc9 - Implement the SERVID special columns. This imply modifying the way
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
2013-08-09 18:02:47 +02:00
Olivier Bertrand
b3ad9a97e9 - Suppress some ubuntu compiler warnings
modified:
  storage/connect/connect.cc
  storage/connect/ha_connect.cc
  storage/connect/mycat.cc
  storage/connect/odbconn.cpp
  storage/connect/osutil.c
  storage/connect/tabutil.cpp
2013-07-08 19:03:15 +02:00
Olivier Bertrand
ce1b9cb4ba - Try to fix a uninitialised valgrind warning
modified:
  storage/connect/ha_connect.cc
  storage/connect/ha_connect.h
  storage/connect/mycat.cc

- Fix a regression error on XML libdoc wrong Nlist freing

modified:
  storage/connect/domdoc.h
  storage/connect/libdoc.cpp
  storage/connect/libdoc.h
  storage/connect/plgxml.h
  storage/connect/tabxml.cpp
2013-07-05 13:13:45 +02:00
Olivier Bertrand
b98360a42f - Trying to get rid of some valgrind warnings
modified:
  storage/connect/mycat.cc
  storage/connect/valblk.cpp
  storage/connect/value.cpp
2013-06-30 12:43:30 +02:00
Olivier Bertrand
33b9531568 - Fix setting default type to MYSQL->PROXY->DOS in some places where it
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
2013-05-24 00:19:26 +02:00
Alexander Barkov
41bda068a5 "mtr --suite=connect --embedded" tests did not work for two reasons:
1. The Connect engine code assumed that mysql_home_directory is always "./",
which is not the fact in case of embedded server.
Fixing the routines creating file names to add the mysql_home_directory prefix.

2. FILE privilege is not checked in embedded server.
Moving FILE related tests into separate files.
Skipping the FILE related tests when running with --embedded.

added:
  storage/connect/mysql-test/connect/r/grant.result
  storage/connect/mysql-test/connect/r/ini_grant.result
  storage/connect/mysql-test/connect/r/mysql_grant.result
  storage/connect/mysql-test/connect/r/xml_grant.result
  storage/connect/mysql-test/connect/t/grant.test
  storage/connect/mysql-test/connect/t/ini_grant.test
  storage/connect/mysql-test/connect/t/mysql_grant.test
  storage/connect/mysql-test/connect/t/xml_grant.test
modified:
  storage/connect/global.h
  storage/connect/ha_connect.cc
  storage/connect/mycat.cc
  storage/connect/mysql-test/connect/r/bin.result
  storage/connect/mysql-test/connect/r/csv.result
  storage/connect/mysql-test/connect/r/dbf.result
  storage/connect/mysql-test/connect/r/dir.result
  storage/connect/mysql-test/connect/r/fix.result
  storage/connect/mysql-test/connect/r/ini.result
  storage/connect/mysql-test/connect/r/mysql.result
  storage/connect/mysql-test/connect/r/vec.result
  storage/connect/mysql-test/connect/r/xml.result
  storage/connect/mysql-test/connect/t/bin.test
  storage/connect/mysql-test/connect/t/csv.test
  storage/connect/mysql-test/connect/t/dbf.test
  storage/connect/mysql-test/connect/t/dir.test
  storage/connect/mysql-test/connect/t/fix.test
  storage/connect/mysql-test/connect/t/ini.test
  storage/connect/mysql-test/connect/t/mysql.test
  storage/connect/mysql-test/connect/t/vec.test
  storage/connect/mysql-test/connect/t/xml.test
  storage/connect/plgdbsem.h
  storage/connect/plugutil.c
2013-05-21 18:29:10 +04:00
Olivier Bertrand
24a7948343 - Code cleaning. Eliminating unused code, functions, and variables.
modified:
  storage/connect/catalog.h
  storage/connect/colblk.cpp
  storage/connect/colblk.h
  storage/connect/mycat.cc
  storage/connect/reldef.cpp
  storage/connect/tabcol.h
  storage/connect/tabsys.cpp
  storage/connect/tabsys.h
  storage/connect/xobject.h
2013-05-13 12:20:08 +02:00
Olivier Bertrand
99d95c8a2f - Added table type PIVOT
modified:
  storage/connect/filamdbf.cpp
  storage/connect/ha_connect.cc
  storage/connect/ha_connect.h
  storage/connect/mycat.cc
  storage/connect/myconn.cpp
  storage/connect/odbconn.cpp
  storage/connect/plgcnx.h
  storage/connect/plgdbsem.h
  storage/connect/plgdbutl.cpp
  storage/connect/tabfmt.cpp
  storage/connect/tabpivot.cpp
  storage/connect/tabpivot.h
  storage/connect/tabutil.cpp
  storage/connect/tabwmi.cpp
  storage/connect/tabxcl.cpp
  storage/connect/value.cpp
  storage/connect/value.h
2013-05-10 20:22:21 +02:00
Olivier Bertrand
4959811411 - General code cleaning, eliminating a few potential bugs
modified:
  storage/connect/catalog.h
  storage/connect/mycat.cc
  storage/connect/taboccur.cpp
  storage/connect/taboccur.h
  storage/connect/tabutil.cpp
  storage/connect/tabutil.h
  storage/connect/tabxcl.cpp
  storage/connect/tabxcl.h
2013-05-05 12:45:26 +02:00
Olivier Bertrand
7461d8e30c - Allow PROXY based tables to specify MySQL access parameters when the
object table is not a CONNECT table. This was the case in previous
  versions but was no more possible with recent changes.

modified:
  storage/connect/mycat.cc
  storage/connect/tabmysql.cpp
  storage/connect/tabutil.cpp
2013-04-30 16:16:32 +02:00
Olivier Bertrand
4fd74200dd - Adding 3 new table types:
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
2013-04-29 13:50:20 +02:00
Olivier Bertrand
8cf33505f1 - Extend the TBL type to support sub-tables of any engines. Not CONNECT
sub-tables are accessed via the MySQL API like the MYSQL CONNECT tables.

modified:
  mysql-test/suite/connect/r/tbl.result
  mysql-test/suite/connect/t/tbl.test
  storage/connect/catalog.h
  storage/connect/ha_connect.cc
  storage/connect/mycat.cc
  storage/connect/mycat.h
  storage/connect/tabmysql.h
  storage/connect/tabtbl.cpp
2013-04-12 18:30:15 +02:00
Olivier Bertrand
1357bffbf3 - Add support of NULLs for file table columns.
Update CONNECT version number and date.

modified:
  mysql-test/suite/connect/r/null.result
  mysql-test/suite/connect/r/xml.result
  mysql-test/suite/connect/t/null.test
  storage/connect/ha_connect.cc
  storage/connect/mycat.cc
  storage/connect/tabdos.cpp
  storage/connect/tabfix.cpp
  storage/connect/tabfmt.cpp
  storage/connect/tabtbl.cpp
  storage/connect/tabvct.cpp
2013-04-10 23:38:27 +02:00
Olivier Bertrand
6be6b4ab76 - All the processing of creating, dropping, modifying indexes was redesigned.
The code was a legacy from the first versions of the XDB engine dating 2004
  and was not working anymore with recent versions of MySQL/MariaDB. A patch
  in create had been added but is was unsatisfying, recreating all indexes on
  any alter statement and sometimes doing nothing when it should have.
  This is a major update to be tested for stability. It was in most important
  cases et all current tests pass with this new version

modified:
  storage/connect/global.h
  storage/connect/ha_connect.cc
  storage/connect/ha_connect.h
  storage/connect/mycat.cc
  storage/connect/plugutil.c
  storage/connect/tabdos.cpp
  storage/connect/user_connect.cc
  storage/connect/user_connect.h
  storage/connect/xindex.h
2013-04-09 23:14:45 +02:00
Olivier Bertrand
7e7d3ce558 - Block creating tables with auto_incremented colummns (not supported)
+ allow nullable columns for TBL tables

modified:
  storage/connect/ha_connect.cc
  storage/connect/ha_connect.h
  storage/connect/mycat.cc
  storage/connect/mycat.h
2013-04-03 21:54:02 +02:00
Olivier Bertrand
84ab3e896c - Fix making default file name with lower case type
modified:
  storage/connect/mycat.cc
2013-04-02 13:58:44 +02:00
Olivier Bertrand
cd9e1938ef - Add a new table option SEPINDEX (not used yet) and remove an unused
parameter to all catalog info functions.

modified:
  storage/connect/catalog.h
  storage/connect/filamvct.cpp
  storage/connect/filamzip.cpp
  storage/connect/ha_connect.cc
  storage/connect/mycat.cc
  storage/connect/mycat.h
  storage/connect/reldef.cpp
  storage/connect/reldef.h
  storage/connect/tabdos.cpp
  storage/connect/tabfmt.cpp
  storage/connect/tabmul.cpp
  storage/connect/tabmysql.cpp
  storage/connect/tabodbc.cpp
  storage/connect/tabsys.cpp
  storage/connect/tabtbl.cpp
  storage/connect/tabvct.cpp
  storage/connect/tabwmi.cpp
  storage/connect/tabxml.cpp
  storage/connect/xindex.cpp
2013-03-25 11:07:45 +01:00
Olivier Bertrand
fe6d5f497c - Fix GetTypeID (to take care of supported features)
and IsFileType functions (INI was missing)

modified:
  storage/connect/mycat.cc

- Update test result

modified:
  mysql-test/suite/connect/r/null.result
2013-03-21 12:16:56 +01:00
Olivier Bertrand
5008a3e897 - Add in create a check for nullable columns not supported by some table types.
modified:
  storage/connect/ha_connect.cc
  storage/connect/mycat.cc
  storage/connect/mycat.h
2013-03-17 11:31:11 +01:00
Olivier Bertrand
7572315ecd - New handling of default file name:
Not added as an option but handled when the table is used.
  An empty file is created in the database directory if not exists.

modified:
  storage/connect/ha_connect.cc
  storage/connect/mycat.cc
  storage/connect/tabdos.cpp
  storage/connect/tabmul.cpp
  storage/connect/tabsys.cpp
  storage/connect/tabxml.cpp
2013-03-12 01:20:52 +01:00
Olivier Bertrand
eab8fcfa3f - Set file name when unspecified as tablename.tabletype.
modified:
  storage/connect/ha_connect.cc
  storage/connect/mycat.cc
  storage/connect/mycat.h
2013-03-07 21:38:00 +01:00
Alexander Barkov
38210b1145 Skip test XML if no XML support is compiled.
modified:
  mysql-test/suite/connect/t/xml.test
  storage/connect/mycat.cc
2013-02-22 12:52:56 +04:00
Olivier Bertrand
83b7fb0f47 Fix a bug causing all tests to fail.
In mycat.cc line 308
+ correc typo in plgdbsem

Modified:
mycat.cc
plgdbsem.h
2013-02-12 18:39:29 +01:00
Olivier Bertrand
88c76f3b70 All use of a character to represent table types or
catalog functions have been changed:

Table_types are now internally represented be enum TABTYPE.
Catalog function names are internally translated to a uint.

The function GetTypeID was modified accordingly and a new
function GetFuncID was implemented in mycat.cc.

Modified:
ha_connect.cc
odbccat.h
odbconn.cpp
tabodbc.cpp
tabfmt.cpp
tabmysql.h
tabmysql.cpp
tabwmi.cpp
mycat.h
mycat.cc
plgdbsem.h
reldef.h
tabdos.cpp
rcmsg.h
2013-02-12 12:34:14 +01:00
Olivier Bertrand
f6ca3b05f2 Bug fixed: Column charset were not handled on read.
Modified: ha_connect.cc (MakeRecord)

Moved PlgAllocResult to plgdbutl.cpp
Modified:
mycat.cpp
plgdbutl.cpp

Continuing implementing the "catalog" tables (ex "info").
Already existing were the ODBC data source table and the
WMI column info table.

The common way to handle them was modified to enable each
table types to send personalized data.

Now takes care of all existing catalog functions for table
types that can retrieve and use such information.

Modified:
ha_connect.cc
odbconn.cpp
tabodbc.h
tabodbc.cpp
tabfmt.h
tabfmt.cpp
tabmysql.h
tabmysql.cpp
tabwmi.h
tabwmi.cpp
myconn.h
myconn.cpp
filamdbf.cpp
plgdbsem.h
reldef.h
reldef.cpp
tabdos.h
tabdos.cpp
tabfix.h
xtable.h
table.cpp
2013-02-11 00:31:03 +01:00
Olivier Bertrand
2809803ee2 1) Fix bug on strange sprintf
2) Fix bug on bad sprintf
3) Fix bug on cast from pointer to int

4) Begin implementing the "info" tables.
Already existing were the ODBC sata 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 info table.

Modified:
ha_connect.cc  (4)
odbconn.cpp    (4)
tabodbc.h      (4)
tabodbc.cpp    (4)
tabsys.h       (3)
rcmsg.c        (4)
tabfmt.cpp     (2)
tabtbl.cpp     (1)
resource.h     (4)
mycat.h        (4)
2013-02-08 03:27:12 +01:00
Olivier Bertrand
38edf74a3c 1) Fix bug on strange sprintf
2) Fix bug on bad sprintf
3) Fix bug on cast from pointer to int

4) Begin implementing the "info" tables.
Already existing were the ODBC sata 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 info table.

Modified:
ha_connect.cc  (4)
odbconn.cpp    (4)
tabodbc.h      (4)
tabodbc.cpp    (4)
tabsys.h       (3)
rcmsg.c        (4)
tabfmt.cpp     (2)
tabtbl.cpp     (1)
resource.h     (4)
mycat.h        (4)
2013-02-08 00:46:10 +01:00
Alexander Barkov
40398f3660 Fixing some of the compilation warnings. 2013-02-07 16:37:44 +04:00