From 37648d141f3eb7034fd5c82f0fd8be67e2373f8f Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Fri, 4 Jul 2014 16:28:59 +1200 Subject: [PATCH] MDL-46126 upgrade: fix bogus nulls in user.password before changing precission Note: there is no need to deal with Oracle empty strings here because only MySQL running in non-strict mode is affected. --- lib/db/upgrade.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index df8786ab514..f2caa411b42 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -1583,6 +1583,8 @@ function xmldb_main_upgrade($oldversion) { } if ($oldversion < 2013021100.01) { + // Make sure there are no bogus nulls in old MySQL tables. + $DB->set_field_select('user', 'password', '', "password IS NULL"); // Changing precision of field password on table user to (255). $table = new xmldb_table('user');