Page 1 of 1

wrong display inside query when query failed

Posted: Fri 14 Jan 2022 14:02
by michabbb
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

Re: wrong display inside query when query failed

Posted: Tue 18 Jan 2022 12:31
by alexa
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.

Re: wrong display inside query when query failed

Posted: Tue 18 Jan 2022 12:50
by michabbb
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

Re: wrong display inside query when query failed

Posted: Tue 18 Jan 2022 13:40
by michabbb
in another example dbforge marks the field correctly:

Image

:-)

Re: wrong display inside query when query failed

Posted: Mon 24 Jan 2022 13:26
by alexa
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.

Re: wrong display inside query when query failed

Posted: Mon 24 Jan 2022 17:26
by michabbb
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

Re: wrong display inside query when query failed

Posted: Tue 25 Jan 2022 08:43
by alexa
The coordinates of the place in the script where to highlight are returned by the MySQL server.

Re: wrong display inside query when query failed

Posted: Tue 25 Jan 2022 11:16
by michabbb
with "coordinates" you mean line number and position in that line ?

Re: wrong display inside query when query failed

Posted: Wed 26 Jan 2022 18:28
by alexa
That's right.

Re: wrong display inside query when query failed

Posted: Wed 26 Jan 2022 18:36
by michabbb
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....

¯\_(ツ)_/¯