<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[47184] trunk/tests/phpunit/tests/dbdelta.php: Tests: Allow `dbDelta()` tests to (mostly) run on MySQL 8.0.11+.</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { white-space: pre-line; overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="https://core.trac.wordpress.org/changeset/47184">47184</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"https://core.trac.wordpress.org/changeset/47184","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>SergeyBiryukov</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2020-02-05 04:28:13 +0000 (Wed, 05 Feb 2020)</dd>
</dl>

<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Tests: Allow `dbDelta()` tests to (mostly) run on MySQL 8.0.11+.

* MySQL 8.0.11 changed the `GeometryCollection` data type name to `GeomCollection`, with the latter being the preferred name.
* MySQL 8.0.17 removed support for the display width attribute for integer data types. Previously, default display width of 20 digits was used: `BIGINT(20)`.

The affected tests now check the MySQL server version and use the appropriate data types.

This leaves one unresolved failure on MySQL 8.0.17+ to be addressed in the future, caused by the same `BIGINT` display width discrepancy coming from `wp_get_db_schema()`.

Props kaggdesign, ottok, jeremyfelt, SergeyBiryukov.
Fixes <a href="https://core.trac.wordpress.org/ticket/44384">#44384</a>, <a href="https://core.trac.wordpress.org/ticket/49344">#49344</a>. See <a href="https://core.trac.wordpress.org/ticket/49364">#49364</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunktestsphpunittestsdbdeltaphp">trunk/tests/phpunit/tests/dbdelta.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunktestsphpunittestsdbdeltaphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/dbdelta.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/dbdelta.php     2020-02-05 03:28:33 UTC (rev 47183)
+++ trunk/tests/phpunit/tests/dbdelta.php       2020-02-05 04:28:13 UTC (rev 47184)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -15,6 +15,14 @@
</span><span class="cx" style="display: block; padding: 0 10px">        protected $max_index_length = 191;
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         * Display width for BIGINT data type.
+        *
+        * Prior to MySQL 8.0.17, default width of 20 digits was used: BIGINT(20).
+        * Since MySQL 8.0.17, display width for integer data types is no longer supported.
+        */
+       protected $bigint_display_width = '';
+
+       /**
</ins><span class="cx" style="display: block; padding: 0 10px">          * Make sure the upgrade code is loaded before the tests are run.
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        public static function setUpBeforeClass() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -31,12 +39,19 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                global $wpdb;
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                $db_version = $wpdb->db_version();
+
+               if ( version_compare( $db_version, '8.0.17', '<' ) ) {
+                       // Prior to MySQL 8.0.17, default width of 20 digits was used: BIGINT(20).
+                       $this->bigint_display_width = '(20)';
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 // Forcing MyISAM, because InnoDB only started supporting FULLTEXT indexes in MySQL 5.7.
</span><span class="cx" style="display: block; padding: 0 10px">                $wpdb->query(
</span><span class="cx" style="display: block; padding: 0 10px">                        $wpdb->prepare(
</span><span class="cx" style="display: block; padding: 0 10px">                                "
</span><span class="cx" style="display: block; padding: 0 10px">                                CREATE TABLE {$wpdb->prefix}dbdelta_test (
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                        id bigint(20) NOT NULL AUTO_INCREMENT,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                 id bigint{$this->bigint_display_width} NOT NULL AUTO_INCREMENT,
</ins><span class="cx" style="display: block; padding: 0 10px">                                         column_1 varchar(255) NOT NULL,
</span><span class="cx" style="display: block; padding: 0 10px">                                        column_2 text,
</span><span class="cx" style="display: block; padding: 0 10px">                                        column_3 blob,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -78,7 +93,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $updates = dbDelta(
</span><span class="cx" style="display: block; padding: 0 10px">                        "CREATE TABLE {$wpdb->prefix}dbdelta_create_test (
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                id bigint(20) NOT NULL AUTO_INCREMENT,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         id bigint{$this->bigint_display_width} NOT NULL AUTO_INCREMENT,
</ins><span class="cx" style="display: block; padding: 0 10px">                                 column_1 varchar(255) NOT NULL,
</span><span class="cx" style="display: block; padding: 0 10px">                                PRIMARY KEY  (id)
</span><span class="cx" style="display: block; padding: 0 10px">                        );"
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -113,7 +128,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $updates = dbDelta(
</span><span class="cx" style="display: block; padding: 0 10px">                        "
</span><span class="cx" style="display: block; padding: 0 10px">                        CREATE TABLE {$wpdb->prefix}dbdelta_test (
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                id bigint(20) NOT NULL AUTO_INCREMENT,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         id bigint{$this->bigint_display_width} NOT NULL AUTO_INCREMENT,
</ins><span class="cx" style="display: block; padding: 0 10px">                                 column_1 varchar(255) NOT NULL,
</span><span class="cx" style="display: block; padding: 0 10px">                                PRIMARY KEY  (id),
</span><span class="cx" style="display: block; padding: 0 10px">                                KEY key_1 (column_1($this->max_index_length)),
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -132,7 +147,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                global $wpdb;
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                // id: bigint(20) => int(11)
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         // id: bigint => int(11)
</ins><span class="cx" style="display: block; padding: 0 10px">                 $updates = dbDelta(
</span><span class="cx" style="display: block; padding: 0 10px">                        "
</span><span class="cx" style="display: block; padding: 0 10px">                        CREATE TABLE {$wpdb->prefix}dbdelta_test (
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -148,7 +163,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertEquals(
</span><span class="cx" style="display: block; padding: 0 10px">                        array(
</span><span class="cx" style="display: block; padding: 0 10px">                                "{$wpdb->prefix}dbdelta_test.id"
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                        => "Changed type of {$wpdb->prefix}dbdelta_test.id from bigint(20) to int(11)",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                 => "Changed type of {$wpdb->prefix}dbdelta_test.id from bigint{$this->bigint_display_width} to int(11)",
</ins><span class="cx" style="display: block; padding: 0 10px">                         ),
</span><span class="cx" style="display: block; padding: 0 10px">                        $updates
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -164,7 +179,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $updates = dbDelta(
</span><span class="cx" style="display: block; padding: 0 10px">                        "
</span><span class="cx" style="display: block; padding: 0 10px">                        CREATE TABLE {$wpdb->prefix}dbdelta_test (
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                id bigint(20) NOT NULL AUTO_INCREMENT,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         id bigint{$this->bigint_display_width} NOT NULL AUTO_INCREMENT,
</ins><span class="cx" style="display: block; padding: 0 10px">                                 column_1 varchar(255) NOT NULL,
</span><span class="cx" style="display: block; padding: 0 10px">                                extra_col longtext,
</span><span class="cx" style="display: block; padding: 0 10px">                                PRIMARY KEY  (id),
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -199,7 +214,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $updates = dbDelta(
</span><span class="cx" style="display: block; padding: 0 10px">                        "
</span><span class="cx" style="display: block; padding: 0 10px">                        CREATE TABLE {$wpdb->prefix}dbdelta_test (
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                id bigint(20) NOT NULL AUTO_INCREMENT,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         id bigint{$this->bigint_display_width} NOT NULL AUTO_INCREMENT,
</ins><span class="cx" style="display: block; padding: 0 10px">                                 PRIMARY KEY  (id),
</span><span class="cx" style="display: block; padding: 0 10px">                                KEY key_1 (column_1($this->max_index_length)),
</span><span class="cx" style="display: block; padding: 0 10px">                                KEY compound_key (id,column_1($this->max_index_length))
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -223,7 +238,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $updates = dbDelta(
</span><span class="cx" style="display: block; padding: 0 10px">                        "
</span><span class="cx" style="display: block; padding: 0 10px">                        CREATE TABLE {$wpdb->prefix}dbdelta_test (
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                id bigint(20) NOT NULL AUTO_INCREMENT,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         id bigint{$this->bigint_display_width} NOT NULL AUTO_INCREMENT,
</ins><span class="cx" style="display: block; padding: 0 10px">                                 column_1 varchar(255) NOT NULL,
</span><span class="cx" style="display: block; padding: 0 10px">                                extra_col longtext,
</span><span class="cx" style="display: block; padding: 0 10px">                                PRIMARY KEY  (id),
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -275,7 +290,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $updates = dbDelta(
</span><span class="cx" style="display: block; padding: 0 10px">                        "
</span><span class="cx" style="display: block; padding: 0 10px">                        CREATE TABLE {$wpdb->prefix}dbdelta_test (
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                id bigint(20) NOT NULL AUTO_INCREMENT,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         id bigint{$this->bigint_display_width} NOT NULL AUTO_INCREMENT,
</ins><span class="cx" style="display: block; padding: 0 10px">                                 column_1 varchar(255) NOT NULL,
</span><span class="cx" style="display: block; padding: 0 10px">                                PRIMARY KEY  (id),
</span><span class="cx" style="display: block; padding: 0 10px">                                KEY key_1 (column_1($this->max_index_length)),
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -420,7 +435,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $result = dbDelta(
</span><span class="cx" style="display: block; padding: 0 10px">                        "
</span><span class="cx" style="display: block; padding: 0 10px">                        CREATE TABLE {$wpdb->prefix}dbdelta_test (
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                id bigint(20) NOT NULL AUTO_INCREMENT,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         id bigint{$this->bigint_display_width} NOT NULL AUTO_INCREMENT,
</ins><span class="cx" style="display: block; padding: 0 10px">                                 column_1 varchar(255) NOT NULL,
</span><span class="cx" style="display: block; padding: 0 10px">                                column_2 tinytext,
</span><span class="cx" style="display: block; padding: 0 10px">                                column_3 blob,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -445,7 +460,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $result = dbDelta(
</span><span class="cx" style="display: block; padding: 0 10px">                        "
</span><span class="cx" style="display: block; padding: 0 10px">                        CREATE TABLE {$wpdb->prefix}dbdelta_test (
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                id bigint(20) NOT NULL AUTO_INCREMENT,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         id bigint{$this->bigint_display_width} NOT NULL AUTO_INCREMENT,
</ins><span class="cx" style="display: block; padding: 0 10px">                                 column_1 varchar(255) NOT NULL,
</span><span class="cx" style="display: block; padding: 0 10px">                                column_2 text,
</span><span class="cx" style="display: block; padding: 0 10px">                                column_3 tinyblob,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -470,7 +485,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $result = dbDelta(
</span><span class="cx" style="display: block; padding: 0 10px">                        "
</span><span class="cx" style="display: block; padding: 0 10px">                        CREATE TABLE {$wpdb->prefix}dbdelta_test (
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                id bigint(20) NOT NULL AUTO_INCREMENT,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         id bigint{$this->bigint_display_width} NOT NULL AUTO_INCREMENT,
</ins><span class="cx" style="display: block; padding: 0 10px">                                 column_1 varchar(255) NOT NULL,
</span><span class="cx" style="display: block; padding: 0 10px">                                column_2 bigtext,
</span><span class="cx" style="display: block; padding: 0 10px">                                column_3 blob,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -501,7 +516,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $result = dbDelta(
</span><span class="cx" style="display: block; padding: 0 10px">                        "
</span><span class="cx" style="display: block; padding: 0 10px">                        CREATE TABLE {$wpdb->prefix}dbdelta_test (
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                id bigint(20) NOT NULL AUTO_INCREMENT,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         id bigint{$this->bigint_display_width} NOT NULL AUTO_INCREMENT,
</ins><span class="cx" style="display: block; padding: 0 10px">                                 column_1 varchar(255) NOT NULL,
</span><span class="cx" style="display: block; padding: 0 10px">                                column_2 text,
</span><span class="cx" style="display: block; padding: 0 10px">                                column_3 mediumblob,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -531,7 +546,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $schema = "
</span><span class="cx" style="display: block; padding: 0 10px">                        CREATE TABLE {$wpdb->prefix}dbdelta_test2 (
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                `id` bigint(20) NOT NULL AUTO_INCREMENT,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         `id` bigint{$this->bigint_display_width} NOT NULL AUTO_INCREMENT,
</ins><span class="cx" style="display: block; padding: 0 10px">                                 `column_1` varchar(255) NOT NULL,
</span><span class="cx" style="display: block; padding: 0 10px">                                PRIMARY KEY  (id),
</span><span class="cx" style="display: block; padding: 0 10px">                                KEY compound_key (id,column_1($this->max_index_length))
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -554,15 +569,24 @@
</span><span class="cx" style="display: block; padding: 0 10px">        function test_spatial_indices() {
</span><span class="cx" style="display: block; padding: 0 10px">                global $wpdb;
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                if ( version_compare( $wpdb->db_version(), '5.4', '<' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $db_version = $wpdb->db_version();
+
+               if ( version_compare( $db_version, '5.4', '<' ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px">                         $this->markTestSkipped( 'Spatial indices require MySQL 5.4 and above.' );
</span><span class="cx" style="display: block; padding: 0 10px">                }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                $geomcollection_name = 'geomcollection';
+
+               if ( version_compare( $db_version, '8.0.11', '<' ) ) {
+                       // Prior to MySQL 8.0.11, GeometryCollection data type name was used.
+                       $geomcollection_name = 'geometrycollection';
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 $schema =
</span><span class="cx" style="display: block; padding: 0 10px">                        "
</span><span class="cx" style="display: block; padding: 0 10px">                        CREATE TABLE {$wpdb->prefix}spatial_index_test (
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                non_spatial bigint(20) unsigned NOT NULL,
-                               spatial_value geometrycollection NOT NULL,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         non_spatial bigint{$this->bigint_display_width} unsigned NOT NULL,
+                               spatial_value {$geomcollection_name} NOT NULL,
</ins><span class="cx" style="display: block; padding: 0 10px">                                 KEY non_spatial (non_spatial),
</span><span class="cx" style="display: block; padding: 0 10px">                                SPATIAL KEY spatial_key (spatial_value)
</span><span class="cx" style="display: block; padding: 0 10px">                        ) ENGINE=MyISAM;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -578,9 +602,9 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $schema =
</span><span class="cx" style="display: block; padding: 0 10px">                        "
</span><span class="cx" style="display: block; padding: 0 10px">                        CREATE TABLE {$wpdb->prefix}spatial_index_test (
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                non_spatial bigint(20) unsigned NOT NULL,
-                               spatial_value geometrycollection NOT NULL,
-                               spatial_value2 geometrycollection NOT NULL,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         non_spatial bigint{$this->bigint_display_width} unsigned NOT NULL,
+                               spatial_value {$geomcollection_name} NOT NULL,
+                               spatial_value2 {$geomcollection_name} NOT NULL,
</ins><span class="cx" style="display: block; padding: 0 10px">                                 KEY non_spatial (non_spatial),
</span><span class="cx" style="display: block; padding: 0 10px">                                SPATIAL KEY spatial_key (spatial_value)
</span><span class="cx" style="display: block; padding: 0 10px">                                SPATIAL KEY spatial_key2 (spatial_value2)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -608,7 +632,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $schema = "
</span><span class="cx" style="display: block; padding: 0 10px">                        CREATE TABLE {$wpdb->prefix}dbdelta_test2 (
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                `id` bigint(20) NOT NULL AUTO_INCREMENT,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         `id` bigint{$this->bigint_display_width} NOT NULL AUTO_INCREMENT,
</ins><span class="cx" style="display: block; padding: 0 10px">                                 `references` varchar(255) NOT NULL,
</span><span class="cx" style="display: block; padding: 0 10px">                                PRIMARY KEY  (`id`),
</span><span class="cx" style="display: block; padding: 0 10px">                                KEY `compound_key` (`id`,`references`($this->max_index_length))
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -638,7 +662,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $updates = dbDelta(
</span><span class="cx" style="display: block; padding: 0 10px">                        "
</span><span class="cx" style="display: block; padding: 0 10px">                        CREATE TABLE {$wpdb->prefix}dbdelta_test (
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                id bigint(20) NOT NULL AUTO_INCREMENT,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         id bigint{$this->bigint_display_width} NOT NULL AUTO_INCREMENT,
</ins><span class="cx" style="display: block; padding: 0 10px">                                 column_1 varchar(255) NOT NULL,
</span><span class="cx" style="display: block; padding: 0 10px">                                column_2 text,
</span><span class="cx" style="display: block; padding: 0 10px">                                column_3 blob,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -682,7 +706,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $schema = "
</span><span class="cx" style="display: block; padding: 0 10px">                        CREATE TABLE {$wpdb->prefix}dbdelta_test (
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                id bigint(20) NOT NULL AUTO_INCREMENT,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         id bigint{$this->bigint_display_width} NOT NULL AUTO_INCREMENT,
</ins><span class="cx" style="display: block; padding: 0 10px">                                 column_1 varchar(255) NOT NULL,
</span><span class="cx" style="display: block; padding: 0 10px">                                column_2 text,
</span><span class="cx" style="display: block; padding: 0 10px">                                column_3 blob,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -721,7 +745,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $updates = dbDelta(
</span><span class="cx" style="display: block; padding: 0 10px">                        "
</span><span class="cx" style="display: block; padding: 0 10px">                        CREATE TABLE {$wpdb->prefix}dbdelta_test (
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                id bigint(20) NOT NULL AUTO_INCREMENT,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         id bigint{$this->bigint_display_width} NOT NULL AUTO_INCREMENT,
</ins><span class="cx" style="display: block; padding: 0 10px">                                 column_1 varchar(255) NOT NULL,
</span><span class="cx" style="display: block; padding: 0 10px">                                column_2 text,
</span><span class="cx" style="display: block; padding: 0 10px">                                column_3 blob,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -744,7 +768,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $schema = "
</span><span class="cx" style="display: block; padding: 0 10px">                        CREATE TABLE {$wpdb->prefix}dbdelta_test (
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                id bigint(20) NOT NULL AUTO_INCREMENT,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         id bigint{$this->bigint_display_width} NOT NULL AUTO_INCREMENT,
</ins><span class="cx" style="display: block; padding: 0 10px">                                 column_1 varchar(255) NOT NULL,
</span><span class="cx" style="display: block; padding: 0 10px">                                column_2 text,
</span><span class="cx" style="display: block; padding: 0 10px">                                column_3 blob,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -779,7 +803,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $updates = dbDelta(
</span><span class="cx" style="display: block; padding: 0 10px">                        "
</span><span class="cx" style="display: block; padding: 0 10px">                        CREATE TABLE {$wpdb->prefix}dbdelta_test (
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                id bigint(20) NOT NULL AUTO_INCREMENT,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         id bigint{$this->bigint_display_width} NOT NULL AUTO_INCREMENT,
</ins><span class="cx" style="display: block; padding: 0 10px">                                 column_1 varchar(255) NOT NULL,
</span><span class="cx" style="display: block; padding: 0 10px">                                column_2 text,
</span><span class="cx" style="display: block; padding: 0 10px">                                column_3 blob,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -803,7 +827,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $updates = dbDelta(
</span><span class="cx" style="display: block; padding: 0 10px">                        "
</span><span class="cx" style="display: block; padding: 0 10px">                        CREATE TABLE {$wpdb->prefix}dbdelta_test (
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                id bigint(20) NOT NULL AUTO_INCREMENT,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         id bigint{$this->bigint_display_width} NOT NULL AUTO_INCREMENT,
</ins><span class="cx" style="display: block; padding: 0 10px">                                 column_1 varchar(255) NOT NULL,
</span><span class="cx" style="display: block; padding: 0 10px">                                column_2 text,
</span><span class="cx" style="display: block; padding: 0 10px">                                column_3 blob,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -827,7 +851,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $updates = dbDelta(
</span><span class="cx" style="display: block; padding: 0 10px">                        "
</span><span class="cx" style="display: block; padding: 0 10px">                        CREATE TABLE {$wpdb->prefix}dbdelta_test (
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                id bigint(20) NOT NULL AUTO_INCREMENT,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         id bigint{$this->bigint_display_width} NOT NULL AUTO_INCREMENT,
</ins><span class="cx" style="display: block; padding: 0 10px">                                 column_1 varchar(255) NOT NULL,
</span><span class="cx" style="display: block; padding: 0 10px">                                column_2 text,
</span><span class="cx" style="display: block; padding: 0 10px">                                column_3 blob,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -851,7 +875,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $updates = dbDelta(
</span><span class="cx" style="display: block; padding: 0 10px">                        "
</span><span class="cx" style="display: block; padding: 0 10px">                        CREATE TABLE {$wpdb->prefix}dbdelta_test (
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                id bigint(20) NOT NULL AUTO_INCREMENT,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         id bigint{$this->bigint_display_width} NOT NULL AUTO_INCREMENT,
</ins><span class="cx" style="display: block; padding: 0 10px">                                 column_1 varchar(255) NOT NULL,
</span><span class="cx" style="display: block; padding: 0 10px">                                column_2 text,
</span><span class="cx" style="display: block; padding: 0 10px">                                column_3 blob,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -875,7 +899,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $updates = dbDelta(
</span><span class="cx" style="display: block; padding: 0 10px">                        "
</span><span class="cx" style="display: block; padding: 0 10px">                        CREATE TABLE {$wpdb->prefix}dbdelta_test (
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                id bigint(20) NOT NULL AUTO_INCREMENT,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         id bigint{$this->bigint_display_width} NOT NULL AUTO_INCREMENT,
</ins><span class="cx" style="display: block; padding: 0 10px">                                 column_1 varchar(255) NOT NULL,
</span><span class="cx" style="display: block; padding: 0 10px">                                column_2 text,
</span><span class="cx" style="display: block; padding: 0 10px">                                column_3 blob,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -900,7 +924,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $updates = dbDelta(
</span><span class="cx" style="display: block; padding: 0 10px">                        "
</span><span class="cx" style="display: block; padding: 0 10px">                        CREATE TABLE {$wpdb->prefix}dbdelta_test (
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                id bigint(20) NOT NULL AUTO_INCREMENT,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         id bigint{$this->bigint_display_width} NOT NULL AUTO_INCREMENT,
</ins><span class="cx" style="display: block; padding: 0 10px">                                 column_1 varchar(255) NOT NULL,
</span><span class="cx" style="display: block; padding: 0 10px">                                column_2 text,
</span><span class="cx" style="display: block; padding: 0 10px">                                column_3 blob,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -925,7 +949,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $updates = dbDelta(
</span><span class="cx" style="display: block; padding: 0 10px">                        "
</span><span class="cx" style="display: block; padding: 0 10px">                        CREATE TABLE {$wpdb->prefix}dbdelta_test (
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                id bigint(20) NOT NULL AUTO_INCREMENT,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         id bigint{$this->bigint_display_width} NOT NULL AUTO_INCREMENT,
</ins><span class="cx" style="display: block; padding: 0 10px">                                 column_1 varchar(255) NOT NULL,
</span><span class="cx" style="display: block; padding: 0 10px">                                column_2 text,
</span><span class="cx" style="display: block; padding: 0 10px">                                column_3 blob,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -948,7 +972,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $updates = dbDelta(
</span><span class="cx" style="display: block; padding: 0 10px">                        "
</span><span class="cx" style="display: block; padding: 0 10px">                        CREATE TABLE {$wpdb->prefix}dbdelta_test (
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                id bigint(20) NOT NULL AUTO_INCREMENT,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         id bigint{$this->bigint_display_width} NOT NULL AUTO_INCREMENT,
</ins><span class="cx" style="display: block; padding: 0 10px">                                 column_1 varchar(255) NOT NULL,
</span><span class="cx" style="display: block; padding: 0 10px">                                column_2 text,
</span><span class="cx" style="display: block; padding: 0 10px">                                column_3 blob,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -966,7 +990,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $updates = dbDelta(
</span><span class="cx" style="display: block; padding: 0 10px">                        "
</span><span class="cx" style="display: block; padding: 0 10px">                        CREATE TABLE {$wpdb->prefix}dbdelta_test (
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                id bigint(20) NOT NULL AUTO_INCREMENT,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         id bigint{$this->bigint_display_width} NOT NULL AUTO_INCREMENT,
</ins><span class="cx" style="display: block; padding: 0 10px">                                 column_1 varchar(255) NOT NULL,
</span><span class="cx" style="display: block; padding: 0 10px">                                column_2 text,
</span><span class="cx" style="display: block; padding: 0 10px">                                column_3 blob,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -984,7 +1008,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $updates = dbDelta(
</span><span class="cx" style="display: block; padding: 0 10px">                        "
</span><span class="cx" style="display: block; padding: 0 10px">                        CREATE TABLE {$wpdb->prefix}dbdelta_test (
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                id bigint(20) NOT NULL AUTO_INCREMENT,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         id bigint{$this->bigint_display_width} NOT NULL AUTO_INCREMENT,
</ins><span class="cx" style="display: block; padding: 0 10px">                                 column_1 varchar(255) NOT NULL,
</span><span class="cx" style="display: block; padding: 0 10px">                                column_2 text,
</span><span class="cx" style="display: block; padding: 0 10px">                                column_3 blob,
</span></span></pre>
</div>
</div>

</body>
</html>