ER_SP_DOES_NOT_EXIST: FUNCTION users.AsText does not exist
See original GitHub issuemysql> select `users`.AsText(`location`) from users;
FUNCTION users.AsText does not exist
mysql> select AsText(`location`) from users;
+--------------------+
| AsText(`location`) |
+--------------------+
| POINT(10 10) |
| POINT(10 10) |
| POINT(10 10) |
+--------------------+
3 rows in set (0.05 sec)
could i not use users
default ?
Issue Analytics
- State:
- Created 8 years ago
- Comments:17 (7 by maintainers)
Top Results From Across the Web
Why some spatial functions does not exists on my mysql server?
I just flew over the official documentation and it seems that the function is called ST_GeomFromText() in MySQL 8.0.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The issue is more complex than the solution the proposed patch gives. This occurs on models that have a GEOMETRY column when used in conjunction with an
include
option. The abstract query writer for tries to prefix column names with table names forinclude
to work properly but the GEOMETRY type usesselectGeometry()
which in mysql uses a function call (AsText(column)
).Things are even worse if the table with the GEOMETRY column is not the primary table. Then
geometrySelect()
is not called at all, returning the blob as column value.Currently GEOMETRY type is broken for the
inlcude
option. A proper solution requires checking for GEOMETRY columns in more places inselectQuery
and passing themainTableAs
as an option togeometrySelect
so it can prefix column names appropriately.Also a more general solution would require a refactor to handle function calling attributes in more gracefully instead of filling the code up with
if (isGeometrySelect(attr)) { ...
because every function-calling custom column will require special treatment.We no longer use
axText
when selecting geometry