Roxen.git / server / etc / modules / DBManager.pmod

version» Context lines:

Roxen.git/server/etc/modules/DBManager.pmod:501:    string db_version;    // Catch in case mysql_upgrade_info is a directory (unlikely, but...).    catch {    db_version =    Stdio.read_bytes(combine_path(roxenloader.query_mysql_data_dir(),    "mysql_upgrade_info"));    // Typically a string like "5.5.30", "5.5.39-MariaDB" or    // "10.0.13-MariaDB".    };    db_version = db_version && (db_version - "\n"); +  // MariaDB 10.3 ends the entry with a \0 instead of a \n. +  db_version = db_version && (db_version - "\0");       if (db_version &&    has_suffix(mysql_version, "-log") &&    !has_suffix(db_version, "-log")) {    db_version += "-log";    }    -  + #if 0 +  werror("db_version: %O\n" +  "mysql_version: %O\n" +  "Up to date: %O\n", +  db_version, mysql_version, +  db_version && has_value(mysql_version, db_version)); + #endif +     // Comparing 5.5.5-10.0.13-MariaDB-log and 10.0.13-MariaDB-log    if (db_version && has_value(mysql_version, db_version)) {    // Already up-to-date.    } else {    werror("Upgrading database from %s to %s...\n",    db_version || "UNKNOWN", mysql_version);       if (mysql_location->mysql_upgrade) {    // Upgrade method in MySQL 5.0.19 and later (UNIX),    // MySQL 5.0.25 and later (NT).    int err = Process.Process(({ mysql_location->mysql_upgrade, -  +  "--defaults-file=" + +  roxenloader.query_mysql_config_file(),   #ifdef __NT__    "--pipe",   #endif    "-S", roxenloader.query_mysql_socket(),    "--user=rw",    // "--verbose",    }))->wait();    if (err) {    // NB: The first invocation of mysql_upgrade often fails with    // (--verbose mode):
Roxen.git/server/etc/modules/DBManager.pmod:555:    // mysql    // performance_schema    // Phase 4/7: Running 'mysql_fix_privilege_tables'    // Phase 5/7: Fixing table and database names    //    // Note that the performance_schema doesn't show up in    // the first pass.    werror("Warning: Upgrade failed with code %d; trying once more...\n",    err);    err = Process.Process(({ mysql_location->mysql_upgrade, +  "--defaults-file=" + +  roxenloader.query_mysql_config_file(),   #ifdef __NT__    "--pipe",   #endif    "-S", roxenloader.query_mysql_socket(),    "--user=rw",    // "--verbose",    }))->wait();    if (err) {    error("Upgrading to %s failed with code %d.\n", mysql_version, err);    }
Roxen.git/server/etc/modules/DBManager.pmod:2070:    } else {    error("No database specified in DB-URL for DB alias %s.\n", dbname);    }    arr = host/":";    if (sizeof(arr) > 1) {    port = arr[1..]*":";    host = arr[0];    }       // Time to build the command line... -  array(string) cmd = ({ mysqldump, "--add-drop-table", "--create-options", +  array(string) cmd = ({ +  mysqldump, +  "--defaults-file=" + roxenloader.query_mysql_config_file(), +  "--add-drop-table", "--create-options",    "--complete-insert", "--compress",    "--extended-insert", "--hex-blob", -  "--quick", "--quote-names" }); +  "--quick", "--quote-names", +  });    if ((host == "") || (host == "localhost")) {    // Socket.    if (port) {    cmd += ({ "--socket=" + port });    }    } else {    // Hostname.    cmd += ({ "--host=" + host });    if (port) {    cmd += ({ "--port=" + port });