mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 06:03:02 +01:00
Extend variable value in MON$CONTEXT_VARIABLES up to the possible
maximum (32765 bytes). This resolves CORE-5246: String truncation error while selecting from MON$ tables if some user-defined context variable exceeds 255 bytes in length.
This commit is contained in:
parent
ec7cbdf4ef
commit
373c4599d3
@ -7774,7 +7774,7 @@ bool ParameterNode::setParameterType(DsqlCompilerScratch* dsqlScratch,
|
||||
dsqlParameter->par_desc.dsc_dtype = dtype_varying;
|
||||
// The error msgs is inaccurate, but causing dsc_length
|
||||
// to be outsise range can be worse.
|
||||
if (dsqlParameter->par_desc.dsc_length > MAX_COLUMN_SIZE - sizeof(USHORT))
|
||||
if (dsqlParameter->par_desc.dsc_length > MAX_VARY_COLUMN_SIZE)
|
||||
{
|
||||
ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-204) <<
|
||||
//Arg::Gds(isc_dsql_datatype_err)
|
||||
|
@ -50,10 +50,12 @@
|
||||
//const int BLOB_max_predefined_subtype = 9;
|
||||
//
|
||||
|
||||
// Column Limits
|
||||
// Column Limits (in bytes)
|
||||
|
||||
const ULONG MAX_COLUMN_SIZE = 32767; // Bytes
|
||||
const ULONG MAX_STR_SIZE = 65535; // Bytes
|
||||
const ULONG MAX_COLUMN_SIZE = 32767;
|
||||
const ULONG MAX_VARY_COLUMN_SIZE = MAX_COLUMN_SIZE - sizeof(USHORT);
|
||||
|
||||
const ULONG MAX_STR_SIZE = 65535;
|
||||
|
||||
// Metadata constants
|
||||
|
||||
|
@ -155,7 +155,7 @@
|
||||
FIELD(fld_src_info , nam_src_info , dtype_long , sizeof(SLONG) , 0 , NULL , true)
|
||||
|
||||
FIELD(fld_ctx_var_name , nam_ctx_var_name , dtype_varying , 80 , 0 , NULL , true)
|
||||
FIELD(fld_ctx_var_value , nam_ctx_var_value , dtype_varying , 255 , 0 , NULL , true)
|
||||
FIELD(fld_ctx_var_value , nam_ctx_var_value , dtype_varying , MAX_VARY_COLUMN_SIZE , 0 , NULL , true)
|
||||
|
||||
FIELD(fld_engine_name , nam_engine_name , dtype_text , MAX_SQL_IDENTIFIER_LEN , dsc_text_type_metadata , NULL , true)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user