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) I am using 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 which is defined by mariadb as ,
../server/include/errmsg.h:#define CR_MAX_ERROR 2999
Did this number increase without being updated ? it is no longer used in mariadb-server but still by some clients (to my knowledge : mysqladmin and python)