Dominik Schilling
2f998cac7f
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 .
Built from https://develop.svn.wordpress.org/trunk@37583
git-svn-id: http://core.svn.wordpress.org/trunk@37551 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-27 11:57:30 +00:00
..
2016-05-13 18:41:31 +00:00
2016-05-17 01:45:27 +00:00
2016-05-23 18:54:27 +00:00
2016-03-18 20:43:26 +00:00
2016-05-25 15:13:28 +00:00
2016-03-08 17:15:27 +00:00
2016-05-13 11:15:29 +00:00
2016-05-22 18:08:29 +00:00
2016-05-25 16:05:27 +00:00
2016-05-22 18:06:28 +00:00
2016-05-23 18:59:27 +00:00
2016-05-19 00:06:28 +00:00
2016-05-22 18:25:26 +00:00
2016-05-22 18:24:28 +00:00
2016-05-25 18:29:28 +00:00
2016-05-18 22:07:28 +00:00
2016-05-22 18:50:28 +00:00
2016-05-22 18:50:28 +00:00
2016-05-26 04:50:27 +00:00
2016-05-22 18:50:28 +00:00
2016-05-22 18:50:28 +00:00
2016-05-22 18:43:27 +00:00
2016-05-22 18:50:28 +00:00
2016-05-22 18:50:28 +00:00
2016-05-13 04:42:28 +00:00
2016-03-30 13:58:28 +00:00
2016-03-22 17:22:29 +00:00
2016-05-22 18:50:28 +00:00
2016-04-29 15:47:27 +00:00
2016-05-22 18:50:28 +00:00
2016-05-22 18:50:28 +00:00
2016-05-22 17:39:28 +00:00
2016-05-23 18:54:27 +00:00
2016-05-22 18:10:29 +00:00
2016-05-23 18:54:27 +00:00
2016-05-22 18:10:29 +00:00
2016-05-22 18:10:29 +00:00
2016-05-22 18:10:29 +00:00
2016-05-22 18:10:29 +00:00
2016-05-23 18:54:27 +00:00
2016-05-22 18:15:28 +00:00
2016-05-23 18:54:27 +00:00
2016-05-22 17:39:28 +00:00
2016-05-22 18:15:28 +00:00
2016-05-22 18:15:28 +00:00
2016-05-22 18:15:28 +00:00
2016-05-22 18:15:28 +00:00
2016-05-22 18:15:28 +00:00
2016-05-13 18:41:31 +00:00
2016-05-22 18:15:28 +00:00
2016-05-22 18:15:28 +00:00
2016-05-22 18:15:28 +00:00
2016-05-22 18:15:28 +00:00
2016-05-22 18:15:28 +00:00
2016-05-23 18:54:27 +00:00
2016-05-22 18:15:28 +00:00
2016-05-25 19:22:27 +00:00
2016-05-23 18:54:27 +00:00
2016-05-22 18:15:28 +00:00
2016-05-13 18:41:31 +00:00
2016-05-20 22:04:27 +00:00
2016-05-20 04:41:27 +00:00
2016-05-02 04:00:28 +00:00
2016-05-26 15:17:27 +00:00
2016-05-23 18:54:27 +00:00
2016-05-22 18:15:28 +00:00
2016-05-13 18:41:31 +00:00
2016-05-13 18:41:31 +00:00
2016-04-30 22:36:28 +00:00
2016-05-22 18:15:28 +00:00
2016-05-23 18:54:27 +00:00
2016-05-23 18:59:27 +00:00
2016-03-14 22:39:26 +00:00
2016-05-22 18:50:28 +00:00
2016-05-22 18:50:28 +00:00
2016-05-23 18:59:27 +00:00
2016-05-23 18:59:27 +00:00
2016-05-23 18:59:27 +00:00
2016-05-22 18:50:28 +00:00
2016-05-13 05:11:27 +00:00
2016-05-23 18:59:27 +00:00
2016-05-24 06:15:28 +00:00
2016-05-22 18:50:28 +00:00
2016-05-23 19:01:27 +00:00
2016-05-23 19:01:27 +00:00
2016-05-23 19:01:27 +00:00
2016-05-23 19:01:27 +00:00
2016-04-13 04:30:29 +00:00
2016-05-25 16:05:27 +00:00
2016-05-23 19:01:27 +00:00
2016-05-23 19:01:27 +00:00
2016-05-22 18:48:28 +00:00
2016-05-25 18:25:28 +00:00
2016-05-17 20:22:28 +00:00
2016-05-13 18:41:31 +00:00
2016-04-17 12:01:27 +00:00
2016-05-25 16:05:27 +00:00
2016-05-22 18:50:28 +00:00
2016-05-22 18:50:28 +00:00
2016-05-23 18:56:27 +00:00
2016-05-22 18:50:28 +00:00
2016-05-20 20:57:28 +00:00
2016-05-25 16:17:27 +00:00
2016-05-22 18:50:28 +00:00
2016-05-23 19:02:28 +00:00
2016-05-23 19:02:28 +00:00
2016-05-02 04:00:28 +00:00
2016-05-23 19:02:28 +00:00
2016-05-22 18:29:27 +00:00
2016-05-23 19:02:28 +00:00
2016-05-23 19:02:28 +00:00
2016-05-23 19:02:28 +00:00
2016-05-23 19:02:28 +00:00
2016-05-23 19:02:28 +00:00
2016-05-07 15:59:29 +00:00
2016-05-23 09:00:29 +00:00
2016-05-23 19:02:28 +00:00
2016-05-22 18:50:28 +00:00
2016-05-26 15:22:27 +00:00
2016-05-22 18:50:28 +00:00
2016-05-22 18:50:28 +00:00
2016-05-23 19:02:28 +00:00
2016-05-25 19:36:28 +00:00
2016-05-23 19:02:28 +00:00
2016-05-22 18:50:28 +00:00
2016-05-27 11:57:30 +00:00
2016-05-23 19:02:28 +00:00
2016-05-24 05:24:26 +00:00
2016-05-23 19:02:28 +00:00