eh, not quite. I can define a function with the same name as a native
function in any db. E.g.
create test.replace(a int) returns int
and it'll be callable as test.replace(1)
So ER_FUNCTION_NOT_DEFINED is wrong here.
But note that even though test.substr() is possible,
it should not allow substr() special syntax.
Good catch, I overlooked this.
From a glance, a workaround could be to use test.`substr`().
But it's better to provide backward compatibility.
I don't have a quick idea how to fix this properly.
If you have, please let me know.