Commit graph

76426 commits

Author SHA1 Message Date
Olivier Bertrand
24672d2db8 - Oops! db was no more initialized in pre-create. Fixed
modified:
  storage/connect/ha_connect.cc
  mysql-test/suite/connect/r/mysql.result  (merged)
  mysql-test/suite/connect/t/mysql.test    (merged)
2013-02-21 17:59:58 +01:00
Olivier Bertrand
183698b779 - Change DB_NAME option name to DBNAME. Temporarily, "database" is still
accepted in OPTION_LIST for compatibity but DB_NAME is no more recognized.

modified:
  storage/connect/ha_connect.cc
2013-02-21 17:48:35 +01:00
Alexander Barkov
d368a2f662 Suppress additional debug info printed in _DEBUG build
modified:
  mysql-test/suite/connect/t/mysql.test
2013-02-21 17:03:41 +04:00
Alexander Barkov
3db9803cdb Adding forgotten --replace_result for port number
modified:
  mysql-test/suite/connect/r/mysql.result
  mysql-test/suite/connect/t/mysql.test
2013-02-21 16:59:09 +04:00
Olivier Bertrand
9d7f134186 - Fix bad conversion from "bigint" to TYPE_FLOAT.
modified:
  storage/connect/myutil.cpp
2013-02-21 12:30:40 +01:00
Alexander Barkov
b0376d1e16 Adding tests for TABLE_TYPE=MySQL
added:
  mysql-test/suite/connect/r/mysql.result
  mysql-test/suite/connect/t/mysql.test
2013-02-21 13:49:47 +04:00
Alexander Barkov
c0f058871f Adding a test for entities
(special characters and characters outside of the file ENCODING)

modified:
  mysql-test/suite/connect/r/xml.result
  mysql-test/suite/connect/t/xml.test
2013-02-21 11:18:57 +04:00
Olivier Bertrand
9716acfcc3 - Re-install blank trimming to have the xml test pass.
Note that the problem if far more complex. To be revisited.

modified:
  storage/connect/libdoc.cpp
  storage/connect/tabxml.h
2013-02-20 23:23:35 +01:00
Olivier Bertrand
b63eb1d8b4 - Fix the elimination of control characters from node content
- Take care of XML special chars (<>& etc.)
- Remove Encode, Decode

modified:
  storage/connect/libdoc.cpp
  storage/connect/libdoc.h

- Neither libmysql.lib nor mysqlclient.lib needed for MYSQL table type

modified:
  storage/connect/CMakeLists.txt
2013-02-20 18:49:18 +01:00
Olivier Bertrand
26bf803c04 - Update the MYSQL table handling to use only client API functions.
It is no more necessary to be liked to libmysql.lib nor mysqlclient.lib.

modified:
  storage/connect/libdoc.cpp
  storage/connect/myconn.cpp
  storage/connect/myconn.h
  storage/connect/tabmysql.cpp
  storage/connect/tabmysql.h
2013-02-20 16:57:38 +01:00
Olivier Bertrand
818d0a5622 Suppress a warning on unused variable.
modified:
  storage/connect/reldef.cpp
2013-02-20 16:54:57 +01:00
Alexander Barkov
d0145eed7c Fixing test failure due to not strict order of the files.
Adding ORDER BY clause.

modified:
  mysql-test/suite/connect/r/dir.result
  mysql-test/suite/connect/t/dir.test
2013-02-20 18:27:04 +04:00
Alexander Barkov
d99d3da1d1 Removing the MODULE_ONLY option, to be able to run with valgrind.
(with MODULE_ONLY valgrind does not display file name and line number
if a problem happens inside a dlopen-ed plugin)

modified:
  storage/connect/CMakeLists.txt
2013-02-20 16:43:38 +04:00
Alexander Barkov
1e13640f4d Fixing problems with running tests caused by the fact that
"mysqld --connect" conflicts with "mysqld --connect-timeout".

(unfortunate design decision in how mysqld handles command line options).

modified:
  mysql-test/mysql-test-run.pl
  mysql-test/suite/connect/suite.opt
2013-02-20 16:34:07 +04:00
Alexander Barkov
ea0e250669 Fixing valgrind warning: uninitialized memory read.
modified:
  storage/connect/ha_connect.cc
2013-02-20 16:05:53 +04:00
Olivier Bertrand
1b7a907979 2013-02-20 01:40:17 +01:00
Olivier Bertrand
c448839c4f - Fix crash on making an XML table with encoding=XXX
- Set parameters so libxml2 does not anymore add extra characters
  when retrieving several subnodes of a node.
- Make a CONNECT file header (was PlugDB)

modified:
  storage/connect/domdoc.cpp
  storage/connect/libdoc.cpp
  storage/connect/tabxml.cpp

- Change the version number

modified:
  storage/connect/ha_connect.cc

- Begin eliminate use of libmysql functions in MYSQL table type
  Not finished yet

modified:
  storage/connect/myconn.cpp
  storage/connect/myconn.h
2013-02-20 01:30:37 +01:00
Alexander Barkov
1483aebeaa Adding tests for DATA_CHARSET and TABLE_TYPE=CSV.
modified:
  mysql-test/suite/connect/r/csv.result
  mysql-test/suite/connect/t/csv.test
2013-02-19 16:25:59 +04:00
Olivier Bertrand
2f48842a0f Commit merged changes. 2013-02-19 12:07:11 +01:00
Alexander Barkov
29cd5363b9 Removing unused code.
modified:
  storage/connect/ha_connect.cc
2013-02-19 14:29:55 +04:00
Alexander Barkov
59e95fe6bb Cmake clean-ups:
- Removing -DMYSQL_DYNAMIC_PLUGIN. Its automatically
  added by MYSQL_ADD_PLUGIN
- Replacing "IF(!XXX)" to "IF(NOT XXX)". The former is a wrong cmake syntax.

modified:
  storage/connect/CMakeLists.txt
2013-02-19 13:53:24 +04:00
Alexander Barkov
df153bb56b Adding tests to check that TABLE_TYPE=XML creates the XML
file according to the ENCODING option.

modified:
  mysql-test/suite/connect/r/xml.result
  mysql-test/suite/connect/t/xml.test
2013-02-19 13:02:33 +04:00
Olivier Bertrand
c1f244610b Don't why bazaar asked me to commit what was merged 2013-02-18 18:46:50 +01:00
Alexander Barkov
f41aadfaed Adding DATA_CHARSET table option. 2013-02-18 19:21:52 +04:00
Olivier Bertrand
739632cbe0 Moved PushWarning out of HAVE_PSI_INTERFACE brackets
Modified:
ha_connect.cc
2013-02-18 12:23:50 +01:00
Olivier Bertrand
8e1c194904 Modification of the ODBConn class to change m_henv member from
static to dynamic. Apparently this caused errors with a obscure
message saying "Invalid handle vale" (probably m_henv).

Modified:
odbconn.h
odbconn.cpp
2013-02-18 00:18:32 +01:00
Olivier Bertrand
618ce65aff Modification of the DBX class to have more information
in case of error while processing ODBC type tables.

Modified:
odbconn.h
odbconn.cpp
2013-02-17 11:34:40 +01:00
Olivier Bertrand
df1dfcff6c Put trace in ODBC source files
modified:
  storage/connect/odbconn.cpp
  storage/connect/tabodbc.cpp
2013-02-15 22:31:13 +01:00
Alexander Barkov
b8746ba916 Updating tests according to the latest Olivier's change
removing extra space characters in TABLE_TYPE=XML with libxml2

modified:
  mysql-test/suite/connect/r/xml.result
2013-02-15 20:07:53 +04:00
Olivier Bertrand
a2cf90d9ce Suppress multiple blanks and control characters from the
node text retrieved by libxml2.

Modified:
libdoc.cpp
2013-02-15 15:53:27 +01:00
Alexander Barkov
b2f11bf0c4 Adding a new test: creating a TABLE_TYPE=CSV table from a MyISAM table using
CREATE TABLE t2 ... AS SELECT * FROM t1;

modified:
  mysql-test/suite/connect/r/csv.result
  mysql-test/suite/connect/t/csv.test
2013-02-15 12:48:12 +04:00
Alexander Barkov
70e92c855e Recording error messages according to the last change from Olivier.
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/dir.result
  mysql-test/suite/connect/r/fix.result
  mysql-test/suite/connect/r/general.result
  mysql-test/suite/connect/r/ini.result
  mysql-test/suite/connect/r/vec.result
  mysql-test/suite/connect/t/dbf.test
  mysql-test/suite/connect/t/dir.test
  mysql-test/suite/connect/t/general.test
2013-02-15 09:42:10 +04:00
Olivier Bertrand
33b2c6fe7b Fixed a bug in ha_connect::GetListOption causing a crash
when passed a NULL oplist argument.

Modified:
ha_connect.cc
2013-02-15 02:15:48 +01:00
Olivier Bertrand
f83588a0f9 Implementing pre_create option test and setting of default values.
Currently, only TABLE_TYPE is tested, and if wrong or unspecified,
is replaced by the default value DOS.

- Test on type was moved from create to pre_create
- pre_create is now called unconditionally and must return true
  on error and false otherwise.
- Warnings are produced if the table type was changed.
- The errors have specific error messages (instead of being warnings
  with an error message telling that a table must have columns)

Modified:
ha_connect.cc
ha_connect.h
handler.h
sql_table.cc
2013-02-15 01:33:23 +01:00
Alexander Barkov
3a91f1a998 Code reorganization in the initialization and clean-up code.
- Getting rid of some duplicate code in the Windows and Linux sections
- Moving the initializationa and clean-up code to connect_init_func()
  and connect_done_func(). This allows to use services provided by
  mysqld, for example my_snprintf(), which do not work in
  "__attribute__((constructor))init()".
- Removing the "__attribute__((constructor)) init()" and
  "__attribute__((destructor)) fini()" functions
- Using MariaDB's my_getpw() instead of different calls for Windows
  and Linux.
- Fixing a potentially wrong memory write in strcat() when creating
  the full connect.ini file name.
  strcat() can go outside of the buffer size when directory name is
  long enough. Using safe my_snprintf() instead.

modified:
  storage/connect/ha_connect.cc
2013-02-14 17:41:10 +04:00
Alexander Barkov
7bc69b7ada Adding forgotten "--replace_result $MYSQLD_DATADIR DATADIR",
so it passed idependently from the source tree location.

modified:
  mysql-test/suite/connect/r/odbc_xls.result
  mysql-test/suite/connect/t/odbc_xls.test
2013-02-14 11:57:38 +04:00
Olivier Bertrand
3f2d762aa8 2013-02-14 01:51:05 +01:00
Olivier Bertrand
84cfd952a7 Warning message changed in ha_connect::check_if_incompatible_data.
Modified:
ha_connect.cc
2013-02-14 01:43:45 +01:00
Olivier Bertrand
15470f5d12 Warning message changed in ha_connect::check_if_incompatible_data.
Modified:
ha_connect.cc
2013-02-14 01:37:17 +01:00
Olivier Bertrand
481916ffda Update ha_connect::pre_create to restore the code translating
of SQL types previously done in the removed function MyODBCCols.

Modified:
ha_connect.cc
2013-02-14 00:32:29 +01:00
Olivier Bertrand
fb1ff4e9f5 Fix a typo that caused CONNECT to crash on ODBC catalog tables
in ODBCDEF::DefineAM line 106

Modified:
tabodbc.cpp
2013-02-14 00:26:03 +01:00
Alexander Barkov
103557d5a3 Adding a test for unknown TABLE_TYPE
added:
  mysql-test/suite/connect/r/general.result
  mysql-test/suite/connect/t/general.test
2013-02-13 17:34:41 +04:00
Alexander Barkov
e93079397f Adding READONLY tests
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/fmt.result
  mysql-test/suite/connect/r/ini.result
  mysql-test/suite/connect/r/vec.result
  mysql-test/suite/connect/t/bin.test
  mysql-test/suite/connect/t/csv.test
  mysql-test/suite/connect/t/dbf.test
  mysql-test/suite/connect/t/fix.test
  mysql-test/suite/connect/t/fmt.test
  mysql-test/suite/connect/t/ini.test
  mysql-test/suite/connect/t/vec.test
2013-02-13 16:52:35 +04:00
Olivier Bertrand
c523370389 Fix bug on readonly table option not recognized
in TABDEF::Define line 104

Modified:
reldef.cpp

Add a warning on alter in check_if_incompatible_data.

Modified:
ha_connect.cc
2013-02-13 00:51:41 +01:00
Olivier Bertrand
5fc2a7dadd Add a test on table types in ha_connect::create
- The plan was to provide a default type (DOS) when the table type
was unspecified, wring, or not supported.
- However, this is not possible here because create is called after
the FRM file was generated.
- Currently, this is flagged as an error and the create aborts.

Modified:
ha_connect.cc
2013-02-12 22:37:38 +01:00
Olivier Bertrand
83b7fb0f47 Fix a bug causing all tests to fail.
In mycat.cc line 308
+ correc typo in plgdbsem

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

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

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

Modified:
ha_connect.cc
odbccat.h
odbconn.cpp
tabodbc.cpp
tabfmt.cpp
tabmysql.h
tabmysql.cpp
tabwmi.cpp
mycat.h
mycat.cc
plgdbsem.h
reldef.h
tabdos.cpp
rcmsg.h
2013-02-12 12:34:14 +01:00
Alexander Barkov
b91386c2f6 Changing maximum possible column length for DBF tables from 11 to 10.
There is actually one extra byte for the 11th character, however it seems
to be meant for the '\0' terminating byte in the DBF specifications.
Also, the third party software (e.g. OpenOffice) do not correctly open
tables with column length=11.

modified:
  mysql-test/suite/connect/r/dbf.result
  mysql-test/suite/connect/t/dbf.test
  storage/connect/ha_connect.cc
2013-02-12 14:58:58 +04:00
Alexander Barkov
2adf52b85e Fixing ini.test failure on Linux:
No need to print "\n" before the very first section.

modified:
  storage/connect/inihandl.c
2013-02-11 18:32:40 +04:00
Alexander Barkov
237eda72eb Fixing vec.test failure on Windows.
- The "spath" column does not get replaces with $MYSQLD_DATADIR,
because it does not include the drive letter part, e.g. C:\.
Removing excluding spath from the "SELECT ... FROM dir1" query

- Warnings return slightly different text on Linux and Windows.
  Linux has extra "/./" part:
    DATADIR/./test/t1vec1

"--replace_result $MYSQLD_DATADIR DATADIR/" does not help.

Using --replace_regex instead.

modified:
  mysql-test/suite/connect/r/vec.result
  mysql-test/suite/connect/t/vec.test
2013-02-11 18:19:46 +04:00