Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Error messages with code above 4000 on MariaDB are not displayed #187

Copy link
Copy link
Closed
@antoinecarme

Description

@antoinecarme
Issue body actions

Hello,

When using a model with too many CTEs, I get the error

Code: 4003 SQL State: HY000 Too many WITH elements in WITH clause

when doing an explain but the python client/driver (MySQLdb) does not display it and it displayed an cryptic error (''error totally whack').

A deeper source code analysis shows that the python code expects an error code to be below CR_MAX_ERROR

        merr = mysql_errno(&(c->connection));
        if (!merr)
                e = _mysql_InterfaceError;
        else if (merr > CR_MAX_ERROR) {
                PyTuple_SET_ITEM(t, 0, PyInt_FromLong(-1L));
                PyTuple_SET_ITEM(t, 1, PyString_FromString("error totally whack"));
                PyErr_SetObject(_mysql_InterfaceError, t);
                Py_DECREF(t);
                return NULL;
        }

but CR_MAX_ERROR is defined by mariadb as ,

../server/include/errmsg.h:#define CR_MAX_ERROR 2999

Did this number increase without (mariadb | python-driver) being updated ?

Thanks in advance,

Antoine

PS: I already filed a bug with mariadb here : https://jira.mariadb.org/browse/MDEV-12990

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.