Problem/Motivation

I was waiting for the mysql 8 support to update my website. Got it in version 7.76

After manual update my website comes up atlleast.

Than did "drush up" to update my modules.

Steps to reproduce

* Ubuntu Server 20.04
* Mysql 8.0.22
* Manually upgrade drupal core from version 7.74 to 7.76. (Actually moved version 7.74 to this server and nothing was working and was waiting for the mysql 8 patch.)
* Had this setting uncommented:
$conf['mysql_identifier_quote_character'] = '"';
* After manual udpate , did drush up and see these failures:

 drush up
Update information last refreshed: Thu, 2020-12-03 00:22
 Name                                           Installed Version  Proposed version  Message
 Advanced CSS/JS Aggregation (AdvAgg) (advagg)  7.x-2.33           7.x-2.35          Update available
 Backup and Migrate (backup_migrate)            7.x-2.8            7.x-3.9           SECURITY UPDATE available
 Chaos tools (ctools)                           7.x-1.15           7.x-1.17          Update available
 Colorbox (colorbox)                            7.x-2.13           7.x-2.15          Update available
 Memcache (memcache)                            7.x-1.6            7.x-1.8           Update available
 Views (views)                                  7.x-3.23           7.x-3.24          Update available


Security and code updates will be made to the following projects: Advanced CSS/JS Aggregation [advagg-7.x-2.35], Backup and Migrate [backup_migrate-7.x-3.9], Chaos Tool Suite (ctools) [ctools-7.x-1.17], Colorbox [colorbox-7.x-2.15], Memcache API and Integration [memcache-7.x-1.8], Views (for Drupal 7) [views-7.x-3.24]

Note: A backup of your project will be stored to backups directory if it is not managed by a supported version control system.
Note: If you have made any modifications to any file that belongs to one of these projects, you will have to migrate those modifications after updating.
Do you really want to continue with the update process? (y/n): y
Project advagg was updated successfully. Installed version is now 7.x-2.35.
Backups were saved into the directory /home/username/drush-backups/username/20201202232228/modules/advagg.                                             [ok]
Project backup_migrate was updated successfully. Installed version is now 7.x-3.9.
Backups were saved into the directory /home/username/drush-backups/username/20201202232228/modules/backup_migrate.                                     [ok]
Project ctools was updated successfully. Installed version is now 7.x-1.17.
Backups were saved into the directory /home/username/drush-backups/username/20201202232228/modules/ctools.                                             [ok]
Project colorbox was updated successfully. Installed version is now 7.x-2.15.
Backups were saved into the directory /home/username/drush-backups/username/20201202232228/modules/colorbox.                                           [ok]
Project memcache was updated successfully. Installed version is now 7.x-1.8.
Backups were saved into the directory /home/username/drush-backups/username/20201202232228/modules/memcache.                                           [ok]
Project views was updated successfully. Installed version is now 7.x-3.24.
Backups were saved into the directory /home/username/drush-backups/username/20201202232228/modules/views.                                              [ok]
 Backup_migrate  7300  Upgrade from Backup & Migrate 7.x-2.x.   - Uninstall the Backup Migrate Files module if it's installed.  - Uninstall the NodeSquirrel module if
                       it's installed.  - Upgrade the configurations.
 Backup_migrate  7301  Switch the cron switch to text.
 Backup_migrate  7302  Add a second destination to schedules.
 Backup_migrate  7303  Add a serial id field to all tables to allow them to be ctools exportable.
 Backup_migrate  7304  Update all schedules to use the built in cron if none is specified.
 Backup_migrate  7305  Fix schema mismatch after upgrade.
 Backup_migrate  7306  Leave a message to explain the mixup over the backup option.
 Backup_migrate  7307  - 'backup_migrate_backup_memory_limit' vs 'backup_migrate_memory_limit'.
 Backup_migrate  7308  Update profiles table filter field to accommodate larger serialized strings.
 Backup_migrate  7309  NodeSquirrel support has been removed.
 Backup_migrate  7310  Disable e-mail destinations.
 Backup_migrate  7311  Adjust the default performance settings.
Do you wish to run all pending updates? (y/n): y
Performed update: backup_migrate_update_7300                                                                                                                 [ok]
yPerformed update: backup_migrate_update_7301                                                                                                                 [ok]
Performed update: backup_migrate_update_7302                                                                                                                 [ok]
SQLSTATE[42000]: Syntax error or access violation: 1171 All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead           [error]
Performed update: backup_migrate_update_7303                                                                                                                 [ok]
Drush command terminated abnormally due to an unrecoverable error.                                                                                           [error]
PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"registry" r
WHERE  (r.name LIKE 'drush\\_drupal\\_environment' ESCAPE '\\') AND' at line 3: SELECT r.filename AS filename
FROM
{registry} r
WHERE  (r.name LIKE :db_condition_placeholder_0 ESCAPE '\\') AND (r.type = :db_condition_placeholder_1) ; Array
(
    [:db_condition_placeholder_0] => drush\_drupal\_environment
    [:db_condition_placeholder_1] => class
)
 in _registry_check_code() (line 3509 of /home/username/public_html/mysite.com/includes/bootstrap.inc).
Finished performing updates.                                                               

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Comments

ahsan.fayyaz created an issue. See original summary.

cilefen’s picture

ahsan.fayyaz’s picture

Issue summary: View changes
mcdruid’s picture

There's also this one: #3172388: backup_migrate resets sql_mode causing problems with D7's MySQL 8 support

You're free to use a double quote (") as the mysql_identifier_quote_character if you wish, but that's exactly what initially caused a problem with backup_migrate (often when clearing caches).

We chose to use a backtick (`) by default instead for D7 because of issues like this.

If you still have issues after commenting that line in settings.php (so that you're using core's default of a backtick), let us know.

Also, are you using a recent release of drush? There were some fixes for MySQL 8 support there too e.g. in 8.3.6 in August this year.

Status: Active » Closed (outdated)

Automatically closed because Drupal 7 security and bugfix support has ended as of 5 January 2025. If the issue verifiably applies to later versions, please reopen with details and update the version.