Commit 597e27de authored by Cédric Anne's avatar Cédric Anne Committed by Johan Cwiklinski
Browse files

Fix filtering in table listing

parent d27bdb42
...@@ -123,7 +123,7 @@ class Utf8mb4Command extends AbstractCommand { ...@@ -123,7 +123,7 @@ class Utf8mb4Command extends AbstractCommand {
private function upgradeRowFormat(): void { private function upgradeRowFormat(): void {
$table_iterator = $this->db->listTables( $table_iterator = $this->db->listTables(
'glpi_%', 'glpi\_%',
[ [
'row_format' => ['Compact', 'Redundant'], 'row_format' => ['Compact', 'Redundant'],
] ]
......
...@@ -595,7 +595,7 @@ class DBmysql { ...@@ -595,7 +595,7 @@ class DBmysql {
'FROM' => 'information_schema.tables', 'FROM' => 'information_schema.tables',
'WHERE' => [ 'WHERE' => [
'information_schema.tables.table_schema' => $this->dbdefault, 'information_schema.tables.table_schema' => $this->dbdefault,
'information_schema.tables.table_name' => ['LIKE', 'glpi_%'], 'information_schema.tables.table_name' => ['LIKE', 'glpi\_%'],
'information_schema.tables.table_type' => 'BASE TABLE', 'information_schema.tables.table_type' => 'BASE TABLE',
['NOT' => ['information_schema.tables.table_collation' => 'utf8mb4_unicode_ci']], ['NOT' => ['information_schema.tables.table_collation' => 'utf8mb4_unicode_ci']],
], ],
...@@ -623,7 +623,7 @@ class DBmysql { ...@@ -623,7 +623,7 @@ class DBmysql {
], ],
'WHERE' => [ 'WHERE' => [
'information_schema.tables.table_schema' => $this->dbdefault, 'information_schema.tables.table_schema' => $this->dbdefault,
'information_schema.tables.table_name' => ['LIKE', 'glpi_%'], 'information_schema.tables.table_name' => ['LIKE', 'glpi\_%'],
'information_schema.tables.table_type' => 'BASE TABLE', 'information_schema.tables.table_type' => 'BASE TABLE',
['NOT' => ['information_schema.columns.collation_name' => null]], ['NOT' => ['information_schema.columns.collation_name' => null]],
['NOT' => ['information_schema.columns.collation_name' => 'utf8mb4_unicode_ci']] ['NOT' => ['information_schema.columns.collation_name' => 'utf8mb4_unicode_ci']]
......
...@@ -579,7 +579,7 @@ function update1($DBname) { ...@@ -579,7 +579,7 @@ function update1($DBname) {
include_once (GLPI_CONFIG_DIR . "/config_db.php"); include_once (GLPI_CONFIG_DIR . "/config_db.php");
global $DB; global $DB;
$DB = new DB(); $DB = new DB();
if ($DB->listTables('glpi_%', ['table_collation' => 'utf8mb4_unicode_ci'])->count() > 0) { if ($DB->listTables('glpi\_%', ['table_collation' => 'utf8mb4_unicode_ci'])->count() > 0) {
// Use utf8mb4 charset for update process if at least one table already uses this charset. // Use utf8mb4 charset for update process if at least one table already uses this charset.
if ($success = DBConnection::updateConfigProperty('use_utf8mb4', true)) { if ($success = DBConnection::updateConfigProperty('use_utf8mb4', true)) {
$DB->use_utf8mb4 = true; $DB->use_utf8mb4 = true;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment