Opened 9 years ago
Closed 8 years ago
#38856 closed enhancement (fixed)
Backward compat consideration for wp_blogs.archived
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 4.9 | Priority: | normal |
| Severity: | normal | Version: | 4.7 |
| Component: | Networks and Sites | Keywords: | has-patch |
| Focuses: | multisite | Cc: |
Description (last modified by )
The archived column in wp_blogs used to be of the enum data type, but was switched to tinyint 3 years ago, in r25448.
Some older instances might not have migrated to the newer data type (ALTERs on large tables isn't fun).
In class-wp-site-query.php, we use $wpdb->prepare( "archived = %d ", $archived );, which translates to archived = 0|1. Tis works great with tinyint, but fails with the older enum type, as it expects the value to be single quoted.
Since archived = '0|1' works with both data types, @jeremyfelt suggested we move the prepare() statement to using %s and absint() instead: https://wordpress.slack.com/archives/core-multisite/p1479504691000517
Attachments (1)
Change History (5)
Note: See
TracTickets for help on using
tickets.
Related: #27832