Cross-database support
Posted: 03 Mar 2005, 21:38
Hello,
I have been trying to take advantage of the fact Mantis uses ADODB, by porting Mantis to use another database platform. The database I am testing on is Sybase iAnywhere ASA 9.0.1. I was able to get most of Mantis up-in-running by changing dbtype in config, except a query that is unsupported by ASA:
SELECT TOP 1 username FROM mantis_user_table WHERE username='test'
This is the query run when you try to create a user - it's a check to detect if an username exists. Mantis limits the query to 1 row, and so in ASA syntax it is the TOP 1 clause to limit it. It returns an error with a non-deterministic message. It means ASA is unsure of which row to get back. The query in MySQL syntax works though.
Therefore I think it's more of a bug too - we should change this query to add an ORDER BY username clause to guarantee that the database knows which row to return.
Let me know what you guys think.
Vincent
I have been trying to take advantage of the fact Mantis uses ADODB, by porting Mantis to use another database platform. The database I am testing on is Sybase iAnywhere ASA 9.0.1. I was able to get most of Mantis up-in-running by changing dbtype in config, except a query that is unsupported by ASA:
SELECT TOP 1 username FROM mantis_user_table WHERE username='test'
This is the query run when you try to create a user - it's a check to detect if an username exists. Mantis limits the query to 1 row, and so in ASA syntax it is the TOP 1 clause to limit it. It returns an error with a non-deterministic message. It means ASA is unsure of which row to get back. The query in MySQL syntax works though.
Therefore I think it's more of a bug too - we should change this query to add an ORDER BY username clause to guarantee that the database knows which row to return.
Let me know what you guys think.
Vincent