wrong display inside query when query failed

Discussion of open issues, suggestions and bugs regarding database management and administration tools for MySQL
Post Reply
michabbb
Posts: 217
Joined: Mon 21 Nov 2011 02:35
Location: DE
Contact:

wrong display inside query when query failed

Post by michabbb » Fri 14 Jan 2022 14:02

hi alex,

i don´t know if that is intended to be that way, but when the MySQL error says:

Code: Select all

Unknown column 'i.bs_sort' in 'order clause'
dbforge marks the field inside the field list:

Image

and NOT field inside the ORDER:

Code: Select all

ORDER BY i.bs_sort, i.id;
but for my understanding, the "red lines" should be displayed in the "ORDER BY"
and not where it currently gets marked.

thanks,
micha

version: latest enterprise

alexa

Re: wrong display inside query when query failed

Post by alexa » Tue 18 Jan 2022 12:31

Could you please provide us the CREATE definition of the table along with the query you are typing?

A video or screenshots would be of help.

michabbb
Posts: 217
Joined: Mon 21 Nov 2011 02:35
Location: DE
Contact:

Re: wrong display inside query when query failed

Post by michabbb » Tue 18 Jan 2022 12:50

hi alex,

i guess it has nothing to do with the table itself, more with the specific error,
you can test with any table (I guess):

Image

the MySQL error is:

Code: Select all

Unknown column 'i.bs_sort' in 'order clause
because MySQL doesn´t know the column that is used "inside the order",
I guess it would make more sense if dbforge would highlight the specific column
"inside the ORDER by" and not - as you see in my screenshot - in the SELECT part.

cheers,
micha

michabbb
Posts: 217
Joined: Mon 21 Nov 2011 02:35
Location: DE
Contact:

Re: wrong display inside query when query failed

Post by michabbb » Tue 18 Jan 2022 13:40

in another example dbforge marks the field correctly:

Image

:-)

alexa

Re: wrong display inside query when query failed

Post by alexa » Mon 24 Jan 2022 13:26

Hello Micha,

Thank you for the reply.

In fact, dbForge receives the information regarding what column to highlight from the MySQL server. You could try some other tool for MySQL to check that behavior.

michabbb
Posts: 217
Joined: Mon 21 Nov 2011 02:35
Location: DE
Contact:

Re: wrong display inside query when query failed

Post by michabbb » Mon 24 Jan 2022 17:26

hi,

your massage makes no sense at all, sorry.
OF COURSE dbforge gets the information from the server which column makes oroboems, but the question is "where" to highlight the column if the column is used several times inside a query (and u know that).

so when the server says that a unknown column was used inside the "order by" - it would make much more sense to highlight that column that was used in the "order by" and not anywhere else. (and you know that).

so you know exactly what I am trying to explain here. but it's not a big deal and if u want to ignore that unsightliness, okay - I just wanted to help you making things better.

cheers

alexa

Re: wrong display inside query when query failed

Post by alexa » Tue 25 Jan 2022 08:43

The coordinates of the place in the script where to highlight are returned by the MySQL server.

michabbb
Posts: 217
Joined: Mon 21 Nov 2011 02:35
Location: DE
Contact:

Re: wrong display inside query when query failed

Post by michabbb » Tue 25 Jan 2022 11:16

with "coordinates" you mean line number and position in that line ?

alexa

Re: wrong display inside query when query failed

Post by alexa » Wed 26 Jan 2022 18:28

That's right.

michabbb
Posts: 217
Joined: Mon 21 Nov 2011 02:35
Location: DE
Contact:

Re: wrong display inside query when query failed

Post by michabbb » Wed 26 Jan 2022 18:36

okay, in that case, i do understand.
anyway: strange that mariadb has a problem with something that is inside "order by" but does not point to the column used in "order by" instead to something that is used in "SELECT...." on top....

¯\_(ツ)_/¯

Post Reply