]> git.mjollnir.org Git - moodle.git/commitdiff
Small change in MySQL. Seems to work better under any version
authorstronk7 <stronk7>
Wed, 5 Apr 2006 22:14:24 +0000 (22:14 +0000)
committerstronk7 <stronk7>
Wed, 5 Apr 2006 22:14:24 +0000 (22:14 +0000)
(tested over MySQL 4.1.12, 4.1.16, 5.0.18 and 5.0.19) Bug 5055.
(http://moodle.org/bugs/bug.php?op=show&bugid=5055)

admin/utfdbmigrate.php

index 873632d02297d21106b76792be65cbe4059c0190..2b7d8841a8710457c1b486ad36da9c15f5d4e89b 100755 (executable)
@@ -500,19 +500,6 @@ function db_migrate2utf8(){   //Eloy: Perhaps some type of limit parameter here
                             }
                         }
 
-                        //BLOB TIME!
-                        $SQL = 'ALTER TABLE '.$CFG->prefix.$dbtablename.' CHANGE '.$fieldname.' '.$fieldname.' BLOB;';
-
-                        if ($fieldname != 'dummy') {
-                            if ($debug) {
-                                $db->debug=999;
-                            }
-                            execute_sql($SQL, $debug);
-                            if ($debug) {
-                                $db->debug=0;
-                            }
-                        }
-                        
                         /*********************************
                          * Change column encoding 2 phase*
                          *********************************/
@@ -521,7 +508,7 @@ function db_migrate2utf8(){   //Eloy: Perhaps some type of limit parameter here
                         if ($length > 0) {
                             $SQL.='('.$length.') ';
                         }
-                        $SQL .= ' NOT NULL DEFAULT '.$default.';';
+                        $SQL .= ' CHARACTER SET binary NOT NULL DEFAULT '.$default.';';
                         if ($debug) {
                             $db->debug=999;
                         }