Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-dev] Support MySQL51 User Functions

Some comments:
- We should run all the available MySQL compatible testing
- Do we know if MySQL 5 is closer to MySQL 5.1 or MySQL 4?
- Have you done a complete analysis of the platform and the available functionality, or is this a fix for just one issue you happen to have noticed?

Mike Norman wrote:
I have created a new database platform in order to support User Functions for MySQL 5.1. All that was required was surrounding '{ }' brackets and a slightly different order for the CALL clause:

public class MySQL51Platform extends MySQL4Platform {
    public boolean supportsStoredFunctions() {
        return true;
@Override public String buildProcedureCallString(StoredProcedureCall call, AbstractSession session) {
        return "{ " + super.buildProcedureCallString(call, session);

    public String getFunctionCallHeader() {
        return "? " + getAssignmentString() + getProcedureCallHeader();
// different order - CALL clause ^^^ comes AFTER assignment operator
    public String getProcedureCallTail() {
        return " }"; // case-sensitive

I have a DBWS test case working, but some more extensive testing is likely required. Any problem checking
this in for M8?

Oracle Email Signature Logo
Mike Norman | Principal Software Designer | 613.288.4638
Oracle Server Technologies | TopLink Product
45 O'Connor Street, Suite 400 | Ottawa, ON K1P 1A4 | (fax) 613.238.2818


eclipselink-dev mailing list

Back to the top