I'm using SQL Server 2008.
Here's the error I get when I attempt to rebuild permissions:
An AJAX HTTP error occurred. HTTP Result Code: 500 Debugging information follows. Path: /?q=batch&id=88&op=do StatusText: error ResponseText: PDOException: SQLSTATE[42000]: [Microsoft][SQL Server Native Client 10.0][SQL Server]'BIT_OR' is not a recognized built-in function name.: SELECT tadg.[rid] AS [rid], BIT_OR(COALESCE(ta.grant_view, tad.grant_view, tadg.grant_view)) AS grant_view, BIT_OR(COALESCE(ta.grant_update, tad.grant_update, tadg.grant_update)) AS grant_update, BIT_OR(COALESCE(ta.grant_delete, tad.grant_delete, tadg.grant_delete)) AS grant_delete, tadg.rid AS _field_0 FROM {taxonomy_term_data} td INNER JOIN {taxonomy_access_default} tadg ON tadg.vid = 0 LEFT OUTER JOIN {taxonomy_access_default} tad ON tad.vid = td.vid AND tad.rid = tadg.rid LEFT OUTER JOIN {taxonomy_access_term} ta ON ta.tid = td.tid AND ta.rid = tadg.rid INNER JOIN {taxonomy_index} ti ON td.tid = ti.tid WHERE ( ([ti].[nid] = :db_condition_placeholder_0) ) GROUP BY tadg.rid; Array ( [:db_condition_placeholder_0] => 1 ) in _taxonomy_access_node_access_records() (line 1290 of C:\www\sites\all\modules\taxonomy_access\taxonomy_access.module).
Comment | File | Size | Author |
---|---|---|---|
#10 | taxonomy_access-sqlsrv-1266674-2.patch | 1.57 KB | karoop |
| |||
#8 | taxonomy_access-sqlsrv-1266674-1.patch | 1.55 KB | karoop |
Comments
Comment #1
xjmAh. From 2005 until the present TAC has only needed to supported MySQL-equivalent and Postgres. I should add this on the project page.
There are two possible ways to add support for databases that do not have
BIT_OR()
:BIT_OR()
somehow as was done for older versions of Postgres in 6.x and prior (not sure if this is possible).Comment #2
xjmFor reference, this is the code that added
BIT_OR()
for old versions of postgres:Comment #3
xjmComment #4
xjmMarked #1337176: PDO exception on sqlite (General error: 1 no such function: BIT_OR) as duplicate.
Comment #5
d.novikov CreditAttribution: d.novikov commentedAlso the module doesn't work for MSSQL database (sqlsrv driver). Please rewrite queries using Database abstraction layer.
Comment #6
xjmThe queries do use the database abstraction layer. That is not the issue. It's just that many databses don't support for the functionality TAC has used historically. Also, patches welcome! :)
Comment #7
Chrys CreditAttribution: Chrys commentedTAC is essential for my project. I am using MSSQL. Are there any plans of patching this?
Otherwise I will need to change server :(
Comment #8
karoop CreditAttribution: karoop commentedMy stab at rewriting the query to not use the BIT_OR aggregate function. I've done a bit more work on the module and so far it looks like the query does what it's supposed to do.
Found and fixed another issue which is probably also related to using MS SQL - will create another issue and post the patch there.
Comment #10
karoop CreditAttribution: karoop commentedCorrected an error in the query - hopefully should pass the testing now.