Commit 46581b13 authored by Robert Lyon's avatar Robert Lyon
Browse files

Fixing skin update sql for mysql (Bug #1419959)



Needed to use a temp table as update and select are from same table

Change-Id: Idddf6048b2f6cf6cff2fadad87b8703a56a7a8d5
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent ddccca89
......@@ -3899,7 +3899,9 @@ function xmldb_core_upgrade($oldversion=0) {
if ($oldversion < 2015021000) {
// Need to update any dashboard pages to not have skins
execute_Sql("UPDATE {view} SET skin = NULL WHERE id IN ( SELECT id FROM {view} WHERE type = 'dashboard' AND skin IS NOT NULL)");
// and seen as we are updating and selecting from the same table
// we need to use a temptable for it to work in mysql
execute_Sql("UPDATE {view} SET skin = NULL WHERE id IN ( SELECT vid FROM (SELECT id AS vid FROM {view} WHERE type = 'dashboard' AND skin IS NOT NULL) AS temptable)");
}
return $status;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment