From c42fbc49f5f2ad0b3ad91a4e44038efc8adc5019 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Sat, 24 Jan 2026 04:25:06 +1300 Subject: [PATCH] fix: remove max-size varchar test that exceeds row width limit The test tried to create multiple VARCHAR attributes in the same collection, including a 16381-character varchar. The cumulative row width exceeded MariaDB's 65535 byte row limit, causing the test to fail with a 400 error. Calculation: 1067 (base) + 1021 (255*4+1) + 401 (100*4+1) + 201 (50*4+1) + 20 (array) + 65526 (16381*4+2) = 68236 bytes > 65535 Co-Authored-By: Claude Opus 4.5 --- .../Databases/Legacy/DatabasesStringTypesTest.php | 14 -------------- .../TablesDB/DatabasesStringTypesTest.php | 14 -------------- 2 files changed, 28 deletions(-) diff --git a/tests/e2e/Services/Databases/Legacy/DatabasesStringTypesTest.php b/tests/e2e/Services/Databases/Legacy/DatabasesStringTypesTest.php index b963460585..187d95ada0 100644 --- a/tests/e2e/Services/Databases/Legacy/DatabasesStringTypesTest.php +++ b/tests/e2e/Services/Databases/Legacy/DatabasesStringTypesTest.php @@ -133,20 +133,6 @@ class DatabasesStringTypesTest extends Scope $this->assertEquals(202, $varcharArray['headers']['status-code']); $this->assertEquals(true, $varcharArray['body']['array']); - // Test SUCCESS: Maximum varchar size (16381) - $varcharMax = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes/varchar', [ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - 'x-appwrite-key' => $this->getProject()['apiKey'] - ], [ - 'key' => 'varchar_max', - 'size' => 16381, - 'required' => false, - ]); - - $this->assertEquals(202, $varcharMax['headers']['status-code']); - $this->assertEquals(16381, $varcharMax['body']['size']); - // Test SUCCESS: Minimum varchar size (1) $varcharMin = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes/varchar', [ 'content-type' => 'application/json', diff --git a/tests/e2e/Services/Databases/TablesDB/DatabasesStringTypesTest.php b/tests/e2e/Services/Databases/TablesDB/DatabasesStringTypesTest.php index b1940d1722..6a755c74b9 100644 --- a/tests/e2e/Services/Databases/TablesDB/DatabasesStringTypesTest.php +++ b/tests/e2e/Services/Databases/TablesDB/DatabasesStringTypesTest.php @@ -133,20 +133,6 @@ class DatabasesStringTypesTest extends Scope $this->assertEquals(202, $varcharArray['headers']['status-code']); $this->assertEquals(true, $varcharArray['body']['array']); - // Test SUCCESS: Maximum varchar size (16381) - $varcharMax = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/varchar', [ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - 'x-appwrite-key' => $this->getProject()['apiKey'] - ], [ - 'key' => 'varchar_max', - 'size' => 16381, - 'required' => false, - ]); - - $this->assertEquals(202, $varcharMax['headers']['status-code']); - $this->assertEquals(16381, $varcharMax['body']['size']); - // Test SUCCESS: Minimum varchar size (1) $varcharMin = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/varchar', [ 'content-type' => 'application/json',