Skip to content

Commit ee9b88d

Browse files
committed
Return min value
1 parent c7bd1c0 commit ee9b88d

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/Database/Adapter/MariaDB.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1940,7 +1940,6 @@ public function getSupportForOptionalSpatialAttributeWithExistingRows(): bool
19401940
*/
19411941
public function getMaxVarcharLength(): int
19421942
{
1943-
return $this->getMaxIndexLength();
1944-
return 16381; // Floor value for Postgres:16383 | MySQL:16381 | MariaDB:16382
1943+
return min(16381, $this->getMaxIndexLength());
19451944
}
19461945
}

src/Database/Adapter/Postgres.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2327,6 +2327,6 @@ public function decodePolygon(string $wkb): array
23272327
*/
23282328
public function getMaxVarcharLength(): int
23292329
{
2330-
return 16381; // Floor value for Postgres:16383 | MySQL:16381 | MariaDB:16382
2330+
return 16383;
23312331
}
23322332
}

0 commit comments

Comments
 (0)