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

version» Context lines:

Roxen.git/server/etc/modules/DBManager.pmod:524:    // 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). -  Process.Process(({ mysql_location->mysql_upgrade, +  int err = Process.Process(({ mysql_location->mysql_upgrade,   #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): +  // +  // Phase 3/7: Fixing views +  // Processing databases +  // information_schema +  // mysql +  // Phase 4/7: Running 'mysql_fix_privilege_tables' +  // [TIMESTAMP] [ERROR] Column count of mysql.db is wrong. Expected 22, found 21. The table is probably corrupted +  // [TIMESTAMP] [ERROR] mysqld: Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler. +  // ERROR 1408 (HY000) at line 542: Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler. +  // FATAL ERROR: Upgrade failed +  // +  // When run a second time (still --verbose mode) it works fine: +  // +  // Phase 3/7: Fixing views +  // Processing databases +  // information_schema +  // 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, + #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); +  } +  }    } else if ((mysql_location->basedir) &&    (update_mysql =    (Stdio.read_bytes(combine_path(mysql_location->basedir,    "share/mysql",    "mysql_fix_privilege_tables.sql")) ||    Stdio.read_bytes(combine_path(mysql_location->basedir,    "share",    "mysql_fix_privilege_tables.sql"))))) {    // Don't complain about failures, they're expected...    execute_sql_script(db, update_mysql, 1);