mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
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 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.5
parent
e20851e7a8
commit
c42fbc49f5
@@ -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',
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user