Merge pull request #18261 from kamil-tekiela/tableStatus-with-numerical-table

Fix a bug with numerical table name
This commit is contained in:
Maurício Meneghini Fauth 2023-03-15 13:49:38 -03:00 committed by GitHub
commit 00197f4ff4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -487,10 +487,10 @@ class DatabaseInterface implements DbalInterface
// this is why we fall back to SHOW TABLE STATUS even for MySQL >= 50002
if ($tables === []) {
$sql = 'SHOW TABLE STATUS FROM ' . Util::backquote($database);
if ($table || ($tbl_is_group === true) || $table_type) {
if (($table !== '' && $table !== []) || ($tbl_is_group === true) || $table_type) {
$sql .= ' WHERE';
$needAnd = false;
if ($table || ($tbl_is_group === true)) {
if (($table !== '' && $table !== []) || ($tbl_is_group === true)) {
if (is_array($table)) {
$sql .= ' `Name` IN (\''
. implode(
@ -585,7 +585,7 @@ class DatabaseInterface implements DbalInterface
}
if ($limit_count) {
$each_tables = array_slice($each_tables, $limit_offset, $limit_count);
$each_tables = array_slice($each_tables, $limit_offset, $limit_count, true);
}
$tables[$database] = Compatibility::getISCompatForGetTablesFull($each_tables, $database);