accessing freed memory.
Before XMLCOL::WriteColumn() Tdbp->Clist gets assigned
a nodelist in
Clist = RowNode->SelectNodes(g, Colname, Clist);
which is RowNode->Doc->Xop->nodesetval.
In XMLCOL::WriteColumn()
ValNode = ColNode->SelectSingleNode(g, Xname, Vxnp);
calls LIBXMLDOC::GetNodeList() again, which frees the previous
XPath object Xop and replaces it with a new one.
In this case RowNode->Doc == ColNode->Doc, so Clist->Listp
points to a freed memory now.
Drop and add same key is considered rename (look ALTER_RENAME_INDEX in
fill_alter_inplace_info()). But in this case order of keys may be
changed, because mysql_prepare_alter_table() yet does not know about
rename and treats 2 operations: drop and add.
In that case we disable inplace algorithm for such engines as Memory,
MyISAM and Aria with ALTER_INDEX_ORDER flag. These engines have no
specialized check_if_supported_inplace_alter() and default
handler::check_if_supported_inplace_alter() sees an unknown flag and
returns HA_ALTER_INPLACE_NOT_SUPPORTED.
ha_innobase::check_if_supported_inplace_alter() works differently and
inplace is not disabled (with the help of modified
INNOBASE_INPLACE_IGNORE). add_drop_v_cols fork was also tweaked as it
wrongly failed with MSG_UNSUPPORTED_ALTER_ONLINE_ON_VIRTUAL_COLUMN
when it seen ALTER_INDEX_ORDER.
No-op operation must be still no-op no matter of ALTER_INDEX_ORDER
presence, so we tweek its condition as well.
On MIPS platforms (and probably others) unaligned memory access results in a
bus error. In the connect storage engine, block data for some data formats is
stored packed in memory and the TYPBLK class is used to read values from it.
Since TYPBLK does not have special handling for this packed memory, it can
quite easily result in unaligned memory accesses.
The simple way to fix this is to perform all accesses to the main buffer
through memcpy. With GCC and optimizations turned on, this call to memcpy is
completely optimized away on architectures where unaligned accesses are ok
(like x86).
Contributors:
James Cowgill <jcowgill@debian.org>
modified: storage/connect/bsonudf.cpp
modified: storage/connect/jsonudf.cpp
- Stringify option is now a ; separated list of columns
modified: storage/connect/json.cpp
modified: storage/connect/json.h
modified: storage/connect/mongo.h
modified: storage/connect/tabbson.cpp
modified: storage/connect/tabcmg.cpp
modified: storage/connect/tabcmg.h
modified: storage/connect/tabjmg.cpp
modified: storage/connect/tabjmg.h
modified: storage/connect/tabjson.cpp
- PrepareColist not a static function anymore (+ typo)
modified: storage/connect/taboccur.cpp
- JDVC: Recognize schema (database) from a wrapper server
modified: storage/connect/tabjdbc.cpp
This gives a short overview over found/missing dependencies as well
as enabled/disabled features.
Initial author Heinz Wiesinger <heinz@m2mobi.com>
Additions by Vicențiu Ciorbaru <vicentiu@mariadb.org>
* Report all plugins enabled via MYSQL_ADD_PLUGIN
* Simplify code. Eliminate duplication by making use of WITH_xxx
variable values to set feature "ON" / "OFF" state.
Reviewed by: wlad@mariadb.com (code details) serg@mariadb.com (the idea)
modified: storage/connect/ha_connect.cc
- Use NOTE instead of WARNING in connect_assisted_discovery
This because MariaDB raise an error when doing so
modified: storage/connect/ha_connect.cc
modified: storage/connect/tabrest.cpp
- Make MONGO tables recognize STRINGIFY and JsonAllPath
modified: storage/connect/mongo.cpp
modified: storage/connect/mongo.h
modified: storage/connect/tabcmg.h
modified: storage/connect/tabjmg.cpp
modified: storage/connect/tabcmg.cpp
modified: storage/connect/tabjmg.h
- Fix OBJECT option for Pretty != 2 JSN and BSON tables
Accept all syntaxes for the OBJECT option
modified: storage/connect/tabbson.cpp
modified: storage/connect/tabjson.cpp
- Use my_snprintf in function xcurl (by vuvova)
modified: storage/connect/tabrest.cpp
- Format dates entered as integer when formatted
modified: storage/connect/value.cpp
modified: storage/connect/value.h