| @@ -146,22 +146,8 @@ | ||
| 146 | 146 | } |
| 147 | 147 | |
| 148 | 148 | public function getCharset(): string |
| 149 | 149 | { |
| 150 | - return $this->getCharsetCollate('DEFAULT '); | |
| 151 | - } | |
| 152 | - | |
| 153 | - /** | |
| 154 | - * The charset clause for a column definition. It carries no DEFAULT, because that | |
| 155 | - * makes it a table option, which a column definition does not accept. | |
| 156 | - */ | |
| 157 | - public function getColumnCharset(): string | |
| 158 | - { | |
| 159 | - return $this->getCharsetCollate(''); | |
| 160 | - } | |
| 161 | - | |
| 162 | - private function getCharsetCollate(string $charsetPrefix): string | |
| 163 | - { | |
| 164 | 150 | $mySqlVersion = (string) $this->getVariable('SELECT VERSION() as mysql_version'); |
| 165 | 151 | |
| 166 | 152 | if (version_compare($mySqlVersion, '4.1.0', '<')) { |
| 167 | 153 | return ''; |
| @@ -169,9 +155,9 @@ | ||
| 169 | 155 | |
| 170 | 156 | $charsetCollate = ''; |
| 171 | 157 | |
| 172 | 158 | if (!empty($this->wpDatabase->charset)) { |
| 173 | - $charsetCollate = "{$charsetPrefix}CHARACTER SET {$this->wpDatabase->charset}"; | |
| 159 | + $charsetCollate = "DEFAULT CHARACTER SET {$this->wpDatabase->charset}"; | |
| 174 | 160 | } |
| 175 | 161 | |
| 176 | 162 | if (!empty($this->wpDatabase->collate)) { |
| 177 | 163 | $charsetCollate .= " COLLATE {$this->wpDatabase->collate}"; |