Commit graph

360 commits

Author SHA1 Message Date
Alexander Barkov
8780e1ab24 ConnectSE: Adding CATFUNC=Tables and CATFUC=Columns for the XLS ODBC data source. 2013-11-20 18:27:13 +04:00
Alexander Barkov
a392a911c2 Adding tests for CATFUC=Tables and CATFUNC=Columns into odbc_sqlite3.test. 2013-11-20 14:50:52 +04:00
Olivier Bertrand
793f05c321 - Modify the way UPDATE and DELETE statements are sent to ODBC
and MYSQL CONNECT tables to take care of kewords such as IGNORE.

modified:
  storage/connect/myconn.cpp
  storage/connect/odbconn.cpp
  storage/connect/tabmysql.cpp
  storage/connect/tabmysql.h
  storage/connect/tabodbc.cpp
  storage/connect/tabodbc.h
2013-11-13 00:15:38 +01:00
Olivier Bertrand
260c0de918 - Add (limited) UPDATE/DELETE support to MYSQL type CONNECT tables
modified:
  storage/connect/ha_connect.cc
  storage/connect/tabmysql.cpp
  storage/connect/tabmysql.h
  storage/connect/tabodbc.cpp
2013-11-11 18:30:36 +01:00
Olivier Bertrand
eca84a9b18 - Add (limited) support for UPDATE and DELETE to ODBC tables
(also provide the possibility to issue NOTE warnings)

modified:
  storage/connect/connect.cc
  storage/connect/ha_connect.cc
  storage/connect/ha_connect.h
  storage/connect/odbconn.cpp
  storage/connect/odbconn.h
  storage/connect/plgdbsem.h
  storage/connect/tabodbc.cpp
  storage/connect/tabodbc.h

- Return proper error number when modifying read only tables

modified:
  storage/connect/connect.cc
  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/fix.result
  storage/connect/mysql-test/connect/r/ini.result
  storage/connect/mysql-test/connect/r/vec.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/fix.test
  storage/connect/mysql-test/connect/t/ini.test
  storage/connect/mysql-test/connect/t/vec.test
  storage/connect/table.cpp
  storage/connect/taboccur.cpp
  storage/connect/tabpivot.cpp
  storage/connect/tabutil.cpp
  storage/connect/tabwmi.cpp
  storage/connect/tabxcl.cpp
2013-11-11 13:00:39 +01:00
Olivier Bertrand
e5c589a8da - BUG fixed: When updating, to avoid skipped update, force the table
handler to retrieve write-only fields to be able to compare
  records and detect data change.

modified:
  storage/connect/ha_connect.cc

- Preparing UPDATE ad DELETE on ODBC tables
  (new function added but not used yet)

modified:
  storage/connect/tabodbc.cpp
  storage/connect/tabodbc.h
2013-11-09 17:32:57 +01:00
Olivier Bertrand
056f35d0c1 - Move all enum AMT definitions in one place (plgdbsem.h)
modified:
  storage/connect/filamtxt.h
  storage/connect/filamzip.h
  storage/connect/myconn.h
  storage/connect/plgdbsem.h
  storage/connect/taboccur.h
  storage/connect/tabutil.h
  storage/connect/tabxcl.h

- Add the possibility to execute several commands in one query of
  an EXECSRC tables (using ...where command in (cmd list);)

modified:
  storage/connect/ha_connect.cc
  storage/connect/odbconn.cpp
  storage/connect/odbconn.h
  storage/connect/tabmysql.cpp
  storage/connect/tabmysql.h
  storage/connect/tabodbc.cpp
  storage/connect/tabodbc.h
  storage/connect/tabtbl.cpp
  storage/connect/tabwmi.cpp
  storage/connect/xtable.h

- Enhance retrieving column definitions in discovery:
  From SRCDEF adding LIMIT 0 to the executed query
  Testing if type, length, and precision are compatible
  Making the distinction between CHAR and VARCHAR

modified:
  storage/connect/ha_connect.cc
  storage/connect/myconn.cpp
  storage/connect/mysql-test/connect/r/mysql.result
  storage/connect/mysql-test/connect/r/odbc_sqlite3.result
  storage/connect/mysql-test/connect/r/odbc_sqlite3_grant.result
  storage/connect/myutil.h
  storage/connect/myutil.h
  storage/connect/odbconn.cpp
  storage/connect/value.h
2013-11-06 18:22:09 +01:00
Alexander Barkov
f1325549e9 - Adding cmake code to install ConnectSE mtr tests
- Including "connect" suite into the list of the default suites
2013-10-31 11:53:00 +04:00
Olivier Bertrand
671e5cbb7f - Update version number and date
- Replace test on args[i]->type() by args[i]->field_type() in ha_connect::CheckCond.
  This to take care of cached items generated by executing a query in a procedure.

modified:
  storage/connect/ha_connect.cc
  storage/connect/mysql-test/connect/r/xml.result
2013-10-29 16:21:57 +01:00
Alexander Barkov
3a424fc119 ConnectSE: fixing memory leaks reported by valgrind 2013-10-29 13:44:05 +04:00
Alexander Barkov
7dc48ae327 Merge 10.0-connect -> 10.0 2013-10-29 10:14:45 +04:00
Alexander Barkov
727c1f62a5 MDEV-4877 mysqldump dumps all data from a connect table 2013-10-29 10:09:11 +04:00
Olivier Bertrand
89e71ffb40 - Fix some GCC compiler eroors and warnings
modified:
  storage/connect/ha_connect.cc
  storage/connect/odbconn.cpp
  storage/connect/odbconn.h
2013-10-27 14:32:54 +01:00
Olivier Bertrand
bb597a765d - Add test on MYSQL table self reference during CREATE TABLE
Fix option other ignored when parsing URL

modified:
  storage/connect/ha_connect.cc
  storage/connect/mysql-test/connect/t/mysql.test
  storage/connect/mysql-test/connect/t/mysql_grant.test
  storage/connect/tabmysql.cpp
  storage/connect/tabmysql.h
2013-10-27 10:37:12 +01:00
Olivier Bertrand
0f6bcf73de - Implement the "exec source" feature for table type MYSQL.
modified:
  storage/connect/ha_connect.cc
  storage/connect/myconn.h
  storage/connect/tabmysql.cpp
  storage/connect/tabmysql.h
2013-10-26 17:14:58 +02:00
Olivier Bertrand
ba3f4a2cc9 - Add new features to ODBC table type
Srcdef definition
  Execute command tables
  uncomplete connect string

modified:
  storage/connect/ha_connect.cc
  storage/connect/odbccat.h
  storage/connect/odbconn.cpp
  storage/connect/odbconn.h
  storage/connect/plgdbsem.h
  storage/connect/plgdbutl.cpp
  storage/connect/tabodbc.cpp
2013-10-26 00:43:03 +02:00
Olivier Bertrand
c0907d57b1 - Fix compile error on some plarforms (64bits?)
modified:
  storage/connect/odbconn.cpp
2013-10-12 00:31:09 +02:00
Olivier Bertrand
4ab970ab8f - Commit merged file (on Linux)
modified:
  storage/connect/ha_connect.cc
  storage/connect/myconn.cpp
  storage/connect/odbccat.h
  storage/connect/odbconn.cpp
  storage/connect/odbconn.h
  storage/connect/tabmul.cpp
  storage/connect/tabmysql.cpp
  storage/connect/tabodbc.cpp
  storage/connect/tabodbc.h
  
- Fix typo error in TDBDIR::CloseDB

modified:
  storage/connect/tabmul.cpp

- Fix format in TDBXDBC::MakeCMD (was not accepted on Linux)

modified:
  storage/connect/tabodbc.cpp
2013-10-11 15:44:28 +02:00
Olivier Bertrand
ca4c54aaee - Fix bug when closing some table types
modified:
  storage/connect/tabmul.cpp
  storage/connect/tabmysql.cpp
  storage/connect/tabodbc.cpp

- Add Insert support for ODBC table
  Add the send command feature to ODBC tables
  (not documented yet)

modified:
  storage/connect/ha_connect.cc
  storage/connect/myconn.cpp
  storage/connect/odbccat.h
  storage/connect/odbconn.cpp
  storage/connect/odbconn.h
  storage/connect/tabodbc.cpp
  storage/connect/tabodbc.h
2013-10-11 13:57:56 +02:00
Olivier Bertrand
8619da05d9 - Fix the default length for DOUBLE to 255 (was 256, max is 255)
Add a trace in MakeSQL

modified:
  storage/connect/myconn.cpp
  storage/connect/tabmysql.cpp
2013-10-02 19:58:49 +02:00
Olivier Bertrand
069edfe125 - Reset some variables when closing just in case the XML tre is re-used.
modified:
  storage/connect/libdoc.cpp
2013-09-25 18:41:20 +02:00
Olivier Bertrand
65b0e5455b - Fix several bugs causing memory leak or invalid access detected
by Valgrind. This concerns the XML libxml2 support.

modified:
  storage/connect/domdoc.cpp
  storage/connect/domdoc.h
  storage/connect/ha_connect.cc
  storage/connect/libdoc.cpp
  storage/connect/plgdbsem.h
  storage/connect/plgxml.h
  storage/connect/tabxml.cpp
  storage/connect/tabxml.h
2013-09-22 13:40:31 +02:00
Sergei Golubchik
181b13d926 simplify CMakeLists.txt for cassandra/connect engines
now, if the dynamic plugin puts itself in a distinct component, then
* ${plugin}.cnf file is generated and installed automatically
* a separate RPM is generated automatically
* necessary FILELIST/PROVIDES/OBSOLETES/REQUIRES are filled in automatically
2013-09-25 19:32:14 +02:00
Alexander Barkov
bd37d644d6 Fixing a typo in the previous commit
defined(OpenBSD) -> defined(__OpenBSD__)


modified:
  storage/connect/os.h
2013-09-16 17:14:44 +04:00
Olivier Bertrand
c4405fef23 - Fix compilation error on some platforms
modified:
  storage/connect/os.h

- Uniforms line endings

modified:
  storage/connect/tabutil.cpp
2013-09-16 14:59:25 +02:00
Olivier Bertrand
e57fbef12e - Get rid of a compiler warning
modified:
  storage/connect/tabfmt.cpp
2013-08-29 15:12:03 +02:00
Olivier Bertrand
b344a49f7e - Fix a bug causing a crash when an XCOL table was the source of
a PROXY or PROXY based table.

modified:
  storage/connect/colblk.cpp
  storage/connect/tabutil.cpp
  storage/connect/tabutil.h
  storage/connect/tabxcl.cpp
  storage/connect/tabxcl.h
2013-08-29 12:01:27 +02:00
Olivier Bertrand
dd0872eb9c - Handle TINY in ODBC type conversion
modified:
  storage/connect/odbconn.cpp

- Enhance TYPBLK<TYPE>::GetMaxLength

modified:
  storage/connect/valblk.cpp
2013-08-25 11:12:54 +02:00
Alexander Barkov
730bf6906b Merge from 10.0.
modified:
  storage/connect/tabxml.h
pending merges:
  Alexander Barkov 2013-08-22 Fixing a compilation failure in ConnectSE ca...
2013-08-22 13:39:52 +04:00
Alexander Barkov
879629e6b2 Fixing a compilation failure in ConnectSE caused by revno 3803.
modified:
  storage/connect/tabxml.h
2013-08-22 13:10:31 +04:00
Alexander Barkov
b4a7542f5b Merging from 10.0
pending merges:
  Michael Widenius 2013-08-21 Fixed compiler warnings
    Alexander Barkov 2013-08-16 A post-fix for MDEV-4871: Fixing a faili...
    Sergey Vojtovich 2013-08-15 MDEV-4897 - Assertion `share->tdc.prev =...
    Sergey Vojtovich 2013-08-15 MDEV-4864 - Merge tests for EXCHANGE PAR...
    Alexander Barkov 2013-08-15 An additional test for MDEV-4871 Tempora...
    Alexander Barkov 2013-08-15 MDEV-4871 Temporal literals do not accep...
    Sergei Golubchik 2013-08-15 fix tests that were relying on @@have_pa...
2013-08-22 12:33:11 +04:00
Michael Widenius
4712fb14b9 Fixed compiler warnings 2013-08-21 18:20:22 +03:00
Olivier Bertrand
6bef50bbac - Suppress a gcc compiler warning
modified:
  storage/connect/tabutil.h
2013-08-20 13:52:01 +02:00
Olivier Bertrand
670f482f47 - Fix a bug causing wrong charset used when inserting an attibute in
an XML table with DOMDOC.

modified:
  storage/connect/domdoc.cpp

- Add the flag HA_MUST_USE_TABLE_CONDITION_PUSHDOWN.

modified:
  storage/connect/ha_connect.cc

- Update version number

modified:
  storage/connect/ha_connect.cc
  storage/connect/mysql-test/connect/r/xml.result
2013-08-19 23:42:08 +02:00
Alexander Barkov
18fc51f5a4 Merge with 10.0-connect 2013-08-15 13:31:49 +04:00
Olivier Bertrand
0993d4b4f5 - Change the Blanks parameter from true to false in catalog getting
information function. This solve the problem of uninitialised zone
  that was detected by valgrind.

modified:
  storage/connect/myconn.cpp
  storage/connect/odbconn.cpp
  storage/connect/tabfmt.cpp
  storage/connect/tabutil.cpp
  storage/connect/tabwmi.cpp
2013-08-14 16:07:32 +02:00
Sergey Vojtovich
b7f9c89423 MDEV-4702 - Reduce usage of LOCK_open
Following variables do not require LOCK_open protection anymore:
- table_def_cache (renamed to tdc_hash) is protected by rw-lock
  LOCK_tdc_hash;
- table_def_shutdown_in_progress doesn't need LOCK_open protection;
- last_table_id use atomics;
- TABLE_SHARE::ref_count (renamed to TABLE_SHARE::tdc.ref_count)
  is protected by TABLE_SHARE::tdc.LOCK_table_share;
- TABLE_SHARE::next, ::prev (renamed to tdc.next and tdc.prev),
  oldest_unused_share, end_of_unused_share are protected by
  LOCK_unused_shares;
- TABLE_SHARE::m_flush_tickets (renamed to tdc.m_flush_tickets)
  is protected by TABLE_SHARE::tdc.LOCK_table_share;
- refresh_version (renamed to tdc_version) use atomics.
2013-08-14 12:48:50 +04:00
Olivier Bertrand
f772ed74d0 - FIX MDEV-4853 + another bug causing the whole section to be deleted
when deleting one key of a INI table with layout=Row. The same happens
  for layout=column but this is normal as one line is one section.

modified:
  storage/connect/tabsys.cpp

- Should fix a valgrind warning in CHRBLK::GetValPtrEx

modified:
  storage/connect/valblk.cpp
2013-08-13 18:53:14 +02:00
Olivier Bertrand
bce59293fb -Fix MDEV-4878. Table locking is now supported.
modified:
  storage/connect/ha_connect.cc
  storage/connect/ha_connect.h
  storage/connect/plgdbsem.h

- Fiw a bug making records_in_range sometimes return a negative
  value.

modified:
  storage/connect/xindex.cpp
2013-08-12 21:51:56 +02:00
Olivier Bertrand
8b3e07e15b - Fix MDEV-4494. Suppress the flag HA_NULL_IN_KEY.
modified:
  storage/connect/ha_connect.h
2013-08-11 17:46:59 +02:00
Olivier Bertrand
af9e618289 - Fix MDEV-4881. SQL_TYPE_DECIMAL was not recognized in ha_connect::GetColumnOption.
Crash on second SELECT was because tshp was not reset to NULL in case of error.

modified:
  storage/connect/ha_connect.cc
  storage/connect/tabutil.cpp
2013-08-11 14:21:38 +02:00
Olivier Bertrand
8bd158c10d - Better message for CONNECT unspported commands
modified:
  storage/connect/ha_connect.cc
2013-08-09 18:53:40 +02: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
98f3fd6466 - Issue a warning instead of an error when inserting in release built a value
concerning a nullable column wrongly created as indexed (MDEV-4494)

modified:
  storage/connect/ha_connect.cc
2013-08-06 12:17:11 +02:00
Olivier Bertrand
4667125057 - Just update the version number and date
modified:
  storage/connect/ha_connect.cc
  storage/connect/mysql-test/connect/r/xml.result
2013-07-29 12:26:08 +02:00
Olivier Bertrand
7c15c52292 - Restore comment handling commented out in R3772.
Should be fixed by R3776

modified:
  storage/connect/tabutil.cpp
2013-07-26 15:33:03 +02:00
Olivier Bertrand
80ee86d2aa - Restrict memcpy length in CHRBLK::SetValue
modified:
  storage/connect/valblk.cpp
2013-07-26 09:52:16 +02:00
Olivier Bertrand
81e5c5db3b - Fix length when TYPVAL::SetValue_char is called from MYSQLCOL::ReadColumn.
modified:
  storage/connect/tabmysql.cpp
  storage/connect/value.cpp
2013-07-26 00:11:48 +02:00
Olivier Bertrand
9bd94d7f7e - Restore test results to the discovery old way.
(when using NEW_WAY, show create table displays table types unquoted)

modified:
  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/mysql-test/connect/r/odbc_xls.result
2013-07-25 21:14:49 +02:00
Olivier Bertrand
3bb298d05f - Restore tests to handle the cases that were giving Valgrind warnings.
modified:
  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/mysql-test/connect/r/odbc_xls.result
  storage/connect/mysql-test/connect/r/pivot.result
  storage/connect/mysql-test/connect/r/xcol.result
  storage/connect/mysql-test/connect/t/mysql.test
  storage/connect/mysql-test/connect/t/pivot.test
  storage/connect/mysql-test/connect/t/xcol.test
2013-07-25 19:15:07 +02:00