@@ -724,14 +724,14 @@ public function testCreateTable() {
724
724
'Type ' => 'bigint(20) unsigned ' ,
725
725
'Null ' => 'NO ' ,
726
726
'Key ' => 'PRI ' ,
727
- 'Default ' => ' 0 ' ,
728
- 'Extra ' => '' ,
727
+ 'Default ' => null ,
728
+ 'Extra ' => 'auto_increment ' ,
729
729
),
730
730
(object ) array (
731
731
'Field ' => 'user_login ' ,
732
732
'Type ' => 'varchar(60) ' ,
733
733
'Null ' => 'NO ' ,
734
- 'Key ' => '' ,
734
+ 'Key ' => 'MUL ' ,
735
735
'Default ' => '' ,
736
736
'Extra ' => '' ,
737
737
),
@@ -747,15 +747,15 @@ public function testCreateTable() {
747
747
'Field ' => 'user_nicename ' ,
748
748
'Type ' => 'varchar(50) ' ,
749
749
'Null ' => 'NO ' ,
750
- 'Key ' => '' ,
750
+ 'Key ' => 'MUL ' ,
751
751
'Default ' => '' ,
752
752
'Extra ' => '' ,
753
753
),
754
754
(object ) array (
755
755
'Field ' => 'user_email ' ,
756
756
'Type ' => 'varchar(100) ' ,
757
757
'Null ' => 'NO ' ,
758
- 'Key ' => '' ,
758
+ 'Key ' => 'MUL ' ,
759
759
'Default ' => '' ,
760
760
'Extra ' => '' ,
761
761
),
@@ -848,8 +848,8 @@ enum_column ENUM('a', 'b', 'c') NOT NULL DEFAULT 'a',
848
848
'Type ' => 'bigint(20) unsigned ' ,
849
849
'Null ' => 'NO ' ,
850
850
'Key ' => 'PRI ' ,
851
- 'Default ' => ' 0 ' ,
852
- 'Extra ' => '' ,
851
+ 'Default ' => null ,
852
+ 'Extra ' => 'auto_increment ' ,
853
853
),
854
854
(object ) array (
855
855
'Field ' => 'decimal_column ' ,
@@ -1052,7 +1052,7 @@ public function testColumnWithOnUpdate() {
1052
1052
'Type ' => 'int(11) ' ,
1053
1053
'Null ' => 'NO ' ,
1054
1054
'Key ' => '' ,
1055
- 'Default ' => ' 0 ' ,
1055
+ 'Default ' => null ,
1056
1056
'Extra ' => '' ,
1057
1057
),
1058
1058
(object ) array (
@@ -1061,7 +1061,7 @@ public function testColumnWithOnUpdate() {
1061
1061
'Null ' => 'YES ' ,
1062
1062
'Key ' => '' ,
1063
1063
'Default ' => null ,
1064
- 'Extra ' => '' ,
1064
+ 'Extra ' => 'on update CURRENT_TIMESTAMP ' ,
1065
1065
),
1066
1066
),
1067
1067
$ results
@@ -1079,7 +1079,7 @@ public function testColumnWithOnUpdate() {
1079
1079
'Type ' => 'int(11) ' ,
1080
1080
'Null ' => 'NO ' ,
1081
1081
'Key ' => '' ,
1082
- 'Default ' => ' 0 ' ,
1082
+ 'Default ' => null ,
1083
1083
'Extra ' => '' ,
1084
1084
),
1085
1085
(object ) array (
@@ -1088,15 +1088,15 @@ public function testColumnWithOnUpdate() {
1088
1088
'Null ' => 'YES ' ,
1089
1089
'Key ' => '' ,
1090
1090
'Default ' => null ,
1091
- 'Extra ' => '' ,
1091
+ 'Extra ' => 'on update CURRENT_TIMESTAMP ' ,
1092
1092
),
1093
1093
(object ) array (
1094
1094
'Field ' => 'updated_at ' ,
1095
1095
'Type ' => 'timestamp ' ,
1096
1096
'Null ' => 'YES ' ,
1097
1097
'Key ' => '' ,
1098
1098
'Default ' => null ,
1099
- 'Extra ' => '' ,
1099
+ 'Extra ' => 'on update CURRENT_TIMESTAMP ' ,
1100
1100
),
1101
1101
),
1102
1102
$ results
@@ -1221,7 +1221,7 @@ public function testChangeColumnWithOnUpdate() {
1221
1221
'Type ' => 'int(11) ' ,
1222
1222
'Null ' => 'NO ' ,
1223
1223
'Key ' => '' ,
1224
- 'Default ' => ' 0 ' ,
1224
+ 'Default ' => null ,
1225
1225
'Extra ' => '' ,
1226
1226
),
1227
1227
(object ) array (
@@ -1254,7 +1254,7 @@ public function testChangeColumnWithOnUpdate() {
1254
1254
'Type ' => 'int(11) ' ,
1255
1255
'Null ' => 'NO ' ,
1256
1256
'Key ' => '' ,
1257
- 'Default ' => ' 0 ' ,
1257
+ 'Default ' => null ,
1258
1258
'Extra ' => '' ,
1259
1259
),
1260
1260
(object ) array (
@@ -1263,7 +1263,7 @@ public function testChangeColumnWithOnUpdate() {
1263
1263
'Null ' => 'YES ' ,
1264
1264
'Key ' => '' ,
1265
1265
'Default ' => null ,
1266
- 'Extra ' => '' ,
1266
+ 'Extra ' => 'on update CURRENT_TIMESTAMP ' ,
1267
1267
),
1268
1268
),
1269
1269
$ results
@@ -1286,7 +1286,7 @@ public function testChangeColumnWithOnUpdate() {
1286
1286
'Type ' => 'int(11) ' ,
1287
1287
'Null ' => 'NO ' ,
1288
1288
'Key ' => '' ,
1289
- 'Default ' => ' 0 ' ,
1289
+ 'Default ' => null ,
1290
1290
'Extra ' => '' ,
1291
1291
),
1292
1292
(object ) array (
@@ -1328,15 +1328,15 @@ public function testAlterTableWithColumnFirstAndAfter() {
1328
1328
'Type ' => 'int(11) ' ,
1329
1329
'Null ' => 'NO ' ,
1330
1330
'Key ' => '' ,
1331
- 'Default ' => ' 0 ' ,
1331
+ 'Default ' => null ,
1332
1332
'Extra ' => '' ,
1333
1333
),
1334
1334
(object ) array (
1335
1335
'Field ' => 'name ' ,
1336
1336
'Type ' => 'varchar(20) ' ,
1337
1337
'Null ' => 'NO ' ,
1338
1338
'Key ' => '' ,
1339
- 'Default ' => null ,
1339
+ 'Default ' => '' ,
1340
1340
'Extra ' => '' ,
1341
1341
),
1342
1342
(object ) array (
@@ -1363,7 +1363,7 @@ public function testAlterTableWithColumnFirstAndAfter() {
1363
1363
'Type ' => 'int(11) ' ,
1364
1364
'Null ' => 'NO ' ,
1365
1365
'Key ' => '' ,
1366
- 'Default ' => ' 0 ' ,
1366
+ 'Default ' => null ,
1367
1367
'Extra ' => '' ,
1368
1368
),
1369
1369
(object ) array (
@@ -1457,7 +1457,7 @@ public function testAlterTableWithColumnFirstAndAfter() {
1457
1457
'Type ' => 'varchar(20) ' ,
1458
1458
'Null ' => 'NO ' ,
1459
1459
'Key ' => '' ,
1460
- 'Default ' => null ,
1460
+ 'Default ' => '' ,
1461
1461
'Extra ' => '' ,
1462
1462
),
1463
1463
(object ) array (
@@ -1503,7 +1503,7 @@ public function testAlterTableWithMultiColumnFirstAndAfter() {
1503
1503
'Type ' => 'int(11) ' ,
1504
1504
'Null ' => 'NO ' ,
1505
1505
'Key ' => '' ,
1506
- 'Default ' => ' 0 ' ,
1506
+ 'Default ' => null ,
1507
1507
'Extra ' => '' ,
1508
1508
),
1509
1509
(object ) array (
@@ -1549,7 +1549,7 @@ public function testAlterTableWithMultiColumnFirstAndAfter() {
1549
1549
'Type ' => 'int(11) ' ,
1550
1550
'Null ' => 'NO ' ,
1551
1551
'Key ' => '' ,
1552
- 'Default ' => ' 0 ' ,
1552
+ 'Default ' => null ,
1553
1553
'Extra ' => '' ,
1554
1554
),
1555
1555
(object ) array (
@@ -1600,7 +1600,7 @@ public function testAlterTableAddIndex() {
1600
1600
'Table ' => '_tmp_table ' ,
1601
1601
'Non_unique ' => '1 ' ,
1602
1602
'Key_name ' => 'name ' ,
1603
- 'Seq_in_index ' => '0 ' ,
1603
+ 'Seq_in_index ' => '1 ' ,
1604
1604
'Column_name ' => 'name ' ,
1605
1605
'Collation ' => 'A ' ,
1606
1606
'Cardinality ' => '0 ' ,
@@ -1610,6 +1610,8 @@ public function testAlterTableAddIndex() {
1610
1610
'Index_type ' => 'BTREE ' ,
1611
1611
'Comment ' => '' ,
1612
1612
'Index_comment ' => '' ,
1613
+ 'Visible ' => 'YES ' ,
1614
+ 'Expression ' => null ,
1613
1615
),
1614
1616
),
1615
1617
$ results
@@ -1635,16 +1637,18 @@ public function testAlterTableAddUniqueIndex() {
1635
1637
'Table ' => '_tmp_table ' ,
1636
1638
'Non_unique ' => '0 ' ,
1637
1639
'Key_name ' => 'name ' ,
1638
- 'Seq_in_index ' => '0 ' ,
1640
+ 'Seq_in_index ' => '1 ' ,
1639
1641
'Column_name ' => 'name ' ,
1640
1642
'Collation ' => 'A ' ,
1641
1643
'Cardinality ' => '0 ' ,
1642
- 'Sub_part ' => null ,
1644
+ 'Sub_part ' => ' 20 ' ,
1643
1645
'Packed ' => null ,
1644
1646
'Null ' => '' ,
1645
1647
'Index_type ' => 'BTREE ' ,
1646
1648
'Comment ' => '' ,
1647
1649
'Index_comment ' => '' ,
1650
+ 'Visible ' => 'YES ' ,
1651
+ 'Expression ' => null ,
1648
1652
),
1649
1653
),
1650
1654
$ results
@@ -1670,16 +1674,18 @@ public function testAlterTableAddFulltextIndex() {
1670
1674
'Table ' => '_tmp_table ' ,
1671
1675
'Non_unique ' => '1 ' ,
1672
1676
'Key_name ' => 'name ' ,
1673
- 'Seq_in_index ' => '0 ' ,
1677
+ 'Seq_in_index ' => '1 ' ,
1674
1678
'Column_name ' => 'name ' ,
1675
- 'Collation ' => ' A ' ,
1679
+ 'Collation ' => null ,
1676
1680
'Cardinality ' => '0 ' ,
1677
1681
'Sub_part ' => null ,
1678
1682
'Packed ' => null ,
1679
1683
'Null ' => '' ,
1680
1684
'Index_type ' => 'FULLTEXT ' ,
1681
1685
'Comment ' => '' ,
1682
1686
'Index_comment ' => '' ,
1687
+ 'Visible ' => 'YES ' ,
1688
+ 'Expression ' => null ,
1683
1689
),
1684
1690
),
1685
1691
$ results
@@ -2167,15 +2173,14 @@ public function testNestedTransactionWorkComplexModify() {
2167
2173
$ fields = $ this ->engine ->get_query_results ();
2168
2174
2169
2175
$ this ->assertEquals (
2170
- $ fields ,
2171
2176
array (
2172
2177
(object ) array (
2173
2178
'Field ' => 'ID ' ,
2174
- 'Type ' => 'integer ' ,
2179
+ 'Type ' => 'int ' ,
2175
2180
'Null ' => 'NO ' ,
2176
2181
'Key ' => 'PRI ' ,
2177
- 'Default ' => ' 0 ' ,
2178
- 'Extra ' => '' ,
2182
+ 'Default ' => null ,
2183
+ 'Extra ' => 'auto_increment ' ,
2179
2184
),
2180
2185
(object ) array (
2181
2186
'Field ' => 'option_name ' ,
@@ -2193,7 +2198,8 @@ public function testNestedTransactionWorkComplexModify() {
2193
2198
'Default ' => '' ,
2194
2199
'Extra ' => '' ,
2195
2200
),
2196
- )
2201
+ ),
2202
+ $ fields
2197
2203
);
2198
2204
}
2199
2205
@@ -2426,7 +2432,7 @@ public function testDescribeAccurate() {
2426
2432
'Field ' => 'term_name ' ,
2427
2433
'Type ' => 'varchar(11) ' ,
2428
2434
'Null ' => 'NO ' ,
2429
- 'Key ' => '' ,
2435
+ 'Key ' => 'MUL ' ,
2430
2436
'Default ' => '0 ' ,
2431
2437
'Extra ' => '' ,
2432
2438
),
0 commit comments