1. The attached patch provides XML column support for MySQL.
2. Reading the MySQL manual one can expect the minimum required MySQL
version is 5.1.5 but I tested the patch only on version 5.1.30 - this is
the first general availability version in the 5.1 series.
3. ExtractValue MySQL function is used to do XML comparisons.
TestXMLCustomerOrder.mysql file contains samples of SQL.
Sample queries generated by the patched code:
SELECT t0.oid, t1.oid FROM TORDER t0 CROSS JOIN TORDER t1 WHERE (ExtractValue(t0.shipAddress,'//City') = ExtractValue(t1.shipAddress,'//City')) ORDER BY t0.oid ASC
SELECT t0.oid, t0.version, t0.amount, t0.CUSTOMER_COUNTRYCODE, t0.CUSTOMER_ID, t0.delivered, t0.shipAddress FROM TORDER t0 CROSS JOIN TCUSTOMER t1 WHERE (ExtractValue(t0.shipAddress,'/*/City') = t1.city)
4. connectedConfiguration method is used to determine whether XML column is
supported in the database.
5. MySQL does not have a dedicated XML data type. They just added a couple of XML functions
operating on string types. This requires a change in how Column.isXML() is implemented.
The current version does:
return _typeName != null && _typeName.startsWith("XML");
Not surprisingly this fails while on MySQL. To remedy this I have added the
"XML" property to Column and XMLValueHandler sets it to true. However,
I also had to modify MappingInfo, otherwise this new property was
losing its value. Let me know if there is a better solution for this.
6. If the patch is going to be applied, I will provide an update for the
7. I welcome comments and suggestions.
|Transition||Time In Source Status||Execution Times||Last Executer||Last Execution Date|
|18d 18h 49m||1||Catalina Wei||15/Jan/09 03:27|
|418d 15h 3m||1||Donald Woods||09/Mar/10 18:31|
|Status||Resolved [ 5 ]||Closed [ 6 ]|
|Fix Version/s||2.0.0 [ 12313483 ]|
|Fix Version/s||1.3.0 [ 12313326 ]|
|Resolution||Fixed [ 1 ]|
|Status||Open [ 1 ]||Resolved [ 5 ]|