mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 04:43:03 +01:00
Improvement CORE-4148 - Increase ISQL buffer size from 64 KB to 10 MB, as the engine.
This commit is contained in:
parent
34c85bf5cf
commit
2485ccfa12
@ -1332,8 +1332,6 @@ static dsql_req* prepareStatement(thread_db* tdbb, dsql_dbb* database, jrd_tra*
|
||||
if (text && textLength == 0)
|
||||
textLength = static_cast<ULONG>(strlen(text));
|
||||
|
||||
// just a safety check
|
||||
const ULONG MAX_SQL_LENGTH = 10 * 1024 * 1024; // 10 MB
|
||||
textLength = MIN(textLength, MAX_SQL_LENGTH);
|
||||
|
||||
TraceDSQLPrepare trace(database->dbb_attachment, transaction, textLength, text);
|
||||
|
@ -2077,7 +2077,7 @@ static processing_state add_row(TEXT* tabname)
|
||||
}
|
||||
|
||||
const size_t length = strlen(lastInputLine);
|
||||
if (length > MAX_USHORT - 2)
|
||||
if (length > MAX_SQL_LENGTH)
|
||||
{
|
||||
IUTILS_msg_get(BUFFER_OVERFLOW, msg);
|
||||
STDERROUT(msg);
|
||||
@ -3385,7 +3385,7 @@ static bool bulk_insert_retriever(const char* prompt)
|
||||
if (length == 0)
|
||||
rc = true;
|
||||
*/
|
||||
if (length > MAX_USHORT - 2)
|
||||
if (length > MAX_SQL_LENGTH)
|
||||
{
|
||||
TEXT msg[MSG_LENGTH];
|
||||
IUTILS_msg_get(BUFFER_OVERFLOW, msg);
|
||||
@ -4158,7 +4158,7 @@ static void do_isql()
|
||||
// code tells us we are done
|
||||
|
||||
Firebird::Array<TEXT> stmt;
|
||||
const size_t stmtLength = MAX_USHORT;
|
||||
const size_t stmtLength = MAX_SQL_LENGTH;
|
||||
TEXT* statement = stmt.getBuffer(stmtLength);
|
||||
processing_state ret;
|
||||
|
||||
|
@ -68,6 +68,8 @@ const size_t MAX_SQL_IDENTIFIER_LEN = METADATA_IDENTIFIER_CHAR_LEN * METADATA_BY
|
||||
const size_t MAX_SQL_IDENTIFIER_SIZE = MAX_SQL_IDENTIFIER_LEN + 1;
|
||||
typedef TEXT SqlIdentifier[MAX_SQL_IDENTIFIER_SIZE];
|
||||
|
||||
const ULONG MAX_SQL_LENGTH = 10 * 1024 * 1024; // 10 MB - just a safety check
|
||||
|
||||
const char* const DB_KEY_NAME = "DB_KEY";
|
||||
const char* const RDB_DB_KEY_NAME = "RDB$DB_KEY";
|
||||
const char* const RDB_RECORD_VERSION_NAME = "RDB$RECORD_VERSION";
|
||||
|
Loading…
Reference in New Issue
Block a user