- 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
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
- 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
- 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
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
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
1. Conflicting declarations:
In file included from /usr/include/sql.h:19:0,
from <path>/storage/connect/odbconn.h:15,
from <path>/storage/connect/ha_connect.cc:117:
/usr/include/sqltypes.h:98:23: error: conflicting declaration
‘typedef unsigned int DWORD’
os.h and unixODBC's sqltypes.h (included from sql.h) have conflicting
declarations, because unixODBC for some reasons incorrectly defines
DWORD as "unsigned int", while we define DWORD as "unsigned long"
(which is the Microsoft way).
We should never include os.h and odbconn.h from the same file.
Inside tabodbc.cpp DWORD must be seen as sql.h defines it.
In all other files DWORD must be seen as os.h defines it.
Fix:
Moving ODBC catalog function prototypes into a separate file odbccat.h.
Fixing ha_connect.cc to include odbccat.h instead of odbcon.h
2. Use of ambiguous overloaded function in myconn.cpp:
There's no a method SetValue(const char *fmt, int i);
There's only a method SetValue(char *fmt, int i);
Fixing the call accordingly:
- crp->Kdata->SetValue((fmt) ? fmt : "", i);
+ crp->Kdata->SetValue((fmt) ? fmt : (char*) "", i);
Note, this is a quick hack. The correct fix would be to change
the method prototype to have the "fmt" argument as "const char *".
However, it is tightly related to about 300 other places where
"char*" is used instead of "const char *". We'll need to fix
all of them gradually (in separate changes).
added:
storage/connect/odbccat.h
modified:
storage/connect/ha_connect.cc
storage/connect/myconn.cpp
storage/connect/odbconn.h
storage/connect/tabodbc.cpp
Modified: ha_connect.cc (MakeRecord)
Moved PlgAllocResult to plgdbutl.cpp
Modified:
mycat.cpp
plgdbutl.cpp
Continuing implementing the "catalog" tables (ex "info").
Already existing were the ODBC data source table and the
WMI column info table.
The common way to handle them was modified to enable each
table types to send personalized data.
Now takes care of all existing catalog functions for table
types that can retrieve and use such information.
Modified:
ha_connect.cc
odbconn.cpp
tabodbc.h
tabodbc.cpp
tabfmt.h
tabfmt.cpp
tabmysql.h
tabmysql.cpp
tabwmi.h
tabwmi.cpp
myconn.h
myconn.cpp
filamdbf.cpp
plgdbsem.h
reldef.h
reldef.cpp
tabdos.h
tabdos.cpp
tabfix.h
xtable.h
table.cpp
included by the program using them.
Continuing implementing the "catalog" tables (ex "info").
Already existing were the ODBC data source table and the
WMI column info table.
A common way to handle them will permit to develop many
other such tables. Implemented:
The ODBC column catalog table.
The ODBC tables catalog table.
The ODBC drivers catalog table.
The INFO table option is replaced by the CATFUNC string option
whode first letter specifies the information to retrieve:
C: Columns (of a table)
T: Tables (of a database)
S: Data sources
D: Drivers
Modified:
ha_connect.cc
odbconn.cpp
odbconn.h
tabodbc.h
tabodbc.cpp
rcmsg.c
tabfmt.h
tabmysql.cpp
tabwmi.cpp
tabwmi.h
resource.h
myconn.h
filamdbf.h
connect.cc
connect.h
Added:
myutil.h
2) Fix bug on bad sprintf
3) Fix bug on cast from pointer to int
4) Begin implementing the "info" tables.
Already existing were the ODBC sata source table and the
WMI column info table.
A common way to handle them will permit to develop many
other such tables. Implemented:
The ODBC column info table.
Modified:
ha_connect.cc (4)
odbconn.cpp (4)
tabodbc.h (4)
tabodbc.cpp (4)
tabsys.h (3)
rcmsg.c (4)
tabfmt.cpp (2)
tabtbl.cpp (1)
resource.h (4)
mycat.h (4)
2) Fix bug on bad sprintf
3) Fix bug on cast from pointer to int
4) Begin implementing the "info" tables.
Already existing were the ODBC sata source table and the
WMI column info table.
A common way to handle them will permit to develop many
other such tables. Implemented:
The ODBC column info table.
Modified:
ha_connect.cc (4)
odbconn.cpp (4)
tabodbc.h (4)
tabodbc.cpp (4)
tabsys.h (3)
rcmsg.c (4)
tabfmt.cpp (2)
tabtbl.cpp (1)
resource.h (4)
mycat.h (4)
2) Fix bug on bad sprintf
3) Fix bug on cast from pointer to int
4) Begin implementing the "info" tables.
Already existing were the ODBC sata source table and the
WMI column info table.
A common way to handle them will permit to develop many
other such tables. Implemented:
The ODBC column info table.
Modified:
ha_connect.cc (4)
odbconn.cpp (4)
tabodbc.h (4)
tabodbc.cpp (4)
tabsys.h (3)
rcmsg.c (4)
tabfmt.cpp (2)
tabtbl.cpp (1)
resource.h (4)
mycat.h (4)
The formed required strings.lib in Windows.
The latter is an exported symbol from mysqld and does not need strings.lib.
modified:
storage/connect/ha_connect.cc
storage/connect/libdoc.cpp
2>D:\CommonSource\mariadb-10.0\include\my_pthread.h(120) : warning C4005: '_REENTRANT' : redéfinition de macro
2> D:\Libxml\include\libxml/xmlexports.h(77) : voir la définition précédente de '_REENTRANT'
2>.\libdoc.cpp(378) : error C2664: 'strlen' : impossible de convertir le paramètre 1 de 'xmlChar *' en 'const char *'
2> Les types pointés n'ont aucun rapport entre eux ; conversion nécessitant reinterpret_cast, cast de style C ou cast de style fonction
2>.\libdoc.cpp(379) : error C2664: 'copy_and_convert' : impossible de convertir le paramètre 4 de 'xmlChar *' en 'const char *'
2> Les types pointés n'ont aucun rapport entre eux ; conversion nécessitant reinterpret_cast, cast de style C ou cast de style fonction
2>
Fix for that.
- LIBXML2_SUPPORT is defined if LibXml2 is found
- DOMDOC_SUPPORT is defined if msxml is found
- XML_SUPPORT is defined if either of them are found
NOXML2 was removed
modified:
storage/connect/CMakeLists.txt
storage/connect/global.h
storage/connect/ha_connect.cc
storage/connect/plgdbutl.cpp
storage/connect/plgxml.cpp
The later is not portable (e.g. it does not exist on FreeBSD)
modified:
storage/connect/ha_connect.cc
storage/connect/user_connect.cc
storage/connect/user_connect.h
pre_create function and one is now able to create table
without giving the column specifications for tables of types:
DBF, ODBC, MYSQL, CSV, and WMI (on Windows)
modified:
sql/handler.h
sql/sql_table.cc
storage/connect/ha_connect.cc
storage/connect/ha_connect.h
storage/connect/mycat.cc
storage/connect/odbconn.cpp
storage/connect/plgcnx.h
storage/connect/tabfmt.cpp
storage/connect/tabmysql.cpp
storage/connect/tabwmi.cpp