Page 1 of 1

some unwanted joins are added - phpMyadmin

Posted: 10 Aug 2020, 11:44
by shanthini.g
Hi,

I am facing below issues while accessing Mantis DB from phpMyadmin

SELECT * FROM `mantis_bug_table` returns error as below
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ELECT * FROM `mantis_bug_table`' at line 1

If I click 'Browse' button, I am getting below error (some unwanted joins are added)
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'asMBT INNER JOINmantis_bug_text_table asMBTT onMBT.id=MBTT.id LIMIT 0, 25' at line 1

But if I select individual fields this is working. That is below query is working
SELECT `id`, `project_id`, `resolution`,`reporter_id`, `handler_id`, `duplicate_id`, `priority`, `severity`, `reproducibility`, `status`, `resolution`, `projection`, `eta`, `bug_text_id`, `os`, `os_build`, `platform`, `version`, `fixed_in_version`, `build`, `profile_id`, `view_state`, `summary` `sponsorship_total`, `sticky`, `target_version`, `category_id`, `date_submitted`, `due_date`, `last_updated`FROM `mantis_bug_table` WHERE 1

If I copy this table 'mantis_bug_table' to 'mantis_bug_table_test'' then SELECT * FROM `mantis_bug_table_test` is working. Not sure what may be the reason

Please suggest

Thanks

Re: some unwanted joins are added - phpMyadmin

Posted: 10 Aug 2020, 11:52
by cas
I do notice missing spaces in the syntax like "asMBTT onMBT.id" which should read "as MBTT on MBT.id", there are more of these so check your source carefully :o

Re: some unwanted joins are added - phpMyadmin

Posted: 11 Aug 2020, 04:57
by shanthini.g
Hi,

This is not a query related error. I did not executed any query.

If I click 'Browse' button, I am getting below error. Some unwanted joins are added by phpMyadmin. For 'mantis-bug_table' alone I am facing this issue. I am able to browse rest of the tables.
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'asMBT INNER JOINmantis_bug_text_table asMBTT onMBT.id=MBTT.id LIMIT 0, 25' at line 1

Thanks

Re: some unwanted joins are added - phpMyadmin

Posted: 11 Aug 2020, 07:58
by cas
So mantis itself is working correctly (if not, share Mantis error messages)?
In that case you need to visit the phpmyadmin support pages.