Hi everybody, I've done a quick hack to support MS-SQL-Server, since my company needed that functionality. I know, that MS-SQL was supported in earlier versions and that you decided to drop it. Since only minor changes to the system were necessary I believe that supporting this database would not take so much. I've done that for version 4.7.2, you can get the patch here: http://www.heinrichp.de/drupal-4.7.2-mssql.patch This is not tested very much but it works for me quite fine. Tested with: Database System: Microsoft Server 2003 Standard Microsoft SQL Server 2005 Webserver: Debian Sarge PHP-Sybase driver regards, Peter
Peter Heinrich wrote:
Hi everybody,
I've done a quick hack to support MS-SQL-Server, since my company needed that functionality.
Unfortunately, it is indeed a hack. You change several sql queries. This will affect either the results and/or the performance.
I know, that MS-SQL was supported in earlier versions and that you decided to drop it.
We dropped it because we lacked a maintainer.
Since only minor changes to the system were necessary I believe that supporting this database would not take so much.
If you can work more on it and preferably avoid changing any queries in core I suggest that you create a contrib project for this. We can then evaluate the popularity of this and then include it in the release after that. Cheers, Gerhard
Unfortunately, it is indeed a hack. You change several sql queries. This will affect either the results and/or the performance.
there is a lot more great code than hack in that patch.
I know, that MS-SQL was supported in earlier versions and that you decided to drop it.
We dropped it because we lacked a maintainer.
right. i was the old maintainer but didn't have time nor need for ongoing maintainence - perhaps you will volunteer to become the new maintainer.
If you can work more on it and preferably avoid changing any queries in core I suggest that you create a contrib project for this. We can then evaluate the popularity of this and then include it in the release after that.
i suspect that it will be hard to do this without changing queries. even in my version there were problems with the same 2 queries. it is OK to change queries as long the meaning is unchanged. ideally, we change to a more standards compliant query which is equally performing. it is OK to create new DB functions like db_query_range(). if thats not possible, we should switch on $db_type and issue differing queries for each. ideally, you would also support 5.0. In addition to a few schema changes, there needs to be a small install.mssql.inc i agree that this makes sense as a contrib project for now.
2006/9/6, Peter Heinrich <drupal@heinrichp.de>:
I've done a quick hack to support MS-SQL-Server, since my company needed that functionality.
Nice idea :) And good job.
Since only minor changes to the system were necessary I believe that supporting this database would not take so much.
Minor changes ? Not sure because you change many sql queries and should not.
I've done that for version 4.7.2, you can get the patch here:
I put a look on your job and i can't understand some parts... Some examples in database.mssql.in: 1. db_connect Are you sure it works fine for you ? You took the the pgsql template instead of mysql one. But when i refer to PHP mssql_* functions they are closier to mysql_* than pg_* :/ And this is true for mssql_connect()... 2. db_query_temporary I don't have an Ms SQL Server in order to test. But, as far i can remember, SQL Server knows "CREATE TEMPORARY"... 3. db_query Why do you rewrite the LIMIT clause where ? This kind of things shouldn't be directly stand here because db_query_range() role is... :) 4. etc.
This is not tested very much but it works for me quite fine. Tested with:
Database System: Microsoft Server 2003 Standard Microsoft SQL Server 2005
Webserver: Debian Sarge PHP-Sybase driver
Here is a similar work done some times ago. May it helps. Regards.
participants (4)
-
Gerhard Killesreiter -
Gildas Cotomale -
Moshe Weitzman -
Peter Heinrich