Closed
Description
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
Labels
No labels