some unwanted joins are added - phpMyadmin

General discussion of Mantis.

Moderators: Developer, Contributor

Post Reply
shanthini.g
Posts: 33
Joined: May 31, 2017 7:45 am

some unwanted joins are added - phpMyadmin

Post 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

cas
Posts: 861
Joined: Mar 11, 2006 11:08 am
Contact:

Re: some unwanted joins are added - phpMyadmin

Post 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

shanthini.g
Posts: 33
Joined: May 31, 2017 7:45 am

Re: some unwanted joins are added - phpMyadmin

Post 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

cas
Posts: 861
Joined: Mar 11, 2006 11:08 am
Contact:

Re: some unwanted joins are added - phpMyadmin

Post 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.

Post Reply