Go to file
Dominik Schilling (ocean90) 35a7acb459 Database: Normalize index definitions in `dbDelta()`.
`dbDelta()` compares the index definitions against the result of `SHOW INDEX FROM $table_name`. This requires a specific format so indices are not unnecessarily re-created. This format wasn't ensured, until now.

* Parse the raw index definition to extract the type, name and columns so a normalized definition can be built (#20263, #34873).
* Standardize on uppercase types (#34871) and on 'KEY'. 'INDEX' is only a synonym for 'KEY'.
* Escape index names with backticks (#20263).
* Normalize columns: Ignore ASC and DESC definitions (#34959), remove whitespaces (#34869) and escape column names with backticks (#20263).
* Add backticks to all index change queries (#20263).

Props ocean90, pento, kurtpayne.
Fixes #20263, #34869, #34871, #34873, #34959.

git-svn-id: https://develop.svn.wordpress.org/trunk@37583 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-27 11:56:20 +00:00
src Database: Normalize index definitions in `dbDelta()`. 2016-05-27 11:56:20 +00:00
tests Database: Normalize index definitions in `dbDelta()`. 2016-05-27 11:56:20 +00:00
tools/i18n i18n tools: In `StringExtractor` don't strip slashes from URLs. 2016-02-29 20:44:31 +00:00
.editorconfig Use HTTPS URLs for codex.wordpress.org. 2015-04-12 21:28:58 +00:00
.gitignore Remove accidental .svn addition to .gitignore 2015-12-12 18:26:22 +00:00
.jshintrc Build: Prevent non-breaking spaces from accidentally being inserted into JavaScript files. 2015-11-12 12:04:55 +00:00
.travis.yml Tests: Upgrade the HHVM job to use Ubuntu Trusty, and a more recent version of HHVM. 2016-05-25 06:11:20 +00:00
Gruntfile.js Build/Test Tools: Run image tasks only if there are changes 2016-04-15 10:18:03 +00:00
package.json Update grunt-contrib-uglify from ~0.10.0 to ~1.0.1 2016-04-15 16:09:07 +00:00
phpunit.xml.dist Set a whitelist for PHPUnit code coverage. 2016-05-17 20:22:57 +00:00
wp-cli.yml Remove debug mode from WP-CLI by default, as it now outputs too much debugging information to be of use during normal development. 2015-11-28 18:36:06 +00:00
wp-config-sample.php Lightly clean up and improve inline documentation in wp-config-sample.php. 2015-05-10 00:05:30 +00:00
wp-tests-config-sample.php Unit Tests: Correct comment in `wp-tests-config-sample.php`. 2016-01-21 20:24:12 +00:00