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
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
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
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
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
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
- Change field option BUF_LENGTH to FIELD_LENGTH. It now used to specify
the field length of DATE columns (MySQL doesn't allow to give a length)
modified:
storage/connect/ha_connect.cc
update xempl set ddentree = adddate(ddentree, interval 16 year);
The same value sdval was used to convert MySQL dates to CONNECT date
value and CONNECT dates to MySQL date. This was wrong in update because
the second time the wrong value was used converting to incoherent values.
There are now 2 separate values used: sdvalin and sdvalout.
modified:
storage/connect/ha_connect.cc
storage/connect/ha_connect.h
and read as if the table DATA_CHARSET was ANSI instead of UTF-8. Warning
are now provided when the read content of a node is truncated.
modified:
storage/connect/domdoc.cpp
storage/connect/domdoc.h
storage/connect/libdoc.cpp
storage/connect/libdoc.h
storage/connect/plgxml.h
storage/connect/tabxml.cpp
- Conditional compilation of pre_create depending on the MARIADB setting.
modified:
storage/connect/ha_connect.cc
storage/connect/ha_connect.h
mysys/errors.c:
revert upstream's fix. use a much simpler one
mysys/my_write.c:
revert upstream's fix. use a simpler one
sql/item_xmlfunc.cc:
useless, but ok
sql/mysqld.cc:
simplify upstream's fix
storage/heap/hp_delete.c:
remove upstream's fix.
we'll use a much less expensive approach.
Trivial cleanup
scripts/mysqld_safe.sh:
Added support for --crash-script.
Don't remove socket file (not needed as server will re-create it if needed)
Patch by Eric Bergen
storage/maria/ha_maria.h:
Removed not existing variable.
- Use the COLDEF flag to initialize column nullable value.
- Fix a bug on inserting null values in MYSQL tables.
modified:
storage/connect/colblk.cpp
storage/connect/connect.cc
storage/connect/ha_connect.cc
storage/connect/odbconn.cpp
storage/connect/plgdbsem.h
storage/connect/table.cpp
storage/connect/tabmysql.cpp
- Fixing a bug that DBNAME value was forgotten when followed by OPTION_LIST.
modified:
mysql-test/suite/connect/r/mysql.result
mysql-test/suite/connect/t/mysql.test
storage/connect/ha_connect.cc
- 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
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
(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
- 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
- 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
static to dynamic. Apparently this caused errors with a obscure
message saying "Invalid handle vale" (probably m_henv).
Modified:
odbconn.h
odbconn.cpp
mysql-test/suite/heap/heap.result:
Added test case
mysql-test/suite/heap/heap.test:
Added test case
storage/heap/hp_delete.c:
Fixed that we don't change order of keys for the current key when we delete them from the hash table.
Fixed that 'current_hash_ptr' is correct after heap_delete_key().
Don't "reset current_hash_ptr" on delete; This will improve time a lot for delete of rows when not all rows matches the search criteria.
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)
> deleting object of polymorphic class type ‘CATALOG’ which
> has non-virtual destructor might cause undefined behaviour
> [-Wdelete-non-virtual-dtor]
Classes whose instances are destroyed using "delete"
should have virtual destructors.
modified:
storage/connect/catalog.h
Using "bool" in pure C code is not a good idea.
- Defining BOOL as "long" on Unix (this is how MS defines it)
- Replacing bool to BOOL in pure C code.
modified:
storage/connect/global.h
storage/connect/inihandl.c
storage/connect/os.h
storage/connect/osutil.c
storage/connect/osutil.h
- Removing duplicate code to generate error message text
- In the future they will most likely check secure_file_priv directory.
modified:
storage/connect/filamdbf.cpp
storage/connect/filamfix.cpp
storage/connect/filamtxt.cpp
storage/connect/filamvct.cpp
storage/connect/libdoc.cpp
storage/connect/maputil.cpp
storage/connect/plgdbsem.h
storage/connect/plgdbutl.cpp
storage/connect/tabfmt.cpp
storage/connect/tabmul.cpp
storage/connect/tabxml.cpp
storage/connect/xindex.cpp
Using MariaDB in-house character set conversion routines.
modified:
storage/connect/CMakeLists.txt
storage/connect/tabodbc.cpp
storage/connect/tabodbc.h
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.