Commit graph

518 commits

Author SHA1 Message Date
Olivier Bertrand
e5729127b8 - NOTE: an experimental implementation of MRR was done but not kept
in this version. Sure enough, it never caused any improvement in
  the execution speed and rather caused a small increase of execution
  time. This is probably because values are sorted by rowid in each
  range of CONNECT indexes. This could be reconsidered if a customer
  have a need for processing very big files.

- Fix a bug in ha_connect::CheckCond. The negated form of BETWEEN and
  IS NULL operators was not recognized.
modified:
  storage/connect/ha_connect.cc

- Add long jump initialization in CntReadNext. This was causing a server
  crash when an error occured in a ReadColumn.
modified:
  storage/connect/connect.cc

- General cleanup of CONNECT source code eliminating all code not used by
  CONNECT, including the MRR test code (saved separately).
modified:
  storage/connect/catalog.h
  storage/connect/colblk.cpp
  storage/connect/colblk.h
  storage/connect/connect.cc
  storage/connect/connect.h
  storage/connect/domdoc.h
  storage/connect/filamap.cpp
  storage/connect/filamap.h
  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/global.h
  storage/connect/ha_connect.cc
  storage/connect/ha_connect.h
  storage/connect/myconn.h
  storage/connect/plgcnx.h
  storage/connect/plgdbsem.h
  storage/connect/plugutil.c
  storage/connect/preparse.h
  storage/connect/reldef.cpp
  storage/connect/reldef.h
  storage/connect/tabcol.h
  storage/connect/tabdos.cpp
  storage/connect/tabdos.h
  storage/connect/tabfix.cpp
  storage/connect/tabfmt.cpp
  storage/connect/tabfmt.h
  storage/connect/table.cpp
  storage/connect/tabmac.h
  storage/connect/tabmul.h
  storage/connect/tabmysql.cpp
  storage/connect/tabmysql.h
  storage/connect/taboccur.h
  storage/connect/tabodbc.cpp
  storage/connect/tabodbc.h
  storage/connect/tabsys.cpp
  storage/connect/tabsys.h
  storage/connect/tabtbl.cpp
  storage/connect/tabtbl.h
  storage/connect/tabutil.h
  storage/connect/tabvct.cpp
  storage/connect/tabvct.h
  storage/connect/tabwmi.cpp
  storage/connect/tabwmi.h
  storage/connect/tabxml.cpp
  storage/connect/tabxml.h
  storage/connect/user_connect.cc
  storage/connect/user_connect.h
  storage/connect/valblk.cpp
  storage/connect/valblk.h
  storage/connect/value.cpp
  storage/connect/value.h
  storage/connect/xindex.cpp
  storage/connect/xindex.h
  storage/connect/xobject.cpp
  storage/connect/xobject.h
  storage/connect/xtable.h
2014-03-10 18:29:04 +01:00
Olivier Bertrand
85e8aee47d - Temporary
modified:
  storage/connect/catalog.h
  storage/connect/colblk.cpp
  storage/connect/colblk.h
  storage/connect/connect.cc
  storage/connect/filamap.cpp
  storage/connect/filamfix.cpp
  storage/connect/filamfix.h
  storage/connect/filamtxt.cpp
  storage/connect/filamvct.cpp
  storage/connect/filamzip.cpp
  storage/connect/filamzip.h
  storage/connect/ha_connect.cc
  storage/connect/ha_connect.h
  storage/connect/plgdbsem.h
  storage/connect/plgdbutl.cpp
  storage/connect/reldef.cpp
  storage/connect/reldef.h
  storage/connect/tabdos.cpp
  storage/connect/tabdos.h
  storage/connect/tabfix.cpp
  storage/connect/tabfix.h
  storage/connect/tabfmt.cpp
  storage/connect/tabfmt.h
  storage/connect/table.cpp
  storage/connect/tabmac.h
  storage/connect/tabmul.h
  storage/connect/tabmysql.cpp
  storage/connect/tabodbc.cpp
  storage/connect/tabsys.cpp
  storage/connect/tabsys.h
  storage/connect/tabtbl.cpp
  storage/connect/tabtbl.h
  storage/connect/tabvct.cpp
  storage/connect/tabvct.h
  storage/connect/tabwmi.cpp
  storage/connect/tabwmi.h
  storage/connect/tabxml.cpp
  storage/connect/tabxml.h
  storage/connect/valblk.cpp
  storage/connect/valblk.h
  storage/connect/value.cpp
  storage/connect/value.h
  storage/connect/xobject.cpp
  storage/connect/xobject.h
  storage/connect/xtable.h
2014-03-10 12:21:17 +01:00
Olivier Bertrand
126bb34513 - Fix MDEV-5497. The city column length was wrong in the create table statements.
modified:
  storage/connect/mysql-test/connect/r/fix.result
  storage/connect/mysql-test/connect/t/fix.test
2014-03-05 12:10:02 +01:00
Sergei Golubchik
41c760b121 merge 2014-02-28 10:00:31 +01:00
Olivier Bertrand
43362bc9a0 - Fix bug MDEV-5734
modified:
  storage/connect/mysql-test/connect/r/pivot.result
  storage/connect/mysql-test/connect/t/pivot.test
  storage/connect/tabmysql.cpp
  storage/connect/tabpivot.cpp

- Implement a first experimental support of MRR
  (compiled only if MRRBKA_SUPPORT is defined)
modified:
  storage/connect/colblk.h
  storage/connect/connect.cc
  storage/connect/connect.h
  storage/connect/global.h
  storage/connect/ha_connect.cc
  storage/connect/ha_connect.h
  storage/connect/plugutil.c
  storage/connect/user_connect.cc
2014-02-27 18:00:01 +01:00
Alexander Barkov
57cdc561fc Fixing AIX compilation failires 2014-02-27 19:44:00 +04:00
Sergei Golubchik
98c0659150 compilation error in CONNECT with ODBC 2014-02-27 08:43:54 +01:00
Olivier Bertrand
1699947eef - Make alter.test to work on both Windows and Linux
modified:
  storage/connect/mysql-test/connect/r/alter.result
  storage/connect/mysql-test/connect/t/alter.test
2014-02-16 22:52:57 +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
e1096934d7 - Check field option changes on ALTER TABLE in check_if_supported_inplace_alter.
If yes, the in-place algorithm cannot be used (inward tables)
modified:
  storage/connect/ha_connect.cc
  storage/connect/ha_connect.h

- add a test on ALTER TABLE
added:
  storage/connect/mysql-test/connect/r/alter.result
  storage/connect/mysql-test/connect/t/alter.test
2014-02-07 22:44:43 +01:00
Sergei Golubchik
1b3c15f199 merge with 10.0-monty 2014-02-06 16:38:40 +01:00
Michael Widenius
313f18be5a Fixed errors and warnings found by buildbot
mysql-test/r/lowercase_table2.result:
  Updated result
  (The change happend because we don't try to open the table anymore as part of create table)
mysql-test/suite/rpl/r/create_or_replace_mix.result:
  Fixed result file
mysql-test/suite/rpl/r/create_or_replace_row.result:
  Fixed result file
mysql-test/suite/rpl/r/create_or_replace_statement.result:
  Fixed result file
mysql-test/suite/rpl/t/create_or_replace.inc:
  Drop open temporary table
mysys/my_delete.c:
  Added missing newline
plugin/metadata_lock_info/mysql-test/metadata_lock_info/r/user_lock.result:
  Fixed result
  (Lock names was before off by one. Was corrected by my previous patch)
sql/sql_select.cc:
  Fixed compiler warnings by adding missing casts
storage/connect/ha_connect.cc:
  Fixed compiler warnings
storage/innobase/os/os0file.cc:
  Fixed compiler warnings
storage/xtradb/btr/btr0btr.cc:
  Fixed compiler warnings
storage/xtradb/handler/ha_innodb.cc:
  removed not used function
strings/ctype-uca.c:
  Fixed compiler warnings
support-files/compiler_warnings.supp:
  Added suppression for warnings that are wrong or are not serious andthat we don't plan to fix.
2014-02-06 16:14:09 +02:00
Michael Widenius
10001c8e4f Automatic merge 2014-02-05 19:23:11 +02:00
Alexander Barkov
1b1ffe408c Merge 10.0->10.0-connect 2014-02-05 13:36:17 +04:00
Sergei Golubchik
5475cc7765 merge 2014-02-04 10:49:44 +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
Sergei Golubchik
5e1d5d9bc0 fixes:
* roles.grant_proxy-5526 test for --embedded
* gcc warning in Connect
2014-02-02 10:09:05 +01:00
Alexander Barkov
bec94a1566 merge 10.0 -> 10.0-connect 2014-01-31 14:21:15 +04:00
Michael Widenius
273078c5fa Fixes to get valgrind to work with jemalloc
- Added MALLOC_LIBRARY variable to hold name of malloc library
- Back ported valgrind related fixes from jemalloc 3.4.1 to the included jemalloc 3.3.1
- Renamed bitmap_init() and bitmap_free() to my_bitmap_init() and my_bitmap_free() to avoid clash with jemalloc 3.4.1
- Use option --soname-synonyms=somalloc=NON to valgrind when using jemalloc
- Show version related variables in mysqld --help
  -- Added SHOW_VALUE_IN_HELP marker

Increased back_log to 150 as the original value was a bit too small


CMakeLists.txt:
  Added MALLOC_LIBRARY variable to hold name of malloc library
cmake/jemalloc.cmake:
  Added MALLOC_LIBRARY variable to hold name of malloc library
config.h.cmake:
  Added MALLOC_LIBRARY variable to hold name of malloc library
extra/jemalloc/ChangeLog:
  Updates changelog
extra/jemalloc/include/jemalloc/internal/arena.h:
  Backported valgrind fixes from jemalloc 3.4.1
extra/jemalloc/include/jemalloc/internal/jemalloc_internal.h.in:
  Backported valgrind fixes from jemalloc 3.4.1
extra/jemalloc/include/jemalloc/internal/private_namespace.h:
  Backported valgrind fixes from jemalloc 3.4.1
extra/jemalloc/include/jemalloc/internal/tcache.h:
  Backported valgrind fixes from jemalloc 3.4.1
extra/jemalloc/src/arena.c:
  Backported valgrind fixes from jemalloc 3.4.1
include/my_bitmap.h:
  Renamed bitmap_init() and bitmap_free() to my_bitmap_init() and my_bitmap_free() to avoid clash with jemalloc 3.4.1
mysql-test/mysql-test-run.pl:
  Use option --soname-synonyms=somalloc=NON to valgrind when using jemalloc
mysql-test/valgrind.supp:
  Supression of memory leak in OpenSuse 12.3
mysys/my_bitmap.c:
  Renamed bitmap_init() and bitmap_free() to my_bitmap_init() and my_bitmap_free()
sql/ha_ndbcluster_binlog.cc:
  Renames
sql/ha_ndbcluster_cond.h:
  Renames
sql/ha_partition.cc:
  Renames
sql/handler.cc:
  Renames
sql/item_subselect.cc:
  Renames
sql/log_event.cc:
  Renames
sql/log_event_old.cc:
  Renames
sql/mysqld.cc:
  Renames
  Show version related variables in mysqld --help
sql/opt_range.cc:
  Renames
sql/opt_table_elimination.cc:
  Renames
sql/partition_info.cc:
  Renames
sql/rpl_injector.h:
  Renames
sql/set_var.h:
  Renames
sql/slave.cc:
  Renames
sql/sql_bitmap.h:
  Renames
sql/sql_insert.cc:
  Renames
sql/sql_lex.h:
  Renames
sql/sql_parse.cc:
  Renames
sql/sql_partition.cc:
  Renames
sql/sql_select.cc:
  Renames
sql/sql_show.cc:
  Renames
sql/sql_update.cc:
  Renames
sql/sys_vars.cc:
  Show version related variables in mysqld --help
sql/sys_vars.h:
  Added SHOW_VALUE_IN_HELP marker for variables that should be shown in --help
sql/table.cc:
  Renames
sql/table.h:
  Removed not used bitmap_init_value
storage/connect/ha_connect.cc:
  Removed compiler warning
storage/maria/ma_open.c:
  Renames
unittest/mysys/bitmap-t.c:
  Renames
2014-01-02 11:19:19 +02:00
Olivier Bertrand
e71bd28f3f - Fix bug MDEV-5486 (fail to create or drop a table dbn.tbn when no default database)
modified:
  storage/connect/ha_connect.cc
  storage/connect/ha_connect.h

- Typo

modified:
  storage/connect/odbconn.cpp
  storage/connect/user_connect.h
2013-12-31 13:08:29 +01:00
Olivier Bertrand
32284eba5c - Fix variables used uninitialized
modified:
  storage/connect/filamdbf.cpp
  storage/connect/tabutil.cpp
2013-12-28 16:56:51 +01:00
Olivier Bertrand
c055e5e0ef - Add the DECIMAL data type (TYPE_DECIM)
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
2013-12-28 15:46:49 +01:00
Alexander Barkov
889b08b050 Adding tests for TABLE_TYPE=ODBC with Oracle. 2013-12-25 18:24:37 +04:00
Sergei Golubchik
90a3c97162 merge 2013-12-22 17:20:23 +01:00
Sergei Golubchik
3b7b79a9d1 don't install connect test suite explicitly,
plugin.cmake does it automatically for all plugins
2013-12-22 17:11:24 +01:00
Olivier Bertrand
ec906f928b - Fix MDEV-5340
modified:
  storage/connect/odbconn.cpp
2013-12-20 12:24:24 +01:00
Olivier Bertrand
d05ccc2324 - Add extra column info in discovery
modified:
  storage/connect/ha_connect.cc
  storage/connect/myconn.cpp
  storage/connect/odbconn.cpp
  storage/connect/plgdbsem.h
2013-12-19 12:56:06 +01:00
Alexander Barkov
d253599b83 Merge 10.0->10.0-connect 2013-12-17 17:50:55 +04:00
Alexander Barkov
90d022404c Fixing a compilation warning 2013-12-17 17:42:19 +04:00
Olivier Bertrand
18112a3f0c - Fix logical error in STRBLK::SetValue
modified:
  storage/connect/valblk.cpp

- Fix compiler warning in ODBConn::GetCatInfo

modified:
  storage/connect/odbconn.cpp
2013-12-16 17:40:42 +01:00
Sergei Golubchik
c1a6522875 merge 2013-12-16 13:28:35 +01:00
Sergei Golubchik
d28d3ba40d 10.0-base merge 2013-12-16 13:02:21 +01:00
Olivier Bertrand
e2804d9b74 - Fix MDEV-5393 and MDEV-5434. It is a major update of ODBC catalog tables
processing that takes care of:
  - Drastically reduce the amount of storge needed to process them.
  - Handle longjmp's.
  - Makes the line limit an opion (MAXRES)
  - Schema can also be specified with the DBNAME option.
  - Issue warnings on fetch errors or when result lines have been limited.
  - Change some column names to reflect ODBC version 3 standard.
  The documentation have been updated accordingly

modified:
  storage/connect/filamdbf.cpp
  storage/connect/ha_connect.cc
  storage/connect/myconn.cpp
  storage/connect/mysql-test/connect/r/odbc.result
  storage/connect/mysql-test/connect/r/odbc_postgresql.result
  storage/connect/mysql-test/connect/r/odbc_sqlite3.result
  storage/connect/mysql-test/connect/r/odbc_xls.result
  storage/connect/mysql-test/connect/r/xml.result
  storage/connect/mysql-test/connect/t/odbc_postgresql.test
  storage/connect/odbccat.h
  storage/connect/odbconn.cpp
  storage/connect/odbconn.h
  storage/connect/plgdbsem.h
  storage/connect/plgdbutl.cpp
  storage/connect/rcmsg.c
  storage/connect/tabfmt.cpp
  storage/connect/table.cpp
  storage/connect/tabodbc.cpp
  storage/connect/tabodbc.h
  storage/connect/tabutil.cpp
  storage/connect/tabwmi.cpp
  storage/connect/user_connect.cc
  storage/connect/valblk.cpp
  storage/connect/valblk.h
  storage/connect/value.cpp
2013-12-16 01:32:47 +01:00
Alexander Barkov
d8ac8d187d Merge 10.0->10.0-connect 2013-12-14 15:37:55 +04:00
Alexander Barkov
1e711c8d04 ConnectSE: making odbc_postgresql.test independent from
the system locale (on Linux) and code pages (on Windows).
2013-12-12 17:26:01 +04:00
Olivier Bertrand
a58e4e8af1 - Fix (temporarily) bug on odbc_postgresql.test
modified:
  storage/connect/mysql-test/connect/t/odbc_postgresql.test
  storage/connect/user_connect.cc
2013-12-12 01:33:53 +01:00
Olivier Bertrand
7e8504b523 - Add longjmp initialization in PlgAllocResult
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
2013-12-11 23:33:36 +01:00
Olivier Bertrand
3a7f4f241e - Commit merged files from Alexander
added:
  storage/connect/mysql-test/connect/r/odbc_postgresql.result
  storage/connect/mysql-test/connect/t/have_odbc_postgresql.inc
  storage/connect/mysql-test/connect/t/odbc_postgresql.sql
  storage/connect/mysql-test/connect/t/odbc_postgresql.test
modified:
  storage/connect/odbconn.cpp
2013-12-11 16:57:25 +01:00
Olivier Bertrand
f69980c6df - Fix errors and warnings occuring in --embedded tests
modified:
  storage/connect/connect.cc
  storage/connect/ha_connect.cc
  storage/connect/mysql-test/connect/r/mysql.result
  storage/connect/mysql-test/connect/r/unsigned.result
  storage/connect/mysql-test/connect/t/mysql.test
  storage/connect/mysql-test/connect/t/unsigned.test
2013-12-11 16:52:01 +01:00
Alexander Barkov
83416c0fee Fixing the message displayed when the test PostgreSQL data source name
does not exist.
2013-12-11 19:47:37 +04:00
Alexander Barkov
f19f8f0ee4 MDEV-5341 ConnectSE: discovery for ODBC tables does not work if tables
with the same names present in multiple schemas

The "TABNAME" option now supports qualified table names,
to connect to tables residing in a particular schema and catalog.

Qualified table names have the following format:

  [[CatalogName.]SchemaName.]TableName

Qualified table names can be used:

1. In "normal" tables:

CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=ODBC
CONNECTION='DSN=ConnectEng;UID=mtr;PWD=mtr'
TABNAME='schema1.t1';

2. In catalog tables (CATFUNC=Tables  and CATFUNC=Columns)

CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=ODBC
CONNECTION='DSN=postgresql;UID=user;PWD=password'
TABNAME='schema1.t1';

Note, the % and _ wildcards are supported in
the schema name and the table name parts:

CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=ODBC
CONNECTION='DSN=postgresql;UID=user;PWD=password'
TABNAME='%.t1';

CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=ODBC
CONNECTION='DSN=postgresql;UID=user;PWD=password'
TABNAME='schema1.%';
2013-12-11 18:47:46 +04:00
Alexander Barkov
57fcf1cbe4 Moving the code checking libxml2 into a *.inc file. 2013-12-10 12:53:46 +04:00
Olivier Bertrand
1e1345c451 - Raise the limit on returned lines for table ODBC catalog tables
to 16384 (MDEV-5393)

modified:
  storage/connect/odbconn.cpp

- Fix sorting catalog table result set (MDEV-5394)

added:
  storage/connect/mysql-test/connect/r/xml_mdev5261.result
  storage/connect/mysql-test/connect/t/xml_mdev5261.test
modified:
  storage/connect/mysql-test/connect/r/odbc_sqlite3.result
  storage/connect/mysql-test/connect/t/odbc_sqlite3.test
  storage/connect/table.cpp
  storage/connect/tabodbc.cpp
  storage/connect/xtable.h

- Remove unnecessary closing of opened table in rnd_init

modified:
  storage/connect/ha_connect.cc
2013-12-06 01:37:56 +01:00
Alexander Barkov
37611b2a32 MDEV-5343 ConnectSE: ODBC: CATFUNC=Tables and CATFUNC=Columns crash when
running against a data source with many tables
2013-12-05 18:31:14 +04:00
Alexander Barkov
be09466e37 Adding basic ODBC tests that do not need a DSN 2013-12-05 17:26:28 +04:00
Olivier Bertrand
e694ac4193 - Suppress eventual prompting when connecting to an ODBC source
modified:
  storage/connect/odbconn.cpp
2013-12-05 12:32:06 +01:00
Olivier Bertrand
54d4589dde - Previous MDEV-5261 was generating wrong warnings
modified:
  storage/connect/ha_connect.cc
2013-12-05 01:00:28 +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
41dbe1c96b - Fix a typo error in tabutil line 213
modified:
  storage/connect/tabutil.cpp
  
- Fix test results to reflect the fact that in discovery, column defaults
  are now retrieved for the MYSQL table type.

modified:
  storage/connect/mysql-test/connect/r/mysql_discovery.result
  storage/connect/mysql-test/connect/r/mysql_new.result

- Restore Unix line endings

modified:
  storage/connect/value.cpp
2013-12-03 23:34:50 +01:00
Olivier Bertrand
ee2f04450b - Add support for unsigned numeric types
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
2013-12-03 22:59:40 +01:00
Alexander Barkov
d240a0418c Merge 10.0-connect -> 10.0 2013-12-03 14:12:53 +04:00
Olivier Bertrand
0d37409fe7 - Fix gcc compiling error
modified:
  storage/connect/valblk.cpp
2013-11-28 23:37:27 +01:00
Sergei Golubchik
ab3604989c MDEV-4243 [PATCH] Warnings/errors while compiling with clang
fix the code to compile with clang. fix warnings too.

include/probes_mysql_nodtrace.h:
  clang++ doesn't like numeric _constants_ being used in ||
  (it suspects that the intention was | ). Boolean constants are ok.
sql/hostname.cc:
  only used in DBUG_ASSERT
sql/item.cc:
  str_to_time and str_to_datetime return bool, not MYSQL_TIMESTAMP_xxx
sql/item_func.cc:
  str_to_datetime_with_warn() returns bool, not MYSQL_TIMESTAMP_xxx
storage/cassandra/CMakeLists.txt:
  CMAKE_CXX_FLAGS can be empty
storage/connect/odbconn.cpp:
  HWND is void*
storage/connect/user_connect.h:
  deprecated on FreeBSD and unused anyway
storage/connect/value.cpp:
  bad characters inside. unused.
storage/spider/spd_trx.cc:
  clang++ warns that memset will also overwrite vtbl. it might be as well a good idea,
  as it asserts that the object will only be used as a storage.
  silence the warning.
2013-11-28 22:35:59 +01:00
Olivier Bertrand
f53ad74cd1 - Fix some wrong changes preparing for unsigned data types
modified:
  storage/connect/ha_connect.cc
  storage/connect/value.cpp

- Fix the way GetPlug works (was not updating xp)

modified:
  storage/connect/ha_connect.cc
2013-11-28 01:25:39 +01:00
Olivier Bertrand
385dbaeae0 - Fix gcc compilation warnings
modified:
  storage/connect/odbconn.cpp

- Prepare Value and Valblk to support unsigned data types
  (not operational yet)

modified:
  storage/connect/colblk.cpp
  storage/connect/filamvct.cpp
  storage/connect/myconn.cpp
  storage/connect/plgdbutl.cpp
  storage/connect/tabdos.cpp
  storage/connect/tabodbc.cpp
  storage/connect/tabvct.cpp
  storage/connect/valblk.cpp
  storage/connect/valblk.h
  storage/connect/value.cpp
  storage/connect/value.h
  storage/connect/xindex.cpp
2013-11-26 11:47:48 +01:00
Olivier Bertrand
aaa982e790 - Fix good recognition of MYSQL table column types.
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
2013-11-22 16:03:54 +01:00
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
Michael Widenius
192678e7bf MDEV-5241: Collation incompatibilities with MySQL-5.6
- Character set code & tests from Alexander Barkov
- Integration with ALTER TABLE, REPAIR and open_table from Monty

The problem was that MySQL 5.6 added some croatian and vitanamese character set collations that are incompatible with MariaDB.

The fix is to move the MariaDB conflicting collation numbers out of the region that MySQL is likely to use.
mysql_upgrade, REPAIR TABLE or ALTER TABLE will fix the collations.
If one tries to access and old incompatible table, one will get the error "Table upgrade required...."
After this patch, MariaDB supports all the MySQL character set collations and the old MariaDB croatian collations, which are closer to the latest standard than the MySQL versions.

New character sets:
ucs2_croatian_mysql561_uca_ci
utf8_croatian_mysql561_uca_ci
utf16_croatian_mysql561_uca_ci
utf32_croatian_mysql561_uca_ci
utf8mb4_croatian_mysql561_uca_ci

Other things:
- Fixed some compiler warnings
- mysql_upgrade prints information about repaired tables.
- Increased version number

VERSION:
  Increased VERSION number
client/mysqlcheck.c:
  Print repaired table name when using --verbose
include/m_ctype.h:
  Add new MariaDB collation regions that are not likely to conflict with MySQL
include/my_base.h:
  Added flag to detect if table was opened for ALTER TABLE
mysql-test/r/ctype_ldml.result:
  Updated result
mysql-test/r/ctype_uca.result:
  Updated result
mysql-test/r/ctype_upgrade.result:
  Updated result
mysql-test/r/ctype_utf16_uca.result:
  Updated result
mysql-test/r/ctype_utf32_uca.result:
  Updated result
mysql-test/r/ctype_utf8mb4_uca.result:
  Updated result
mysql-test/std_data/ctype_upgrade:
  Test files for testing upgrading of conflicting collations
mysql-test/suite/engines/funcs/r/db_alter_collate_ascii.result:
  New collations added
mysql-test/suite/engines/funcs/r/db_alter_collate_utf8.result:
  New collations added
mysql-test/suite/innodb/r/innodb_ctype_ldml.result:
  Updated test result
mysql-test/suite/innodb/t/innodb_ctype_ldml.test:
  Updated test result
mysql-test/suite/plugins/r/show_all_plugins.result:
  Updated version number
mysql-test/suite/roles/create_and_drop_role_invalid_user_table.result:
  Updated version number
mysql-test/t/ctype_ldml.test:
  Updated test
mysql-test/t/ctype_uca.test:
  Testing of new collations
mysql-test/t/ctype_upgrade.test:
  Testing of upgrading tables with old collations
  The test ensures that:
  - We will get an error if we try to open a table with old collations.
  - CHECK TABLE will detect that the table needs to be upgraded.
  - ALTER TABLE and REPAIR will fix the table.
  - mysql_upgrade works as expected
mysql-test/t/ctype_utf16_uca.test:
  Testing of new collations
mysql-test/t/ctype_utf32_uca.test:
  Testing of new collations
mysql-test/t/ctype_utf8mb4_uca.test:
  Testing of new collations
mysys/charset-def.c:
  Added new character sets
mysys/charset.c:
  Always give an error, if requested, if a character set didn't exist
sql/handler.cc:
  - Added upgrade_collation() to check if collation is compatible with old version
  - check_collation_compatibility() checks if we are using an old collation from MariaDB 5.5 or MySQL 5.6
  - ha_check_for_upgrade() returns HA_ADMIN_NEEDS_ALTER if we have an incompatible collation
sql/handler.h:
  Added new prototypes
sql/sql_table.cc:
  - Mark that tables are opened for ALTER TABLE
  - If table needs to be upgraded, ensure we are not using online alter table.
sql/table.cc:
  - If we are using an old incompatible collation, change to use the new one and mark table as incompatible.
  - Give an error if we try to open an incompatible table.
sql/table.h:
  Added error that table needs to be rebuild
storage/connect/ha_connect.cc:
  Fixed compiler warning
strings/ctype-uca.c:
  New character sets
2013-11-09 00:20:07 +02: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
Olivier Bertrand
1c5c2c6db9 - Fix a few test in TYPVAL<PSZ> that cause Valgrind warnings
modified:
  storage/connect/value.cpp

- Ignore column comment field in TabColumns because its pointer is flagged
  as invalid by Valgrind (this is a bypass but not a real fix)

modified:
  storage/connect/tabutil.cpp
  storage/connect/value.cpp
2013-07-25 19:09:46 +02:00
Olivier Bertrand
319414398f - Modify discovery to test a new way of adding columns. Currently the
old way is still used if NEW_WAY is not defined.

modified:
  storage/connect/ha_connect.cc
2013-07-25 19:05:57 +02:00
Sergey Vojtovich
e8d593fbda MDEV-4786 - merge 10.0-monty - 10.0
Fixed connect compilation failure (with ODBC).

storage/connect/odbconn.cpp:
  min/max are not defined by my_global.h anymore, include osutil.h instead.
2013-07-24 16:45:24 +04:00
Sergey Vojtovich
b2aea91fcb MDEV-4786 - merge 10.0-monty → 10.0
Fixed connect compilation failure.

storage/connect/csort.cpp:
  min/max are not defined by my_global.h anymore, include osutil.h instead.
storage/connect/filamfix.cpp:
  min/max are not defined by my_global.h anymore, include osutil.h instead.
storage/connect/ha_connect.cc:
  Renamed MYSQL_ERROR -> Sql_condition.
  Renamed KEY::key_parts -> KEY::user_defined_key_parts.
  Adjusted connect according to:
  WL#4305 - storage-engine private data area per physical table.
storage/connect/ha_connect.h:
  Adjusted connect according to:
  WL#4305 - storage-engine private data area per physical table.
storage/connect/inihandl.c:
  min/max are not defined by my_global.h anymore, include osutil.h instead.
storage/connect/osutil.h:
  min/max are not defined by my_global.h anymore, define them for C as well.
storage/connect/taboccur.cpp:
  Include server headers before osutil.h to avoid min/max redefinition.
storage/connect/tabpivot.cpp:
  Include server headers before osutil.h to avoid min/max redefinition.
storage/connect/tabtbl.cpp:
  Include server headers before osutil.h to avoid min/max redefinition.
storage/connect/tabxcl.cpp:
  Include server headers before osutil.h to avoid min/max redefinition.
storage/connect/value.cpp:
  min/max are not defined by my_global.h anymore, include osutil.h instead.
  Include server headers before osutil.h to avoid min/max redefinition.
2013-07-23 18:29:16 +04:00
Olivier Bertrand
b7f435f2ff - Fix bug causing connect_assisted_discovery to fail
on some table types (WMI). In add_field a decimal value
  could be specified for columns not being DOUBLE.

modified:
  storage/connect/ha_connect.cc
2013-07-20 19:22:12 +02:00
Olivier Bertrand
0eaa7c2f71 - CONNECT not should use query cache because working on
external data prone to be modified out of MariaDB

modified:
  storage/connect/ha_connect.h
2013-07-12 11:25:01 +02:00
Olivier Bertrand
12f3cb01e9 - Fix "Result content mismatch"
modified:
  storage/connect/mysql-test/connect/r/mysql.result
  storage/connect/mysql-test/connect/t/mysql.test
2013-07-12 11:18:54 +02:00
Olivier Bertrand
9492c7f15c - Applying temporary restrictions to test files.
This is to suppress some valgrind warnings and consist principally in:
  1 - Not supporting connect_assisted_discovery to all PROXY based table types
  2 - Not supporting the PIVOT table type
  This temporarily until the valgrind errors/warnings are fixed

modified:
  storage/connect/ha_connect.cc
  storage/connect/mysql-test/connect/r/mysql.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-11 17:45:31 +02:00
Olivier Bertrand
d24e1fc82a - cleaning code and show some functions return code
modified:
  storage/connect/odbconn.cpp
2013-07-11 17:44:15 +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
Alexander Barkov
17f3ae267f Merging from 10.0-connect
added:
  storage/connect/mysql-test/connect/r/mul.result
  storage/connect/mysql-test/connect/t/mul.test
modified:
  storage/connect/domdoc.h
  storage/connect/filamfix.cpp
  storage/connect/filamtxt.cpp
  storage/connect/filamvct.cpp
  storage/connect/fmdlex.c
  storage/connect/global.h
  storage/connect/ha_connect.cc
  storage/connect/ha_connect.h
  storage/connect/inihandl.c
  storage/connect/inihandl.h
  storage/connect/libdoc.cpp
  storage/connect/libdoc.h
  storage/connect/mycat.cc
  storage/connect/myconn.cpp
  storage/connect/mysql-test/connect/r/dbf.result
  storage/connect/mysql-test/connect/t/odbc_sqlite3.test
  storage/connect/myutil.cpp
  storage/connect/odbconn.cpp
  storage/connect/osutil.c
  storage/connect/plgdbsem.h
  storage/connect/plgdbutl.cpp
  storage/connect/plgxml.h
  storage/connect/plugutil.c
  storage/connect/tabdos.cpp
  storage/connect/tabfix.cpp
  storage/connect/tabmul.cpp*
  storage/connect/tabmysql.cpp
  storage/connect/tabmysql.h
  storage/connect/taboccur.cpp
  storage/connect/taboccur.h
  storage/connect/tabodbc.cpp
  storage/connect/tabpivot.h
  storage/connect/tabsys.cpp
  storage/connect/tabtbl.cpp
  storage/connect/tabtbl.h
  storage/connect/tabvct.cpp
  storage/connect/tabxml.cpp
  storage/connect/valblk.cpp
  storage/connect/value.cpp
  storage/connect/xindex.cpp
pending merges:
  Olivier Bertrand 2013-07-08 - Suppressing wrong code (INI tables are not...
    Alexander Barkov 2013-07-08 Adding instructions on how to install sq...
    Alexander Barkov 2013-07-08 Fixing some of the memory leaks in ODBCC...
    Alexander Barkov 2013-07-08 Fixing a warning:
    Alexander Barkov 2013-07-08 Fixing warnings:
    Alexander Barkov 2013-07-08 Fixing a warning:
    Alexander Barkov 2013-07-08 Fixing warnings:
    Alexander Barkov 2013-07-08 Fixing a warning:
    Alexander Barkov 2013-07-08 Fixing warnings:
    Alexander Barkov 2013-07-08 Fixing warnings:
    Alexander Barkov 2013-07-08 fixing warnings:
    Alexander Barkov 2013-07-08 Fixing a typo in the previous push
    Alexander Barkov 2013-07-08 fixing warnings:
    Alexander Barkov 2013-07-08 Fixing the "no previous declaration for ...
    Alexander Barkov 2013-07-08 Fixing numerous "variable is set but nev...
    Olivier Bertrand 2013-07-06 - Remove unuseful option causing valgrin...
    Olivier Bertrand 2013-07-05 - Try to fix a uninitialised valgrind wa...
    Olivier Bertrand 2013-07-04 - Make sure Remark is initialised
    Olivier Bertrand 2013-07-04 - Make sure Remark is initialised in ha_...
    Olivier Bertrand 2013-07-03 - Makes memory check conditionally
    Olivier Bertrand 2013-07-03 - Make sure result are ordered the same ...
    Olivier Bertrand 2013-07-02 - Fix memory leak in libdoc.cpp in LIBXM...
    Olivier Bertrand 2013-06-30 - Working on eliminating valgrind warnin...
    Olivier Bertrand 2013-06-30 - Trying to get rid of some valgrind war...
    Olivier Bertrand 2013-06-29 - Release storage allocated by flex
    Olivier Bertrand 2013-06-29 - Add the PROFILE_End function in inihan...
    Olivier Bertrand 2013-06-28 - Release memory allocated by inihandl i...
    Olivier Bertrand 2013-06-26 - Trying to remove those warnings about ...
    Olivier Bertrand 2013-06-26 - In connect_assisted_discovery the test...
    Olivier Bertrand 2013-06-26 - Fix potential bug in MYSQLCOL::WriteCo...
    Olivier Bertrand 2013-06-16 - Implemented: The use of Federated serv...
    Olivier Bertrand 2013-06-14 - Add a test case for multiple tables
    Olivier Bertrand 2013-06-14 - Fix regression error for multiple 2 ta...
    Olivier Bertrand 2013-06-12 - To avoid crashing in debug mode, the e...
    Olivier Bertrand 2013-06-12 - Suballocate filename in TDBMUL::InitFi...
    Olivier Bertrand 2013-06-12 - Add trace in TDBMUL::GetMaxSize.
    Olivier Bertrand 2013-06-12 - Fix MDEV-4638
    Olivier Bertrand 2013-06-08 [merge] - Commit merged changes
    Alexander Barkov 2013-06-08 Enabling Connect tests
    Olivier Bertrand 2013-06-08 - Set timeout values in MYSQLC::Open
2013-07-08 17:21:47 +04:00
Olivier Bertrand
f3078f01b2 - Suppressing wrong code (INI tables are not indexables)
modified:
  storage/connect/tabsys.cpp
2013-07-08 12:20:12 +02:00
Alexander Barkov
ba0abd7717 Adding instructions on how to install sqlite3 ODBC driver
for test purposes.

modified:
  storage/connect/mysql-test/connect/t/odbc_sqlite3.test
2013-07-08 13:39:45 +04:00
Alexander Barkov
d7283bc59a Fixing some of the memory leaks in ODBCColumns().
modified:
  storage/connect/odbconn.cpp
2013-07-08 13:11:40 +04:00
Alexander Barkov
a8fb8e141e Fixing a warning:
- cast to pointer from integer of different size 

modified:
  storage/connect/odbconn.cpp
2013-07-08 11:43:45 +04:00
Alexander Barkov
309f59a5c8 Fixing warnings:
- 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
2013-07-08 11:28:07 +04:00
Alexander Barkov
6dbc562b5d Fixing a warning:
- no previous declaration for ‘void* ThreadOpen(void*)’


modified:
  storage/connect/tabtbl.h
2013-07-08 11:26:24 +04:00
Alexander Barkov
a3c4f8729d Fixing warnings:
- no previous declaration for ‘bool OcrSrcCol'
- no previous declaration for ‘bool OcrColumns'
- no previous declaration for ‘_qryres* PivotColumns'

modified:
  storage/connect/ha_connect.cc
  storage/connect/taboccur.h
  storage/connect/tabpivot.h
2013-07-08 11:22:32 +04:00
Alexander Barkov
c5b631cefa Fixing a warning:
- no previous declaration for ‘int PrepareColist

modified:
  storage/connect/taboccur.cpp
2013-07-08 11:16:16 +04:00
Alexander Barkov
63522ed38e Fixing warnings:
- no previous declaration for ‘char* GetIni(int)’
- no previous declaration for ‘void SetTrc()’

modified:
  storage/connect/plgdbsem.h
  storage/connect/plgdbutl.cpp
2013-07-08 11:11:53 +04:00
Alexander Barkov
e46f8f3d0a Fixing warnings:
- no previous declaration for ‘void XmlCleanupParserLib()’
- no previous declaration for ‘void CloseXML2File’
- no previous declaration for ‘void XmlInitParserLib()’

modified:
  storage/connect/ha_connect.cc
  storage/connect/libdoc.cpp
  storage/connect/libdoc.h
  storage/connect/plgdbutl.cpp
2013-07-08 11:05:59 +04:00
Alexander Barkov
f9ba807354 fixing warnings:
- no previous declaration for ‘ddwrap’
- implicit declaration of function ‘ddwrap’

modified:
  storage/connect/fmdlex.c
2013-07-08 10:52:20 +04:00
Alexander Barkov
f2d2c1ea32 Fixing a typo in the previous push
modified:
  storage/connect/fmdlex.c
2013-07-08 10:49:50 +04:00
Alexander Barkov
269fd01bc1 fixing warnings:
- no previous declaration for ‘_isatty’
- implicit declaration of function ‘_isatty’

modified:
  storage/connect/fmdlex.c
  storage/connect/osutil.c
2013-07-08 10:46:15 +04:00
Alexander Barkov
e2461d47cb Fixing the "no previous declaration for ‘_strerror'" warning.
modified:
  storage/connect/filamvct.cpp
  storage/connect/osutil.c
  storage/connect/tabvct.cpp
2013-07-08 10:37:09 +04:00
Alexander Barkov
66c1665e89 Fixing numerous "variable is set but never used" warnings.
modified:
  storage/connect/filamfix.cpp
  storage/connect/filamtxt.cpp
  storage/connect/filamvct.cpp
  storage/connect/odbconn.cpp
  storage/connect/tabodbc.cpp
  storage/connect/xindex.cpp
2013-07-08 10:20:53 +04:00
Olivier Bertrand
6344644043 - Remove unuseful option causing valgrind error or warning
modified:
  storage/connect/myconn.cpp
2013-07-06 10:58:22 +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
923eddcfe1 - Make sure Remark is initialised
modified:
  storage/connect/ha_connect.cc
2013-07-04 23:13:07 +02:00
Olivier Bertrand
29ec49b067 - Make sure Remark is initialised in ha_connect::GetColumnOption
modified:
  storage/connect/ha_connect.cc
2013-07-04 20:09:50 +02:00
Olivier Bertrand
ffedc6b891 - Makes memory check conditionally
modified:
  storage/connect/libdoc.cpp
2013-07-03 23:58:22 +02:00
Olivier Bertrand
59b3833c41 - Make sure result are ordered the same on all platforms
modified:
  storage/connect/mysql-test/connect/r/mul.result
  storage/connect/mysql-test/connect/t/mul.test
2013-07-03 12:06:49 +02:00
Olivier Bertrand
37fce46f66 - Fix memory leak in libdoc.cpp in LIBXMLDOC::GetNodeList replacing
xmlXPathFreeNodeSetList(Xop);         // Caused memory leak, by
  xmlXPathFreeObject(Xop);

modified:
  storage/connect/libdoc.cpp
2013-07-02 00:07:48 +02:00
Olivier Bertrand
29f10f0ff1 - Working on eliminating valgrind warning/errors
modified:
  storage/connect/tabdos.cpp
  storage/connect/tabfix.cpp
  storage/connect/value.cpp
2013-06-30 19:08:09 +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
639ce0650c - Release storage allocated by flex
modified:
  storage/connect/fmdlex.c
2013-06-29 22:53:21 +02:00
Olivier Bertrand
b8d6f97380 - Add the PROFILE_End function in inihandl. Called by connect_done_func
to release the cache memory allocated by the PROFILE perocessing.
  (also add some break at the end of switch's to avoid warnings)

modified:
  storage/connect/filamvct.cpp
  storage/connect/ha_connect.cc
  storage/connect/inihandl.c
  storage/connect/inihandl.h
2013-06-29 01:10:31 +02:00
Olivier Bertrand
9508e913e7 - Release memory allocated by inihandl in connect_done_func.
modified:
  storage/connect/ha_connect.cc

- Remove unuseful last change

modified:
  storage/connect/block.h
2013-06-28 14:22:32 +02:00
Olivier Bertrand
2662ae4b2b - Trying to remove those warnings about non virtual destructor
modified:
  storage/connect/block.h
2013-06-26 20:00:15 +02:00
Olivier Bertrand
d662c48a68 - In connect_assisted_discovery the test on topt->quoted must
be done on its signed value

modified:
  storage/connect/ha_connect.cc
2013-06-26 19:52:38 +02:00
Olivier Bertrand
c6c1a6e2e8 - Fix potential bug in MYSQLCOL::WriteColumn: ShowValue was call with
*Bind->length instead of Bind->buffer_length

modified:
  storage/connect/tabmysql.cpp
2013-06-26 19:42:28 +02:00
Olivier Bertrand
b5130b5bd2 - Implemented: The use of Federated servers.
modified:
  storage/connect/global.h
  storage/connect/ha_connect.cc
  storage/connect/plugutil.c
  storage/connect/tabmysql.cpp
  storage/connect/tabmysql.h
  storage/connect/tabtbl.cpp
2013-06-16 19:07:27 +02:00