|
|
|
Environment:
|
Microsoft SQL
|
|
| Database: |
Microsoft SQL
|
| Participants: |
Eloy Lafuente (stronk7) and John White
|
| Security Level: |
None
|
| QA Assignee: |
Petr Skoda
|
| Resolved date: |
25/Sep/08
|
| Affected Branches: |
MOODLE_19_STABLE
|
| Fixed Branches: |
MOODLE_19_STABLE
|
lib/accesslib.php makes a call to SQL function SUBSTR in the statement:
$sql = "UPDATE {$CFG->prefix}context
SET path = ".sql_concat("'$newpath'", 'SUBSTR(path, '.$len.' +1)')."
$setdepth
WHERE path LIKE '{$frompath}/%'";
execute_sql($sql,false);
but SUBSTR is not legitimate in MSSQL, SUBSTRING must be used, which is fine with MySQL except there may be a difference in the length parameter.
Problem discussed at:
http://moodle.org/mod/forum/discuss.php?d=106337
|
|
Description
|
lib/accesslib.php makes a call to SQL function SUBSTR in the statement:
$sql = "UPDATE {$CFG->prefix}context
SET path = ".sql_concat("'$newpath'", 'SUBSTR(path, '.$len.' +1)')."
$setdepth
WHERE path LIKE '{$frompath}/%'";
execute_sql($sql,false);
but SUBSTR is not legitimate in MSSQL, SUBSTRING must be used, which is fine with MySQL except there may be a difference in the length parameter.
Problem discussed at:
http://moodle.org/mod/forum/discuss.php?d=106337 |
Show » |
made changes - 24/Sep/08 08:58 PM
| Field |
Original Value |
New Value |
|
Affects Version/s
|
|
1.9.2
[ 10280
]
|
made changes - 25/Sep/08 01:38 AM
|
Fix Version/s
|
|
1.9.3
[ 10290
]
|
|
Resolution
|
|
Fixed
[ 1
]
|
|
Status
|
Open
[ 1
]
|
Resolved
[ 5
]
|
made changes - 08/Oct/08 05:27 AM
|
Status
|
Resolved
[ 5
]
|
Closed
[ 6
]
|
|
QA Assignee
|
|
skodak
|
|