Issue Details (XML | Word | Printable)

Key: MDL-8153
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Eloy Lafuente (stronk7)
Reporter: Eloy Lafuente (stronk7)
Votes: 1
Watchers: 1
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

LDAP authentication (sync_users) doesn't support MSSQL and Oracle

Created: 12/Jan/07 08:18 AM   Updated: 05/Mar/07 08:18 PM
Return to search
Issue 264 of 1025 issue(s)
<< Previous | MDL-8153 | Next >>
Component/s: Authentication, Database SQL/XMLDB
Affects Version/s: 1.7, 1.8
Fix Version/s: 1.8

Environment: MSSQL & ORACLE
Issue Links:
Dependency
Duplicate
 
Relates
 

Database: Microsoft SQL, Oracle
Participants: Eloy Lafuente (stronk7), Iñaki Arenaza and Petr Skoda
Security Level: None
Resolved date: 05/Mar/07
Affected Branches: MOODLE_17_STABLE, MOODLE_18_STABLE
Fixed Branches: MOODLE_18_STABLE


 Description  « Hide
In the ldap authentication plugin, the sync_users() function, has some conditional code to use temporal tables under MySQL and PostgreSQL, but there isn't corresponding code for MSSQL and Oracle.


While it shouldn't be problematic for Oracle:

create global temporary table $CFG->prefix .'extuser'
......
(on commit preserve rows?)

MSSQL has a limitatio: All the temp tables are named with '#' being the 1st char in the name. Obviously this breaks current code and $CFG->prefix usage

Any idea?

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Eloy Lafuente (stronk7) added a comment - 12/Jan/07 08:22 AM
Adding it too to the SQL Component to be able to follow it from more places.

Eloy Lafuente (stronk7) made changes - 12/Jan/07 08:22 AM
Field Original Value New Value
Component/s Database SQL/XMLDB [ 10131 ]
Iñaki Arenaza added a comment - 14/Feb/07 04:52 PM
Like I say in MDL-7525, if temporary table creation is database dependant, we should add support for it in lib/{ddllib,dmllib}.php, to take care of it once and for all.

Saludos. Iñaki.


Eloy Lafuente (stronk7) made changes - 14/Feb/07 05:43 PM
Link This issue has been marked as being related by MDL-7525 [ MDL-7525 ]
Eloy Lafuente (stronk7) added a comment - 14/Feb/07 05:52 PM
Hating temp tables here!

Uhm...looking forward for a nice solution.... could we relay one static tables instead? Say, create the prefix_temp_values table:

id
session
value

and handle them where necessary. It will leave us free from temporal tables and their "un-compatible" behaviour, using standard table instead. Such table could be there always and work with a few functions:

temp_values_clean(session)
temp_values_put(session,value)
temp_values_get(session)

Exactly like the backups_ids table is performing since ages.

Yes/no?

This will fix 2-3 bugs together and will provide us with a central place to storage big-temp collections of "things", hehe


Iñaki Arenaza added a comment - 16/Feb/07 05:40 AM
This should work as long as we don't need multi-column temporary tables (do we? I don't know, as I don't master all the internals of Moodle).

Saludos. Iñaki.


Eloy Lafuente (stronk7) made changes - 17/Feb/07 09:31 AM
Assignee Martin Dougiamas [ dougiamas ] Eloy Lafuente (stronk7) [ stronk7 ]
Eloy Lafuente (stronk7) added a comment - 17/Feb/07 09:34 AM
Finally I've added temp tables creation both for MSSQL and Oracle, instead of creating the small API specified above. I've performed tests about the temp tables under all DBs but Oracle (my box is broken here) no LDAP itself (the modifications haven't changed one line ldap-related.

Please if somebody can confirm it works now with everything up (LDAP and Oracle/MSSQL). TIA!


Eloy Lafuente (stronk7) made changes - 17/Feb/07 09:41 AM
Link This issue will help resolve MDL-8023 [ MDL-8023 ]
Eloy Lafuente (stronk7) committed 1 file to 'Moodle CVS' on branch 'MOODLE_18_STABLE' - 17/Feb/07 10:24 AM
sync_users() now working both under MSSQL and Oracle. Big credits to
Jay Lee for his cool patch about MDL-7525 MDL-8023 MDL-8153
MODIFY auth/ldap/auth.php   Rev. 1.6.2.1    (+59 -20 lines)
Eloy Lafuente (stronk7) committed 1 file to 'Moodle CVS' - 17/Feb/07 10:26 AM
sync_users() now working both under MSSQL and Oracle. Big credits to
Jay Lee for his cool patch about MDL-7525 MDL-8023 MDL-8153

Merged from MOODLE_18_STABLE
MODIFY auth/ldap/auth.php   Rev. 1.7    (+59 -20 lines)
Eloy Lafuente (stronk7) added a comment - 19/Feb/07 04:24 AM
Temp tables code working properly under MySQL, PostgresQL and MSSQL.

My Oracle box is broken right now so some feedback will be really welcome! 18_STABLE and HEAD only!


Petr Skoda made changes - 21/Feb/07 04:14 PM
Link This issue will be resolved by MDL-8590 [ MDL-8590 ]
Eloy Lafuente (stronk7) added a comment - 01/Mar/07 12:27 AM
Any comment about how temp tables are working under Oracle?

Petr Skoda made changes - 01/Mar/07 07:14 PM
Link This issue duplicates MDL-7525 [ MDL-7525 ]
Iñaki Arenaza added a comment - 01/Mar/07 11:38 PM
I don't have any Oracle box at hand to test it, so I can't comment on it

Saludos. Iñaki.


Eloy Lafuente (stronk7) added a comment - 02/Mar/07 03:04 AM
just looking if I am able to install/test it in my Win32 XP old-slow-512MB PC... arghhh.

(why the hell those Oracle guys don't configure-make-make install OracleInstantClient for Intel MacOS X. It's really incredible!).


Petr Skoda added a comment - 05/Mar/07 08:18 PM
should be fixed now, please file a new report for 1.8 if needed, thanks!

Petr Skoda made changes - 05/Mar/07 08:18 PM
Resolution Fixed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]