Changeset 47195
- Timestamp:
- 02/05/2020 10:05:50 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/dbdelta.php
r47193 r47195 16 16 17 17 /** 18 * Database engine used for creating tables. 19 * 20 * Prior to MySQL 5.7, InnoDB did not support FULLTEXT indexes, so MyISAM is used instead. 21 */ 22 protected $db_engine = ''; 23 24 /** 18 25 * Display width for BIGINT data type. 19 26 * … … 41 48 42 49 $db_version = $wpdb->db_version(); 43 $db_engine = '';44 50 45 51 if ( version_compare( $db_version, '5.7', '<' ) ) { 46 // Forcing MyISAM, because InnoDB only started supporting FULLTEXT indexes in MySQL 5.7.47 $ db_engine = 'ENGINE=MyISAM';52 // Prior to MySQL 5.7, InnoDB did not support FULLTEXT indexes, so MyISAM is used instead. 53 $this->db_engine = 'ENGINE=MyISAM'; 48 54 } 49 55 … … 67 73 FULLTEXT KEY fulltext_key (column_1)" . 68 74 // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared 69 ") $db_engine75 ") {$this->db_engine} 70 76 ", 71 77 $this->max_index_length, … … 451 457 KEY compound_key (id,column_1($this->max_index_length)), 452 458 FULLTEXT KEY fulltext_key (column_1) 453 ) ENGINE=MyISAM459 ) {$this->db_engine} 454 460 ", 455 461 false … … 476 482 KEY compound_key (id,column_1($this->max_index_length)), 477 483 FULLTEXT KEY fulltext_key (column_1) 478 ) ENGINE=MyISAM484 ) {$this->db_engine} 479 485 ", 480 486 false … … 501 507 KEY compound_key (id,column_1($this->max_index_length)), 502 508 FULLTEXT KEY fulltext_key (column_1) 503 ) ENGINE=MyISAM509 ) {$this->db_engine} 504 510 ", 505 511 false … … 532 538 KEY compound_key (id,column_1($this->max_index_length)), 533 539 FULLTEXT KEY fulltext_key (column_1) 534 ) ENGINE=MyISAM540 ) {$this->db_engine} 535 541 ", 536 542 false … … 597 603 KEY non_spatial (non_spatial), 598 604 SPATIAL KEY spatial_key (spatial_value) 599 ) ENGINE=MyISAM;605 ) {$this->db_engine}; 600 606 "; 601 607 … … 616 622 SPATIAL KEY spatial_key (spatial_value) 617 623 SPATIAL KEY spatial_key2 (spatial_value2) 618 ) ENGINE=MyISAM;624 ) {$this->db_engine}; 619 625 "; 620 626 … … 680 686 KEY compound_key2 (id,`references`($this->max_index_length)), 681 687 FULLTEXT KEY fulltext_key (column_1) 682 ) ENGINE=MyISAM688 ) {$this->db_engine} 683 689 " 684 690 ); … … 726 732 UNIQUE INDEX key_4 (column_1($this->max_index_length)), 727 733 FULLTEXT INDEX key_5 (column_1), 728 ) ENGINE=MyISAM734 ) {$this->db_engine} 729 735 "; 730 736 … … 761 767 INDEX compound_key (id,column_1($this->max_index_length)), 762 768 FULLTEXT INDEX fulltext_key (column_1) 763 ) ENGINE=MyISAM769 ) {$this->db_engine} 764 770 " 765 771 ); … … 786 792 KEY key_2 (column_1(10)), 787 793 KEY key_3 (column_2(100),column_1(10)), 788 ) ENGINE=MyISAM794 ) {$this->db_engine} 789 795 "; 790 796 … … 819 825 KEY compound_key (id,column_1($this->max_index_length) ASC), 820 826 FULLTEXT KEY fulltext_key (column_1) 821 ) ENGINE=MyISAM827 ) {$this->db_engine} 822 828 " 823 829 ); … … 843 849 KEY compound_key (id,column_1($this->max_index_length)), 844 850 FULLTEXT KEY fulltext_key (column_1) 845 ) ENGINE=MyISAM851 ) {$this->db_engine} 846 852 " 847 853 ); … … 867 873 KEY compound_key (id, column_1($this->max_index_length)), 868 874 FULLTEXT KEY fulltext_key (column_1) 869 ) ENGINE=MyISAM875 ) {$this->db_engine} 870 876 " 871 877 ); … … 891 897 key compound_key (id,column_1($this->max_index_length)), 892 898 FULLTEXT KEY fulltext_key (column_1) 893 ) ENGINE=MyISAM899 ) {$this->db_engine} 894 900 " 895 901 ); … … 915 921 KEY compOUND_key (id,column_1($this->max_index_length)), 916 922 FULLTEXT KEY FULLtext_kEY (column_1) 917 ) ENGINE=MyISAM923 ) {$this->db_engine} 918 924 ", 919 925 false … … 940 946 KEY compound_key (id,column_1($this->max_index_length)), 941 947 FULLTEXT KEY fulltext_key (column_1) 942 ) ENGINE=MyISAM948 ) {$this->db_engine} 943 949 ", 944 950 false … … 966 972 KEY changing_key_length (column_1(20)), 967 973 FULLTEXT KEY fulltext_key (column_1) 968 ) ENGINE=MyISAM974 ) {$this->db_engine} 969 975 " 970 976 ); … … 989 995 KEY changing_key_length (column_1(50)), 990 996 FULLTEXT KEY fulltext_key (column_1) 991 ) ENGINE=MyISAM997 ) {$this->db_engine} 992 998 " 993 999 ); … … 1007 1013 KEY changing_key_length (column_1(1)), 1008 1014 FULLTEXT KEY fulltext_key (column_1) 1009 ) ENGINE=MyISAM1015 ) {$this->db_engine} 1010 1016 " 1011 1017 ); … … 1025 1031 KEY changing_key_length (column_1), 1026 1032 FULLTEXT KEY fulltext_key (column_1) 1027 ) ENGINE=MyISAM1033 ) {$this->db_engine} 1028 1034 " 1029 1035 );
Note: See TracChangeset
for help on using the changeset viewer.