mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 22:03:03 +01:00
Improvement CORE-1170 - Conversion of DDL source from client charset to metadata charset
This commit is contained in:
parent
c76e06eb10
commit
8feba5fcd2
@ -840,7 +840,7 @@ USHORT DYN_put_blr_blob(Global* gbl, const UCHAR** ptr, bid* blob_id)
|
|||||||
return length;
|
return length;
|
||||||
}
|
}
|
||||||
|
|
||||||
USHORT DYN_put_text_blob(Global* gbl, const UCHAR** ptr, bid* blob_id, USHORT bpb_length, const UCHAR* bpb)
|
USHORT DYN_put_text_blob(Global* gbl, const UCHAR** ptr, bid* blob_id)
|
||||||
{
|
{
|
||||||
/**************************************
|
/**************************************
|
||||||
*
|
*
|
||||||
@ -867,7 +867,35 @@ USHORT DYN_put_text_blob(Global* gbl, const UCHAR** ptr, bid* blob_id, USHORT bp
|
|||||||
const UCHAR* end = NULL;
|
const UCHAR* end = NULL;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
blb* blob = BLB_create2(tdbb, gbl->gbl_transaction, blob_id, bpb_length, bpb);
|
Firebird::UCharBuffer bpb;
|
||||||
|
|
||||||
|
{
|
||||||
|
bpb.resize(15);
|
||||||
|
|
||||||
|
UCHAR* p = bpb.begin();
|
||||||
|
*p++ = isc_bpb_version1;
|
||||||
|
|
||||||
|
*p++ = isc_bpb_source_type;
|
||||||
|
*p++ = 2;
|
||||||
|
put_short(p, isc_blob_text);
|
||||||
|
p += 2;
|
||||||
|
*p++ = isc_bpb_source_interp;
|
||||||
|
*p++ = 1;
|
||||||
|
*p++ = tdbb->tdbb_attachment->att_charset;
|
||||||
|
|
||||||
|
*p++ = isc_bpb_target_type;
|
||||||
|
*p++ = 2;
|
||||||
|
put_short(p, isc_blob_text);
|
||||||
|
p += 2;
|
||||||
|
*p++ = isc_bpb_target_interp;
|
||||||
|
*p++ = 1;
|
||||||
|
*p++ = CS_METADATA;
|
||||||
|
|
||||||
|
// set the array count to the number of bytes we used
|
||||||
|
bpb.shrink(p - bpb.begin());
|
||||||
|
}
|
||||||
|
|
||||||
|
blb* blob = BLB_create2(tdbb, gbl->gbl_transaction, blob_id, bpb.getCount(), bpb.begin());
|
||||||
|
|
||||||
for (end = p + length; p < end; p += TEXT_BLOB_LENGTH)
|
for (end = p + length; p < end; p += TEXT_BLOB_LENGTH)
|
||||||
{
|
{
|
||||||
|
@ -91,7 +91,7 @@ USHORT DYN_get_string(const TEXT**, TEXT*, size_t, bool);
|
|||||||
|
|
||||||
bool DYN_is_it_sql_role(Jrd::Global*, const Firebird::MetaName&, Firebird::MetaName&, Jrd::thread_db*);
|
bool DYN_is_it_sql_role(Jrd::Global*, const Firebird::MetaName&, Firebird::MetaName&, Jrd::thread_db*);
|
||||||
USHORT DYN_put_blr_blob(Jrd::Global*, const UCHAR**, Jrd::bid*);
|
USHORT DYN_put_blr_blob(Jrd::Global*, const UCHAR**, Jrd::bid*);
|
||||||
USHORT DYN_put_text_blob(Jrd::Global*, const UCHAR**, Jrd::bid*, USHORT bpb_length = 0, const UCHAR* bpb = NULL);
|
USHORT DYN_put_text_blob(Jrd::Global*, const UCHAR**, Jrd::bid*);
|
||||||
|
|
||||||
void DYN_rundown_request(Jrd::jrd_req*, SSHORT);
|
void DYN_rundown_request(Jrd::jrd_req*, SSHORT);
|
||||||
USHORT DYN_skip_attribute(const UCHAR**);
|
USHORT DYN_skip_attribute(const UCHAR**);
|
||||||
|
Loading…
Reference in New Issue
Block a user