mirror of
https://github.com/WordPress/WordPress.git
synced 2024-08-11 23:32:58 +02:00
In [30056], the UNIQUE index was removed from the 'slug' column of `wp_terms`. While we have numerous checks in place to avoid the creation of unwanted duplicate term+term_taxonomy pairs, it's possible that in certain edge cases - such as during the lag caused by database replication, or a race condition involving near-simultaneous creation of more than one term - we'll end up unwittingly inserting two identical rows. The current changeset minimizes this risk by introducing a failsafe mechanism into `wp_insert_term()`. After a term and term_taxonomy are INSERTed, we check to see whether the term just created is a duplicate of an existing term; if so, we delete the new one and keep the old one. This prevents problems caused by replication lag, because SELECT queries that take place after an INSERT will hit the master database; it mitigates race conditions by enforcing that the term that was created first (ie, the one with the lowest `term_id`) is always the "canonical" one. Props nacin, markjaquith. See #22023, #5809. Built from https://develop.svn.wordpress.org/trunk@30238 git-svn-id: http://core.svn.wordpress.org/trunk@30238 1a063a9b-81f0-0310-95a4-ce76da25c4cd
36 lines
629 B
PHP
36 lines
629 B
PHP
<?php
|
|
/**
|
|
* The WordPress version string
|
|
*
|
|
* @global string $wp_version
|
|
*/
|
|
$wp_version = '4.1-alpha-30238';
|
|
|
|
/**
|
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
|
*
|
|
* @global int $wp_db_version
|
|
*/
|
|
$wp_db_version = 30133;
|
|
|
|
/**
|
|
* Holds the TinyMCE version
|
|
*
|
|
* @global string $tinymce_version
|
|
*/
|
|
$tinymce_version = '4106-20141022';
|
|
|
|
/**
|
|
* Holds the required PHP version
|
|
*
|
|
* @global string $required_php_version
|
|
*/
|
|
$required_php_version = '5.2.4';
|
|
|
|
/**
|
|
* Holds the required MySQL version
|
|
*
|
|
* @global string $required_mysql_version
|
|
*/
|
|
$required_mysql_version = '5.0';
|