Commit graph

103 commits

Author SHA1 Message Date
Olivier Bertrand
35f813143b - Set tdbp to NULL when ignored
modified:
  storage/connect/ha_connect.cc
2013-05-13 10:37:35 +02:00
Olivier Bertrand
8c9ce17359 - Code cleaning.
modified:
  storage/connect/connect.cc
  storage/connect/tabutil.h

- Fix closing invalid tdbp in External_lock.
modified:
  storage/connect/ha_connect.cc

- Fix closing null Tdbp
modified:
  storage/connect/tabpivot.cpp*

- Fix regression error in table type TBL no more accepting missing
  columns in sub-tables even when Accept was set to TRUE.
modified:
  storage/connect/tabtbl.cpp
2013-05-12 18:14:03 +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
5fc19f8db8 - Add test for XCOL and OCCUR tables
- Fix a bug causing a crash when doing an ALTER TABLE
  (because create_info->alias is NULL)

added:
  storage/connect/mysql-test/connect/r/occur.result
  storage/connect/mysql-test/connect/r/xcol.result
  storage/connect/mysql-test/connect/t/occur.test
  storage/connect/mysql-test/connect/t/xcol.test
modified:
  storage/connect/ha_connect.cc
2013-05-04 00:47:55 +02:00
Olivier Bertrand
f3e944099e - Adding a loop test to prevent PROXY based table to loop when repointing on itself.
- Fix bug causing PROXY on non CONNECT tables to sometimes use the wrong DB.
- Making some more tests in create that were in pre_create not called anymore
  when columns are defined.
- Updating some test results to reflect new warnings.

modified:
  storage/connect/ha_connect.cc
  storage/connect/mysql-test/connect/r/tbl.result
  storage/connect/mysql-test/connect/r/upd.result
  storage/connect/tabcol.h
  storage/connect/tabmysql.cpp
  storage/connect/taboccur.cpp
  storage/connect/taboccur.h
  storage/connect/tabtbl.cpp
  storage/connect/tabtbl.h
  storage/connect/tabutil.cpp
  storage/connect/tabutil.h
  storage/connect/tabxcl.cpp
  storage/connect/tabxcl.h
2013-05-02 16:33:15 +02:00
Olivier Bertrand
3d4adc3fdf - Change in connect_assisted_discovery the default value for port from MYSQL_PORT
to 0. So it can be later set to mysqld_port if necessary. Doing so, it is no
  more required to specify port when using the current port and the current port
  is not equal to MYSQL_PORT (3306)

modified:
  storage/connect/ha_connect.cc
2013-04-30 17:48:18 +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
Alexander Barkov
b44f11c994 Fixing compilation failure in Solaris/OpenSolaris
error: too many initializers for `tm'

modified:
  storage/connect/ha_connect.cc
2013-04-21 18:38:08 +04:00
Alexander Barkov
a6a4fa1d6f Fixing a few problems found by Build Bot after merging the CONNECT engine.
modified:
  @ mysql-test/r/mysqld--help.result
  @ mysql-test/t/mysqld--help.test
  Supressing information about "--connect" in "mysqld --help" output,
  as it depends on the build parameters.
  As a side effect information about --connect-timeout is now also suppressed :(

  @ storage/connect/CMakeLists.txt
  Removing gcc warning switches that do not exists in some older gcc versions.

  @ storage/connect/ha_connect.cc
  Adding a quick fix: cast from "const char *" to "char *".
  Olivier should do a better fix eventually.
2013-04-20 19:23:33 +04:00
Alexander Barkov
548399f6d0 After-fix for Sergei's merge of the connect engine.
odbc_sqlite3 failed. Fixed.

modified:
  storage/connect/ha_connect.cc
  storage/connect/mysql-test/connect/r/odbc_sqlite3.result
  storage/connect/mysql-test/connect/t/odbc_sqlite3.test
2013-04-20 00:24:05 +04:00
Sergei Golubchik
6bd49441b5 CONNECT engine fixes after 10.0 merge.
Adaptation to new API, small simplifications and bug fixes
2013-04-19 20:35:43 +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
9b790248c5 - Add routine to test index equality
modified:
  storage/connect/ha_connect.cc
  storage/connect/ha_connect.h
  storage/connect/xindex.h
2013-04-10 14:24:28 +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
806ca8ddb5 - Do not check columns name length of dbf catalog tables. They return info
on a dbf table but are not dbf tables.

modified:
  storage/connect/ha_connect.cc
2013-04-05 23:57:30 +02:00
Olivier Bertrand
4adb4256cc - Update some DBUG_PRINT to avois warning on Linux
modified:
  storage/connect/connect.cc
  storage/connect/ha_connect.cc
2013-04-04 23:27:54 +02:00
Olivier Bertrand
7e0f591f6a - Do not accept creating XML2 tables when libxml2 is not available
modified:
  storage/connect/ha_connect.cc
2013-04-04 15:36:42 +02:00
Alexander Barkov
d12e1c92a1 Adding security tests for "ALTER TABLE t1 FILE_NAME='xxx'"
modified:
  mysql-test/suite/connect/r/bin.result
  mysql-test/suite/connect/r/csv.result
  mysql-test/suite/connect/r/dbf.result
  mysql-test/suite/connect/r/fix.result
  mysql-test/suite/connect/r/vec.result
  mysql-test/suite/connect/r/xml.result
  mysql-test/suite/connect/t/grant.inc
  storage/connect/ha_connect.cc
2013-04-04 11:31:20 +04:00
Olivier Bertrand
b0e07ff5b7 - Commit added test on TBL tables
+ update dbf.result

added:
  mysql-test/suite/connect/r/tbl.result
  mysql-test/suite/connect/t/tbl.test
modified:
  mysql-test/suite/connect/r/dbf.result

- Fix bug on generating default file name for TBL sub-tables

modified:
  storage/connect/ha_connect.cc
2013-04-04 01:14:26 +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
b1031b2359 - Fold type name to lowercase when used for default file type
modified:
  storage/connect/ha_connect.cc
2013-04-02 12:54:57 +02:00
Olivier Bertrand
3389e81dd1 - Commit pulled changes
added:
  mysql-test/suite/connect/r/secure_file_priv.result
  mysql-test/suite/connect/t/secure_file_priv-master.opt
  mysql-test/suite/connect/t/secure_file_priv.test
modified:
  storage/connect/ha_connect.cc
2013-04-02 11:35:38 +02:00
Olivier Bertrand
0f5c5a29f9 - Comment out the last commited change
modified:
  storage/connect/ha_connect.cc
2013-04-02 11:31:46 +02:00
Alexander Barkov
4bba25543d Respect the --secure-file-priv server option when working with
tables having the FILE_NAME='xxx' table option.

added:
  mysql-test/suite/connect/r/secure_file_priv.result
  mysql-test/suite/connect/t/secure_file_priv-master.opt
  mysql-test/suite/connect/t/secure_file_priv.test
modified:
  storage/connect/ha_connect.cc
2013-04-02 13:10:42 +04:00
Alexander Barkov
86eeb04a93 Fixing a crash in the latest push from Olivier.
modified:
  storage/connect/ha_connect.cc
2013-04-01 09:34:39 +04:00
Olivier Bertrand
879be566e0 - Add some warnings to Create Table process
modified:
  storage/connect/filamvct.cpp
  storage/connect/ha_connect.cc
2013-03-30 22:06:35 +01:00
Olivier Bertrand
dd8c89b2f4 - Fix problems related to table file names when not specified:
Split unspecified VEC tables are no more allowed.
  Empty XML files are now accepted.
  Separate index files are now depending upon the SEPINDEX option
  and not allowed when file name is not specified.
  DROP now can erase table and index file.

modified:
  storage/connect/ha_connect.cc
  storage/connect/tabdos.cpp
  storage/connect/tabxml.cpp
2013-03-29 01:28:48 +01: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
6a15b5f870 - Wrong FLAG values transmitted to created table by the AS SELECT table:
It is not enough to ignore the flags while populating the table. They have
  to be removed from the definition in pre_create. The issue is to pass the
  info from the selected table handler to the created table handler.
  It is done via the only common item between them: the GLOBAL structure.

modified:
  storage/connect/global.h
  storage/connect/ha_connect.cc
  storage/connect/ha_connect.h
  storage/connect/plugutil.c
2013-03-23 19:47:51 +01:00
Olivier Bertrand
6c6d6fbf41 - Fix bug: When a table is created ... AS SELECT ... the offsets (FLAG value)
of the source table columns must be ignored by the created table.

modified:
  storage/connect/ha_connect.cc
  storage/connect/ha_connect.h
2013-03-23 16:00:09 +01:00
Olivier Bertrand
322a99b097 - Fix check_if_incompatible_data to correctly get thd.
modified:
  storage/connect/ha_connect.cc
2013-03-22 12:57:24 +01:00
Olivier Bertrand
2ad6e653eb - Fix bug to allow creating views.
modified:
  storage/connect/ha_connect.cc
2013-03-22 12:49:41 +01:00
Alexander Barkov
70622eaac8 Fixing compilation failure in Windows: unknown symbol "any_db".
modified:
  storage/connect/ha_connect.cc
2013-03-22 14:05:15 +04:00
Alexander Barkov
8087daaeb3 Require FILE privilege to DROP a table with FILE_NAME.
modified:
  mysql-test/suite/connect/r/bin.result
  mysql-test/suite/connect/t/grant.inc
  storage/connect/ha_connect.cc
  storage/connect/ha_connect.h
2013-03-22 13:44:21 +04:00
Alexander Barkov
79f84fdc77 - Require FILE privilege for the file based TABLE_TYPEs
when FILE_NAME is specified

- Require FILE privileges for the TABLE_TYPEs that
  access to the underlying operating system:
  ODBC, MYSQL, DIR, MAC, WMI, OEM.

added:
  mysql-test/suite/connect/t/grant.inc
modified:
  mysql-test/suite/connect/r/bin.result
  mysql-test/suite/connect/t/bin.test
  storage/connect/ha_connect.cc
  storage/connect/ha_connect.h
2013-03-22 11:28:58 +04:00
Alexander Barkov
356402356a Removing executable flag.
modified:
  storage/connect/ha_connect.cc*
2013-03-21 11:34:58 +04:00
Olivier Bertrand
fff28085d8 - A specified table type not supported is now flagged as an error
instead of being replaced by the default type DOS.

modified:
  mysql-test/suite/connect/r/general.result
  mysql-test/suite/connect/t/general.test
  storage/connect/ha_connect.cc
2013-03-20 23:42:23 +01:00
Olivier Bertrand
964a423d2c - Fix a bug causing the index file not being made or erased on statements
such as CREATE INDEX, DROP INDEX, ALTER TABLE... ADD INDEX etc.

modified:
  storage/connect/ha_connect.cc
2013-03-20 00:52:32 +01:00
Olivier Bertrand
19e9fa45ea - Use all columns in case of INSERT so default values are generated for
columns not specified in the statemant.

modified:
  storage/connect/ha_connect.cc
2013-03-19 18:45:05 +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
d2b6d80bc8 - A quick and dirty fix for erased or not erased files when executing an
Alter table on an auto-generated CONNECT table.

modified:
  storage/connect/ha_connect.cc
2013-03-15 00:11:46 +01:00
Olivier Bertrand
1c4a3eb9a6 - Fix bug on ALTER TABLE t1 MODIFY a VARCHAR(10) NOT NULL;
modified:
  storage/connect/ha_connect.cc
2013-03-13 16:06:02 +01:00
Olivier Bertrand
74115f5fa3 - Commit changes from ubuntu
modified:
  storage/connect/ha_connect.cc*
2013-03-13 02:02:44 +01:00
unknown
14f3d5a6c3 - Fix a GCC compile error (crosses initialization of pos) an change
_O_CREAT to O_CREAT

modified:
  storage/connect/ha_connect.cc
  
- Change mode to -x

modified:
  mysql-test/suite/connect/t/index.test*
  storage/connect/filamap.cpp*
2013-03-13 01:56:01 +01:00
Olivier Bertrand
b210168752 - Handle delete_table and rename_table for CONNECT tables whose files are
auto generated and must be erased or renamed on Drop or Rename Table.
  TODO: Take care of eventual index files.

modified:
  storage/connect/ha_connect.cc
  storage/connect/ha_connect.h
2013-03-13 01:10:20 +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
17fb343a5c - Add tiny integer as a supported type by CONNECT
modified:
  storage/connect/global.h
  storage/connect/ha_connect.cc
  storage/connect/myutil.cpp
  storage/connect/plgdbutl.cpp
  storage/connect/tabdos.cpp
  storage/connect/tabwmi.cpp
  storage/connect/valblk.cpp
  storage/connect/valblk.h
  storage/connect/value.cpp
  storage/connect/value.h
  storage/connect/xobject.cpp
2013-03-11 16:52:59 +01:00
Olivier Bertrand
cb1847df32 - Make indexes to be rebuilt on Update only when an indexed column was updated.
modified:
  mysql-test/suite/connect/r/index.result
  mysql-test/suite/connect/t/index.test
  storage/connect/ha_connect.cc
  storage/connect/tabdos.cpp
  storage/connect/xindex.cpp
2013-03-10 19:48:45 +01:00
Olivier Bertrand
7a30ec7231 - XML and INI tables now return NULL when a node does not exist in a row (XML)
or if the key is missing in a section (INI)

modified:
  mysql-test/suite/connect/r/ini.result
  mysql-test/suite/connect/r/xml.result
  storage/connect/tabsys.cpp
  storage/connect/tabxml.cpp

- Do a sub-storage cleanup on info commands and fix a limit of column number
  in ODBCColumns. This was doing a crash for unexpected longjmp when many info
  commands were executed in a row.

modified:
  storage/connect/ha_connect.cc
  storage/connect/odbconn.cpp
2013-03-10 15:10:00 +01:00