question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ER_SP_DOES_NOT_EXIST: FUNCTION users.AsText does not exist

See original GitHub issue
mysql> 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:closed
  • Created 8 years ago
  • Comments:17 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
alxarchcommented, Nov 6, 2015

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 for include to work properly but the GEOMETRY type uses selectGeometry() 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 in selectQuery and passing the mainTableAs as an option to geometrySelect 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.

0reactions
janmeiercommented, Dec 4, 2015

We no longer use axText when selecting geometry

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found